AliPhysics  6cf2591 (6cf2591)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliCaloPID.h
Go to the documentation of this file.
1 #ifndef ALICALOPID_H
2 #define ALICALOPID_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 //_________________________________________________________________________
33 //_________________________________________________________________________
34 
35 // --- ROOT system ---
36 #include <TObject.h>
37 class TString ;
38 class TLorentzVector ;
39 #include <TFormula.h>
40 class TList;
41 class TH2F ;
42 
43 //--- AliRoot system ---
44 class AliVCluster;
45 class AliVCaloCells;
46 class AliAODPWG4Particle;
47 class AliEMCALPIDUtils;
49 class AliVEvent;
50 
51 class AliCaloPID : public TObject {
52 
53  public:
54 
55  AliCaloPID() ; // ctor
56 
57  AliCaloPID(Int_t particleFlux) ;
58 
59  AliCaloPID(const TNamed * emcalpid) ;
60 
61  virtual ~AliCaloPID() ;
62 
63  enum PidType
64  {
65  kPhoton = 22,
66  kPi0 = 111,
67  kEta = 221,
68  kElectron = 11,
69  kEleCon =-11,
70  kNeutralHadron = 2112,
74  };
75 
77 
78  // Main methods
79 
80  void InitParameters();
81 
83 
85 
86  Bool_t IsInM02Range (Float_t m02) const;
90 
91 
93 
94  Int_t GetIdentifiedParticleTypeFromClusterSplitting(AliVCluster * cluster, AliVCaloCells* cells,
95  AliCalorimeterUtils * caloutils,
96  Double_t vertex[3],
97  Int_t & nLocMax, Double_t & mass, Double_t & angle,
98  TLorentzVector & l1 , TLorentzVector & l2,
99  Int_t & absId1, Int_t & absId2,
100  Float_t & distbad1, Float_t & distbad2,
101  Bool_t & fidcut1, Bool_t & fidcut2 ) const;
102 
103  Int_t GetIdentifiedParticleType(AliVCluster * cluster) ;
104 
106 
107  Bool_t IsTrackMatched(AliVCluster * cluster, AliCalorimeterUtils* cu, AliVEvent* event) const ;
108 
109  void SetPIDBits(AliVCluster * cluster, AliAODPWG4Particle *aodph,
110  AliCalorimeterUtils* cu, AliVEvent* event);
111 
112  void Print(const Option_t * opt)const;
113 
114  void PrintClusterPIDWeights(const Double_t * pid) const;
115 
116  Float_t TestPHOSDispersion(Double_t pt, Double_t m20, Double_t m02) const ;
117 
119  Int_t chargeTrack, Double_t mf) const ;
120 
121  // Setters, getters
122 
123  void SetDebug(Int_t deb) { fDebug = deb ; }
124  Int_t GetDebug() const { return fDebug ; }
125 
126  enum eventType { kLow, kHigh } ;
127 
130 
133 
134  // Bayesian
135 
140 
141  AliEMCALPIDUtils * GetEMCALPIDUtils() ;
142 
143  // Weight getters
144 
155 
157 
160  fPHOSPhotonWeightFormula = new TFormula("phos_photon_weight",
162  return fPHOSPhotonWeightFormula ; }
163 
164  TFormula * GetPHOSPi0WeightFormula() {
166  fPHOSPi0WeightFormula = new TFormula("phos_pi0_weight",
168  return fPHOSPi0WeightFormula ; }
169 
172 
173  // Weight setters
174 
185 
189 
190  // PID cuts
191 
194 
197 
198  void SetEMCALDEtaCut(Float_t dcut ) { fEMCALDEtaCut = dcut ; }
199  Float_t GetEMCALDEtaCut() const { return fEMCALDEtaCut ; }
200 
201  void SetEMCALDPhiCut(Float_t dcut ) { fEMCALDPhiCut = dcut ; }
202  Float_t GetEMCALDPhiCut() const { return fEMCALDPhiCut ; }
203 
204  void SetTOFCut(Float_t tcut ) { fTOFCut = tcut ; }
205  Float_t GetTOFCut() const { return fTOFCut ; }
206 
207  void SetPHOSRCut(Float_t rcut ) { fPHOSRCut = rcut ; }
208  Float_t GetPHOSRCut() const { return fPHOSRCut ; }
209 
212 
213  // Cluster splitting analysis
214 
217 
220 
224 
228 
230  { fSplitM02MinCut = min ; fSplitM02MaxCut = max ; }
231 
234 
235  void SetSplitEnergyFractionMinimum(Int_t i, Float_t min){ if (i < 3 && i >=0 ) fSplitEFracMin[i] = min ; }
236  Float_t GetSplitEnergyFractionMinimum(Int_t i) const { if( i < 3 && i >=0 ) return fSplitEFracMin[i] ; else return 0 ; }
237 
238  void SetSubClusterEnergyMinimum (Int_t i, Float_t min){ if (i < 3 && i >=0 ) fSubClusterEMin[i] = min ; }
239  Float_t GetSubClusterEnergyMinimum (Int_t i) const { if( i < 3 && i >=0 ) return fSubClusterEMin[i]; else return 0 ; }
240 
241  Float_t GetPi0MinMass() const { return fMassPi0Min ; } // Simple cut case
242  Float_t GetEtaMinMass() const { return fMassEtaMin ; } // Simple cut case
243  Float_t GetPhotonMinMass() const { return fMassPhoMin ; }
244  Float_t GetPi0MaxMass() const { return fMassPi0Max ; }
245  Float_t GetEtaMaxMass() const { return fMassEtaMax ; }
246  Float_t GetPhotonMaxMass() const { return fMassPhoMax ; }
247 
249 
251 
253  { if(iparam < 6 ) fMassPi0Param[inlm][iparam] = param ; }
254 
256  { if(iparam < 6 ) fWidthPi0Param[inlm][iparam] = param ; }
257 
259  { if(iparam < 5 && inlm < 2) fM02MaxParam[inlm][iparam] = param ; }
260 
262 
264  { if(iparam < 5 && inlm < 2) fM02MinParam[inlm][iparam] = param ; }
265 
267  { if(iparam < 4 && inlm < 2) fAsyMinParam[inlm][iparam] = param ; }
268 
269  void SetPi0MassRange(Float_t min, Float_t max) { fMassPi0Min = min ; fMassPi0Max = max ; } // Simple case
270  void SetEtaMassRange(Float_t min, Float_t max) { fMassEtaMin = min ; fMassEtaMax = max ; }
271  void SetPhotonMassRange(Float_t min, Float_t max) { fMassPhoMin = min ; fMassPhoMax = max ; }
272 
273 private:
274 
277 
278  // Bayesian
279 
280  AliEMCALPIDUtils * fEMCALPIDUtils;
283 
294 
300 
301  // PID calculation
302 
307 
309 
312 
313  // Cluster splitting mass ranges
314 
339 
341  AliCaloPID & operator = (const AliCaloPID & cpid) ;
342 
344  AliCaloPID( const AliCaloPID & cpid) ;
345 
347  ClassDef(AliCaloPID,22) ;
349 
350 } ;
351 
352 
353 #endif //ALICALOPID_H
354 
355 
356 
void SetPHOSPi0Weight(Float_t w)
Definition: AliCaloPID.h:181
Int_t GetDebug() const
Definition: AliCaloPID.h:124
TString fPHOSPhotonWeightFormulaExpression
Photon weight formula in string.
Definition: AliCaloPID.h:298
Float_t GetSplitEnergyFractionMinimum(Int_t i) const
Definition: AliCaloPID.h:236
Bool_t IsInEtaM02Range(Float_t energy, Float_t m02, Int_t nlm) const
Definition: AliCaloPID.cxx:460
void SetM02MaximumShiftForNLMN(Int_t shift)
Definition: AliCaloPID.h:261
Float_t fTOFCut
Cut on TOF, used in PID evaluation.
Definition: AliCaloPID.h:308
void SetTOFCut(Float_t tcut)
Definition: AliCaloPID.h:204
Float_t fMassPhoMin
Min Photon mass.
Definition: AliCaloPID.h:326
TFormula * GetPHOSPi0WeightFormula()
Definition: AliCaloPID.h:164
double Double_t
Definition: External.C:58
Float_t fPHOSNeutralWeight
Bayesian PID weight for neutral hadrons in PHOS.
Definition: AliCaloPID.h:293
Bool_t fUseBayesianWeights
Select clusters based on weights calculated in reconstruction.
Definition: AliCaloPID.h:281
Bool_t IsInPi0SplitAsymmetryRange(Float_t energy, Float_t asy, Int_t nlm) const
Definition: AliCaloPID.cxx:321
Float_t fMassPhoMax
Min Photon mass.
Definition: AliCaloPID.h:327
Definition: External.C:236
Float_t GetPi0MinMass() const
Definition: AliCaloPID.h:241
Float_t fMassPi0Max
Min Pi0 mass, simple cut case.
Definition: AliCaloPID.h:325
void SetSplitWidthSigma(Float_t s)
Definition: AliCaloPID.h:248
void SwitchOnBayesianRecalculation()
Definition: AliCaloPID.h:138
Float_t fEMCALElectronWeight
Bayesian PID weight for electrons in EMCAL.
Definition: AliCaloPID.h:286
void SetClusterSplittingM02Cut(Float_t min=0, Float_t max=100)
Definition: AliCaloPID.h:229
Float_t GetEMCALLambda0CutMax() const
Definition: AliCaloPID.h:193
Float_t GetEMCALDPhiCut() const
Definition: AliCaloPID.h:202
void SwitchOnSplitShowerShapeCut()
Definition: AliCaloPID.h:225
virtual ~AliCaloPID()
Definition: AliCaloPID.cxx:154
Float_t GetEMCALPi0Weight() const
Definition: AliCaloPID.h:146
Float_t fPHOSPhotonWeight
Bayesian PID weight for photons in PHOS.
Definition: AliCaloPID.h:289
void SwitchOffSplitShowerShapeCut()
Definition: AliCaloPID.h:226
void SetClusterSplittingMinNCells(Int_t c)
Definition: AliCaloPID.h:232
Float_t fSplitEFracMin[3]
Definition: AliCaloPID.h:334
Float_t fM02MaxParamShiftNLMN
shift of max M02 for NLM>2.
Definition: AliCaloPID.h:332
Float_t fWidthPi0Param[2][6]
Width param, 2 regions in energy.
Definition: AliCaloPID.h:329
Double_t mass
energy
Definition: HFPtSpectrum.C:44
Bool_t fUseSplitAsyCut
Remove splitted clusters with too large asymmetry.
Definition: AliCaloPID.h:317
Float_t GetPHOSPhotonWeight() const
Definition: AliCaloPID.h:150
Float_t fEMCALPi0Weight
Bayesian PID weight for pi0 in EMCAL.
Definition: AliCaloPID.h:285
Float_t GetPhotonMaxMass() const
Definition: AliCaloPID.h:246
Float_t GetEMCALPhotonWeight() const
Definition: AliCaloPID.h:145
TString GetPHOSPi0WeightFormulaExpression() const
Definition: AliCaloPID.h:171
Float_t fEMCALPhotonWeight
Bayesian PID weight for photons in EMCAL.
Definition: AliCaloPID.h:284
Float_t fSubClusterEMin[3]
Do not use sub-clusters with too low energy depeding on NLM.
Definition: AliCaloPID.h:336
Float_t GetPHOSChargeWeight() const
Definition: AliCaloPID.h:153
Float_t fMassEtaMax
Max Eta mass.
Definition: AliCaloPID.h:323
TCanvas * c
Definition: TestFitELoss.C:172
Float_t GetEMCALElectronWeight() const
Definition: AliCaloPID.h:147
void SwitchOffSplitAsymmetryCut()
Definition: AliCaloPID.h:222
Bool_t IsPHOSPIDWeightFormulaOn() const
Definition: AliCaloPID.h:156
void SetPHOSPi0WeightFormulaExpression(TString pi)
Definition: AliCaloPID.h:188
TString fPHOSPi0WeightFormulaExpression
Pi0 weight formula in string.
Definition: AliCaloPID.h:299
TFormula * GetPHOSPhotonWeightFormula()
Definition: AliCaloPID.h:158
Float_t fEMCALDEtaCut
Track matching cut on Dz.
Definition: AliCaloPID.h:305
void SetPi0MassSelectionParameters(Int_t inlm, Int_t iparam, Float_t param)
Definition: AliCaloPID.h:252
void SetPHOSElectronWeight(Float_t w)
Definition: AliCaloPID.h:182
void SetHighParticleFlux()
Not really used, only for bayesian recalculation in EMCAL, but could be useful in future...
Definition: AliCaloPID.h:132
void SwitchOnBayesian()
Definition: AliCaloPID.h:136
void UsePHOSPIDWeightFormula(Bool_t ok)
Definition: AliCaloPID.h:186
AliCaloPID & operator=(const AliCaloPID &cpid)
Copy constructor not implemented.
Float_t fMassPi0Min
Min Pi0 mass, simple cut case.
Definition: AliCaloPID.h:324
void SetPHOSChargeWeight(Float_t w)
Definition: AliCaloPID.h:183
Float_t GetPi0MaxMass() const
Definition: AliCaloPID.h:244
Float_t fPHOSChargeWeight
Bayesian PID weight for charged hadrons in PHOS.
Definition: AliCaloPID.h:292
Float_t GetPHOSRCut() const
Definition: AliCaloPID.h:208
Float_t fMassPi0Param[2][6]
Mean mass param, 2 regions in energy.
Definition: AliCaloPID.h:328
TString GetPIDParametersList()
Put data member values in string to keep in output container.
Definition: AliCaloPID.cxx:892
void SetPHOSRCut(Float_t rcut)
Definition: AliCaloPID.h:207
void SetEMCALDPhiCut(Float_t dcut)
Definition: AliCaloPID.h:201
void SetM02MaximumSelectionParameters(Int_t inlm, Int_t iparam, Float_t param)
Definition: AliCaloPID.h:258
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
Definition: AliCaloPID.cxx:967
Float_t fM02MaxParam[2][5]
5 param for expo + pol fit on M02 maximum for pi0 selection.
Definition: AliCaloPID.h:331
Float_t GetEMCALDEtaCut() const
Definition: AliCaloPID.h:199
void SetEMCALElectronWeight(Float_t w)
Definition: AliCaloPID.h:177
Bool_t fRecalculateBayesian
Recalculate PID bayesian or use simple PID?
Definition: AliCaloPID.h:282
Float_t GetEMCALNeutralWeight() const
Definition: AliCaloPID.h:149
Float_t GetPHOSElectronWeight() const
Definition: AliCaloPID.h:152
int Int_t
Definition: External.C:63
Float_t fSplitWidthSigma
Cut on mass+-width*fSplitWidthSigma.
Definition: AliCaloPID.h:337
void SetLowParticleFlux()
Not really used, only for bayesian recalculation in EMCAL, but could be useful in future...
Definition: AliCaloPID.h:129
Int_t fDebug
Debug level.
Definition: AliCaloPID.h:275
void SwitchOnSplitAsymmetryCut()
Definition: AliCaloPID.h:221
void SetSplitEnergyFractionMinimum(Int_t i, Float_t min)
Definition: AliCaloPID.h:235
float Float_t
Definition: External.C:68
void SetPi0MassShiftHighECell(Float_t s)
Definition: AliCaloPID.h:250
Bool_t IsInPi0M02Range(Float_t energy, Float_t m02, Int_t nlm) const
Definition: AliCaloPID.cxx:412
void SwitchOffSimpleSplitMassCut()
Definition: AliCaloPID.h:216
void SetEMCALNeutralWeight(Float_t w)
Definition: AliCaloPID.h:179
void SwitchOffBayesian()
Definition: AliCaloPID.h:137
Float_t fSplitM02MaxCut
Study clusters with l0 smaller than cut.
Definition: AliCaloPID.h:319
void SetEMCALPi0Weight(Float_t w)
Definition: AliCaloPID.h:176
Float_t TestPHOSDispersion(Double_t pt, Double_t m20, Double_t m02) const
Bool_t fPHOSWeightFormula
Use parametrized weight threshold, function of energy.
Definition: AliCaloPID.h:295
Int_t GetClusterSplittingMinNCells() const
Definition: AliCaloPID.h:233
Float_t GetPHOSPi0Weight() const
Definition: AliCaloPID.h:151
Float_t TestPHOSChargedVeto(Double_t dx, Double_t dz, Double_t ptTrack, Int_t chargeTrack, Double_t mf) const
void SwitchOffSimpleSplitM02Cut()
Definition: AliCaloPID.h:219
void SetPIDBits(AliVCluster *cluster, AliAODPWG4Particle *aodph, AliCalorimeterUtils *cu, AliVEvent *event)
Set Bits for PID selection.
void SwitchOnSimpleSplitMassCut()
Definition: AliCaloPID.h:215
Float_t fEMCALNeutralWeight
Bayesian PID weight for neutral hadrons in EMCAL.
Definition: AliCaloPID.h:288
Float_t fPHOSRCut
Track-Cluster distance cut for track matching in PHOS.
Definition: AliCaloPID.h:311
void SetPHOSPhotonWeightFormulaExpression(TString ph)
Definition: AliCaloPID.h:187
Float_t GetPHOSNeutralWeight() const
Definition: AliCaloPID.h:154
Int_t GetIdentifiedParticleType(AliVCluster *cluster)
Definition: AliCaloPID.cxx:554
void SetEtaMassRange(Float_t min, Float_t max)
Definition: AliCaloPID.h:270
void SwitchOffBayesianRecalculation()
Definition: AliCaloPID.h:139
Bool_t fUseSplitSSCut
Remove splitted clusters out of shower shape band.
Definition: AliCaloPID.h:318
void SetPi0MassRange(Float_t min, Float_t max)
Definition: AliCaloPID.h:269
void SetEMCALLambda0CutMax(Float_t lcut)
Definition: AliCaloPID.h:192
TString GetPHOSPhotonWeightFormulaExpression() const
Definition: AliCaloPID.h:170
Float_t GetEtaMinMass() const
Definition: AliCaloPID.h:242
Float_t fMassShiftHighECell
Shift cuts 5 MeV for Ecell > 150 MeV, default Ecell > 50 MeV.
Definition: AliCaloPID.h:338
Float_t GetTOFCut() const
Definition: AliCaloPID.h:205
Float_t GetEMCALChargeWeight() const
Definition: AliCaloPID.h:148
void SetPHOSDispersionCut(Float_t dcut)
Definition: AliCaloPID.h:210
Bool_t IsInPi0SplitMassRange(Float_t energy, Float_t mass, Int_t nlm) const
Definition: AliCaloPID.cxx:352
Float_t fPHOSElectronWeight
Bayesian PID weight for electrons in PHOS.
Definition: AliCaloPID.h:291
void SetPHOSPhotonWeight(Float_t w)
Definition: AliCaloPID.h:180
Float_t fEMCALDPhiCut
Track matching cut on Dx.
Definition: AliCaloPID.h:306
Float_t fEMCALL0CutMax
Max Cut on shower shape lambda0, used in PID evaluation, only EMCAL.
Definition: AliCaloPID.h:303
Int_t GetIdentifiedParticleTypeFromClusterSplitting(AliVCluster *cluster, AliVCaloCells *cells, AliCalorimeterUtils *caloutils, Double_t vertex[3], Int_t &nLocMax, Double_t &mass, Double_t &angle, TLorentzVector &l1, TLorentzVector &l2, Int_t &absId1, Int_t &absId2, Float_t &distbad1, Float_t &distbad2, Bool_t &fidcut1, Bool_t &fidcut2) const
Definition: AliCaloPID.cxx:698
TFormula * fPHOSPhotonWeightFormula
Formula for photon weight.
Definition: AliCaloPID.h:296
Bool_t IsInConM02Range(Float_t energy, Float_t m02, Int_t nlm) const
Definition: AliCaloPID.cxx:515
Float_t fPHOSDispersionCut
Shower shape elipse radious cut.
Definition: AliCaloPID.h:310
Bool_t IsSplitShowerShapeCutOn()
Definition: AliCaloPID.h:227
void SetEMCALChargeWeight(Float_t w)
Definition: AliCaloPID.h:178
Int_t GetIdentifiedParticleTypeFromBayesWeights(Bool_t isEMCAL, Double_t *pid, Float_t energy)
Definition: AliCaloPID.cxx:611
void SetPi0WidthSelectionParameters(Int_t inlm, Int_t iparam, Float_t param)
Definition: AliCaloPID.h:255
Float_t GetEtaMaxMass() const
Definition: AliCaloPID.h:245
Float_t GetPhotonMinMass() const
Definition: AliCaloPID.h:243
void SetAsymmetryMinimumSelectionParameters(Int_t inlm, Int_t iparam, Float_t param)
Definition: AliCaloPID.h:266
const char Option_t
Definition: External.C:48
void SetPHOSNeutralWeight(Float_t w)
Definition: AliCaloPID.h:184
Bool_t fUseSimpleM02Cut
Use simple min-max M02 cut.
Definition: AliCaloPID.h:316
void SetEMCALPhotonWeight(Float_t w)
Definition: AliCaloPID.h:175
Class for PID selection with calorimeters.
Definition: AliCaloPID.h:51
const Double_t pi
Float_t fEMCALL0CutMin
Min Cut on shower shape lambda0, used in PID evaluation, only EMCAL.
Definition: AliCaloPID.h:304
AliEMCALPIDUtils * GetEMCALPIDUtils()
Definition: AliCaloPID.cxx:542
Float_t fMassEtaMin
Min Eta mass.
Definition: AliCaloPID.h:322
bool Bool_t
Definition: External.C:53
void SetDebug(Int_t deb)
Definition: AliCaloPID.h:123
Class with utils specific to calorimeter clusters/cells.
Float_t GetSubClusterEnergyMinimum(Int_t i) const
Definition: AliCaloPID.h:239
Float_t fEMCALChargeWeight
Bayesian PID weight for charged hadrons in EMCAL.
Definition: AliCaloPID.h:287
AliEMCALPIDUtils * fEMCALPIDUtils
Pointer to EMCALPID to redo the PID Bayesian calculation.
Definition: AliCaloPID.h:280
void InitParameters()
Definition: AliCaloPID.cxx:164
Float_t GetEMCALLambda0CutMin() const
Definition: AliCaloPID.h:196
void SetEMCALLambda0CutMin(Float_t lcut)
Definition: AliCaloPID.h:195
Int_t fParticleFlux
Particle flux for setting PID parameters.
Definition: AliCaloPID.h:276
Float_t fM02MinParam[2][5]
5 param for expo + pol fit on M02 minimum for pi0 selection (maximum for conversions).
Definition: AliCaloPID.h:330
void PrintClusterPIDWeights(const Double_t *pid) const
Bool_t fUseSimpleMassCut
Use simple min-max pi0 mass cut.
Definition: AliCaloPID.h:315
void SetSubClusterEnergyMinimum(Int_t i, Float_t min)
Definition: AliCaloPID.h:238
Bool_t IsSplitAsymmetryCutOn()
Definition: AliCaloPID.h:223
void SetEMCALDEtaCut(Float_t dcut)
Definition: AliCaloPID.h:198
Float_t GetPHOSDispersionCut() const
Definition: AliCaloPID.h:211
void SetPhotonMassRange(Float_t min, Float_t max)
Definition: AliCaloPID.h:271
Float_t fPHOSPi0Weight
Bayesian PID weight for pi0 in PHOS.
Definition: AliCaloPID.h:290
TFormula * fPHOSPi0WeightFormula
Formula for pi0 weight.
Definition: AliCaloPID.h:297
Bool_t IsInM02Range(Float_t m02) const
Definition: AliCaloPID.cxx:396
Int_t fSplitMinNCells
Study clusters with ncells larger than cut.
Definition: AliCaloPID.h:321
void SetM02MinimumSelectionParameters(Int_t inlm, Int_t iparam, Float_t param)
Definition: AliCaloPID.h:263
Bool_t IsTrackMatched(AliVCluster *cluster, AliCalorimeterUtils *cu, AliVEvent *event) const
Float_t fSplitM02MinCut
Study clusters with l0 larger than cut, simple case.
Definition: AliCaloPID.h:320
Float_t fAsyMinParam[2][4]
4 param for fit on asymmetry minimum, for 2 cases, NLM=1 and NLM>=2.
Definition: AliCaloPID.h:333
void SwitchOnSimpleSplitM02Cut()
Definition: AliCaloPID.h:218