39 #include "StHeavyTagMaker.h"
40 #include "tables/St_HeavyTag_Table.h"
43 #include "StMessMgr.h"
44 #include "StEventUtilities/StuRefMult.hh"
47 float largestPairMass(
StEvent*);
48 int countTrackTowerMatches(
StEvent*);
66 StHeavyTagMaker::~StHeavyTagMaker(){
70 Int_t StHeavyTagMaker::Init(){
72 return StMaker::Init();
82 mTagTable =
new HeavyTag_st;
83 mEvent = (
StEvent*) GetInputDS(
"StEvent");
84 if (!mEvent)
return kStOk;
90 St_HeavyTag* heavyTag =
new St_HeavyTag(
"HeavyTag",1);
92 heavyTag->AddAt(mTagTable,0);
100 void StHeavyTagMaker::fillTag() {
106 int tracksGtMass1 = 0;
107 int tracksGtMass2 = 0;
108 int tracksGtMass3 = 0;
116 const_StPrimaryTrackIterator itr;
119 if (mEvent->primaryVertex()){
120 const StSPtrVecPrimaryTrack& tracks = mEvent->primaryVertex()->daughters();
121 for (itr=tracks.begin();itr != tracks.end(); itr++){
123 if (!track)
continue;
124 if (track->flag()<=0)
continue;
125 if (track->fitTraits().numberOfFitPoints(kTpcId)<15)
continue;
127 if (fabs(mom.pseudoRapidity())>1.5)
continue;
128 momentum = mom.mag();
130 if (momentum<mMassThres[0])
continue;
132 if (momentum<mMassThres[1])
continue;
134 if (momentum>mMassThres[2]) ++tracksGtMass3;
140 mTagTable->mNumberOfTracksAboveThres[0] = tracksGtMass1;
141 mTagTable->mNumberOfTracksAboveThres[1] = tracksGtMass2;
142 mTagTable->mNumberOfTracksAboveThres[2] = tracksGtMass3;
143 mTagTable->mNumberOfTrackToTowerMatches = countTrackTowerMatches(mEvent);
144 mTagTable->mLargestPairMass = largestPairMass(mEvent);
147 cout <<
"Heavy Flavor Tags for Run " << mEvent->runId() <<
" Event: " << mEvent->id() << endl;
148 cout <<
"Tracks above m_c : " << mTagTable->mNumberOfTracksAboveThres[0] << endl;
149 cout <<
"Tracks above m_b : " << mTagTable->mNumberOfTracksAboveThres[1] << endl;
150 cout <<
"Tracks above 7GeV : " << mTagTable->mNumberOfTracksAboveThres[2] << endl;
151 cout <<
"Track-Tower Matches " << mTagTable->mNumberOfTrackToTowerMatches << endl;
152 cout <<
"Largest Inv. Mass : " << mTagTable->mLargestPairMass << endl;
158 HeavyTag_st* StHeavyTagMaker::tag()
virtual void AddData(TDataSet *data, const char *dir=".data")
User methods.