#include <CachedXShowerRegenerator.h>
Public Types | |
enum | ResultFlag { eSuccess, eFailure, eBreakLoop, eContinueLoop } |
Flag returned by module methods to the RunController. More... | |
enum | VersionInfoType { eFilename = 1, eRevisionNumber = 2, eDate = 3, eTime = 4, eLastEditor = 5 } |
Different types of version info that can be retrieved from GetVersionInfo. More... | |
Public Member Functions | |
CachedXShowerRegenerator () | |
VModule::ResultFlag | Finish () |
Finish: invoked at end of the run (NOT end of the event) More... | |
utl::Stopwatch & | GetStopwatch () |
const utl::Stopwatch & | GetStopwatch () const |
std::string | GetVersionInfo (const VersionInfoType v) const |
Retrieve different sorts of module version info. More... | |
VModule::ResultFlag | Init () |
Initialize: invoked at beginning of run (NOT beginning of event) More... | |
void | InitTiming () |
VModule::ResultFlag | Run (evt::Event &event) |
Run: invoked once per event. More... | |
ResultFlag | RunWithTiming (evt::Event &event) |
Static Public Member Functions | |
static std::string | GetResultFlagByName (const ResultFlag flag) |
Protected Types | |
enum | InfoLevel { eInfoNone = 0, eInfoFinal = 1, eInfoIntermediate = 2, eInfoDebug = 3 } |
Protected Attributes | |
int | fInfoLevel = 0 |
Private Member Functions | |
void | InitNewShower (evt::Event &event) |
bool | IsParticleEnergyLow (const int, const double) const |
void | OutputStats (evt::Event &event) |
boost::tuple< unsigned int, double > | ParticleNumberAndWeight (const double &, const int &) |
(Optional) special handling for particles with very large weights. More... | |
REGISTER_MODULE ("CachedXShowerRegeneratorAG", CachedXShowerRegenerator) | |
Private Attributes | |
double | fAccumulatedWeightLimit |
double | fAmigaRadius |
double | fDeltaPhi |
double | fDeltaROverR |
double | fElectronEnergyCut |
utl::TabulatedFunction * | fEToVem |
double | fHadronEnergyCut |
double | fHorizontalParticleCut |
double | fInjectionStop |
double | fInnerRadiusCut |
double | fLogXGaussSmearingWidth |
unsigned int | fMaxParticles |
double | fMesonEnergyCut |
double | fMuonEnergyCut |
double | fMuonWeightScale |
utl::TabulatedFunction * | fMuToVem |
unsigned int | fNOutOfRangeWeight |
double | fOuterRadiusCut |
double | fPhiGranularity |
double | fPhotonEnergyCut |
utl::RandomEngine::RandomEngineType * | fRandomEngine |
double | fRGranularity |
utl::ShadowPtr< ShowerData > | fShowerData |
bool | fSimulateAmiga |
double | fTimeSlotSize |
bool | fUseInjectionStop |
bool | fUseStationPositionMatrix |
bool | fUseWeightLimiting |
double | fWeightLimit |
double | fWeightThreshold |
int | largeWeightCtr |
int | unityWeightCtr |
Definition at line 66 of file CachedXShowerRegenerator.h.
|
protectedinherited |
|
inherited |
Flag returned by module methods to the RunController.
Enumerator | |
---|---|
eSuccess |
Report success to RunController. |
eFailure |
Report failure to RunController, causing RunController to terminate execution. |
eBreakLoop |
Break current loop. It works for nested loops too! |
eContinueLoop |
Skip remaining modules in the current loop and continue with next iteration of the loop. |
|
inherited |
CachedXShowerRegenerator::CachedXShowerRegenerator | ( | ) |
Definition at line 103 of file CachedXShowerRegenerator.cc.
|
virtual |
Finish: invoked at end of the run (NOT end of the event)
This method is for things that should be done at the end of the run (for example, closing files or writing out histograms) {You must override this method in your concrete module}
Implements fwk::VModule.
Definition at line 728 of file CachedXShowerRegenerator.cc.
References fwk::VModule::eSuccess, fNOutOfRangeWeight, fWeightLimit, and WARNING.
|
staticinherited |
Definition at line 8 of file VModule.cc.
References fwk::VModule::eBreakLoop, fwk::VModule::eContinueLoop, fwk::VModule::eFailure, and fwk::VModule::eSuccess.
Referenced by fwk::RunController::DoNextInSequence(), fwk::RunController::FinishBranch(), and fwk::RunController::InitBranch().
|
inlineinherited |
Definition at line 106 of file VModule.h.
References fwk::VModule::fStopwatch.
|
inlineinherited |
Definition at line 107 of file VModule.h.
References fwk::VModule::fStopwatch.
|
inherited |
Retrieve different sorts of module version info.
Definition at line 26 of file VModule.cc.
Referenced by fwk::CentralConfig::GetConfig(), ThresholdCalculatorKG::ThresholdCalculator::Init(), fdDoubleBumpFinder::FdDoubleBumpFinder::Init(), LaserGeneratorNA::LaserGenerator::Init(), LaserLightSimulatorNA::LaserLightSimulator::Init(), FdElectronicsSimulatorOG::FdElectronicsSimulator::Init(), TelescopeSimulatorKG::TelescopeSimulator::Init(), TelescopeSimulatorKG2::TelescopeSimulator::Init(), SdSimpleSimKG::SdSimpleSim::Init(), ShowerPhotonGeneratorOG::ShowerPhotonGenerator::Init(), and testRunController::testModuleVersionInfo().
|
virtual |
Initialize: invoked at beginning of run (NOT beginning of event)
This method is for things that should be done once at the beginning of a run (for example, booking histograms, performing calculations that need to be done only once, initializing parameters) {You must override this method in your concrete module}
Implements fwk::VModule.
Definition at line 134 of file CachedXShowerRegenerator.cc.
References fwk::VModule::eSuccess, fAccumulatedWeightLimit, fAmigaRadius, fDeltaPhi, fDeltaROverR, fElectronEnergyCut, fHadronEnergyCut, fHorizontalParticleCut, fInnerRadiusCut, fLogXGaussSmearingWidth, fMaxParticles, fMesonEnergyCut, fMuonEnergyCut, fMuonWeightScale, fOuterRadiusCut, fPhiGranularity, fPhotonEnergyCut, fRandomEngine, fRGranularity, fSimulateAmiga, fUseStationPositionMatrix, fUseWeightLimiting, fWeightThreshold, utl::Branch::GetChild(), utl::Branch::GetData(), utl::Branch::GetTopBranch(), INFO, largeWeightCtr, unityWeightCtr, and WARNING.
|
private |
Definition at line 226 of file CachedXShowerRegenerator.cc.
References fDeltaPhi, fDeltaROverR, fInnerRadiusCut, fLogXGaussSmearingWidth, fMuonWeightScale, fOuterRadiusCut, fPhiGranularity, fRandomEngine, fRGranularity, fShowerData, fUseStationPositionMatrix, evt::ShowerSimData::GetDirection(), evt::ShowerSimData::GetLocalCoordinateSystem(), evt::ShowerSimData::GetMinRadiusCut(), utl::BasicVector< HepVector >::GetPhi(), evt::ShowerSimData::GetPosition(), utl::BasicVector< HepVector >::GetRho(), evt::ShowerSimData::GetShowerCoordinateSystem(), sevt::Station::GetSimData(), sevt::SEvent::GetStation(), evt::ShowerSimData::GetTimeStamp(), evt::ShowerSimData::GroundParticlesBegin(), evt::ShowerSimData::GroundParticlesEnd(), evt::Event::HasSEvent(), sevt::Station::HasSimData(), sevt::SEvent::HasStation(), INFO, evt::Event::MakeSEvent(), sevt::Station::MakeSimData(), sevt::SEvent::MakeStation(), CachedXShowerRegeneratorAG::PlaneFrontTime(), sevt::StationSimData::SetIsInsideMinRadius(), evt::ShowerSimData::SetMinRadiusCut(), evt::ShowerSimData::SetMuonWeightScale(), sevt::StationSimData::SetPlaneFrontTime(), utl::Sqr(), sdet::SDetector::StationsBegin(), and sdet::SDetector::StationsEnd().
Referenced by Run().
|
inlineinherited |
Definition at line 95 of file VModule.h.
References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().
|
private |
Definition at line 204 of file CachedXShowerRegenerator.cc.
References fElectronEnergyCut, fHadronEnergyCut, fMesonEnergyCut, fMuonEnergyCut, fPhotonEnergyCut, OFFLINE_BARYONS, OFFLINE_ELECTRONS, OFFLINE_MESONS, OFFLINE_MUONS, and OFFLINE_PHOTON.
Referenced by Run().
|
private |
Definition at line 625 of file CachedXShowerRegenerator.cc.
References utl::delr, utl::endc, utl::endr, fShowerData, evt::ShowerSimData::GetTimeStamp(), utl::hline(), INFO, km, ns, CachedXShowerRegeneratorAG::Round(), and tab.
Referenced by Run().
|
private |
(Optional) special handling for particles with very large weights.
EXPLAIN HOW THIS WORKS need for arguments..
Definition at line 750 of file CachedXShowerRegenerator.cc.
References fAccumulatedWeightLimit, fRandomEngine, fShowerData, and fWeightThreshold.
Referenced by Run().
|
private |
|
virtual |
Run: invoked once per event.
This method is for things that should be done once per event {You must override this method in your concrete module}
Implements fwk::VModule.
Definition at line 339 of file CachedXShowerRegenerator.cc.
References utl::abs(), sevt::Station::AddParticle(), utl::Particle::eAntiMuon, fwk::VModule::eBreakLoop, fwk::VModule::eFailure, utl::Particle::eMuon, ERROR, utl::Particle::eShowerFromMuonDecay, fwk::VModule::eSuccess, fAmigaRadius, fHorizontalParticleCut, fMaxParticles, fMuonWeightScale, fRandomEngine, fShowerData, fSimulateAmiga, fUseWeightLimiting, CachedXShowerRegeneratorAG::StationInfo::GetDetStation(), utl::Particle::GetDirection(), CachedXShowerRegeneratorAG::StationInfo::GetEvtStation(), sdet::Station::GetHeight(), sdet::Station::GetId(), utl::TimeInterval::GetInterval(), utl::Particle::GetKineticEnergy(), evt::ShowerSimData::GetLocalCoordinateSystem(), sdet::Station::GetLocalCoordinateSystem(), utl::BasicVector< HepVector >::GetPhi(), utl::Particle::GetPosition(), evt::ShowerSimData::GetPosition(), sdet::Station::GetRadius(), CachedXShowerRegeneratorAG::StationInfo::GetResamplingArea(), utl::BasicVector< HepVector >::GetRho(), utl::BasicVector< HepVector >::GetRho2(), evt::ShowerSimData::GetShowerCoordinateSystem(), utl::Particle::GetSource(), sevt::SEvent::GetStation(), sdet::Station::GetThickness(), utl::Particle::GetTime(), utl::Particle::GetType(), utl::Particle::GetWeight(), utl::BasicVector< HepVector >::GetZ(), evt::Event::HasSimShower(), INFO, InitNewShower(), CachedXShowerRegeneratorAG::InsertValue(), CachedXShowerRegeneratorAG::StationInfo::IsIn(), IsParticleEnergyLow(), utl::BasicVector< HepVector >::kCylindrical, utl::kPi, utl::kPiOnTwo, utl::kTwoPi, largeWeightCtr, ns, OutputStats(), ParticleNumberAndWeight(), CachedXShowerRegeneratorAG::PlaneFrontTime(), utl::Particle::SetParent(), utl::Particle::SetPosition(), utl::Particle::SetTime(), utl::Particle::SetWeight(), utl::Sqr(), sqrt(), sdet::SDetector::StationsBegin(), sdet::SDetector::StationsEnd(), and unityWeightCtr.
|
inlineinherited |
Definition at line 98 of file VModule.h.
References fwk::VModule::fStopwatch, fwk::VModule::Run(), utl::Stopwatch::Start(), and utl::Stopwatch::Stop().
Referenced by fwk::RunController::DoNextInSequence().
|
private |
Definition at line 113 of file CachedXShowerRegenerator.h.
Referenced by Init(), and ParticleNumberAndWeight().
|
private |
Definition at line 124 of file CachedXShowerRegenerator.h.
|
private |
Definition at line 98 of file CachedXShowerRegenerator.h.
Referenced by Init(), and InitNewShower().
|
private |
Definition at line 97 of file CachedXShowerRegenerator.h.
Referenced by Init(), and InitNewShower().
|
private |
Definition at line 91 of file CachedXShowerRegenerator.h.
Referenced by Init(), and IsParticleEnergyLow().
|
private |
Definition at line 108 of file CachedXShowerRegenerator.h.
|
private |
Definition at line 94 of file CachedXShowerRegenerator.h.
Referenced by Init(), and IsParticleEnergyLow().
|
private |
Definition at line 99 of file CachedXShowerRegenerator.h.
|
protectedinherited |
Definition at line 123 of file VModule.h.
Referenced by RdChannelASCIINoiseImporterRD::RdChannelASCIINoiseImporterRD::Init(), Rd2dLDFFitter::Rd2dLDFFitter::Init(), RdChannelNoiseImporter_AERA::RdChannelNoiseImporter_AERA::Init(), and Rd2dLDFFitter::Rd2dLDFFitter::Run().
|
private |
Definition at line 106 of file CachedXShowerRegenerator.h.
|
private |
Definition at line 88 of file CachedXShowerRegenerator.h.
Referenced by Init(), and InitNewShower().
|
private |
Definition at line 103 of file CachedXShowerRegenerator.h.
Referenced by Init(), and InitNewShower().
|
private |
Definition at line 86 of file CachedXShowerRegenerator.h.
|
private |
Definition at line 95 of file CachedXShowerRegenerator.h.
Referenced by Init(), and IsParticleEnergyLow().
|
private |
Definition at line 92 of file CachedXShowerRegenerator.h.
Referenced by Init(), and IsParticleEnergyLow().
|
private |
Definition at line 114 of file CachedXShowerRegenerator.h.
Referenced by Init(), InitNewShower(), and Run().
|
private |
Definition at line 107 of file CachedXShowerRegenerator.h.
|
private |
Definition at line 120 of file CachedXShowerRegenerator.h.
Referenced by Finish().
|
private |
Definition at line 89 of file CachedXShowerRegenerator.h.
Referenced by Init(), and InitNewShower().
|
private |
Definition at line 101 of file CachedXShowerRegenerator.h.
Referenced by Init(), and InitNewShower().
|
private |
Definition at line 93 of file CachedXShowerRegenerator.h.
Referenced by Init(), and IsParticleEnergyLow().
|
private |
Definition at line 117 of file CachedXShowerRegenerator.h.
Referenced by Init(), InitNewShower(), ParticleNumberAndWeight(), and Run().
|
private |
Definition at line 102 of file CachedXShowerRegenerator.h.
Referenced by Init(), and InitNewShower().
|
private |
Definition at line 126 of file CachedXShowerRegenerator.h.
Referenced by InitNewShower(), OutputStats(), ParticleNumberAndWeight(), and Run().
|
private |
Definition at line 123 of file CachedXShowerRegenerator.h.
|
private |
Definition at line 119 of file CachedXShowerRegenerator.h.
|
private |
Definition at line 105 of file CachedXShowerRegenerator.h.
|
private |
Definition at line 100 of file CachedXShowerRegenerator.h.
Referenced by Init(), and InitNewShower().
|
private |
Definition at line 110 of file CachedXShowerRegenerator.h.
|
private |
Definition at line 121 of file CachedXShowerRegenerator.h.
Referenced by Finish().
|
private |
Definition at line 112 of file CachedXShowerRegenerator.h.
Referenced by Init(), and ParticleNumberAndWeight().
|
private |
Definition at line 129 of file CachedXShowerRegenerator.h.
|
private |
Definition at line 128 of file CachedXShowerRegenerator.h.