2 #include <CLHEP/Random/Randomize.h>
7 thePositionAtShower(0, 0, 0),
8 thePathLengthAtShower(0),
9 thePathLengthOnEcal(0),
10 theStepLengthToHcal(0),
11 theStepLengthToOut(0),
15 theEnergyDeposited(0) {
35 if (showerType < 100) {
76 if (pathLengthAtHcalBack > 0) {
84 double zsign = (eta > 0) ? 1.0 : -1.0;
103 double depthAtShower = 0.0;
109 double effectiveLambda = 0.0;
119 double frac_ssp2 = 2.8310e+00 + 2.6766e+00 * tanh(-4.8068
e-01 * (
std::log(
theEnergy) + 3.4857
e+00));
121 if (fastSimShowerType == 100) {
141 depthAtShower = -effectiveLambda *
log(CLHEP::HepUniformRand());
143 if (depthAtShower > (pathLengthAt2 - thePathLengthOnEcal)) {
145 if (CLHEP::HepUniformRand() < frac_ssp2) {
147 (pathLengthAt2 -
thePathLengthOnEcal) + (pathLengthAt3 - pathLengthAt2) * CLHEP::HepUniformRand();
154 if (depthAtShower > (pathLengthAt4 - thePathLengthOnEcal)) {
155 depthAtShower = (pathLengthAt4 - pathLengthAt3) * CLHEP::HepUniformRand();
160 }
else if (fastSimShowerType == 101) {
163 double zsign = (position.getEta() > 0) ? 1.0 : -1.0;
178 depthAtShower = -effectiveLambda *
std::log(CLHEP::HepUniformRand());
181 if (CLHEP::HepUniformRand() < frac_ssp2) {
183 (pathLengthAt2 -
thePathLengthOnEcal) + (pathLengthAt3 - pathLengthAt2) * CLHEP::HepUniformRand();
185 depthAtShower = (pathLengthAt3 -
thePathLengthOnEcal) - effectiveLambda * std::log(CLHEP::HepUniformRand());
189 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)