00001
00002
00003
00004
00005 #ifndef EEmcMCData_h
00006 #define EEmcMCData_h
00007
00008
00009
00010
00011 #include "TObject.h"
00012
00013
00014 class StMaker;
00015
00016 class St_g2t_emc_hit;
00017 class St_g2t_event;
00018
00019 class EEeventDst;
00020 class StMcEventMaker;
00021
00022 const Float_t kEEmcDefaultEnergyThreshold = 0.0005;
00023 const Int_t kEEmcDefaultMCHitSize = 0x1000;
00024
00025
00026 enum EEmcVolId {
00027
00028 kEEmcTowerHalfId = 100000,
00029 kEEmcTowerPhiId = 1000,
00030 kEEmcTowerEtaId = 10,
00031 kEEmcTowerDepId = 1,
00032
00033
00034 kEEmcSmdHalfId = 1000000,
00035 kEEmcSmdPhiId = 10000,
00036 kEEmcSmdPlaneId = 1000,
00037 kEEmcSmdStripId = 1
00038 };
00039
00040
00041 struct EEmcMCHitTower {
00042 UChar_t ssec;
00043 UChar_t eta;
00044 };
00045
00046
00047 struct EEmcMCHit {
00048 UChar_t detector;
00049 UChar_t sector;
00050 union {
00051 EEmcMCHitTower tower;
00052 UShort_t strip;
00053 };
00054 Float_t de;
00055 int track_p;
00056 };
00057
00058
00059
00060 class EEmcMCData : public TObject {
00061 public:
00062 enum MCDepth {
00063 kUnknownDepth = 0,
00064 kPreShower1Depth = 1,
00065 kPreShower2Depth = 2,
00066 kTower1Depth = 3,
00067 kTower2Depth = 4,
00068 kPostShowerDepth = 5
00069 };
00070
00071
00072 enum MCDetectorId {
00073 kEEmcMCUnknownId = 0,
00074 kEEmcMCTowerId = 1,
00075 kEEmcMCPreShower1Id = 2,
00076 kEEmcMCPreShower2Id = 3,
00077 kEEmcMCSmdUStripId = 4,
00078 kEEmcMCSmdVStripId = 5,
00079 kEEmcMCPostShowerId = 6
00080 };
00081
00082
00083 EEmcMCData();
00084 EEmcMCData(const EEmcMCData& );
00085 virtual ~EEmcMCData();
00086
00087 Int_t readEventFromChain(const StMaker *mk);
00088
00089 Int_t getSize() const { return mSize; };
00090 Int_t getLastHit() const { return mLastHit; };
00091 Int_t getEventID() const { return mEventID; };
00092
00093 Float_t getEnergyThreshold() const { return mEthr; };
00094 void setEnergyThreshold(Float_t e) { mEthr = e; };
00095
00096 Int_t getHitArray(EEmcMCHit *h, Int_t size) const;
00097 Int_t setHitArray(EEmcMCHit *h, Int_t size);
00098
00099 void print() const;
00100 void unpackGeantHits(St_g2t_emc_hit* g2t_tile, St_g2t_emc_hit* g2t_smd);
00101 const struct EEmcMCHit * getGeantHits(int &nHit) const { nHit=mLastHit; return mHit;}
00102
00103
00104 Int_t read (void *d, int s);
00105 Int_t write (void *d, int s);
00106 Int_t write (EEeventDst *);
00107
00108 protected:
00109 Int_t mEventID;
00110 struct EEmcMCHit *mHit ;
00111 Int_t mSize;
00112 Int_t mLastHit;
00113 Float_t mEthr;
00114
00115 private:
00116
00117 Int_t expandMemory();
00118
00119 ClassDef(EEmcMCData,2)
00120 };
00121
00122 #endif
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176