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