]>
Commit | Line | Data |
---|---|---|
762e8424 | 1 | #ifndef ALIJETMODELBASETASK_H |
2 | #define ALIJETMODELBASETASK_H | |
3 | ||
4 | // $Id$ | |
5 | ||
6 | class TClonesArray; | |
7 | class AliEMCALGeometry; | |
8 | class AliVCluster; | |
9 | class AliPicoTrack; | |
b16bb001 | 10 | class AliVCaloCells; |
787a3c4f | 11 | class AliAODMCParticle; |
5be3857d | 12 | class AliNamedArrayI; |
43032ce2 | 13 | class TF2; |
b929303d | 14 | class AliPythiaInfo; |
65bb5510 | 15 | |
16 | #include <TH1F.h> | |
17 | #include <TF1.h> | |
762e8424 | 18 | |
19 | #include "AliAnalysisTaskSE.h" | |
20 | ||
21 | class AliJetModelBaseTask : public AliAnalysisTaskSE { | |
22 | public: | |
23 | AliJetModelBaseTask(); | |
b16bb001 | 24 | AliJetModelBaseTask(const char *name, Bool_t drawqa=kFALSE); |
762e8424 | 25 | virtual ~AliJetModelBaseTask(); |
26 | ||
a825589f | 27 | void SetEtaRange(Float_t min, Float_t max) { fEtaMin = min; fEtaMax = max; } |
a825589f | 28 | void SetPhiRange(Float_t min, Float_t max) { fPhiMin = min; fPhiMax = max; } |
43032ce2 | 29 | void SetPtRange(Float_t min, Float_t max) { fPtMin = min; fPtMax = max; } |
a744e045 | 30 | void SetPtSpectrum(TH1F *f) { fPtSpectrum = f; } |
27f77648 | 31 | void SetPtSpectrum(TF1 *f) { fPtSpectrum = new TH1F("ptSpectrum","ptSpectrum",1000,f->GetXmin(),f->GetXmax()); |
65bb5510 | 32 | fPtSpectrum->Add(f); } |
43032ce2 | 33 | void SetPtPhiEvPlDistribution(TF2 *f) { fPtPhiEvPlDistribution = f; } |
a744e045 | 34 | void SetDensitySpectrum(TH1F *f) { fDensitySpectrum = f; } |
27f77648 | 35 | void SetDensitySpectrum(TF1 *f) { fDensitySpectrum = new TH1F("densitypectrum","densitypectrum",1000,f->GetXmin(),f->GetXmax()); |
36 | fDensitySpectrum->Add(f); } | |
50da5cf2 | 37 | void SetDifferentialV2(TF1* f) { fDifferentialV2 = f; } |
38 | void SetAddV2(Bool_t b) { fAddV2 = b; } | |
39 | void SetAddFlowFluctuations(Bool_t b) { fFlowFluctuations = b;} | |
4358e58a | 40 | void SetMC(Bool_t a) { fIsMC = a ; } |
b16bb001 | 41 | void SetCopyArray(Bool_t copy) { fCopyArray = copy; } |
a825589f | 42 | void SetTracksName(const char *n) { fTracksName = n; } |
b16bb001 | 43 | void SetClusName(const char *n) { fCaloName = n; } |
44 | void SetCellsName(const char *n) { fCellsName = n; } | |
787a3c4f | 45 | void SetMCParticlesName(const char *n) { fMCParticlesName = n; } |
b929303d | 46 | void SetPythiaInfoName(const char *n) { fPythiaInfoName = n; } |
b16bb001 | 47 | void SetSuffix(const char *s) { fSuffix = s; } |
b16bb001 | 48 | void SetGeometryName(const char *n) { fGeomName = n; } |
f660c2d6 | 49 | void SetMarkMC(Int_t m) { fMarkMC = m; } |
b16bb001 | 50 | virtual void SetNClusters(Int_t n) { fNClusters = n; } |
51 | virtual void SetNCells(Int_t n) { fNCells = n; } | |
52 | virtual void SetNTracks(Int_t n) { fNTracks = n; } | |
53 | ||
762e8424 | 54 | protected: |
50da5cf2 | 55 | void UserExec(Option_t* /*option*/); |
56 | void UserCreateOutputObjects(); | |
b16bb001 | 57 | Int_t SetNumberOfOutCells(Int_t n); // set the number of cells |
58 | Int_t AddCell(Double_t e = -1, Double_t eta = -999, Double_t phi = -1); // add a cell; if values are -1 generate random parameters | |
50da5cf2 | 59 | Int_t AddCell(Double_t e, Int_t absId, Double_t time = 0, Int_t label=0); // add a cell with given energy, position and times |
787a3c4f | 60 | AliVCluster *AddCluster(Double_t e = -1, Double_t eta = -999, Double_t phi = -1, Int_t label=0); // add a cluster; if values are -1 generate random parameters |
50da5cf2 | 61 | AliVCluster *AddCluster(Double_t e, Int_t absId, Int_t label=0); // add a cluster with given energy and position |
62 | AliVCluster *AddCluster(AliVCluster *oc); // add a cluster (copy) | |
6fd2f1a9 | 63 | AliPicoTrack *AddTrack(Double_t pt = -1, Double_t eta = -999, Double_t phi = -1, Byte_t type=0, |
56bd3193 | 64 | Double_t etaemc=0, Double_t phiemc=0, Double_t ptemc=0, Bool_t ise=kFALSE, |
4d3b366f | 65 | Int_t label=0, Short_t charge=1, Double_t mass = 0.1396); // add a track; if values are -1 generate random parameters |
787a3c4f | 66 | AliAODMCParticle *AddMCParticle(AliAODMCParticle *part, Int_t origIndex); // add a MC particle |
50da5cf2 | 67 | void AddV2(Double_t &phi, Double_t &pt) const; |
b16bb001 | 68 | void CopyCells(); |
e44e8726 | 69 | void CopyClusters(); |
70 | void CopyTracks(); | |
787a3c4f | 71 | void CopyMCParticles(); |
ffe32451 | 72 | void GetRandomCell(Double_t &eta, Double_t &phi, Int_t &absId); // generate a random cell in the calorimeter |
2103dc6a | 73 | Double_t GetRandomEta(Bool_t emcal=kFALSE); // generate a random eta value in the given range |
74 | Double_t GetRandomPhi(Bool_t emcal=kFALSE); // generate a random phi value in the given range | |
ffe32451 | 75 | Double_t GetRandomPt(); // generate a random pt value in the given range |
43032ce2 | 76 | void GetRandomParticle(Double_t &pt, Double_t &eta, Double_t &phi, Bool_t emcal=kFALSE); // generate a particle with random eta,phi,pt values |
b16bb001 | 77 | virtual Bool_t ExecOnce(); // intialize task |
ffe32451 | 78 | virtual void Run(); // do jet model action |
762e8424 | 79 | |
80 | TString fGeomName; // EMCal geometry name | |
81 | TString fTracksName; // name of track collection | |
82 | TString fOutTracksName; // name of output track collection | |
83 | TString fCaloName; // name of calo cluster collection | |
84 | TString fOutCaloName; // name of output cluster collection | |
b16bb001 | 85 | TString fCellsName; // name of calo cells collection |
86 | TString fOutCellsName; // name of output cells collection | |
787a3c4f | 87 | TString fMCParticlesName; // name of MC particle collection |
88 | TString fOutMCParticlesName; // name of output MC particle collection | |
b929303d | 89 | TString fPythiaInfoName; // name of pythia info |
4358e58a | 90 | Bool_t fIsMC; // whether the current event is MC or not |
762e8424 | 91 | TString fSuffix; // suffix to add in the name of new collections |
92 | Float_t fEtaMin; // eta minimum value | |
93 | Float_t fEtaMax; // eta maximum value | |
94 | Float_t fPhiMin; // phi minimum value | |
95 | Float_t fPhiMax; // phi maximum value | |
96 | Float_t fPtMin; // pt minimum value | |
97 | Float_t fPtMax; // pt maximum value | |
98 | Bool_t fCopyArray; // whether or not the array will be copied to a new one before modelling | |
99 | Int_t fNClusters; // how many clusters are being processed | |
b16bb001 | 100 | Int_t fNCells; // how many cells are being processed |
762e8424 | 101 | Int_t fNTracks; // how many tracks are being processed |
f660c2d6 | 102 | Int_t fMarkMC; // which MC label is to be used (default=100) |
a744e045 | 103 | TH1F *fPtSpectrum; // pt spectrum to extract random pt values |
43032ce2 | 104 | TF2 *fPtPhiEvPlDistribution; // pt vs. (phi-psi) distribution to extract random pt/phi values |
a744e045 | 105 | TH1F *fDensitySpectrum; // particle density spectrum to extract random density values |
50da5cf2 | 106 | TF1 *fDifferentialV2; // v2 as function of pt |
107 | Bool_t fAddV2; // add v2 sampled from a tf1 | |
108 | Bool_t fFlowFluctuations; // introduce gaussian flow fluctuation | |
b16bb001 | 109 | Bool_t fQAhistos; // draw QA histograms |
43032ce2 | 110 | Double_t fPsi; //!simmetry plane for the elliptic flow |
4358e58a | 111 | Bool_t fIsInit; //!=true if initialized |
762e8424 | 112 | AliEMCALGeometry *fGeom; //!pointer to EMCal geometry |
6fd2f1a9 | 113 | Double_t fVertex[3]; //!event vertex |
762e8424 | 114 | TClonesArray *fClusters; //!cluster collection |
115 | TClonesArray *fOutClusters; //!output cluster collection | |
116 | TClonesArray *fTracks; //!track collection | |
117 | TClonesArray *fOutTracks; //!output track collection | |
b16bb001 | 118 | AliVCaloCells *fCaloCells; //!cells collection |
119 | AliVCaloCells *fOutCaloCells; //!output cells collection | |
120 | Int_t fAddedCells; //!number of added cells | |
787a3c4f | 121 | TClonesArray *fMCParticles; //!MC particles collection |
5be3857d | 122 | AliNamedArrayI *fMCParticlesMap; //!MC particles mapping |
787a3c4f | 123 | TClonesArray *fOutMCParticles; //!output MC particles collection |
5be3857d | 124 | AliNamedArrayI *fOutMCParticlesMap; //!MC particles mapping |
787a3c4f | 125 | Int_t fMCLabelShift; //!MC label shift |
b16bb001 | 126 | Bool_t fEsdMode; //!ESD/AOD mode |
127 | TList *fOutput; //!output list for QA histograms | |
b929303d | 128 | AliPythiaInfo *fPythiaInfo; //!Info on original partons:PDG,pt, eta, phi and pythia event weight |
762e8424 | 129 | |
130 | private: | |
131 | AliJetModelBaseTask(const AliJetModelBaseTask&); // not implemented | |
132 | AliJetModelBaseTask &operator=(const AliJetModelBaseTask&); // not implemented | |
133 | ||
a744e045 | 134 | ClassDef(AliJetModelBaseTask, 12) // Jet modelling task |
762e8424 | 135 | }; |
136 | #endif |