BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcMcHit.h
Go to the documentation of this file.
1#ifndef MdcMcHit_H
2#define MdcMcHit_H
3#include <algorithm>
4#include <string>
5#include "GaudiKernel/ContainedObject.h"
7#include "GaudiKernel/ObjectVector.h"
9
10using namespace EventModel;
11extern const CLID& CLID_MdcMcHit;
12
13namespace Event { // NameSpace
14
15class MdcMcHit : virtual public ContainedObject {
16public:
17 virtual const CLID& clID() const
18 {
19 return MdcMcHit::classID();
20 }
21
22 static const CLID& classID()
23 {
24 return CLID_MdcMcHit;
25 }
26 // Constructor
28 MdcMcHit(const Identifier& id, unsigned int trackIndex, double xPosition,
29 double yPosition, double zPosition, double driftDistance,
30 double depositEnergy, int posFlag = -1);
31 MdcMcHit(const Identifier& id, unsigned int trackIndex,
32 int currentTrackPID,double xPosition,
33 double yPosition, double zPosition, double xMomentum,
34 double yMomentum, double zMomentum, double driftDistance,
35 double depositEnergy, double flightLength, int posFlag = -1);
36
37 // Get associated id
38 Identifier identify() const;
39
40 // Get the associated track id
41 unsigned int getTrackIndex() const;
42
43 // Get the associated current track PID
44 int getCurrentTrackPID() const{return m_currentTrackPID;}
45
46 // Get if a secondary
47 int getIsSecondary() const {return m_isSecondary;};
48
49 // Get the position x
50 double getPositionX() const;
51
52 // Get the position y
53 double getPositionY() const;
54
55 // Get the position z
56 double getPositionZ() const;
57
58 // Get the momentum x
59 double getMomentumX() const{return m_xMomentum;}
60
61 // Get the momentum y
62 double getMomentumY() const{return m_yMomentum;}
63
64 // Get the momentum z
65 double getMomentumZ() const{return m_zMomentum;}
66
67 // Get Drift Distance
68 double getDriftDistance() const;
69
70 // Get deposited energy
71 double getDepositEnergy() const;
72
73 // Get the position flag
74 int getPositionFlag() const;
75
76 // Get the flight length
77 double getFlightLength() const{return m_flightLength;}
78
79 std::string getCreatorProcess() const {return m_creatorProcess;}
80
81 int getDigiIdx() const {return m_digi_id;}// positve: contribute to both time and charge, negative: only charge
82
83 //Set
84 void setIdentifier(unsigned int id) {m_id = id ;}
85 void setTrackIndex(unsigned int trackIndex) {m_trackIndex = trackIndex;}
86 void setCurrentTrackPID(int currentTrackPID){
87 m_currentTrackPID = currentTrackPID;}
88 void setIsSecondary(int isSec) {m_isSecondary = isSec;};
89 void setPositionX(double positionX) {m_xPosition = positionX;}
90 void setPositionY(double positionY) {m_yPosition = positionY;}
91 void setPositionZ(double positionZ) {m_zPosition = positionZ;}
92 void setMomentumX(double momentumX) {m_xMomentum = momentumX;}
93 void setMomentumY(double momentumY) {m_yMomentum = momentumY;}
94 void setMomentumZ(double momentumZ) {m_zMomentum = momentumZ;}
95 void setDriftDistance(double driftDistance){m_driftDistance = driftDistance;}
96 void setDepositEnergy(double depositEnergy) {m_depositEnergy = depositEnergy;}
97 void setPositionFlag(int posFlag) { m_posFlag = posFlag; }
98 void setFlightLength(double flightLength){m_flightLength = flightLength;}
99 void setCreatorProcess(std::string creatorProcess) {m_creatorProcess = creatorProcess;};
100 void setDigiIdx(int id) {m_digi_id=id;};
101
102private:
103 MdcMcHit(const MdcMcHit &);
104
105 MdcMcHit &operator=(const MdcMcHit &);
106
107 // const Identifier m_id;
108 Identifier m_id;
109
110 unsigned int m_trackIndex;
111
112 int m_currentTrackPID;
113
114 int m_isSecondary;
115
116 //poca position on track
117 double m_xPosition;
118
119 double m_yPosition;
120
121 double m_zPosition;
122
123 //poca momenutm on track
124 double m_xMomentum;
125
126 double m_yMomentum;
127
128 double m_zMomentum;
129
130 double m_driftDistance;//doca
131
132 double m_depositEnergy;
133
134 int m_posFlag;//left right ambiguity flag
135
136 double m_flightLength;//from vertex
137
138 std::string m_creatorProcess; /* Name of the generation process */
139 int m_digi_id;// positve: contribute to both time and charge, negative: only charge
140};
141
142typedef ObjectVector<MdcMcHit> MdcMcHitCol;
143
144} // NameSpace Event
145
146#endif
const CLID & CLID_MdcMcHit
const CLID & CLID_MdcMcHit
void setMomentumZ(double momentumZ)
Definition MdcMcHit.h:94
double getPositionZ() const
Definition MdcMcHit.cxx:43
std::string getCreatorProcess() const
Definition MdcMcHit.h:79
double getMomentumX() const
Definition MdcMcHit.h:59
int getPositionFlag() const
Definition MdcMcHit.cxx:58
double getDepositEnergy() const
Definition MdcMcHit.cxx:53
virtual const CLID & clID() const
Definition MdcMcHit.h:17
void setMomentumY(double momentumY)
Definition MdcMcHit.h:93
double getMomentumY() const
Definition MdcMcHit.h:62
void setPositionFlag(int posFlag)
Definition MdcMcHit.h:97
int getIsSecondary() const
Definition MdcMcHit.h:47
unsigned int getTrackIndex() const
Definition MdcMcHit.cxx:28
void setPositionZ(double positionZ)
Definition MdcMcHit.h:91
void setFlightLength(double flightLength)
Definition MdcMcHit.h:98
static const CLID & classID()
Definition MdcMcHit.h:22
void setDepositEnergy(double depositEnergy)
Definition MdcMcHit.h:96
double getFlightLength() const
Definition MdcMcHit.h:77
double getDriftDistance() const
Definition MdcMcHit.cxx:48
void setMomentumX(double momentumX)
Definition MdcMcHit.h:92
void setIdentifier(unsigned int id)
Definition MdcMcHit.h:84
double getMomentumZ() const
Definition MdcMcHit.h:65
void setPositionY(double positionY)
Definition MdcMcHit.h:90
double getPositionX() const
Definition MdcMcHit.cxx:33
int getCurrentTrackPID() const
Definition MdcMcHit.h:44
void setDigiIdx(int id)
Definition MdcMcHit.h:100
void setIsSecondary(int isSec)
Definition MdcMcHit.h:88
void setTrackIndex(unsigned int trackIndex)
Definition MdcMcHit.h:85
void setCurrentTrackPID(int currentTrackPID)
Definition MdcMcHit.h:86
Identifier identify() const
Definition MdcMcHit.cxx:23
void setCreatorProcess(std::string creatorProcess)
Definition MdcMcHit.h:99
void setDriftDistance(double driftDistance)
Definition MdcMcHit.h:95
int getDigiIdx() const
Definition MdcMcHit.h:81
double getPositionY() const
Definition MdcMcHit.cxx:38
void setPositionX(double positionX)
Definition MdcMcHit.h:89
Definition Event.h:21
ObjectVector< MdcMcHit > MdcMcHitCol
Definition MdcMcHit.h:142