changed Resolution, Material, and PhotonQA task to be able to run on the grid
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / AliConversionMesonCuts.h
CommitLineData
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
19class AliESDEvent;
20class AliAODEvent;
21class AliConversionPhotonBase;
22class AliKFVertex;
23class TH1F;
24class TH2F;
25class AliPIDResponse;
26class AliAnalysisCuts;
27class iostream;
28class TList;
29class AliAnalysisManager;
30
31
32using namespace std;
33
34class AliConversionMesonCuts : public AliAnalysisCuts {
35
36 public:
37
38
39 enum cutIds {
40 kMesonKind,
2bb2434e 41 kBackgroundScheme,
ca91a3e1 42 kNumberOfBGEvents,
2bb2434e 43 kDegreesForRotationMethod,
ca91a3e1 44 kRapidityMesonCut,
45 kRCut,
46 kalphaMesonCut,
47 kchi2MesonCut,
2bb2434e 48 kElecShare,
49 kToCloseV0s,
e5b6e8a6 50 kuseMCPSmearing,
4803eb1f 51 kDcaGammaGamma,
52 kDcaRPrimVtx,
53 kDcaZPrimVtx,
2bb2434e 54 kNCuts
55 };
56
57 Bool_t SetCutIds(TString cutString);
58 Int_t fCuts[kNCuts];
59 Bool_t SetCut(cutIds cutID, Int_t cut);
e5b6e8a6 60 Bool_t UpdateCutString();
2bb2434e 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");
1d9e6011 68 AliConversionMesonCuts(const AliConversionMesonCuts&);
a280ac15 69 AliConversionMesonCuts& operator=(const AliConversionMesonCuts&);
1d9e6011 70
2bb2434e 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
11c1e680 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.);
ae947965 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.);
0f8c33c1 83 Bool_t MesonIsSelectedMCChiC(TParticle *fMCMother,AliStack *fMCStack, Int_t &, Int_t &, Int_t &, Double_t fRapidityShift=0. );
2bb2434e 84 void PrintCuts();
85
4803eb1f 86 void InitCutHistograms(TString name="",Bool_t additionalHists=kFALSE);
e5b6e8a6 87 void SetFillCutHistograms(TString name=""){if(!fHistograms){InitCutHistograms(name);};}
2bb2434e 88 TList *GetCutHistograms(){return fHistograms;}
ca91a3e1 89 void SmearParticle(AliAODConversionPhoton * photon);
2bb2434e 90 ///Cut functions
91 Bool_t RejectSharedElectronV0s(AliAODConversionPhoton* photon, Int_t nV0, Int_t nV0s);
92 Bool_t RejectToCloseV0s(AliAODConversionPhoton* photon, TList *photons, Int_t nV0);
93 // Set Individual Cuts
94 Bool_t SetRCut(Int_t RCut);
95 Bool_t SetMesonKind(Int_t mesonKind);
96 Bool_t SetChi2MesonCut(Int_t chi2MesonCut);
97 Bool_t SetAlphaMesonCut(Int_t alphaMesonCut);
98 Bool_t SetRapidityMesonCut(Int_t RapidityMesonCut);
99 Bool_t SetBackgroundScheme(Int_t BackgroundScheme);
100 Bool_t SetNDegreesForRotationMethod(Int_t DegreesForRotationMethod);
ca91a3e1 101 Bool_t SetNumberOfBGEvents(Int_t NumberOfBGEvents);
102 Bool_t SetMCPSmearing(Int_t useMCPSmearing);
2bb2434e 103 Bool_t SetSharedElectronCut(Int_t sharedElec);
104 Bool_t SetToCloseV0sCut(Int_t toClose);
4803eb1f 105 Bool_t SetDCAGammaGammaCut(Int_t DCAGammaGamma);
106 Bool_t SetDCAZMesonPrimVtxCut(Int_t DCAZMesonPrimVtx);
107 Bool_t SetDCARMesonPrimVtxCut(Int_t DCARMesonPrimVtx);
2bb2434e 108
109 // Request Flags
110 Bool_t UseRotationMethod(){return fUseRotationMethodInBG;}
ca91a3e1 111 Bool_t UseTrackMultiplicity(){return fUseTrackMultiplicityForBG;}
e5b6e8a6 112 Int_t GetNumberOfBGEvents(){return fNumberOfBGEvents;}
2bb2434e 113 Int_t NDegreesRotation(){return fnDegreeRotationPMForBG;}
e5b6e8a6 114 Bool_t DoBGCalculation(){return fDoBG;}
2bb2434e 115 Bool_t DoBGProbability(){return fdoBGProbability;}
116 Bool_t UseElecSharingCut(){return fDoSharedElecCut;}
117 Bool_t UseToCloseV0sCut(){return fDoToCloseV0sCut;}
ca91a3e1 118 Bool_t UseMCPSmearing(){return fUseMCPSmearing;}
e5b6e8a6 119 Int_t BackgroundHandlerType(){return fBackgroundHandler;}
ca91a3e1 120
2bb2434e 121 protected:
122 TList *fHistograms;
123 //cuts
124 Int_t fMesonKind;
125 Double_t fMaxR; //r cut
126 Double_t fChi2CutMeson; //chicut meson
127 Double_t fAlphaMinCutMeson; // min value for meson alpha cut
128 Double_t fAlphaCutMeson; // max value for meson alpha cut
129 Double_t fRapidityCutMeson; // max value for meson rapidity
130 Bool_t fUseRotationMethodInBG; // flag to apply rotation method for meson bg estimation
e5b6e8a6 131 Bool_t fDoBG; // flag to intialize BG
2bb2434e 132 Bool_t fdoBGProbability; // flag to use probability method for meson bg estimation
133 Bool_t fUseTrackMultiplicityForBG; // flag to use track multiplicity for meson bg estimation (else V0 mult)
134 Int_t fnDegreeRotationPMForBG; //
ca91a3e1 135 Int_t fNumberOfBGEvents; //
2bb2434e 136 Float_t fOpeningAngle; // min opening angle for meson
137 Bool_t fDoToCloseV0sCut; //
138 Double_t fminV0Dist; //
139 Bool_t fDoSharedElecCut; //
ca91a3e1 140 Bool_t fUseMCPSmearing; // flag
141 Double_t fPBremSmearing;//
142 Double_t fPSigSmearing; //
143 Double_t fPSigSmearingCte; //
144 TF1 *fBrem; //
2bb2434e 145 TRandom3 fRandom; //
a280ac15 146 Int_t fElectronLabelArraySize;
147 Int_t *fElectronLabelArray; //[fElectronLabelArraySize] Array with elec/pos v0 label
4803eb1f 148 Double_t fDCAGammaGammaCut; // cut value for the maximum distance between the two photons [cm]
149 Double_t fDCAZMesonPrimVtxCut; // cut value for the maximum distance in Z between the production point of the Meson & the primary vertex [cm]
150 Double_t fDCARMesonPrimVtxCut; // cut value for the maximum distance in R between the production point of the Meson & the primary vertex [cm]
e5b6e8a6 151 Int_t fBackgroundHandler; //
2bb2434e 152
153 // Histograms
154 TObjString *fCutString; // cut number used for analysis
155 TH1F *hMesonCuts; // bookkeeping for meson cuts
156 TH1F *hMesonBGCuts; // bookkeeping for meson bg cuts
4803eb1f 157 TH1F *hDCAGammaGammaMesonBefore;
158 TH1F *hDCAZMesonPrimVtxBefore;
159 TH1F *hDCARMesonPrimVtxBefore;
160 TH1F *hDCAGammaGammaMesonAfter;
161 TH2F *hDCAZMesonPrimVtxAfter;
162 TH1F *hDCARMesonPrimVtxAfter;
2bb2434e 163
a280ac15 164private:
165
166
ae947965 167 ClassDef(AliConversionMesonCuts,4)
2bb2434e 168};
169
170
171#endif