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
ParticleIdentifier.h
Go to the documentation of this file.
1 
10 #ifndef INCLUDE_EICSMEAR_ERHIC_PARTICLEIDENTIFIER_H_
11 #define INCLUDE_EICSMEAR_ERHIC_PARTICLEIDENTIFIER_H_
12 
13 #include <cmath>
14 #include <limits>
15 #include <vector>
16 
20 
26  public:
32  ParticleIdentifier(const int leptonPdg = ~unsigned(0)/2);
33 
34  virtual ~ParticleIdentifier() { }
35 
39  virtual bool isBeamLepton(const erhic::VirtualParticle&) const;
40 
44  virtual bool isBeamNucleon(const erhic::VirtualParticle&) const;
45 
49  virtual bool isScatteredLepton(const erhic::VirtualParticle&) const;
50 
54  virtual bool IsVirtualPhoton(const erhic::VirtualParticle&) const;
55 
59  virtual bool SkipParticle(const erhic::VirtualParticle&) const;
60 
64  virtual void SetLeptonBeamPdgCode(int pdg);
65 
69  virtual int GetLeptonBeamPdgCode() const;
70 
78  virtual bool SetChargedCurrent(bool isChargedCurrent);
79 
87  static bool IdentifyBeams(const erhic::VirtualEvent&, BeamParticles&);
88 
99  static bool IdentifyBeams(const erhic::VirtualEvent&,
100  std::vector<const erhic::VirtualParticle*>&);
101 
102  protected:
114  Int_t DetermineScatteredType(Int_t);
115 
119 };
120 
122  return mLeptonBeamPdgCode;
123 }
124 
125 #endif // INCLUDE_EICSMEAR_ERHIC_PARTICLEIDENTIFIER_H_
ParticleIdentifier
Implements methods to identify particles based on their species and status codes.
Definition: ParticleIdentifier.h:25
ParticleIdentifier::mLeptonBeamPdgCode
Int_t mLeptonBeamPdgCode
Definition: ParticleIdentifier.h:117
VirtualEvent.h
ParticleIdentifier::SetLeptonBeamPdgCode
virtual void SetLeptonBeamPdgCode(int pdg)
Sets the PDG code to use when identifying the lepton beam.
Definition: ParticleIdentifier.cxx:112
ParticleIdentifier::ParticleIdentifier
ParticleIdentifier(const int leptonPdg=~unsigned(0)/2)
Default constructor.
Definition: ParticleIdentifier.cxx:21
erhic::VirtualEvent
Abstract base class for a physics event.
Definition: VirtualEvent.h:25
ParticleIdentifier::mScatteredPdgCode
Int_t mScatteredPdgCode
Definition: ParticleIdentifier.h:118
ParticleIdentifier::isBeamNucleon
virtual bool isBeamNucleon(const erhic::VirtualParticle &) const
Returns whether the particle is the beam hadron.
Definition: ParticleIdentifier.cxx:90
ParticleIdentifier::DetermineScatteredType
Int_t DetermineScatteredType(Int_t)
Determine the scattered lepton type from an incident lepton type.
Definition: ParticleIdentifier.cxx:102
ParticleIdentifier::IdentifyBeams
static bool IdentifyBeams(const erhic::VirtualEvent &, BeamParticles &)
Identify the beams from an event and store their properties in a BeamParticles object.
Definition: ParticleIdentifier.cxx:139
ParticleIdentifier::mChargedCurrent
Bool_t mChargedCurrent
Definition: ParticleIdentifier.h:116
erhic::VirtualParticle
Abstract base class for a general particle.
Definition: VirtualParticle.h:23
Particle.h
BeamParticles.h
ParticleIdentifier::SetChargedCurrent
virtual bool SetChargedCurrent(bool isChargedCurrent)
Look for charged current events.
Definition: ParticleIdentifier.cxx:121
ParticleIdentifier::IsVirtualPhoton
virtual bool IsVirtualPhoton(const erhic::VirtualParticle &) const
Returns whether the particle is a virtual photon.
Definition: ParticleIdentifier.cxx:81
ParticleIdentifier::SkipParticle
virtual bool SkipParticle(const erhic::VirtualParticle &) const
Returns whether the particles should be skipped by the tree building code.
Definition: ParticleIdentifier.cxx:54
ParticleIdentifier::isScatteredLepton
virtual bool isScatteredLepton(const erhic::VirtualParticle &) const
Returns whether the particle is the scattered lepton beam particle.
Definition: ParticleIdentifier.cxx:41
ParticleIdentifier::isBeamLepton
virtual bool isBeamLepton(const erhic::VirtualParticle &) const
Returns whether the particle is the beam lepton.
Definition: ParticleIdentifier.cxx:30
ParticleIdentifier::GetLeptonBeamPdgCode
virtual int GetLeptonBeamPdgCode() const
Returns the PDG code to use when identifying the lepton beam.
Definition: ParticleIdentifier.h:121
ParticleIdentifier::~ParticleIdentifier
virtual ~ParticleIdentifier()
Definition: ParticleIdentifier.h:34
BeamParticles
Wrapper class around energy-momentum 4-vectors defining the incident and scattered beams and the exch...
Definition: BeamParticles.h:20