4 #include "TObjString.h"
6 #include "StMuDSTMaker/COMMON/StMuDst.h"
7 #include "StMuDSTMaker/COMMON/StMuDstMaker.h"
8 #include "StMuDSTMaker/COMMON/StMuEvent.h"
9 #include "StMuDSTMaker/COMMON/StMuPrimaryVertex.h"
11 #include "StGammaEventMaker.h"
12 #include "StGammaEvent.h"
13 #include "StGammaRawMaker.h"
15 #include "StGammaTreeMaker.h"
25 StGammaTreeVersion::StGammaTreeVersion(
const char *name,
const char *title): TNamed(name, title)
31 StGammaTreeVersion::~StGammaTreeVersion()
37 void StGammaTreeVersion::print()
40 cout <<
"-- List of makers --" << endl << endl;
41 for(UInt_t i = 0; i < mMakerTags.size(); i++)
43 cout << Form(
"[%i]: %s", (
int)i, mMakerTags[i].Data()) << endl;
47 cout <<
"-- List of containers --" << endl << endl;
48 for (UInt_t i = 0; i < mStorageTags.size(); i++)
50 cout << Form(
"[%i]: %s", (
int)i, mStorageTags[i].Data()) << endl;
58 StGammaTreeMaker::StGammaTreeMaker(
const char *name):
StMaker(name)
60 mFilename=
"gamma_tree.root";
70 StGammaTreeMaker::~StGammaTreeMaker()
76 Int_t StGammaTreeMaker::Init()
80 if(!mGammaFile) mGammaFile =
new TFile(mFilename,
"RECREATE");
85 TString title =
"Gamma TTree $Id: StGammaTreeMaker.cxx,v 1.12 2015/07/29 19:10:12 smirnovd Exp $ built " __DATE__
" " __TIME__;
86 mGammaTree =
new TTree(
"gammas", title);
87 mGammaTree->SetDirectory(mGammaFile);
94 LOG_DEBUG <<
"Make() - No StGammaEventMaker found!" << endm;
98 mGammaEvent = mGammaEventMaker->event();
99 mGammaTree->Branch(
"GammaEvent", &mGammaEvent, 32000, 99);
100 mGammaTree->BranchRef();
103 mVersion.mStorageTags.push_back( TString(mGammaEvent->GetCVS()) );
104 mVersion.mStorageTags.push_back( TString(mGammaEvent->
newCandidate()->GetCVS()) );
105 mVersion.mStorageTags.push_back( TString(mGammaEvent->
newTower()->GetCVS()) );
106 mVersion.mStorageTags.push_back( TString(mGammaEvent->
newTrack()->GetCVS()) );
107 mVersion.mStorageTags.push_back( TString(mGammaEvent->
newStrip()->GetCVS()) );
108 mVersion.mStorageTags.push_back( TString(mGammaEvent->
candidate(0)->smdFit().GetCVS() ) );
111 mGammaEvent->Clear();
116 return StMaker::Init();
125 mGammaEvent->Clear();
135 if( !GetDataSet(
"MuDst") )
137 LOG_DEBUG <<
"Make() - MuDst not found!" << endm;
167 TString cvstag = GetCVS();
169 TIter next( GetParentChain()->GetMakeList());
170 mVersion.mMakerTags.push_back( cvstag );
173 while( (maker = (
StMaker*)next()) )
175 cvstag = maker->GetCVS();
176 mVersion.mMakerTags.push_back(cvstag);
179 LOG_QA <<
" -- StGammaMaker versioning information follows --" << endm;
virtual void Clear(Option_t *option="")
User defined functions.
Int_t numberOfCandidates() const
Return number of strips.
StGammaTower * newTower()
Add a new track.
StGammaTrack * newTrack(StMuTrack *mutr=0)
Returns tower pT in eta range.
StGammaCandidate * newCandidate()
Add a new SMD strip.
void Clear(Option_t *opts="")
User defined functions.
StGammaStrip * newStrip()
Add a new postshower element.
StGammaCandidate * candidate(Int_t i) const
Return ith strip.