14 #ifndef StMuEmcCollection__h
15 #define StMuEmcCollection__h
18 #include "TClonesArray.h"
19 #include "StMuEmcHit.h"
20 #include "StMuEmcCluster.h"
21 #include "StMuEmcPoint.h"
22 #include "StMuEmcTowerData.h"
34 void clear(Option_t *option=
"");
35 virtual void Clear(Option_t *){clear();}
38 int getTowerADC(
int id,
int detector = bemc)
const;
39 StEmcCrateStatus getCrateStatus(
int crate,
int detector = bemc)
const {
if (mTowerData)
return mTowerData->crateStatus(crate,detector);
else return crateUnknown; }
40 int getNSmdHits(
int detector)
const;
41 StMuEmcHit* getSmdHit(
int hitId,
int detector = bsmde);
42 const StMuEmcHit* getSmdHit(
int hitId,
int detector = bsmde)
const;
43 TClonesArray* getPrsHits(
int detector = bprs) {
if (detector==bprs)
return mPrsHits;
else if (detector==eprs)
return mEndcapPrsHits;
else return 0; }
44 const TClonesArray* getPrsHits(
int detector = bprs)
const {
if (detector==bprs)
return mPrsHits;
else if (detector==eprs)
return mEndcapPrsHits;
else return 0; }
45 int getNPrsHits(
int detector = bprs)
const;
46 StMuEmcHit* getPrsHit(
int hitId,
int detector = bprs);
47 const StMuEmcHit* getPrsHit(
int hitId,
int detector = bprs)
const;
48 int getNClusters(
int detector)
const;
50 const StMuEmcCluster* getCluster(
int clusterId,
int detector)
const;
51 int getNPoints()
const;
54 int getNEndcapPoints()
const;
59 int getNEndcapTowerADC()
const {
return 720;}
60 void getEndcapTowerADC(
int ihit,
int &adc,
int &sec,
int &sub,
int & eta)
const ;
62 int getNEndcapPrsHits()
const {
return getNPrsHits(eprs);}
63 StMuEmcHit *getEndcapPrsHit(
int ihit,
int &sec,
int &sub,
int & eta,
int &pre);
64 const StMuEmcHit *getEndcapPrsHit(
int ihit,
int &sec,
int &sub,
int & eta,
int &pre)
const;
66 int getNEndcapSmdHits(
char uv)
const;
67 StMuEmcHit * getEndcapSmdHit(
char uv,
int ihit,
int &sec,
int &strip);
68 const StMuEmcHit * getEndcapSmdHit(
char uv,
int ihit,
int &sec,
int &strip)
const;
70 void setTowerADC(
int,
int,
int detector = bemc);
71 void addSmdHit(
int detector);
72 void addPrsHit(
int detector = bprs);
73 void addCluster(
int detector);
75 void addEndcapPoint();
76 void setPrsArray(
int detector, TClonesArray *cla);
77 void setSmdArray(
int detector, TClonesArray *cla);
79 void setCrateStatus(StEmcCrateStatus status,
int crate,
int detector = bemc) {
if (mTowerData) mTowerData->setCrateStatus(status,crate,detector);}
83 void packbits(
unsigned char*,
unsigned int,
unsigned int,
unsigned int);
84 unsigned int unpackbits(
const unsigned char*,
unsigned int,
unsigned int)
const ;
87 unsigned char mTowerADC[7200];
88 unsigned char mEndcapTowerADC[1080];
91 TClonesArray* mPrsHits;
92 TClonesArray* mSmdHits[2];
93 TClonesArray* mEmcClusters[4];
94 TClonesArray* mEmcPoints;
96 TClonesArray* mEndcapPrsHits;
97 TClonesArray* mEndcapSmdHits[2];
98 TClonesArray* mEndcapEmcClusters[4];
99 TClonesArray* mEndcapEmcPoints;