6 #ifndef StMuDstMaker_hh
7 #define StMuDstMaker_hh
11 #ifndef ST_NO_NAMESPACES
17 #include "StIOInterFace.h"
18 #include "St_DataSetIter.h"
20 #include "StMuArrays.h"
22 #include "StMuFilter.h"
23 #include "StMuL3Filter.h"
42 #ifndef __NO_STRANGE_MUDST__
55 #include "StMuEmcCollection.h"
60 #include "StMuFmsCollection.h"
64 #include "StMuRHICfCollection.h"
68 #include "StMuFcsCollection.h"
72 #include "StMuFttCollection.h"
76 #include "StMuFstCollection.h"
80 #include "StMuFwdTrackCollection.h"
83 #include "StMuEpdHitCollection.h"
86 #include "StMuPmdCollection.h"
136 StMuDstMaker(
int mode,
int nameMode,
const char* dirName=
"./",
const char* fileName=
"",
const char* filter=
".",
int maxfiles=10,
137 const char* name=
"MuDst");
142 virtual void Clear(Option_t *option=
"");
144 virtual Int_t MakeRead(
const StUKey &RunEvent);
145 virtual Int_t MakeRead();
146 virtual Int_t MakeWrite();
147 virtual int Finish();
149 void SetStatus(
const char *arrType,
int status);
153 void setTrackFilter(
StMuCut* c);
156 void setL3TrackFilter(
StMuCut* c);
174 void setProbabilityPidFile(
const char* file=NULL);
184 virtual const char *GetFile()
const;
187 void setSplit(
int=99);
189 void setBufferSize(
int=65536*4);
191 void setCompression(
int comp=9);
204 static const char cvs[]=
"Tag $Name: $ $Id: StMuDstMaker.h,v 1.66 2021/05/11 19:40:43 jdb Exp $ built " __DATE__
" " __TIME__ ;
212 void connectEmcCollection();
213 void connectFmsCollection();
214 void connectRHICfCollection();
215 void connectFcsCollection();
216 void connectFttCollection();
217 void connectFstCollection();
218 void connectFwdTrackCollection();
219 void connectPmdCollection();
220 enum ioMode {ioRead, ioWrite};
233 #ifndef __NO_STRANGE_MUDST__
259 TEventList *mEventList;
261 unsigned int mTrackType;
272 string mCurrentFileName;
287 #define saveDelete(t) { delete t; t=0;}
291 virtual void openWrite(
string fileName);
292 virtual void write();
293 virtual void closeWrite();
297 virtual int openRead();
299 void setBranchAddresses();
300 virtual void closeRead();
302 void setBranchAddresses(TChain*);
308 TClonesArray* clonesArray(TClonesArray*& p,
const char* type,
int size,
int& counter);
313 void fillVertices(
StEvent* ev);
316 void fillsttrigger(
StEvent* ev);
325 void fillFwdTrack(
StEvent* ev);
326 #ifndef __NO_STRANGE_MUDST__
332 void fillDetectorStates(
StEvent* ev);
333 void fillL3AlgorithmInfo(
StEvent* ev);
345 template <
class T,
class U>
int addType(TClonesArray* tcaTo , U &u, T *t);
346 template <
class T>
int addType(TClonesArray* tcaFrom, TClonesArray* &tcaTo ,T *t);
347 template <
class T>
int addType(TClonesArray* tcaTo , T &t);
348 void addTrackNode(
const StEvent* ev,
const StTrackNode* node,
StMuCut* cut, TClonesArray* gTCA=0, TClonesArray* pTCA=0, TClonesArray* oTCA=0,
349 TClonesArray* covgTCA=0, TClonesArray* covpTCA=0,
bool l3=
false);
351 TClonesArray* covgTCA=0, TClonesArray* covpTCA=0);
358 #ifndef __NO_STRANGE_MUDST__
362 unsigned int trackType();
364 #ifndef __NO_STRANGE_MUDST__
369 void setTrackType(
unsigned int);
370 void setReadTracks(
bool);
371 #ifndef __NO_STRANGE_MUDST__
372 void setReadV0s(
bool);
373 void setReadXis(
bool);
374 void setReadKinks(
bool);
376 string basename(
string);
377 string dirname(
string);
378 string buildFileName(
string dir,
string fileName,
string extention);
385 TClonesArray* mAArrays [__NALLARRAYS__];
387 #ifndef __NO_STRANGE_MUDST__
388 TClonesArray** mStrangeArrays;
390 TClonesArray** mMCArrays;
391 TClonesArray** mEmcArrays;
392 TClonesArray** mFmsArrays;
393 TClonesArray** mRHICfArrays;
394 TClonesArray** mFcsArrays;
395 TClonesArray** mFttArrays;
396 TClonesArray** mFstArrays;
397 TClonesArray** mFwdTrackArrays;
398 TClonesArray** mPmdArrays;
399 TClonesArray** mTofArrays;
402 TClonesArray** mETofArrays;
403 TClonesArray** mEpdArrays;
404 TClonesArray** mMtdArrays;
405 TClonesArray** mFgtArrays;
406 TClonesArray** mEztArrays;
408 char mStatusArrays [__NALLARRAYS__ ];
409 TClonesArray* mEmcCollectionArray;
417 TClonesArray* mPmdCollectionArray;
432 #ifndef __NO_STRANGE_MUDST__
433 inline void StMuDstMaker::setStStrangeMuDstMaker(
StStrangeMuDstMaker* s) {mStStrangeMuDstMaker=s;}
434 inline StStrangeMuDstMaker* StMuDstMaker::stStrangeMuDstMaker() {
return mStStrangeMuDstMaker;}
436 inline void StMuDstMaker::setTrackType(
unsigned int t) {mTrackType=t;}
437 inline unsigned int StMuDstMaker::trackType() {
return mTrackType;}
439 inline bool StMuDstMaker::readTracks() {
return mReadTracks;}
440 #ifndef __NO_STRANGE_MUDST__
441 inline bool StMuDstMaker::readV0s() {
return mReadV0s;}
442 inline bool StMuDstMaker::readXis() {
return mReadXis;}
443 inline bool StMuDstMaker::readKinks() {
return mReadKinks;}
445 inline void StMuDstMaker::setReadTracks(
bool b) { mReadTracks=b;}
446 #ifndef __NO_STRANGE_MUDST__
447 inline void StMuDstMaker::setReadV0s(
bool b) { mReadV0s=b;}
448 inline void StMuDstMaker::setReadXis(
bool b) { mReadXis=b;}
449 inline void StMuDstMaker::setReadKinks(
bool b) { mReadKinks=b;}
TTree * tree()
Returns pointer to the current TTree, the top level io structure that holds the event, track, v0, etc. information in branches of that tree.
StMuFstUtil * muFstUtil()
return pointer to StMuFstUtil;
StMuEmcUtil * muEmcUtil()
return pointer to StMuEmcUtil;
void setBufferSize(int=65536 *4)
Sets the buffer size for all branches.
void setL3TrackFilter(StMuCut *c)
Set the track filter used for L3 tracks when creating muDsts from StEvent and writing to disk...
virtual const char * GetCVS() const
TClonesArray * mArrays[__NARRAYS__]
the list of TClonesArrays to copy
StMuFcsUtil * muFcsUtil()
return pointer to StMuFcsUtil;
void setTrackFilter(StMuCut *c)
Set the track filter used for all tracks (except the L3 tracks) when creating muDsts from StEvent and...
StMuBTofUtil * mBTofUtil
dongx
TClonesArray ** mBTofArrays
dongx
StMuRHICfUtil * muRHICfUtil()
return pointer to StMuRHICfUtil;
TChain * chain()
In read mode, returns pointer to the chain of .MuDst.root files that where selected.
StMuFttUtil * muFttUtil()
return pointer to StMuFttUtil;
void setCompression(int comp=9)
Sets the compression level for the file and all branches. 0 means no compression, 9 is the higher com...
void setSplit(int=99)
Sets the split level for the file and all branches. Please refer to the ROOT manual (http://root...
StMuFmsUtil * muFmsUtil()
return pointer to StMuFmsUtil;
void SetEventList(TEventList *e)
Set event list for reading only preselected events (generate list using chain()->Draw() ...
StMuFwdTrackUtil * muFwdTrackUtil()
return pointer to StMuFwdTrackUtil;
StMuPmdUtil * muPmdUtil()
return pointer to StMuPmdUtil;