BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EmcMcHit.cxx
Go to the documentation of this file.
1#include "McTruth/EmcMcHit.h"
2
3Event::EmcMcHit::EmcMcHit(const Identifier& id, unsigned int trackIndex, double xPosition,
4 double yPosition, double zPosition, double px, double py,
5 double pz, double depositEnergy)
6 : m_id(id), m_trackIndex(trackIndex),
7 m_hitEmc(0),m_PDGCode(0),m_PDGCharge(0),m_time(0),
8 m_xPosition(xPosition), m_yPosition(yPosition),m_zPosition(zPosition),
9 m_px(px), m_py(py), m_pz(pz), m_depositEnergy(depositEnergy)
10{
11 m_hitMap.clear();
12}
13
14// Get associated id
16 return m_id;
17}
18
19// Get the associated track id
20unsigned int Event::EmcMcHit::getTrackIndex() const {
21 return m_trackIndex;
22}
23
24// Whether hit Emc
26 return m_hitEmc;
27}
28
29// Get PDG code
31 return m_PDGCode;
32}
33
34// Get PDG charge
36 return m_PDGCharge;
37}
38
39// Get time
41 return m_time;
42}
43
44// Get the position x
46 return m_xPosition;
47}
48
49// Get the position y
51 return m_yPosition;
52}
53
54// Get the position z
56 return m_zPosition;
57}
58
59// Get momentum Px
60double Event::EmcMcHit::getPx() const {
61 return m_px;
62}
63
64// Get momentum Py
65double Event::EmcMcHit::getPy() const {
66 return m_py;
67}
68
69// Get momentum Pz
70double Event::EmcMcHit::getPz() const {
71 return m_pz;
72}
73
74// Get the total deposited energy
76 return m_depositEnergy;
77}
78
79std::map<Identifier,double>::const_iterator Event::EmcMcHit::begin() const {
80 return m_hitMap.begin();
81}
82
83std::map<Identifier,double>::const_iterator Event::EmcMcHit::end() const {
84 return m_hitMap.end();
85}
86
87std::map<Identifier,double>::const_iterator Event::EmcMcHit::find(Identifier& id) const {
88 return m_hitMap.find(id);
89}
90
91unsigned int Event::EmcMcHit::size() const {
92 return m_hitMap.size();
93}
94
95std::map<Identifier,double> Event::EmcMcHit::getHitMap() const {
96 return m_hitMap;
97}
NTuple::Item< double > m_pz
Definition: MdcHistItem.h:78
Identifier identify() const
Definition: EmcMcHit.cxx:15
std::map< Identifier, double > getHitMap() const
Definition: EmcMcHit.cxx:95
double getPositionZ() const
Definition: EmcMcHit.cxx:55
unsigned int size() const
Definition: EmcMcHit.cxx:91
int getPDGCode() const
Definition: EmcMcHit.cxx:30
int getHitEmc() const
Definition: EmcMcHit.cxx:25
std::map< Identifier, double >::const_iterator end() const
Definition: EmcMcHit.cxx:83
double getTime() const
Definition: EmcMcHit.cxx:40
double getPx() const
Definition: EmcMcHit.cxx:60
double getPDGCharge() const
Definition: EmcMcHit.cxx:35
double getDepositEnergy() const
Definition: EmcMcHit.cxx:75
double getPy() const
Definition: EmcMcHit.cxx:65
std::map< Identifier, double >::const_iterator find(Identifier &) const
Definition: EmcMcHit.cxx:87
double getPositionY() const
Definition: EmcMcHit.cxx:50
double getPz() const
Definition: EmcMcHit.cxx:70
std::map< Identifier, double >::const_iterator begin() const
Definition: EmcMcHit.cxx:79
unsigned int getTrackIndex() const
Definition: EmcMcHit.cxx:20
double getPositionX() const
Definition: EmcMcHit.cxx:45