2 #include <CLHEP/Random/Randomize.h>
5 : theShowerType(-1), theEnergy(0), thePositionAtShower(0,0,0), thePathLengthAtShower(0),
6 thePathLengthOnEcal(0), theStepLengthToHcal(0), theStepLengthToOut(0),
7 thePathLength(0), theGlobalTime(0), thePosition(0,0,0), theEnergyDeposited(0)
19 double magneticField) {
71 if (pathLengthAtHcalBack>0) {
81 double zsign = (eta > 0) ? 1.0 : -1.0 ;
101 double depthAtShower = 0.0;
106 double effectiveLambda = 0.0;
116 double frac_ssp2 = 2.8310e+00+2.6766e+00*tanh(-4.8068
e-01*(
std::log(
theEnergy)+3.4857
e+00));
118 if(fastSimShowerType == 100 ) {
135 depthAtShower = - effectiveLambda*
log(CLHEP::HepUniformRand());
137 if(depthAtShower > (pathLengthAt2 - thePathLengthOnEcal) ) {
139 if(CLHEP::HepUniformRand() < frac_ssp2 ) {
140 depthAtShower = (pathLengthAt2 -
thePathLengthOnEcal) + (pathLengthAt3-pathLengthAt2)*CLHEP::HepUniformRand();
147 if(depthAtShower > (pathLengthAt4 - thePathLengthOnEcal)) {
148 depthAtShower = (pathLengthAt4 - pathLengthAt3)*CLHEP::HepUniformRand();
154 else if(fastSimShowerType == 101 ) {
157 double zsign = (position.getEta() > 0) ? 1.0 : -1.0 ;
170 depthAtShower = -effectiveLambda*
std::log(CLHEP::HepUniformRand());
173 if(CLHEP::HepUniformRand() < frac_ssp2 ) {
174 depthAtShower = (pathLengthAt2 -
thePathLengthOnEcal) +(pathLengthAt3 - pathLengthAt2)*CLHEP::HepUniformRand();
177 depthAtShower = (pathLengthAt3 -
thePathLengthOnEcal)-effectiveLambda*std::log(CLHEP::HepUniformRand());
181 depthAtShower = (pathLengthAt4 - pathLengthAt3)*CLHEP::HepUniformRand();
const double ZFrontCrystalEE
static std::vector< std::string > checklist log
double getPathLengthAtZ(double z) const
const double Zmax[kNumberCalorimeter]
double thePathLengthAtShower
GflashTrajectory * theHelix
Sin< T >::type sin(const T &t)
Gflash3Vector & simulateFirstInteractionPoint(int showType, Gflash3Vector &pos)
const double EtaMax[kNumberCalorimeter]
double theStepLengthToHcal
const double LengthCrystalEE
Gflash3Vector thePosition
const double LengthCrystalEB
void getGflashTrajectoryPoint(GflashTrajectoryPoint &point, double s) const
int findShowerType(const Gflash3Vector &position)
const double RFrontCrystalEB
const double Zmin[kNumberCalorimeter]
Gflash3Vector thePositionAtShower
CLHEP::Hep3Vector Gflash3Vector
double thePathLengthOnEcal
double theEnergyDeposited
Gflash3Vector & getPosition()
static int position[264][3]
double theStepLengthToOut
const double Rmax[kNumberCalorimeter]
GflashTrajectoryPoint theTrajectoryPoint
const double Rmin[kNumberCalorimeter]
double getPathLengthAtRhoEquals(double rho) const
void initialize(int showerType, double energy, double globalTime, double charge, Gflash3Vector &position, Gflash3Vector &momentum, double magneticField)
void initializeTrajectory(const HepGeom::Vector3D< double > &, const HepGeom::Point3D< double > &, double q, double Field)
void updateShowino(double deltaStep)