]>
Commit | Line | Data |
---|---|---|
8bdca7f1 | 1 | #ifndef ALICALOPHOTONCUTS_H |
2 | #define ALICALOPHOTONCUTS_H | |
3 | ||
4 | // Class handling all kinds of selection cuts for Gamma Conversion analysis | |
5 | // Authors: Svein Lindal, Daniel Lohner * | |
6 | ||
7 | #include "AliConversionPhotonBase.h" | |
8 | #include "AliAODConversionMother.h" | |
9 | #include "AliAODTrack.h" | |
10 | #include "AliESDtrack.h" | |
11 | #include "AliVTrack.h" | |
12 | #include "AliVCluster.h" | |
13 | #include "AliAODTrack.h" | |
14 | #include "AliStack.h" | |
15 | #include "AliAnalysisCuts.h" | |
16 | #include "TH1F.h" | |
17 | #include "TF1.h" | |
18 | #include "AliAnalysisUtils.h" | |
19 | #include "AliAnalysisManager.h" | |
20 | ||
21 | class AliESDEvent; | |
22 | class AliAODEvent; | |
23 | class AliConversionPhotonBase; | |
24 | class TH1F; | |
25 | class TH2F; | |
26 | class TF1; | |
27 | class AliPIDResponse; | |
28 | class AliAnalysisCuts; | |
29 | class iostream; | |
30 | class TList; | |
31 | class AliAnalysisManager; | |
32 | class AliAODMCParticle; | |
33 | ||
34 | using namespace std; | |
35 | ||
36 | class AliCaloPhotonCuts : public AliAnalysisCuts { | |
37 | ||
38 | public: | |
39 | enum cutIds { | |
40 | kClusterType, | |
41 | kEtaMin, | |
42 | kEtaMax, | |
43 | kPhiMin, | |
44 | kPhiMax, | |
45 | kDistanceToBadChannel, | |
46 | kTiming, | |
47 | kTrackMatching, | |
48 | kExoticCell, | |
49 | kMinEnery, | |
50 | kNMinCells, | |
51 | kMinM02, | |
52 | kMaxM02, | |
53 | kMinM20, | |
54 | kMaxM20, | |
55 | kDispersion, | |
56 | kNLM, | |
57 | kNCuts | |
58 | }; | |
59 | ||
60 | enum photonCuts { | |
61 | kPhotonIn=0, | |
62 | kDetector, | |
63 | kAcceptance, | |
64 | kClusterQuality, | |
65 | kPhotonOut | |
66 | }; | |
67 | ||
68 | //handeling of CutString | |
69 | static const char * fgkCutNames[kNCuts]; | |
7f070437 | 70 | Bool_t SetCutIds(TString cutString); |
71 | Int_t fCuts[kNCuts]; | |
72 | Bool_t SetCut(cutIds cutID, Int_t cut); | |
73 | Bool_t UpdateCutString(); | |
74 | void PrintCuts(); | |
75 | void PrintCutsWithValues(); | |
8bdca7f1 | 76 | |
7f070437 | 77 | Bool_t InitializeCutsFromCutString(const TString analysisCutSelection); |
78 | TString GetCutNumber(); | |
1baaaea0 | 79 | Int_t GetClusterType() {return fClusterType; } |
8bdca7f1 | 80 | |
81 | //Constructors | |
82 | AliCaloPhotonCuts(const char *name="ClusterCuts", const char * title="Cluster Cuts"); | |
83 | AliCaloPhotonCuts(const AliCaloPhotonCuts&); | |
84 | AliCaloPhotonCuts& operator=(const AliCaloPhotonCuts&); | |
85 | ||
86 | //virtual destructor | |
7f070437 | 87 | virtual ~AliCaloPhotonCuts(); |
8bdca7f1 | 88 | |
7f070437 | 89 | virtual Bool_t IsSelected(TObject* /*obj*/) {return kTRUE;} |
90 | virtual Bool_t IsSelected(TList* /*list*/) {return kTRUE;} | |
8bdca7f1 | 91 | |
7f070437 | 92 | Bool_t ClusterIsSelected(AliVCluster* cluster, AliVEvent *event, Bool_t isMC); |
93 | Bool_t ClusterIsSelectedMC(TParticle *particle,AliStack *fMCStack); | |
94 | Bool_t ClusterIsSelectedAODMC(AliAODMCParticle *particle,TClonesArray *aodmcArray); | |
8bdca7f1 | 95 | |
7f070437 | 96 | void InitCutHistograms(TString name=""); |
97 | void SetFillCutHistograms(TString name="") {if(!fHistograms){InitCutHistograms(name);}} | |
98 | TList* GetCutHistograms() {return fHistograms;} | |
99 | void FillClusterCutIndex(Int_t photoncut) {if(fHistCutIndex)fHistCutIndex->Fill(photoncut);} | |
4e8dcc76 | 100 | |
7f070437 | 101 | void SetExtendedMatching(Bool_t extendedMatching) {fExtendedMatching = extendedMatching;} |
8bdca7f1 | 102 | |
103 | ///Cut functions | |
7f070437 | 104 | Bool_t AcceptanceCuts(AliVCluster* cluster, AliVEvent *event); |
105 | Bool_t ClusterQualityCuts(AliVCluster* cluster,AliVEvent *event, Bool_t isMC); | |
8bdca7f1 | 106 | |
7f070437 | 107 | Bool_t MatchConvPhotonToCluster(AliAODConversionPhoton* convPhoton, AliVCluster* cluster, AliVEvent* event ); |
d53bf4ac | 108 | |
8bdca7f1 | 109 | // Set Individual Cuts |
7f070437 | 110 | Bool_t SetClusterTypeCut(Int_t); |
111 | Bool_t SetMinEtaCut(Int_t); | |
112 | Bool_t SetMaxEtaCut(Int_t); | |
113 | Bool_t SetMinPhiCut(Int_t); | |
114 | Bool_t SetMaxPhiCut(Int_t); | |
115 | Bool_t SetDistanceToBadChannelCut(Int_t); | |
116 | Bool_t SetTimingCut(Int_t); | |
117 | Bool_t SetTrackMatchingCut(Int_t); | |
118 | Bool_t SetExoticCellCut(Int_t); | |
119 | Bool_t SetMinEnergyCut(Int_t); | |
120 | Bool_t SetMinNCellsCut(Int_t); | |
121 | Bool_t SetMaxM02(Int_t); | |
122 | Bool_t SetMinM02(Int_t); | |
123 | Bool_t SetMaxM20(Int_t); | |
124 | Bool_t SetMinM20(Int_t); | |
125 | Bool_t SetDispersion(Int_t); | |
126 | Bool_t SetNLM(Int_t); | |
8bdca7f1 | 127 | |
128 | protected: | |
1baaaea0 | 129 | TList *fHistograms; |
8bdca7f1 | 130 | |
131 | //cuts | |
7f070437 | 132 | Int_t fClusterType; // which cluster do we have |
133 | Double_t fMinEtaCut; // min eta cut | |
134 | Double_t fMaxEtaCut; // max eta cut | |
135 | Bool_t fUseEtaCut; // flag for switching on eta cut | |
136 | Double_t fMinPhiCut; // phi cut | |
137 | Double_t fMaxPhiCut; // phi cut | |
138 | Bool_t fUsePhiCut; // flag for switching on phi cut | |
139 | Double_t fMinDistanceToBadChannel; // minimum distance to bad channel | |
140 | Bool_t fUseDistanceToBadChannel; // flag for switching on distance to bad channel cut | |
141 | Double_t fMaxTimeDiff; // maximum time difference to triggered collision | |
142 | Bool_t fUseTimeDiff; // flag for switching on time difference cut | |
9af60dfb | 143 | Double_t fMaxDistTrackToClusterEta; // minimum distance between track and cluster in eta |
144 | Double_t fMinDistTrackToClusterPhi; // minimum distance between track and cluster in phi | |
145 | Double_t fMaxDistTrackToClusterPhi; // maximum distance between track and cluster in phi | |
7f070437 | 146 | Bool_t fUseDistTrackToCluster; // flag for switching on distance between track and cluster cut |
147 | Bool_t fExtendedMatching; // flag for switching on extended matching histograms | |
148 | Double_t fExoticCell; // exotic cell cut | |
149 | Bool_t fUseExoticCell; // flag for switching on exotic cell cut | |
150 | Double_t fMinEnergy; // minium energy per cluster | |
151 | Bool_t fUseMinEnergy; // flag for switching on minimum energy cut | |
152 | Int_t fMinNCells; // minimum number of cells | |
153 | Bool_t fUseNCells; // flag for switching on minimum N Cells cut | |
154 | Double_t fMaxM02; // maximum M02 | |
155 | Double_t fMinM02; // minimum M02 | |
156 | Bool_t fUseM02; // flag for switching on M02 cut | |
157 | Double_t fMaxM20; // maximum M20 | |
158 | Double_t fMinM20; // minimum M20 | |
159 | Bool_t fUseM20; // flag for switching on M20 cut | |
160 | Double_t fMaxDispersion; // maximum dispersion | |
161 | Bool_t fUseDispersion; // flag for switching on dispersion cut | |
162 | Int_t fMinNLM; // minimum number of local maxima in cluster | |
163 | Int_t fMaxNLM; // maximum number of local maxima in cluster | |
164 | Bool_t fUseNLM; // flag for switching on NLM cut | |
8bdca7f1 | 165 | |
166 | // CutString | |
7f070437 | 167 | TObjString* fCutString; // cut number used for analysis |
8bdca7f1 | 168 | |
cfd87ccd | 169 | // Histograms |
7f070437 | 170 | TH1F* fHistCutIndex; // bookkeeping for cuts |
171 | TH1F* fHistAcceptanceCuts; // bookkeeping for acceptance cuts | |
172 | TH1F* fHistClusterIdentificationCuts; // bookkeeping for cluster identification cuts | |
8bdca7f1 | 173 | |
7f070437 | 174 | TH2F* fHistClusterEtavsPhiBeforeAcc; // eta-phi-distribution before acceptance cuts |
175 | TH2F* fHistClusterEtavsPhiAfterAcc; // eta-phi-distribution of all after acceptance cuts | |
176 | TH2F* fHistClusterEtavsPhiAfterQA; // eta-phi-distribution of all after cluster quality cuts | |
177 | // TH1F* fHistDistanceToBadChannelBeforeAcc; // distance to bad channel before acceptance cuts | |
178 | // TH1F* fHistDistanceToBadChannelAfterAcc; // distance to bad channel after acceptance cuts | |
179 | TH2F* fHistClusterTimevsEBeforeQA; // Cluster time vs E before cluster quality cuts | |
180 | TH2F* fHistClusterTimevsEAfterQA; // Cluster time vs E after cluster quality cuts | |
181 | // TH2F* fHistExoticCellBeforeQA; // Exotic cell: 1-Ecross/E cell vs Ecluster before acceptance cuts | |
182 | // TH2F* fHistExoticCellAfterQA; // Exotic cell: 1-Ecross/E cell vs Ecluster after cluster quality cuts | |
183 | // TH1F* fHistNMatchedTracks; // number of matched tracks | |
184 | TH1F* fHistEnergyOfClusterBeforeQA; // enery per cluster before acceptance cuts | |
185 | TH1F* fHistEnergyOfClusterAfterQA; // enery per cluster after cluster quality cuts | |
186 | TH1F* fHistNCellsBeforeQA; // number of cells per cluster before acceptance cuts | |
187 | TH1F* fHistNCellsAfterQA; // number of cells per cluster after cluster quality cuts | |
188 | TH1F* fHistM02BeforeQA; // M02 before acceptance cuts | |
189 | TH1F* fHistM02AfterQA; // M02 after cluster quality cuts | |
190 | TH1F* fHistM20BeforeQA; // M20 before acceptance cuts | |
191 | TH1F* fHistM20AfterQA; // M20 after cluster quality cuts | |
192 | TH1F* fHistDispersionBeforeQA; // dispersion before acceptance cuts | |
193 | TH1F* fHistDispersionAfterQA; // dispersion after cluster quality cuts | |
194 | // TH1F* fHistNLMBeforeQA; // number of local maxima in cluster before acceptance cuts | |
195 | // TH1F* fHistNLMAfterQA; // number of local maxima in cluster after cluster quality cuts | |
41ed7315 | 196 | |
197 | //Track matching histograms | |
7f070437 | 198 | TH1F* fHistClusterRBeforeQA; // cluster position in R=SQRT(x^2+y^2) (before QA) |
199 | TH1F* fHistClusterRAfterQA; // cluster position in R=SQRT(x^2+y^2) for matched tracks (After QA) | |
200 | TH2F* fHistClusterdEtadPhiBeforeQA; // 2-dim plot dEta vs. dPhi | |
201 | TH2F* fHistClusterdEtadPhiAfterQA; // 2-dim plot dEta vs. dPhi for matched tracks (after QA) | |
202 | TH1F* fHistDistanceTrackToClusterBeforeQA; // distance cluster to track before acceptance cuts | |
203 | TH1F* fHistDistanceTrackToClusterAfterQA; // distance cluster to track after cluster quality cuts | |
41ed7315 | 204 | |
4e8dcc76 | 205 | //Extended track matching histograms |
7f070437 | 206 | TH2F* fHistClusterdEtadPhiPosTracksBeforeQA; // 2-dim plot dEta vs. dPhi |
207 | TH2F* fHistClusterdEtadPhiNegTracksBeforeQA; // 2-dim plot dEta vs. dPhi | |
9af60dfb | 208 | TH2F* fHistClusterdEtadPhiPosTracksAfterQA; // 2-dim plot dEta vs. dPhi |
209 | TH2F* fHistClusterdEtadPhiNegTracksAfterQA; // 2-dim plot dEta vs. dPhi | |
210 | TH2F* fHistClusterdEtadPhiPosTracks_P1_BeforeQA; // 2-dim plot dEta vs. dPhi, positive Tracks, P < 1 | |
211 | TH2F* fHistClusterdEtadPhiPosTracks_P14_BeforeQA; // 2-dim plot dEta vs. dPhi, positive Tracks, 1 < P < 4 | |
212 | TH2F* fHistClusterdEtadPhiPosTracks_P4_BeforeQA; // 2-dim plot dEta vs. dPhi, positive Tracks, P > 4 | |
213 | TH2F* fHistClusterdEtadPhiNegTracks_P1_BeforeQA; // 2-dim plot dEta vs. dPhi, negative Tracks, P < 1 | |
214 | TH2F* fHistClusterdEtadPhiNegTracks_P14_BeforeQA; // 2-dim plot dEta vs. dPhi, negative Tracks, 1 < P < 4 | |
215 | TH2F* fHistClusterdEtadPhiNegTracks_P4_BeforeQA; // 2-dim plot dEta vs. dPhi, negative Tracks, P > 4 | |
7f070437 | 216 | TH2F* fHistClusterdEtadPtBeforeQA; // 2-dim plot dEta vs. Pt |
217 | TH2F* fHistClusterdPhidPtBeforeQA; // 2-dim plot dEta vs. Pt | |
218 | TH2F* fHistClusterM20Pt_dPhiBeforeQA; // 2-dim plot M20 vs. Pt for given dPhi>0.05 | |
219 | TH2F* fHistClusterM02Pt_dPhiBeforeQA; // 2-dim plot M02 vs. Pt for given dPhi>0.05 | |
220 | TH2F* fHistClusterM20M02BeforeQA; // 2-dim plot M20 vs. M02 | |
221 | TH2F* fHistClusterM20M02AfterQA; // 2-dim plot M20 vs. M20 | |
4e8dcc76 | 222 | |
8bdca7f1 | 223 | private: |
224 | ||
2c75809c | 225 | ClassDef(AliCaloPhotonCuts,2) |
8bdca7f1 | 226 | }; |
227 | ||
228 | #endif |