StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPicoBEmcPidTraits.h
1 
9 #ifndef StPicoBEmcPidTraits_h
10 #define StPicoBEmcPidTraits_h
11 
12 #include <limits>
13 
14 // ROOT headers
15 #include "TObject.h"
16 
17 //_________________
18 class StPicoBEmcPidTraits: public TObject {
19 
20  public:
24  StPicoBEmcPidTraits(Int_t index, Int_t id, Int_t adc0, const Float_t* e,
25  const Float_t* dist, const Int_t* nhit, const Int_t* ntow);
29  virtual ~StPicoBEmcPidTraits();
31  virtual void Print(const Char_t* option = "") const;
32 
33  //
34  // Getters
35  //
36 
38  Int_t trackIndex() const { return (Int_t)mTrackIndex; }
40  Int_t bemcId() const { return (Int_t)mBemcId; }
42  Int_t bemcAdc0() const { return (Int_t)mBemcAdc0; }
44  Float_t bemcE0() const { return (Float_t)mBemcE0 / 1000.; }
46  Float_t bemcE() const { return (Float_t)mBemcE / 1000.; }
48  Float_t bemcZDist() const { return (Float_t)mBemcZDist / 100.; }
50  Float_t bemcPhiDist() const { return (Float_t)mBemcPhiDist / 10000.; }
52  Int_t bemcSmdNEta() const { return (Int_t)mBemcSmdNEta;}
54  Int_t bemcSmdNPhi() const { return (Int_t)mBemcSmdNPhi; }
55 
57  Int_t btowId() const { return (Int_t)mBtowId; }
59  Int_t btowId2() const
60  { return ( ( (Int_t)mBtowId23 / 10 ) == 9 ? -1 : (Int_t)mBtowId23 / 10 ); }
62  Int_t btowId3() const
63  { return ( ( (Int_t)mBtowId23 % 10 ) == 9 ? -1 : (Int_t)mBtowId23 % 10 ); }
65  Float_t btowE() const { return (Float_t)mBtowE / 1000.; }
67  Float_t btowE2() const { return (Float_t)mBtowE2 / 1000.; }
69  Float_t btowE3() const { return (Float_t)mBtowE3 / 1000.; }
71  Float_t btowEtaDist() const { return (Float_t)mBtowEtaDist / 10000.; }
73  Float_t btowPhiDist() const { return (Float_t)mBtowPhiDist / 10000.; }
74 
75  //
76  // Setters
77  //
78 
80  void setTrackIndex(Int_t idx) { mTrackIndex = (idx > std::numeric_limits<short>::max()) ? -1 : (Short_t)idx; }
82  void setBEmcId(Int_t id) { mBemcId = (id > std::numeric_limits<short>::max()) ? -1 : (Short_t)id; }
84  void setAdc0(Int_t adc0)
85  { mBemcAdc0 = (adc0 > std::numeric_limits<unsigned short>::max()) ?
86  std::numeric_limits<unsigned short>::max() : (UShort_t)adc0; }
88  void setEnergy(Float_t energy[5]);
90  void setDistances(Float_t dist[4]);
92  void setNHits(Int_t nhit[2]);
94  void setNTOW(Int_t ntow[3]);
95 
96  private:
97 
99  Short_t mTrackIndex;
100 
103  Short_t mBemcId;
105  Short_t mBemcAdc0;
107  Short_t mBemcE0;
109  Short_t mBemcE;
111  Short_t mBemcZDist;
113  Short_t mBemcPhiDist;
115  UChar_t mBemcSmdNEta;
117  UChar_t mBemcSmdNPhi;
118 
121  Short_t mBtowId;
123  Char_t mBtowId23;
125  Short_t mBtowE;
127  Short_t mBtowE2;
129  Short_t mBtowE3;
131  Short_t mBtowEtaDist;
133  Short_t mBtowPhiDist;
134 
135  ClassDef(StPicoBEmcPidTraits, 1);
136 };
137 
138 #endif
Float_t btowE2() const
Energy of second closest tower.
void setTrackIndex(Int_t idx)
Set track index of the assiciated track.
Float_t bemcE() const
Associated bemc cluster energy (STAR standard clustering algorithm)
Float_t bemcE0() const
Associated bemc cluster highest tower energy (STAR standard clustering algorithm) ...
void setEnergy(Float_t energy[5])
Set energy.
Float_t btowE3() const
Energy of third closest tower.
StPicoBEmcPidTraits()
Default constructor.
Float_t btowEtaDist() const
Eta distance to matched tower (cm)
Int_t bemcAdc0() const
Associated bemc cluster highest tower adc (STAR standard clustering algorithm)
Float_t btowE() const
Matched tower energy.
Int_t bemcSmdNPhi() const
Associated bemc cluster number of fired SMD-phi wires (STAR standard clustering algorithm) ...
Int_t btowId2() const
Track second closest tower local id.
Int_t bemcSmdNEta() const
Associated bemc cluster number of fired SMD-eta wires (STAR standard clustering algorithm) ...
Float_t bemcZDist() const
Associated bemc cluster Z-distance (cm) (STAR standard clustering algorithm)
Int_t btowId() const
Track matched tower id (using StEmcPosition::projTrack())
Keep information about Barrel ElectroMagnetic Calorimeter (BEMC) matched tracks.
Float_t bemcPhiDist() const
Associated bemc cluster phi-distance (cm) (STAR standard clustering algorithm)
Int_t btowId3() const
Track third closest tower local id.
Float_t btowPhiDist() const
Phi distance to matched tower (cm)
void setNHits(Int_t nhit[2])
Set number of hits.
Int_t bemcId() const
Associated BEMC cluster id (STAR standard clustering algorithm)
void setBEmcId(Int_t id)
Set BEMC ID.
void setDistances(Float_t dist[4])
Set distances.
void setAdc0(Int_t adc0)
Set ADC.
Int_t trackIndex() const
Return track index.
virtual void Print(const Char_t *option="") const
Print BEMC PID traits information.
void setNTOW(Int_t ntow[3])
Set IDs of the towers.
virtual ~StPicoBEmcPidTraits()
Destructor.