![]() |
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 <Detector.h>
Public Member Functions | |
Detector () | |
Detector (const Detector &) | |
Detector & | operator= (const Detector &) |
virtual | ~Detector () |
void | AddDevice (Smearer &device) |
void | SetEventKinematicsCalculator (TString) |
void | DeleteAllDevices () |
Smearer * | GetDevice (int index) |
UInt_t | GetNDevices () const |
void | FillEventKinematics (Event *event) |
ParticleMCS * | Smear (const erhic::VirtualParticle &) const |
virtual void | Print (Option_t *="") const |
std::list< Smear::Smearer * > | Accept (const erhic::VirtualParticle &) const |
Protected Member Functions | |
std::vector< Smear::Smearer * > | CopyDevices () const |
Protected Attributes | |
bool | useNM |
bool | useJB |
bool | useDA |
std::vector< Smearer * > | Devices |
The detector structure. A detector posseses a collection of Smearer objects, each smearing some variable(s). It contains a detector-level smearing function which applies smearing of all its devices to the provided ParticleMCS. The detector can also generate event-wise smeared kinematics if provided with smeared particles from that event.
Add consts where possible.
Implement data hiding
Definition at line 44 of file Detector.h.
Smear::Detector::Detector | ( | ) |
Default contructor.
Definition at line 27 of file Detector.cxx.
Smear::Detector::Detector | ( | const Detector & | other | ) |
Copy constructor.
Definition at line 33 of file Detector.cxx.
|
virtual |
Destructor.
Definition at line 51 of file Detector.cxx.
std::list< Smearer * > Smear::Detector::Accept | ( | const erhic::VirtualParticle & | p | ) | const |
Returns the list of devices in this detector that accept a particle.
Definition at line 116 of file Detector.cxx.
void Smear::Detector::AddDevice | ( | Smearer & | device | ) |
Adds a copy of the smearing device to this detector. The detector will use all its devices when applying smearing.
Definition at line 63 of file Detector.cxx.
|
protected |
Returns pointers to new copies of all devices.
Definition at line 154 of file Detector.cxx.
void Smear::Detector::DeleteAllDevices | ( | ) |
Delete all devices in the detector.
Definition at line 55 of file Detector.cxx.
void Smear::Detector::FillEventKinematics | ( | Event * | event | ) |
Calculate event-wise smeared kinematics for an event which has already had its particles smeared and stored in eventS. Newly calculated values are stored in eventS.
This uses the null momentum (m->0) approximation for the scattered lepton, so you should be careful about using low energy muons, and if for some strange reason you want to use taus, this probably won't work too well.
Also, the smeared lepton momentum (as opposed to energy) is used in the assumption that its smearing is less severe.
Definition at line 82 of file Detector.cxx.
Smearer * Smear::Detector::GetDevice | ( | int | index | ) |
Return a pointer to device number n from the detector. Devices are labeled in the order in which they are added minus 1. Do not delete the returned pointer.
Definition at line 74 of file Detector.cxx.
|
inline |
Returns the number of devices in the detector
Definition at line 147 of file Detector.h.
Assignment operator.
Definition at line 41 of file Detector.cxx.
|
virtual |
Print information about all smearers to standard output.
Definition at line 162 of file Detector.cxx.
void Smear::Detector::SetEventKinematicsCalculator | ( | TString | s | ) |
Set the method for calculating event kinematics if FillEventKinematics is used. String must contain "NM" for null momentum approximation (using scattered lepton), "JB" for Jacquet Blondel method, or "DA" for double angle method. Strings not containing one of these turns the method off.
Definition at line 67 of file Detector.cxx.
ParticleMCS * Smear::Detector::Smear | ( | const erhic::VirtualParticle & | prt | ) | const |
Detector level particle smearing. Returns a pointer to a new smeared particle, which is a version of the input Particle that has been smeared by all the detector's devices. Smearing is only be applied to final-state particles. If the input particle is unstable or an initial- or intermediate- state particle, returns a null ParticleS pointer.
Definition at line 132 of file Detector.cxx.