Simulate photon injection into FD telescope. More...
#include <ShowerPhotonGenerator.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 | |
fwk::VModule::ResultFlag | Finish () |
Finish: invoked at end of the run (NOT end of the event) More... | |
double | GetExtraRayTraceFactor () const |
Get the artificial scaling factor for the number of ray-traced photons. More... | |
int | GetLightSourceSelection () |
unsigned int | GetMaxNRayTrace () const |
Get the max. no. of photons raytraced per time bin. More... | |
unsigned int | GetMinNRayTrace () const |
Get the min. no. of photons raytraced per time bin. More... | |
utl::Stopwatch & | GetStopwatch () |
const utl::Stopwatch & | GetStopwatch () const |
bool | GetUseOnlyReferenceWavelength () const |
Returns whether photons will be generated only at the reference wavelength. More... | |
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 () |
void | ResetLightSourceSelection () |
fwk::VModule::ResultFlag | Run (evt::Event &event) |
Run: invoked once per event. More... | |
ResultFlag | RunWithTiming (evt::Event &event) |
void | SetExtraRayTraceFactor (double factor) |
Set the artificial scaling factor for the number of ray-traced photons. More... | |
void | SetLightSourceSelection (const fevt::FdConstants::LightSource source) |
void | SetMaxNRayTrace (unsigned int nphotons) |
Set the max. no. of photons raytraced per time bin. More... | |
void | SetMinNRayTrace (unsigned int nphotons) |
Set the min. no. of photons raytraced per time bin. More... | |
void | SetUseOnlyReferenceWavelength (bool onlyRefWl) |
Set whether photons should be generated only at the reference wavelength (used by FdLightCollectionEfficiency) More... | |
ShowerPhotonGenerator () | |
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 Types | |
enum | ELDFMode { eOff, eNKG, eGora, eCherenkov, eCherenkovAtAxis, eCherenkovCORSIKA } |
Shower photon LDF modes. More... | |
enum | EPhotonSource { eUnkown, eFluorescence, eDirectCherenkov, eScatteredCherenkov, eLaser } |
The source that generated this photon. More... | |
Private Member Functions | |
double | GoraFunction (const double s) |
returns random numbers drawn from Gora et al. LDF More... | |
utl::Vector | LateralDistributionGora (const utl::CoordinateSystemPtr &shwCS, const double s_age, const double r_moliere) |
Distribute points according to a Gora function. More... | |
utl::Vector | LateralDistributionNKG (const utl::CoordinateSystemPtr &shwCS, const double s_age, const double r_moliere) |
Distribute points according to a NKG function. More... | |
utl::Vector | LateralDistributionScatteredCherenkov (const utl::CoordinateSystemPtr &showerCX, const utl::Point &core, const utl::Vector &axis, double distanceCoreToPointOnShower, double Xmax, double rMoliere, double &emissionDistance, utl::Point &pointOfEnission, utl::Vector &directionOfEmission, const utl::VRandomSampler &cherenkovProduction, const atm::ProfileResult &depthProfile, const atm::ProfileResult *slantDepthVsDistance, const double absCosZenith, const double coreZ, const bool flatEarth, const double atmDistanceMin, const double atmDistanceMax) |
Distribute points according to scattered Cherenkov emission. More... | |
double | NKGFunction (const double s, const double fMax) |
returns random numbers drawn from
| |
void | PlotLDF (const evt::ShowerSimData &simShower, const utl::TabulatedFunction &cherenkovProductionBeam, const double age) |
REGISTER_MODULE ("ShowerPhotonGeneratorOG", ShowerPhotonGenerator) | |
TH1D * | ToCumu (TH1D *h, double total) |
Private Attributes | |
ELDFMode | fDirectCherenkovLDF |
double | fExtraRayTraceFactor |
min no. of photons per bin More... | |
ELDFMode | fFluorescenceLDF |
Photons are generated at the reference wavelength only if this is set. More... | |
int | fLightSourceSelector |
unsigned int | fMaxNRayTrace |
Returns int as implementation of an eNone equivalent. More... | |
unsigned int | fMinNRayTrace |
max no. of photons per bin More... | |
MultipleScatterer * | fMultipleScatterer |
bool | fMultipleScattering |
utl::RandomEngine * | fRandomEngine |
This can be set in order to simulate photons for a single source ONLY (for FdLightCollectionEfficiency) More... | |
ELDFMode | fScatteredCherenkovLDF |
bool | fUseOnlyReferenceWavelength |
for doing more tracing to reduce fluctuations More... | |
Simulate photon injection into FD telescope.
Definition at line 63 of file ShowerPhotonGenerator.h.
Shower photon LDF modes.
enumeration for 3D shower mode for fluorescence and cherenkov photons
Enumerator | |
---|---|
eOff | |
eNKG | |
eGora | |
eCherenkov | |
eCherenkovAtAxis | |
eCherenkovCORSIKA |
Definition at line 72 of file ShowerPhotonGenerator.h.
The source that generated this photon.
;
Enumerator | |
---|---|
eUnkown | |
eFluorescence | |
eDirectCherenkov | |
eScatteredCherenkov | |
eLaser |
Definition at line 85 of file ShowerPhotonGenerator.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 |
ShowerPhotonGenerator::ShowerPhotonGenerator | ( | ) |
Definition at line 93 of file ShowerPhotonGenerator.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 718 of file ShowerPhotonGenerator.cc.
References fwk::VModule::eSuccess.
|
inline |
Get the artificial scaling factor for the number of ray-traced photons.
Definition at line 111 of file ShowerPhotonGenerator.h.
References fExtraRayTraceFactor.
Referenced by FdLightCollectionEfficiencyKG::FdLightCollectionEfficiency::RunPhotonGenerationRayTracingLoop().
|
inline |
Definition at line 123 of file ShowerPhotonGenerator.h.
References fLightSourceSelector.
Referenced by Run(), and FdLightCollectionEfficiencyKG::FdLightCollectionEfficiency::RunPhotonGenerationRayTracingLoop().
|
inline |
Get the max. no. of photons raytraced per time bin.
Definition at line 101 of file ShowerPhotonGenerator.h.
References fMaxNRayTrace.
Referenced by FdLightCollectionEfficiencyKG::FdLightCollectionEfficiency::RunPhotonGenerationRayTracingLoop().
|
inline |
Get the min. no. of photons raytraced per time bin.
Definition at line 106 of file ShowerPhotonGenerator.h.
References fMinNRayTrace.
Referenced by FdLightCollectionEfficiencyKG::FdLightCollectionEfficiency::RunPhotonGenerationRayTracingLoop().
|
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.
|
inline |
Returns whether photons will be generated only at the reference wavelength.
Definition at line 116 of file ShowerPhotonGenerator.h.
References fUseOnlyReferenceWavelength.
Referenced by FdLightCollectionEfficiencyKG::FdLightCollectionEfficiency::RunPhotonGenerationRayTracingLoop().
|
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(), Init(), and testRunController::testModuleVersionInfo().
|
inlineprivate |
returns random numbers drawn from Gora et al. LDF
s,: | shower age |
Definition at line 1203 of file ShowerPhotonGenerator.cc.
References fRandomEngine, utl::RandomEngine::GetEngine(), and utl::InverseGoraCDF().
Referenced by LateralDistributionGora().
|
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 105 of file ShowerPhotonGenerator.cc.
References eCherenkov, eCherenkovAtAxis, eCherenkovCORSIKA, fwk::VModule::eFailure, eGora, eNKG, eOff, ERROR, fwk::VModule::eSuccess, fDirectCherenkovLDF, fExtraRayTraceFactor, fFluorescenceLDF, fMaxNRayTrace, fMinNRayTrace, fMultipleScatterer, fMultipleScattering, fRandomEngine, fScatteredCherenkovLDF, utl::Branch::GetChild(), utl::Branch::GetData(), fwk::CentralConfig::GetTopBranch(), fwk::VModule::GetVersionInfo(), and INFO.
|
inlineinherited |
Definition at line 95 of file VModule.h.
References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().
|
private |
Distribute points according to a Gora function.
Definition at line 962 of file ShowerPhotonGenerator.cc.
References fRandomEngine, utl::RandomEngine::GetEngine(), GoraFunction(), and utl::kTwoPi.
Referenced by LateralDistributionScatteredCherenkov(), PlotLDF(), and Run().
|
private |
Distribute points according to a NKG function.
Definition at line 944 of file ShowerPhotonGenerator.cc.
References fRandomEngine, utl::RandomEngine::GetEngine(), utl::kTwoPi, and NKGFunction().
|
private |
Distribute points according to scattered Cherenkov emission.
Definition at line 979 of file ShowerPhotonGenerator.cc.
References atm::Atmosphere::AngularCherenkovCDF(), utl::degree, fRandomEngine, utl::RandomEngine::GetEngine(), utl::BasicVector< HepVector >::GetX(), utl::BasicVector< HepVector >::GetY(), utl::kTwoPi, LateralDistributionGora(), utl::RefractionIndex::LorentzLorentz(), max, atm::ProfileResult::MaxX(), atm::ProfileResult::MinX(), utl::VRandomSampler::shoot(), utl::ShowerAge(), sqrt(), and atm::ProfileResult::Y().
|
private |
returns random numbers drawn from
between and
note: additional x -> distr. is particles per radius, not density!
s,: | shower age |
fMax,: | fraction of shower to be contained (->xMax) |
Definition at line 1097 of file ShowerPhotonGenerator.cc.
References RdGeoCeLDFFitter::a, RdGeoCeLDFFitter::b, fRandomEngine, utl::g, utl::RandomEngine::GetEngine(), utl::IncompleteBeta(), and std::pow().
Referenced by LateralDistributionNKG().
|
private |
Definition at line 752 of file ShowerPhotonGenerator.cc.
References RdGeoCeLDFFitter::c, utl::cm2, eGora, atm::Atmosphere::EvaluateDepthVsHeight(), atm::Atmosphere::EvaluateDistanceVsSlantDepth(), atm::Atmosphere::EvaluateHeightVsDistance(), atm::Atmosphere::EvaluateSlantDepthVsDistance(), atm::Atmosphere::EvaluateTemperatureVsHeight(), fFluorescenceLDF, utl::g, det::Detector::GetAtmosphere(), evt::ShowerSimData::GetDirection(), evt::ShowerSimData::GetGHParameters(), evt::ShowerSimData::GetLocalCoordinateSystem(), utl::Vector::GetMag(), utl::TabulatedFunction::GetNPoints(), evt::ShowerSimData::GetShowerCoordinateSystem(), utl::BasicVector< HepVector >::GetX(), evt::ShowerSimData::GetXFirst(), evt::VGaisserHillasParameter::GetXMax(), utl::BasicVector< HepVector >::GetY(), utl::BasicVector< HepVector >::GetZ(), utl::kgEarth, LateralDistributionGora(), LateralDistributionNKG(), LateralDistributionScatteredCherenkov(), utl::m, max, atm::ProfileResult::MaxX(), atm::ProfileResult::MinX(), utl::MoliereRadius(), utl::ReferenceEllipsoid::PointToLatitudeLongitudeHeight(), utl::TabulatedFunction::PushBack(), ToCumu(), and atm::ProfileResult::Y().
Referenced by Run().
|
private |
|
inline |
Definition at line 121 of file ShowerPhotonGenerator.h.
References fLightSourceSelector.
Referenced by FdLightCollectionEfficiencyKG::FdLightCollectionEfficiency::RunPhotonGenerationRayTracingLoop().
|
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 221 of file ShowerPhotonGenerator.cc.
References fevt::TelescopeSimData::AddPhoton(), MultipleScatterer::AddPhotons(), utl::bar, utl::cm, utl::deg, fevt::FdConstants::eBackground, fevt::FdConstants::eCherDirect, eCherenkov, eCherenkovAtAxis, eCherenkovCORSIKA, fevt::FdConstants::eCherMieScattered, fevt::FdConstants::eCherRayleighScattered, fwk::VModule::eContinueLoop, fevt::ComponentSelector::eDeSelected, eDirectCherenkov, fwk::VModule::eFailure, fevt::FdConstants::eFluorDirect, eFluorescence, fevt::FdConstants::eFluorMieScattered, fevt::FdConstants::eFluorMultScattered, fevt::FdConstants::eFluorRayleighScattered, fevt::FdConstants::eFluorTotal, eGora, fevt::ComponentSelector::eInDAQ, eLaser, fevt::FdConstants::eLaserMieScattered, fevt::FdConstants::eLaserRayleighScattered, eNKG, eOff, fevt::FdConstants::ePrimaryCherDirect, fevt::FdConstants::ePrimaryCherMieScattered, fevt::FdConstants::ePrimaryCherRayleighScattered, ERROR, eScatteredCherenkov, fwk::VModule::eSuccess, fevt::FdConstants::eTotal, eUnkown, atm::Atmosphere::EvaluateDepthVsHeight(), atm::Atmosphere::EvaluatePressureVsHeight(), atm::Atmosphere::EvaluateSlantDepthVsDistance(), atm::Atmosphere::EvaluateTemperatureVsHeight(), fevt::FEvent::EyesBegin(), fevt::FEvent::EyesEnd(), fDirectCherenkovLDF, fExtraRayTraceFactor, fFluorescenceLDF, fMaxNRayTrace, fMinNRayTrace, fMultipleScatterer, fMultipleScattering, fRandomEngine, fScatteredCherenkovLDF, fUseOnlyReferenceWavelength, utl::g, det::Detector::GetAtmosphere(), utl::Trace< T >::GetBinning(), fdet::Telescope::GetCamera(), evt::ShowerSimData::GetCherenkovBeamProductionPhotons(), utl::BasicVector< HepVector >::GetCosTheta(), fdet::Telescope::GetDiaphragmArea(), fdet::Telescope::GetDiaphragmRadius(), evt::ShowerSimData::GetDirection(), fevt::TelescopeSimData::GetDistanceTrace(), utl::RandomEngine::GetEngine(), fdet::Camera::GetFADCBinSize(), det::Detector::GetFDetector(), evt::ShowerSimData::GetGHParameters(), fevt::Eye::GetId(), evt::ShowerSimData::GetLaserData(), evt::LaserData::GetLaserWavelength(), GetLightSourceSelection(), evt::ShowerSimData::GetLocalCoordinateSystem(), utl::Vector::GetMag(), utl::TabulatedFunction::GetNPoints(), fevt::TelescopeSimData::GetRayTracedPhotonTrace(), fdet::FDetector::GetReferenceLambda(), evt::ShowerSimData::GetShowerCoordinateSystem(), fevt::Telescope::GetSimData(), utl::Trace< T >::GetSize(), fdet::FDetector::GetTelescope(), fdet::Telescope::GetTelescopeCoordinateSystem(), atm::Atmosphere::GetWavelengths(), evt::ShowerSimData::GetXFirst(), evt::VGaisserHillasParameter::GetXMax(), fevt::TelescopeSimData::HasDistanceTrace(), evt::Event::HasFEvent(), evt::ShowerSimData::HasLaserData(), fevt::TelescopeSimData::HasRayTracedPhotonTrace(), fevt::Telescope::HasSimData(), evt::Event::HasSimShower(), INFO, utl::kSpeedOfLight, utl::kTwoPi, LateralDistributionGora(), LateralDistributionNKG(), LateralDistributionScatteredCherenkov(), utl::m, fevt::TelescopeSimData::MakeRayTracedPhotonTrace(), max, atm::ProfileResult::MaxX(), atm::ProfileResult::MinX(), utl::MoliereRadius(), utl::Vector::Normalize(), ns, fevt::TelescopeSimData::PhotonTracesBegin(), fevt::TelescopeSimData::PhotonTracesEnd(), fevt::TelescopeSimData::PhotonTracesSourceBegin(), fevt::TelescopeSimData::PhotonTracesSourceEnd(), PlotLDF(), utl::ReferenceEllipsoid::PointToLatitudeLongitudeHeight(), utl::TabulatedFunction::PushBack(), fevt::TelescopeSimData::SetNumberOfPhotonBins(), utl::Photon::SetTime(), utl::VRandomSampler::shoot(), utl::ShowerAge(), sqrt(), fevt::Eye::TelescopesBegin(), fevt::Eye::TelescopesEnd(), 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().
|
inline |
Set the artificial scaling factor for the number of ray-traced photons.
Definition at line 113 of file ShowerPhotonGenerator.h.
References fExtraRayTraceFactor.
Referenced by FdLightCollectionEfficiencyKG::FdLightCollectionEfficiency::RunPhotonGenerationRayTracingLoop().
|
inline |
Definition at line 122 of file ShowerPhotonGenerator.h.
References fLightSourceSelector.
Referenced by FdLightCollectionEfficiencyKG::FdLightCollectionEfficiency::RunPhotonGenerationRayTracingLoop().
|
inline |
Set the max. no. of photons raytraced per time bin.
Definition at line 103 of file ShowerPhotonGenerator.h.
References fMaxNRayTrace.
Referenced by FdLightCollectionEfficiencyKG::FdLightCollectionEfficiency::RunPhotonGenerationRayTracingLoop().
|
inline |
Set the min. no. of photons raytraced per time bin.
Definition at line 108 of file ShowerPhotonGenerator.h.
References fMinNRayTrace.
Referenced by FdLightCollectionEfficiencyKG::FdLightCollectionEfficiency::RunPhotonGenerationRayTracingLoop().
|
inline |
Set whether photons should be generated only at the reference wavelength (used by FdLightCollectionEfficiency)
Definition at line 118 of file ShowerPhotonGenerator.h.
References fUseOnlyReferenceWavelength.
Referenced by FdLightCollectionEfficiencyKG::FdLightCollectionEfficiency::RunPhotonGenerationRayTracingLoop().
|
private |
Definition at line 730 of file ShowerPhotonGenerator.cc.
Referenced by PlotLDF().
|
private |
Definition at line 132 of file ShowerPhotonGenerator.h.
|
private |
min no. of photons per bin
Definition at line 128 of file ShowerPhotonGenerator.h.
Referenced by GetExtraRayTraceFactor(), Init(), Run(), and SetExtraRayTraceFactor().
|
private |
Photons are generated at the reference wavelength only if this is set.
Definition at line 130 of file ShowerPhotonGenerator.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 134 of file ShowerPhotonGenerator.h.
Referenced by GetLightSourceSelection(), ResetLightSourceSelection(), and SetLightSourceSelection().
|
private |
Returns int as implementation of an eNone equivalent.
Definition at line 126 of file ShowerPhotonGenerator.h.
Referenced by GetMaxNRayTrace(), Init(), Run(), and SetMaxNRayTrace().
|
private |
max no. of photons per bin
Definition at line 127 of file ShowerPhotonGenerator.h.
Referenced by GetMinNRayTrace(), Init(), Run(), and SetMinNRayTrace().
|
private |
Definition at line 137 of file ShowerPhotonGenerator.h.
|
private |
Definition at line 133 of file ShowerPhotonGenerator.h.
|
private |
This can be set in order to simulate photons for a single source ONLY (for FdLightCollectionEfficiency)
Definition at line 136 of file ShowerPhotonGenerator.h.
Referenced by GoraFunction(), Init(), LateralDistributionGora(), LateralDistributionNKG(), LateralDistributionScatteredCherenkov(), NKGFunction(), and Run().
|
private |
Definition at line 131 of file ShowerPhotonGenerator.h.
|
private |
for doing more tracing to reduce fluctuations
Definition at line 129 of file ShowerPhotonGenerator.h.
Referenced by GetUseOnlyReferenceWavelength(), Run(), and SetUseOnlyReferenceWavelength().