]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/SPECTRA/PiKaPr/TestAOD/AliSpectraBothEventCuts.h
6fd366355228c27967c0e102ba94d7259e2bb6b1
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / PiKaPr / TestAOD / AliSpectraBothEventCuts.h
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:
25   enum {  kProcessedEvents = 0,kPhysSelEvents,kAcceptedEvents, kVtxRange, kVtxCentral, kVtxNoEvent, kQVector, kNVtxCuts};
26 enum {kDoNotCheckforSDD=0,kwithSDD,kwithoutSDD};        
27
28   // Constructors
29  AliSpectraBothEventCuts() : TNamed(), fAOD(0),fAODEvent(AliSpectraBothTrackCuts::kAODobject),fTrackBits(0), fIsMC(0), fCentEstimator(""), fUseCentPatchAOD049(0),fUseSDDPatchforLHC11a(kDoNotCheckforSDD),fTriggerSettings(AliVEvent::kMB),fTrackCuts(0),
30 fIsSelected(0), fCentralityCutMin(0), fCentralityCutMax(0), fQVectorCutMin(0), fQVectorCutMax(0), fVertexCutMin(0), 
31 fVertexCutMax(0), fMultiplicityCutMin(0), fMultiplicityCutMax(0), fMaxChi2perNDFforVertex(0),fHistoCuts(0),
32 fHistoVtxBefSel(0),fHistoVtxAftSel(0),fHistoEtaBefSel(0),fHistoEtaAftSel(0),
33 fHistoNChAftSel(0),fHistoQVector(0),fHistoEP(0), fHistoVtxAftSelwithoutZveretxCut(0)
34 {}
35   AliSpectraBothEventCuts(const char *name);
36   virtual  ~AliSpectraBothEventCuts() {}
37   
38   void SetIsMC(Bool_t isMC = kFALSE)    {fIsMC = isMC; };
39   Bool_t GetIsMC()           const           { return fIsMC;};
40   void SetCentEstimator(TString cent = "V0M")    {fCentEstimator = cent; };
41   TString GetCentFromV0()           const           { return fCentEstimator;};
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
48    void   SetTriggerSettings(UInt_t triggerSettings = AliVEvent::kMB) {fTriggerSettings = triggerSettings;};
49    UInt_t   GetTriggerSettings() {return fTriggerSettings;};
50
51
52
53   // Methods
54   Bool_t IsSelected(AliVEvent * aod,AliSpectraBothTrackCuts     *trackcuts);
55   Bool_t CheckVtx();
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;}
69
70   UInt_t GetTrackType()  const    { return fTrackBits;}
71   TH1I * GetHistoCuts()         {  return fHistoCuts; }
72   TH1F * GetHistoVtxBefSel()         {  return fHistoVtxBefSel; }
73   TH1F * GetHistoVtxAftSel()         {  return fHistoVtxAftSel; }
74   TH1F * GetHistoVtxAftSelwithoutZveretxCut()         {  return fHistoVtxAftSelwithoutZveretxCut; }
75   TH1F * GetHistoEtaBefSel()         {  return fHistoEtaBefSel; }
76   TH1F * GetHistoEtaAftSel()         {  return fHistoEtaAftSel; }
77   TH1F * GetHistoNChAftSel()         {  return fHistoNChAftSel; }
78   /* TH1F * GetHistoQVectorPos()         {  return fHistoQVectorPos; } */
79   /* TH1F * GetHistoQVectorNeg()         {  return fHistoQVectorNeg; } */
80   TH1F * GetHistoQVector()         {  return fHistoQVector; }
81   TH1F * GetHistoEP()         {  return fHistoEP; }
82   Float_t  GetCentralityMin()  const {  return fCentralityCutMin; }
83   Float_t  GetCentralityMax()  const {  return fCentralityCutMax; }
84   //Float_t  GetQVectorPosCutMin()  const {  return fQVectorPosCutMin; }
85   //Float_t  GetQVectorPosCutMax()  const {  return fQVectorPosCutMax; }
86   //Float_t  GetQVectorNegCutMin()  const {  return fQVectorNegCutMin; }
87   //Float_t  GetQVectorNegCutMax()  const {  return fQVectorNegCutMax; }
88   Float_t  GetQVectorCutMin()  const {  return fQVectorCutMin; }
89   Float_t  GetQVectorCutMax()  const {  return fQVectorCutMax; }
90   Float_t  GetVertexCutMin()  const {  return fVertexCutMin; }
91   Float_t  GetVertexCutMax()  const {  return fVertexCutMax; }
92   Float_t  GetMultiplicityCutMin()  const {  return fMultiplicityCutMin; }
93   Float_t  GetMultiplicityCutMax()  const {  return fMultiplicityCutMax; }
94   Float_t GetMaxChi2perNDFforVertex() const {return fMaxChi2perNDFforVertex;}
95
96   void   PrintCuts();
97   Double_t ApplyCentralityPatchAOD049();
98
99   Float_t  NumberOfEvents()     { return fHistoCuts->GetBinContent(kAcceptedEvents+1); }
100   Float_t  NumberOfProcessedEvents()     { return fHistoCuts->GetBinContent(kProcessedEvents+1); }
101   Float_t  NumberOfPhysSelEvents()     { return fHistoCuts->GetBinContent(kPhysSelEvents+1); }
102
103   Long64_t Merge(TCollection* list);
104
105
106  private:
107   
108   AliVEvent     *fAOD;              //! AOD event
109   Int_t                  fAODEvent; // flag what type event is conected use values form AliSpeatraAODTrackCuts  
110   UInt_t           fTrackBits;       // Type of track to be used in the Qvector calculation
111   Bool_t          fIsMC;// true if processing MC
112   TString          fCentEstimator;// name of centrality estimator
113   Bool_t          fUseCentPatchAOD049;// Patch for centrality selection on AOD049
114   Int_t          fUseSDDPatchforLHC11a; // if true will check for ALLNOTRD  in fired trigger class 
115   UInt_t fTriggerSettings;     // triger configuration 
116   AliSpectraBothTrackCuts     *fTrackCuts;             //! track cuts
117   Bool_t          fIsSelected;        // True if cuts are selected
118   Float_t         fCentralityCutMin;     // minimum centrality percentile
119   Float_t         fCentralityCutMax;     // maximum centrality percentile
120   /* Float_t         fQVectorPosCutMin;     // minimum qvecPos */
121   /* Float_t         fQVectorPosCutMax;     // maximum qvecPos */
122   /* Float_t         fQVectorNegCutMin;     // minimum qvecNeg */
123   /* Float_t         fQVectorNegCutMax;     // maximum qvecNeg */
124   Float_t         fQVectorCutMin;     // minimum qvecPos
125   Float_t         fQVectorCutMax;     // maximum qvecPos
126   Float_t         fVertexCutMin;     // minimum vertex position
127   Float_t         fVertexCutMax;     // maximum vertex position
128   Float_t         fMultiplicityCutMin;     // minimum multiplicity position
129   Float_t         fMultiplicityCutMax;     // maximum multiplicity position
130   Float_t         fMaxChi2perNDFforVertex; // maximum value of Chi2perNDF of vertex 
131   TH1I            *fHistoCuts;        // Cuts statistics
132   TH1F            *fHistoVtxBefSel;        // Vtx distr before event selection  
133   TH1F            *fHistoVtxAftSel;        // Vtx distr after event selection
134   TH1F            *fHistoEtaBefSel;        // Eta distr before event selection
135   TH1F            *fHistoEtaAftSel;        // Eta distr after event selection
136   TH1F            *fHistoNChAftSel;        // NCh distr after event selection
137   //TH1F            *fHistoQVectorPos;        // QVectorPos
138   //TH1F            *fHistoQVectorNeg;        // QVectorNeg
139   TH1F            *fHistoQVector;        // QVector
140   TH1F            *fHistoEP;        // EP
141   TH1F            *fHistoVtxAftSelwithoutZveretxCut;        // Vtx distr after event selection but without z vertex cut
142           
143
144   AliSpectraBothEventCuts(const AliSpectraBothEventCuts&);
145   AliSpectraBothEventCuts& operator=(const AliSpectraBothEventCuts&);
146   
147   ClassDef(AliSpectraBothEventCuts, 6);
148   
149 };
150 #endif
151