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
EventMC.cxx
Go to the documentation of this file.
1
10
#include <
eicsmear/hadronic/EventMC.h
>
11
12
#include <TLorentzVector.h>
13
14
namespace
erhic {
15
namespace
hadronic {
16
17
EventMC::~EventMC
() {
18
Clear
(
""
);
19
}
20
21
EventMC::EventMC
()
22
: mTracks(
"erhic::hadronic::ParticleMC"
, 100) {
23
}
24
25
void
EventMC::Clear
(Option_t*
/* option */
) {
26
mTracks.Clear();
27
}
28
29
const
ParticleMC
*
EventMC::GetTrack
(UInt_t i)
const
{
30
return
static_cast<
ParticleMC
*
>
(mTracks.At(i));
31
}
32
33
ParticleMC
*
EventMC::GetTrack
(UInt_t i) {
34
return
static_cast<
ParticleMC
*
>
(mTracks.At(i));
35
}
36
37
UInt_t
EventMC::GetNTracks
()
const
{
38
return
mTracks.GetEntries();
39
}
40
41
UInt_t
EventMC::Add
(
ParticleMC
* p) {
42
new
(mTracks[
GetNTracks
()])
ParticleMC
(*p);
43
return
GetNTracks
();
44
}
45
46
Double_t
EventMC::GetCentreOfMassEnergy
()
const
{
47
double
energy(NAN);
48
if
(
GetTrack
(0) &&
GetTrack
(1)) {
49
energy = (
GetTrack
(0)->
Get4Vector
() +
GetTrack
(1)->
Get4Vector
()).M();
50
}
// if
51
return
energy;
52
}
53
54
}
// namespace hadronic
55
}
// namespace erhic
EventMC.h
erhic::hadronic::EventMC::~EventMC
virtual ~EventMC()
Definition:
EventMC.cxx:17
erhic::hadronic::EventMC::Add
virtual UInt_t Add(ParticleMC *particle)
Definition:
EventMC.cxx:41
erhic::hadronic::EventMC::EventMC
EventMC()
Definition:
EventMC.cxx:21
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
erhic::hadronic::ParticleMC::Get4Vector
virtual TLorentzVector Get4Vector() const
Definition:
ParticleMC.h:196
erhic::hadronic::ParticleMC
Definition:
ParticleMC.h:30
erhic::hadronic::EventMC::GetCentreOfMassEnergy
virtual Double_t GetCentreOfMassEnergy() const
Definition:
EventMC.cxx:46
erhic::hadronic::EventMC::Clear
virtual void Clear(Option_t *="")
Definition:
EventMC.cxx:25
eic-smear
src
hadronic
EventMC.cxx
Generated on Thu Jul 24 2014 15:18:39 for eic-smear by
1.8.7