|
|
Go to the documentation of this file.
9 #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),
31 theMagneticField(nullptr) {
59 CLHEP::HepRandomEngine *engine) {
63 LogTrace(
"CSCDriftSim") <<
"CSCDriftSim: ionization cluster at: " <<
pos;
69 clusterPos = yShift + clusterPos;
81 ycell = clusterPos.z() /
specs->anodeCathodeSpacing();
82 zcell = 2. * clusterPos.y() /
specs->wireSpacing();
84 LogTrace(
"CSCDriftSim") <<
"CSCDriftSim: bz " <<
bz <<
" avgDrift " <<
avgDrift() <<
" wireAngle "
87 double avgPathLength, pathSigma, avgDriftTime, driftTimeSigma;
88 static const float B_FIELD_CUT = 15.f;
89 if (fabs(
bz) < B_FIELD_CUT) {
102 double pathLength =
std::max(CLHEP::RandGaussQ::shoot(engine, avgPathLength, pathSigma), 0.);
107 CLHEP::RandGaussQ::shoot(engine, 0., diffusionSigma);
110 double driftTime =
std::max(CLHEP::RandGaussQ::shoot(engine, avgDriftTime, driftTimeSigma), 0.);
115 static const double f_collected = 0.82;
124 float t =
simHit.tof() + driftTime;
125 LogTrace(
"CSCDriftSim") <<
"CSCDriftSim: tof = " <<
simHit.tof() <<
" driftTime = " << driftTime
133 double returnVal = 0.;
135 double x = CLHEP::RandFlat::shoot(engine);
159 LogTrace(
"CSCDriftSim") <<
"CSCDriftSim: avalanche fluc " << returnVal <<
" " <<
x;
const MagneticField * theMagneticField
double avgPathLengthHighB()
const CSCChamber * chamber() const
double driftSigma() const
double avalancheCharge(CLHEP::HepRandomEngine *)
CSCDetectorHit getWireHit(const Local3DPoint &ionClusterPosition, const CSCLayer *, int wire, const PSimHit &simHit, CLHEP::HepRandomEngine *)
double driftTimeSigmaLowB()
double driftTimeSigmaHighB()
const Plane & surface() const
The nominal surface of the GeomDet.
double avgDriftTimeHighB()
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
double avgDriftTimeLowB()
const CSCLayerGeometry * geometry() const
static const int N_INTEGRAL_STEPS
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
const double ELECTRON_DIFFUSION_COEFF
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::LocalCoordinateSystemTag > LocalVector
vector in local coordinate system
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::LocalCoordinateSystemTag > LocalPoint
point in local coordinate system
const CSCChamberSpecs * specs() const
double gasGain(const CSCDetId &id) const
double avgPathLengthLowB()
std::vector< double > dNdEIntegral
GlobalVector inKGauss(const GlobalPoint &gp) const
Field value ad specified global point, in KGauss.
Power< A, B >::type pow(const A &a, const B &b)