]>
Commit | Line | Data |
---|---|---|
2bb2434e | 1 | #ifndef ALICONVERSIONMESONCUTS_H |
2 | #define ALICONVERSIONMESONCUTS_H | |
3 | ||
4 | // Class handling all kinds of selection cuts for Gamma Conversion analysis | |
5 | // Authors: Svein Lindal, Daniel Lohner * | |
6 | ||
7 | #include "AliAODpidUtil.h" | |
8 | #include "AliConversionPhotonBase.h" | |
9 | #include "AliAODConversionMother.h" | |
10 | #include "AliAODTrack.h" | |
11 | #include "AliESDtrack.h" | |
12 | #include "AliVTrack.h" | |
13 | #include "AliAODTrack.h" | |
14 | #include "AliStack.h" | |
15 | #include "AliAnalysisCuts.h" | |
16 | #include "TH1F.h" | |
ae947965 | 17 | #include "AliAODMCParticle.h" |
2bb2434e | 18 | |
19 | class AliESDEvent; | |
20 | class AliAODEvent; | |
21 | class AliConversionPhotonBase; | |
22 | class AliKFVertex; | |
23 | class TH1F; | |
24 | class TH2F; | |
25 | class AliPIDResponse; | |
26 | class AliAnalysisCuts; | |
27 | class iostream; | |
28 | class TList; | |
29 | class AliAnalysisManager; | |
30 | ||
31 | ||
32 | using namespace std; | |
33 | ||
34 | class AliConversionMesonCuts : public AliAnalysisCuts { | |
35 | ||
42fe34e2 | 36 | public: |
37 | ||
38 | ||
39 | enum cutIds { | |
40 | kMesonKind, | |
41 | kBackgroundScheme, | |
42 | kNumberOfBGEvents, | |
43 | kDegreesForRotationMethod, | |
44 | kRapidityMesonCut, | |
45 | kRCut, | |
46 | kalphaMesonCut, | |
47 | kSelectionCut, | |
48 | kElecShare, | |
49 | kToCloseV0s, | |
50 | kuseMCPSmearing, | |
51 | kDcaGammaGamma, | |
52 | kDcaRPrimVtx, | |
53 | kDcaZPrimVtx, | |
54 | kNCuts | |
55 | }; | |
56 | ||
57 | Bool_t SetCutIds(TString cutString); | |
58 | Int_t fCuts[kNCuts]; | |
59 | Bool_t SetCut(cutIds cutID, Int_t cut); | |
60 | Bool_t UpdateCutString(); | |
61 | ||
62 | static const char * fgkCutNames[kNCuts]; | |
63 | ||
64 | Bool_t InitializeCutsFromCutString(const TString analysisCutSelection); | |
65 | void FillElectonLabelArray(AliAODConversionPhoton* photon, Int_t nV0); | |
66 | ||
67 | AliConversionMesonCuts(const char *name="MesonCuts", const char * title="Meson Cuts"); | |
68 | AliConversionMesonCuts(const AliConversionMesonCuts&); | |
69 | AliConversionMesonCuts& operator=(const AliConversionMesonCuts&); | |
70 | ||
71 | virtual ~AliConversionMesonCuts(); //virtual destructor | |
72 | ||
73 | virtual Bool_t IsSelected(TObject* /*obj*/){return kTRUE;} | |
74 | virtual Bool_t IsSelected(TList* /*list*/) {return kTRUE;} | |
75 | ||
76 | TString GetCutNumber(); | |
77 | ||
78 | // Cut Selection | |
79 | Bool_t MesonIsSelected(AliAODConversionMother *pi0,Bool_t IsSignal=kTRUE, Double_t fRapidityShift=0.); | |
80 | Bool_t MesonIsSelectedMC(TParticle *fMCMother,AliStack *fMCStack, Double_t fRapidityShift=0.); | |
81 | Bool_t MesonIsSelectedAODMC(AliAODMCParticle *MCMother,TClonesArray *AODMCArray, Double_t fRapidityShift=0.); | |
82 | Bool_t MesonIsSelectedMCDalitz(TParticle *fMCMother,AliStack *fMCStack, Int_t &labelelectron, Int_t &labelpositron, Int_t &labelgamma,Double_t fRapidityShift=0.); | |
83 | Bool_t MesonIsSelectedMCEtaPiPlPiMiGamma(TParticle *fMCMother,AliStack *fMCStack, Int_t &labelNegPion, Int_t &labelPosPion, Int_t &labelGamma, Double_t fRapidityShift=0); | |
84 | Bool_t MesonIsSelectedMCPiPlPiMiPiZero(TParticle *fMCMother,AliStack *fMCStack, Int_t &labelNegPion, Int_t &labelPosPion, Int_t &labelNeutPion, Double_t fRapidityShift=0); | |
85 | Bool_t MesonIsSelectedMCChiC(TParticle *fMCMother,AliStack *fMCStack, Int_t &, Int_t &, Int_t &, Double_t fRapidityShift=0. ); | |
86 | void PrintCuts(); | |
87 | void PrintCutsWithValues(); | |
88 | ||
89 | void InitCutHistograms(TString name="",Bool_t additionalHists=kFALSE); | |
90 | void SetFillCutHistograms(TString name=""){if(!fHistograms){InitCutHistograms(name);};} | |
91 | TList *GetCutHistograms(){return fHistograms;} | |
92 | void SmearParticle(AliAODConversionPhoton * photon); | |
93 | void SmearVirtualPhoton(AliAODConversionPhoton* photon); | |
94 | TLorentzVector SmearElectron(TLorentzVector particle); | |
95 | ///Cut functions | |
96 | Bool_t RejectSharedElectronV0s(AliAODConversionPhoton* photon, Int_t nV0, Int_t nV0s); | |
97 | Bool_t RejectToCloseV0s(AliAODConversionPhoton* photon, TList *photons, Int_t nV0); | |
98 | // Set Individual Cuts | |
99 | Bool_t SetRCut(Int_t RCut); | |
100 | Bool_t SetMesonKind(Int_t mesonKind); | |
101 | Bool_t SetSelectionWindowCut(Int_t selectionCut); | |
102 | Bool_t SetAlphaMesonCut(Int_t alphaMesonCut); | |
103 | Bool_t SetRapidityMesonCut(Int_t RapidityMesonCut); | |
104 | Bool_t SetBackgroundScheme(Int_t BackgroundScheme); | |
105 | Bool_t SetNDegreesForRotationMethod(Int_t DegreesForRotationMethod); | |
106 | Bool_t SetNumberOfBGEvents(Int_t NumberOfBGEvents); | |
107 | Bool_t SetMCPSmearing(Int_t useMCPSmearing); | |
108 | Bool_t SetSharedElectronCut(Int_t sharedElec); | |
109 | Bool_t SetToCloseV0sCut(Int_t toClose); | |
110 | Bool_t SetDCAGammaGammaCut(Int_t DCAGammaGamma); | |
111 | Bool_t SetDCAZMesonPrimVtxCut(Int_t DCAZMesonPrimVtx); | |
112 | Bool_t SetDCARMesonPrimVtxCut(Int_t DCARMesonPrimVtx); | |
113 | ||
114 | // Request Flags | |
115 | Bool_t UseRotationMethod(){return fUseRotationMethodInBG;} | |
116 | Bool_t UseTrackMultiplicity(){return fUseTrackMultiplicityForBG;} | |
117 | Int_t GetNumberOfBGEvents(){return fNumberOfBGEvents;} | |
118 | Int_t NDegreesRotation(){return fnDegreeRotationPMForBG;} | |
119 | Bool_t DoBGCalculation(){return fDoBG;} | |
120 | Bool_t DoBGProbability(){return fdoBGProbability;} | |
121 | Bool_t UseElecSharingCut(){return fDoSharedElecCut;} | |
122 | Bool_t UseToCloseV0sCut(){return fDoToCloseV0sCut;} | |
123 | Bool_t UseMCPSmearing(){return fUseMCPSmearing;} | |
124 | Int_t BackgroundHandlerType(){return fBackgroundHandler;} | |
125 | Double_t GetSelectionLow() const {return fSelectionLow;} | |
126 | Double_t GetSelectionHigh() const {return fSelectionHigh;} | |
127 | ||
128 | protected: | |
129 | TList *fHistograms; | |
130 | //cuts | |
131 | Int_t fMesonKind; | |
132 | Double_t fMaxR; //r cut | |
133 | Double_t fSelectionLow; //lower meson inv mass window for further selection | |
134 | Double_t fSelectionHigh; //higher meson inv mass window for further selection | |
135 | Double_t fAlphaMinCutMeson; // min value for meson alpha cut | |
136 | Double_t fAlphaCutMeson; // max value for meson alpha cut | |
137 | Double_t fRapidityCutMeson; // max value for meson rapidity | |
138 | Bool_t fUseRotationMethodInBG; // flag to apply rotation method for meson bg estimation | |
139 | Bool_t fDoBG; // flag to intialize BG | |
140 | Bool_t fdoBGProbability; // flag to use probability method for meson bg estimation | |
141 | Bool_t fUseTrackMultiplicityForBG; // flag to use track multiplicity for meson bg estimation (else V0 mult) | |
142 | Int_t fnDegreeRotationPMForBG; // | |
143 | Int_t fNumberOfBGEvents; // | |
144 | Float_t fOpeningAngle; // min opening angle for meson | |
145 | Bool_t fDoToCloseV0sCut; // | |
146 | Double_t fminV0Dist; // | |
147 | Bool_t fDoSharedElecCut; // | |
148 | Bool_t fUseMCPSmearing; // flag | |
149 | Double_t fPBremSmearing; // | |
150 | Double_t fPSigSmearing; // | |
151 | Double_t fPSigSmearingCte; // | |
152 | TF1* fBrem; // | |
153 | TRandom3 fRandom; // | |
154 | TF1* fFAlphaCut; // | |
155 | Bool_t fAlphaPtDepCut; // | |
156 | Int_t fElectronLabelArraySize; // | |
157 | Int_t* fElectronLabelArray; //[fElectronLabelArraySize] Array with elec/pos v0 label | |
158 | Double_t fDCAGammaGammaCut; // cut value for the maximum distance between the two photons [cm] | |
159 | Double_t fDCAZMesonPrimVtxCut; // cut value for the maximum distance in Z between the production point of the Meson & the primary vertex [cm] | |
160 | Double_t fDCARMesonPrimVtxCut; // cut value for the maximum distance in R between the production point of the Meson & the primary vertex [cm] | |
cfd87ccd | 161 | Bool_t fDCAGammaGammaCutOn; // cut flag for the maximum distance between the two photons |
162 | Bool_t fDCAZMesonPrimVtxCutOn; // cut flag for the maximum distance in Z between the production point of the Meson & the primary vertex | |
163 | Bool_t fDCARMesonPrimVtxCutOn; // cut flag for the maximum distance in R between the production point of the Meson & the primary vertex | |
164 | ||
42fe34e2 | 165 | Int_t fBackgroundHandler; // |
166 | ||
167 | // Histograms | |
168 | TObjString* fCutString; // cut number used for analysis | |
169 | TH1F* hMesonCuts; // bookkeeping for meson cuts | |
170 | TH1F* hMesonBGCuts; // bookkeeping for meson bg cuts | |
171 | TH1F* hDCAGammaGammaMesonBefore; // | |
172 | TH1F* hDCAZMesonPrimVtxBefore; // | |
173 | TH1F* hDCARMesonPrimVtxBefore; // | |
174 | TH1F* hDCAGammaGammaMesonAfter; // | |
175 | TH2F* hDCAZMesonPrimVtxAfter; // | |
176 | TH1F* hDCARMesonPrimVtxAfter; // | |
177 | ||
178 | private: | |
179 | ||
180 | ||
cfd87ccd | 181 | ClassDef(AliConversionMesonCuts,7) |
2bb2434e | 182 | }; |
183 | ||
184 | ||
185 | #endif |