StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StJetTower.h
1 // -*- mode: c++ -*-
2 
3 //
4 // Pibero Djawotho <pibero@tamu.edu>
5 // Texas A&M University
6 // 31 August 2009
7 //
8 
9 #ifndef ST_JET_TOWER_H
10 #define ST_JET_TOWER_H
11 
12 #include "StJetElement.h"
13 
14 class StJetTower : public StJetElement {
15 public:
16  StJetTower()
17  : StJetElement()
18  , mAdc(0)
19  , mPedestal(0)
20  , mRms(0)
21  , mStatus(0)
22  {}
23 
24  friend class StjeJetEventTreeWriter;
25  friend class StJetMaker2009;
26  friend class StUEMaker2009;
27 
28  float energy() const { return momentum().Mag(); }
29  short adc() const { return mAdc; }
30  float pedestal() const { return mPedestal; }
31  float rms() const { return mRms; }
32  short status() const { return mStatus; }
33 
34  // ID: 9=BEMC, 13=EEMC
35 
36  // EEMC sector: 1-12
37  short sector() const { return (id()/60)+1; }
38 
39  // EEMC subsector: 1-5
40  short subsector() const { return (id()%60)/12+1; }
41 
42  // EEMC etabin: 1-12
43  short etabin() const { return (id()%60)%12+1; }
44 
45  // EEMC phibin: 1-60
46  short phibin() const { return (sector()-1)*5+subsector(); }
47 
48 private:
49  short mAdc;
50  float mPedestal;
51  float mRms;
52  short mStatus;
53 
54  ClassDef(StJetTower,1);
55 };
56 
57 #endif // ST_JET_TOWER_H