]>
Commit | Line | Data |
---|---|---|
bd092f0f | 1 | #ifndef AliAnalysisTaskEMCALIsoPhoton_h |
2 | #define AliAnalysisTaskEMCALIsoPhoton_h | |
3 | ||
4 | // $Id$ | |
5 | ||
6 | class TH1F; | |
7 | class TH2F; | |
caaf99d3 | 8 | class TH3F; |
965c985f | 9 | class THnSparse; |
a62631a9 | 10 | class TList; |
bd092f0f | 11 | class TObjArray; |
12 | class AliEMCALGeometry; | |
4d4ce2d2 | 13 | class AliOADBContainer; |
bd092f0f | 14 | class AliESDCaloCells; |
15 | class AliESDEvent; | |
16 | class AliESDtrack; | |
17 | class AliESDtrackCuts; | |
2e20efe5 | 18 | class AliAODEvent; |
19 | class AliAODCaloCells; | |
bd092f0f | 20 | class AliVCluster; |
c7bb0b43 | 21 | class AliMCEvent; |
22 | class AliStack; | |
23 | class TParticle; | |
68faccf4 | 24 | class AliAODMCParticle; |
822c9944 | 25 | class TGeoHMatrix; |
bd092f0f | 26 | |
27 | #include "AliAnalysisTaskSE.h" | |
28 | ||
29 | class AliAnalysisTaskEMCALIsoPhoton : public AliAnalysisTaskSE { | |
30 | public: | |
31 | AliAnalysisTaskEMCALIsoPhoton(); | |
32 | AliAnalysisTaskEMCALIsoPhoton(const char *name); | |
33 | virtual ~AliAnalysisTaskEMCALIsoPhoton() {} | |
34 | ||
35 | void UserCreateOutputObjects(); | |
36 | void UserExec(Option_t *option); | |
37 | void Terminate(Option_t *); | |
38 | ||
7022f12d | 39 | void GetCeIso(TVector3 vec, Int_t maxid, Float_t &iso, Float_t &phiband, Float_t &core, Double_t EtCl); |
bd092f0f | 40 | Double_t GetCrossEnergy(const AliVCluster *cluster, Short_t &idmax); |
41 | Double_t GetMaxCellEnergy(const AliVCluster *cluster, Short_t &id) const; | |
42 | void GetTrIso(TVector3 vec, Float_t &iso, Float_t &phiband, Float_t &core); | |
1c86c72c | 43 | Double_t GetTrackMatchedPt(Int_t matchIndex); |
bd092f0f | 44 | void FillClusHists(); |
c7bb0b43 | 45 | void FillMcHists(); |
2b7205ad | 46 | void FillQA(); |
b8b781cb | 47 | Float_t GetClusSource(const AliVCluster *cluster); |
f507c09b | 48 | void FollowGamma(); |
22ad7981 | 49 | void GetDaughtersInfo(int firstd, int lastd, int selfid, const char *indputindent); |
f912f9a9 | 50 | Float_t GetMcPtSumInCone(Float_t etaclus, Float_t phiclus, Float_t R); |
112eb594 | 51 | void LoopOnCells(); |
34393c41 | 52 | bool IsExotic(AliVCluster *c); |
bd092f0f | 53 | void SetExotCut(Double_t c) { fExoticCut = c; } |
54 | void SetGeoName(const char *n) { fGeoName = n; } | |
55 | void SetIsoConeR(Double_t r) { fIsoConeR = r; } | |
56 | void SetPeriod(const char *n) { fPeriod = n; } | |
751194e8 | 57 | void SetTriggerBit(const char *tb) { fTrigBit = tb; } |
bd092f0f | 58 | void SetPrimTrackCuts(AliESDtrackCuts *c) { fPrTrCuts = c; } |
c45212c6 | 59 | void SetComplTrackCuts(AliESDtrackCuts *c) { fCompTrCuts = c; } |
bd092f0f | 60 | void SetTrainMode(Bool_t t) { fIsTrain = t; } |
c7bb0b43 | 61 | void SetMcMode(Bool_t mc) { fIsMc = mc; } |
ecd47673 | 62 | void SetDebugOn(Bool_t d) { fDebug = d; } |
f3843637 | 63 | void SetPathStringSelect(char *p) { fPathStrOpt = p; } |
f507c09b | 64 | void SetEtCut(Double_t ec) { fECut = ec; } |
26a8db0f | 65 | void SetImportGeometryFromFile(Bool_t im, |
66 | TString pa = "") { fImportGeometryFromFile = im ; | |
67 | fImportGeometryFilePath = pa ; } | |
48aab590 | 68 | void SetTrackFilterBit(ULong_t bit) { fFilterBit = bit; } |
1c764315 | 69 | void SetHybridOn() { fSelHybrid = kTRUE; } |
70 | void SetFillQA() { fFillQA = kTRUE; } | |
12387380 | 71 | void SelectCPVFromTrack(Bool_t b) { fCpvFromTrack = b; } |
72 | void SetEtPtHistoBinning(Int_t n, | |
73 | Double_t lowx, | |
74 | Double_t highx) { fNBinsPt = n; fPtBinLowEdge = lowx; fPtBinHighEdge = highx; } | |
5bdfdbea | 75 | void SetRemoveMatchClus(Bool_t b) { fRemMatchClus = b; } |
76 | void SetMinIsoClusE(Double_t emin) { fMinIsoClusE = emin; } | |
26d2a019 | 77 | void SetTrCoreRemoval(Bool_t b) { fTrCoreRem = b; } |
d9cc477d | 78 | void SetClusTDiff(Double_t diff) { fClusTDiff = diff; } |
af4bc7bc | 79 | void SetPileUpRejSPD() { fPileUpRejSPD = kTRUE; } |
80 | void SetDistanceToBadCh(Double_t d) { fDistToBadChan = d; } | |
bd092f0f | 81 | protected: |
2e20efe5 | 82 | TObjArray *fESDClusters; //!pointer to EMCal clusters |
83 | TObjArray *fAODClusters; //!pointer to EMCal clusters | |
bd092f0f | 84 | TObjArray *fSelPrimTracks; //!pointer to ESD primary tracks |
3f4073ba | 85 | TClonesArray *fTracks; //!track input array |
68faccf4 | 86 | TClonesArray *fAODMCParticles; //!MC particles array for AOD analysis |
2e20efe5 | 87 | AliESDCaloCells *fESDCells; //!pointer to EMCal cells, esd |
88 | AliAODCaloCells *fAODCells; //!pointer to EMCal cells, aod | |
ae41967e | 89 | AliESDtrackCuts *fPrTrCuts; //pointer to hold the prim track cuts |
c45212c6 | 90 | AliESDtrackCuts *fCompTrCuts; //pointer to hold complementary track cuts (a la Gustavo) |
bd092f0f | 91 | AliEMCALGeometry *fGeom; // geometry utils |
92 | TString fGeoName; // geometry name (def = EMCAL_FIRSTYEARV1) | |
4d4ce2d2 | 93 | AliOADBContainer *fOADBContainer; //!OADB container used to load misalignment matrices |
503a68b2 | 94 | TVector3 fVecPv; // vector to hold the event's primary vertex |
bd092f0f | 95 | TString fPeriod; // string to the LHC period |
751194e8 | 96 | TString fTrigBit; // string to the trigger bit name |
bd092f0f | 97 | Bool_t fIsTrain; // variable to set train mode |
c7bb0b43 | 98 | Bool_t fIsMc; // variable to set mc mode |
ecd47673 | 99 | Bool_t fDebug; // variable to set on/off debugging printouts |
f3843637 | 100 | TString fPathStrOpt; // variable to set the name of files to be analyzed (MC only) |
bd092f0f | 101 | Double_t fExoticCut; // variable to set the cut on exotic clusters |
102 | Double_t fIsoConeR; // variable to set the isolation cone radius | |
965c985f | 103 | Int_t fNDimensions; // variable to set the number of dimensions of n-sparse |
104 | Double_t fECut; // variable to set the minimum E of a cluster | |
16a4050e | 105 | Int_t fTrackMult; // global variable with the event multiplicity |
f507c09b | 106 | TString fMcIdFamily; // string that holds the ids of all particles originated from the prompt photon |
107 | Int_t fNClusForDirPho; // number of clusters from prompt photon per event | |
108 | Float_t fDirPhoPt; // prompt photon pt (assumes only one per event) | |
f9e2362a | 109 | Float_t fHigherPtCone; // higher pt inside the cone around the candidate |
26a8db0f | 110 | Bool_t fImportGeometryFromFile; // Import geometry settings in geometry.root file |
111 | TString fImportGeometryFilePath; // path fo geometry.root file | |
112eb594 | 112 | Double_t fMaxPtTrack; //track with highest pt in event |
113 | Double_t fMaxEClus; //cluster with highest energy in event | |
114 | Int_t fNCells50; // variable to keep the number of cells with E>50 MeV | |
48aab590 | 115 | ULong_t fFilterBit; // Track selection bit, for AODs |
98a8397b | 116 | Bool_t fSelHybrid; // bool to select hybrid tracks |
fe617021 | 117 | Bool_t fFillQA; // bool to fill the QA plots |
ed39f27f | 118 | TString fClusIdFromTracks; // string to hold the list of cluster ids given by tracks |
12387380 | 119 | Bool_t fCpvFromTrack; // set the track-matching method to track->GetEMCALcluster() |
120 | Int_t fNBinsPt; // set the number of bins in axis of histograms filled with pt (or Et) | |
121 | Double_t fPtBinLowEdge; // low edge of the first pt (Et) bin | |
122 | Double_t fPtBinHighEdge; // high edge of the first pt (Et) bin | |
5bdfdbea | 123 | Bool_t fRemMatchClus; // flag to remove completely a cluster matched from the isolation |
124 | Double_t fMinIsoClusE; // minimum energy for a cluster to be counted in the iso cone | |
877552c2 | 125 | Int_t fNCuts; // number of cuts (QA purposes) |
26d2a019 | 126 | Bool_t fTrCoreRem; // flag to set the removal of the core in track isolation (true removes it, default) |
d9cc477d | 127 | Double_t fClusTDiff; // variable to hold the time diff between the candidate cluster and the isolation clusters |
6300a3af | 128 | Bool_t fPileUpRejSPD; // flag to set pile-up rejection via SPD (multiple vertices) |
af4bc7bc | 129 | Double_t fDistToBadChan; // distance to bad channel |
7022f12d | 130 | TString fInConeInvMass; // string to hold the array of inv. mass values of the candidate with isolation clusters |
e38ddacc | 131 | TString fInConePairClEt; // string to hold the array of Et of paired clusters in the pi0 mass (isolation clusters pairs only) |
bd092f0f | 132 | |
133 | private: | |
134 | AliESDEvent *fESD; //! ESD object | |
2e20efe5 | 135 | AliAODEvent *fAOD; //! AOD object |
85b52a52 | 136 | AliVEvent *fVEvent; //! AliVEvent |
c7bb0b43 | 137 | AliMCEvent *fMCEvent; //! MC event object |
138 | AliStack *fStack; //!MC particles stack object | |
822c9944 | 139 | TGeoHMatrix *fGeomMatrix[12];//! Geometry misalignment matrices for EMCal |
bd092f0f | 140 | TList *fOutputList; //! Output list |
141 | //histograms for events with 1+ track pt>1 | |
092ceec8 | 142 | TH1F *fEvtSel; //!evt selection counter: 0=all trg, 1=pv cut |
143 | TH1F *fNClusEt10; //!number of clusters w/ Et>10 in the event | |
3aca451b | 144 | TH1F *fClusArrayNames; //!cluster array name for each analysed event (CaloClusters, EmcCaloClusters or Other) |
cc57d293 | 145 | TH1F *fRecoPV; //!histogram to record if an event has a prim. vert. |
092ceec8 | 146 | TH1F *fPVtxZ; //!primary vertex Z before cut |
147 | TH1F *fTrMultDist; //!track multiplicity distribution | |
1495ca60 | 148 | TH2F *fClusEtCPVSBGISO; //!iso-all vs. clusters Et after CPV and 0.1<M02<0.3 |
149 | TH2F *fClusEtCPVBGISO; //!iso-all vs. clusters Et after CPV and 0.5<M02<2.0 | |
e53ab710 | 150 | TH3F *fMCDirPhotonPtEtaPhi; //!direct produced photon pt, eta, phi |
151 | TH3F *fMCIsoDirPhotonPtEtaPhi; //!direct produced photon pt, eta, phi, isolated @ mc level | |
dce6be79 | 152 | TH2F *fMCDirPhotonPtEtIso; //!direct produced photon pt and isolation pt @ mc level |
092ceec8 | 153 | TH1F *fDecayPhotonPtMC; //!decay photon pt |
154 | TH2F *fCellAbsIdVsAmpl; //!cell abs id vs cell amplitude (energy) | |
155 | TH2F *fNClusHighClusE; //!total number of clusters vs. highest clus energy in the event | |
f9e2362a | 156 | TH2F *fHigherPtConeM02; //!M02 vs. the higher pt of a track inside the cone |
092ceec8 | 157 | TH2F *fClusEtMcPt; //!cluster et x mc-pt |
158 | TH2F *fClusMcDetaDphi; //!delta-eta x delta-phi(reco-mc) | |
159 | TH2F *fNClusPerPho; //!delta-eta x delta-phi(reco-mc) | |
f912f9a9 | 160 | TH2F *fMcPtInConeBG; //!sum of mc-pt of "primary" particles inside de cone, as a function of NET-ISO in BG template |
161 | TH2F *fMcPtInConeSBG; //!sum of mc-pt of "primary" particles inside de cone, as a function of NET-ISO in SBG range | |
559660d1 | 162 | TH2F *fMcPtInConeBGnoUE; //!sum of mc-pt of "primary" particles inside de cone, as a function of ISO in BG template no UE sub |
163 | TH2F *fMcPtInConeSBGnoUE; //!sum of mc-pt of "primary" particles inside de cone, as a function of ISO in SBG range no UE sub | |
164 | TH2F *fMcPtInConeTrBGnoUE; //!sum of mc-pt of "primary" particles inside de cone, as a function of trk only ISO in BG template no UE sub | |
165 | TH2F *fMcPtInConeTrSBGnoUE; //!sum of mc-pt of "primary" particles inside de cone, as a function of trk only ISO in SBG range no UE sub | |
1495ca60 | 166 | TH2F *fMcPtInConeMcPhoPt; //!sum of mc-pt of "primary" particles inside de cone, as a function of prompt photon mc-pt |
81f2660f | 167 | TH2F *fAllIsoEtMcGamma; //!all iso distribution vs. Et clus for clusters comming from a MC prompt photon |
168 | TH2F *fAllIsoNoUeEtMcGamma; //!all iso distribution (without UE subtraction) vs. Et clus for clusters comming from a MC prompt photon | |
092ceec8 | 169 | TH3F *fMCDirPhotonPtEtaPhiNoClus; //!pt x eta x phi for prompt photons that didn't produce clusters |
e38ddacc | 170 | TH3F *fEtCandIsoAndIsoWoPairEt; //!Candidate Et vs. isolation with and w/o the Et of the paired cluster in the pi0 mass, only for 0.1<M02<0.3 clusters |
4ec9dd81 | 171 | TH2F *fInConePairedClusEtVsCandEt;//!Et of the paired cluster (0.11<m<0.165 GeV) vs. candidate Et |
092ceec8 | 172 | THnSparse *fHnOutput; //!Output matrix with 7 dimensions |
965c985f | 173 | |
2b7205ad | 174 | //QA histos |
175 | TList *fQAList; //!output list holding QA histos | |
176 | TH1F *fNTracks; //!number of tracks from Array->GetEntries() | |
177 | TH1F *fEmcNCells; //!number of emcal cells in the event | |
178 | TH1F *fEmcNClus; //!# of emcal clusters | |
179 | TH1F *fEmcNClusCut; //!# of clusters in an event with at least 1 clus with E > fECut ("triggered event") | |
180 | TH1F *fNTracksECut; //!number of tracks from Array->GetEntries() in "triggered event" | |
181 | TH1F *fEmcNCellsCut; //!number of emcal cells in a in "triggered event" | |
ed39f27f | 182 | TH1F *fEmcClusETM1; //!emcal track matched cluster energy (TracDx,z method) |
183 | TH1F *fEmcClusETM2; //!emcal track matched cluster energy (track->GetEMCALcluster() method) | |
34393c41 | 184 | TH1F *fEmcClusNotExo; //!cluster energy (exotics removed) |
877552c2 | 185 | TH2F *fEmcClusEClusCuts; //!cluster E spectrum per cluster cut (none, exotic, exo+cpv1, exo+cpv1+time, exo+cpv1+time+m02) |
e4ba80ad | 186 | TH2F *fEmcClusEPhi; //!cluster E spectrum vs. phi |
187 | TH2F *fEmcClusEPhiCut; //!cluster E spectrum vs. phi in "triggered event" | |
188 | TH2F *fEmcClusEEta; //!cluster E spectrum vs. eta | |
189 | TH2F *fEmcClusEEtaCut; //!cluster E spectrum vs. eta in "triggered event" | |
190 | TH2F *fTrackPtPhi; //!selected tracks pt vs. phi | |
191 | TH2F *fTrackPtPhiCut; //!selected tracks pt vs. phi in "triggered event" | |
192 | TH2F *fTrackPtEta; //!selected tracks pt vs. eta | |
193 | TH2F *fTrackPtEtaCut; //!selected tracks pt vs. eta in "triggered event" | |
3ae97198 | 194 | TH2F *fMaxCellEPhi; //!max cell energy vs. cell phi |
74d5d8ab | 195 | TH2F *fDetaDphiFromTM; //!dphi vs deta of track->GetEMCALcluster() clusters |
ed4488b6 | 196 | TH2F *fEoverPvsE; //!E/p for tracks with 80<TPCsignal<100 vs cluster E (check material) |
2b7205ad | 197 | |
198 | ||
bd092f0f | 199 | AliAnalysisTaskEMCALIsoPhoton(const AliAnalysisTaskEMCALIsoPhoton&); // not implemented |
200 | AliAnalysisTaskEMCALIsoPhoton& operator=(const AliAnalysisTaskEMCALIsoPhoton&); // not implemented | |
201 | ||
202 | ClassDef(AliAnalysisTaskEMCALIsoPhoton, 1); // Class to analyse isolated photons | |
203 | }; | |
204 | #endif |