A super-simple-and-fast SD-event-generator. See GAP2008-061 for details. More...
#include "SdSimpleSimKG/SdSimpleSim.h"
Classes | |
struct | FitParam |
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 | |
fwk::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... | |
fwk::VModule::ResultFlag | Init () |
Initialize: invoked at beginning of run (NOT beginning of event) More... | |
void | InitTiming () |
fwk::VModule::ResultFlag | Run (evt::Event &event) |
Run: invoked once per event. More... | |
ResultFlag | RunWithTiming (evt::Event &event) |
SdSimpleSim () | |
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 | |
utl::TabulatedFunction | CalculateLogZdist (const utl::TabulatedFunction &MuonProfile, double cosTheta, double XobsVert) |
double | CalculateTankSignal (double CoreDistance, double TankRadius, double TankHeight, double Zenith, double Age, double Rm, double Ne, double Ng, double Nmu, bool fluctuations=true) |
FitParam | FitAtmosphere (const atm::ProfileResult &prof) |
FitParam | FitDecay (const utl::TabulatedFunction &prof, bool dEdX=false) |
double | GenerateNoiseStation (sevt::Station &tank, const utl::TimeStamp &T0, double TimeOffset, double TimeWindow) |
double | GetCDASTriggerTimeWindow (const utl::TimeStamp &time) |
utl::TabulatedFunction | GetLogZdist (const utl::TabulatedFunction &prof, const utl::Point &core, const utl::Vector &axis) |
bool | IsNoise (double TimeWindow) |
double | LTP (double r, double theta, double energy) |
double | NerlingF1 (double E, double a1) |
double | NerlingF2 (double E, double a2, double s) |
double | NKG (double N, double Rm, double R, double s) |
bool | Noise (sevt::SEvent &sevent, const utl::TimeStamp &T0, int TankID, double TimeOffset, double TimeWindow) |
REGISTER_MODULE ("SdSimpleSimKG", SdSimpleSim) | |
double | SampleEnergy (double Emin, double Emax, double Age) |
double | T1TriggerProbability (double signal, double S1000, double theta) |
double | TankIntersection (double r, double phi, double z, double theta, double TankRadius) |
Private Attributes | |
TProfile * | fCharged |
TProfile * | fCharged_vs_z |
TProfile * | fdEdX |
TProfile * | fdEdX_vs_z |
TProfile * | fdNdX |
TProfile * | fdNdz |
TProfile * | fElectron |
TProfile * | fElectron_vs_z |
double | fEMAgeFactor |
bool | fForceClosestTankToTrigger |
TProfile * | fGamma |
TProfile * | fGamma_vs_z |
double | fLateralCut |
TProfile * | fLorenzo |
TProfile * | fLorenzo_vs_X |
TProfile * | fMuon |
TProfile * | fMuon_vs_z |
bool | fMuonProductionHeightFromProfile |
double | fMuonRScale |
int | fNElectrons |
int | fNGammas |
int | fNMuons |
bool | fNoise |
double | fNoiseRatePerStation |
int | fNSample |
bool | fOnlyClosestTank |
bool | fPlaneFront |
std::map < evt::ShowerSimData::ProfileType, FitParam > | fProfileExtrapolation |
utl::RandomEngine & | fRandomEngine |
for CLHEP random nubers More... | |
int | fSdId |
double | fSElectrons |
double | fSGammas |
FitParam | fSlantDepthExtrapolation |
double | fSMuons |
TTree * | fStatTree |
bool | fUseT2LifeTime |
int | fVerbosity |
Static Private Attributes | |
static const double | fNerlingA1a = 6.42522 |
static const double | fNerlingA1b = -1.53183 |
static const double | fNerlingA2a = 168.168 |
static const double | fNerlingA2b = -42.1368 |
A super-simple-and-fast SD-event-generator. See GAP2008-061 for details.
Definition at line 53 of file SdSimpleSim.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 |
SdSimpleSim::SdSimpleSim | ( | ) |
Definition at line 92 of file SdSimpleSim.cc.
|
private |
Definition at line 1888 of file SdSimpleSim.cc.
References atm::Atmosphere::EvaluateDepthVsHeight(), atm::Atmosphere::EvaluateHeightVsDepth(), det::Detector::GetAtmosphere(), utl::TabulatedFunction::GetNPoints(), atm::ProfileResult::MaxX(), atm::ProfileResult::MinX(), atm::ProfileResult::Y(), and utl::TabulatedFunction::Y().
Referenced by Run().
|
private |
Definition at line 2100 of file SdSimpleSim.cc.
References fEMAgeFactor, fMuonRScale, fNElectrons, fNGammas, fNMuons, fNSample, fRandomEngine, fSElectrons, fSGammas, fSMuons, fVerbosity, utl::RandomEngine::GetEngine(), INFO, kMeterPerVEM, utl::kPi, kTrackPerGEV, utl::m, utl::MeV, NKG(), G4StationSimulatorOG::p, SampleEnergy(), sqrt(), and TankIntersection().
Referenced by Run().
|
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 1443 of file SdSimpleSim.cc.
References fwk::VModule::eSuccess, file, and fStatTree.
|
private |
Definition at line 2057 of file SdSimpleSim.cc.
References utl::cm, utl::cm2, utl::g, atm::ProfileResult::MaxX(), atm::ProfileResult::MinX(), and atm::ProfileResult::Y().
Referenced by Run().
|
private |
Definition at line 1960 of file SdSimpleSim.cc.
References utl::cm2, fVerbosity, utl::g, utl::TabulatedFunction::GetNPoints(), utl::GeV, INFO, and utl::TabulatedFunction::Y().
Referenced by Run().
|
private |
Definition at line 1588 of file SdSimpleSim.cc.
References fRandomEngine, utl::RandomEngine::GetEngine(), sevt::Station::GetRecData(), sevt::StationRecData::GetSignalStartTime(), sevt::StationRecData::GetTotalSignal(), utl::kPi, un2::Mean(), std::pow(), sevt::Station::SetCandidate(), sevt::Station::SetHighGainSaturation(), sevt::Station::SetLowGainSaturation(), sevt::StationRecData::SetSignalStartTime(), sevt::StationRecData::SetTotalSignal(), utl::GumbelXmax::Sigma(), and sqrt().
Referenced by Noise().
|
private |
Definition at line 2339 of file SdSimpleSim.cc.
References utl::TimeStamp::GetGPSSecond(), and utl::microsecond.
Referenced by Run().
|
private |
Definition at line 1778 of file SdSimpleSim.cc.
References utl::abs(), utl::cm, atm::Atmosphere::EvaluateDepthVsHeight(), atm::Atmosphere::EvaluateDistanceVsSlantDepth(), atm::Atmosphere::EvaluateHeightVsDepth(), utl::g, det::Detector::GetAtmosphere(), utl::TabulatedFunction::GetNPoints(), utl::m, atm::ProfileResult::MaxX(), atm::ProfileResult::MinX(), atm::ProfileResult::Y(), and utl::TabulatedFunction::Y().
Referenced by Run().
|
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(), 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 102 of file SdSimpleSim.cc.
References fwk::VModule::eFailure, ERROR, fwk::VModule::eSuccess, fCharged, fCharged_vs_z, fdEdX, fdEdX_vs_z, fdNdX, fdNdz, fElectron, fElectron_vs_z, fEMAgeFactor, fForceClosestTankToTrigger, fGamma, fGamma_vs_z, fLateralCut, fLorenzo, fLorenzo_vs_X, fMuon, fMuon_vs_z, fMuonProductionHeightFromProfile, fMuonRScale, fNoise, fNSample, fOnlyClosestTank, fPlaneFront, fSdId, fStatTree, fUseT2LifeTime, fVerbosity, utl::Branch::GetChild(), utl::Branch::GetData(), fwk::CentralConfig::GetTopBranch(), fwk::VModule::GetVersionInfo(), INFO, km, and utl::m.
|
inlineinherited |
Definition at line 95 of file VModule.h.
References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().
|
private |
Definition at line 1568 of file SdSimpleSim.cc.
References fNoiseRatePerStation, fRandomEngine, and utl::RandomEngine::GetEngine().
Referenced by Noise().
|
private |
Definition at line 1690 of file SdSimpleSim.cc.
|
private |
Definition at line 1762 of file SdSimpleSim.cc.
|
private |
Definition at line 1769 of file SdSimpleSim.cc.
References std::pow().
Referenced by SampleEnergy().
|
private |
Definition at line 1472 of file SdSimpleSim.cc.
References fVerbosity, utl::kPi, std::pow(), and WARNING.
Referenced by CalculateTankSignal().
|
private |
Definition at line 1491 of file SdSimpleSim.cc.
References sevt::StationTriggerData::eT1Threshold, sevt::StationTriggerData::eTimeOverThreshold, fNoiseRatePerStation, fRandomEngine, fVerbosity, GenerateNoiseStation(), utl::RandomEngine::GetEngine(), sevt::Station::GetSimData(), sevt::SEvent::GetStation(), sevt::Station::GetTriggerData(), sevt::Station::HasRecData(), sevt::Station::HasSimData(), sevt::SEvent::HasStation(), sevt::Station::HasTriggerData(), utl::hertz, INFO, IsNoise(), sevt::Station::MakeRecData(), sevt::Station::MakeSimData(), sevt::SEvent::MakeStation(), sevt::Station::MakeTriggerData(), utl::microsecond, sevt::StationTriggerData::SetAlgorithm(), sevt::StationTriggerData::SetOffsetMicroSecond(), sevt::StationSimData::SetSimulatorSignature(), and sevt::StationTriggerData::SetWindowMicroSecond().
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}
Tank in UTM coordinates AT THE AXIS //
Implements fwk::VModule.
Definition at line 201 of file SdSimpleSim.cc.
References utl::TabulatedFunction::Begin(), CalculateLogZdist(), CalculateTankSignal(), utl::cm, utl::cm2, utl::deg, fwk::VModule::eContinueLoop, cevt::StationConstants::eElectron, galactic::EeV, fwk::VModule::eFailure, utl::Particle::eIron, cevt::StationConstants::eMuon, utl::TabulatedFunction::End(), sevt::StationTriggerData::eNone, cevt::StationConstants::ePhoton, utl::Particle::ePhoton, utl::Particle::eProton, ERROR, fwk::VModule::eSuccess, sevt::StationTriggerData::eT1Threshold, sevt::StationTriggerData::eT2Threshold, sevt::StationTriggerData::eTimeOverThreshold, galactic::eV, atm::Atmosphere::EvaluateDepthVsHeight(), atm::Atmosphere::EvaluateHeightVsDepth(), atm::Atmosphere::EvaluateSlantDepthVsDistance(), atm::Atmosphere::EvaluateTemperatureVsHeight(), fCharged, fCharged_vs_z, fdEdX, fdEdX_vs_z, fdNdX, fdNdz, fElectron, fElectron_vs_z, fForceClosestTankToTrigger, fGamma, fGamma_vs_z, FitAtmosphere(), FitDecay(), fLateralCut, fLorenzo, fLorenzo_vs_X, fMuon, fMuon_vs_z, fMuonProductionHeightFromProfile, fNElectrons, fNGammas, fNMuons, fNoise, fOnlyClosestTank, fPlaneFront, fProfileExtrapolation, fRandomEngine, fSdId, fSlantDepthExtrapolation, fStatTree, fUseT2LifeTime, fVerbosity, utl::g, sevt::StationTriggerData::GetAlgorithm(), det::Detector::GetAtmosphere(), GetCDASTriggerTimeWindow(), evt::ShowerSimData::GetDirection(), evt::ShowerSimData::GetEnergy(), utl::RandomEngine::GetEngine(), utl::MuonTimeModel::GetFirstTime(), evt::ShowerSimData::GetGHParameters(), sevt::SEvent::GetHeader(), sevt::Station::GetId(), utl::TimeInterval::GetInterval(), evt::ShowerSimData::GetLocalCoordinateSystem(), GetLogZdist(), evt::ShowerSimData::GetLongitudinalProfile(), utl::Vector::GetMag(), utl::TabulatedFunction::GetNPoints(), utl::BasicVector< HepVector >::GetPhi(), evt::ShowerSimData::GetPosition(), evt::ShowerSimData::GetPrimaryParticle(), sevt::Station::GetRecData(), utl::BasicVector< HepVector >::GetRho(), det::Detector::GetSDetector(), evt::ShowerSimData::GetShowerCoordinateSystem(), sevt::Station::GetSimData(), sevt::SEvent::GetStation(), evt::ShowerSimData::GetTimeStamp(), sevt::SEvent::GetTrigger(), sevt::Station::GetTriggerData(), utl::BasicVector< HepVector >::GetX(), evt::VGaisserHillasParameter::GetXMax(), utl::BasicVector< HepVector >::GetY(), utl::BasicVector< HepVector >::GetZ(), evt::ShowerSimData::HasDirection(), evt::ShowerSimData::HasGHParameters(), evt::ShowerSimData::HasLongitudinalProfile(), evt::ShowerSimData::HasPosition(), evt::Event::HasSEvent(), sevt::Station::HasSimData(), evt::Event::HasSimShower(), sevt::SEvent::HasStation(), sevt::SEvent::HasTrigger(), sevt::Station::HasTriggerData(), utl::MuonTimeModel::Info(), INFO, atm::Atmosphere::InitSlantProfileModel(), utl::kMuonLifetime, utl::kSpeedOfLight, utl::m, sevt::Station::MakeRecData(), evt::Event::MakeSEvent(), sevt::Station::MakeSimData(), sevt::SEvent::MakeStation(), sevt::SEvent::MakeTrigger(), sevt::Station::MakeTriggerData(), atm::ProfileResult::MaxX(), galactic::meter, utl::microsecond, atm::ProfileResult::MinX(), utl::MoliereRadius(), Noise(), ns, SdSimpleSimKG::SdSimpleSim::FitParam::p0, SdSimpleSimKG::SdSimpleSim::FitParam::p1, utl::ReferenceEllipsoid::PointToLatitudeLongitudeHeight(), std::pow(), utl::rad, utl::s, sevt::EventTrigger::SetAlgorithm(), sevt::StationTriggerData::SetAlgorithm(), sevt::Station::SetCandidate(), utl::MuonTimeModel::SetCoordinates(), sevt::StationTriggerData::SetErrorCode(), sevt::Station::SetHighGainSaturation(), sevt::Header::SetId(), sevt::Station::SetLowGainSaturation(), sevt::StationTriggerData::SetOffsetMicroSecond(), sevt::StationSimData::SetPlaneFrontTime(), sevt::StationRecData::SetSignalStartTime(), sevt::StationSimData::SetSimulatorSignature(), sevt::Header::SetTime(), sevt::EventTrigger::SetTime(), sevt::StationRecData::SetTotalSignal(), sevt::StationTriggerData::SetWindowMicroSecond(), utl::ShowerAge(), sqrt(), sevt::SEvent::StationsBegin(), sdet::SDetector::StationsBegin(), sevt::SEvent::StationsEnd(), sdet::SDetector::StationsEnd(), T1TriggerProbability(), WARNING, atm::ProfileResult::Y(), and utl::TabulatedFunction::Y().
|
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 1704 of file SdSimpleSim.cc.
References fRandomEngine, fVerbosity, utl::RandomEngine::GetEngine(), INFO, utl::MeV, and NerlingF2().
Referenced by CalculateTankSignal().
|
private |
Definition at line 2260 of file SdSimpleSim.cc.
References fgTriggerPropShalf, fgTriggerPropShalfError, fgTriggerS1000Bins, fgTriggerThetaBins, fVerbosity, INFO, G4StationSimulatorOG::p, and std::pow().
Referenced by Run().
|
private |
Definition at line 1659 of file SdSimpleSim.cc.
References sqrt().
Referenced by CalculateTankSignal().
|
private |
Definition at line 174 of file SdSimpleSim.h.
|
private |
Definition at line 182 of file SdSimpleSim.h.
|
private |
Definition at line 178 of file SdSimpleSim.h.
|
private |
Definition at line 186 of file SdSimpleSim.h.
|
private |
Definition at line 173 of file SdSimpleSim.h.
|
private |
Definition at line 181 of file SdSimpleSim.h.
|
private |
Definition at line 176 of file SdSimpleSim.h.
|
private |
Definition at line 184 of file SdSimpleSim.h.
|
private |
Definition at line 146 of file SdSimpleSim.h.
Referenced by CalculateTankSignal(), and Init().
|
private |
Definition at line 166 of file SdSimpleSim.h.
|
private |
Definition at line 177 of file SdSimpleSim.h.
|
private |
Definition at line 185 of file SdSimpleSim.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 147 of file SdSimpleSim.h.
|
private |
Definition at line 180 of file SdSimpleSim.h.
|
private |
Definition at line 172 of file SdSimpleSim.h.
|
private |
Definition at line 175 of file SdSimpleSim.h.
|
private |
Definition at line 183 of file SdSimpleSim.h.
|
private |
Definition at line 150 of file SdSimpleSim.h.
|
private |
Definition at line 145 of file SdSimpleSim.h.
Referenced by CalculateTankSignal(), and Init().
|
private |
Definition at line 157 of file SdSimpleSim.h.
Referenced by CalculateTankSignal(), and Run().
|
staticprivate |
Definition at line 126 of file SdSimpleSim.h.
|
staticprivate |
Definition at line 127 of file SdSimpleSim.h.
|
staticprivate |
Definition at line 128 of file SdSimpleSim.h.
|
staticprivate |
Definition at line 129 of file SdSimpleSim.h.
|
private |
Definition at line 156 of file SdSimpleSim.h.
Referenced by CalculateTankSignal(), and Run().
|
private |
Definition at line 155 of file SdSimpleSim.h.
Referenced by CalculateTankSignal(), and Run().
|
private |
Definition at line 149 of file SdSimpleSim.h.
|
private |
Definition at line 164 of file SdSimpleSim.h.
|
private |
Definition at line 152 of file SdSimpleSim.h.
Referenced by CalculateTankSignal(), and Init().
|
private |
Definition at line 167 of file SdSimpleSim.h.
|
private |
Definition at line 168 of file SdSimpleSim.h.
|
private |
Definition at line 133 of file SdSimpleSim.h.
Referenced by Run().
|
private |
for CLHEP random nubers
Definition at line 138 of file SdSimpleSim.h.
Referenced by CalculateTankSignal(), GenerateNoiseStation(), IsNoise(), Noise(), Run(), and SampleEnergy().
|
private |
Definition at line 143 of file SdSimpleSim.h.
|
private |
Definition at line 162 of file SdSimpleSim.h.
Referenced by CalculateTankSignal().
|
private |
Definition at line 161 of file SdSimpleSim.h.
Referenced by CalculateTankSignal().
|
private |
Definition at line 134 of file SdSimpleSim.h.
Referenced by Run().
|
private |
Definition at line 160 of file SdSimpleSim.h.
Referenced by CalculateTankSignal().
|
private |
Definition at line 171 of file SdSimpleSim.h.
|
private |
Definition at line 141 of file SdSimpleSim.h.
|
private |
Definition at line 140 of file SdSimpleSim.h.
Referenced by CalculateTankSignal(), FitDecay(), Init(), NKG(), Noise(), Run(), SampleEnergy(), and T1TriggerProbability().