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