]>
Commit | Line | Data |
---|---|---|
239a080a | 1 | #ifndef ALISPECTRABOTHEVENTCUTS_H |
2 | #define ALISPECTRABOTHEVENTCUTS_H | |
3 | ||
4 | /* See cxx source for full Copyright notice */ | |
5 | ||
6 | //------------------------------------------------------------------------- | |
7 | // AliSpectraBothEventCuts | |
8 | // | |
9 | // | |
10 | // | |
11 | // | |
12 | // Authors: Michele Floris, CERN, Philip Versteeg, UU, Redmer Bertens, UU | |
13 | //------------------------------------------------------------------------- | |
14 | ||
15 | class AliVEvent; | |
16 | class AliSpectraBothTrackCuts; | |
17 | //class AliSpectraBothHistoManager; | |
18 | ||
19 | #include "TH1I.h" | |
20 | #include "TNamed.h" | |
21 | #include "AliSpectraBothTrackCuts.h" | |
22 | class AliSpectraBothEventCuts : public TNamed | |
23 | { | |
24 | public: | |
bca0c28e | 25 | enum { kProcessedEvents = 0,kPhysSelEvents,kAcceptedEvents, kVtxRange, kVtxCentral, kVtxNoEvent, kQVector,kTPCasPV,kZeroCont,kNVtxCuts}; |
239a080a | 26 | enum {kDoNotCheckforSDD=0,kwithSDD,kwithoutSDD}; |
27 | ||
28 | // Constructors | |
b3ea73e1 | 29 | AliSpectraBothEventCuts() : TNamed(), fAOD(0),fAODEvent(AliSpectraBothTrackCuts::kAODobject),fTrackBits(0), fIsMC(0), fCentEstimator(""), fUseCentPatchAOD049(0),fUseSDDPatchforLHC11a(kDoNotCheckforSDD),fTriggerSettings(AliVEvent::kMB),fTrackCuts(0), |
547e52a0 | 30 | fIsSelected(0), fCentralityCutMin(0), fCentralityCutMax(0), fQVectorCutMin(0), fQVectorCutMax(0), fVertexCutMin(0), |
2d98dd91 | 31 | fVertexCutMax(0), fMultiplicityCutMin(0), fMultiplicityCutMax(0), fMaxChi2perNDFforVertex(0),fMinRun(0),fMaxRun(0), |
32 | fHistoCuts(0),fHistoVtxBefSel(0),fHistoVtxAftSel(0),fHistoEtaBefSel(0),fHistoEtaAftSel(0), | |
33 | fHistoNChAftSel(0),fHistoQVector(0),fHistoEP(0), fHistoVtxAftSelwithoutZvertexCut(0),fHistoVtxalltriggerEventswithMCz(0),fHistoVtxAftSelwithoutZvertexCutusingMCz(0),fHistoRunNumbers(0) | |
547e52a0 | 34 | {} |
239a080a | 35 | AliSpectraBothEventCuts(const char *name); |
8fda510f | 36 | virtual ~AliSpectraBothEventCuts();// {} |
239a080a | 37 | |
38 | void SetIsMC(Bool_t isMC = kFALSE) {fIsMC = isMC; }; | |
39 | Bool_t GetIsMC() const { return fIsMC;}; | |
b3ea73e1 | 40 | void SetCentEstimator(TString cent = "V0M") {fCentEstimator = cent; }; |
41 | TString GetCentFromV0() const { return fCentEstimator;}; | |
239a080a | 42 | |
43 | void SetUseCentPatchAOD049(Bool_t useCentPatchAOD049 = kFALSE) {fUseCentPatchAOD049 = useCentPatchAOD049; }; | |
44 | Bool_t GetUseCentPatchAOD049() const { return fUseCentPatchAOD049;}; | |
45 | void SetUseSDDPatchforLHC11a(Int_t useSDDPatchforLHC11a) {fUseSDDPatchforLHC11a=useSDDPatchforLHC11a;} ; | |
46 | Int_t GetUseSDDPatchforLHC11a() {return fUseSDDPatchforLHC11a;}; | |
47 | ||
1c23d41e | 48 | void SetTriggerSettings(UInt_t triggerSettings = AliVEvent::kMB) {fTriggerSettings = triggerSettings;}; |
49 | UInt_t GetTriggerSettings() {return fTriggerSettings;}; | |
50 | ||
51 | ||
52 | ||
239a080a | 53 | // Methods |
8bb435b0 | 54 | Bool_t IsSelected(AliVEvent * aod,AliSpectraBothTrackCuts *trackcuts, Bool_t isMC=kFALSE, Double_t mcZ=-100.0); |
547e52a0 | 55 | Bool_t CheckVtx(); |
239a080a | 56 | Bool_t CheckCentralityCut(); |
57 | Bool_t CheckMultiplicityCut(); | |
58 | Bool_t CheckQVectorCut(); | |
59 | Bool_t CheckVtxChi2perNDF(); | |
60 | void SetCentralityCutMin(Float_t cut) { fCentralityCutMin = cut; } | |
61 | void SetCentralityCutMax(Float_t cut) { fCentralityCutMax = cut; } | |
62 | //void SetQVectorPosCut(Float_t min,Float_t max) { fQVectorPosCutMin = min; fQVectorPosCutMax = max; } | |
63 | //void SetQVectorNegCut(Float_t min,Float_t max) { fQVectorNegCutMin = min; fQVectorNegCutMax = max; } | |
64 | void SetQVectorCut(Float_t min,Float_t max) { fQVectorCutMin = min; fQVectorCutMax = max; } | |
65 | void SetVertexCut(Float_t min,Float_t max) { fVertexCutMin = min; fVertexCutMax = max; } | |
66 | void SetMultiplicityCut(Float_t min,Float_t max) { fMultiplicityCutMin = min; fMultiplicityCutMax = max; } | |
67 | void SetTrackBits(UInt_t TrackBits) {fTrackBits=TrackBits;} | |
68 | void SetMaxChi2perNDFforVertex(Float_t cut) { fMaxChi2perNDFforVertex=cut;} | |
2d98dd91 | 69 | void SetRunNumberRange(Int_t min,Int_t max); |
239a080a | 70 | |
71 | UInt_t GetTrackType() const { return fTrackBits;} | |
72 | TH1I * GetHistoCuts() { return fHistoCuts; } | |
73 | TH1F * GetHistoVtxBefSel() { return fHistoVtxBefSel; } | |
74 | TH1F * GetHistoVtxAftSel() { return fHistoVtxAftSel; } | |
8bb435b0 | 75 | TH1F * GetHistoVtxAftSelwithoutZvertexCut() { return fHistoVtxAftSelwithoutZvertexCut; } |
76 | TH1F * GetHistoVtxGenerated() { return fHistoVtxalltriggerEventswithMCz; } | |
77 | TH1F * GetHistoVtxAftSelwithoutZvertexCutusingMCz() { return fHistoVtxAftSelwithoutZvertexCutusingMCz; } | |
78 | ||
239a080a | 79 | TH1F * GetHistoEtaBefSel() { return fHistoEtaBefSel; } |
80 | TH1F * GetHistoEtaAftSel() { return fHistoEtaAftSel; } | |
81 | TH1F * GetHistoNChAftSel() { return fHistoNChAftSel; } | |
82 | /* TH1F * GetHistoQVectorPos() { return fHistoQVectorPos; } */ | |
83 | /* TH1F * GetHistoQVectorNeg() { return fHistoQVectorNeg; } */ | |
84 | TH1F * GetHistoQVector() { return fHistoQVector; } | |
85 | TH1F * GetHistoEP() { return fHistoEP; } | |
2d98dd91 | 86 | TH1F * GetHistoRunNumbers() { return fHistoRunNumbers; } |
239a080a | 87 | Float_t GetCentralityMin() const { return fCentralityCutMin; } |
88 | Float_t GetCentralityMax() const { return fCentralityCutMax; } | |
89 | //Float_t GetQVectorPosCutMin() const { return fQVectorPosCutMin; } | |
90 | //Float_t GetQVectorPosCutMax() const { return fQVectorPosCutMax; } | |
91 | //Float_t GetQVectorNegCutMin() const { return fQVectorNegCutMin; } | |
92 | //Float_t GetQVectorNegCutMax() const { return fQVectorNegCutMax; } | |
93 | Float_t GetQVectorCutMin() const { return fQVectorCutMin; } | |
94 | Float_t GetQVectorCutMax() const { return fQVectorCutMax; } | |
95 | Float_t GetVertexCutMin() const { return fVertexCutMin; } | |
96 | Float_t GetVertexCutMax() const { return fVertexCutMax; } | |
97 | Float_t GetMultiplicityCutMin() const { return fMultiplicityCutMin; } | |
98 | Float_t GetMultiplicityCutMax() const { return fMultiplicityCutMax; } | |
99 | Float_t GetMaxChi2perNDFforVertex() const {return fMaxChi2perNDFforVertex;} | |
2d98dd91 | 100 | |
101 | ||
239a080a | 102 | |
2d98dd91 | 103 | void InitHisto(); |
239a080a | 104 | void PrintCuts(); |
105 | Double_t ApplyCentralityPatchAOD049(); | |
106 | ||
107 | Float_t NumberOfEvents() { return fHistoCuts->GetBinContent(kAcceptedEvents+1); } | |
108 | Float_t NumberOfProcessedEvents() { return fHistoCuts->GetBinContent(kProcessedEvents+1); } | |
109 | Float_t NumberOfPhysSelEvents() { return fHistoCuts->GetBinContent(kPhysSelEvents+1); } | |
110 | ||
111 | Long64_t Merge(TCollection* list); | |
112 | ||
113 | ||
114 | private: | |
115 | ||
116 | AliVEvent *fAOD; //! AOD event | |
117 | Int_t fAODEvent; // flag what type event is conected use values form AliSpeatraAODTrackCuts | |
118 | UInt_t fTrackBits; // Type of track to be used in the Qvector calculation | |
119 | Bool_t fIsMC;// true if processing MC | |
b3ea73e1 | 120 | TString fCentEstimator;// name of centrality estimator |
239a080a | 121 | Bool_t fUseCentPatchAOD049;// Patch for centrality selection on AOD049 |
122 | Int_t fUseSDDPatchforLHC11a; // if true will check for ALLNOTRD in fired trigger class | |
1c23d41e | 123 | UInt_t fTriggerSettings; // triger configuration |
239a080a | 124 | AliSpectraBothTrackCuts *fTrackCuts; //! track cuts |
125 | Bool_t fIsSelected; // True if cuts are selected | |
126 | Float_t fCentralityCutMin; // minimum centrality percentile | |
127 | Float_t fCentralityCutMax; // maximum centrality percentile | |
128 | /* Float_t fQVectorPosCutMin; // minimum qvecPos */ | |
129 | /* Float_t fQVectorPosCutMax; // maximum qvecPos */ | |
130 | /* Float_t fQVectorNegCutMin; // minimum qvecNeg */ | |
131 | /* Float_t fQVectorNegCutMax; // maximum qvecNeg */ | |
132 | Float_t fQVectorCutMin; // minimum qvecPos | |
133 | Float_t fQVectorCutMax; // maximum qvecPos | |
134 | Float_t fVertexCutMin; // minimum vertex position | |
135 | Float_t fVertexCutMax; // maximum vertex position | |
136 | Float_t fMultiplicityCutMin; // minimum multiplicity position | |
137 | Float_t fMultiplicityCutMax; // maximum multiplicity position | |
2d98dd91 | 138 | Float_t fMaxChi2perNDFforVertex; // maximum value of Chi2perNDF of vertex |
139 | Int_t fMinRun; //minmum run number | |
140 | Int_t fMaxRun; //maximum run number | |
239a080a | 141 | TH1I *fHistoCuts; // Cuts statistics |
547e52a0 | 142 | TH1F *fHistoVtxBefSel; // Vtx distr before event selection |
239a080a | 143 | TH1F *fHistoVtxAftSel; // Vtx distr after event selection |
144 | TH1F *fHistoEtaBefSel; // Eta distr before event selection | |
145 | TH1F *fHistoEtaAftSel; // Eta distr after event selection | |
146 | TH1F *fHistoNChAftSel; // NCh distr after event selection | |
147 | //TH1F *fHistoQVectorPos; // QVectorPos | |
148 | //TH1F *fHistoQVectorNeg; // QVectorNeg | |
149 | TH1F *fHistoQVector; // QVector | |
150 | TH1F *fHistoEP; // EP | |
8bb435b0 | 151 | TH1F *fHistoVtxAftSelwithoutZvertexCut; // Vtx distr after event selection but without z vertex cut |
152 | TH1F *fHistoVtxalltriggerEventswithMCz; // MC z vertex ditribution of generated events | |
153 | TH1F *fHistoVtxAftSelwithoutZvertexCutusingMCz; // Vtx distr after event selection but without z vertex cut | |
2d98dd91 | 154 | TH1F *fHistoRunNumbers; // histogram of numbers of events per run |
155 | ||
156 | ||
8bb435b0 | 157 | |
547e52a0 | 158 | |
239a080a | 159 | AliSpectraBothEventCuts(const AliSpectraBothEventCuts&); |
160 | AliSpectraBothEventCuts& operator=(const AliSpectraBothEventCuts&); | |
161 | ||
2d98dd91 | 162 | ClassDef(AliSpectraBothEventCuts, 8); |
239a080a | 163 | |
164 | }; | |
165 | #endif | |
166 |