4 #include <utl/PhysicalConstants.h>
5 #include <fwk/RandomEngineRegistry.h>
6 #include <utl/RandomEngine.h>
7 #include <CLHEP/Random/RandFlat.h>
8 #include <CLHEP/Random/RandPoisson.h>
9 #include <CLHEP/Random/RandGauss.h>
10 #include <fwk/CentralConfig.h>
11 #include <utl/Reader.h>
12 #include <utl/config.h>
17 using CLHEP::RandFlat;
18 using CLHEP::RandPoisson;
22 ArtificialShowerFileParticleIterator::ArtificialShowerFileParticleIterator() :
30 fPhotonEnergy(80.0*
MeV),
31 fElectronEnergy(80.0*
MeV),
32 fMuonDensity(0.1/
m/
m),
33 fPhotonDensity(0.1/
m/
m),
34 fElectronDensity(0.1/
m/
m),
35 fParticleZenith(0.0*
deg),
36 fParticleAzimuth(0.0*
deg),
37 fParticleTime(2000.0*
ns),
38 fParticleWeight(100.0),
39 fRandomAzimuth(false),
40 fGeneratedParticles(0)
50 double muonEnergy,
double photonEnergy,
double electronEnergy,
51 double muonDensity,
double photonDensity,
double electronDensity,
52 double particleZenith,
double particleAzimuth,
double particleTime,
53 double particleWeight,
bool randomAzimuth) :
59 fMaxRadius(maxRadius),
60 fMuonEnergy(muonEnergy),
61 fPhotonEnergy(photonEnergy),
62 fElectronEnergy(electronEnergy),
63 fMuonDensity(muonDensity),
64 fPhotonDensity(photonDensity),
65 fElectronDensity(electronDensity),
66 fParticleZenith(particleZenith),
67 fParticleAzimuth(particleAzimuth),
68 fParticleTime(particleTime),
69 fParticleWeight(particleWeight),
70 fRandomAzimuth(randomAzimuth),
71 fGeneratedParticles(0)
131 fRandomEngine = &RandomEngineRegistry::GetInstance().Get(RandomEngineRegistry::eDetector).GetEngine();
134 const double particleType = RandFlat::shoot(
fRandomEngine,0.0,1.0);
142 particleX = RandFlat::shoot(
fRandomEngine, -fMaxRadius, fMaxRadius);
143 particleY = RandFlat::shoot(
fRandomEngine, -fMaxRadius, fMaxRadius);
173 Point( particleX, particleY, 0.0, groundCS ),
174 Vector( dirX, dirY, dirZ, groundCS ),
Branch GetTopBranch() const
utl::Particle fCurrentParticle
Describes a particle for Simulation.
void SetShowerAzimuth(const double showerAzimuth)
virtual void Rewind()
Rewind the particle list in the shower file to the beginning.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
utl::RandomEngine::RandomEngineType * fRandomEngine
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
Class representing a document branch.
unsigned int fGeneratedParticles
virtual utl::Particle * GetOneParticle(const utl::CoordinateSystemPtr &groundCS)
Member function to fetch the next particle.
virtual ~ArtificialShowerFileParticleIterator()
void SetShowerZenith(const double showerZenith)
ArtificialShowerFileParticleIterator()
void GetData(bool &b) const
Overloads of the GetData member template function.
void GenerateParticle(const utl::CoordinateSystemPtr &groundCS)
A TimeInterval is used to represent time elapsed between two events.
unsigned int fTotalParticles