28 #ifndef StEEmcTreeMaker_H_
29 #define StEEmcTreeMaker_H_
37 #include "StRoot/StTriggerUtilities/StTriggerSimuMaker.h"
66 void Clear(Option_t *opts=
"");
72 enum iostatus_t { READ, WRITE, IGNORE };
75 enum treeTypeEnum_t { PART_1, PART_2, PART_3, PART_4, NUM_TREE_PARTS };
78 void setTreeStatus( treeTypeEnum_t type, iostatus_t iostatus,
const Char_t* fileName );
79 void setMaxNumEvents( Int_t maxNum );
80 void setStartingEvent( Int_t num ){
mNumEvents = num; };
81 void setNumTowerThres( UInt_t num );
88 void doSpinInfoIO( Bool_t doIt = 1 );
89 void doEvtHddrIO( Bool_t doIt = 1 );
90 void doMakePairs( Bool_t doIt = 1 );
92 void setHTTPthres( Double_t ht, Double_t tp );
98 TVector3* getVertex();
99 UInt_t getBbcOnlineTimeDiff();
101 TClonesArray* getHitArray();
103 const TrigSet* getHardwareTriggerSet();
104 const TrigSet* getSoftwareTriggerSet();
106 Int_t getNumPart1EventsWritten()
const;
107 Int_t getNumEEmcClusters()
const;
108 Int_t getNumEEmcHits()
const;
109 Int_t getNumParticleCandidates1()
const;
110 Int_t getNumParticleCandidates2()
const;
112 TIter getEEmcClusterIter();
113 TIter getEEmcHitIter();
114 TIter getEEmcParticleCandidateIter1();
115 TIter getEEmcParticleCandidateIter2();
124 std::string mFilename[ NUM_TREE_PARTS ];
128 TTree *mTree[ NUM_TREE_PARTS ];
149 Double_t mHTthres, mTPthres;
166 TrigSet *mHrdTrigSet, *mSftTrigSet;
167 TClonesArray *mClusArr;
168 TClonesArray *mHitArr;
169 TClonesArray *mParticleArr1;
170 TClonesArray *mParticleArr2;
171 TArrayF *mET0ht, *mET0tp;
180 Int_t openForRead( treeTypeEnum_t type );
181 Int_t openForWrite( treeTypeEnum_t type,
const Char_t *name );
202 inline StSpinInfo_t* StEEmcTreeMaker_t::getSpinInfo(){
return mSpinInfo; };
203 inline EEmcEnergy_t* StEEmcTreeMaker_t::getEEmcEnergy(){
return mEEmcEnergy; };
204 inline TVector3* StEEmcTreeMaker_t::getVertex(){
return mVertex; };
205 inline UInt_t StEEmcTreeMaker_t::getBbcOnlineTimeDiff(){
return mBbcOnlineTimeDiff; };
207 inline TClonesArray* StEEmcTreeMaker_t::getHitArray(){
return mHitArr; };
209 inline Int_t StEEmcTreeMaker_t::getNumEEmcClusters()
const {
return ( mClusArr ? mClusArr->GetEntriesFast() : 0 ); };
210 inline Int_t StEEmcTreeMaker_t::getNumEEmcHits()
const {
return ( mHitArr ? mHitArr->GetEntriesFast() : 0 ); };
211 inline Int_t StEEmcTreeMaker_t::getNumParticleCandidates1()
const {
return ( mParticleArr1 ? mParticleArr1->GetEntriesFast() : 0 ); };
212 inline Int_t StEEmcTreeMaker_t::getNumParticleCandidates2()
const {
return ( mParticleArr2 ? mParticleArr2->GetEntriesFast() : 0 ); };
214 inline TIter StEEmcTreeMaker_t::getEEmcClusterIter(){
return TIter( mClusArr ); };
215 inline TIter StEEmcTreeMaker_t::getEEmcHitIter(){
return TIter( mHitArr ); };
216 inline TIter StEEmcTreeMaker_t::getEEmcParticleCandidateIter1(){
return TIter( mParticleArr1 ); };
217 inline TIter StEEmcTreeMaker_t::getEEmcParticleCandidateIter2(){
return TIter( mParticleArr2 ); };
219 inline void StEEmcTreeMaker_t::setHTTPthres( Double_t ht, Double_t tp ){ mHTthres = ht; mTPthres = tp; };
221 inline Int_t StEEmcTreeMaker_t::getNumPart1EventsWritten()
const {
return mNumPart1EventsWritten; };
223 inline void StEEmcTreeMaker_t::doMakePairs( Bool_t doIt ){
mDoMakePairs = doIt; };
225 inline void StEEmcTreeMaker_t::setNumTowerThres( UInt_t num ){
mNumTowers = num; };
iostatus_t mIOStat[NUM_TREE_PARTS]
filenames
Int_t mMaxNumEvents
max number of events
StEvtHddr * mEventHddr
The data.
StEvtHddr * getEvtHddr()
accessors
TFile * mFile[NUM_TREE_PARTS]
TFiles/TTrees for writing.
UInt_t mNumTowers
thresholds for keeping the event
virtual ~StEEmcTreeMaker_t()
deconstructor
void setTreeStatus(treeTypeEnum_t type, iostatus_t iostatus, const Char_t *fileName)
modifiers
Int_t mNumEvents
number of events processed / written outt
UInt_t mBbcOnlineTimeDiff
BBC time difference.
StEEmcTreeMaker_t(const Char_t *myName)
constructor
void Clear(Option_t *opts="")
Clear for next event.
Bool_t mSpinInfoIO
whether to save various things
TChain * mChain[NUM_TREE_PARTS]
TChains for reading.
TVector3 * mVertex
the following pointers are owned by the class
Int_t Make()
Build an event.
Int_t Finish()
Write everything to file.