6 #ifndef StMuDstMaker_hh
7 #define StMuDstMaker_hh
11 #ifndef ST_NO_NAMESPACES
17 #include "StIOInterFace.h"
18 #include "St_DataSetIter.h"
22 #include "StMuFilter.h"
23 #include "StMuL3Filter.h"
35 class StDetectorState;
36 class StL3AlgorithmInfo;
38 class StuProbabilityPidAlgorithm;
42 #ifndef __NO_STRANGE_MUDST__
43 class StStrangeEvMuDst;
45 class StStrangeMuDstMaker;
55 #include "StMuEmcCollection.h"
64 #include "StMuPmdCollection.h"
69 class StMuTofHitCollection;
70 class StTofCollection;
71 class StTofDataCollection;
73 class StTofRawDataCollection;
76 class StBTofCollection;
77 class StBTofRawHitCollection;
79 class StMuBTofHitCollection;
91 class StMuRpsCollection;
92 class StMuMtdCollection;
114 StMuDstMaker(
int mode,
int nameMode,
const char* dirName=
"./",
const char* fileName=
"",
const char* filter=
".",
int maxfiles=10,
115 const char* name=
"MuDst");
120 virtual void Clear(Option_t *option=
"");
122 virtual Int_t MakeRead(
const StUKey &RunEvent);
123 virtual Int_t MakeRead();
124 virtual Int_t MakeWrite();
125 virtual int Finish();
127 void SetStatus(
const char *arrType,
int status);
131 void setTrackFilter(StMuCut* c);
132 StMuFilter* trackFilter();
134 void setL3TrackFilter(StMuCut* c);
135 StMuL3Filter* l3TrackFilter();
152 void setProbabilityPidFile(
const char* file=NULL);
162 virtual const char *GetFile()
const;
165 void setSplit(
int=99);
167 void setBufferSize(
int=65536*4);
169 void setCompression(
int comp=9);
172 void setStTriggerYear(
int);
180 static const char cvs[]=
"Tag $Name: $ $Id: StMuDstMaker.h,v 1.59 2013/07/23 11:02:59 jeromel Exp $ built "__DATE__
" "__TIME__ ;
188 void connectEmcCollection();
189 void connectFmsCollection();
190 void connectPmdCollection();
204 #ifndef __NO_STRANGE_MUDST__
252 #define saveDelete(t) { delete t; t=0;}
256 virtual void openWrite(
string fileName);
257 virtual void write();
258 virtual void closeWrite();
262 virtual int openRead();
264 void setBranchAddresses();
265 virtual void closeRead();
267 void setBranchAddresses(TChain*);
273 TClonesArray* clonesArray(TClonesArray*& p,
const char* type,
int size,
int& counter);
276 void fillTrees(StEvent* ev, StMuCut* cut=0);
277 void fillEvent(StEvent* ev, StMuCut* cut=0);
278 void fillVertices(StEvent* ev);
279 void fillpp2pp(StEvent* ev);
281 void fillsttrigger(StEvent* ev);
282 void fillPmd(StEvent* ev);
283 void fillEmc(StEvent* ev);
284 void fillFms(StEvent* ev);
285 #ifndef __NO_STRANGE_MUDST__
286 void fillStrange(StStrangeMuDstMaker*);
289 void fillL3Tracks(StEvent* ev, StMuCut* cut=0);
290 void fillTracks(StEvent* ev, StMuCut* cut=0);
291 void fillDetectorStates(StEvent* ev);
292 void fillL3AlgorithmInfo(StEvent* ev);
293 void fillTof(StEvent* ev);
295 void fillBTof(StEvent* ev);
296 void fillMtd(StEvent* ev);
297 void fillFgt(StEvent* ev);
299 void fillEzt(StEvent* ev);
303 template <
class T,
class U>
int addType(TClonesArray* tcaTo , U &u, T *t);
304 template <
class T>
int addType(TClonesArray* tcaFrom, TClonesArray* &tcaTo ,T *t);
305 template <
class T>
int addType(TClonesArray* tcaTo , T &t);
306 void addTrackNode(
const StEvent* ev,
const StTrackNode* node, StMuCut* cut, TClonesArray* gTCA=0, TClonesArray* pTCA=0, TClonesArray* oTCA=0,
307 TClonesArray* covgTCA=0, TClonesArray* covpTCA=0,
bool l3=
false);
308 int addTrack(TClonesArray* tca,
const StEvent* event,
const StTrack* track,
const StVertex *vtx, StMuCut* cut,
int index2Global,
bool l3=
false,
309 TClonesArray* covgTCA=0, TClonesArray* covpTCA=0);
312 StRichSpectra* richSpectra(
const StTrack* track);
314 void setStEvent(StEvent*);
316 #ifndef __NO_STRANGE_MUDST__
317 void setStStrangeMuDstMaker(StStrangeMuDstMaker*);
318 StStrangeMuDstMaker* stStrangeMuDstMaker();
320 unsigned int trackType();
322 #ifndef __NO_STRANGE_MUDST__
327 void setTrackType(
unsigned int);
328 void setReadTracks(
bool);
329 #ifndef __NO_STRANGE_MUDST__
330 void setReadV0s(
bool);
331 void setReadXis(
bool);
332 void setReadKinks(
bool);
334 string basename(
string);
335 string dirname(
string);
336 string buildFileName(
string dir,
string fileName,
string extention);
338 friend class StMuDst;
339 friend class StMuDstFilterMaker;
345 #ifndef __NO_STRANGE_MUDST__
377 #ifndef __NO_STRANGE_MUDST__
385 #ifndef __NO_STRANGE_MUDST__
391 #ifndef __NO_STRANGE_MUDST__
TClonesArray ** mFgtArrays
TClonesArray ** mFmsArrays
StMuFmsCollection * mFmsCollection
TClonesArray ** mEztArrays
TChain * chain()
In read mode, returns pointer to the chain of .MuDst.root files that where selected.
TClonesArray ** mEmcArrays
StStrangeMuDstMaker * mStStrangeMuDstMaker
StMuL3Filter * l3TrackFilter()
void setSplit(int=99)
Sets the split level for the file and all branches. Please refer to the ROOT manual (http://root...
StMuEmcCollection * mEmcCollection
void setStStrangeMuDstMaker(StStrangeMuDstMaker *)
TClonesArray * mEmcCollectionArray
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.
TClonesArray ** mMtdArrays
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
StuProbabilityPidAlgorithm * mProbabilityPidAlgorithm
void setCompression(int comp=9)
Sets the compression level for the file and all branches. 0 means no compression, 9 is the higher com...
TClonesArray ** mMCArrays
StMuFilter * trackFilter()
TClonesArray ** mStrangeArrays
void setTrackFilter(StMuCut *c)
Set the track filter used for all tracks (except the L3 tracks) when creating muDsts from StEvent and...
StMuPmdCollection * mPmdCollection
TClonesArray ** mTofArrays
StMuPmdUtil * muPmdUtil()
return pointer to StMuPmdUtil;
void SetEventList(TEventList *e)
Set event list for reading only preselected events (generate list using chain()->Draw() ...
StMuEmcUtil * muEmcUtil()
return pointer to StMuEmcUtil;
TClonesArray ** mBTofArrays
dongx
StMuFmsUtil * muFmsUtil()
return pointer to StMuFmsUtil;
StMuBTofUtil * mBTofUtil
dongx
StStrangeMuDstMaker * stStrangeMuDstMaker()
TClonesArray ** mPmdArrays
TClonesArray * mPmdCollectionArray
void setTrackType(unsigned int)