13 #include "SystemOfUnits.h"
14 #include "PhysicalConstants.h"
15 #include "StThreeVectorF.hh"
16 #include "StLorentzVectorF.hh"
19 #include "StMuDSTMaker/COMMON/StMuTrack.h"
22 #include "StJetMuEvent.h"
23 #include "HistMaker.h"
29 cout <<
"HistMaker::HistMaker()"<<endl;
32 HistMaker::~HistMaker()
34 cout <<
"HistMaker::~HistMaker()"<<endl;
40 cout <<
"HistMaker::fill(StJetMuEvent*)"<<endl;
44 cout <<
"StHistMaker::fill(StUpsilonEvent*). ERROR:\t"
45 <<
"null event. Return w/o action"<<endl;
48 typedef vector<StMuTrack*> TrackVec;
51 int n = e->tracks()->GetLast()+1;
53 TClonesArray& tracks = *(e->tracks());
58 for (
int i=0; i<n; ++i) {
61 if (acceptTrack(track)) {
63 if ( (track->
pt()>maxPt) && (isTrigger(track)) ) {
78 cout <<
"\t Accepted "<<vec.size()<<
" tracks of "<<n<<
" possible"<<endl;
83 for (TrackVec::iterator it=vec.begin(); it!=vec.end(); ++it) {
87 double dPhi = triggerP.phi() - p.phi();
88 double dEta = triggerP.pseudoRapidity() - p.pseudoRapidity();
89 mdEtaVsdPhi->Fill(dPhi, dEta);
94 bool HistMaker::isTrigger(
StMuTrack* track)
96 return (track->
pt() >= mCuts.triggerPtCut);
99 bool HistMaker::acceptTrack(
StMuTrack* track)
101 if (track->
flag() >= 0 &&
102 track->
momentum().perp() > mCuts.ptCut &&
103 fabs(track->
momentum().pseudoRapidity()) < mCuts.pseudoRapidityCutOff &&
104 track->
nHitsFit() >= mCuts.minNumberOfFitPoints &&
105 track->
nHits() >= mCuts.minNumberOfPoints) {
Double_t pt() const
Returns pT at point of dca to primary vertex.
UShort_t nHitsFit() const
Return total number of hits used in fit.
short flag() const
Returns flag, (see StEvent manual for type information)
const StThreeVectorF & momentum() const
Returns 3-momentum at dca to primary vertex.
UShort_t nHits() const
Bingchu.