![]() |
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
|
#include <ParticleIdentifier.h>
Public Member Functions | |
ParticleIdentifier (const int leptonPdg=~unsigned(0)/2) | |
virtual bool | isBeamLepton (const erhic::VirtualParticle &) const |
virtual bool | isBeamNucleon (const erhic::VirtualParticle &) const |
virtual bool | isScatteredLepton (const erhic::VirtualParticle &) const |
virtual bool | IsVirtualPhoton (const erhic::VirtualParticle &) const |
virtual bool | SkipParticle (const erhic::VirtualParticle &) const |
virtual void | SetLeptonBeamPdgCode (int pdg) |
virtual int | GetLeptonBeamPdgCode () const |
virtual bool | SetChargedCurrent (bool isChargedCurrent) |
Static Public Member Functions | |
static bool | IdentifyBeams (const erhic::VirtualEvent &, BeamParticles &) |
static bool | IdentifyBeams (const erhic::VirtualEvent &, std::vector< const erhic::VirtualParticle * > &) |
Protected Member Functions | |
Int_t | DetermineScatteredType (Int_t) |
Protected Attributes | |
Bool_t | mChargedCurrent |
Int_t | mLeptonBeamPdgCode |
Int_t | mScatteredPdgCode |
Implements methods to identify particles based on their species and status codes.
Definition at line 25 of file ParticleIdentifier.h.
ParticleIdentifier::ParticleIdentifier | ( | const int | leptonPdg = ~unsigned(0)/2 | ) |
Default constructor. Initialise with the PDG code of the lepton beam. The default is an invalid value.
Definition at line 21 of file ParticleIdentifier.cxx.
|
protected |
Determine the scattered lepton type from an incident lepton type.
For neutral current events these are equal. For charged current events the scattered lepton will be a neutrino, the type of which depends on the incident lepton type e.g. beam electron (11) –> scattered nu_e (12) beam positron (-11) –> scattered nu_e_bar (-12) Even though we would not envisage mu or tau beams (!) the algorithm is still robust for these inputs.
Definition at line 102 of file ParticleIdentifier.cxx.
|
inlinevirtual |
Returns the PDG code to use when identifying the lepton beam.
Definition at line 121 of file ParticleIdentifier.h.
|
static |
Identify the beams from an event and store their properties in a BeamParticles object. See BeamParticles.h for the quantities stored. Returns true if all beams are found, false if not. Important: finding the scattered hadron beam is not implemented.
Definition at line 139 of file ParticleIdentifier.cxx.
|
static |
Identify the beams from an event and store their properties in a vector of pointers to the particle objects in the event. Do not delete the pointers, as they belong to the event. The returned vector has four entries, in this order: incident lepton, incident hadron, exchanged boson, scattered lepton. Any particle not found yields a NULL pointer in the vector. Returns true if all beams are found (i.e. no NULL pointers), false if not. Important: finding the scattered hadron beam is not implemented.
Definition at line 161 of file ParticleIdentifier.cxx.
|
virtual |
Returns whether the particle is the beam lepton.
Definition at line 30 of file ParticleIdentifier.cxx.
|
virtual |
Returns whether the particle is the beam hadron.
Definition at line 90 of file ParticleIdentifier.cxx.
|
virtual |
Returns whether the particle is the scattered lepton beam particle.
Definition at line 41 of file ParticleIdentifier.cxx.
|
virtual |
Returns whether the particle is a virtual photon.
Definition at line 81 of file ParticleIdentifier.cxx.
|
virtual |
Look for charged current events.
In this case, the scattered lepton searched for will be the neutrino corresponding to the incident lepton beam type (e.g. W- for electron, W+ for proton).
Definition at line 121 of file ParticleIdentifier.cxx.
|
virtual |
Sets the PDG code to use when identifying the lepton beam.
Definition at line 112 of file ParticleIdentifier.cxx.
|
virtual |
Returns whether the particles should be skipped by the tree building code.
Definition at line 54 of file ParticleIdentifier.cxx.