BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/McTruth/include/McTruth/TofMcHit.h
Go to the documentation of this file.
1#ifndef TofMcHit_H
2#define TofMcHit_H
3#include "EventModel/EventModel.h"
4#include "GaudiKernel/ContainedObject.h"
5#include "GaudiKernel/ObjectVector.h"
6#include "Identifier/Identifier.h"
7#include <algorithm>
8
9using namespace EventModel;
10extern const CLID& CLID_TofMcHit;
11
12namespace Event { // NameSpace
13 class TofMcHit : virtual public ContainedObject {
14 public:
15 virtual const CLID& clID() const { return TofMcHit::classID(); }
16
17 static const CLID& classID() { return CLID_TofMcHit; }
18 // Constructor
20 TofMcHit( const Identifier& id, unsigned int trackIndex, double xPosition,
21 double yPosition, double zPosition, double px, double py, double pz,
22 double trackLength, double flightTime );
23
24 // Get associated id
25 Identifier identify() const;
26
27 // Get the associated track id
28 unsigned int getTrackIndex() const;
29
30 // Get the position x
31 double getPositionX() const;
32
33 // Get the position y
34 double getPositionY() const;
35
36 // Get the position z
37 double getPositionZ() const;
38
39 // Get momentum Px
40 double getPx() const;
41
42 // Get momentum Py
43 double getPy() const;
44
45 // Get momentum Pz
46 double getPz() const;
47
48 // Get the trajectory length
49 double getTrackLength() const;
50
51 // Get the flight time
52 double getFlightTime() const;
53 // Set
54 void setIdentifier( unsigned int id ) { m_id = id; }
55 void setTrackIndex( unsigned int trackIndex ) { m_trackIndex = trackIndex; }
56 void setPositionX( double positionX ) { m_xPosition = positionX; }
57 void setPositionY( double positionY ) { m_yPosition = positionY; }
58 void setPositionZ( double positionZ ) { m_zPosition = positionZ; }
59 void setPx( double px ) { m_px = px; }
60 void setPy( double py ) { m_py = py; }
61 void setPz( double pz ) { m_pz = pz; }
62 void setTrackLength( double trackLength ) { m_trackLength = trackLength; }
63 void setFlightTime( double flightTime ) { m_flightTime = flightTime; }
64
65 private:
66 TofMcHit( const TofMcHit& );
67
68 TofMcHit& operator=( const TofMcHit& );
69
70 // const Identifier m_id; //2005/12/29 wensp modified
71
72 Identifier m_id;
73
74 unsigned int m_trackIndex;
75
76 double m_xPosition;
77
78 double m_yPosition;
79
80 double m_zPosition;
81
82 double m_px;
83
84 double m_py;
85
86 double m_pz;
87
88 double m_trackLength;
89
90 double m_flightTime;
91 };
92
93 typedef ObjectVector<TofMcHit> TofMcHitCol;
94
95} // NameSpace Event
96#endif
const CLID & CLID_TofMcHit
NTuple::Item< double > m_pz
void setTrackIndex(unsigned int trackIndex)
double getFlightTime() const
Definition TofMcHit.cxx:45
unsigned int getTrackIndex() const
Definition TofMcHit.cxx:21
double getPositionZ() const
Definition TofMcHit.cxx:30
Identifier identify() const
Definition TofMcHit.cxx:18
double getPositionY() const
Definition TofMcHit.cxx:27
double getTrackLength() const
Definition TofMcHit.cxx:42
double getPositionX() const
Definition TofMcHit.cxx:24
double getPy() const
Definition TofMcHit.cxx:36
void setTrackLength(double trackLength)
double getPx() const
Definition TofMcHit.cxx:33
virtual const CLID & clID() const
double getPz() const
Definition TofMcHit.cxx:39
ObjectVector< TofMcHit > TofMcHitCol