EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
EventSmear.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file 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_
eic-smear
blob
master
include
eicsmear
hadronic
EventSmear.h
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:32
using
1.8.2 with
EIC GitHub integration