]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/PartCorrBase/AliNeutralMesonSelection.h
ana.C: Included possibility to read MC data directly from galice.root
[u/mrichter/AliRoot.git] / PWG4 / PartCorrBase / AliNeutralMesonSelection.h
1 #ifndef ALINEUTRALMESONSELECTION_H
2 #define ALINEUTRALMESONSELECTION_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice     */
5 /* $Id: AliNeutralMesonSelection.h 27413 2008-07-18 13:28:12Z gconesab $ */
6
7 //_________________________________________________________________________
8 // Class that contains methods to select candidate pairs to neutral meson 
9 // 2 main selections, invariant mass around pi0 (also any other mass),
10 // apperture angle to distinguish from combinatorial.
11 // There is a 3rd cut based on the gamma correlation on phi or pt.
12 //-- Author: Gustavo Conesa (INFN-LNF)
13
14 // --- ROOT system ---
15 #include<TObject.h>
16 #include<TArrayD.h>
17
18 class TLorentzVector ;
19 class TList ;
20 class TH2F ;
21
22 //--- ANALYSIS system ---
23 class AliLog ;
24
25 class AliNeutralMesonSelection : public TObject {
26         
27 public: 
28         
29         AliNeutralMesonSelection() ; // default ctor
30         AliNeutralMesonSelection(const AliNeutralMesonSelection & g) ; // cpy ctor
31         AliNeutralMesonSelection & operator = (const AliNeutralMesonSelection & g) ;//cpy assignment
32         virtual ~AliNeutralMesonSelection() ; //virtual dtor
33         
34         TList * GetCreateOutputObjects();
35         
36         Double_t GetAngleMaxParam(Int_t i) const {return fAngleMaxParam.At(i) ; }
37         void SetAngleMaxParam(Int_t i, Double_t par){fAngleMaxParam.AddAt(par,i) ; }
38         
39         Double_t GetInvMassMaxCut() const {return fInvMassMaxCut ; }
40         Double_t GetInvMassMinCut() const {return fInvMassMinCut ; }
41         void SetInvMassCutRange(Double_t invmassmin, Double_t invmassmax)
42         {fInvMassMaxCut =invmassmax;  fInvMassMinCut =invmassmin;}      
43         
44         Double_t GetMass() const {return fM ; }
45         void SetMass(Double_t m) { fM =m ; }
46         
47         Bool_t AreNeutralMesonSelectionHistosKept() const { return fKeepNeutralMesonHistos ; }
48         void KeepNeutralMesonSelectionHistos(Bool_t keep) { fKeepNeutralMesonHistos = keep ; }
49         
50         void InitParameters();  
51         Bool_t IsAngleInWindow(const Float_t angle, const Float_t e) const ;
52         void Print(const Option_t * opt) const;
53         
54         Bool_t  SelectPair(TLorentzVector particlei,  TLorentzVector particlej)  ;
55         
56         //Histogrammes setters and getters
57         
58         virtual void SetHistoERangeAndNBins(Float_t min, Float_t max, Int_t n) {
59                 fHistoNEBins = n ;
60                 fHistoEMax = max ;
61                 fHistoEMin = min ;
62         }
63         
64         Int_t   GetHistoNEBins() const { return fHistoNEBins ; }
65         Float_t GetHistoEMin()   const { return fHistoEMin ; }
66         Float_t GetHistoEMax()   const { return fHistoEMax ; }
67
68         virtual void SetHistoPtRangeAndNBins(Float_t min, Float_t max, Int_t n) {
69                 fHistoNPtBins = n ;
70                 fHistoPtMax = max ;
71                 fHistoPtMin = min ;
72         }
73         
74         Int_t   GetHistoNPtBins() const { return fHistoNPtBins ; }
75         Float_t GetHistoPtMin()   const { return fHistoPtMin ; }
76         Float_t GetHistoPtMax()   const { return fHistoPtMax ; }
77
78         virtual void SetHistoAngleRangeAndNBins(Float_t min, Float_t max, Int_t n) {
79                 fHistoNAngleBins = n ;
80                 fHistoAngleMax = max ;
81                 fHistoAngleMin = min ;
82         }
83         
84         Int_t   GetHistoNAngleBins() const { return fHistoNAngleBins ; }
85         Float_t GetHistoAngleMin()   const { return fHistoAngleMin ; }
86         Float_t GetHistoAngleMax()   const { return fHistoAngleMax ; }
87
88         virtual void SetHistoIMRangeAndNBins(Float_t min, Float_t max, Int_t n) {
89                 fHistoNIMBins = n ;
90                 fHistoIMMax = max ;
91                 fHistoIMMin = min ;
92         }
93         
94         Int_t   GetHistoNIMBins() const { return fHistoNIMBins ; }
95         Float_t GetHistoIMMin()   const { return fHistoIMMin ; }
96         Float_t GetHistoIMMax()   const { return fHistoIMMax ; }
97         
98         
99 private:
100         Double_t fM ; //mass of the neutral meson
101         Double_t   fInvMassMaxCut ;  // Invariant Mass cut maximum
102         Double_t   fInvMassMinCut ;  // Invariant Masscut minimun
103         TArrayD    fAngleMaxParam ; //Max opening angle selection parameters
104         
105         Bool_t  fKeepNeutralMesonHistos ; // Keep neutral meson selection histograms
106         
107         //Histograms
108         TH2F * fhAnglePairNoCut  ;  //Aperture angle of decay photons, no cuts
109         TH2F * fhAnglePairOpeningAngleCut   ;  //Aperture angle of decay photons, cut on opening angle
110         TH2F * fhAnglePairAllCut   ;  //Aperture angle of decay photons, all cuts
111         TH2F * fhInvMassPairNoCut    ;  //Invariant mass of decay photons, no cuts
112         TH2F * fhInvMassPairOpeningAngleCut  ;  //Invariant mass of decay photons, cut on opening angle
113         TH2F * fhInvMassPairAllCut   ;  //Invariant mass of decay photons, all cuts
114         
115         //Histograms binning and range    
116         Int_t   fHistoNEBins ;  //Number of bins in pi0 E axis
117         Float_t fHistoEMax ;    //Maximum value of pi0 E histogram range
118         Float_t fHistoEMin ;    //Minimum value of pi0 E histogram range
119         Int_t   fHistoNPtBins ;  //Number of bins in Pt trigger axis
120         Float_t fHistoPtMax ;    //Maximum value of Pt trigger histogram range
121         Float_t fHistoPtMin ;    //Minimum value of Pt trigger histogram range          
122         Int_t   fHistoNAngleBins ; //Number of bins in angle axis
123         Float_t fHistoAngleMax ;//Maximum value of angle histogram range
124         Float_t fHistoAngleMin ;//Minimum value of angle histogram range
125         Int_t   fHistoNIMBins ; //Number of bins in Invariant Mass axis
126         Float_t fHistoIMMax ;   //Maximum value of Invariant Mass histogram range
127         Float_t fHistoIMMin ;   //Minimum value of Invariant Mass histogram range
128         
129         ClassDef(AliNeutralMesonSelection,2)
130     
131 } ;
132
133
134 #endif //ALINEUTRALMESONSELECTION_H
135
136
137