Analysis Software
Documentation for sPHENIX simulation software
|
#include <coresoftware/blob/master/simulation/g4simulation/g4waveformsim/CaloWaveformSim.h>
Public Types | |
enum | NoiseType { NOISE_NONE = 0, NOISE_GAUSSIAN = 1, NOISE_TREE = 2 } |
Public Member Functions | |
CaloWaveformSim (const std::string &name="CaloWaveformSim") | |
~CaloWaveformSim () override | |
int | Init (PHCompositeNode *topNode) override |
int | process_event (PHCompositeNode *topNode) override |
int | End (PHCompositeNode *topNode) override |
Called at the end of all processing. | |
void | set_detector_type (CaloTowerDefs::DetectorSystem dettype) |
void | set_detector (const std::string &detector) |
void | set_fieldname (const std::string &fieldname) |
void | set_calibName (const std::string &calibName) |
void | set_overrideCalibName (bool overrideCalibName) |
void | set_overrideFieldName (bool overrideFieldName) |
void | set_templatefile (const std::string &templatefile) |
void | set_nsamples (int _nsamples) |
void | set_pedestalsamples (int _pedestalsamples) |
void | set_noise_type (NoiseType noiseType) |
void | set_fixpedestal (int _fixpedestal) |
void | set_gaussian_noise (int _gaussian_noise) |
void | set_deltaT (float _deltaT) |
void | set_timewidth (float _timewidth) |
void | set_peakpos (float _peakpos) |
LightCollectionModel & | get_light_collection_model () |
Public Member Functions inherited from SubsysReco | |
~SubsysReco () override | |
virtual int | EndRun (const int) |
Called at the end of each run. | |
virtual int | InitRun (PHCompositeNode *) |
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. | |
Private Member Functions | |
void | maphitetaphi (PHG4Hit *g4hit, unsigned short &etabin, unsigned short &phibin, float &correction) |
double | template_function (double *x, double *par) |
void | CreateNodeTree (PHCompositeNode *topNode) |
Private Attributes | |
CaloTowerDefs::DetectorSystem | m_dettype {CaloTowerDefs::CEMC} |
std::string | m_detector {"CEMC"} |
std::string | m_fieldname {"Femc_datadriven_qm1_correction"} |
std::string | m_calibName {"cemc_pi0_twrSlope_v1"} |
bool | m_overrideCalibName {false} |
bool | m_overrideFieldName {false} |
CDBTTree * | cdbttree {nullptr} |
std::string | m_templatefile {"waveformtemptempohcalcosmic.root"} |
TProfile * | h_template {nullptr} |
TowerInfoContainer * | m_CaloWaveformContainer {nullptr} |
TowerInfoContainer * | m_PedestalContainer {nullptr} |
std::vector< std::vector< float > > | m_waveforms = {{}} |
int | m_runNumber {0} |
int | m_nsamples {31} |
int | m_nchannels {24576} |
int | m_pedestalsamples {12} |
float | m_sampletime {50. / 3.} |
int | m_fixpedestal {1500} |
int | m_gaussian_noise {3} |
float | m_deltaT {100.} |
float | m_timeshiftwidth {0.} |
float | m_peakpos {6.} |
gsl_rng * | m_RandomGenerator {nullptr} |
PHG4CylinderCellGeom_Spacalv1 * | geo {nullptr} |
const PHG4CylinderGeom_Spacalv3 * | layergeom {nullptr} |
float | m_sampling_fraction = {1.0} |
unsigned int(* | encode_tower )(const unsigned int etabin, const unsigned int phibin) |
unsigned int(* | decode_tower )(const unsigned int tower_key) |
LightCollectionModel | light_collection_model |
NoiseType | m_noiseType {NOISE_TREE} |
Additional Inherited Members | |
Protected Member Functions inherited from SubsysReco | |
SubsysReco (const std::string &name="NONAME") | |
Definition at line 28 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 28 of file CaloWaveformSim.h
Definition at line 35 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 35 of file CaloWaveformSim.h
CaloWaveformSim::CaloWaveformSim | ( | const std::string & | name = "CaloWaveformSim" | ) |
Definition at line 48 of file CaloWaveformSim.cc.
View newest version in sPHENIX GitHub at line 48 of file CaloWaveformSim.cc
|
override |
Definition at line 53 of file CaloWaveformSim.cc.
View newest version in sPHENIX GitHub at line 53 of file CaloWaveformSim.cc
References m_RandomGenerator.
|
private |
Definition at line 391 of file CaloWaveformSim.cc.
View newest version in sPHENIX GitHub at line 391 of file CaloWaveformSim.cc
References PHCompositeNode::addNode(), CaloTowerDefs::CEMC, CaloTowerDefs::DETECTOR_INVALID, PHNodeIterator::findFirst(), CaloTowerDefs::HCALIN, CaloTowerDefs::HCALOUT, m_CaloWaveformContainer, m_detector, m_dettype, and PHWHERE.
Referenced by Init().
|
overridevirtual |
Called at the end of all processing.
Reimplemented from SubsysReco.
Definition at line 385 of file CaloWaveformSim.cc.
View newest version in sPHENIX GitHub at line 385 of file CaloWaveformSim.cc
References Fun4AllReturnCodes::EVENT_OK.
|
inline |
Definition at line 129 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 129 of file CaloWaveformSim.h
References light_collection_model.
|
overridevirtual |
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 58 of file CaloWaveformSim.cc.
View newest version in sPHENIX GitHub at line 58 of file CaloWaveformSim.cc
References assert, cdbttree, CaloTowerDefs::CEMC, CreateNodeTree(), TowerInfoDefs::decode_emcal(), TowerInfoDefs::decode_hcal(), decode_tower, Acts::UnitConstants::e, TowerInfoDefs::encode_emcal(), TowerInfoDefs::encode_hcal(), encode_tower, Fun4AllReturnCodes::EVENT_OK, EventHeader::get_RunNumber(), CDBInterface::getUrl(), gsl_rng_set(), h_template, CaloTowerDefs::HCALIN, CaloTowerDefs::HCALOUT, CDBInterface::instance(), m_calibName, m_detector, m_dettype, m_fieldname, m_nchannels, m_nsamples, m_overrideCalibName, m_overrideFieldName, m_RandomGenerator, m_runNumber, m_sampling_fraction, m_templatefile, m_waveforms, seed, and Fun4AllBase::Verbosity().
|
private |
Definition at line 322 of file CaloWaveformSim.cc.
View newest version in sPHENIX GitHub at line 322 of file CaloWaveformSim.cc
References assert, CaloTowerDefs::CEMC, PHG4CylinderGeom_Spacalv3::scint_id_coder::fiber_ID, geo, PHG4CylinderCellGeom_Spacalv1::get_etabin_block(), LightCollectionModel::get_fiber_transmission(), PHG4Hit::get_hit_id(), LightCollectionModel::get_light_guide_efficiency(), PHG4Hit::get_local_z(), PHG4CylinderGeom_Spacalv3::get_n_subtower_eta(), PHG4CylinderGeom_Spacalv3::get_n_subtower_phi(), PHG4Hit::get_scint_id(), PHG4CylinderGeom_Spacalv3::get_sector_tower_map(), PHG4CylinderGeom_Spacalv3::get_tower_z_phi_ID(), CaloTowerDefs::HCALIN, CaloTowerDefs::HCALOUT, PHG4HitDefs::hit_idbits, layergeom, light_collection_model, m_dettype, PHWHERE, PHG4CylinderGeom_Spacalv3::scint_id_coder::sector_ID, PHG4CylinderGeom_Spacalv3::scint_id_coder::tower_ID, LightCollectionModel::use_fiber_model(), ambiguity_solver_full_chain::x, y, and physmon_track_finding_ttbar::z.
Referenced by process_event().
|
overridevirtual |
Called for each event. This is where you do the real work.
Reimplemented from SubsysReco.
Definition at line 188 of file CaloWaveformSim.cc.
View newest version in sPHENIX GitHub at line 188 of file CaloWaveformSim.cc
References INTT::ADC, assert, cdbttree, CaloTowerDefs::CEMC, decode_tower, encode_tower, KF_timing::etabin, Fun4AllReturnCodes::EVENT_OK, geo, PHG4Hit::get_light_yield(), PHG4Hit::get_t(), TowerInfoContainer::get_tower_at_channel(), TowerInfo::get_waveform_value(), PHG4CylinderCellGeomContainer::GetFirstLayerCellGeom(), PHG4CylinderGeomContainer::GetFirstLayerGeom(), CDBTTree::GetFloatValue(), PHG4HitContainer::getHits(), i, j, layergeom, m_CaloWaveformContainer, m_deltaT, m_detector, m_dettype, m_fieldname, m_fixpedestal, m_gaussian_noise, m_nchannels, m_noiseType, m_nsamples, m_peakpos, m_PedestalContainer, m_pedestalsamples, m_RandomGenerator, m_sampletime, m_sampling_fraction, m_timeshiftwidth, m_waveforms, maphitetaphi(), PHWHERE, TowerInfo::set_waveform_value(), template_function(), Fun4AllBase::Verbosity(), and ambiguity_solver_full_chain::x.
|
inline |
Definition at line 67 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 67 of file CaloWaveformSim.h
References m_calibName, and m_overrideCalibName.
|
inline |
Definition at line 113 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 113 of file CaloWaveformSim.h
References m_deltaT.
|
inline |
Definition at line 57 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 57 of file CaloWaveformSim.h
References m_detector.
|
inline |
Definition at line 52 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 52 of file CaloWaveformSim.h
References m_dettype.
|
inline |
Definition at line 62 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 62 of file CaloWaveformSim.h
References m_fieldname.
|
inline |
Definition at line 103 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 103 of file CaloWaveformSim.h
References m_fixpedestal.
|
inline |
Definition at line 108 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 108 of file CaloWaveformSim.h
References m_gaussian_noise.
|
inline |
Definition at line 98 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 98 of file CaloWaveformSim.h
References m_noiseType.
|
inline |
Definition at line 88 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 88 of file CaloWaveformSim.h
References m_nsamples.
|
inline |
Definition at line 73 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 73 of file CaloWaveformSim.h
References m_overrideCalibName.
|
inline |
Definition at line 78 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 78 of file CaloWaveformSim.h
References m_overrideFieldName.
|
inline |
Definition at line 123 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 123 of file CaloWaveformSim.h
References m_peakpos.
|
inline |
Definition at line 93 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 93 of file CaloWaveformSim.h
References m_pedestalsamples.
|
inline |
Definition at line 83 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 83 of file CaloWaveformSim.h
References m_templatefile.
|
inline |
Definition at line 118 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 118 of file CaloWaveformSim.h
References m_timeshiftwidth.
Definition at line 42 of file CaloWaveformSim.cc.
View newest version in sPHENIX GitHub at line 42 of file CaloWaveformSim.cc
References h_template, and v1.
Referenced by process_event().
|
private |
Definition at line 138 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 138 of file CaloWaveformSim.h
Referenced by Init(), and process_event().
|
inlineprivate |
Definition at line 162 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 162 of file CaloWaveformSim.h
Referenced by Init(), and process_event().
|
inlineprivate |
Definition at line 161 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 161 of file CaloWaveformSim.h
Referenced by Init(), and process_event().
|
private |
Definition at line 157 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 157 of file CaloWaveformSim.h
Referenced by maphitetaphi(), and process_event().
|
private |
Definition at line 140 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 140 of file CaloWaveformSim.h
Referenced by Init(), and template_function().
|
private |
Definition at line 158 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 158 of file CaloWaveformSim.h
Referenced by maphitetaphi(), and process_event().
|
private |
Definition at line 166 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 166 of file CaloWaveformSim.h
Referenced by get_light_collection_model(), and maphitetaphi().
|
private |
Definition at line 135 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 135 of file CaloWaveformSim.h
Referenced by Init(), and set_calibName().
|
private |
Definition at line 141 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 141 of file CaloWaveformSim.h
Referenced by CreateNodeTree(), and process_event().
|
private |
Definition at line 152 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 152 of file CaloWaveformSim.h
Referenced by process_event(), and set_deltaT().
|
private |
Definition at line 133 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 133 of file CaloWaveformSim.h
Referenced by CreateNodeTree(), Init(), process_event(), and set_detector().
|
private |
Definition at line 132 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 132 of file CaloWaveformSim.h
Referenced by CreateNodeTree(), Init(), maphitetaphi(), process_event(), and set_detector_type().
|
private |
Definition at line 134 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 134 of file CaloWaveformSim.h
Referenced by Init(), process_event(), and set_fieldname().
|
private |
Definition at line 150 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 150 of file CaloWaveformSim.h
Referenced by process_event(), and set_fixpedestal().
|
private |
Definition at line 151 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 151 of file CaloWaveformSim.h
Referenced by process_event(), and set_gaussian_noise().
|
private |
Definition at line 147 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 147 of file CaloWaveformSim.h
Referenced by Init(), and process_event().
|
private |
Definition at line 168 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 168 of file CaloWaveformSim.h
Referenced by process_event(), and set_noise_type().
|
private |
Definition at line 146 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 146 of file CaloWaveformSim.h
Referenced by Init(), process_event(), and set_nsamples().
|
private |
Definition at line 136 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 136 of file CaloWaveformSim.h
Referenced by Init(), set_calibName(), and set_overrideCalibName().
|
private |
Definition at line 137 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 137 of file CaloWaveformSim.h
Referenced by Init(), and set_overrideFieldName().
|
private |
Definition at line 154 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 154 of file CaloWaveformSim.h
Referenced by process_event(), and set_peakpos().
|
private |
Definition at line 142 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 142 of file CaloWaveformSim.h
Referenced by process_event().
|
private |
Definition at line 148 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 148 of file CaloWaveformSim.h
Referenced by process_event(), and set_pedestalsamples().
|
private |
Definition at line 155 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 155 of file CaloWaveformSim.h
Referenced by Init(), process_event(), and ~CaloWaveformSim().
|
private |
Definition at line 145 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 145 of file CaloWaveformSim.h
Referenced by Init().
|
private |
Definition at line 149 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 149 of file CaloWaveformSim.h
Referenced by process_event().
|
private |
Definition at line 159 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 159 of file CaloWaveformSim.h
Referenced by Init(), and process_event().
|
private |
Definition at line 139 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 139 of file CaloWaveformSim.h
Referenced by Init(), and set_templatefile().
|
private |
Definition at line 153 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 153 of file CaloWaveformSim.h
Referenced by process_event(), and set_timewidth().
|
private |
Definition at line 144 of file CaloWaveformSim.h.
View newest version in sPHENIX GitHub at line 144 of file CaloWaveformSim.h
Referenced by Init(), and process_event().