]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/STRANGENESS/LambdaK0PbPb/AliV0CutVariations.h
Commit for Simone - Change ClassDef
[u/mrichter/AliRoot.git] / PWGLF / STRANGENESS / LambdaK0PbPb / AliV0CutVariations.h
1 //////////////////////////////////////////////////////////
2 // This class has been automatically generated on
3 // Thu Jun 21 13:10:29 2012 by ROOT version 5.33/03
4 // from TTree fTree/V0Candidates
5 // found on file: DavidsV0MC_offline.root
6 //////////////////////////////////////////////////////////
7
8 #ifndef AliV0CutVariations_h
9 #define AliV0CutVariations_h
10
11 #include <TROOT.h>
12 #include <TChain.h>
13 #include <TFile.h>
14 #include <TSelector.h>
15
16 class TH1F;
17 class TH2F;
18 class TH3F;
19 class TH1D;
20
21
22 // Header file for the classes stored in the TTree if any.
23
24 // Fixed size dimensions of array or collections stored in the TTree if any.
25
26 class AliV0CutVariations : public TSelector {
27 public :
28    TTree          *fChain;   //!pointer to the analyzed TTree or TChain
29
30    // Declaration of leaf types
31    Int_t           fTreeVariablePrimaryStatus;
32    Int_t           fTreeVariablePrimaryStatusMother;
33    Float_t         fTreeVariableChi2V0;
34    Float_t         fTreeVariableDcaV0Daughters;
35    Float_t         fTreeVariableDcaPosToPrimVertex;
36    Float_t         fTreeVariableDcaNegToPrimVertex;
37    Float_t         fTreeVariableV0Radius;
38    Float_t         fTreeVariablePt;
39    Float_t         fTreeVariablePtMC;
40    Float_t         fTreeVariableRapK0Short;
41    Float_t         fTreeVariableRapLambda;
42    Float_t         fTreeVariableRapMC;
43    Float_t         fTreeVariableInvMassK0s;
44    Float_t         fTreeVariableInvMassLambda;
45    Float_t         fTreeVariableInvMassAntiLambda;
46    Float_t         fTreeVariableAlphaV0;
47    Float_t         fTreeVariablePtArmV0;
48    Float_t         fTreeVariableNegTransvMomentum;
49    Float_t         fTreeVariablePosTransvMomentum;
50    Float_t         fTreeVariableNegTransvMomentumMC;
51    Float_t         fTreeVariablePosTransvMomentumMC;
52    Int_t           fTreeVariableLeastNbrCrossedRows;
53    Float_t         fTreeVariableLeastRatioCrossedRowsOverFindable;
54    Int_t           fTreeVariablePID;
55    Int_t           fTreeVariablePIDPositive;
56    Int_t           fTreeVariablePIDNegative;
57    Int_t           fTreeVariablePIDMother;
58    Float_t         fTreeVariablePtXiMother;
59    Float_t         fTreeVariableV0CosineOfPointingAngle;
60    Int_t           fTreeVariableMultiplicity;
61    Float_t         fTreeVariableDistOverTotMom;
62    Float_t         fTreeVariableNSigmasPosProton;
63    Float_t         fTreeVariableNSigmasPosPion;
64    Float_t         fTreeVariableNSigmasNegProton;
65    Float_t         fTreeVariableNSigmasNegPion;
66    Float_t         fTreeVariableNegEta;
67    Float_t         fTreeVariablePosEta;
68    Float_t         fTreeVariableV0CreationRadius;
69    Int_t           fTreeVariableIndexStatus;
70    Int_t           fTreeVariableIndexStatusMother;
71    Bool_t          fTreeVariableIsNonInjected;
72
73    // List of branches
74    TBranch        *b_fTreeVariablePrimaryStatus;   //!
75    TBranch        *b_fTreeVariablePrimaryStatusMother;   //!
76    TBranch        *b_Chi2V0;   //!
77    TBranch        *b_fTreeVariableDcaV0Daughters;   //!
78    TBranch        *b_fTreeVariableDcaPosToPrimVertex;   //!
79    TBranch        *b_fTreeVariableDcaNegToPrimVertex;   //!
80    TBranch        *b_fTreeVariableV0Radius;   //!
81    TBranch        *b_fTreeVariablePt;   //!
82    TBranch        *b_fTreeVariablePtMC;   //!
83    TBranch        *b_fTreeVariableRapK0Short;   //!
84    TBranch        *b_fTreeVariableRapLambda;   //!
85    TBranch        *b_fTreeVariableRapMC;   //!
86    TBranch        *b_fTreeVariableInvMassK0s;   //!
87    TBranch        *b_fTreeVariableInvMassLambda;   //!
88    TBranch        *b_fTreeVariableInvMassAntiLambda;   //!
89    TBranch        *b_fTreeVariableAlphaV0;   //!
90    TBranch        *b_fTreeVariablePtArmV0;   //!
91    TBranch        *b_fTreeVariableNegTransvMomentum;   //!
92    TBranch        *b_fTreeVariablePosTransvMomentum;   //!
93    TBranch        *b_fTreeVariableNegTransvMomentumMC;   //!
94    TBranch        *b_fTreeVariablePosTransvMomentumMC;   //!
95    TBranch        *b_fTreeVariableLeastNbrCrossedRows;   //!
96    TBranch        *b_fTreeVariableLeastRatioCrossedRowsOverFindable;   //!
97    TBranch        *b_fTreeVariablePID;   //!
98    TBranch        *b_fTreeVariablePIDPositive;   //!
99    TBranch        *b_fTreeVariablePIDNegative;   //!
100    TBranch        *b_fTreeVariablePIDMother;   //!
101    TBranch        *b_fTreeVariablePtMother;   //!
102    TBranch        *b_fTreeVariableV0CosineOfPointingAngle;   //!
103    TBranch        *b_fTreeVariableMultiplicity;   //!
104    TBranch        *b_fTreeVariableDistOverTotMom;   //!
105    TBranch        *b_fTreeVariableNSigmasPosProton;   //!
106    TBranch        *b_fTreeVariableNSigmasPosPion;   //!
107    TBranch        *b_fTreeVariableNSigmasNegProton;   //!
108    TBranch        *b_fTreeVariableNSigmasNegPion;   //!
109    TBranch        *b_fTreeVariableNegEta;   //!
110    TBranch        *b_fTreeVariablePosEta;   //!
111    TBranch        *b_fTreeVariableV0CreationRadius;   //!
112    TBranch        *b_fTreeVariableIndexStatus;   //!
113    TBranch        *b_fTreeVariableIndexStatusMother;   //!
114    TBranch        *b_fTreeVariableIsNonInjected;   //!
115
116   AliV0CutVariations(TTree * /*tree*/ =0);
117    virtual ~AliV0CutVariations() { }
118    virtual Int_t   Version() const { return 2; }
119    virtual void    Begin(TTree *tree);
120    virtual void    SlaveBegin(TTree *tree);
121    virtual void    Init(TTree *tree);
122    virtual Bool_t  Notify();
123    virtual Bool_t  Process(Long64_t entry);
124    virtual Int_t   GetEntry(Long64_t entry, Int_t getall = 0) { return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0; }
125    virtual void    SetOption(const char *option) { fOption = option; }
126    virtual void    SetObject(TObject *obj) { fObject = obj; }
127    virtual void    SetInputList(TList *input) { fInput = input; }
128    virtual TList  *GetOutputList() const { return fOutput; }
129    virtual void    SlaveTerminate();
130    virtual void    Terminate();
131
132   void SetMC(Bool_t isMC=kTRUE) {fIsMC=isMC;}
133   void SetCentrality(Double_t min,Double_t max) {fCMin=min; fCMax=max;}
134   void SetSelectNonInjected(Bool_t is=kTRUE) {fSelectNonInjected=is;}
135   Bool_t AcceptV0();
136   Bool_t AcceptTracks();
137   Bool_t AcceptPID(Int_t code);
138
139 private:
140   Bool_t fIsMC;         // MC flag
141   Bool_t fSelectNonInjected;// non-injected flag
142   Double_t fCMin;       // Min centrality
143   Double_t fCMax;       // Max centrality
144   Double_t fCPA;        // cos(PA) threshold
145   Double_t fDCA;        // threshold for the DCA between V0 daughters
146   Double_t fTPCcr;      // threshold for the number of crossed TPC pad rows
147   Double_t fTPCcrfd;    // threshold for the ratio of TPC crossed/findable rows
148   Double_t fDCApv;      // threshold for the DCA wrt the primary vertex
149
150   //TList       *fOutput; //! The list of histograms
151
152   TH1F *fMult;       //! Track multiplicity
153   TH2F* fdEdx;       //! dEdx
154   TH2F* fdEdxPid;    //! dEdx with PID
155
156   TH1F *fCosPA;      //! cos(PA)
157   TH1F *fDtrDCA;     //! DCA between V0 daughters
158   TH1F *fTPCrows;    //! number of crossed TPC pad rows
159   TH1F *fTPCratio;   //! ratio of TPC crossed/findable rows
160   TH1F *fPrimDCA;    //! DCA wrt the primary vertex
161
162   TH2F* fK0sM;       //! Mass for K0s
163   TH2F* fK0sSi;      //! Side-band subtracted LvsP  for K0s 
164   TH2F* fK0sMC;      //! LvsP for the K0s from the Monte Carlo stack 
165   TH2F* fK0sAs;      //! LvsP for the K0s associated with the Monte Carlo 
166
167
168   TH2F* fLambdaM;    //! Mass for Lambdas
169   TH2F* fLambdaSi;   //! Side-band subtrated LvsP for Lambda
170   TH2F* fLambdaMC;   //! LvsP for Lambdas from the Monte Carlo stack
171   TH2F* fLambdaAs;   //! LvsP for Lambdas associated with the Monte Carlo
172
173   TH1D* fLambdaEff;  //! Efficiency for Lambda  
174   TH1D* fLambdaPt;   //! Pt spectrum for Lambda
175
176   TH2F* fLambdaBarM;  //! Mass for anti-Lambdas
177   TH2F* fLambdaBarSi; //! Side-band subtrated LvsP for anti-Lambda
178   TH2F* fLambdaBarMC; //! LvsP for anti-Lambdas from the Monte Carlo stack
179   TH2F* fLambdaBarAs; //! LvsP for anti-Lambdas associated with the Monte Carlo
180
181   TH1D* fLambdaBarEff;  //! Efficiency for anti-Lambda  
182   TH1D* fLambdaBarPt;   //! Pt spectrum for anti-Lambda
183
184   TH3F* fLambdaFromXi;//! LvsPvsPxi for Lambdas from Xis associated with MC 
185   TH2F* fXiM;         //! Mass for Xis
186   TH1F* fXiSiP;       //! Side-band subtracted Pt for reconstructed Xi
187
188   TH3F* fLambdaBarFromXiBar;//! LvsPvsPxi for anti-Lambdas from anti-Xis associated with MC 
189   TH2F* fXiBarM;         //! Mass for anti-Xis
190   TH1F* fXiBarSiP;       //! Side-band subtracted Pt for reconstructed anti-Xi
191
192    ClassDef(AliV0CutVariations,1);
193 };
194
195 #endif
196
197 #ifdef AliV0CutVariations_cxx
198 void AliV0CutVariations::Init(TTree *tree)
199 {
200    // The Init() function is called when the selector needs to initialize
201    // a new tree or chain. Typically here the branch addresses and branch
202    // pointers of the tree will be set.
203    // It is normally not necessary to make changes to the generated
204    // code, but the routine can be extended by the user if needed.
205    // Init() will be called many times when running on PROOF
206    // (once per file to be processed).
207
208    // Set branch addresses and branch pointers
209    if (!tree) return;
210    fChain = tree;
211    fChain->SetMakeClass(1);
212
213    if (fIsMC) {
214    fChain->SetBranchAddress("fTreeVariablePrimaryStatus", &fTreeVariablePrimaryStatus, &b_fTreeVariablePrimaryStatus);
215    fChain->SetBranchAddress("fTreeVariablePrimaryStatusMother", &fTreeVariablePrimaryStatusMother, &b_fTreeVariablePrimaryStatusMother);
216    fChain->SetBranchAddress("fTreeVariablePtMC", &fTreeVariablePtMC, &b_fTreeVariablePtMC);
217    fChain->SetBranchAddress("fTreeVariableRapMC", &fTreeVariableRapMC, &b_fTreeVariableRapMC);
218    fChain->SetBranchAddress("fTreeVariableNegTransvMomentum", &fTreeVariableNegTransvMomentum, &b_fTreeVariableNegTransvMomentum);
219    fChain->SetBranchAddress("fTreeVariablePosTransvMomentum", &fTreeVariablePosTransvMomentum, &b_fTreeVariablePosTransvMomentum);
220    fChain->SetBranchAddress("fTreeVariableNegTransvMomentumMC", &fTreeVariableNegTransvMomentumMC, &b_fTreeVariableNegTransvMomentumMC);
221    fChain->SetBranchAddress("fTreeVariablePosTransvMomentumMC", &fTreeVariablePosTransvMomentumMC, &b_fTreeVariablePosTransvMomentumMC);
222    fChain->SetBranchAddress("fTreeVariablePID", &fTreeVariablePID, &b_fTreeVariablePID);
223    fChain->SetBranchAddress("fTreeVariablePIDPositive", &fTreeVariablePIDPositive, &b_fTreeVariablePIDPositive);
224    fChain->SetBranchAddress("fTreeVariablePIDNegative", &fTreeVariablePIDNegative, &b_fTreeVariablePIDNegative);
225    fChain->SetBranchAddress("fTreeVariablePIDMother", &fTreeVariablePIDMother, &b_fTreeVariablePIDMother);
226    fChain->SetBranchAddress("fTreeVariablePtXiMother", &fTreeVariablePtXiMother, &b_fTreeVariablePtMother);
227    fChain->SetBranchAddress("fTreeVariableV0CreationRadius", &fTreeVariableV0CreationRadius, &b_fTreeVariableV0CreationRadius);
228    fChain->SetBranchAddress("fTreeVariableIndexStatus", &fTreeVariableIndexStatus, &b_fTreeVariableIndexStatus);
229    fChain->SetBranchAddress("fTreeVariableIndexStatusMother", &fTreeVariableIndexStatusMother, &b_fTreeVariableIndexStatusMother);
230    fChain->SetBranchAddress("fTreeVariableIsNonInjected", &fTreeVariableIsNonInjected, &b_fTreeVariableIsNonInjected);
231    }
232
233    fChain->SetBranchAddress("fTreeVariableChi2V0", &fTreeVariableChi2V0, &b_Chi2V0);
234    fChain->SetBranchAddress("fTreeVariableDcaV0Daughters", &fTreeVariableDcaV0Daughters, &b_fTreeVariableDcaV0Daughters);
235    fChain->SetBranchAddress("fTreeVariableDcaPosToPrimVertex", &fTreeVariableDcaPosToPrimVertex, &b_fTreeVariableDcaPosToPrimVertex);
236    fChain->SetBranchAddress("fTreeVariableDcaNegToPrimVertex", &fTreeVariableDcaNegToPrimVertex, &b_fTreeVariableDcaNegToPrimVertex);
237    fChain->SetBranchAddress("fTreeVariableV0Radius", &fTreeVariableV0Radius, &b_fTreeVariableV0Radius);
238    fChain->SetBranchAddress("fTreeVariablePt", &fTreeVariablePt, &b_fTreeVariablePt);
239    fChain->SetBranchAddress("fTreeVariableRapK0Short", &fTreeVariableRapK0Short, &b_fTreeVariableRapK0Short);
240    fChain->SetBranchAddress("fTreeVariableRapLambda", &fTreeVariableRapLambda, &b_fTreeVariableRapLambda);
241    fChain->SetBranchAddress("fTreeVariableInvMassK0s", &fTreeVariableInvMassK0s, &b_fTreeVariableInvMassK0s);
242    fChain->SetBranchAddress("fTreeVariableInvMassLambda", &fTreeVariableInvMassLambda, &b_fTreeVariableInvMassLambda);
243    fChain->SetBranchAddress("fTreeVariableInvMassAntiLambda", &fTreeVariableInvMassAntiLambda, &b_fTreeVariableInvMassAntiLambda);
244    fChain->SetBranchAddress("fTreeVariableAlphaV0", &fTreeVariableAlphaV0, &b_fTreeVariableAlphaV0);
245    fChain->SetBranchAddress("fTreeVariablePtArmV0", &fTreeVariablePtArmV0, &b_fTreeVariablePtArmV0);
246    fChain->SetBranchAddress("fTreeVariableLeastNbrCrossedRows", &fTreeVariableLeastNbrCrossedRows, &b_fTreeVariableLeastNbrCrossedRows);
247    fChain->SetBranchAddress("fTreeVariableLeastRatioCrossedRowsOverFindable", &fTreeVariableLeastRatioCrossedRowsOverFindable, &b_fTreeVariableLeastRatioCrossedRowsOverFindable);
248    fChain->SetBranchAddress("fTreeVariableV0CosineOfPointingAngle", &fTreeVariableV0CosineOfPointingAngle, &b_fTreeVariableV0CosineOfPointingAngle);
249    fChain->SetBranchAddress("fTreeVariableMultiplicity", &fTreeVariableMultiplicity, &b_fTreeVariableMultiplicity);
250    fChain->SetBranchAddress("fTreeVariableDistOverTotMom", &fTreeVariableDistOverTotMom, &b_fTreeVariableDistOverTotMom);
251    fChain->SetBranchAddress("fTreeVariableNSigmasPosProton", &fTreeVariableNSigmasPosProton, &b_fTreeVariableNSigmasPosProton);
252    fChain->SetBranchAddress("fTreeVariableNSigmasPosPion", &fTreeVariableNSigmasPosPion, &b_fTreeVariableNSigmasPosPion);
253    fChain->SetBranchAddress("fTreeVariableNSigmasNegProton", &fTreeVariableNSigmasNegProton, &b_fTreeVariableNSigmasNegProton);
254    fChain->SetBranchAddress("fTreeVariableNSigmasNegPion", &fTreeVariableNSigmasNegPion, &b_fTreeVariableNSigmasNegPion);
255    fChain->SetBranchAddress("fTreeVariableNegEta", &fTreeVariableNegEta, &b_fTreeVariableNegEta);
256    fChain->SetBranchAddress("fTreeVariablePosEta", &fTreeVariablePosEta, &b_fTreeVariablePosEta);
257 }
258
259 Bool_t AliV0CutVariations::Notify()
260 {
261    // The Notify() function is called when a new file is opened. This
262    // can be either for a new TTree in a TChain or when when a new TTree
263    // is started when using PROOF. It is normally not necessary to make changes
264    // to the generated code, but the routine can be extended by the
265    // user if needed. The return value is currently not used.
266
267    return kTRUE;
268 }
269
270 #endif // #ifdef AliV0CutVariations_cxx