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
Detector.h
Go to the documentation of this file.
1 
10 #ifndef INCLUDE_EICSMEAR_SMEAR_DETECTOR_H_
11 #define INCLUDE_EICSMEAR_SMEAR_DETECTOR_H_
12 
13 #include <list>
14 #include <vector>
15 
16 #include <TObject.h>
17 #include <TString.h>
18 
19 namespace erhic {
20 
21 class EventDis;
22 class VirtualParticle;
23 
24 } // namespace erhic
25 
26 namespace Smear {
27 
28 class Event;
29 class ParticleMCS;
30 class Smearer;
31 
44 class Detector : public TObject {
45  public:
49  Detector();
50 
54  Detector(const Detector&);
55 
59  Detector& operator=(const Detector&);
60 
64  virtual ~Detector();
65 
70  void AddDevice(Smearer& device);
71 
81  void SetEventKinematicsCalculator(TString);
82 
86  void DeleteAllDevices();
87 
93  Smearer* GetDevice(int index);
94 
96  UInt_t GetNDevices() const;
97 
111  void FillEventKinematics(Event* event);
112 
122 
126  virtual void Print(Option_t* = "") const;
127 
131  std::list<Smear::Smearer*> Accept(const erhic::VirtualParticle&) const;
132 
133  protected:
137  std::vector<Smear::Smearer*> CopyDevices() const;
138 
139  bool useNM;
140  bool useJB;
141  bool useDA;
142  std::vector<Smearer*> Devices;
143 
144  ClassDef(Smear::Detector, 1)
145 };
146 
147 inline UInt_t Detector::GetNDevices() const {
148  return Devices.size();
149 }
150 
151 } // namespace Smear
152 
153 #endif // INCLUDE_EICSMEAR_SMEAR_DETECTOR_H_
Smear::Detector::FillEventKinematics
void FillEventKinematics(Event *event)
Calculate event-wise smeared kinematics for an event which has already had its particles smeared and ...
Definition: Detector.cxx:82
Smear
Definition: Acceptance.cxx:16
Smear::Detector::DeleteAllDevices
void DeleteAllDevices()
Delete all devices in the detector.
Definition: Detector.cxx:55
erhic
Definition: EventDis.cxx:14
Smear::Detector::Accept
std::list< Smear::Smearer * > Accept(const erhic::VirtualParticle &) const
Returns the list of devices in this detector that accept a particle.
Definition: Detector.cxx:116
Smear::Event
Definition: smear/EventSmear.h:29
Smear::Detector::Detector
Detector()
Default contructor.
Definition: Detector.cxx:27
Smear::Detector::GetNDevices
UInt_t GetNDevices() const
Returns the number of devices in the detector.
Definition: Detector.h:147
Smear::Detector::Print
virtual void Print(Option_t *="") const
Print information about all smearers to standard output.
Definition: Detector.cxx:162
Smear::Detector
The detector structure.
Definition: Detector.h:44
erhic::VirtualParticle
Abstract base class for a general particle.
Definition: VirtualParticle.h:23
Smear::Smearer
Abstract base class for objects performing smearing.
Definition: Smearer.h:33
Smear::Detector::useJB
bool useJB
Definition: Detector.h:140
Smear::Detector::~Detector
virtual ~Detector()
Destructor.
Definition: Detector.cxx:51
Smear::ParticleMCS
A smeared Monte Carlo particle.
Definition: ParticleMCS.h:27
Smear::Detector::Devices
std::vector< Smearer * > Devices
Definition: Detector.h:142
Smear::Detector::SetEventKinematicsCalculator
void SetEventKinematicsCalculator(TString)
Set the method for calculating event kinematics if FillEventKinematics is used.
Definition: Detector.cxx:67
Smear::Detector::useDA
bool useDA
Definition: Detector.h:141
Smear::Detector::AddDevice
void AddDevice(Smearer &device)
Adds a copy of the smearing device to this detector.
Definition: Detector.cxx:63
Smear::Detector::Smear
ParticleMCS * Smear(const erhic::VirtualParticle &) const
Detector level particle smearing.
Definition: Detector.cxx:132
Smear::Detector::operator=
Detector & operator=(const Detector &)
Assignment operator.
Definition: Detector.cxx:41
Smear::Detector::CopyDevices
std::vector< Smear::Smearer * > CopyDevices() const
Returns pointers to new copies of all devices.
Definition: Detector.cxx:154
Smear::Detector::useNM
bool useNM
Definition: Detector.h:139
Smear::Detector::GetDevice
Smearer * GetDevice(int index)
Return a pointer to device number n from the detector.
Definition: Detector.cxx:74