]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG/CaloTrackCorrBase/AliNeutralMesonSelection.h
cmake and linkdef changes for temporary dev task
[u/mrichter/AliRoot.git] / PWG / CaloTrackCorrBase / AliNeutralMesonSelection.h
CommitLineData
1c5acb87 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 */
1c5acb87 5
6//_________________________________________________________________________
7// Class that contains methods to select candidate pairs to neutral meson
8// 2 main selections, invariant mass around pi0 (also any other mass),
9// apperture angle to distinguish from combinatorial.
10// There is a 3rd cut based on the gamma correlation on phi or pt.
11//-- Author: Gustavo Conesa (INFN-LNF)
12
13// --- ROOT system ---
14#include<TObject.h>
15#include<TArrayD.h>
3f150b4b 16#include<TString.h>
1c5acb87 17
18class TLorentzVector ;
3f150b4b 19class TList ;
20class TH2F ;
1c5acb87 21
22class AliNeutralMesonSelection : public TObject {
477d6cee 23
24 public:
477d6cee 25 AliNeutralMesonSelection() ; // default ctor
9542ac75 26 virtual ~AliNeutralMesonSelection() { ; } //virtual dtor
c5693f62 27
a5fb4114 28 // General
9542ac75 29
a5fb4114 30 TList * GetCreateOutputObjects();
9542ac75 31
a5fb4114 32 void InitParameters();
9542ac75 33
a5fb4114 34 void Print(const Option_t * opt) const;
78219bac 35
9542ac75 36 Bool_t AreNeutralMesonSelectionHistosKept() const { return fKeepNeutralMesonHistos ; }
37 void KeepNeutralMesonSelectionHistos(Bool_t keep) { fKeepNeutralMesonHistos = keep ; }
38
bb787aa8 39 Bool_t SelectPair(TLorentzVector particlei, TLorentzVector particlej, Int_t calo) ;
3bfcb597 40
41 void SetParticle(TString particleName) ; // Do some default settings for "Pi0" or "Eta"
a39c9b1b 42 TString GetParticle() const { return fParticle ; }
9542ac75 43
44 // Asymmetry selection
45
d013c46c 46 Float_t GetAsymmetryCut() const { return fAsymmetryCut ; }
47 void SetAsymmetryCut(Float_t asy) { fAsymmetryCut = asy ; }
9542ac75 48
d013c46c 49 void SwitchOnAsymmetryCut() { fUseAsymmetryCut = kTRUE ; }
50 void SwitchOffAsymmetryCut() { fUseAsymmetryCut = kFALSE ; }
9542ac75 51
a5fb4114 52 //Opening angle selection
9542ac75 53
a5fb4114 54 Double_t GetAngleMaxParam(Int_t i) const { return fAngleMaxParam.At(i) ; }
55 void SetAngleMaxParam(Int_t i, Double_t par) { fAngleMaxParam.AddAt(par,i) ; }
477d6cee 56
d013c46c 57 void SetShiftMinAngleCut(Float_t a, Float_t b) { fShiftMinAngle[0] = a ;
7287751b 58 fShiftMinAngle[1] = b ; }
a5fb4114 59
60 void SwitchOnAngleSelection() { fUseAngleCut = kTRUE ; }
61 void SwitchOffAngleSelection() { fUseAngleCut = kFALSE ; }
9542ac75 62
8a2dbbff 63 Bool_t IsAngleInWindow(Float_t angle, Float_t e) const ;
a5fb4114 64
65 //Invariant mass selection
9542ac75 66
a5fb4114 67 Double_t GetInvMassMaxCut() const { return fInvMassMaxCut ; }
68 Double_t GetInvMassMinCut() const { return fInvMassMinCut ; }
477d6cee 69
b6991fc4 70 void SetInvMassCutRange(Double_t invmassmin, Double_t invmassmax)
9542ac75 71 { fInvMassMaxCut =invmassmax; fInvMassMinCut =invmassmin ; }
477d6cee 72
3f150b4b 73 void SetSideBandCutRanges( Double_t lmin, Double_t lmax,
74 Double_t rmin, Double_t rmax )
75 { fLeftBandMinCut = lmin ; fLeftBandMaxCut = lmax ;
76 fRightBandMinCut = rmin ; fRightBandMaxCut = rmax ; }
77
3bfcb597 78 void SetInvMassCutMaxParameters(Float_t a, Float_t b, Float_t c)
79 { fInvMassMaxCutParam[0] = a ;
80 fInvMassMaxCutParam[1] = b ;
81 fInvMassMaxCutParam[2] = c ; }
82
a5fb4114 83 Double_t GetMass() const { return fM ; }
84 void SetMass(Double_t m) { fM = m ; }
a39c9b1b 85
86
87 // Decay photon bit setting
88
89 enum decayTypes { kPi0, kEta, kPi0Side, kEtaSide} ;
90
91 UInt_t GetDecayBit() const { return fDecayBit ; }
92
93 void SetDecayBit(Int_t &tag, UInt_t set) const {
94 // Set bit of type set (decayTypes) in tag
95 tag |= (1<<set) ;
96 }
97
98 void SetDecayBit(Int_t &tag) const {
99 // Set bit of type set (decayTypes) in tag
100 tag |= (1<<fDecayBit) ;
101 }
102
103 Bool_t CheckDecayBit(Int_t tag, UInt_t test) const {
104 // Check if in tag the bit test (decayTypes) is set.
105 if (tag & (1<<test) ) return kTRUE ;
106 else return kFALSE ;
107 }
108
109 Bool_t CheckDecayBit(Int_t tag) const {
110 // Check if in tag the bit test (decayTypes) is set.
111 if (tag & (1<<fDecayBit) ) return kTRUE ;
112 else return kFALSE ;
113 }
114
115 // Histograms setters and getters
477d6cee 116
117 virtual void SetHistoERangeAndNBins(Float_t min, Float_t max, Int_t n) {
118 fHistoNEBins = n ;
119 fHistoEMax = max ;
120 fHistoEMin = min ;
121 }
122
a5fb4114 123 Int_t GetHistoNEBins() const { return fHistoNEBins ; }
124 Float_t GetHistoEMin() const { return fHistoEMin ; }
125 Float_t GetHistoEMax() const { return fHistoEMax ; }
3bfcb597 126
477d6cee 127 virtual void SetHistoAngleRangeAndNBins(Float_t min, Float_t max, Int_t n) {
128 fHistoNAngleBins = n ;
129 fHistoAngleMax = max ;
130 fHistoAngleMin = min ;
131 }
132
133 Int_t GetHistoNAngleBins() const { return fHistoNAngleBins ; }
a5fb4114 134 Float_t GetHistoAngleMin() const { return fHistoAngleMin ; }
135 Float_t GetHistoAngleMax() const { return fHistoAngleMax ; }
477d6cee 136
137 virtual void SetHistoIMRangeAndNBins(Float_t min, Float_t max, Int_t n) {
138 fHistoNIMBins = n ;
139 fHistoIMMax = max ;
140 fHistoIMMin = min ;
141 }
142
a5fb4114 143 Int_t GetHistoNIMBins() const { return fHistoNIMBins ; }
144 Float_t GetHistoIMMin() const { return fHistoIMMin ; }
145 Float_t GetHistoIMMax() const { return fHistoIMMax ; }
477d6cee 146
477d6cee 147 private:
9542ac75 148
149 Float_t fAsymmetryCut ; // Asymmetry cut
150 Bool_t fUseAsymmetryCut; // Use the asymmetry cut
3f150b4b 151
9542ac75 152 Double_t fM ; // Mass of the neutral meson
153 Double_t fInvMassMaxCut ; // Invariant Mass cut maximum
154 Double_t fInvMassMinCut ; // Invariant Masscut minimun
3bfcb597 155 Double_t fInvMassMaxCutParam[3]; // Variable invariant mass max cut, for pi0 in EMCAL
9542ac75 156
3f150b4b 157 Double_t fLeftBandMinCut ; // Side Band selection, min left band cut
158 Double_t fLeftBandMaxCut ; // Side Band selection, max left band cut
159 Double_t fRightBandMinCut ; // Side Band selection, min right band cut
160 Double_t fRightBandMaxCut ; // Side Band selection, max right band cut
161
9542ac75 162 TArrayD fAngleMaxParam ; // Max opening angle selection parameters
163 Bool_t fUseAngleCut ; // Select pairs depending on their opening angle
7287751b 164 Float_t fShiftMinAngle[2] ; // Correction shift for min angle from true kinematic limit, resolution effects
9542ac75 165
166 Bool_t fKeepNeutralMesonHistos ; // Keep neutral meson selection histograms
a39c9b1b 167
3f150b4b 168 TString fParticle ; // neutral meson name (Pi0, Eta, +SideBand)
a39c9b1b 169 UInt_t fDecayBit; // Decay type flag, set when fParticle is set
3bfcb597 170
477d6cee 171 //Histograms
9542ac75 172 TH2F * fhAnglePairNoCut ; //! Aperture angle of decay photons, no cuts
173 TH2F * fhAnglePairOpeningAngleCut ; //! Aperture angle of decay photons, cut on opening angle
174 TH2F * fhAnglePairAsymmetryCut ; //! Aperture angle of decay photons, asymmetry cut
175 TH2F * fhAnglePairAllCut ; //! Aperture angle of decay photons, all cuts
176
177 TH2F * fhInvMassPairNoCut ; //! Invariant mass of decay photons, no cuts
178 TH2F * fhInvMassPairOpeningAngleCut ; //! Invariant mass of decay photons, cut on opening angle
179 TH2F * fhInvMassPairAsymmetryCut ; //! Invariant mass of decay photons, asymmetry cut
180 TH2F * fhInvMassPairAllCut ; //! Invariant mass of decay photons, all cuts
181
182 TH2F * fhAsymmetryNoCut ; //! Asymmetry of decay photons, no cuts
183 TH2F * fhAsymmetryOpeningAngleCut ; //! Asymmetry of decay photons, cut on opening angle
184 TH2F * fhAsymmetryAllCut ; //! Asymmetry of decay photons, all cuts
477d6cee 185
186 //Histograms binning and range
9542ac75 187 Int_t fHistoNEBins ; // Number of bins in pi0 E axis
188 Float_t fHistoEMax ; // Maximum value of pi0 E histogram range
189 Float_t fHistoEMin ; // Minimum value of pi0 E histogram range
190
9542ac75 191 Int_t fHistoNAngleBins ; // Number of bins in angle axis
192 Float_t fHistoAngleMax ; // Maximum value of angle histogram range
193 Float_t fHistoAngleMin ; // Minimum value of angle histogram range
194
195 Int_t fHistoNIMBins ; // Number of bins in Invariant Mass axis
196 Float_t fHistoIMMax ; // Maximum value of Invariant Mass histogram range
c5693f62 197 Float_t fHistoIMMin ; // Minimum value of Invariant Mass histogram range
198
b960c7eb 199 AliNeutralMesonSelection( const AliNeutralMesonSelection & g) ; // cpy ctor
c5693f62 200 AliNeutralMesonSelection & operator = (const AliNeutralMesonSelection & g) ; // cpy assignment
9542ac75 201
a39c9b1b 202 ClassDef(AliNeutralMesonSelection,8)
1c5acb87 203
9542ac75 204} ;
1c5acb87 205
206#endif //ALINEUTRALMESONSELECTION_H
207
208
209