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 : mChargedCurrent(false)
23 , mLeptonBeamPdgCode(leptonBeamPdgCode)
24 , mScatteredPdgCode(leptonBeamPdgCode)
57 int pdgCode = particle.
Id();
64 if (21 == kI1 && (pdgCode == 2112 || pdgCode == 2212) && parent == 2) {
68 if (21 == kI1 && pdgCode == 21) {
72 if (21 == kI1 && ::abs(pdgCode) < 10) {
83 const int pdg = abs(particle.
Id());
84 return pdg > 21 && pdg < 25 && 21 == particle.
GetStatus();
94 (2112 == particle.
Id() || 2212 == particle.
Id()) &&
106 int sign = beamType / abs(beamType);
107 return sign * (abs(beamType) + 1);
142 std::vector<const erhic::VirtualParticle*> particles;
144 if (particles.at(0)) {
147 if (particles.at(1)) {
150 if (particles.at(2)) {
151 beams.
SetBoson(particles.at(2)->Get4Vector());
153 if (particles.at(3)) {
162 std::vector<const erhic::VirtualParticle*>& beams) {
166 beams.assign(4,
null);
177 bool foundExchangeBoson(
false);
178 bool foundAll(
false);
179 for (
unsigned n(0); n <
event.GetNTracks(); ++n) {
186 beams.at(1) = particle;
187 }
else if (finder.
isBeamLepton(*particle) && 0 == leptonCount) {
188 beams.at(0) = particle;
191 beams.at(3) = particle;
195 beams.at(2) = particle;
196 foundExchangeBoson =
true;
204 foundAll = std::find(beams.begin(), beams.end(),
null) == beams.end();
Implements methods to identify particles based on their species and status codes.
void SetBeamHadron(const TLorentzVector &)
virtual void SetLeptonBeamPdgCode(int pdg)
Sets the PDG code to use when identifying the lepton beam.
void Reset()
Sets all the 4-vectors' components to not-a-number.
ParticleIdentifier(const int leptonPdg=~unsigned(0)/2)
Default constructor.
Abstract base class for a physics event.
virtual bool isBeamNucleon(const erhic::VirtualParticle &) const
Returns whether the particle is the beam hadron.
void SetBeamLepton(const TLorentzVector &)
Int_t DetermineScatteredType(Int_t)
Determine the scattered lepton type from an incident lepton type.
static bool IdentifyBeams(const erhic::VirtualEvent &, BeamParticles &)
Identify the beams from an event and store their properties in a BeamParticles object.
void SetBoson(const TLorentzVector &)
virtual UShort_t GetStatus() const =0
A general "status" code for the particle (definition depends on implementation).
Abstract base class for a general particle.
virtual const VirtualParticle * GetTrack(UInt_t) const =0
Returns the nth track from the event.
virtual bool SetChargedCurrent(bool isChargedCurrent)
Look for charged current events.
virtual bool IsVirtualPhoton(const erhic::VirtualParticle &) const
Returns whether the particle is a virtual photon.
virtual bool SkipParticle(const erhic::VirtualParticle &) const
Returns whether the particles should be skipped by the tree building code.
virtual bool isScatteredLepton(const erhic::VirtualParticle &) const
Returns whether the particle is the scattered lepton beam particle.
virtual bool isBeamLepton(const erhic::VirtualParticle &) const
Returns whether the particle is the beam lepton.
void SetScatteredLepton(const TLorentzVector &)
virtual int GetLeptonBeamPdgCode() const
Returns the PDG code to use when identifying the lepton beam.
Wrapper class around energy-momentum 4-vectors defining the incident and scattered beams and the exch...
virtual UShort_t GetParentIndex() const =0
Returns the index of the parent particle.
virtual Pid Id() const =0
Returns identity information for the Particle species.