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
EicRcEvent.cxx
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file EicRcEvent.cxx
1
//
2
// AYK (ayk@bnl.gov), 2014/07/09
3
//
4
// EIC code reconstructed event class; consider to reuse eic-smear codes;
5
//
6
7
#include <
EicRootManager.h
>
8
#include <
EicRcEvent.h
>
9
10
// ---------------------------------------------------------------------------------------
11
12
const
erhic::EventMC
*
EicRcEvent::GetGenMcEvent
()
const
13
{
14
EicRootManager
*io =
EicRootManager::Instance
();
15
16
return
io ? io->
GetGenMcEvent
() : 0;
17
}
// EicRcEvent::GetGenMcEvent()
18
19
// ---------------------------------------------------------------------------------------
20
21
const
erhic::ParticleMC
*
EicRcEvent::GetGenMcTrack
(
int
genMcIndex)
const
22
{
23
EicRootManager
*io =
EicRootManager::Instance
();
24
25
return
io ? io->
GetGenMcTrack
(genMcIndex) : 0;
26
}
// EicRcEvent::GetGenMcTrack()
27
28
// ---------------------------------------------------------------------------------------
29
30
void
EicRcEvent::ClearParticles
()
31
{
32
for
(
unsigned
i(0); i <
mParticles
.size(); ++i) {
33
EicRcParticle
*
particle
=
GetTrack
(i);
34
35
if
(particle)
delete
particle
;
36
}
//for i
37
}
// EicRcEvent::ClearParticles()
38
39
// ---------------------------------------------------------------------------------------
40
41
EicRcParticle
*
EicRcEvent::GetRcParticleMatchingGenMcTrack
(
unsigned
genMcIndex)
const
42
{
43
// Sanity check: skip beam particles;
44
if
(genMcIndex <= 1)
return
0;
45
46
// FIXME: this call is not too much efficient, sorry; need to create a separate
47
// mapping set perhaps;
48
for
(
unsigned
iq=0; iq<
mParticles
.size(); iq++) {
49
EicRcParticle
*
particle
=
mParticles
.at(iq);
50
51
// Has never been checked;
52
if
(particle->
GetGeneratorIndex
() == genMcIndex ||
53
particle->
GetPndMCTrackIndex
() == genMcIndex-2)
54
return
particle;
55
}
//for iq
56
57
return
0;
58
}
// EicRcEvent::GetRcParticleMatchingGenMcTrack()
59
60
// ---------------------------------------------------------------------------------------
61
62
void
EicRcEvent::HadronicFinalState
(
ParticlePtrList
&
final
)
const
63
{
64
#if _OLD_
65
// Skip the first two entries, as these are the incident beams;
66
for
(
unsigned
i(2); i <
GetNTracks
(); ++i) {
67
#endif
68
for
(
unsigned
i(0); i <
GetNTracks
(); ++i) {
69
const
EicRcParticle
*
particle
=
GetTrack
(i);
70
71
if
(particle && i !=
mScatteredLeptonID
)
final
.push_back(particle);
72
}
//for i
73
}
// EicRcEvent::HadronicFinalState()
74
75
// ---------------------------------------------------------------------------------------
76
77
ClassImp
(
EicRcEvent
)
EicRoot
blob
master
eic
event
EicRcEvent.cxx
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:35
using
1.8.2 with
EIC GitHub integration