eic-smear
1.0.3
A collection of ROOT classes for Monte Carlo events and a fast-smearing code simulating detector effects for the Electron-Ion Collider task force
|
Go to the documentation of this file.
22 struct NoIntersection {
23 bool operator()(
const TVector3& v)
const {
24 return TMath::IsNaN(v.z());
35 , mMagField(magneticField)
36 , mNRadLengths(nRadiationLengths)
37 , mSigmaRPhi(resolution) {
49 if (TMath::IsNaN(val)) {
50 std::cerr <<
"MS nan!" << std::endl;
66 if (TMath::IsNaN(val)) {
67 std::cerr <<
"Intrinsic nan!" << std::endl;
91 if (pOut.
GetP() < 0.) {
92 std::cerr <<
"p " << pOut.
GetP() << std::endl;
94 if (TMath::IsNaN(pOut.
GetP())) {
95 std::cerr <<
"p nan" << std::endl;
bool Is(const erhic::VirtualParticle &prt) const
This function determines if the particle provided lies within the acceptance of the detector.
void HandleBogusValues(ParticleMCS &prt, KinType kin)
This dictates how the namespace deals with positive definite variables which have been smeared to neg...
virtual double Resolution(const erhic::VirtualParticle &) const
Returns the resolution at the kinematics of this particle.
virtual Double_t GetP() const
Returns the total momentum (GeV).
virtual bool Accepts(const erhic::VirtualParticle &) const =0
Returns true if the particle falls within the angular acceptance of the detector.
double mMagField
Magnetic field strength in Tesla.
virtual Double_t GetP() const =0
Returns the magnitude of 3-momentum (GeV).
virtual int NPoints(const erhic::VirtualParticle &) const =0
Returns the number of measurement points for the particle.
void SetVertexConstraint(bool constrain)
Set whether a vertex constraint should be used when calculating the intrinsic resolution.
void SetVariable(ParticleMCS &prt, double z, KinType kin)
Stores z in the ParticleS.K where K is the kinematic variable associated with kin.
double mSigmaRPhi
Point resolution.
double mNRadLengths
Number of radiation lengths (dimensionless)
Tracker(double magneticField=2., double nRadiationLengths=0.01, double resolution=0.001)
Constructor.
Abstract base class for a general particle.
A smeared Monte Carlo particle.
virtual ~Tracker()
Destructor.
Distributor Distribution
Random distribution.
virtual double LPrime(const erhic::VirtualParticle &) const =0
Returns the transverse path length of the particle through the tracker in metres.
virtual TLorentzVector Get4Vector() const =0
Returns the momentum-energy four-vector (px, py, pz, E).
virtual double IntrinsicContribution(const erhic::VirtualParticle &) const
The intrinsic resolution of the detector, depending on momentum, magnetic field, the detector dimensi...
Int_t mFactor
Factor in intrinsic resolution calculation dependent on vertex constraint.
double GetVariable(const erhic::VirtualParticle &prt, KinType kin)
Returns the kinematic variable associated with kin from the input particle.
void Smear(const erhic::VirtualParticle &, ParticleMCS &)
Smear the properties of the input particle and store the smeared values in the ParticleMCS.
virtual double Generate(double midpoint, double width)
Generate a random value based on a given midpoint and width.
virtual double MultipleScatteringContribution(const erhic::VirtualParticle &) const
Multiple scattering contribution, given by delta(p)/p = 0.0136 * z * sqrt(NRL) / (0....