BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/McTruth/McTruth/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"
5#include "Identifier/Identifier.h"
6#include "GaudiKernel/ObjectVector.h"
7#include "EventModel/EventModel.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
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
Definition: EventModel.cxx:220
const CLID & CLID_EmcMcHit
Definition: EventModel.cxx:220
Identifier identify() const
std::map< Identifier, double > getHitMap() const
double getPositionZ() const
unsigned int size() const
int getPDGCode() const
void setDepositEnergy(double depositEnergy)
int getHitEmc() const
std::map< Identifier, double >::const_iterator end() const
void setHitMap(std::map< Identifier, double > &hitMap)
double getTime() const
double getPx() const
double getPDGCharge() const
double getDepositEnergy() const
void setTrackIndex(unsigned int trackIndex)
EmcMcHit(const Identifier &id, unsigned int trackIndex, double xPosition, double yPosition, double zPosition, double px, double py, double pz, double depositEnergy)
double getPy() const
std::map< Identifier, double >::const_iterator find(Identifier &) const
double getPositionY() const
double getPz() const
std::map< Identifier, double >::const_iterator begin() const
unsigned int getTrackIndex() const
double getPositionX() const
ObjectVector< EmcMcHit > EmcMcHitCol