00001
00002
00003
00004
00005
00006
00007 #ifndef StMuEvent_h
00008 #define StMuEvent_h
00009
00010 #include "TObject.h"
00011 #include "TArrayI.h"
00012 #include "StMuL3EventSummary.h"
00013 #include "StMuEmcCollection.h"
00014 #include "StMuFmsCollection.h"
00015 #include "StMuTriggerIdCollection.h"
00016
00017 #include "StEvent/StEventInfo.h"
00018 #include "StEvent/StRunInfo.h"
00019 #include "StEvent/StEventSummary.h"
00020 #include "StEvent/StVpdTriggerDetector.h"
00021 #include "StEvent/StMtdTriggerDetector.h"
00022 #include "StEvent/StCtbTriggerDetector.h"
00023 #include "StEvent/StZdcTriggerDetector.h"
00024 #include "StEvent/StBbcTriggerDetector.h"
00025 #include "StEvent/StEmcTriggerDetector.h"
00026 #include "StEvent/StFpdTriggerDetector.h"
00027 #include "StEvent/StFmsTriggerDetector.h"
00028 #include "StEvent/StFpdCollection.h"
00029 #include "StEvent/StL0Trigger.h"
00030 #include "StEvent/StTriggerIdCollection.h"
00031 #include "StEvent/StDetectorState.h"
00032
00033 #include "StStrangeMuDstMaker/StStrangeMuDst.hh"
00034
00035
00036 class StEvent;
00037 class StMuCut;
00038 class StTofCollection;
00039 class StTriggerData;
00040
00047 class StMuEvent : public TObject {
00048 public:
00049 StMuEvent();
00050 StMuEvent(const StEvent*);
00051 virtual ~StMuEvent();
00052
00053 int eventId();
00054 int eventNumber();
00055 int runId();
00056 int runNumber();
00057
00058 StRunInfo& runInfo();
00059 StEventInfo& eventInfo();
00060 StEventSummary& eventSummary();
00061 StVpdTriggerDetector& vpdTriggerDetector();
00062 StMtdTriggerDetector& mtdTriggerDetector();
00063 StCtbTriggerDetector& ctbTriggerDetector();
00064 StZdcTriggerDetector& zdcTriggerDetector();
00065 StBbcTriggerDetector& bbcTriggerDetector();
00066 StEmcTriggerDetector& emcTriggerDetector();
00067 StFpdTriggerDetector& fpdTriggerDetector();
00068 StFmsTriggerDetector& fmsTriggerDetector();
00069 StFpdCollection& fpdCollection();
00070 StL0Trigger& l0Trigger();
00071
00072 StMuL3EventSummary& l3EventSummary();
00073 StMuTriggerIdCollection& triggerIdCollection();
00074 const StTriggerData* triggerData() const;
00075
00077 unsigned short refMultPos(int vtx_id = -1);
00079 unsigned short refMultNeg(int vtx_id = -1);
00081 unsigned short refMult(int vtx_id = -1);
00083 unsigned short refMultFtpcEast(int vtx_id = -1);
00085 unsigned short refMultFtpcWest(int vtx_id = -1);
00087 unsigned short refMultFtpc(int vtx_id = -1);
00088 unsigned short grefmult(int vtx_id=-1);
00089 unsigned short btofTrayMultiplicity();
00090 float nearestVertexZ(int vtx_id=-1);
00091
00093 double reactionPlane(unsigned short);
00094 void setReactionPlane(unsigned short, double v);
00096 double reactionPlanePtWgt(unsigned short);
00097 void setReactionPlanePtWgt(unsigned short, double v);
00098 double magneticField();
00099 double zdcAdcAttentuatedSumWest();
00100 double zdcAdcAttentuatedSumEast();
00101 double ctbMultiplicity();
00103 StThreeVectorF primaryVertexPosition(int vtx_id = -1);
00104 StThreeVectorF primaryVertexErrors(int vtx_id = -1);
00105 TArrayI& L2Result();
00106
00107
00108 unsigned int numberOfVpdEastHits();
00109 unsigned int numberOfVpdWestHits();
00110 float vpdTstart();
00111 float vpdTdiff();
00112 float vpdVz();
00113
00114
00115 protected:
00116 void clear();
00117 void fill(const StEvent*);
00118
00119
00120 StRunInfo mRunInfo;
00121 StEventInfo mEventInfo;
00122 StEventSummary mEventSummary;
00123 StVpdTriggerDetector mVpdTriggerDetector;
00124 StMtdTriggerDetector mMtdTriggerDetector;
00125 StCtbTriggerDetector mCtbTriggerDetector;
00126 StZdcTriggerDetector mZdcTriggerDetector;
00127 StBbcTriggerDetector mBbcTriggerDetector;
00128 StEmcTriggerDetector mEmcTriggerDetector;
00129 StFpdTriggerDetector mFpdTriggerDetector;
00130 StFmsTriggerDetector mFmsTriggerDetector;
00131 StFpdCollection mFpdCollection;
00132 StL0Trigger mL0Trigger;
00133
00134 StMuL3EventSummary mL3EventSummary;
00135 StMuTriggerIdCollection mTriggerIdCollection;
00136 StTriggerData* mTriggerData;
00137
00138 UShort_t mRefMultPos;
00139 UShort_t mRefMultNeg;
00140 UShort_t mRefMultFtpcEast;
00141 UShort_t mRefMultFtpcWest;
00142 Float_t mReactionPlane[2];
00143 Float_t mReactionPlanePtWgt[2];
00144
00145 StThreeVectorF mPrimaryVertexError;
00146
00147 TArrayI mL2Result;
00148
00149 UInt_t mVpdEast;
00150 UInt_t mVpdWest;
00151 Float_t mVpdTstart;
00152 Float_t mVpdTdiff;
00153 Float_t mVpdVz;
00154
00155 friend class StMuDst;
00156 friend class StMuDstMaker;
00157 friend class StMuMomentumShiftMaker;
00158 friend class StMuL3EventSummary;
00159 ClassDef(StMuEvent,13)
00160 };
00161
00162 inline int StMuEvent::eventId() { return mEventInfo.id();}
00163 inline int StMuEvent::eventNumber() { return mEventInfo.id();}
00164 inline int StMuEvent::runId() { return mEventInfo.runId();}
00165 inline int StMuEvent::runNumber() { return mEventInfo.runId();}
00166 inline StRunInfo& StMuEvent::runInfo() {return mRunInfo;}
00167 inline StEventInfo& StMuEvent::eventInfo() {return mEventInfo;}
00168 inline StEventSummary& StMuEvent::eventSummary() {return mEventSummary;}
00169 inline StVpdTriggerDetector& StMuEvent::vpdTriggerDetector() {return mVpdTriggerDetector;}
00170 inline StMtdTriggerDetector& StMuEvent::mtdTriggerDetector() {return mMtdTriggerDetector;}
00171 inline StCtbTriggerDetector& StMuEvent::ctbTriggerDetector() {return mCtbTriggerDetector;}
00172 inline StZdcTriggerDetector& StMuEvent::zdcTriggerDetector() {return mZdcTriggerDetector;}
00173 inline StBbcTriggerDetector& StMuEvent::bbcTriggerDetector() {return mBbcTriggerDetector;}
00174 inline StEmcTriggerDetector& StMuEvent::emcTriggerDetector() {return mEmcTriggerDetector;}
00175 inline StFpdTriggerDetector& StMuEvent::fpdTriggerDetector() {return mFpdTriggerDetector;}
00176 inline StFmsTriggerDetector& StMuEvent::fmsTriggerDetector() {return mFmsTriggerDetector;}
00177 inline StFpdCollection& StMuEvent::fpdCollection() {return mFpdCollection;}
00178 inline StL0Trigger& StMuEvent::l0Trigger() {return mL0Trigger;}
00179
00180 inline StMuL3EventSummary& StMuEvent::l3EventSummary() {return mL3EventSummary;}
00181 inline StMuTriggerIdCollection& StMuEvent::triggerIdCollection(){return mTriggerIdCollection;}
00182
00183 inline const StTriggerData* StMuEvent::triggerData() const { return mTriggerData; }
00184 inline double StMuEvent::reactionPlane(unsigned short s) {return (s==0) ? mReactionPlane[0] : mReactionPlane[1];}
00185 inline void StMuEvent::setReactionPlane(unsigned short s, double v) {(s==0) ? mReactionPlane[0]=v : mReactionPlane[1]=v;}
00186 inline double StMuEvent::reactionPlanePtWgt(unsigned short s) {return (s==0) ? mReactionPlanePtWgt[0] : mReactionPlanePtWgt[1];}
00187 inline void StMuEvent::setReactionPlanePtWgt(unsigned short s, double v) {(s==0) ? mReactionPlanePtWgt[0]=v : mReactionPlanePtWgt[1]=v;}
00188 inline double StMuEvent::magneticField() { return mEventSummary.magneticField();}
00189 inline double StMuEvent::zdcAdcAttentuatedSumWest() { return mZdcTriggerDetector.adc(10);}
00190 inline double StMuEvent::zdcAdcAttentuatedSumEast() { return mZdcTriggerDetector.adc(13);}
00191 inline double StMuEvent::ctbMultiplicity() {
00192 double ctb=0;
00193 for (unsigned int slat = 0; slat < mCtbTriggerDetector.numberOfSlats(); slat++) {
00194 for (unsigned int tray = 0; tray < mCtbTriggerDetector.numberOfTrays(); tray++) {
00195 ctb += mCtbTriggerDetector.mips(tray,slat,0);
00196 }
00197 }
00198 return ctb;
00199 }
00200 inline TArrayI &StMuEvent::L2Result() { return mL2Result; }
00201 inline unsigned int StMuEvent::numberOfVpdEastHits() {
00202 unsigned int num = 0;
00203 for(int i=0;i<32;i++) {
00204 num += mVpdEast>>i & 1;
00205 }
00206 return num;
00207 }
00208 inline unsigned int StMuEvent::numberOfVpdWestHits() {
00209 unsigned int num = 0;
00210 for(int i=0;i<32;i++) {
00211 num += mVpdWest>>i & 1;
00212 }
00213 return num;
00214 }
00215 inline float StMuEvent::vpdTstart() { return mVpdTstart; }
00216 inline float StMuEvent::vpdTdiff() { return mVpdTdiff; }
00217 inline float StMuEvent::vpdVz() { return mVpdVz; }
00218 #endif
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325