12 #include "TClonesArray.h"
21 #ifndef __NO_STRANGE_MUDST__
82 #include "StPhysicalHelixD.hh"
85 #include "StMuArrays.h"
86 #include "StMuException.hh"
90 #define ARRAY(NAME) static TClonesArray* (NAME)##s() { return tca_##NAME##s;}
91 #define OBJECT(TYPE,FUNC) static TYPE FUNC##(unsigned int i=0) { if (FUNC##s() && (i<(unsigned int)FUNC##s()->GetEntriesFast()) ) return (##TYPE##)FUNC##s()->UncheckedAt(i); return 0;}
93 #define DO(TYPE,NAME) ARRAY(NAME) OBJECT(TYPE,NAME)
114 static void set(TClonesArray** ,
115 #ifndef __NO_STRANGE_MUDST__
118 TClonesArray** mc_ptca=0,
119 TClonesArray** emc_ptca=0,
120 TClonesArray** fms_ptca=0,
121 TClonesArray** rhicf_ptca=0,
122 TClonesArray** fcs_ptca=0,
123 TClonesArray** ftt_ptca=0,
124 TClonesArray** fst_ptca=0,
125 TClonesArray** fwd_ptca=0,
126 TClonesArray** pmd_ptca=0,
127 TClonesArray** tof_ptca=0,
128 TClonesArray** btof_ptca=0,
129 TClonesArray** etof_col=0,
130 TClonesArray** epd_col=0,
131 TClonesArray** mtd_ptca=0,
132 TClonesArray** fgt_ptca=0,
133 TClonesArray** ezt_ptca=0,
134 TClonesArray *emc_tca=0,
142 TClonesArray *pmd_tca=0,
155 static void fixTrackIndices(TClonesArray* primary, TClonesArray* global);
169 static void fixMtdTrackIndices(TClonesArray* mtdHit, TClonesArray* primary, TClonesArray* global);
186 #ifndef __NO_STRANGE_MUDST__
190 static TClonesArray** mcArrays;
220 static TClonesArray *mMuEmcCollectionArray;
224 static TClonesArray *mMuPmdCollectionArray;
263 #ifndef __NO_STRANGE_MUDST__
267 static TClonesArray* mcArray(
int type) {
return mcArrays[type]; }
316 static TClonesArray* covGlobTrack() {
return arrays[muCovGlobTrack];}
317 static TClonesArray* covPrimTrack() {
return arrays[muCovPrimTrack];}
348 #ifndef __NO_STRANGE_MUDST__
462 static unsigned int numberOfPrimaryVertices() {
return arrays[muPrimaryVertex]->GetEntriesFast(); }
463 static unsigned int numberOfPrimaryTracks() {
return mCurrPrimaryTracks->GetEntriesFast(); }
464 static unsigned int numberOfGlobalTracks() {
return arrays[muGlobal]->GetEntriesFast(); }
465 static unsigned int numberOfOtherTracks() {
return arrays[muOther]->GetEntriesFast(); }
466 static unsigned int numberOfL3Tracks() {
return arrays[muL3]->GetEntriesFast(); }
467 static unsigned int numberOfRichSpectras() {
return arrays[muRich]->GetEntriesFast(); }
468 static unsigned int numberOfDetectorStates() {
return arrays[muState]->GetEntriesFast(); }
469 static unsigned int numberOfL3AlgoAccepts() {
return arrays[muAccept]->GetEntriesFast(); }
470 static unsigned int numberOfL3AlgoRejects() {
return arrays[muReject]->GetEntriesFast(); }
471 static unsigned int numberOfCovGlobTracks() {
return arrays[muCovGlobTrack]->GetEntriesFast(); }
472 static unsigned int numberOfCovPrimTracks() {
return arrays[muCovPrimTrack]->GetEntriesFast(); }
473 #ifndef __NO_STRANGE_MUDST__
474 static unsigned int numberOfV0s() {
return strangeArrays[smuV0]->GetEntriesFast(); }
475 static unsigned int numberOfV0sMc() {
return strangeArrays[smuV0Mc]->GetEntriesFast(); }
476 static unsigned int numberOfV0Assoc() {
return strangeArrays[smuV0Assoc]->GetEntriesFast(); }
477 static unsigned int numberOfXis() {
return strangeArrays[smuXi]->GetEntriesFast(); }
478 static unsigned int numberOfXisMc() {
return strangeArrays[smuXiMc]->GetEntriesFast(); }
479 static unsigned int numberOfXiAssoc() {
return strangeArrays[smuXiAssoc]->GetEntriesFast(); }
480 static unsigned int numberOfKinks() {
return strangeArrays[smuKink]->GetEntriesFast(); }
481 static unsigned int numberOfKinksMc() {
return strangeArrays[smuKinkMc]->GetEntriesFast(); }
482 static unsigned int numberOfKinkAssoc() {
return strangeArrays[smuKinkAssoc]->GetEntriesFast(); }
483 static unsigned int numberOfStrangeCuts() {
return strangeArrays[smuCut]->GetEntriesFast(); }
486 static unsigned int numberOfTofHit() {
return tofArrays[muTofHit]->GetEntriesFast(); }
487 static unsigned int numberOfTofData() {
return tofArrays[muTofData]->GetEntriesFast(); }
489 static unsigned int numberOfTofRawData() {
return tofArrays[muTofRawData]->GetEntriesFast(); }
491 static unsigned int numberOfBTofHit() {
return btofArrays[muBTofHit]->GetEntriesFast(); }
492 static unsigned int numberOfBTofRawHit() {
return btofArrays[muBTofRawHit]->GetEntriesFast(); }
495 static unsigned int numberOfETofDigi() {
return etofArrays[muETofDigi]->GetEntriesFast(); }
496 static unsigned int numberOfETofHit() {
return etofArrays[muETofHit]->GetEntriesFast(); }
498 static unsigned int numberOfEpdHit() {
return epdArrays[muEpdHit]->GetEntriesFast(); }
500 static unsigned int numberOfMTDHit() {
return mtdArrays[muMTDHit]->GetEntriesFast(); }
501 static unsigned int numberOfBMTDRawHit() {
return mtdArrays[muMTDRawHit]->GetEntriesFast(); }
503 static unsigned int GetNPrimaryVertex() {
return numberOfPrimaryVertices(); }
504 static unsigned int GetNPrimaryTrack() {
return numberOfPrimaryTracks(); }
505 static unsigned int GetNGlobalTrack() {
return numberOfGlobalTracks(); }
506 static unsigned int GetNOtherTrack() {
return numberOfOtherTracks(); }
507 static unsigned int GetNL3Track() {
return numberOfL3Tracks(); }
508 static unsigned int GetNRichSpectra() {
return numberOfRichSpectras(); }
509 static unsigned int GetNDetectorState() {
return numberOfDetectorStates(); }
510 static unsigned int GetNL3AlgoAccept() {
return numberOfL3AlgoAccepts(); }
511 static unsigned int GetNL3AlgoReject() {
return numberOfL3AlgoRejects(); }
512 #ifndef __NO_STRANGE_MUDST__
513 static unsigned int GetNV0() {
return numberOfV0s(); }
514 static unsigned int GetNV0Mc() {
return numberOfV0sMc(); }
515 static unsigned int GetNV0Assoc() {
return numberOfV0Assoc(); }
516 static unsigned int GetNXi() {
return numberOfXis(); }
517 static unsigned int GetNXiMc() {
return numberOfXisMc(); }
518 static unsigned int GetNXiAssoc() {
return numberOfXiAssoc(); }
519 static unsigned int GetNKink() {
return numberOfKinks(); }
520 static unsigned int GetNKinkMc() {
return numberOfKinksMc(); }
521 static unsigned int GetNKinkAssoc() {
return numberOfKinkAssoc(); }
522 static unsigned int GetNStrangeCut() {
return numberOfStrangeCuts(); }
524 static unsigned int GetNTofHit() {
return numberOfTofHit(); }
525 static unsigned int GetNTofData() {
return numberOfTofData(); }
527 static unsigned int GetNTofRawData() {
return numberOfTofRawData(); }
529 static unsigned int GetNBTofHit() {
return numberOfBTofHit(); }
530 static unsigned int GetNBTofRawHit() {
return numberOfBTofRawHit(); }
532 static unsigned int GetNETofDigi() {
return numberOfETofDigi(); }
533 static unsigned int GetNETofHit() {
return numberOfETofHit(); }
535 static unsigned int GetNEpdHit() {
return numberOfEpdHit(); }
537 static unsigned int GetNMTDHit() {
return numberOfMTDHit(); }
538 static unsigned int GetNMTDRawHit() {
return numberOfBMTDRawHit(); }
540 virtual void Print(Option_t *option =
"")
const;
541 static void printPrimaryTracks();
542 static void printGlobalTracks() ;
543 static void printVertices() ;
static TObjArray * mCurrPrimaryTracks
Temporary array to collect tracks from currect primary vertex.
static StMuFcsCollection * muFcsCollection()
returns pointer to current StMuFcsCollection
static void unset()
resets the pointers to the TClonesArrays to 0
static TClonesArray ** tofArrays
array of TClonesArrays for the stuff inherited from the TOF
static StFmsCollection * fmsCollection()
returns pointer to current StFmsCollection
static StMuFstCollection * mMuFstCollection
pointer to FstCollection (manages the FstArrays)
static StMuPrimaryVertex * primaryVertex()
return pointer to current primary vertex
static StMuFmsCollection * muFmsCollection()
returns pointer to current StMuFmsCollection
static StKinkMuDst * kinks(int i)
returns pointer to the i-th kink
static StMuBTofHit * btofHit(int i)
returns pointer to the i-th muBTofHit
static TObjArray * globalTracks()
returns pointer to the global tracks list
void fixTofTrackIndices()
static StMuPmdCollection * pmdCollection()
returns pointer to current StMuPmdCollection
static StRichSpectra * richSpectra(int i)
returns pointer to i-th StRichSpectra
static TClonesArray * l3AlgoAccept()
returns pointer to list of accepted l3 algorithms
static StMuFttCollection * muFttCollection()
returns pointer to current StMuFttCollection
static void set(StMuDstMaker *maker)
set the pointers to the TClonesArrays
static StMuFttCollection * mMuFttCollection
pointer to FttCollection (manages the FttArrays)
static TClonesArray * pmdArray(int type)
returns pointer to the n-th TClonesArray from the pmd arrays
static TClonesArray * strangeCuts()
returns pointer to the list of strangeCuts
static StL3AlgorithmInfo * l3AlgoReject(int i)
returns pointer to i-th rejected StL3AlgorithmInfo
static StMuFmsCollection * mMuFmsCollection
pointer to FmsCollection (manages the FmsArrays)
static TClonesArray * epdHits()
returns pointer to the EpdHitCollection
static TClonesArray ** fgtArrays
array of TClonesArrays for the stuff inherited from the Fgt
static StL3AlgorithmInfo * l3AlgoAccept(int i)
returns pointer to i-th accepted StL3AlgorithmInfo
static StMuETofHeader * etofHeader()
returns pointer to the StMuETofHeader
static EztFpdBlob * eztFpd()
returns pointer to eztFpd
static StTofRawData * tofRawData(int i)
returns pointer to the i-th tofRawData
void setETofArray(const StETofCollection *etof_coll)
static EztEmcRawData * eztESmd()
returns pointer to eztESmd +pre/post
static TClonesArray ** pmdArrays
array of TClonesArrays for the stuff inherited from the Pmd
static TClonesArray * fttArray(int type)
returns pointer to the n-th TClonesArray from the ftt arrays
static StMuEmcCollection * mMuEmcCollection
pointer to EmcCollection (manages the EmcArrays)
static StMuETofHit * etofHit(int i)
returns pointer to the i-th StMuETofHit
static TClonesArray * v0s()
returns pointer to the v0 list
static StMuTrack * primaryTracks(int i)
return pointer to i-th primary track
static TClonesArray * btofArray(int type)
returns pointer to the n-th TClonesArray from the btof arrays // dongx
static TClonesArray * primaryVertices()
returns pointer to the primary vertex list
static TClonesArray * kinksMc()
returns pointer to the mc kink list
static TClonesArray * kinkAssoc()
returns pointer to the kink association list
static StMuRHICfCollection * mMuRHICfCollection
pointer to RHICfCollection (manages the RHICfArrays)
virtual void Print(Option_t *option="") const
Print basic event info.
static TClonesArray ** fmsArrays
array of TClonesArrays for the stuff inherited from the Fms
static TClonesArray * otherTracks()
returns pointer to the other tracks list (all tracks that are not flagged as primary of global) ...
static TClonesArray * xisMc()
returns pointer to the mc xi list
static void collectVertexTracks()
Helper function to collect tracks for the current prim vertex.
static void fixTrackIndicesG(int mult=1)
void fixTrackIndices()
checks and if necessary corrects the indecies of elements pointing to each other (e.g., a primary track's index to the corresponding global track)
static TClonesArray ** mtdArrays
array of TClonesArrays for the stuff inherited from the Mtd
static StMuFwdTrackCollection * muFwdTrackCollection()
returns pointer to current StMuFwdTrackCollection
static TClonesArray * xiAssoc()
returns pointer to the xi association list
void fixETofTrackIndices()
static StTofData * tofData(int i)
returns pointer to the i-th tofData
static TCut * strangeCuts(int i)
returns pointer to the i-th stranneCut (of type TCut)
static TClonesArray * strangeArray(int type)
returns pointer to the n-th TClonesArray from the strangeness arrays
static StEmcCollection * mEmcCollection
pointer to EmcCollecion (for Emc clusterfinding etc)
static TClonesArray * l3Tracks()
returns pointer to the l3Tracks list
static TClonesArray * fstArray(int type)
returns pointer to the n-th TClonesArray from the fst arrays
static StV0MuDst * v0s(int i)
returns pointer to the i-th v0
static EztTrigBlob * eztTrig()
returns pointer to eztTrig
static TClonesArray ** eztArrays
array of TClonesArrays for the stuff inherited from the EZT (ezTree)
static TClonesArray ** fttArrays
array of TClonesArrays for the stuff inherited from the Ftt
static TClonesArray * mtdArray(int type)
returns pointer to the n-th TClonesArray from the mtd arrays
static TClonesArray * eztArray(int type)
returns pointer to the n-th TClonesArray from the ezt arrays
static StMuPmdCollection * mMuPmdCollection
pointer to PmdCollection (manages the PmdArrays)
static EztEventHeader * eztHeader()
returns pointer to eztHeader
static StStrangeEvMuDst * strangeEvent()
returns pointer to current StStrangeEvMuDst (class holding the event wise information, e.g. event number, run number)
static TClonesArray * fmsArray(int type)
returns pointer to the n-th TClonesArray from the fms arrays
void fixMtdTrackIndices()
static TClonesArray ** fcsArrays
array of TClonesArrays for the stuff inherited from the Fcs
static StMuRHICfCollection * muRHICfCollection()
returns pointer to current StMuRHICfCollection
static StBTofRawHit * btofRawHit(int i)
returns pointer to the i-th btofRawHit - dongx
static EztEmcRawData * eztETow()
returns pointer to ETOW
static TClonesArray * detectorStates()
returns pointer to the list of detector states
static StMuFstCollection * muFstCollection()
returns pointer to current StMuFstCollection
static StMuTrack * otherTracks(int i)
return pointer to i-th other track (track that is not flagged as primary of global) ...
static StMuTrack * globalTracks(int i)
return pointer to i-th global track
static StMuTrack * l3Tracks(int i)
return pointer to i-th l3 track
static TObjArray * primaryTracks()
returns pointer to a list of tracks belonging to the selected primary vertex
static TClonesArray * rhicfArray(int type)
returns pointer to the n-th TClonesArray from the rhicf arrays
static TClonesArray * fcsArray(int type)
returns pointer to the n-th TClonesArray from the fcs arrays
static TClonesArray * etofArray(int type)
returns pointer to the n-th TClonesArray from the etof arrays // FS
static TClonesArray * fwdTrackArray(int type)
returns pointer to the n-th TClonesArray from the rhicf arrays
static TClonesArray ** rhicfArrays
array of TClonesArrays for the stuff inherited from the RHICf
static TClonesArray * l3AlgoReject()
returns pointer to list rejected l3 algorithms
static StDetectorState * detectorStates(int i)
returns pointer to i-th StDetectorState
static StMuEmcCollection * muEmcCollection()
returns pointer to current StMuEmcCollection
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)
static StRHICfCollection * mRHICfCollection
pointer to RHICfCollecion (for RHICf clusterfinding etc)
static TClonesArray * v0sMc()
returns pointer to the mc v0 list
static StTrackGeometry * trackGeometry(int q, StPhysicalHelixD *h)
helper function to create a StTrackGeometry
static StMuETofDigi * etofDigi(int i)
returns pointer to the i-th StMuEtofDigi
static StMuTofHit * tofHit(int i)
returns pointer to the i-th muTofHit
static TClonesArray * v0Assoc()
returns pointer to the v0 association list
static StTrack * createStTrack(const StMuTrack *)
creates a StTrack from an StMuTrack and return pointer to it
static TClonesArray * xis()
returns pointer to the xi list
static TClonesArray ** strangeArrays
array of TClonesArrays for the stuff inherited from the StStrangeMuDst
static StStrangeEvMuDst * strangeEventMc()
returns pointer to MC version of current StStrangeEvMuDst
void addETofHit(const StMuETofHit *hit)
static TClonesArray ** emcArrays
array of TClonesArrays for the stuff inherited from the Emc
static StBTofHeader * btofHeader()
returns pointer to the btofHeader - dongx
static TClonesArray * array(int type)
returns pointer to the n-th TClonesArray
static StMuFcsCollection * mMuFcsCollection
pointer to FcsCollection (manages the FcsArrays)
static TClonesArray * kinks()
returns pointer to the kink list
static StRHICfCollection * rhicfCollection()
returns pointer to current StRHICfCollection
static TClonesArray ** epdArrays
array of TClonesArrays for Epd
void setMtdArray(StMtdCollection *mtd_coll)
static StEmcCollection * emcCollection()
returns pointer to current StEmcCollection
static TClonesArray * fgtArray(int type)
returns pointer to the n-th TClonesArray from the fgt arrays
static StXiMuDst * xis(int i)
returns pointer to the i-th xi
static void setEmcCollection(StEmcCollection *emc_coll)
set pointer to current StEmcCollection
static Int_t currentVertexIndex()
Get the index number of the current primary vertex.
static TClonesArray ** etofArrays
array of TClonesArrays for ETof
StEvent * createStEvent()
creates a StEvent from the StMuDst (this) and returns a pointer to it. (This function is not yet fini...
static TClonesArray ** fstArrays
array of TClonesArrays for the stuff inherited from the Fst
static TClonesArray ** fwdTrackArrays
array of TClonesArrays for the stuff inherited from the FWD Tracks
static void setVertexIndex(Int_t vtx_id)
Set the index number of the current primary vertex (used by both primaryTracks() functions and for St...
static TClonesArray * tofArray(int type)
returns pointer to the n-th TClonesArray from the tof arrays
static TClonesArray ** arrays
array of TClonesArrays
static StMuFwdTrackCollection * mMuFwdTrackCollection
pointer to FwdTrackCollection (manages the FwdTrackArrays)
static Int_t mCurrVertexId
Index number of current primary vertex.
static TClonesArray ** btofArrays
array of TClonesArrays for the stuff inherited from the BTOF // dongx
static TClonesArray * emcArray(int type)
returns pointer to the n-th TClonesArray from the emc arrays
static StFmsCollection * mFmsCollection
pointer to FmsCollecion (for Fms clusterfinding etc)
static StMuPrimaryVertex * primaryVertex(int i)
return pointer to i-th primary vertex
static TClonesArray * richSpectra()
returns pointer to the list of rich spectra