StFms
0.0.0
FMS software in the STAR framework
|
#include <StMuDstMaker.h>
Public Member Functions | |
StMuDstMaker (const char *name="MuDst") | |
Default constructor. More... | |
StMuDstMaker (int mode, int nameMode, const char *dirName="./", const char *fileName="", const char *filter=".", int maxfiles=10, const char *name="MuDst") | |
Constructor. More... | |
~StMuDstMaker () | |
virtual int | Init () |
virtual void | Clear (Option_t *option="") |
virtual int | Make () |
virtual Int_t | MakeRead (const StUKey &RunEvent) |
virtual Int_t | MakeRead () |
virtual Int_t | MakeWrite () |
virtual int | Finish () |
void | printArrays () |
void | SetStatus (const char *arrType, int status) |
void | SetEventList (TEventList *e) |
Set event list for reading only preselected events (generate list using chain()->Draw() More... | |
void | setTrackFilter (StMuCut *c) |
Set the track filter used for all tracks (except the L3 tracks) when creating muDsts from StEvent and writing to disk. More... | |
StMuFilter * | trackFilter () |
void | setL3TrackFilter (StMuCut *c) |
Set the track filter used for L3 tracks when creating muDsts from StEvent and writing to disk. More... | |
StMuL3Filter * | l3TrackFilter () |
void | setProbabilityPidFile (const char *file=NULL) |
Set the file from where the PID probability tables should be read. More... | |
StMuDst * | muDst () |
TChain * | chain () |
In read mode, returns pointer to the chain of .MuDst.root files that where selected. More... | |
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. More... | |
virtual const char * | GetFile () const |
Returns name of current input or output file, depending on mode (GetFileName does the same, see StIOInterface. More... | |
void | setSplit (int=99) |
Sets the split level for the file and all branches. Please refer to the ROOT manual (http://root.cern.ch) for more information. More... | |
void | setBufferSize (int=65536 *4) |
Sets the buffer size for all branches. More... | |
void | setCompression (int comp=9) |
Sets the compression level for the file and all branches. 0 means no compression, 9 is the higher compression level. More... | |
void | setStTriggerYear (int) |
StMuEmcUtil * | muEmcUtil () |
return pointer to StMuEmcUtil; More... | |
StMuFmsUtil * | muFmsUtil () |
return pointer to StMuFmsUtil; More... | |
StMuPmdUtil * | muPmdUtil () |
return pointer to StMuPmdUtil; More... | |
virtual const char * | GetCVS () const |
Protected Types | |
enum | ioMode { ioRead, ioWrite } |
enum | ioNameMode { ioFix =0, ioIOMaker, ioTreeMaker } |
Protected Member Functions | |
void | connectEmcCollection () |
routine to set up connection between mEmcCollection and Emc arrays More... | |
void | connectFmsCollection () |
void | connectPmdCollection () |
virtual void | openWrite (string fileName) |
protected: More... | |
virtual void | write () |
virtual void | closeWrite () |
void | streamerOff () |
virtual int | openRead () |
virtual void | read () |
void | setBranchAddresses () |
virtual void | closeRead () |
void | setBranchAddresses (TChain *) |
void | assignArrays () |
void | clearArrays () |
void | zeroArrays () |
void | createArrays () |
TClonesArray * | clonesArray (TClonesArray *&p, const char *type, int size, int &counter) |
void | fill () |
void | fillTrees (StEvent *ev, StMuCut *cut=0) |
void | fillEvent (StEvent *ev, StMuCut *cut=0) |
void | fillVertices (StEvent *ev) |
void | fillpp2pp (StEvent *ev) |
void | fillsttrigger (StEvent *ev) |
void | fillPmd (StEvent *ev) |
void | fillEmc (StEvent *ev) |
void | fillFms (StEvent *ev) |
void | fillStrange (StStrangeMuDstMaker *) |
void | fillMC () |
void | fillL3Tracks (StEvent *ev, StMuCut *cut=0) |
void | fillTracks (StEvent *ev, StMuCut *cut=0) |
void | fillDetectorStates (StEvent *ev) |
void | fillL3AlgorithmInfo (StEvent *ev) |
void | fillTof (StEvent *ev) |
void | fillBTof (StEvent *ev) |
dongx More... | |
void | fillMtd (StEvent *ev) |
void | fillFgt (StEvent *ev) |
void | fillEzt (StEvent *ev) |
void | fillHddr () |
template<class T , class U > | |
int | addType (TClonesArray *tcaTo, U &u, T *t) |
template<class T > | |
int | addType (TClonesArray *tcaFrom, TClonesArray *&tcaTo, T *t) |
template<class T > | |
int | addType (TClonesArray *tcaTo, T &t) |
void | addTrackNode (const StEvent *ev, const StTrackNode *node, StMuCut *cut, TClonesArray *gTCA=0, TClonesArray *pTCA=0, TClonesArray *oTCA=0, TClonesArray *covgTCA=0, TClonesArray *covpTCA=0, bool l3=false) |
int | addTrack (TClonesArray *tca, const StEvent *event, const StTrack *track, const StVertex *vtx, StMuCut *cut, int index2Global, bool l3=false, TClonesArray *covgTCA=0, TClonesArray *covpTCA=0) |
StRichSpectra * | richSpectra (const StTrack *track) |
void | setStEvent (StEvent *) |
StEvent * | stEvent () |
void | setStStrangeMuDstMaker (StStrangeMuDstMaker *) |
StStrangeMuDstMaker * | stStrangeMuDstMaker () |
unsigned int | trackType () |
bool | readTracks () |
bool | readV0s () |
bool | readXis () |
bool | readKinks () |
void | setTrackType (unsigned int) |
void | setReadTracks (bool) |
void | setReadV0s (bool) |
void | setReadXis (bool) |
void | setReadKinks (bool) |
string | basename (string) |
string | dirname (string) |
string | buildFileName (string dir, string fileName, string extention) |
Protected Attributes | |
StEvent * | mStEvent |
StMuDst * | mStMuDst |
StStrangeMuDstMaker * | mStStrangeMuDstMaker |
StIOMaker * | mIOMaker |
StTreeMaker * | mTreeMaker |
StMuEmcUtil * | mEmcUtil |
StMuFmsUtil * | mFmsUtil |
StMuPmdUtil * | mPmdUtil |
StMuTofUtil * | mTofUtil |
StMuBTofUtil * | mBTofUtil |
dongx More... | |
StMuEzTree * | mEzTree |
int | mIoMode |
int | mIoNameMode |
string | mDirName |
string | mFileName |
string | mFilter |
int | mMaxFiles |
TEventList * | mEventList |
unsigned int | mTrackType |
bool | mReadTracks |
bool | mReadV0s |
bool | mReadXis |
bool | mReadKinks |
bool | mFinish |
StMuCut * | mTrackFilter |
StMuCut * | mL3TrackFilter |
TFile * | mCurrentFile |
string | mCurrentFileName |
TChain * | mChain |
TTree * | mTTree |
int | mEventCounter |
int | mSplit |
int | mCompression |
int | mBufferSize |
TObjArray | mVtxList |
StuProbabilityPidAlgorithm * | mProbabilityPidAlgorithm |
TClonesArray * | mAArrays [__NALLARRAYS__] |
TClonesArray ** | mArrays |
TClonesArray ** | mStrangeArrays |
TClonesArray ** | mMCArrays |
TClonesArray ** | mEmcArrays |
TClonesArray ** | mFmsArrays |
TClonesArray ** | mPmdArrays |
TClonesArray ** | mTofArrays |
TClonesArray ** | mBTofArrays |
dongx More... | |
TClonesArray ** | mMtdArrays |
TClonesArray ** | mFgtArrays |
TClonesArray ** | mEztArrays |
char | mStatusArrays [__NALLARRAYS__] |
TClonesArray * | mEmcCollectionArray |
StMuEmcCollection * | mEmcCollection |
StMuFmsCollection * | mFmsCollection |
TClonesArray * | mPmdCollectionArray |
StMuPmdCollection * | mPmdCollection |
Friends | |
class | StMuDst |
class | StMuDstFilterMaker |
Class to create and read STAR's common micro dst (StMuDst)
This class is a true maker in the STAR sense. It inherits from "StMaker" and implements the functions "int Init()", "void Clear()", int Make()", and "int Finish()" in order to run as part of an "StChain". Please refer to the STAR Computing Web pages in case you do not know what "StMaker" and "StChain" mean.
Definition at line 109 of file StMuDstMaker.h.
|
protected |
Enumerator | |
---|---|
ioRead | |
ioWrite |
Definition at line 191 of file StMuDstMaker.h.
|
protected |
Specifies the way the output file name is contructed when creating muDsts. ioFix = use filename specified in when calling the constructor, right in the same output file for all input files. ioIOMaker = create one output file per input file, derive output filename from current input file of the StIOMaker. ioTreeMaker = create one output file per input file, derive output filename from current input file of the StTreeMaker.
Enumerator | |
---|---|
ioFix | |
ioIOMaker | |
ioTreeMaker |
Definition at line 200 of file StMuDstMaker.h.
StMuDstMaker::StMuDstMaker | ( | const char * | name = "MuDst" | ) |
Default constructor.
The default constructor as it is right now was written in order to run the StMuDstMaker during reconstruction in the bfc. Since the PID table that is needed for muDst production is not passed as an argument to the bfc, this default constructor sets a specific PID table. This table has to be updated when changing to a new production version. Also, the standard track and l3 track filters are set.
dongx
dongx
Definition at line 125 of file StMuDstMaker.cxx.
StMuDstMaker::StMuDstMaker | ( | int | mode, |
int | nameMode, | ||
const char * | dirName = "./" , |
||
const char * | fileName = "" , |
||
const char * | filter = "." , |
||
int | maxfiles = 10 , |
||
const char * | name = "MuDst" |
||
) |
Constructor.
dongx
Definition at line 330 of file StMuDstMaker.cxx.
StMuDstMaker::~StMuDstMaker | ( | ) |
|
protected |
if (!tca || !track) return index; /// I made sure that the array anf the track is there
return index to self if newly created, else return -1;
Definition at line 1526 of file StMuDstMaker.cxx.
|
protected |
do global track
do primary track track
all other tracks
loop over all tracks in tracknode
exclude global and primary tracks
Definition at line 1488 of file StMuDstMaker.cxx.
|
protected |
|
protected |
Definition at line 1643 of file StMuDstMaker.cxx.
|
protected |
Definition at line 1670 of file StMuDstMaker.cxx.
|
protected |
This method assigns individual TCloneArrays location from one big global one. Dirty init MUST follow the order in StMuArrays. This allows for block initialization/zeroing without problems or side effects such as the one cause by array boundary overwrite if the first TClone in a list of declared variables is used.
dongx
dongx
Definition at line 182 of file StMuDstMaker.cxx.
|
protected |
|
protected |
|
inline |
In read mode, returns pointer to the chain of .MuDst.root files that where selected.
Definition at line 371 of file StMuDstMaker.h.
|
virtual |
|
protected |
|
protected |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
routine to set up connection between mEmcCollection and Emc arrays
Definition at line 1808 of file StMuDstMaker.cxx.
|
protected |
Definition at line 1818 of file StMuDstMaker.cxx.
|
protected |
|
protected |
all stuff
Definition at line 464 of file StMuDstMaker.cxx.
|
protected |
|
protected |
once per event the pid algorithm has to be set up we make it static for the StMuTrack, because all tracks use the same instance
Definition at line 605 of file StMuDstMaker.cxx.
|
protected |
dongx
Definition at line 1143 of file StMuDstMaker.cxx.
|
protected |
Definition at line 1472 of file StMuDstMaker.cxx.
|
protected |
Definition at line 1044 of file StMuDstMaker.cxx.
|
protected |
Definition at line 1028 of file StMuDstMaker.cxx.
|
protected |
dongx
Definition at line 1335 of file StMuDstMaker.cxx.
|
protected |
Definition at line 1175 of file StMuDstMaker.cxx.
|
protected |
Definition at line 1065 of file StMuDstMaker.cxx.
|
protected |
|
protected |
Definition at line 1382 of file StMuDstMaker.cxx.
|
protected |
Definition at line 1455 of file StMuDstMaker.cxx.
|
protected |
Definition at line 1624 of file StMuDstMaker.cxx.
|
protected |
Definition at line 1304 of file StMuDstMaker.cxx.
|
protected |
Definition at line 1085 of file StMuDstMaker.cxx.
|
protected |
Definition at line 1422 of file StMuDstMaker.cxx.
|
protected |
now fill the strangeness stuff
Definition at line 1589 of file StMuDstMaker.cxx.
|
protected |
|
protected |
Definition at line 1106 of file StMuDstMaker.cxx.
|
protected |
Definition at line 1439 of file StMuDstMaker.cxx.
|
protected |
Definition at line 939 of file StMuDstMaker.cxx.
|
protected |
Definition at line 1403 of file StMuDstMaker.cxx.
|
virtual |
|
inlinevirtual |
< Returns version tag.
Definition at line 178 of file StMuDstMaker.h.
|
virtual |
Returns name of current input or output file, depending on mode (GetFileName does the same, see StIOInterface.
Definition at line 696 of file StMuDstMaker.cxx.
|
virtual |
The Init() routine is used to establish contact to other makers. As it is STAR habit (but really really bad coding) we identify the other makers by names (instead of passing pointers). Here, the names are hard-wired because they have to be identical to the names the bfc is assining to the makers. Do not alter these names unless you know what you are doing.
< added for Valeri to be able to pick it up in other makers
< added for Valeri to be able to pick it up in other makers
Definition at line 497 of file StMuDstMaker.cxx.
|
inline |
Definition at line 376 of file StMuDstMaker.h.
|
virtual |
Depending on ioMode, calling Make() will initiate the StMuDstMaker to read or write the next event. After the Make() function has finished, a call to muDst() will return a pointer to an object od type StMuDst. This object will hold the current event if the io was successful, or return a null pointer.
Definition at line 540 of file StMuDstMaker.cxx.
|
virtual |
|
virtual |
Definition at line 563 of file StMuDstMaker.cxx.
|
virtual |
Definition at line 585 of file StMuDstMaker.cxx.
|
inline |
Returns pointer to the StMuDst object, the transient class that holds all the TClonesArrays and has access functions to the tracks, v0s, etc. Returns null pointer if no StMuDst available.
Definition at line 370 of file StMuDstMaker.h.
|
inline |
return pointer to StMuEmcUtil;
Definition at line 174 of file StMuDstMaker.h.
|
inline |
return pointer to StMuFmsUtil;
Definition at line 175 of file StMuDstMaker.h.
|
inline |
return pointer to StMuPmdUtil;
Definition at line 176 of file StMuDstMaker.h.
|
protectedvirtual |
Definition at line 816 of file StMuDstMaker.cxx.
|
protectedvirtual |
protected:
Definition at line 884 of file StMuDstMaker.cxx.
void StMuDstMaker::printArrays | ( | ) |
|
protectedvirtual |
Definition at line 836 of file StMuDstMaker.cxx.
|
inlineprotected |
Definition at line 388 of file StMuDstMaker.h.
|
inlineprotected |
Definition at line 384 of file StMuDstMaker.h.
|
inlineprotected |
Definition at line 386 of file StMuDstMaker.h.
|
inlineprotected |
Definition at line 387 of file StMuDstMaker.h.
|
protected |
|
protected |
|
protected |
|
inline |
Sets the buffer size for all branches.
Definition at line 399 of file StMuDstMaker.h.
|
inline |
Sets the compression level for the file and all branches. 0 means no compression, 9 is the higher compression level.
Definition at line 398 of file StMuDstMaker.h.
|
inline |
Set event list for reading only preselected events (generate list using chain()->Draw()
Definition at line 129 of file StMuDstMaker.h.
|
inline |
Set the track filter used for L3 tracks when creating muDsts from StEvent and writing to disk.
Definition at line 374 of file StMuDstMaker.h.
void StMuDstMaker::setProbabilityPidFile | ( | const char * | file = NULL | ) |
Set the file from where the PID probability tables should be read.
Set the file from where the PID probability tables should be read. These tables might change from production version to production version. It is the reposibility of who ever creates muDsts to make sure the right tables are used. So far, Aihong was providing these files. Thanks, Aihong. Note that this method hard code the file name if the argument is not give. The default is currently
getenv("STAR") << "/StarDb/dEdxModel/" << PIDtable
where PIDtable=PIDTableP01gl.root . This will later change with possibly a database approach.
Definition at line 1741 of file StMuDstMaker.cxx.
|
inlineprotected |
Definition at line 394 of file StMuDstMaker.h.
|
inlineprotected |
Definition at line 390 of file StMuDstMaker.h.
|
inlineprotected |
Definition at line 392 of file StMuDstMaker.h.
|
inlineprotected |
Definition at line 393 of file StMuDstMaker.h.
|
inline |
Sets the split level for the file and all branches. Please refer to the ROOT manual (http://root.cern.ch) for more information.
Definition at line 397 of file StMuDstMaker.h.
void StMuDstMaker::SetStatus | ( | const char * | arrType, |
int | status | ||
) |
Selecting SetBranchStatus for particular MuDst branches Special names: MuEventAll - all branches related to StMuEvent StrangeAll - all branches related to StrangeMuDst EmcAll - all branches related to Emc PmdAll - all branches related to Pmd TofAll - all branches related to Tof BTofAll - all branches related to BTof /// dongx MTDAll - all branches related to MTD FgtAll - all branches related to Fgt
By default all branches of MuDst are read. If user wants to read only some of them, then: SetStatus("*",0) // all branches off SetStatus("MuEventAll",1) // all standard MuEvent branches ON SetStatus("StrangeAll",1) // all standard Strange branches ON SetStatus("EmcAll" ,1) // all standard Emc branches ON SetStatus("PmdAll" ,1) // all standard Pmd branches ON SetStatus("TofAll" ,1) // all standard Tof branches ON SetStatus("BTofAll" ,1) // all standard BTof branches ON /// dongx SetStatus("MTDAll" ,1) // all standard Mtd branches ON SetStatus("FgtAll" ,1) // all standard Fgt branches ON
SetStatus("XiAssoc" ,1) // Strange branch "XiAssoc" is ON
Names of branches look StMuArrays::arrayTypes[]
dongx
dongx
dongx
Definition at line 269 of file StMuDstMaker.cxx.
|
protected |
|
inlineprotected |
Definition at line 378 of file StMuDstMaker.h.
void StMuDstMaker::setStTriggerYear | ( | int | ) |
|
inline |
Set the track filter used for all tracks (except the L3 tracks) when creating muDsts from StEvent and writing to disk.
Definition at line 373 of file StMuDstMaker.h.
|
inlineprotected |
Definition at line 381 of file StMuDstMaker.h.
|
protected |
|
protected |
Switch of the TObject part of some streamers, so that only the datTClonesamenbers of the derived classes are written to disk, but not the data members of the base class TObject
Definition at line 429 of file StMuDstMaker.cxx.
|
inlineprotected |
Definition at line 379 of file StMuDstMaker.h.
|
inline |
Definition at line 375 of file StMuDstMaker.h.
|
inlineprotected |
Definition at line 382 of file StMuDstMaker.h.
|
inline |
Returns pointer to the current TTree, the top level io structure that holds the event, track, v0, etc. information in branches of that tree.
Definition at line 372 of file StMuDstMaker.h.
|
protectedvirtual |
Definition at line 629 of file StMuDstMaker.cxx.
|
protected |
|
friend |
Definition at line 338 of file StMuDstMaker.h.
|
friend |
Definition at line 339 of file StMuDstMaker.h.
|
protected |
Definition at line 343 of file StMuDstMaker.h.
|
protected |
Definition at line 344 of file StMuDstMaker.h.
|
protected |
dongx
Definition at line 354 of file StMuDstMaker.h.
|
protected |
dongx
Definition at line 214 of file StMuDstMaker.h.
|
protected |
Definition at line 245 of file StMuDstMaker.h.
|
protected |
Definition at line 239 of file StMuDstMaker.h.
|
protected |
Definition at line 244 of file StMuDstMaker.h.
|
protected |
Definition at line 236 of file StMuDstMaker.h.
|
protected |
Definition at line 237 of file StMuDstMaker.h.
|
protected |
Definition at line 219 of file StMuDstMaker.h.
|
protected |
Definition at line 349 of file StMuDstMaker.h.
|
protected |
Definition at line 361 of file StMuDstMaker.h.
|
protected |
Definition at line 360 of file StMuDstMaker.h.
|
protected |
Definition at line 209 of file StMuDstMaker.h.
|
protected |
Definition at line 242 of file StMuDstMaker.h.
|
protected |
Definition at line 224 of file StMuDstMaker.h.
|
protected |
Definition at line 357 of file StMuDstMaker.h.
|
protected |
Definition at line 215 of file StMuDstMaker.h.
|
protected |
Definition at line 356 of file StMuDstMaker.h.
|
protected |
Definition at line 220 of file StMuDstMaker.h.
|
protected |
Definition at line 221 of file StMuDstMaker.h.
|
protected |
Definition at line 231 of file StMuDstMaker.h.
|
protected |
Definition at line 350 of file StMuDstMaker.h.
|
protected |
Definition at line 362 of file StMuDstMaker.h.
|
protected |
Definition at line 210 of file StMuDstMaker.h.
|
protected |
Definition at line 207 of file StMuDstMaker.h.
|
protected |
Definition at line 217 of file StMuDstMaker.h.
|
protected |
Definition at line 218 of file StMuDstMaker.h.
|
protected |
Definition at line 234 of file StMuDstMaker.h.
|
protected |
Definition at line 222 of file StMuDstMaker.h.
|
protected |
Definition at line 348 of file StMuDstMaker.h.
|
protected |
Definition at line 355 of file StMuDstMaker.h.
|
protected |
Definition at line 351 of file StMuDstMaker.h.
|
protected |
Definition at line 364 of file StMuDstMaker.h.
|
protected |
Definition at line 363 of file StMuDstMaker.h.
|
protected |
Definition at line 211 of file StMuDstMaker.h.
|
protected |
Definition at line 249 of file StMuDstMaker.h.
|
protected |
Definition at line 230 of file StMuDstMaker.h.
|
protected |
Definition at line 227 of file StMuDstMaker.h.
|
protected |
Definition at line 228 of file StMuDstMaker.h.
|
protected |
Definition at line 229 of file StMuDstMaker.h.
|
protected |
Definition at line 243 of file StMuDstMaker.h.
|
protected |
Definition at line 359 of file StMuDstMaker.h.
|
protected |
Definition at line 202 of file StMuDstMaker.h.
|
protected |
Definition at line 203 of file StMuDstMaker.h.
|
protected |
Definition at line 346 of file StMuDstMaker.h.
|
protected |
Definition at line 205 of file StMuDstMaker.h.
|
protected |
Definition at line 352 of file StMuDstMaker.h.
|
protected |
Definition at line 212 of file StMuDstMaker.h.
|
protected |
Definition at line 233 of file StMuDstMaker.h.
|
protected |
Definition at line 226 of file StMuDstMaker.h.
|
protected |
Definition at line 208 of file StMuDstMaker.h.
|
protected |
Definition at line 240 of file StMuDstMaker.h.
|
protected |
Definition at line 247 of file StMuDstMaker.h.