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
Main Page
Related Pages
Classes
Files
File List
File Members
EventSmear.h
1
9
#ifndef INCLUDE_EICSMEAR_HADRONIC_EVENTSMEAR_H_
10
#define INCLUDE_EICSMEAR_HADRONIC_EVENTSMEAR_H_
11
12
#include <vector>
13
14
#include <Rtypes.h>
// For ClassDef macro
15
#include <TBranch.h>
16
17
#include "
eicsmear/erhic/VirtualEvent.h
"
18
#include "
eicsmear/hadronic/EventMC.h
"
19
#include "
eicsmear/smear/EventFactory.h
"
20
#include "
eicsmear/smear/ParticleMCS.h
"
21
22
namespace
erhic {
23
namespace
hadronic {
24
28
class
EventSmear
:
public
VirtualEvent
{
29
public
:
33
virtual
~EventSmear
();
34
38
EventSmear
();
39
43
virtual
const
Smear::ParticleMCS
*
GetTrack
(UInt_t)
const
;
44
48
virtual
Smear::ParticleMCS
*
GetTrack
(UInt_t);
49
53
virtual
UInt_t
GetNTracks
()
const
;
54
58
virtual
void
AddLast
(
Smear::ParticleMCS
*);
59
60
protected
:
61
std::vector<Smear::ParticleMCS*> particles;
62
63
ClassDef(
erhic::hadronic::EventSmear
, 1)
64
};
65
66
}
// namespace hadronic
67
}
// namespace erhic
68
69
namespace
Smear {
70
74
class
HadronicEventBuilder
:
public
EventFactory
<erhic::hadronic::EventSmear> {
75
public
:
79
virtual
~HadronicEventBuilder
() { }
80
86
HadronicEventBuilder
(
const
Detector
& d, TBranch& mcBranch)
87
: mDetector(d)
88
, mMcEvent(NULL) {
89
mcBranch.SetAddress(&mMcEvent);
90
}
91
98
virtual
EventType
*
Create
() {
99
EventType
*
event
=
new
EventType
;
100
for
(
unsigned
j(0); j < mMcEvent->
GetNTracks
(); j++) {
101
const
erhic::VirtualParticle
* ptr = mMcEvent->
GetTrack
(j);
102
if
(ptr) {
103
event
->AddLast(mDetector.
Smear
(*ptr));
104
}
// if
105
}
// for
106
return
event;
107
}
108
109
protected
:
110
Detector
mDetector;
111
erhic::hadronic::EventMC
* mMcEvent;
112
};
113
114
}
// namespace Smear
115
116
#endif // INCLUDE_EICSMEAR_HADRONIC_EVENTSMEAR_H_
EventMC.h
Smear::HadronicEventBuilder::Create
virtual EventType * Create()
Definition:
EventSmear.h:98
Smear::HadronicEventBuilder::HadronicEventBuilder
HadronicEventBuilder(const Detector &d, TBranch &mcBranch)
Definition:
EventSmear.h:86
Smear::Detector
Definition:
Detector.h:44
erhic::hadronic::EventSmear::GetNTracks
virtual UInt_t GetNTracks() const
Definition:
EventSmear.cxx:32
erhic::hadronic::EventSmear::AddLast
virtual void AddLast(Smear::ParticleMCS *)
Definition:
EventSmear.cxx:36
erhic::hadronic::EventSmear::EventSmear
EventSmear()
Definition:
EventSmear.cxx:21
Smear::EventFactory
Definition:
EventFactory.h:30
erhic::hadronic::EventMC
Definition:
EventMC.h:29
Smear::Detector::Smear
ParticleMCS * Smear(const erhic::VirtualParticle &) const
Definition:
Detector.cxx:132
ParticleMCS.h
erhic::VirtualEvent
Abstract base class for a physics event.
Definition:
VirtualEvent.h:25
VirtualEvent.h
erhic::hadronic::EventMC::GetTrack
virtual const ParticleMC * GetTrack(UInt_t) const
Definition:
EventMC.cxx:29
erhic::hadronic::EventMC::GetNTracks
virtual UInt_t GetNTracks() const
Definition:
EventMC.cxx:37
Smear::HadronicEventBuilder::~HadronicEventBuilder
virtual ~HadronicEventBuilder()
Definition:
EventSmear.h:79
Smear::HadronicEventBuilder
Definition:
EventSmear.h:74
erhic::hadronic::EventSmear
Definition:
EventSmear.h:28
erhic::hadronic::EventSmear::GetTrack
virtual const Smear::ParticleMCS * GetTrack(UInt_t) const
Definition:
EventSmear.cxx:24
erhic::VirtualParticle
Abstract base class for a general particle.
Definition:
VirtualParticle.h:23
erhic::hadronic::EventSmear::~EventSmear
virtual ~EventSmear()
Definition:
EventSmear.cxx:14
Smear::ParticleMCS
Definition:
ParticleMCS.h:27
EventFactory.h
eic-smear
include
eicsmear
hadronic
EventSmear.h
Generated on Thu Jul 24 2014 15:18:39 for eic-smear by
1.8.7