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;
121 if (fastSimShowerType == 100) {
141 depthAtShower = -effectiveLambda *
log(CLHEP::HepUniformRand());
145 if (CLHEP::HepUniformRand() < frac_ssp2) {
147 (pathLengthAt2 -
thePathLengthOnEcal) + (pathLengthAt3 - pathLengthAt2) * CLHEP::HepUniformRand();
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();
189 depthAtShower = (pathLengthAt4 - pathLengthAt3) * CLHEP::HepUniformRand();
const double ZFrontCrystalEE
void tanh(data_T data[CONFIG_T::n_in], res_T res[CONFIG_T::n_in])
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
double getPathLengthAtRhoEquals(double rho) const
const double LengthCrystalEE
Gflash3Vector thePosition
const double LengthCrystalEB
double getPathLengthAtZ(double z) const
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]
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)