Fast parametrization-based tank simulation. More...
#include <FastTankSimulator.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 | |
FastTankSimulator () | |
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 | |
double | CalculateDistanceInTank (const utl::Particle &p) |
double | CalculateIntegratedCerenkovRate (const utl::Particle &p, const double) |
void | CalculatePhotoElectrons (const utl::Particle &p, const double) |
REGISTER_MODULE ("FastTankSimulatorOG", FastTankSimulator) | |
void | SimulateComptonScattering (const utl::Particle &p) |
void | SimulateElectrons (const utl::Particle &p) |
void | SimulateMuons (const utl::Particle &p) |
void | SimulatePairProduction (const utl::Particle &p) |
void | SimulatePhotons (const utl::Particle &p) |
Private Attributes | |
double | fCerenkovMinElectron = 0 |
double | fCerenkovMinMuon = 0 |
const sdet::Station * | fCurrentDetectorStation = nullptr |
sevt::Station * | fCurrentEventStation = nullptr |
double | fdEdXElectron = 0 |
double | fdEdXMuon = 0 |
double | fEMinPhoton = 0 |
utl::Particle | fInitialParticle |
utl::TabulatedFunction | fPairProductionProbability |
std::vector< double > | fPECumulativeProbability |
double | fPhotoElectronRate = 0 |
utl::TabulatedFunction | fPhotonInteractionLength |
utl::RandomEngine * | fRandomEngine = nullptr |
double | fTankHeight = 0 |
double | fTankRadiusSquared = 0 |
double | fWaterRIndex = 0 |
Fast parametrization-based tank simulation.
Definition at line 38 of file FastTankSimulator.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 |
FastTankSimulator::FastTankSimulator | ( | ) |
Definition at line 54 of file FastTankSimulator.cc.
|
private |
Definition at line 179 of file FastTankSimulator.cc.
References RdGeoCeLDFFitter::a, RdGeoCeLDFFitter::b, RdGeoCeLDFFitter::c, fCurrentDetectorStation, fTankHeight, fTankRadiusSquared, utl::Particle::GetDirection(), sdet::Station::GetLocalCoordinateSystem(), utl::Particle::GetPosition(), utl::BasicVector< HepVector >::GetRho(), utl::BasicVector< HepVector >::GetRho2(), utl::Sqr(), and sqrt().
Referenced by SimulateElectrons(), SimulateMuons(), and SimulatePhotons().
|
private |
Definition at line 209 of file FastTankSimulator.cc.
References utl::Particle::eAntiMuon, utl::Particle::eElectron, utl::Particle::eMuon, utl::Particle::ePositron, fdEdXElectron, fdEdXMuon, fPhotoElectronRate, fWaterRIndex, utl::Particle::GetKineticEnergy(), utl::Particle::GetType(), utl::kElectronMass, utl::kMuonMass, and utl::Sqr().
Referenced by SimulateElectrons(), and SimulateMuons().
|
private |
Definition at line 248 of file FastTankSimulator.cc.
References utl::TimeDistribution< T >::AddTime(), utl::Particle::eAntiMuon, sevt::StationConstants::eElectron, utl::Particle::eElectron, sevt::StationConstants::eMuon, utl::Particle::eMuon, sevt::StationConstants::ePhoton, utl::Particle::ePhoton, utl::Particle::ePositron, sevt::StationConstants::eTotal, fCurrentEventStation, fInitialParticle, fPECumulativeProbability, fRandomEngine, utl::RandomEngine::GetEngine(), utl::TimeInterval::GetInterval(), sevt::PMTSimData::GetPETimeDistribution(), utl::Particle::GetTime(), utl::Particle::GetType(), sevt::PMTSimData::HasPETimeDistribution(), sevt::PMTSimData::MakePETimeDistribution(), ns, sevt::Station::PMTsBegin(), and sevt::Station::PMTsEnd().
Referenced by SimulateElectrons(), and SimulateMuons().
|
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 172 of file FastTankSimulator.cc.
References fwk::VModule::eSuccess.
|
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 67 of file FastTankSimulator.cc.
References fwk::VModule::eSuccess, fCerenkovMinElectron, fCerenkovMinMuon, fdEdXElectron, fdEdXMuon, fEMinPhoton, fPairProductionProbability, fPECumulativeProbability, fPhotoElectronRate, fPhotonInteractionLength, fRandomEngine, fWaterRIndex, utl::Branch::GetChild(), utl::Branch::GetData(), and utl::Branch::GetTopBranch().
|
inlineinherited |
Definition at line 95 of file VModule.h.
References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().
|
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 100 of file FastTankSimulator.cc.
References utl::Particle::eAntiMuon, utl::Particle::eElectron, fwk::VModule::eFailure, utl::Particle::eMuon, utl::Particle::ePhoton, utl::Particle::ePositron, ERROR, fwk::VModule::eSuccess, fCurrentDetectorStation, fCurrentEventStation, fInitialParticle, fTankHeight, fTankRadiusSquared, sdet::Station::GetHeight(), sdet::Station::GetRadius(), evt::Event::GetSEvent(), sdet::SDetector::GetStation(), sevt::StationSimData::GetTotalSimParticleCount(), utl::Particle::GetType(), evt::Event::HasSEvent(), sevt::StationSimData::ParticlesBegin(), sevt::StationSimData::ParticlesEnd(), sevt::StationSimData::SetSimulatorSignature(), sevt::StationSimData::SetTotalSimParticleCount(), SimulateElectrons(), SimulateMuons(), SimulatePhotons(), utl::Sqr(), sevt::SEvent::StationsBegin(), and sevt::SEvent::StationsEnd().
|
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 461 of file FastTankSimulator.cc.
References RdGeoCeLDFFitter::a, RdGeoCeLDFFitter::b, utl::Particle::eElectron, utl::Particle::ePhoton, fCurrentDetectorStation, fRandomEngine, utl::Particle::GetDirection(), utl::RandomEngine::GetEngine(), utl::Particle::GetKineticEnergy(), sdet::Station::GetLocalCoordinateSystem(), utl::Particle::GetPosition(), utl::BasicVector< HepVector >::GetRho(), utl::Particle::GetSource(), utl::Particle::GetTime(), utl::Particle::GetWeight(), utl::kElectronMass, utl::kTwoPi, utl::Vector::Normalize(), SimulateElectrons(), SimulatePhotons(), utl::Sqr(), and sqrt().
Referenced by SimulatePhotons().
|
private |
Definition at line 312 of file FastTankSimulator.cc.
References CalculateDistanceInTank(), CalculateIntegratedCerenkovRate(), CalculatePhotoElectrons(), fCerenkovMinElectron, fdEdXElectron, utl::Particle::GetKineticEnergy(), and max.
Referenced by Run(), SimulateComptonScattering(), and SimulatePairProduction().
|
private |
Definition at line 330 of file FastTankSimulator.cc.
References CalculateDistanceInTank(), CalculateIntegratedCerenkovRate(), CalculatePhotoElectrons(), fCerenkovMinMuon, fdEdXMuon, utl::Particle::GetKineticEnergy(), and max.
Referenced by Run().
|
private |
Definition at line 426 of file FastTankSimulator.cc.
References utl::Particle::eElectron, utl::Particle::ePositron, fRandomEngine, utl::Particle::GetDirection(), utl::RandomEngine::GetEngine(), utl::Particle::GetKineticEnergy(), utl::Particle::GetPosition(), utl::Particle::GetSource(), utl::Particle::GetTime(), utl::Particle::GetWeight(), utl::kElectronMass, and SimulateElectrons().
Referenced by SimulatePhotons().
|
private |
Definition at line 348 of file FastTankSimulator.cc.
References CalculateDistanceInTank(), fPairProductionProbability, fPhotonInteractionLength, fRandomEngine, utl::Particle::GetDirection(), utl::RandomEngine::GetEngine(), utl::Particle::GetKineticEnergy(), utl::TabulatedFunction::GetNPoints(), utl::Particle::GetPosition(), utl::Particle::GetSource(), utl::Particle::GetTime(), utl::Particle::GetType(), utl::Particle::GetWeight(), utl::TabulatedFunction::GetX(), utl::TabulatedFunction::GetY(), utl::kSpeedOfLight, SimulateComptonScattering(), SimulatePairProduction(), and utl::TabulatedFunction::Y().
Referenced by Run(), and SimulateComptonScattering().
|
private |
Definition at line 51 of file FastTankSimulator.h.
Referenced by Init(), and SimulateElectrons().
|
private |
Definition at line 50 of file FastTankSimulator.h.
Referenced by Init(), and SimulateMuons().
|
private |
Definition at line 76 of file FastTankSimulator.h.
Referenced by CalculateDistanceInTank(), Run(), and SimulateComptonScattering().
|
private |
Definition at line 77 of file FastTankSimulator.h.
Referenced by CalculatePhotoElectrons(), and Run().
|
private |
Definition at line 49 of file FastTankSimulator.h.
Referenced by CalculateIntegratedCerenkovRate(), Init(), and SimulateElectrons().
|
private |
Definition at line 48 of file FastTankSimulator.h.
Referenced by CalculateIntegratedCerenkovRate(), Init(), and SimulateMuons().
|
private |
Definition at line 52 of file FastTankSimulator.h.
Referenced by Init().
|
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 75 of file FastTankSimulator.h.
Referenced by CalculatePhotoElectrons(), and Run().
|
private |
Definition at line 59 of file FastTankSimulator.h.
Referenced by Init(), and SimulatePhotons().
|
private |
Definition at line 56 of file FastTankSimulator.h.
Referenced by CalculatePhotoElectrons(), and Init().
|
private |
Definition at line 53 of file FastTankSimulator.h.
Referenced by CalculateIntegratedCerenkovRate(), and Init().
|
private |
Definition at line 58 of file FastTankSimulator.h.
Referenced by Init(), and SimulatePhotons().
|
private |
Definition at line 79 of file FastTankSimulator.h.
Referenced by CalculatePhotoElectrons(), Init(), SimulateComptonScattering(), SimulatePairProduction(), and SimulatePhotons().
|
private |
Definition at line 62 of file FastTankSimulator.h.
Referenced by CalculateDistanceInTank(), and Run().
|
private |
Definition at line 61 of file FastTankSimulator.h.
Referenced by CalculateDistanceInTank(), and Run().
|
private |
Definition at line 54 of file FastTankSimulator.h.
Referenced by CalculateIntegratedCerenkovRate(), and Init().