CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
EmcMcHit.h
Go to the documentation of this file.
1#ifndef EmcMcHit_H
2#define EmcMcHit_H
3#include <algorithm>
4#include "GaudiKernel/ContainedObject.h"
6#include "GaudiKernel/ObjectVector.h"
8#include <map>
9
10using namespace EventModel;
11extern const CLID& CLID_EmcMcHit;
12
13namespace Event { // NameSpace
14
15class EmcMcHit : virtual public ContainedObject {
16public:
17 virtual const CLID& clID() const
18 {
19 return EmcMcHit::classID();
20 }
21
22 static const CLID& classID()
23 {
24 return CLID_EmcMcHit;
25 }
26 // Constructor
28 EmcMcHit(const Identifier& id, unsigned int trackIndex, double xPosition,
29 double yPosition, double zPosition, double px, double py,
30 double pz, double depositEnergy);
31
32//Get
33 // Get associated id
34 Identifier identify() const;
35
36 // Get the associated track id
37 unsigned int getTrackIndex() const;
38
39 // Whether hit Emc
40 int getHitEmc() const;
41
42 // Get PDG code
43 int getPDGCode() const;
44
45 // Get PDG charge
46 double getPDGCharge() const;
47
48 // Get time
49 double getTime() const;
50
51 // Get the position x
52 double getPositionX() const;
53
54 // Get the position y
55 double getPositionY() const;
56
57 // Get the position z
58 double getPositionZ() const;
59
60 // Get momentum Px
61 double getPx() const;
62
63 // Get momentum Py
64 double getPy() const;
65
66 // Get momentum Pz
67 double getPz() const;
68
69 // Get the total deposited energy
70 double getDepositEnergy() const;
71
72//Set
73 void setIdentifier(Identifier& id) {m_id = id ;}
74 void setHitEmc(int is) { m_hitEmc=is; }
75 void setPDGCode(int code) { m_PDGCode=code; }
76 void setPDGCharge(double charge) { m_PDGCharge = charge; }
77 void setTime(double time) { m_time=time; }
78 void setTrackIndex(unsigned int trackIndex){ m_trackIndex = trackIndex;}
79 void setPositionX(double positionX) {m_xPosition = positionX;}
80 void setPositionY(double positionY) {m_yPosition = positionY;}
81 void setPositionZ(double positionZ) {m_zPosition = positionZ;}
82 void setPx(double px) {m_px = px;}
83 void setPy(double py) {m_py = py;}
84 void setPz(double pz) {m_pz = pz;}
85 void setDepositEnergy(double depositEnergy) {m_depositEnergy = depositEnergy;}
86
87//About hit map
88 std::map<Identifier,double>::const_iterator begin() const;
89 std::map<Identifier,double>::const_iterator end() const;
90 std::map<Identifier,double>::const_iterator find(Identifier&) const;
91
92 unsigned int size() const;
93 std::map<Identifier,double> getHitMap() const;
94 void setHitMap(std::map<Identifier,double>& hitMap) { m_hitMap=hitMap; }
95
96private:
97 EmcMcHit(const EmcMcHit &);
98
99 EmcMcHit &operator=(const EmcMcHit &);
100
101 // const Identifier m_id; //2005/12/29 wensp modified
102
103 Identifier m_id;
104
105 unsigned int m_trackIndex;
106 //whether hit Emc
107 int m_hitEmc;
108 //particle ID
109 int m_PDGCode;
110 //particle charge;
111 double m_PDGCharge;
112 //hit crystal time or dead time
113 double m_time;
114
115 double m_xPosition;
116
117 double m_yPosition;
118
119 double m_zPosition;
120
121 double m_px;
122
123 double m_py;
124
125 double m_pz;
126
127 double m_depositEnergy;
128
129 std::map<Identifier,double> m_hitMap;
130};
131
132typedef ObjectVector<EmcMcHit> EmcMcHitCol;
133
134} // NameSpace Event
135
136#endif
Double_t time
const CLID & CLID_EmcMcHit
const CLID & CLID_EmcMcHit
void setPDGCode(int code)
Definition EmcMcHit.h:75
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
void setPositionX(double positionX)
Definition EmcMcHit.h:79
void setHitEmc(int is)
Definition EmcMcHit.h:74
void setPDGCharge(double charge)
Definition EmcMcHit.h:76
void setTime(double time)
Definition EmcMcHit.h:77
int getPDGCode() const
Definition EmcMcHit.cxx:30
void setDepositEnergy(double depositEnergy)
Definition EmcMcHit.h:85
int getHitEmc() const
Definition EmcMcHit.cxx:25
std::map< Identifier, double >::const_iterator end() const
Definition EmcMcHit.cxx:83
void setHitMap(std::map< Identifier, double > &hitMap)
Definition EmcMcHit.h:94
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
void setTrackIndex(unsigned int trackIndex)
Definition EmcMcHit.h:78
virtual const CLID & clID() const
Definition EmcMcHit.h:17
void setPz(double pz)
Definition EmcMcHit.h:84
void setIdentifier(Identifier &id)
Definition EmcMcHit.h:73
static const CLID & classID()
Definition EmcMcHit.h:22
double getPy() const
Definition EmcMcHit.cxx:65
void setPx(double px)
Definition EmcMcHit.h:82
std::map< Identifier, double >::const_iterator find(Identifier &) const
Definition EmcMcHit.cxx:87
double getPositionY() const
Definition EmcMcHit.cxx:50
void setPositionY(double positionY)
Definition EmcMcHit.h:80
void setPositionZ(double positionZ)
Definition EmcMcHit.h:81
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
void setPy(double py)
Definition EmcMcHit.h:83
Definition Event.h:21
ObjectVector< EmcMcHit > EmcMcHitCol
Definition EmcMcHit.h:132