List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Attributes | Private Member Functions | Private Attributes
ProfileSimulatorOG::ProfileSimulator Class Reference

Simulates the shower profile with GH parametrization. More...

#include <ProfileSimulator.h>

Inheritance diagram for ProfileSimulatorOG::ProfileSimulator:
Inheritance graph
[legend]

Public Types

enum  ProfileType { eFromEnergy = 0, eFromFixParameters }
 Possible types of profile generation. More...
 
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::StopwatchGetStopwatch ()
 
const utl::StopwatchGetStopwatch () 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 ()
 
 ProfileSimulator ()
 
fwk::VModule::ResultFlag Run (evt::Event &theEvent)
 Run: invoked once per event. More...
 
ResultFlag RunWithTiming (evt::Event &event)
 
virtual ~ProfileSimulator ()
 

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 CalculatedEdX (double age, double density) const
 This function is obsolete Calculation of the mean energy deposition in the atmosphere. More...
 
double CalculateNMax (double depth, double xZero, double xMax, double energy) const
 
double DicePowerLaw (double min, double max, double index) const
 
double RandomLambda (int primary, double energy) const
 
double RandomNMax (int primary, double energy) const
 
double RandomXMax (int primary, double energy) const
 
double RandomXOne (int primary, double energy) const
 
double RandomXZero (int primary, double energy) const
 
 REGISTER_MODULE ("ProfileSimulatorOG", ProfileSimulator)
 

Private Attributes

double fAlphaSpectrum
 
bool fConstantX0
 
double fEnergyCutoff
 
bool fGenerateEnergy
 
evt::GaisserHillas4Parameter fGH
 
double fMaxEnergy
 
double fMinEnergy
 
double fPhi
 
int fPrimary
 
int fProfileType
 
utl::RandomEnginefRandomEngine = nullptr
 
double fTheta
 
double fXMaxSig
 

Detailed Description

Simulates the shower profile with GH parametrization.

Author
Luis Prado Jr and Heiko Geenen
Date
20 Sep 2003

Definition at line 24 of file ProfileSimulator.h.

Member Enumeration Documentation

enum fwk::VModule::InfoLevel
protectedinherited
Enumerator
eInfoNone 
eInfoFinal 
eInfoIntermediate 
eInfoDebug 

Definition at line 125 of file VModule.h.

Possible types of profile generation.

Enumerator
eFromEnergy 
eFromFixParameters 

Definition at line 35 of file ProfileSimulator.h.

enum fwk::VModule::ResultFlag
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.

Definition at line 60 of file VModule.h.

Different types of version info that can be retrieved from GetVersionInfo.

Enumerator
eFilename 
eRevisionNumber 
eDate 
eTime 
eLastEditor 

Definition at line 110 of file VModule.h.

Constructor & Destructor Documentation

ProfileSimulator::ProfileSimulator ( )

Definition at line 65 of file ProfileSimulator.cc.

References utl::Particle::eProton.

ProfileSimulator::~ProfileSimulator ( )
virtual

Definition at line 72 of file ProfileSimulator.cc.

Member Function Documentation

double ProfileSimulator::CalculatedEdX ( double  age,
double  density 
) const
private

This function is obsolete Calculation of the mean energy deposition in the atmosphere.

This function is based on the Bruce Dawson's algorithm. Calculate mean dE/dX as function of shower age and air density. Dai, 07/02/95

Definition at line 627 of file ProfileSimulator.cc.

References utl::cm, utl::g, and utl::MeV.

double ProfileSimulator::CalculateNMax ( double  depth,
double  xZero,
double  xMax,
double  energy 
) const
private

Evaluate Nmax for a known Xzero, Xmax and Energy at depth 'depth'. Taken from FDSim

Definition at line 590 of file ProfileSimulator.cc.

References utl::cm, utl::g, utl::kLambdaGH, and std::pow().

double ProfileSimulator::DicePowerLaw ( double  min,
double  max,
double  index 
) const
private

Assuming a probability density function p(x) then

   x /           /  max /
     |          /       |
     | p(x)dx  /        | p(x)dx = w,
     |        /         |
 min /       /      min /

where w is a flat distributed random number for p(x) being a powerlaw the equation is invertable and is solved analytically in this function

Definition at line 325 of file ProfileSimulator.cc.

References INFO, and std::pow().

VModule::ResultFlag ProfileSimulator::Finish ( )
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 305 of file ProfileSimulator.cc.

References io::eSuccess.

std::string fwk::VModule::GetResultFlagByName ( const ResultFlag  flag)
staticinherited
utl::Stopwatch& fwk::VModule::GetStopwatch ( )
inlineinherited

Definition at line 106 of file VModule.h.

References fwk::VModule::fStopwatch.

const utl::Stopwatch& fwk::VModule::GetStopwatch ( ) const
inlineinherited

Definition at line 107 of file VModule.h.

References fwk::VModule::fStopwatch.

std::string fwk::VModule::GetVersionInfo ( const VersionInfoType  v) const
inherited
VModule::ResultFlag ProfileSimulator::Init ( )
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 78 of file ProfileSimulator.cc.

References ERROR, io::eSuccess, evt::gh::eX0, utl::Branch::GetChild(), utl::Branch::GetData(), and fwk::CentralConfig::GetTopBranch().

void fwk::VModule::InitTiming ( )
inlineinherited

Definition at line 95 of file VModule.h.

References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().

double ProfileSimulator::RandomLambda ( int  primary,
double  energy 
) const
private

Dices random lambda according to Corsika simulations. /author F.Salamida

Definition at line 482 of file ProfileSimulator.cc.

References RdGeoCeLDFFitter::c, utl::cm, utl::Particle::eProton, and utl::g.

double ProfileSimulator::RandomNMax ( int  primary,
double  energy 
) const
private

Dices random Nmax according to Corsika simulations. /author F.Salamida

Definition at line 535 of file ProfileSimulator.cc.

References RdGeoCeLDFFitter::c, and utl::Particle::eProton.

double ProfileSimulator::RandomXMax ( int  primary,
double  energy 
) const
private

Dices random XMax according to Corsika simulations.

Author
F.Salamida

Definition at line 429 of file ProfileSimulator.cc.

References RdGeoCeLDFFitter::c, utl::cm, utl::Particle::eProton, and utl::g.

double ProfileSimulator::RandomXOne ( int  primary,
double  energy 
) const
private

Dices a random Xone according to Corsika simulations.

Author
F. Salamida

Definition at line 351 of file ProfileSimulator.cc.

References RdGeoCeLDFFitter::c, utl::cm2, utl::Particle::eProton, and utl::g.

double ProfileSimulator::RandomXZero ( int  primary,
double  energy 
) const
private

Dices random XZero according to Corsika simulations.

Author
F. Salamida

Definition at line 388 of file ProfileSimulator.cc.

References RdGeoCeLDFFitter::c, utl::cm2, utl::Particle::eProton, and utl::g.

ProfileSimulatorOG::ProfileSimulator::REGISTER_MODULE ( "ProfileSimulatorOG"  ,
ProfileSimulator   
)
private
VModule::ResultFlag ProfileSimulator::Run ( evt::Event event)
virtual
ResultFlag fwk::VModule::RunWithTiming ( evt::Event event)
inlineinherited

Member Data Documentation

double ProfileSimulatorOG::ProfileSimulator::fAlphaSpectrum
private

Definition at line 51 of file ProfileSimulator.h.

bool ProfileSimulatorOG::ProfileSimulator::fConstantX0
private

Definition at line 59 of file ProfileSimulator.h.

double ProfileSimulatorOG::ProfileSimulator::fEnergyCutoff
private

Definition at line 47 of file ProfileSimulator.h.

bool ProfileSimulatorOG::ProfileSimulator::fGenerateEnergy
private

Definition at line 50 of file ProfileSimulator.h.

evt::GaisserHillas4Parameter ProfileSimulatorOG::ProfileSimulator::fGH
private

Definition at line 43 of file ProfileSimulator.h.

int fwk::VModule::fInfoLevel = 0
protectedinherited
double ProfileSimulatorOG::ProfileSimulator::fMaxEnergy
private

Definition at line 46 of file ProfileSimulator.h.

double ProfileSimulatorOG::ProfileSimulator::fMinEnergy
private

Definition at line 45 of file ProfileSimulator.h.

double ProfileSimulatorOG::ProfileSimulator::fPhi
private

Definition at line 58 of file ProfileSimulator.h.

int ProfileSimulatorOG::ProfileSimulator::fPrimary
private

Definition at line 48 of file ProfileSimulator.h.

int ProfileSimulatorOG::ProfileSimulator::fProfileType
private

Definition at line 49 of file ProfileSimulator.h.

utl::RandomEngine* ProfileSimulatorOG::ProfileSimulator::fRandomEngine = nullptr
private

Definition at line 61 of file ProfileSimulator.h.

double ProfileSimulatorOG::ProfileSimulator::fTheta
private

Definition at line 57 of file ProfileSimulator.h.

double ProfileSimulatorOG::ProfileSimulator::fXMaxSig
private

Definition at line 52 of file ProfileSimulator.h.


The documentation for this class was generated from the following files:

, generated on Tue Sep 26 2023.