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.
10 #ifndef INCLUDE_EICSMEAR_SMEAR_SMEAR_H_
11 #define INCLUDE_EICSMEAR_SMEAR_SMEAR_H_
21 #include <TLorentzVector.h>
70 const int id = abs(prt.
Id());
72 if (
id == 11 ||
id == 22) {
86 while (theta < 0. || theta > TMath::Pi()) {
90 if (theta > TMath::Pi()) {
91 theta = TMath::TwoPi() - theta;
102 return TVector2::Phi_0_2pi(phi);
112 z = prt.
GetE();
break;
114 z = prt.
GetP();
break;
120 z = prt.
GetPz();
break;
122 z = prt.
GetPt();
break;
157 if (
kE == kin && prt.
GetE() < 0.) {
159 }
else if (
kP == kin && prt.
GetP() < 0.) {
161 }
else if (
kPt == kin && prt.
GetPt() < 0.) {
163 }
else if (
kPz == kin && prt.
GetPz() < 0.) {
170 if (prt.
GetE() < 0.) {
173 if (prt.
GetP() < 0.) {
176 if (prt.
GetPt() < 0.) {
179 if (prt.
GetPz() < 0.) {
185 if (kin ==
kE || kin ==
kP || kin ==
kTheta || kin ==
kPhi)
return true;
193 #endif // INCLUDE_EICSMEAR_SMEAR_SMEAR_H_
int ParseInputFunction(TString &s, KinType &kin1, KinType &kin2)
virtual void SetPhi(Double_t)
double FixPhi(double phi)
Fix an azimuthal angle so that it lies within [0,2*pi).
virtual Double_t GetPz() const =0
Returns the z component of 3-momentum.
virtual void SetPt(Double_t)
virtual void SetPz(Double_t)
void HandleBogusValues(ParticleMCS &prt, KinType kin)
This dictates how the namespace deals with positive definite variables which have been smeared to neg...
virtual Double_t GetP() const
Returns the total momentum (GeV).
virtual Double_t GetP() const =0
Returns the magnitude of 3-momentum (GeV).
virtual Double_t GetE() const
Returns the energy of the particle in the lab frame.
virtual void SetP(Double_t)
virtual void SetE(Double_t)
virtual UShort_t GetStatus() const =0
A general "status" code for the particle (definition depends on implementation).
virtual Double_t GetE() const =0
Returns total energy.
void SetVariable(ParticleMCS &prt, double z, KinType kin)
Stores z in the ParticleS.K where K is the kinematic variable associated with kin.
virtual Double_t GetPz() const
Returns the z component of 3-momentum.
double FixTheta(double theta)
Fix a polar angle so that it lies within [0,pi].
Abstract base class for a general particle.
bool IsCoreType(KinType kin)
A smeared Monte Carlo particle.
virtual void SetTheta(Double_t)
virtual Double_t GetPt() const =0
Returns momentum perpendicular to the beam direction.
virtual Double_t GetTheta() const =0
Returns the polar angle in the range [0, pi] radians.
KinType
Enumerator listing particle wise kinematic variables.
int PGenre(const erhic::VirtualParticle &prt)
Determine particle "genre".
virtual Double_t GetPhi() const =0
Returns the polar angle in the range [0, 2pi] radians.
double GetVariable(const erhic::VirtualParticle &prt, KinType kin)
Returns the kinematic variable associated with kin from the input particle.
EGenre
Classes of particles.
virtual Double_t GetPt() const
Returns momentum transverse to the beam direction.
virtual Pid Id() const =0
Returns identity information for the Particle species.