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

#include <analysis/blob/master/EventMix/src/PairMaker.h>

+ Inheritance diagram for PairMaker:
+ Collaboration diagram for PairMaker:

Public Member Functions

 PairMaker (const std::string &name="PairMaker", const std::string &filename="test.root")
 
virtual ~PairMaker ()
 
int Init (PHCompositeNode *topNode)
 
int InitRun (PHCompositeNode *topNode)
 
int process_event (PHCompositeNode *topNode)
 
int End (PHCompositeNode *topNode)
 Called at the end of all processing.
 
- Public Member Functions inherited from SubsysReco
 ~SubsysReco () override
 
virtual int EndRun (const int)
 Called at the end of each run.
 
virtual int Reset (PHCompositeNode *)
 Reset.
 
virtual int ResetEvent (PHCompositeNode *)
 Clean up after each event.
 
void Print (const std::string &="ALL") const override
 
- 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.
 

Protected Member Functions

int process_event_test (PHCompositeNode *topNode)
 
int MakeMixedPairs (std::vector< sPHElectronv1 > elepos, sPHElectronPairContainerv1 *eePairs, unsigned int centbin)
 
bool isElectron (SvtxTrack *)
 
- Protected Member Functions inherited from SubsysReco
 SubsysReco (const std::string &name="NONAME")
 
- Protected Member Functions inherited from Fun4AllBase
 Fun4AllBase (const std::string &name="NONAME")
 

Protected Attributes

std::string outnodename
 
std::vector< sPHElectronv1_buffer [NZ][NCENT]
 
unsigned int _min_buffer_depth
 
unsigned int _max_buffer_depth
 
double _ZMAX
 
double _ZMIN
 
std::vector< double_multbins
 
TRandom * _rng
 
int EventNumber
 

Static Protected Attributes

static const int NZ = 2
 
static const int NCENT = 2
 

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
}
 

Detailed Description

Definition at line 18 of file PairMaker.h.

View newest version in sPHENIX GitHub at line 18 of file PairMaker.h

Constructor & Destructor Documentation

PairMaker::PairMaker ( const std::string &  name = "PairMaker",
const std::string &  filename = "test.root" 
)

Definition at line 52 of file PairMaker.cc.

View newest version in sPHENIX GitHub at line 52 of file PairMaker.cc

References _max_buffer_depth, _min_buffer_depth, _multbins, _rng, _ZMAX, _ZMIN, EventNumber, and outnodename.

virtual PairMaker::~PairMaker ( )
inlinevirtual

Definition at line 23 of file PairMaker.h.

View newest version in sPHENIX GitHub at line 23 of file PairMaker.h

Member Function Documentation

int PairMaker::End ( PHCompositeNode )
virtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 386 of file PairMaker.cc.

View newest version in sPHENIX GitHub at line 386 of file PairMaker.cc

References _buffer, Fun4AllReturnCodes::EVENT_OK, i, j, NCENT, NZ, and size.

int PairMaker::Init ( PHCompositeNode )
virtual

Called during initialization. Typically this is where you can book histograms, and e.g. register them to Fun4AllServer (so they can be output to file using Fun4AllServer::dumpHistos() method).

Reimplemented from SubsysReco.

Definition at line 71 of file PairMaker.cc.

View newest version in sPHENIX GitHub at line 71 of file PairMaker.cc

References _rng, Fun4AllReturnCodes::ABORTEVENT, PHCompositeNode::addNode(), Fun4AllReturnCodes::EVENT_OK, PHNodeIterator::findFirst(), outnodename, and PHWHERE.

+ Here is the call graph for this function:

int PairMaker::InitRun ( PHCompositeNode )
virtual

Called for first event when run number is known. Typically this is where you may want to fetch data from database, because you know the run number.

Reimplemented from SubsysReco.

Definition at line 102 of file PairMaker.cc.

View newest version in sPHENIX GitHub at line 102 of file PairMaker.cc

References Fun4AllReturnCodes::EVENT_OK.

bool PairMaker::isElectron ( SvtxTrack trk)
protected

Definition at line 352 of file PairMaker.cc.

View newest version in sPHENIX GitHub at line 352 of file PairMaker.cc

References SvtxTrack::begin_cluster_keys(), Enable::CEMC, SvtxTrack::end_cluster_keys(), SvtxTrack::get_cal_energy_3x3(), SvtxTrack::get_chisq(), SvtxTrack::get_ndf(), SvtxTrack::get_px(), SvtxTrack::get_py(), SvtxTrack::get_pz(), TrkrDefs::getTrkrId(), and physmon_track_finding_ttbar::pt.

+ Here is the call graph for this function:

int PairMaker::MakeMixedPairs ( std::vector< sPHElectronv1 elepos,
sPHElectronPairContainerv1 eePairs,
unsigned int  centbin 
)
protected

Definition at line 306 of file PairMaker.cc.

View newest version in sPHENIX GitHub at line 306 of file PairMaker.cc

References _buffer, _min_buffer_depth, _rng, _ZMAX, _ZMIN, Acts::Test::at, INTTVtxZ::centbin, test_fpe::count, sPHElectronv1::get_charge(), sPHElectronPairv1::get_mass(), sPHElectronv1::get_zvtx(), i, sPHElectronPairContainerv1::insert(), k, NZ, physmon_simulation::rnd, sPHElectronPairv1::set_type(), size, parse_cmake_options::type, and physmon_track_finding_ttbar::z.

Referenced by process_event_test().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PairMaker::process_event ( PHCompositeNode )
virtual

Called for each event. This is where you do the real work.

Reimplemented from SubsysReco.

Definition at line 109 of file PairMaker.cc.

View newest version in sPHENIX GitHub at line 109 of file PairMaker.cc

References process_event_test().

+ Here is the call graph for this function:

int PairMaker::process_event_test ( PHCompositeNode topNode)
protected

Definition at line 116 of file PairMaker.cc.

View newest version in sPHENIX GitHub at line 116 of file PairMaker.cc

References _buffer, _multbins, _ZMAX, _ZMIN, Fun4AllReturnCodes::ABORTEVENT, Enable::CEMC, INTTVtxZ::centbin, charge(), double(), TrackPidAssoc::electron, Fun4AllReturnCodes::EVENT_OK, EventNumber, GlobalVertexMap::get(), SvtxTrackMap::get(), SvtxTrack::get_cal_cluster_e(), SvtxTrack::get_cal_cluster_id(), SvtxTrack::get_cal_cluster_key(), SvtxTrack::get_charge(), RawCluster::get_chi2(), RawCluster::get_ecore(), RawCluster::get_energy(), sPHElectronPairv1::get_mass(), RawCluster::get_prob(), SvtxTrack::get_px(), SvtxTrack::get_py(), SvtxTrack::get_vertex_id(), GlobalVertex::get_x(), SvtxTrack::get_x(), GlobalVertex::get_y(), SvtxTrack::get_y(), GlobalVertex::get_z(), SvtxTrack::get_z(), RawClusterContainer::getCluster(), RawClusterContainer::getClusters(), TrackPidAssoc::getTracks(), i, sPHElectronPairContainerv1::insert(), it, j, MakeMixedPairs(), mass, NCENT, NZ, outnodename, PHWHERE, PHCompositeNode::print(), physmon_track_finding_ttbar::pt, sPHElectronv1::set_cemc_chi2(), sPHElectronv1::set_cemc_ecore(), sPHElectronv1::set_cemc_prob(), sPHElectronPairv1::set_type(), sPHElectronv1::set_zvtx(), GlobalVertexMap::size(), SvtxTrackMap::size(), parse_cmake_options::type, ambiguity_solver_full_chain::x, y, and physmon_track_finding_ttbar::z.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

std::vector<sPHElectronv1> PairMaker::_buffer[NZ][NCENT]
protected

Definition at line 40 of file PairMaker.h.

View newest version in sPHENIX GitHub at line 40 of file PairMaker.h

Referenced by End(), MakeMixedPairs(), and process_event_test().

unsigned int PairMaker::_max_buffer_depth
protected

Definition at line 42 of file PairMaker.h.

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

Referenced by PairMaker().

unsigned int PairMaker::_min_buffer_depth
protected

Definition at line 41 of file PairMaker.h.

View newest version in sPHENIX GitHub at line 41 of file PairMaker.h

Referenced by MakeMixedPairs(), and PairMaker().

std::vector<double> PairMaker::_multbins
protected

Definition at line 45 of file PairMaker.h.

View newest version in sPHENIX GitHub at line 45 of file PairMaker.h

Referenced by PairMaker(), and process_event_test().

TRandom* PairMaker::_rng
protected

Definition at line 47 of file PairMaker.h.

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

Referenced by Init(), MakeMixedPairs(), and PairMaker().

double PairMaker::_ZMAX
protected

Definition at line 43 of file PairMaker.h.

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

Referenced by MakeMixedPairs(), PairMaker(), and process_event_test().

double PairMaker::_ZMIN
protected

Definition at line 44 of file PairMaker.h.

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

Referenced by MakeMixedPairs(), PairMaker(), and process_event_test().

int PairMaker::EventNumber
protected

Definition at line 49 of file PairMaker.h.

View newest version in sPHENIX GitHub at line 49 of file PairMaker.h

Referenced by PairMaker(), and process_event_test().

const int PairMaker::NCENT = 2
staticprotected

Definition at line 39 of file PairMaker.h.

View newest version in sPHENIX GitHub at line 39 of file PairMaker.h

Referenced by End(), and process_event_test().

const int PairMaker::NZ = 2
staticprotected

Definition at line 38 of file PairMaker.h.

View newest version in sPHENIX GitHub at line 38 of file PairMaker.h

Referenced by End(), MakeMixedPairs(), and process_event_test().

std::string PairMaker::outnodename
protected

Definition at line 37 of file PairMaker.h.

View newest version in sPHENIX GitHub at line 37 of file PairMaker.h

Referenced by Init(), PairMaker(), and process_event_test().


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