]>
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]; | |
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(); | |
76 | ||
77 | Bool_t InitializeCutsFromCutString(const TString analysisCutSelection); | |
78 | TString GetCutNumber(); | |
79 | ||
80 | //Constructors | |
81 | AliCaloPhotonCuts(const char *name="ClusterCuts", const char * title="Cluster Cuts"); | |
82 | AliCaloPhotonCuts(const AliCaloPhotonCuts&); | |
83 | AliCaloPhotonCuts& operator=(const AliCaloPhotonCuts&); | |
84 | ||
85 | //virtual destructor | |
86 | virtual ~AliCaloPhotonCuts(); | |
87 | ||
88 | virtual Bool_t IsSelected(TObject* /*obj*/){return kTRUE;} | |
89 | virtual Bool_t IsSelected(TList* /*list*/) {return kTRUE;} | |
90 | ||
91 | Bool_t ClusterIsSelected(AliVCluster* cluster, AliVEvent *event, Bool_t isMC); | |
92 | Bool_t PhotonIsSelectedMC(TParticle *particle,AliStack *fMCStack,Bool_t checkForConvertedGamma=kTRUE); | |
93 | Bool_t PhotonIsSelectedAODMC(AliAODMCParticle *particle,TClonesArray *aodmcArray,Bool_t checkForConvertedGamma=kTRUE); | |
94 | ||
95 | void InitCutHistograms(TString name=""); | |
96 | void SetFillCutHistograms(TString name=""){if(!fHistograms){InitCutHistograms(name);};} | |
97 | TList *GetCutHistograms(){return fHistograms;} | |
98 | void FillClusterCutIndex(Int_t photoncut){if(fHistCutIndex)fHistCutIndex->Fill(photoncut);} | |
99 | ||
100 | ///Cut functions | |
101 | Bool_t AcceptanceCuts(AliVCluster* cluster, AliVEvent *event); | |
102 | Bool_t ClusterQualityCuts(AliVCluster* cluster,AliVEvent *event, Bool_t isMC); | |
103 | ||
104 | // Set Individual Cuts | |
105 | Bool_t SetClusterTypeCut(Int_t); | |
106 | Bool_t SetMinEtaCut(Int_t); | |
107 | Bool_t SetMaxEtaCut(Int_t); | |
108 | Bool_t SetMinPhiCut(Int_t); | |
109 | Bool_t SetMaxPhiCut(Int_t); | |
110 | Bool_t SetDistanceToBadChannelCut(Int_t); | |
111 | Bool_t SetTimingCut(Int_t); | |
112 | Bool_t SetTrackMatchingCut(Int_t); | |
113 | Bool_t SetExoticCellCut(Int_t); | |
114 | Bool_t SetMinEnergyCut(Int_t); | |
115 | Bool_t SetMinNCellsCut(Int_t); | |
116 | Bool_t SetMaxM02(Int_t); | |
117 | Bool_t SetMinM02(Int_t); | |
118 | Bool_t SetMaxM20(Int_t); | |
119 | Bool_t SetMinM20(Int_t); | |
120 | Bool_t SetDispersion(Int_t); | |
121 | Bool_t SetNLM(Int_t); | |
122 | ||
123 | protected: | |
124 | TList *fHistograms; | |
125 | ||
126 | //cuts | |
127 | Int_t fClusterType; // which cluster do we have | |
128 | Double_t fMinEtaCut; // min eta cut | |
129 | Double_t fMaxEtaCut; // max eta cut | |
130 | Double_t fMinPhiCut; // phi cut | |
131 | Double_t fMaxPhiCut; // phi cut | |
132 | Double_t fMinDistanceToBadChannel; // minimum distance to bad channel | |
133 | Double_t fMaxTimeDiff; // maximum time difference to triggered collision | |
134 | Double_t fMinDistTrackToCluster; // minimum distance between track and cluster | |
135 | Double_t fExoticCell; // exotic cell cut | |
136 | Double_t fMinEnergy; // minium energy per cluster | |
137 | Int_t fMinNCells; // minimum number of cells | |
138 | Double_t fMaxM02; // maximum M02 | |
139 | Double_t fMinM02; // minimum M02 | |
140 | Double_t fMaxM20; // maximum M20 | |
141 | Double_t fMinM20; // minimum M20 | |
142 | Double_t fMaxDispersion; // maximum dispersion | |
143 | Int_t fMinNLM; // minimum number of local maxima in cluster | |
144 | Int_t fMaxNLM; // maximum number of local maxima in cluster | |
145 | ||
146 | // CutString | |
147 | TObjString *fCutString; // cut number used for analysis | |
148 | ||
149 | // Histograms | |
150 | TH1F *fHistCutIndex; // bookkeeping for cuts | |
151 | TH1F *fHistAcceptanceCuts; // bookkeeping for acceptance cuts | |
152 | TH1F *fHistClusterIdentificationCuts; // bookkeeping for cluster identification cuts | |
153 | ||
154 | TH2F* fHistClusterEtavsPhiBeforeAcc; // eta-phi-distribution before acceptance cuts | |
155 | TH2F* fHistClusterEtavsPhiAfterAcc; // eta-phi-distribution of all after acceptance cuts | |
156 | TH2F* fHistClusterEtavsPhiAfterQA; // eta-phi-distribution of all after cluster quality cuts | |
157 | TH1F* fHistDistanceToBadChannelBeforeAcc; // distance to bad channel before acceptance cuts | |
158 | TH1F* fHistDistanceToBadChannelAfterAcc; // distance to bad channel after acceptance cuts | |
159 | TH2F* fHistClusterTimevsEBeforeQA; // Cluster time vs E before cluster quality cuts | |
160 | TH2F* fHistClusterTimevsEAfterQA; // Cluster time vs E after cluster quality cuts | |
161 | TH2F* fHistExoticCellBeforeQA; // Exotic cell: 1-Ecross/E cell vs Ecluster before acceptance cuts | |
162 | TH2F* fHistExoticCellAfterQA; // Exotic cell: 1-Ecross/E cell vs Ecluster after cluster quality cuts | |
163 | TH1F* fHistDistanceTrackToClusterBeforeQA; // distance cluster to track before acceptance cuts | |
164 | TH1F* fHistDistanceTrackToClusterAfterQA; // distance cluster to track after cluster quality cuts | |
165 | TH1F* fHistEnergyOfClusterBeforeQA; // enery per cluster before acceptance cuts | |
166 | TH1F* fHistEnergyOfClusterAfterQA; // enery per cluster after cluster quality cuts | |
167 | TH1F* fHistNCellsBeforeQA; // number of cells per cluster before acceptance cuts | |
168 | TH1F* fHistNCellsAfterQA; // number of cells per cluster after cluster quality cuts | |
169 | TH1F* fHistM02BeforeQA; // M02 before acceptance cuts | |
170 | TH1F* fHistM02AfterQA; // M02 after cluster quality cuts | |
171 | TH1F* fHistM20BeforeQA; // M20 before acceptance cuts | |
172 | TH1F* fHistM20AfterQA; // M20 after cluster quality cuts | |
173 | TH1F* fHistDispersionBeforeQA; // dispersion before acceptance cuts | |
174 | TH1F* fHistDispersionAfterQA; // dispersion after cluster quality cuts | |
175 | TH1F* fHistNLMBeforeQA; // number of local maxima in cluster before acceptance cuts | |
176 | TH1F* fHistNLMAfterQA; // number of local maxima in cluster after cluster quality cuts | |
177 | ||
178 | private: | |
179 | ||
180 | ClassDef(AliCaloPhotonCuts,1) | |
181 | }; | |
182 | ||
183 | #endif |