Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4AllDstPileupInputManager Class Reference

#include <coresoftware/blob/master/simulation/g4simulation/g4main/Fun4AllDstPileupInputManager.h>

+ Inheritance diagram for Fun4AllDstPileupInputManager:
+ Collaboration diagram for Fun4AllDstPileupInputManager:

Classes

class  Deleter
 random generator More...
 

Public Member Functions

 Fun4AllDstPileupInputManager (const std::string &name="DUMMY", const std::string &nodename="DST", const std::string &topnodename="TOP")
 
int fileopen (const std::string &filenam) override
 
int fileclose () override
 
int run (const int nevents=0) override
 
int BranchSelect (const std::string &branch, const int iflag) override
 
int setBranches () override
 
void Print (const std::string &what="ALL") const override
 
int PushBackEvents (const int i) override
 
int SyncIt (const SyncObject *) override
 
int GetSyncObject (SyncObject **) override
 
int NoSyncPushBackEvents (const int nevt) override
 
void setCollisionRate (double Hz)
 collision rate in Hz
 
void setTimeBetweenCrossings (double nsec)
 time between bunch crossing in ns
 
void setPileupTimeWindow (double tmin, double tmax)
 set time window for pileup events (ns)
 
void setDetectorActiveCrossings (const std::string &name, const int nbcross)
 for symmetric windows
 
void setDetectorActiveCrossings (const std::string &name, const int min, const int max)
 
- Public Member Functions inherited from Fun4AllInputManager
 ~Fun4AllInputManager () override
 
virtual int ReadInRunNode (PHCompositeNode *)
 
std::string FileName () const
 
void FileName (const std::string &fn)
 
virtual int skip (const int nevt)
 
int AddFile (const std::string &filename)
 
int AddListFile (const std::string &filename, const int do_it=0)
 
int registerSubsystem (SubsysReco *subsystem)
 
virtual int RejectEvent ()
 
void Repeat (const int i=-1)
 
virtual void setSyncManager (Fun4AllSyncManager *master)
 
virtual int ResetFileList ()
 
virtual int ResetEvent ()
 
virtual void SetRunNumber (const int runno)
 
virtual int RunNumber () const
 
void AddToFileOpened (const std::string &filename)
 
std::pair< std::list
< std::string >
::const_iterator, std::list
< std::string >
::const_iterator > 
FileOpenListBeginEnd ()
 
std::string InputNode ()
 
void InputNode (const std::string &innode)
 
std::string TopNodeName () const
 
bool FileListEmpty () const
 
virtual int IsOpen () const
 
virtual int SkipForThisManager (const int)
 
virtual int HasSyncObject () const
 
virtual std::string GetString (const std::string &) const
 
const std::list< std::string > GetFileList () const
 
const std::list< std::string > GetFileOpenedList () const
 
- Public Member Functions inherited from Fun4AllBase
virtual ~Fun4AllBase ()
 
virtual const std::string Name () const
 Returns the name of this module.
 
virtual void Name (const std::string &name)
 Sets the name of this module.
 
virtual void Verbosity (const int ival)
 Sets the verbosity of this module (0 by default=quiet).
 
virtual void Verbosity (enu_Verbosity ival)
 Sets the verbosity of this module (0 by default=quiet).
 
virtual int Verbosity () const
 Gets the verbosity of this module.
 

Private Member Functions

int runOne (const int nevents=0)
 loads one event on internal DST node
 

Private Attributes

std::string m_fullfilename
 
std::string m_RunNode = "RUN"
 
std::map< const std::string, int > m_branchread
 
PHCompositeNodem_dstNode = nullptr
 dst node from TopNode
 
PHCompositeNodem_runNode = nullptr
 run node from TopNode
 
std::unique_ptr< PHCompositeNodem_dstNodeInternal
 internal dst node to copy background events
 
std::unique_ptr< PHNodeIOManagerm_IManager
 input manager for active (trigger) events
 
double m_time_between_crossings = 106
 time between crossings. This is a RHIC constant (ns)
 
double m_collision_rate = 5e4
 collision rate (Hz)
 
double m_tmin = -13500
 min integration time for pileup in the TPC (ns)
 
double m_tmax = 13500
 max integration time for pileup in the TPC (ns)
 
std::unique_ptr< gsl_rng, Deleterm_rng
 
std::map< std::string,
std::pair< double, double > > 
m_DetectorTiming
 
event counters
bool m_ReadRunTTree = true
 
int m_ievent_total = 0
 
int m_ievent_thisfile = 0
 
internal runnodes to perform the summation over multiple runs
std::unique_ptr< PHCompositeNodem_runNodeCopy
 
std::unique_ptr< PHCompositeNodem_runNodeSum
 

Additional Inherited Members

- Public Types inherited from Fun4AllBase
enum  enu_Verbosity {
  VERBOSITY_QUIET = 0, VERBOSITY_SOME = 1, VERBOSITY_MORE = 2, VERBOSITY_EVEN_MORE = 3,
  VERBOSITY_A_LOT = 4, VERBOSITY_MAX = std::numeric_limits<int>::max() - 10
}
 
- Protected Member Functions inherited from Fun4AllInputManager
 Fun4AllInputManager (const std::string &name="DUMMY", const std::string &nodename="DST", const std::string &topnodename="TOP")
 
void UpdateFileList ()
 
int OpenNextFile ()
 
void IsOpen (const int i)
 
Fun4AllSyncManagerMySyncManager ()
 

Detailed Description

dedicated input manager that merges single events into "merged" events, containing a trigger event and a number of time-shifted pile-up events corresponding to a given pile-up rate

Definition at line 29 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 29 of file Fun4AllDstPileupInputManager.h

Constructor & Destructor Documentation

Fun4AllDstPileupInputManager::Fun4AllDstPileupInputManager ( const std::string &  name = "DUMMY",
const std::string &  nodename = "DST",
const std::string &  topnodename = "TOP" 
)

Definition at line 31 of file Fun4AllDstPileupInputManager.cc.

View newest version in sPHENIX GitHub at line 31 of file Fun4AllDstPileupInputManager.cc

References gsl_rng_set(), m_rng, and seed.

+ Here is the call graph for this function:

Member Function Documentation

int Fun4AllDstPileupInputManager::BranchSelect ( const std::string &  branch,
const int  iflag 
)
overridevirtual

Reimplemented from Fun4AllInputManager.

Definition at line 214 of file Fun4AllDstPileupInputManager.cc.

View newest version in sPHENIX GitHub at line 214 of file Fun4AllDstPileupInputManager.cc

References m_branchread, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int Fun4AllDstPileupInputManager::fileclose ( )
overridevirtual

Reimplemented from Fun4AllInputManager.

Definition at line 200 of file Fun4AllDstPileupInputManager.cc.

View newest version in sPHENIX GitHub at line 200 of file Fun4AllDstPileupInputManager.cc

References Fun4AllInputManager::IsOpen(), m_IManager, Fun4AllBase::Name(), and Fun4AllInputManager::UpdateFileList().

Referenced by fileopen(), and runOne().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int Fun4AllDstPileupInputManager::GetSyncObject ( SyncObject **  )
inlineoverridevirtual

Reimplemented from Fun4AllInputManager.

Definition at line 43 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 43 of file Fun4AllDstPileupInputManager.h

References Fun4AllReturnCodes::SYNC_NOOBJECT.

int Fun4AllDstPileupInputManager::NoSyncPushBackEvents ( const int  nevt)
inlineoverridevirtual

Reimplemented from Fun4AllInputManager.

Definition at line 44 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 44 of file Fun4AllDstPileupInputManager.h

References PushBackEvents().

+ Here is the call graph for this function:

void Fun4AllDstPileupInputManager::Print ( const std::string &  what = "ALL") const
overridevirtual

Print out some info about this module.

Parameters
whatcan be used to specify what to print exactly.

Reimplemented from Fun4AllInputManager.

Definition at line 279 of file Fun4AllDstPileupInputManager.cc.

View newest version in sPHENIX GitHub at line 279 of file Fun4AllDstPileupInputManager.cc

References m_branchread, m_IManager, Fun4AllBase::Name(), and Fun4AllInputManager::Print().

+ Here is the call graph for this function:

int Fun4AllDstPileupInputManager::PushBackEvents ( const int  i)
overridevirtual

Reimplemented from Fun4AllInputManager.

Definition at line 316 of file Fun4AllDstPileupInputManager.cc.

View newest version in sPHENIX GitHub at line 316 of file Fun4AllDstPileupInputManager.cc

References i, m_ievent_thisfile, m_ievent_total, m_IManager, Fun4AllBase::Name(), and PHWHERE.

Referenced by NoSyncPushBackEvents().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int Fun4AllDstPileupInputManager::run ( const int  nevents = 0)
overridevirtual
int Fun4AllDstPileupInputManager::runOne ( const int  nevents = 0)
private

loads one event on internal DST node

Definition at line 333 of file Fun4AllDstPileupInputManager.cc.

View newest version in sPHENIX GitHub at line 333 of file Fun4AllDstPileupInputManager.cc

References dummy, Fun4AllReturnCodes::EVENT_OK, fileclose(), Fun4AllInputManager::FileListEmpty(), Fun4AllInputManager::IsOpen(), m_dstNodeInternal, m_ievent_thisfile, m_ievent_total, m_IManager, Fun4AllBase::Name(), Fun4AllInputManager::OpenNextFile(), Fun4AllInputManager::RejectEvent(), and Fun4AllBase::Verbosity().

Referenced by run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int Fun4AllDstPileupInputManager::setBranches ( )
overridevirtual

Reimplemented from Fun4AllInputManager.

Definition at line 252 of file Fun4AllDstPileupInputManager.cc.

View newest version in sPHENIX GitHub at line 252 of file Fun4AllDstPileupInputManager.cc

References m_branchread, m_IManager, Fun4AllBase::Name(), PHWHERE, and Fun4AllBase::Verbosity().

Referenced by fileopen().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Fun4AllDstPileupInputManager::setCollisionRate ( double  Hz)
inline

collision rate in Hz

Definition at line 47 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 47 of file Fun4AllDstPileupInputManager.h

References m_collision_rate.

void Fun4AllDstPileupInputManager::setDetectorActiveCrossings ( const std::string &  name,
const int  nbcross 
)

for symmetric windows

Definition at line 392 of file Fun4AllDstPileupInputManager.cc.

View newest version in sPHENIX GitHub at line 392 of file Fun4AllDstPileupInputManager.cc

void Fun4AllDstPileupInputManager::setDetectorActiveCrossings ( const std::string &  name,
const int  min,
const int  max 
)

Definition at line 397 of file Fun4AllDstPileupInputManager.cc.

View newest version in sPHENIX GitHub at line 397 of file Fun4AllDstPileupInputManager.cc

References m_DetectorTiming, m_time_between_crossings, and perf_headwind::name.

void Fun4AllDstPileupInputManager::setPileupTimeWindow ( double  tmin,
double  tmax 
)
inline

set time window for pileup events (ns)

Definition at line 55 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 55 of file Fun4AllDstPileupInputManager.h

References m_tmax, and m_tmin.

void Fun4AllDstPileupInputManager::setTimeBetweenCrossings ( double  nsec)
inline

time between bunch crossing in ns

Definition at line 51 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 51 of file Fun4AllDstPileupInputManager.h

References m_time_between_crossings.

int Fun4AllDstPileupInputManager::SyncIt ( const SyncObject )
inlineoverridevirtual

Reimplemented from Fun4AllInputManager.

Definition at line 42 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 42 of file Fun4AllDstPileupInputManager.h

References Fun4AllReturnCodes::SYNC_OK.

Member Data Documentation

std::map<const std::string, int> Fun4AllDstPileupInputManager::m_branchread
private

Definition at line 79 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 79 of file Fun4AllDstPileupInputManager.h

Referenced by BranchSelect(), Print(), and setBranches().

double Fun4AllDstPileupInputManager::m_collision_rate = 5e4
private

collision rate (Hz)

Definition at line 104 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 104 of file Fun4AllDstPileupInputManager.h

Referenced by run(), and setCollisionRate().

std::map<std::string,std::pair<double,double> > Fun4AllDstPileupInputManager::m_DetectorTiming
private

Definition at line 121 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 121 of file Fun4AllDstPileupInputManager.h

Referenced by run(), and setDetectorActiveCrossings().

PHCompositeNode* Fun4AllDstPileupInputManager::m_dstNode = nullptr
private

dst node from TopNode

Definition at line 82 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 82 of file Fun4AllDstPileupInputManager.h

Referenced by fileopen(), and run().

std::unique_ptr<PHCompositeNode> Fun4AllDstPileupInputManager::m_dstNodeInternal
private

internal dst node to copy background events

Definition at line 88 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 88 of file Fun4AllDstPileupInputManager.h

Referenced by fileopen(), run(), and runOne().

std::string Fun4AllDstPileupInputManager::m_fullfilename
private

Definition at line 77 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 77 of file Fun4AllDstPileupInputManager.h

Referenced by fileopen().

int Fun4AllDstPileupInputManager::m_ievent_thisfile = 0
private

Definition at line 74 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 74 of file Fun4AllDstPileupInputManager.h

Referenced by fileopen(), PushBackEvents(), run(), and runOne().

int Fun4AllDstPileupInputManager::m_ievent_total = 0
private

Definition at line 73 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 73 of file Fun4AllDstPileupInputManager.h

Referenced by PushBackEvents(), and runOne().

std::unique_ptr<PHNodeIOManager> Fun4AllDstPileupInputManager::m_IManager
private

input manager for active (trigger) events

corresponding nodes are copied directly to the topNode

Definition at line 98 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 98 of file Fun4AllDstPileupInputManager.h

Referenced by fileclose(), fileopen(), Print(), PushBackEvents(), runOne(), and setBranches().

bool Fun4AllDstPileupInputManager::m_ReadRunTTree = true
private

Definition at line 72 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 72 of file Fun4AllDstPileupInputManager.h

Referenced by fileopen().

std::unique_ptr<gsl_rng, Deleter> Fun4AllDstPileupInputManager::m_rng
private

Definition at line 119 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 119 of file Fun4AllDstPileupInputManager.h

Referenced by Fun4AllDstPileupInputManager(), and run().

std::string Fun4AllDstPileupInputManager::m_RunNode = "RUN"
private

Definition at line 78 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 78 of file Fun4AllDstPileupInputManager.h

Referenced by fileopen().

PHCompositeNode* Fun4AllDstPileupInputManager::m_runNode = nullptr
private

run node from TopNode

Definition at line 85 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 85 of file Fun4AllDstPileupInputManager.h

Referenced by fileopen().

std::unique_ptr<PHCompositeNode> Fun4AllDstPileupInputManager::m_runNodeCopy
private

Definition at line 92 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 92 of file Fun4AllDstPileupInputManager.h

Referenced by fileopen().

std::unique_ptr<PHCompositeNode> Fun4AllDstPileupInputManager::m_runNodeSum
private

Definition at line 93 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 93 of file Fun4AllDstPileupInputManager.h

Referenced by fileopen().

double Fun4AllDstPileupInputManager::m_time_between_crossings = 106
private

time between crossings. This is a RHIC constant (ns)

Definition at line 101 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 101 of file Fun4AllDstPileupInputManager.h

Referenced by run(), setDetectorActiveCrossings(), and setTimeBetweenCrossings().

double Fun4AllDstPileupInputManager::m_tmax = 13500
private

max integration time for pileup in the TPC (ns)

Definition at line 110 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 110 of file Fun4AllDstPileupInputManager.h

Referenced by run(), and setPileupTimeWindow().

double Fun4AllDstPileupInputManager::m_tmin = -13500
private

min integration time for pileup in the TPC (ns)

Definition at line 107 of file Fun4AllDstPileupInputManager.h.

View newest version in sPHENIX GitHub at line 107 of file Fun4AllDstPileupInputManager.h

Referenced by run(), and setPileupTimeWindow().


The documentation for this class was generated from the following files: