12 #include "TClonesArray.h"
15 #include "SystemOfUnits.h"
16 #include "PhysicalConstants.h"
17 #include "StThreeVectorF.hh"
18 #include "StLorentzVectorF.hh"
21 #include "StEventTypes.h"
24 #include "StMuDSTMaker/COMMON/StMuDstMaker.h"
25 #include "StMuDSTMaker/COMMON/StMuDst.h"
26 #include "StMuDSTMaker/COMMON/StMuEvent.h"
27 #include "StMuDSTMaker/COMMON/StMuTrack.h"
30 #include "StJetMuEvent.h"
39 StJetMuEvent::~StJetMuEvent()
48 cout <<
"Error, null event. Return False"<<endl;
64 cout <<
"StJetMuEvent::accept(StMuDstMaker*). Error:\t"
65 <<
"Null event. Return false"<<endl;
70 vector<StMuTrack*> vec;
74 for (
int i=0; i<n; ++i) {
77 if (acceptTrack(track)) {
84 cout <<
"\t Accepted "<<vec.size()<<
" tracks of "<<n<<
" possible"<<endl;
87 if (vec.empty()==
false) {
91 for (vector<StMuTrack*>::iterator it=vec.begin(); it!=vec.end(); ++it) {
94 TClonesArray& cArr = *mTracks;
95 new(cArr[mTrackCounter++])
StMuTrack(track);
115 bool StJetMuEvent::acceptTrack(
StMuTrack* track)
117 if (track->
flag() >= 0 &&
118 track->
momentum().perp() > mCuts.ptCut &&
119 fabs(track->
momentum().pseudoRapidity()) < mCuts.pseudoRapidityCutOff &&
120 track->
nHitsFit() >= mCuts.minNumberOfFitPoints &&
121 track->
nHits() >= mCuts.minNumberOfPoints) {
129 void StJetMuEvent::reset()
147 mZdcAdcAttenuatedSumWest=0.;
148 mZdcAdcAttenuatedSumEast=0.;
151 mPrimaryVertexPosition.setX(0.);
152 mPrimaryVertexPosition.setY(0.);
153 mPrimaryVertexPosition.setZ(0.);
159 void StJetMuEvent::fillBasicTypes(
StMuEvent* event)
162 mEventId =
event->eventId();
163 mEventNumber =
event->eventNumber();
164 mRunId =
event->runId();
165 mRunNumber =
event->runNumber();
166 mTriggerWord =
event->l0Trigger().triggerWord();
169 mRefMultPos =
event->refMultPos();
170 mRefMultNeg =
event->refMultNeg();
171 mRefMult =
event->refMult();
173 mMagneticField =
event->magneticField();
174 mZdcAdcAttenuatedSumWest =
event->zdcAdcAttentuatedSumWest();
175 mZdcAdcAttenuatedSumEast =
event->zdcAdcAttentuatedSumEast();
176 mCtbMultiplicity =
event->ctbMultiplicity();
177 mPrimaryVertexPosition =
event->primaryVertexPosition();
UShort_t nHitsFit() const
Return total number of hits used in fit.
short flag() const
Returns flag, (see StEvent manual for type information)
static TObjArray * primaryTracks()
returns pointer to a list of tracks belonging to the selected primary vertex
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)
const StThreeVectorF & momentum() const
Returns 3-momentum at dca to primary vertex.
UShort_t nHits() const
Bingchu.