StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMcHitIter.cxx
1 
18 #include "StThreeVectorF.hh"
19 
20 #include "StMcEvent.hh"
21 #include "StMcHitIter.h"
22 #include "StMcTpcHitCollection.hh"
23 #include "StMcFtpcHitCollection.hh"
24 #include "StMcCtbHitCollection.hh"
25 #include "StMcSvtHitCollection.hh"
26 #include "StMcSsdHitCollection.hh"
27 #include "StMcEmcHitCollection.hh"
28 #include "StMcTofHitCollection.hh"
29 #include "StMcBTofHitCollection.hh"
30 #include "StMcMtdHitCollection.hh"
31 #include "StMcPxlHitCollection.hh"
32 #include "StMcIstHitCollection.hh"
33 #include "StMcFgtHitCollection.hh"
34 #include "StMcEtrHitCollection.hh"
35 #include "StMcContainers.hh"
36 #include "StMcHit.hh"
37 
38 class myMcEvent: public StMcEvent {
39 public:
40 int Init(int *myOffset,int *myDetId) {
41  int n=0;
42  myOffset[n]= (char*)&mTpcHits -(char*)this; myDetId[n] = kTpcId; n++;
43  myOffset[n]= (char*)&mSvtHits -(char*)this; myDetId[n] = kSvtId; n++;
44  myOffset[n]= (char*)&mSsdHits -(char*)this; myDetId[n] = kSsdId; n++;
45  myOffset[n]= (char*)&mFtpcHits -(char*)this; myDetId[n] = kFtpcWestId;n++;
46  myOffset[n]= (char*)&mRichHits -(char*)this; myDetId[n] = 0; n++;
47  myOffset[n]= (char*)&mCtbHits -(char*)this; myDetId[n] = kCtbId; n++;
48  myOffset[n]= (char*)&mTofHits -(char*)this; myDetId[n] = 0; n++;
49  myOffset[n]= (char*)&mBTofHits -(char*)this; myDetId[n] = kTofId; n++;
50  myOffset[n]= (char*)&mMtdHits -(char*)this; myDetId[n] = kMtdId; n++;
51  myOffset[n]= (char*)&mPxlHits -(char*)this; myDetId[n] = kPxlId; n++;
52  myOffset[n]= (char*)&mIstHits -(char*)this; myDetId[n] = kIstId; n++;
53  myOffset[n]= (char*)&mFgtHits -(char*)this; myDetId[n] = kFgtId; n++;
54  myOffset[n]= (char*)&mEtrHits -(char*)this; myDetId[n] = kEtrId; n++;
55  return n;
56  }
57 };
58 
59 
60 
61 
62 ClassImp(StMcHitIter);
63 //______________________________________________________________________________
64 StMcHitIter::StMcHitIter(const StMcEvent *mcev)
65 {
66  memset(mDets,0,sizeof(mDets));
67 }
68 //______________________________________________________________________________
69 void StMcHitIter::Reset(const StMcEvent *mcev)
70 {
71  memset(mBeg,0,mEnd-mBeg+1); mMcEv = mcev;
72 }
Event data structure to hold all information from a Monte Carlo simulation. This class is the interfa...
Definition: StMcEvent.hh:169