making the container name parameterized
[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 ;
21class TString ;
1c5acb87 22
23class AliNeutralMesonSelection : public TObject {
477d6cee 24
25 public:
477d6cee 26 AliNeutralMesonSelection() ; // default ctor
9542ac75 27 virtual ~AliNeutralMesonSelection() { ; } //virtual dtor
c5693f62 28
a5fb4114 29 // General
9542ac75 30
a5fb4114 31 TList * GetCreateOutputObjects();
9542ac75 32
a5fb4114 33 void InitParameters();
9542ac75 34
a5fb4114 35 void Print(const Option_t * opt) const;
78219bac 36
9542ac75 37 Bool_t AreNeutralMesonSelectionHistosKept() const { return fKeepNeutralMesonHistos ; }
38 void KeepNeutralMesonSelectionHistos(Bool_t keep) { fKeepNeutralMesonHistos = keep ; }
39
3bfcb597 40 Bool_t SelectPair(TLorentzVector particlei, TLorentzVector particlej, TString calo) ;
41
42 void SetParticle(TString particleName) ; // Do some default settings for "Pi0" or "Eta"
9542ac75 43
44 // Asymmetry selection
45
46 Float_t GetAsymmetryCut() const { return fAsymmetryCut ; }
47 void SetAsymmetryCut(Float_t asy) { fAsymmetryCut = asy ; }
48
49 void SwitchOnAsymmetryCut() { fUseAsymmetryCut = kTRUE ; }
50 void SwitchOffAsymmetryCut() { fUseAsymmetryCut = kFALSE ; }
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
7287751b 57 void SetShiftMinAngleCut(Float_t a, Float_t b) { fShiftMinAngle[0] = a ;
58 fShiftMinAngle[1] = b ; }
a5fb4114 59
60 void SwitchOnAngleSelection() { fUseAngleCut = kTRUE ; }
61 void SwitchOffAngleSelection() { fUseAngleCut = kFALSE ; }
9542ac75 62
63 Bool_t IsAngleInWindow(const Float_t angle, const 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 ; }
3bfcb597 85
477d6cee 86 //Histogrammes setters and getters
87
88 virtual void SetHistoERangeAndNBins(Float_t min, Float_t max, Int_t n) {
89 fHistoNEBins = n ;
90 fHistoEMax = max ;
91 fHistoEMin = min ;
92 }
93
a5fb4114 94 Int_t GetHistoNEBins() const { return fHistoNEBins ; }
95 Float_t GetHistoEMin() const { return fHistoEMin ; }
96 Float_t GetHistoEMax() const { return fHistoEMax ; }
3bfcb597 97
477d6cee 98 virtual void SetHistoAngleRangeAndNBins(Float_t min, Float_t max, Int_t n) {
99 fHistoNAngleBins = n ;
100 fHistoAngleMax = max ;
101 fHistoAngleMin = min ;
102 }
103
104 Int_t GetHistoNAngleBins() const { return fHistoNAngleBins ; }
a5fb4114 105 Float_t GetHistoAngleMin() const { return fHistoAngleMin ; }
106 Float_t GetHistoAngleMax() const { return fHistoAngleMax ; }
477d6cee 107
108 virtual void SetHistoIMRangeAndNBins(Float_t min, Float_t max, Int_t n) {
109 fHistoNIMBins = n ;
110 fHistoIMMax = max ;
111 fHistoIMMin = min ;
112 }
113
a5fb4114 114 Int_t GetHistoNIMBins() const { return fHistoNIMBins ; }
115 Float_t GetHistoIMMin() const { return fHistoIMMin ; }
116 Float_t GetHistoIMMax() const { return fHistoIMMax ; }
477d6cee 117
118
119 private:
9542ac75 120
121 Float_t fAsymmetryCut ; // Asymmetry cut
122 Bool_t fUseAsymmetryCut; // Use the asymmetry cut
3f150b4b 123
9542ac75 124 Double_t fM ; // Mass of the neutral meson
125 Double_t fInvMassMaxCut ; // Invariant Mass cut maximum
126 Double_t fInvMassMinCut ; // Invariant Masscut minimun
3bfcb597 127 Double_t fInvMassMaxCutParam[3]; // Variable invariant mass max cut, for pi0 in EMCAL
9542ac75 128
3f150b4b 129 Double_t fLeftBandMinCut ; // Side Band selection, min left band cut
130 Double_t fLeftBandMaxCut ; // Side Band selection, max left band cut
131 Double_t fRightBandMinCut ; // Side Band selection, min right band cut
132 Double_t fRightBandMaxCut ; // Side Band selection, max right band cut
133
9542ac75 134 TArrayD fAngleMaxParam ; // Max opening angle selection parameters
135 Bool_t fUseAngleCut ; // Select pairs depending on their opening angle
7287751b 136 Float_t fShiftMinAngle[2] ; // Correction shift for min angle from true kinematic limit, resolution effects
9542ac75 137
138 Bool_t fKeepNeutralMesonHistos ; // Keep neutral meson selection histograms
3f150b4b 139 TString fParticle ; // neutral meson name (Pi0, Eta, +SideBand)
3bfcb597 140
477d6cee 141 //Histograms
9542ac75 142 TH2F * fhAnglePairNoCut ; //! Aperture angle of decay photons, no cuts
143 TH2F * fhAnglePairOpeningAngleCut ; //! Aperture angle of decay photons, cut on opening angle
144 TH2F * fhAnglePairAsymmetryCut ; //! Aperture angle of decay photons, asymmetry cut
145 TH2F * fhAnglePairAllCut ; //! Aperture angle of decay photons, all cuts
146
147 TH2F * fhInvMassPairNoCut ; //! Invariant mass of decay photons, no cuts
148 TH2F * fhInvMassPairOpeningAngleCut ; //! Invariant mass of decay photons, cut on opening angle
149 TH2F * fhInvMassPairAsymmetryCut ; //! Invariant mass of decay photons, asymmetry cut
150 TH2F * fhInvMassPairAllCut ; //! Invariant mass of decay photons, all cuts
151
152 TH2F * fhAsymmetryNoCut ; //! Asymmetry of decay photons, no cuts
153 TH2F * fhAsymmetryOpeningAngleCut ; //! Asymmetry of decay photons, cut on opening angle
154 TH2F * fhAsymmetryAllCut ; //! Asymmetry of decay photons, all cuts
477d6cee 155
156 //Histograms binning and range
9542ac75 157 Int_t fHistoNEBins ; // Number of bins in pi0 E axis
158 Float_t fHistoEMax ; // Maximum value of pi0 E histogram range
159 Float_t fHistoEMin ; // Minimum value of pi0 E histogram range
160
9542ac75 161 Int_t fHistoNAngleBins ; // Number of bins in angle axis
162 Float_t fHistoAngleMax ; // Maximum value of angle histogram range
163 Float_t fHistoAngleMin ; // Minimum value of angle histogram range
164
165 Int_t fHistoNIMBins ; // Number of bins in Invariant Mass axis
166 Float_t fHistoIMMax ; // Maximum value of Invariant Mass histogram range
c5693f62 167 Float_t fHistoIMMin ; // Minimum value of Invariant Mass histogram range
168
b960c7eb 169 AliNeutralMesonSelection( const AliNeutralMesonSelection & g) ; // cpy ctor
c5693f62 170 AliNeutralMesonSelection & operator = (const AliNeutralMesonSelection & g) ; // cpy assignment
9542ac75 171
3f150b4b 172 ClassDef(AliNeutralMesonSelection,7)
1c5acb87 173
9542ac75 174} ;
1c5acb87 175
176#endif //ALINEUTRALMESONSELECTION_H
177
178
179