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 Class Reference

#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
 

Detailed Description

Implements methods to identify particles based on their species and status codes.

Definition at line 25 of file ParticleIdentifier.h.

Constructor & Destructor Documentation

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.

Member Function Documentation

Int_t ParticleIdentifier::DetermineScatteredType ( Int_t  beamType)
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.

int ParticleIdentifier::GetLeptonBeamPdgCode ( ) const
inlinevirtual

Returns the PDG code to use when identifying the lepton beam.

Definition at line 121 of file ParticleIdentifier.h.

bool ParticleIdentifier::IdentifyBeams ( const erhic::VirtualEvent event,
BeamParticles beams 
)
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.

bool ParticleIdentifier::IdentifyBeams ( const erhic::VirtualEvent event,
std::vector< const erhic::VirtualParticle * > &  beams 
)
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.

bool ParticleIdentifier::isBeamLepton ( const erhic::VirtualParticle particle) const
virtual

Returns whether the particle is the beam lepton.

Definition at line 30 of file ParticleIdentifier.cxx.

bool ParticleIdentifier::isBeamNucleon ( const erhic::VirtualParticle particle) const
virtual

Returns whether the particle is the beam hadron.

Definition at line 90 of file ParticleIdentifier.cxx.

bool ParticleIdentifier::isScatteredLepton ( const erhic::VirtualParticle particle) const
virtual

Returns whether the particle is the scattered lepton beam particle.

Definition at line 41 of file ParticleIdentifier.cxx.

bool ParticleIdentifier::IsVirtualPhoton ( const erhic::VirtualParticle particle) const
virtual

Returns whether the particle is a virtual photon.

Definition at line 81 of file ParticleIdentifier.cxx.

bool ParticleIdentifier::SetChargedCurrent ( bool  isChargedCurrent)
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.

void ParticleIdentifier::SetLeptonBeamPdgCode ( int  pdg)
virtual

Sets the PDG code to use when identifying the lepton beam.

Definition at line 112 of file ParticleIdentifier.cxx.

bool ParticleIdentifier::SkipParticle ( const erhic::VirtualParticle particle) const
virtual

Returns whether the particles should be skipped by the tree building code.

Definition at line 54 of file ParticleIdentifier.cxx.


The documentation for this class was generated from the following files: