25 #include "StHighPtTagsMaker.h"
27 #include "StEventTypes.h"
30 #include "PhysicalConstants.h"
31 #include "phys_constants.h"
32 #include "StThreeVector.hh"
43 StHighPtTagsMaker::~StHighPtTagsMaker()
50 Int_t StHighPtTagsMaker::Init()
56 return StMaker::Init();
61 mTagTable =
new HighPtTag_st;
62 mEvent = (
StEvent *) GetInputDS(
"StEvent");
63 if (!mEvent)
return kStOK;
66 St_HighPtTag *HighPtTag =
new St_HighPtTag(
"HighPtTag",1);
68 HighPtTag->AddAt(mTagTable,0);
69 delete mTagTable; mTagTable=0;
74 HighPtTag_st* StHighPtTagsMaker::tag()
79 void StHighPtTagsMaker::fillTag()
82 Float_t mHighPtTrack=0.0;
83 Float_t mMaxRawEtBEMCTower=0.0;
84 Float_t mMaxRawEtEEMCTower=0.0;
87 if (mEvent->primaryVertex()) {
88 StSPtrVecPrimaryTrack& primTracks = mEvent->primaryVertex()->daughters();
89 for(StSPtrVecPrimaryTrackIterator i=primTracks.begin(); i!=primTracks.end(); ++i) {
91 if (!mtrack)
continue;
92 if(mtrack->flag()<=0)
continue;
93 if(mtrack->fitTraits().numberOfFitPoints() < 15)
continue;
95 if(mom.pseudoRapidity() > 1.5)
continue;
96 if(mom.perp() > mHighPtTrack)
97 mHighPtTrack = mom.perp();
105 Int_t bemcModules = bemc->numberOfModules();
106 for(
int i = 0; i < bemcModules; i++) {
108 StSPtrVecEmcRawHit &hits = mod->hits();
109 for(StSPtrVecEmcRawHitIterator it=hits.begin(); it!=hits.end(); ++it) {
110 if(mMaxRawEtBEMCTower < (*it)->energy())
111 mMaxRawEtBEMCTower = (*it)->energy();
116 Int_t eemcModules = eemc->numberOfModules();
117 for(
int i = 0; i < eemcModules; i++) {
119 StSPtrVecEmcRawHit &hits = mod->hits();
120 for(StSPtrVecEmcRawHitIterator it=hits.begin(); it!=hits.end(); ++it) {
121 if(mMaxRawEtEEMCTower < (*it)->energy())
122 mMaxRawEtEEMCTower = (*it)->energy();
128 mTagTable->HighPtTrack = mHighPtTrack;
129 mTagTable->MaxRawEtBEMCTower = mMaxRawEtBEMCTower;
130 mTagTable->MaxRawEtEEMCTower = mMaxRawEtEEMCTower;
133 void StHighPtTagsMaker::printTag(ostream& os)
135 os <<
"--- High Pt Tag Table ---" << endl;
137 os <<
"(empty)" << endl;
139 os <<
"Pt of High Pt Track: " << mTagTable->HighPtTrack << endl;
140 os <<
"Maximum Raw Et of BEMC Towers: " << mTagTable->MaxRawEtBEMCTower << endl;
141 os <<
"Maximum Raw Et of EEMC Towers: " << mTagTable->MaxRawEtEEMCTower << endl;
virtual void AddData(TDataSet *data, const char *dir=".data")
User methods.