List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Attributes | Private Member Functions | Private Attributes | Static Private Attributes
SdSimpleSimKG::SdSimpleSim Class Reference

A super-simple-and-fast SD-event-generator. See GAP2008-061 for details. More...

#include "SdSimpleSimKG/SdSimpleSim.h"

Inheritance diagram for SdSimpleSimKG::SdSimpleSim:
Inheritance graph
[legend]

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::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 ()
 
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::RandomEnginefRandomEngine
 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
 

Detailed Description

A super-simple-and-fast SD-event-generator. See GAP2008-061 for details.

Author
Ralf Ulrich
Date
Thu Apr 7 11:36:10 CEST 2005

Definition at line 53 of file SdSimpleSim.h.

Member Enumeration Documentation

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

Definition at line 125 of file VModule.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

SdSimpleSim::SdSimpleSim ( )

Definition at line 92 of file SdSimpleSim.cc.

Member Function Documentation

TabulatedFunction SdSimpleSim::CalculateLogZdist ( const utl::TabulatedFunction MuonProfile,
double  cosTheta,
double  XobsVert 
)
private
double SdSimpleSim::CalculateTankSignal ( double  CoreDistance,
double  TankRadius,
double  TankHeight,
double  Zenith,
double  Age,
double  Rm,
double  Ne,
double  Ng,
double  Nmu,
bool  fluctuations = true 
)
private
VModule::ResultFlag SdSimpleSim::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 1443 of file SdSimpleSim.cc.

References fwk::VModule::eSuccess, file, and fStatTree.

SdSimpleSim::FitParam SdSimpleSim::FitAtmosphere ( const atm::ProfileResult prof)
private
SdSimpleSim::FitParam SdSimpleSim::FitDecay ( const utl::TabulatedFunction prof,
bool  dEdX = false 
)
private
double SdSimpleSim::GenerateNoiseStation ( sevt::Station tank,
const utl::TimeStamp T0,
double  TimeOffset,
double  TimeWindow 
)
private
double SdSimpleSim::GetCDASTriggerTimeWindow ( const utl::TimeStamp time)
private

Definition at line 2339 of file SdSimpleSim.cc.

References utl::TimeStamp::GetGPSSecond(), and utl::microsecond.

Referenced by Run().

TabulatedFunction SdSimpleSim::GetLogZdist ( const utl::TabulatedFunction prof,
const utl::Point core,
const utl::Vector axis 
)
private
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 SdSimpleSim::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 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.

void fwk::VModule::InitTiming ( )
inlineinherited

Definition at line 95 of file VModule.h.

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

bool SdSimpleSim::IsNoise ( double  TimeWindow)
private

Definition at line 1568 of file SdSimpleSim.cc.

References fNoiseRatePerStation, fRandomEngine, and utl::RandomEngine::GetEngine().

Referenced by Noise().

double SdSimpleSim::LTP ( double  r,
double  theta,
double  energy 
)
private

Definition at line 1690 of file SdSimpleSim.cc.

double SdSimpleSim::NerlingF1 ( double  E,
double  a1 
)
private

Definition at line 1762 of file SdSimpleSim.cc.

double SdSimpleSim::NerlingF2 ( double  E,
double  a2,
double  s 
)
private

Definition at line 1769 of file SdSimpleSim.cc.

References std::pow().

Referenced by SampleEnergy().

double SdSimpleSim::NKG ( double  N,
double  Rm,
double  R,
double  s 
)
private

Definition at line 1472 of file SdSimpleSim.cc.

References fVerbosity, utl::kPi, std::pow(), and WARNING.

Referenced by CalculateTankSignal().

bool SdSimpleSim::Noise ( sevt::SEvent sevent,
const utl::TimeStamp T0,
int  TankID,
double  TimeOffset,
double  TimeWindow 
)
private
SdSimpleSimKG::SdSimpleSim::REGISTER_MODULE ( "SdSimpleSimKG"  ,
SdSimpleSim   
)
private
VModule::ResultFlag SdSimpleSim::Run ( evt::Event event)
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().

ResultFlag fwk::VModule::RunWithTiming ( evt::Event event)
inlineinherited
double SdSimpleSim::SampleEnergy ( double  Emin,
double  Emax,
double  Age 
)
private
double SdSimpleSim::T1TriggerProbability ( double  signal,
double  S1000,
double  theta 
)
private
double SdSimpleSim::TankIntersection ( double  r,
double  phi,
double  z,
double  theta,
double  TankRadius 
)
private

Definition at line 1659 of file SdSimpleSim.cc.

References sqrt().

Referenced by CalculateTankSignal().

Member Data Documentation

TProfile* SdSimpleSimKG::SdSimpleSim::fCharged
private

Definition at line 174 of file SdSimpleSim.h.

Referenced by Init(), and Run().

TProfile* SdSimpleSimKG::SdSimpleSim::fCharged_vs_z
private

Definition at line 182 of file SdSimpleSim.h.

Referenced by Init(), and Run().

TProfile* SdSimpleSimKG::SdSimpleSim::fdEdX
private

Definition at line 178 of file SdSimpleSim.h.

Referenced by Init(), and Run().

TProfile* SdSimpleSimKG::SdSimpleSim::fdEdX_vs_z
private

Definition at line 186 of file SdSimpleSim.h.

Referenced by Init(), and Run().

TProfile* SdSimpleSimKG::SdSimpleSim::fdNdX
private

Definition at line 173 of file SdSimpleSim.h.

Referenced by Init(), and Run().

TProfile* SdSimpleSimKG::SdSimpleSim::fdNdz
private

Definition at line 181 of file SdSimpleSim.h.

Referenced by Init(), and Run().

TProfile* SdSimpleSimKG::SdSimpleSim::fElectron
private

Definition at line 176 of file SdSimpleSim.h.

Referenced by Init(), and Run().

TProfile* SdSimpleSimKG::SdSimpleSim::fElectron_vs_z
private

Definition at line 184 of file SdSimpleSim.h.

Referenced by Init(), and Run().

double SdSimpleSimKG::SdSimpleSim::fEMAgeFactor
private

Definition at line 146 of file SdSimpleSim.h.

Referenced by CalculateTankSignal(), and Init().

bool SdSimpleSimKG::SdSimpleSim::fForceClosestTankToTrigger
private

Definition at line 166 of file SdSimpleSim.h.

Referenced by Init(), and Run().

TProfile* SdSimpleSimKG::SdSimpleSim::fGamma
private

Definition at line 177 of file SdSimpleSim.h.

Referenced by Init(), and Run().

TProfile* SdSimpleSimKG::SdSimpleSim::fGamma_vs_z
private

Definition at line 185 of file SdSimpleSim.h.

Referenced by Init(), and Run().

int fwk::VModule::fInfoLevel = 0
protectedinherited
double SdSimpleSimKG::SdSimpleSim::fLateralCut
private

Definition at line 147 of file SdSimpleSim.h.

Referenced by Init(), and Run().

TProfile* SdSimpleSimKG::SdSimpleSim::fLorenzo
private

Definition at line 180 of file SdSimpleSim.h.

Referenced by Init(), and Run().

TProfile* SdSimpleSimKG::SdSimpleSim::fLorenzo_vs_X
private

Definition at line 172 of file SdSimpleSim.h.

Referenced by Init(), and Run().

TProfile* SdSimpleSimKG::SdSimpleSim::fMuon
private

Definition at line 175 of file SdSimpleSim.h.

Referenced by Init(), and Run().

TProfile* SdSimpleSimKG::SdSimpleSim::fMuon_vs_z
private

Definition at line 183 of file SdSimpleSim.h.

Referenced by Init(), and Run().

bool SdSimpleSimKG::SdSimpleSim::fMuonProductionHeightFromProfile
private

Definition at line 150 of file SdSimpleSim.h.

Referenced by Init(), and Run().

double SdSimpleSimKG::SdSimpleSim::fMuonRScale
private

Definition at line 145 of file SdSimpleSim.h.

Referenced by CalculateTankSignal(), and Init().

int SdSimpleSimKG::SdSimpleSim::fNElectrons
private

Definition at line 157 of file SdSimpleSim.h.

Referenced by CalculateTankSignal(), and Run().

const double SdSimpleSim::fNerlingA1a = 6.42522
staticprivate

Definition at line 126 of file SdSimpleSim.h.

const double SdSimpleSim::fNerlingA1b = -1.53183
staticprivate

Definition at line 127 of file SdSimpleSim.h.

const double SdSimpleSim::fNerlingA2a = 168.168
staticprivate

Definition at line 128 of file SdSimpleSim.h.

const double SdSimpleSim::fNerlingA2b = -42.1368
staticprivate

Definition at line 129 of file SdSimpleSim.h.

int SdSimpleSimKG::SdSimpleSim::fNGammas
private

Definition at line 156 of file SdSimpleSim.h.

Referenced by CalculateTankSignal(), and Run().

int SdSimpleSimKG::SdSimpleSim::fNMuons
private

Definition at line 155 of file SdSimpleSim.h.

Referenced by CalculateTankSignal(), and Run().

bool SdSimpleSimKG::SdSimpleSim::fNoise
private

Definition at line 149 of file SdSimpleSim.h.

Referenced by Init(), and Run().

double SdSimpleSimKG::SdSimpleSim::fNoiseRatePerStation
private

Definition at line 164 of file SdSimpleSim.h.

Referenced by IsNoise(), and Noise().

int SdSimpleSimKG::SdSimpleSim::fNSample
private

Definition at line 152 of file SdSimpleSim.h.

Referenced by CalculateTankSignal(), and Init().

bool SdSimpleSimKG::SdSimpleSim::fOnlyClosestTank
private

Definition at line 167 of file SdSimpleSim.h.

Referenced by Init(), and Run().

bool SdSimpleSimKG::SdSimpleSim::fPlaneFront
private

Definition at line 168 of file SdSimpleSim.h.

Referenced by Init(), and Run().

std::map<evt::ShowerSimData::ProfileType, FitParam> SdSimpleSimKG::SdSimpleSim::fProfileExtrapolation
private

Definition at line 133 of file SdSimpleSim.h.

Referenced by Run().

utl::RandomEngine& SdSimpleSimKG::SdSimpleSim::fRandomEngine
private

for CLHEP random nubers

Definition at line 138 of file SdSimpleSim.h.

Referenced by CalculateTankSignal(), GenerateNoiseStation(), IsNoise(), Noise(), Run(), and SampleEnergy().

int SdSimpleSimKG::SdSimpleSim::fSdId
private

Definition at line 143 of file SdSimpleSim.h.

Referenced by Init(), and Run().

double SdSimpleSimKG::SdSimpleSim::fSElectrons
private

Definition at line 162 of file SdSimpleSim.h.

Referenced by CalculateTankSignal().

double SdSimpleSimKG::SdSimpleSim::fSGammas
private

Definition at line 161 of file SdSimpleSim.h.

Referenced by CalculateTankSignal().

FitParam SdSimpleSimKG::SdSimpleSim::fSlantDepthExtrapolation
private

Definition at line 134 of file SdSimpleSim.h.

Referenced by Run().

double SdSimpleSimKG::SdSimpleSim::fSMuons
private

Definition at line 160 of file SdSimpleSim.h.

Referenced by CalculateTankSignal().

TTree* SdSimpleSimKG::SdSimpleSim::fStatTree
private

Definition at line 171 of file SdSimpleSim.h.

Referenced by Finish(), Init(), and Run().

bool SdSimpleSimKG::SdSimpleSim::fUseT2LifeTime
private

Definition at line 141 of file SdSimpleSim.h.

Referenced by Init(), and Run().

int SdSimpleSimKG::SdSimpleSim::fVerbosity
private

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

, generated on Tue Sep 26 2023.