UtilHepevt Namespace Reference

Classes

class  gs__initialize_utilhepevt_excludelist
 ugly-ness to get the list initialized upon library load More...

Functions

double unitScale (UtilHepevt::cunits_t cvu)
 Get "standardized" unit convertion factors.
const char * asString (cunits_t cvu)
 Convert cunits_t to/from string.
cunits_t string2cunits (const char *cstr)
int firstIndex (UtilHepevt::iofmt_t ftype)
 For text based I/O what is the first index (fortran=1 vs. C=0).
std::set< int > & getVtxExcludeStatusList ()
int testVtxExcludeStatus (int istatus)
 test for value in excluded set (1=yes, 0=no)
void setStdVtxExcludeStatusList (int collection=2)
 set a useful set of values
void printVtxExcludeStatusList ()
 print the current settings
TClonesArray * getEmptyStdHep (int dfltsiz=-1)
 Construct a suitable TClonesArray of TParticles.
TClonesArray * readAscii (std::istream &istrm, const TLorentzVector &vtx_offset=TLorentzVector())
void writeAscii (std::ostream &ostrm, const TClonesArray *stdhep, UtilHepevt::iofmt_t=UtilHepevt::k_io_dump, int evtnum=0, int verbose=1)
void dump (const TClonesArray *stdhep, int verbose=0)
int modStatusStdHep (TClonesArray *stdhep, std::string conditional, int istflag=0xdead)
 Flag entries that pass conditional with a new status code.
int squeezeStdHep (TClonesArray *stdhep, int istflag=0xdead)
void appendStdHep (TClonesArray *stdhep, const TClonesArray *addon, const TLorentzVector vtx_offset=TLorentzVector())
 Append one StdHep list to another (w/ potential vertex offset).
void applyUnitConvert (TClonesArray *stdhep, cunits_t vtxConvert=UtilHepevt::k_mtomm, cunits_t tConvert=UtilHepevt::k_sectomm, cunits_t eConvert=UtilHepevt::k_none)
int getNHep ()
 # of entries in /HEPEVT/ common block.
int getNevHep ()
 Get/Set Event # in /HEPEVT/ common block.
void setNevHep (int evtnum)
void clearCommon (bool fast=false)
 Clear /HEPEVT/ common block.
int unpackCommon (TClonesArray *stdhep, cunits_t vtxConvert=UtilHepevt::k_mmtom, cunits_t tConvert=UtilHepevt::k_mmtosec, cunits_t eConvert=UtilHepevt::k_none)
int fillCommon (const TClonesArray *stdhep, cunits_t vtxCvu=UtilHepevt::k_mtomm, cunits_t tCvu=UtilHepevt::k_sectomm, cunits_t eCvu=UtilHepevt::k_none)
 Copy info from TClonesArray of TParticles into /HEPEVT/ common block.
int openBinary (std::string fname, bool write=false)
 Open FORTRAN binary file (returns filedescriptor).
void closeBinary (int &fd)
 Close FORTRAN binary file (zero out filedescriptor).
int readBinary (int &fd)
bool writeBinary (int fd, int szrecmrk=4)
 Write FORTRAN compatible binary file of /HEPEVT/.

Function Documentation

void UtilHepevt::appendStdHep ( TClonesArray *  stdhep,
const TClonesArray *  addon,
const TLorentzVector  vtx_offset = TLorentzVector() 
)

Append one StdHep list to another (w/ potential vertex offset).

Referenced by HepevtModule::Get().

void UtilHepevt::applyUnitConvert ( TClonesArray *  stdhep,
cunits_t  vtxConvert = UtilHepevt::k_mtomm,
cunits_t  tConvert = UtilHepevt::k_sectomm,
cunits_t  eConvert = UtilHepevt::k_none 
)

Apply conversion factors to StdHep array elements vtxConvert applied to x,y,z; tConvert to time; eConvert to px,py,pz,E,m

Referenced by HepevtModule::Get().

const char* UtilHepevt::asString ( cunits_t  cvu  ) 

Convert cunits_t to/from string.

Referenced by HepevtModule::Config().

void UtilHepevt::clearCommon ( bool  fast = false  ) 

Clear /HEPEVT/ common block.

void UtilHepevt::closeBinary ( int &  fd  ) 

Close FORTRAN binary file (zero out filedescriptor).

Referenced by WriteStdHepFileModule::CloseFile(), and HepevtModule::Config().

void UtilHepevt::dump ( const TClonesArray *  stdhep,
int  verbose = 0 
)

Formatted dump of StdHep array to standard output. verbose: 0=no vtx, 1=w/ vtx

int UtilHepevt::fillCommon ( const TClonesArray *  stdhep,
cunits_t  vtxCvu = UtilHepevt::k_mtomm,
cunits_t  tCvu = UtilHepevt::k_sectomm,
cunits_t  eCvu = UtilHepevt::k_none 
)

Copy info from TClonesArray of TParticles into /HEPEVT/ common block.

Referenced by WriteStdHepFileModule::Ana().

int UtilHepevt::firstIndex ( UtilHepevt::iofmt_t  ftype  )  [inline]

For text based I/O what is the first index (fortran=1 vs. C=0).

Definition at line 79 of file UtilHepevt.h.

References k_io_HepMC.

00080   { if ( ftype == k_io_HepMC ) return 1; else return 0; }

TClonesArray* UtilHepevt::getEmptyStdHep ( int  dfltsiz = -1  ) 

Construct a suitable TClonesArray of TParticles.

Operations on "StdHep" objects (TClonesArray of TParticles)

Referenced by GenieModule::FillStdHep(), HepevtModule::FindOrCreateSimSnarlRecord(), and HepevtModule::Get().

int UtilHepevt::getNevHep (  ) 

Get/Set Event # in /HEPEVT/ common block.

Referenced by HepevtModule::Get().

int UtilHepevt::getNHep (  ) 

# of entries in /HEPEVT/ common block.

Exchanges with /HEPEVT/ common block

std::set<int>& UtilHepevt::getVtxExcludeStatusList (  ) 

It is sometimes useful to exclude entries with particular status codes from having scale factors or offset applied to their vertex info. The VtxExcludeStatusList provides this functionality by maintaining a set of status codes to exclude from such operations. One can add to the list (or clear it) by getting the container and using the .insert(istatus) or .clear() methods.

int UtilHepevt::modStatusStdHep ( TClonesArray *  stdhep,
std::string  conditional,
int  istflag = 0xdead 
)

Flag entries that pass conditional with a new status code.

Referenced by HepevtModule::ModifyStdHep(), and RerootToTruthModule::ModifyStdHep().

int UtilHepevt::openBinary ( std::string  fname,
bool  write = false 
)

Open FORTRAN binary file (returns filedescriptor).

Referenced by HepevtModule::Config(), and WriteStdHepFileModule::OpenFile().

void UtilHepevt::printVtxExcludeStatusList (  ) 

print the current settings

TClonesArray* UtilHepevt::readAscii ( std::istream &  istrm,
const TLorentzVector &  vtx_offset = TLorentzVector() 
)

Read an event into StdHep array from istream. Caller takes posession of the array, null ptr means error. Assume istream is attached to input; on error or EOF, close it.

Referenced by HepevtModule::Get().

int UtilHepevt::readBinary ( int &  fd  ) 

Read FORTRAN compatible binary file of /HEPEVT/. Return # of rows; negative value means an error. Upon EOF fd will be closed and zero'ed out.

Referenced by HepevtModule::Get().

void UtilHepevt::setNevHep ( int  evtnum  ) 
void UtilHepevt::setStdVtxExcludeStatusList ( int  collection = 2  ) 
int UtilHepevt::squeezeStdHep ( TClonesArray *  stdhep,
int  istflag = 0xdead 
)

Remove entries with status code "istflag" from StdHep adjusting mother/daughter indices to account for change.

Referenced by HepevtModule::ModifyStdHep(), and RerootToTruthModule::ModifyStdHep().

cunits_t UtilHepevt::string2cunits ( const char *  cstr  ) 

Referenced by HepevtModule::Config().

int UtilHepevt::testVtxExcludeStatus ( int  istatus  ) 

test for value in excluded set (1=yes, 0=no)

double UtilHepevt::unitScale ( UtilHepevt::cunits_t  cvu  ) 

Get "standardized" unit convertion factors.

int UtilHepevt::unpackCommon ( TClonesArray *  stdhep,
cunits_t  vtxConvert = UtilHepevt::k_mmtom,
cunits_t  tConvert = UtilHepevt::k_mmtosec,
cunits_t  eConvert = UtilHepevt::k_none 
)

Copy info from the /HEPEVT/ common block into the supplied TClonesArray of TParticles.

Referenced by HepevtModule::Get().

void UtilHepevt::writeAscii ( std::ostream &  ostrm,
const TClonesArray *  stdhep,
UtilHepevt::iofmt_t  = UtilHepevt::k_io_dump,
int  evtnum = 0,
int  verbose = 1 
)

Write StdHep array to ASCII file via ostream verbose: 0=no vtx, 1=w/ vtx (only valid for k_dump)

bool UtilHepevt::writeBinary ( int  fd,
int  szrecmrk = 4 
)

Write FORTRAN compatible binary file of /HEPEVT/.

Referenced by WriteStdHepFileModule::Ana().


Generated on 24 Jul 2018 for loon by  doxygen 1.6.1