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