]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/AliCaloPID.h
appropriately modified builders for package and PAR library
[u/mrichter/AliRoot.git] / PWG4 / AliCaloPID.h
CommitLineData
d92b41ad 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/* $Id: $ */
6
7/* History of cvs commits:
8 *
9 * $Log$
10 *
11 *
12 */
13
14//_________________________________________________________________________
15// Class for track/cluster acceptance selection
16// Selection in Central barrel, EMCAL and PHOS
17//
18//*-- Author: Gustavo Conesa (INFN-LNF)
19
20// --- ROOT system ---
21#include <TObject.h>
22class TString ;
23class Riostream ;
24class TLorentzVector ;
25class TFormula ;
26
27//--- AliRoot system ---
28class AliLog ;
29
30class AliCaloPID : public TObject {
31
32public:
33
34 AliCaloPID() ; // ctor
35 AliCaloPID(const AliCaloPID & g) ; // cpy ctor
36 AliCaloPID & operator = (const AliCaloPID & g) ;//cpy assignment
37 virtual ~AliCaloPID() ;//virtual dtor
38
39 enum PidType {
40 kPhoton = 22,
41 kPi0 = 111,
42 kEta = 221,
43 kElectron = 11,
44 kEleCon = -11,
45 kNeutralHadron = 2112,
46 kChargedHadron = 211,
47 kNeutralUnknown = 130,
48 kChargedUnknown=321
49 };
50
51 enum PhotonStatusType {
52 kPromptPhoton=2,
53 kFragmentPhoton=3,
54 kPi0DecayPhoton=4,
55 kEtaDecayPhoton=5,
56 kOtherDecayPhoton=6,
57 kUnknown=7
58 };
59
60 void InitParameters();
61
62 void Print(const Option_t * opt)const;
63
64 Int_t GetPdg(const TString calo, const Double_t * pid, const Float_t energy) const ;
65 Int_t GetPdg(const TString calo, const TLorentzVector mom, const Double_t l0, const Double_t l1, const Double_t disp, const Double_t tof, const Double_t distCPV) const ;
66
67 //Weight getters
68 Float_t GetEMCALPhotonWeight() const { return fEMCALPhotonWeight ; }
69 Float_t GetEMCALPi0Weight() const { return fEMCALPi0Weight ; }
70 Float_t GetEMCALElectronWeight() const { return fEMCALElectronWeight ; }
71 Float_t GetEMCALChargeWeight() const { return fEMCALChargeWeight ; }
72 Float_t GetEMCALNeutralWeight() const { return fEMCALNeutralWeight ; }
73 Float_t GetPHOSPhotonWeight() const { return fPHOSPhotonWeight ; }
74 Float_t GetPHOSPi0Weight() const { return fPHOSPi0Weight ; }
75 Float_t GetPHOSElectronWeight() const { return fPHOSElectronWeight ; }
76 Float_t GetPHOSChargeWeight() const { return fPHOSChargeWeight ; }
77 Float_t GetPHOSNeutralWeight() const { return fPHOSNeutralWeight ; }
78
79 Bool_t IsPHOSPIDWeightFormulaOn() const { return fPHOSWeightFormula ; }
80 TFormula * GetPHOSPhotonWeightFormula() const { return fPHOSPhotonWeightFormula ; }
81 TFormula * GetPHOSPi0WeightFormula() const { return fPHOSPi0WeightFormula ; }
82
83 //Weight setters
84 void SetEMCALPhotonWeight(Float_t w){ fEMCALPhotonWeight = w ; }
85 void SetEMCALPi0Weight(Float_t w){ fEMCALPi0Weight = w ; }
86 void SetEMCALElectronWeight(Float_t w){ fEMCALElectronWeight = w ; }
87 void SetEMCALChargeWeight(Float_t w){ fEMCALChargeWeight = w ; }
88 void SetEMCALNeutralWeight(Float_t w){ fEMCALNeutralWeight = w ; }
89 void SetPHOSPhotonWeight(Float_t w){ fPHOSPhotonWeight = w ; }
90 void SetPHOSPi0Weight(Float_t w){ fPHOSPi0Weight = w ; }
91 void SetPHOSElectronWeight(Float_t w){ fPHOSElectronWeight = w ; }
92 void SetPHOSChargeWeight(Float_t w){ fPHOSChargeWeight = w ; }
93 void SetPHOSNeutralWeight(Float_t w){ fPHOSNeutralWeight = w ; }
94
95 void UsePHOSPIDWeightFormula(Bool_t par) { fPHOSWeightFormula = par; }
96 void SetPHOSPhotonWeightFormula(TFormula * photon) { fPHOSPhotonWeightFormula = photon; }
97 void SetPHOSPi0WeightFormula(TFormula * pi0) { fPHOSPi0WeightFormula = pi0; }
98
99 private:
100
101 Float_t fEMCALPhotonWeight; //Bayesian PID weight for photons in EMCAL
102 Float_t fEMCALPi0Weight; //Bayesian PID weight for pi0 in EMCAL
103 Float_t fEMCALElectronWeight; //Bayesian PID weight for electrons in EMCAL
104 Float_t fEMCALChargeWeight; //Bayesian PID weight for charged hadrons in EMCAL
105 Float_t fEMCALNeutralWeight; //Bayesian PID weight for neutral hadrons in EMCAL
106 Float_t fPHOSPhotonWeight; //Bayesian PID weight for photons in PHOS
107 Float_t fPHOSPi0Weight; //Bayesian PID weight for pi0 in PHOS
108 Float_t fPHOSElectronWeight; //Bayesian PID weight for electrons in PHOS
109 Float_t fPHOSChargeWeight; //Bayesian PID weight for charged hadrons in PHOS
110 Float_t fPHOSNeutralWeight; //Bayesian PID weight for neutral hadrons in PHOS
111
112 Bool_t fPHOSWeightFormula ; //Use parametrized weight threshold, function of energy
113 TFormula * fPHOSPhotonWeightFormula ; //Formula for photon weight
114 TFormula * fPHOSPi0WeightFormula ; //Formula for pi0 weight
115
116
117 ClassDef(AliCaloPID,1)
118} ;
119
120
121#endif //ALICALOPID_H
122
123
124