1 #ifndef _ShowerPhotonGeneratorOG_ShowerPhotonGenerator_h_
2 #define _ShowerPhotonGeneratorOG_ShowerPhotonGenerator_h_
13 #include <fwk/VModule.h>
15 #include <utl/CoordinateSystemPtr.h>
16 #include <utl/ShadowPtr.h>
17 #include <fevt/FdConstants.h>
31 class RandomSamplerFromPDF;
32 class TabulatedFunction;
48 namespace ShowerPhotonGeneratorOG {
142 const double r_moliere);
145 const double r_moliere);
150 double distanceCoreToPointOnShower,
153 double& emissionDistance,
159 const double absCosZenith,
161 const bool flatEarth,
162 const double atmDistanceMin,
163 const double atmDistanceMax);
172 TH1D*
ToCumu(TH1D* h,
double total);
181 ScopeGuard(std::map<int, utl::RandomSamplerFromPDF*>& theMap);
184 std::map<int, utl::RandomSamplerFromPDF*>&
fMap;
int GetLightSourceSelection()
ELDFMode fScatteredCherenkovLDF
unsigned int fMinNRayTrace
max no. of photons per bin
utl::Vector LateralDistributionNKG(const utl::CoordinateSystemPtr &shwCS, const double s_age, const double r_moliere)
Distribute points according to a NKG function.
unsigned int GetMaxNRayTrace() const
Get the max. no. of photons raytraced per time bin.
void SetMaxNRayTrace(unsigned int nphotons)
Set the max. no. of photons raytraced per time bin.
bool GetUseOnlyReferenceWavelength() const
Returns whether photons will be generated only at the reference wavelength.
REGISTER_MODULE("ShowerPhotonGeneratorOG", ShowerPhotonGenerator)
utl::Vector LateralDistributionGora(const utl::CoordinateSystemPtr &shwCS, const double s_age, const double r_moliere)
Distribute points according to a Gora function.
unsigned int fMaxNRayTrace
Returns int as implementation of an eNone equivalent.
Class to hold collection (x,y) points and provide interpolation between them.
void PlotLDF(const evt::ShowerSimData &simShower, const utl::TabulatedFunction &cherenkovProductionBeam, const double age)
void SetLightSourceSelection(const fevt::FdConstants::LightSource source)
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.
EPhotonSource
The source that generated this photon.
utl::RandomEngine * fRandomEngine
This can be set in order to simulate photons for a single source ONLY (for FdLightCollectionEfficienc...
double fExtraRayTraceFactor
min no. of photons per bin
Interface class to access Shower Simulated parameters.
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
double GoraFunction(const double s)
returns random numbers drawn from Gora et al. LDF
LightSource
Possible light sources.
Wraps the random number engine used to generate distributions.
Class describing the Atmospheric profile.
fwk::VModule::ResultFlag Init()
Initialize: invoked at beginning of run (NOT beginning of event)
TH1D * ToCumu(TH1D *h, double total)
void SetExtraRayTraceFactor(double factor)
Set the artificial scaling factor for the number of ray-traced photons.
unsigned int GetMinNRayTrace() const
Get the min. no. of photons raytraced per time bin.
ScopeGuard(std::map< int, utl::RandomSamplerFromPDF * > &theMap)
ELDFMode fFluorescenceLDF
Photons are generated at the reference wavelength only if this is set.
bool fUseOnlyReferenceWavelength
for doing more tracing to reduce fluctuations
ResultFlag
Flag returned by module methods to the RunController.
fwk::VModule::ResultFlag Finish()
Finish: invoked at end of the run (NOT end of the event)
ELDFMode fDirectCherenkovLDF
void SetUseOnlyReferenceWavelength(bool onlyRefWl)
Set whether photons should be generated only at the reference wavelength (used by FdLightCollectionEf...
ELDFMode
Shower photon LDF modes.
void ResetLightSourceSelection()
std::map< int, utl::RandomSamplerFromPDF * > & fMap
fwk::VModule::ResultFlag Run(evt::Event &event)
Run: invoked once per event.
MultipleScatterer * fMultipleScatterer
Automatically frees memory on scope exit.
double NKGFunction(const double s, const double fMax)
returns random numbers drawn from
void SetMinNRayTrace(unsigned int nphotons)
Set the min. no. of photons raytraced per time bin.
Simulate photon injection into FD telescope.
Class to shoot random numbers given by a user-defined distribution function.
double GetExtraRayTraceFactor() const
Get the artificial scaling factor for the number of ray-traced photons.