StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEmcShowerShape.h
1 // -*- C++ -*-
2 //
3 // Pibero Djawotho <pibero@indiana.edu>
4 // Indiana University
5 // Jan 26, 2008
6 //
7 
8 #ifndef ST_EEMC_SHOWER_SHAPE_H
9 #define ST_EEMC_SHOWER_SHAPE_H
10 
11 // C++ STL
12 #include <vector>
13 using std::vector;
14 
15 // ROOT
16 #include "TClonesArray.h"
17 #include "TVector3.h"
18 
19 // STAR
20 #include "StMuDSTMaker/COMMON/StMuEmcHit.h"
21 
22 class StEEmcShowerShape : public TObject {
23 public:
27 
28  int runNumber() const;
29  int eventNumber() const;
30  float energy() const;
31  float preshower1() const;
32  float preshower2() const;
33  float postshower() const;
34  int sector() const;
35  int numberOfUstrips() const;
36  int numberOfVstrips() const;
37  StMuEmcHit* uStrip(int i) const;
38  StMuEmcHit* vStrip(int i) const;
39  int highUstripId() const;
40  int highVstripId() const;
41  TVector3 position() const;
42  TVector3 momentum() const;
43 
44  void Clear(Option_t* option = "");
45  void setRunNumber(int runNumber);
46  void setEventNumber(int evenNumber);
47  void setEnergy(float energy);
48  void setPreshower1(float preshower1);
49  void setPreshower2(float preshower2);
50  void setPostshower(float postshower);
51  void setSector(int sector);
52  void addUstrip(StMuEmcHit* strip);
53  void addVstrip(StMuEmcHit* strip);
54  void setHighUstripId(int id);
55  void setHighVstripId(int id);
56  void setPosition(const TVector3& v);
57  void setMomentum(const TVector3& v);
58 
59 private:
60  // Disable assignment operator
61  StEEmcShowerShape& operator=(const StEEmcShowerShape&);
62 
63  int mEventNumber;
64  int mRunNumber;
65  float mEnergy;
66  float mPreshower1;
67  float mPreshower2;
68  float mPostshower;
69  int mSector;
70  TClonesArray* mUstrips;
71  TClonesArray* mVstrips;
72  int mHighUstripId;
73  int mHighVstripId;
74  TVector3 mPosition;
75  TVector3 mMomentum;
76 
77  ClassDef(StEEmcShowerShape, 1);
78 };
79 
80 inline int StEEmcShowerShape::runNumber() const { return mRunNumber; }
81 inline int StEEmcShowerShape::eventNumber() const { return mEventNumber; }
82 inline float StEEmcShowerShape::energy() const { return mEnergy; }
83 inline float StEEmcShowerShape::preshower1() const { return mPreshower1; }
84 inline float StEEmcShowerShape::preshower2() const { return mPreshower2; }
85 inline float StEEmcShowerShape::postshower() const { return mPostshower; }
86 inline int StEEmcShowerShape::sector() const { return mSector; }
87 inline int StEEmcShowerShape::numberOfUstrips() const { return mUstrips->GetEntriesFast(); }
88 inline int StEEmcShowerShape::numberOfVstrips() const { return mVstrips->GetEntriesFast(); }
89 inline StMuEmcHit* StEEmcShowerShape::uStrip(int i) const { return (StMuEmcHit*)mUstrips->At(i); }
90 inline StMuEmcHit* StEEmcShowerShape::vStrip(int i) const { return (StMuEmcHit*)mVstrips->At(i); }
91 inline int StEEmcShowerShape::highUstripId() const { return mHighUstripId; }
92 inline int StEEmcShowerShape::highVstripId() const { return mHighVstripId; }
93 inline TVector3 StEEmcShowerShape::position() const { return mPosition; }
94 inline TVector3 StEEmcShowerShape::momentum() const { return mMomentum; }
95 
96 inline void StEEmcShowerShape::Clear(Option_t* option)
97 {
98  mUstrips->Clear(option);
99  mVstrips->Clear(option);
100 }
101 
102 inline void StEEmcShowerShape::setRunNumber(int runNumber) { mRunNumber = runNumber; }
103 inline void StEEmcShowerShape::setEventNumber(int eventNumber) { mEventNumber = eventNumber; }
104 inline void StEEmcShowerShape::setEnergy(float energy) { mEnergy = energy; }
105 inline void StEEmcShowerShape::setPreshower1(float preshower1) { mPreshower1 = preshower1; }
106 inline void StEEmcShowerShape::setPreshower2(float preshower2) { mPreshower2 = preshower2; }
107 inline void StEEmcShowerShape::setPostshower(float postshower) { mPostshower = postshower; }
108 inline void StEEmcShowerShape::setSector(int sector) { mSector = sector; }
109 inline void StEEmcShowerShape::addUstrip(StMuEmcHit* strip) { new ((*mUstrips)[mUstrips->GetEntriesFast()]) StMuEmcHit(*strip); }
110 inline void StEEmcShowerShape::addVstrip(StMuEmcHit* strip) { new ((*mVstrips)[mVstrips->GetEntriesFast()]) StMuEmcHit(*strip); }
111 inline void StEEmcShowerShape::setHighUstripId(int id) { mHighUstripId = id; }
112 inline void StEEmcShowerShape::setHighVstripId(int id) { mHighVstripId = id; }
113 inline void StEEmcShowerShape::setPosition(const TVector3& v) { mPosition = v; }
114 inline void StEEmcShowerShape::setMomentum(const TVector3& v) { mMomentum = v; }
115 
116 ostream& operator<<(ostream& out, StMuEmcHit& hit);
117 ostream& operator<<(ostream& out, const StEEmcShowerShape&);
118 
119 #endif // ST_EEMC_SHOWER_SHAPE_H