12 #include "Math/GenVector/RotationZ.h" 14 #include "CLHEP/Random/RandFlat.h" 15 #include "CLHEP/Random/RandGaussQ.h" 16 #include "CLHEP/Units/GlobalPhysicalConstants.h" 17 #include "CLHEP/Units/GlobalSystemOfUnits.h" 30 ELECTRON_DIFFUSION_COEFF(0.0161),
40 double dNdE =
pow( xx, 0.38) *
exp(-1.38*xx);
63 CLHEP::HepRandomEngine* engine) {
68 LogTrace(
"CSCDriftSim") <<
"CSCDriftSim: ionization cluster at: " << pos;
74 clusterPos = yShift + clusterPos;
93 double avgPathLength, pathSigma, avgDriftTime, driftTimeSigma;
94 static const float B_FIELD_CUT = 15.f;
95 if(fabs(
bz) < B_FIELD_CUT) {
109 double pathLength =
std::max(CLHEP::RandGaussQ::shoot(engine, avgPathLength, pathSigma), 0.);
114 + CLHEP::RandGaussQ::shoot(engine, 0., diffusionSigma);
117 double driftTime =
std::max(CLHEP::RandGaussQ::shoot(engine, avgDriftTime, driftTimeSigma), 0.);
122 static const double f_collected = 0.82;
129 float t = simHit.
tof() + driftTime;
130 LogTrace(
"CSCDriftSim") <<
"CSCDriftSim: tof = " << simHit.
tof() <<
131 " driftTime = " << driftTime <<
133 return CSCDetectorHit(nearestWire, charge, x, t, &simHit);
139 double returnVal = 0.;
141 double x = CLHEP::RandFlat::shoot(engine);
163 returnVal =
STEP_SIZE * (double(i) + (x-x1)/(x2-x1));
165 LogTrace(
"CSCDriftSim") <<
"CSCDriftSim: avalanche fluc " << returnVal <<
" " <<
x ;
177 if(detId.
station() == 1 && (ring == 1 || ring == 4))
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
float tof() const
deprecated name for timeOfFlight()
CSCDetectorHit getWireHit(const Local3DPoint &ionClusterPosition, const CSCLayer *, int wire, const PSimHit &simHit, CLHEP::HepRandomEngine *)
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
const MagneticField * theMagneticField
double avgPathLengthHighB()
const Plane & surface() const
The nominal surface of the GeomDet.
double driftTimeSigmaLowB()
double driftTimeSigmaHighB()
double avgDriftTimeHighB()
double avalancheCharge(CLHEP::HepRandomEngine *)
double avgDriftTimeLowB()
const double ELECTRON_DIFFUSION_COEFF
float yOfWire(float wire, float x=0.) const
const CSCChamberSpecs * specs() const
float wireSpacing() const
static const int N_INTEGRAL_STEPS
double avgPathLengthLowB()
GlobalVector inKGauss(const GlobalPoint &gp) const
Field value ad specified global point, in KGauss.
double driftSigma() const
std::vector< double > dNdEIntegral
double gasGain(const CSCDetId &id) const
float anodeCathodeSpacing() const
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::LocalCoordinateSystemTag > LocalPoint
point in local coordinate system
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::LocalCoordinateSystemTag > LocalVector
vector in local coordinate system
const CSCChamber * chamber() const
const CSCLayerGeometry * geometry() const
Power< A, B >::type pow(const A &a, const B &b)