AliPhysics  c2ade29 (c2ade29)
AliAnalysisTaskEmcalJetCorrection.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKEMCALJETCORRECTION_H
2 #define ALIANALYSISTASKEMCALJETCORRECTION_H
3 
4 /* Copyright(c) 1998-2019, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice */
6 
8 
9 //###############################################################################################################################################3
10 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,0,0)
11  class TPython;
12 #endif
13 
24 //
26  public:
27 
29  AliAnalysisTaskEmcalJetCorrection(const char *name);
31  static AliAnalysisTaskEmcalJetCorrection* AddTaskEmcalJetCorrection(TString modelName, TString trackArray, TString jetArray, TString rhoObject, Double_t jetRadius, const char* taskNameSuffix);
33  void Terminate(Option_t *option);
34  void SetCustomPackages(const char* val) {fCustomPackages = val;}
35  void SetModelName(const char* val) {fModelName = val;}
39  protected:
40  void ExecOnce();
41  Bool_t Run();
42  void GetPtAndMassFromModel(AliEmcalJet* jet, Float_t& pt_ML, Float_t& mass_ML);
44  void CalculateJetShapes(AliEmcalJet* jet, Double_t& leSub_noCorr, Double_t& angularity, Double_t& momentumDispersion, Double_t& trackPtMean, Double_t& trackPtMedian);
45 
46  #if ROOT_VERSION_CODE >= ROOT_VERSION(6,0,0)
47  TPython* fPythonCLI;
48  #endif
51  TClonesArray* fJetOutputArray;
57 
58  // ################## HELPER FUNCTIONS
60  {
61  Double_t deltaPhi = TMath::Min(TMath::Abs(phi1-phi2),TMath::TwoPi() - TMath::Abs(phi1-phi2));
62  return TMath::Sqrt((eta1-eta2)*(eta1-eta2) + deltaPhi*deltaPhi);
63  }
64  void FillHistogram(const char * key, Double_t x);
65  void FillHistogram(const char * key, Double_t x, Double_t y);
66  void FillHistogram(const char * key, Double_t x, Double_t y, Double_t add);
67  void FillHistogram3D(const char * key, Double_t x, Double_t y, Double_t z, Double_t add = 0);
68  template <class T> T* AddHistogram1D(const char* name = "CustomHistogram", const char* title = "NO_TITLE", const char* options = "", Int_t xBins = 100, Double_t xMin = 0.0, Double_t xMax = 20.0, const char* xTitle = "x axis", const char* yTitle = "y axis");
69  template <class T> T* AddHistogram2D(const char* name = "CustomHistogram", const char* title = "NO_TITLE", const char* options = "", Int_t xBins = 100, Double_t xMin = 0.0, Double_t xMax = 20.0, Int_t yBins = 100, Double_t yMin = 0.0, Double_t yMax = 20.0, const char* xTitle = "x axis", const char* yTitle = "y axis", const char* zTitle = "z axis");
70  template <class T> T* AddHistogram3D(const char* name = "CustomHistogram", const char* title = "NO_TITLE", const char* options = "", Int_t xBins = 100, Double_t xMin = 0.0, Double_t xMax = 20.0, Int_t yBins = 100, Double_t yMin = 0.0, Double_t yMax = 20.0, Int_t zBins = 100, Double_t zMin = 0.0, Double_t zMax = 20.0, const char* xTitle = "x axis", const char* yTitle = "y axis", const char* zTitle = "z axis");
71 
72  private:
75 
77  ClassDef(AliAnalysisTaskEmcalJetCorrection, 1) // Jet correction task
79 };
80 
81 #endif
void CalculateJetShapes(AliEmcalJet *jet, Double_t &leSub_noCorr, Double_t &angularity, Double_t &momentumDispersion, Double_t &trackPtMean, Double_t &trackPtMedian)
double Double_t
Definition: External.C:58
const char * title
Definition: MakeQAPdf.C:27
T * AddHistogram3D(const char *name="CustomHistogram", const char *title="NO_TITLE", const char *options="", Int_t xBins=100, Double_t xMin=0.0, Double_t xMax=20.0, Int_t yBins=100, Double_t yMin=0.0, Double_t yMax=20.0, Int_t zBins=100, Double_t zMin=0.0, Double_t zMax=20.0, const char *xTitle="x axis", const char *yTitle="y axis", const char *zTitle="z axis")
T * AddHistogram2D(const char *name="CustomHistogram", const char *title="NO_TITLE", const char *options="", Int_t xBins=100, Double_t xMin=0.0, Double_t xMax=20.0, Int_t yBins=100, Double_t yMin=0.0, Double_t yMax=20.0, const char *xTitle="x axis", const char *yTitle="y axis", const char *zTitle="z axis")
TString fBackgroundModelInputParameters
MVA model input parameters (comma-separated)
TClonesArray * fJetOutputArray
! Array of corr. jets, attached to event
void ExecOnce()
Perform steps needed to initialize the analysis.
Container for particles within the EMCAL framework.
UShort_t T(UShort_t m, UShort_t t)
Definition: RingBits.C:60
T * AddHistogram1D(const char *name="CustomHistogram", const char *title="NO_TITLE", const char *options="", Int_t xBins=100, Double_t xMin=0.0, Double_t xMax=20.0, const char *xTitle="x axis", const char *yTitle="y axis")
int Int_t
Definition: External.C:63
float Float_t
Definition: External.C:68
TString fCustomPackages
Custom pip packages to be installed.
TString fBackgroundModelFileName
MVA model file name.
Double_t GetDistance(Double_t eta1, Double_t eta2, Double_t phi1, Double_t phi2)
static AliAnalysisTaskEmcalJetCorrection * AddTaskEmcalJetCorrection(TString modelName, TString trackArray, TString jetArray, TString rhoObject, Double_t jetRadius, const char *taskNameSuffix)
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
const char Option_t
Definition: External.C:48
TString fModelName
Name of model (used for jet collection suffix)
void FillHistogram3D(const char *key, Double_t x, Double_t y, Double_t z, Double_t add=0)
bool Bool_t
Definition: External.C:53
Double_t yMin
void GetPtAndMassFromModel(AliEmcalJet *jet, Float_t &pt_ML, Float_t &mass_ML)
Container for jet within the EMCAL jet framework.
Bool_t fCorrectAlsoMass
mass is also approximated by model or not
Double_t yMax
AliAnalysisTaskEmcalJetCorrection & operator=(const AliAnalysisTaskEmcalJetCorrection &)
Bool_t Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
Analysis task that corrects jet pT/mass with Python code.