AliPhysics  88b7ad0 (88b7ad0)
AliNeutralMesonSelection.h
Go to the documentation of this file.
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 
6 //_________________________________________________________________________
19 //_________________________________________________________________________
20 
21 // --- ROOT system ---
22 #include<TObject.h>
23 #include<TArrayD.h>
24 #include<TString.h>
25 
26 class TLorentzVector ;
27 class TList ;
28 class TH2F ;
29 
31 
32  public:
33 
34  AliNeutralMesonSelection() ; // default ctor
35 
37  virtual ~AliNeutralMesonSelection() { ; }
38 
39  // General
40 
42 
43  void InitParameters();
44 
45  void Print(const Option_t * opt) const;
46 
49 
50  Bool_t SelectPair(TLorentzVector particlei, TLorentzVector particlej, Int_t calo) ;
51 
52  void SetParticle(TString particleName) ; // Do some default settings for "Pi0" or "Eta"
53  TString GetParticle() const { return fParticle ; }
54 
55  Int_t GetDebug() const { return fDebug ; }
56  void SetDebug(Int_t d) { fDebug = d ; }
57 
58  // Asymmetry selection
59 
60  Float_t GetAsymmetryCut() const { return fAsymmetryCut ; }
61  void SetAsymmetryCut(Float_t asy) { fAsymmetryCut = asy ; }
62 
65 
66  //Opening angle selection
67 
68  Double_t GetAngleMaxParam(Int_t i) const { return fAngleMaxParam.At(i) ; }
69  void SetAngleMaxParam(Int_t i, Double_t par) { fAngleMaxParam.AddAt(par,i) ; }
70 
72  fShiftMinAngle[1] = b ; }
73 
74  void SwitchOnAngleSelection() { fUseAngleCut = kTRUE ; }
75  void SwitchOffAngleSelection() { fUseAngleCut = kFALSE ; }
76 
77  Bool_t IsAngleInWindow(Float_t angle, Float_t e) const ;
78 
79  //Invariant mass selection
80 
83 
84  void SetInvMassCutRange(Double_t invmassmin, Double_t invmassmax)
85  { fInvMassMaxCut =invmassmax; fInvMassMinCut =invmassmin ; }
86 
88  Double_t rmin, Double_t rmax )
89  { fLeftBandMinCut = lmin ; fLeftBandMaxCut = lmax ;
90  fRightBandMinCut = rmin ; fRightBandMaxCut = rmax ; }
91 
93  { fInvMassMaxCutParam[0] = a ;
94  fInvMassMaxCutParam[1] = b ;
95  fInvMassMaxCutParam[2] = c ; }
96 
97  Double_t GetMass() const { return fM ; }
98  void SetMass(Double_t m) { fM = m ; }
99 
100 
101  // Decay photon bit setting
102  static const Int_t fgkMaxNDecayBits = 8;
103 
104  enum decayTypes { kPi0 = 0, kEta = 1,
107 
108  UInt_t GetDecayBit() const { return fDecayBit ; }
109 
110  void SetDecayBit(Int_t &tag, UInt_t set) const {
111  // Set bit of type set (decayTypes) in tag
112  tag |= (1<<set) ;
113  }
114 
115  void SetDecayBit(Int_t &tag) const {
116  // Set bit of type set (decayTypes) in tag
117  tag |= (1<<fDecayBit) ;
118  }
119 
121  // Check if in tag the bit test (decayTypes) is set.
122  if (tag & (1<<test) ) return kTRUE ;
123  else return kFALSE ;
124  }
125 
127  // Check if in tag the bit test (decayTypes) is set.
128  if (tag & (1<<fDecayBit) ) return kTRUE ;
129  else return kFALSE ;
130  }
131 
132  // Histograms setters and getters
133 
134  virtual void SetHistoERangeAndNBins(Float_t min, Float_t max, Int_t n) {
135  fHistoNEBins = n ;
136  fHistoEMax = max ;
137  fHistoEMin = min ;
138  }
139 
140  Int_t GetHistoNEBins() const { return fHistoNEBins ; }
141  Float_t GetHistoEMin() const { return fHistoEMin ; }
142  Float_t GetHistoEMax() const { return fHistoEMax ; }
143 
144  virtual void SetHistoAngleRangeAndNBins(Float_t min, Float_t max, Int_t n) {
145  fHistoNAngleBins = n ;
146  fHistoAngleMax = max ;
147  fHistoAngleMin = min ;
148  }
149 
153 
154  virtual void SetHistoIMRangeAndNBins(Float_t min, Float_t max, Int_t n) {
155  fHistoNIMBins = n ;
156  fHistoIMMax = max ;
157  fHistoIMMin = min ;
158  }
159 
160  Int_t GetHistoNIMBins() const { return fHistoNIMBins ; }
161  Float_t GetHistoIMMin() const { return fHistoIMMin ; }
162  Float_t GetHistoIMMax() const { return fHistoIMMax ; }
163 
164  private:
165 
167 
169 
171 
173 
175 
177 
179 
181 
183 
185 
187 
189 
191 
193 
195 
197 
199 
200  // Histograms
202 
204 
206 
208 
209 
211 
213 
215 
217 
219 
221 
223 
224 
225  // Histograms binning and range
227 
229 
231 
233 
235 
237 
238 
240 
242 
244 
247 
250 
252  ClassDef(AliNeutralMesonSelection,8) ;
254 
255 } ;
256 
257 #endif //ALINEUTRALMESONSELECTION_H
258 
259 
260 
Double_t GetAngleMaxParam(Int_t i) const
Float_t fHistoAngleMin
Minimum value of angle histogram range.
Float_t fHistoAngleMax
Maximum value of angle histogram range.
Double_t fLeftBandMaxCut
Side Band selection, max left band cut.
double Double_t
Definition: External.C:58
Float_t fAsymmetryCut
Asymmetry cut.
virtual void SetHistoAngleRangeAndNBins(Float_t min, Float_t max, Int_t n)
Definition: External.C:236
void InitParameters()
Initialize the parameters of the analysis.
Bool_t AreNeutralMesonSelectionHistosKept() const
TH2F * fhInvMassPairAllCut
! Invariant mass of decay photons, all cuts.
AliNeutralMesonSelection()
Default constructor. Initialize parameters.
Double_t fRightBandMinCut
Side Band selection, min right band cut.
void SetAngleMaxParam(Int_t i, Double_t par)
void SetDecayBit(Int_t &tag) const
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetInvMassCutRange(Double_t invmassmin, Double_t invmassmax)
void KeepNeutralMesonSelectionHistos(Bool_t keep)
Bool_t CheckDecayBit(Int_t tag, UInt_t test) const
TCanvas * c
Definition: TestFitELoss.C:172
Double_t fLeftBandMinCut
Side Band selection, min left band cut.
TH2F * fhAsymmetryOpeningAngleCut
! Asymmetry of decay photons, cut on opening angle.
virtual ~AliNeutralMesonSelection()
Virtual destructor.
TH2F * fhInvMassPairNoCut
! Invariant mass of decay photons, no cuts.
Bool_t fKeepNeutralMesonHistos
Keep neutral meson selection histograms.
Bool_t IsAngleInWindow(Float_t angle, Float_t e) const
Bool_t fUseAngleCut
Select pairs depending on their opening angle.
Double_t fRightBandMaxCut
Side Band selection, max right band cut.
int Int_t
Definition: External.C:63
void SetSideBandCutRanges(Double_t lmin, Double_t lmax, Double_t rmin, Double_t rmax)
unsigned int UInt_t
Definition: External.C:33
float Float_t
Definition: External.C:68
Int_t fHistoNIMBins
Number of bins in Invariant Mass axis.
Float_t fHistoEMax
Maximum value of pi0 E histogram range.
Double_t fInvMassMaxCutParam[3]
Variable invariant mass max cut, for pi0 in EMCAL.
Double_t fInvMassMaxCut
Invariant Mass cut maximum.
virtual void SetHistoERangeAndNBins(Float_t min, Float_t max, Int_t n)
TArrayD fAngleMaxParam
Maximum opening angle selection parameters.
void SetParticle(TString particleName)
Set some default parameters for selection of pi0 or eta.
Float_t fShiftMinAngle[2]
Correction shift for min angle from true kinematic limit, resolution effects.
Bool_t SelectPair(TLorentzVector particlei, TLorentzVector particlej, Int_t calo)
TH2F * fhAnglePairAllCut
! Aperture angle of decay photons, all cuts.
Double_t fM
Mass of the neutral meson.
Int_t fHistoNEBins
Number of bins in pi0 E axis.
TH2F * fhAnglePairNoCut
! Aperture angle of decay photons, no cuts.
void SetDecayBit(Int_t &tag, UInt_t set) const
TH2F * fhAsymmetryNoCut
! Asymmetry of decay photons, no cuts.
Float_t fHistoEMin
Minimum value of pi0 E histogram range.
Float_t fHistoIMMin
Minimum value of Invariant Mass histogram range.
virtual void SetHistoIMRangeAndNBins(Float_t min, Float_t max, Int_t n)
TH2F * fhAnglePairOpeningAngleCut
! Aperture angle of decay photons, cut on opening angle.
UInt_t fDecayBit
Decay type flag, set while selecting, depending on fParticle and side range. See enum decayTypes for ...
Bool_t CheckDecayBit(Int_t tag) const
Float_t fHistoIMMax
Maximum value of Invariant Mass histogram range.
Class that contains methods to select candidate cluster pairs to neutral meson.
AliNeutralMesonSelection & operator=(const AliNeutralMesonSelection &nm)
Assignment operator not implemented.
const char Option_t
Definition: External.C:48
void test(int runnumber=195345)
TH2F * fhInvMassPairAsymmetryCut
! Invariant mass of decay photons, asymmetry cut.
Bool_t fUseAsymmetryCut
Use the asymmetry cut.
bool Bool_t
Definition: External.C:53
Double_t fInvMassMinCut
Invariant Masscut minimun.
Int_t fHistoNAngleBins
Number of bins in angle axis.
void SetInvMassCutMaxParameters(Float_t a, Float_t b, Float_t c)
TH2F * fhAsymmetryAllCut
! Asymmetry of decay photons, all cuts.
TH2F * fhAnglePairAsymmetryCut
! Aperture angle of decay photons, asymmetry cut.
TString fParticle
Meutral meson name (Pi0, Eta, +SideBand).
TH2F * fhInvMassPairOpeningAngleCut
! Invariant mass of decay photons, cut on opening angle.
void SetShiftMinAngleCut(Float_t a, Float_t b)