BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
TTrackMC.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// $Id: TTrackMC.h,v 1.5 2010/03/31 09:58:59 liucy Exp $
3//-----------------------------------------------------------------------------
4// Filename : TTrackMC.h
5// Section : Tracking
6// Owner : Yoshi Iwasaki
7// Email : [email protected]
8//-----------------------------------------------------------------------------
9// Description : A class to have MC information of TTrack.
10// See http://bsunsrv1.kek.jp/~yiwasaki/tracking/
11//-----------------------------------------------------------------------------
12
13#ifndef TTrackMC_FLAG_
14#define TTrackMC_FLAG_
15
16#define TTrackClassified 1
17
18#define TTrackGarbage 1
19#define TTrackCharge 2
20#define TTrackBad 4
21#define TTrackGhost 8
22#define TTrackGood 16
23
24#define TTrackHep 65536
25#define TTrackWire 131072
26#define TTrackPt 524288
27#define TTrackPz 1048576
28#define TTrackUnique 2097152
29#define TTrackMatchingLoose 4194304
30#define TTrackMatchingTight 8388608
31
32#ifdef TRKRECO_DEBUG_DETAIL
33#ifndef TRKRECO_DEBUG
34#define TRKRECO_DEBUG
35#endif
36#endif
37
38#include <string>
39
40#define HEP_SHORT_NAMES
41#include "CLHEP/Alist/AList.h"
42#include "CLHEP/Vector/ThreeVector.h"
43#include "CLHEP/Vector/LorentzVector.h"
44//struct reccdc_mctrk;
45class MdcRec_mctrk;
46class TrkReco;
47class TTrack;
48class TTrackHEP;
49
50using CLHEP::Hep3Vector;
51using CLHEP::HepLorentzVector;
52
53/// A class to have MC information of TTrack.
54class TTrackMC {
55
56 private:
57 /// Constructor
58 TTrackMC(const TTrack &);
59
60 public:
61 /// Destructor
62 virtual ~TTrackMC();
63
64 public:
65 /// dumps debug information.
66 void dump(const std::string & message = std::string(""),
67 const std::string & prefix = std::string("")) const;
68
69 /// returns HEP ID.
70 int hepId(void) const;
71
72 /// returns a pointer to TTrackHEP.
73 const TTrackHEP * const hep(void) const;
74
75 /// returns charge matching.
76 bool charge(void) const;
77
78 /// returns wire fraction(F1).
79 double wireFraction(void) const;
80
81 /// returns wire fraction(F2).
82 double wireFractionHEP(void) const;
83
84 /// returns pt fraction.
85 double ptFraction(void) const;
86
87 /// returns pz fraction.
88 double pzFraction(void) const;
89
90 /// returns residual of momentum.
91 const Hep3Vector & residual(void) const;
92
93 /// returns residual of pt.
94 double ptResidual(void) const;
95
96 /// returns residual of pz.
97 double pzResidual(void) const;
98
99 /// returns pull of pt.
100 double ptPull(void) const;
101
102 /// returns pull of pz.
103 double pzPull(void) const;
104
105 /// returns state.
106 unsigned state(void) const;
107
108 /// returns quality.
109 unsigned quality(void) const;
110
111 /// returns quality.
112 std::string qualityString(void) const;
113
114 public:
115 /// updates information.
116 void update(void);
117
118 private:
119 /// checks matching of charge.
120 void compare(void);
121
122 /// classifies itself.
123 void classify(void);
124
125 private:
126 unsigned _state;
127 unsigned _quality;
128
129 const TTrack & _t;
130 TTrackHEP * _hep;
131 int _hepID;
132 double _wireFraction;
133 double _wireFractionHEP;
134 bool _charge;
135 double _ptFraction;
136 double _pzFraction;
137 Hep3Vector _residual;
138 double _cosOpen;
139 double _ptResidual;
140 double _pzResidual;
141 double _ptPull;
142 double _pzPull;
143
144 friend class TrkReco;
145};
146
147std::string
148TrackMCStatus(const TTrackMC &);
149
150std::string
152
153std::string
154TrackMCQualityString(unsigned quality);
155
156//-----------------------------------------------------------------------------
157
158#ifdef TRKRECO_NO_INLINE
159#define inline
160#else
161#undef inline
162#define TTrackMC_INLINE_DEFINE_HERE
163#endif
164
165#ifdef TTrackMC_INLINE_DEFINE_HERE
166
167inline
168int
169TTrackMC::hepId(void) const {
170 return _hepID;
171}
172
173inline
174const TTrackHEP * const
175TTrackMC::hep(void) const {
176 return _hep;
177}
178
179inline
180bool
181TTrackMC::charge(void) const {
182 return _charge;
183}
184
185inline
186double
188 return _ptFraction;
189}
190
191inline
192double
194 return _pzFraction;
195}
196
197inline
198double
200 return _wireFraction;
201}
202
203inline
204double
206 return _wireFractionHEP;
207}
208
209inline
210unsigned
211TTrackMC::state(void) const {
212 return _state;
213}
214
215inline
216unsigned
217TTrackMC::quality(void) const {
218 return _quality;
219}
220
221inline
222const Hep3Vector &
224 return _residual;
225}
226
227inline
228double
230 return _ptResidual;
231}
232
233inline
234double
236 return _pzResidual;
237}
238
239inline
240double
241TTrackMC::ptPull(void) const {
242 return _ptPull;
243}
244
245inline
246double
247TTrackMC::pzPull(void) const {
248 return _pzPull;
249}
250
251#endif
252
253#undef inline
254
255#endif /* TTrackMC_FLAG_ */
std::string TrackMCQualityString(unsigned quality)
Definition: TTrackMC.cxx:313
std::string TrackMCStatus(const TTrackMC &)
Definition: TTrackMC.cxx:303
A class to represent a GEN_HEPEVT particle in tracking.
Definition: TTrackHEP.h:37
A class to have MC information of TTrack.
Definition: TTrackMC.h:54
int hepId(void) const
returns HEP ID.
Definition: TTrackMC.h:169
double wireFractionHEP(void) const
returns wire fraction(F2).
Definition: TTrackMC.h:205
double pzPull(void) const
returns pull of pz.
Definition: TTrackMC.h:247
double ptResidual(void) const
returns residual of pt.
Definition: TTrackMC.h:229
double pzResidual(void) const
returns residual of pz.
Definition: TTrackMC.h:235
const Hep3Vector & residual(void) const
returns residual of momentum.
Definition: TTrackMC.h:223
virtual ~TTrackMC()
Destructor.
Definition: TTrackMC.cxx:63
void update(void)
updates information.
Definition: TTrackMC.cxx:67
double ptPull(void) const
returns pull of pt.
Definition: TTrackMC.h:241
const TTrackHEP *const hep(void) const
returns a pointer to TTrackHEP.
Definition: TTrackMC.h:175
unsigned quality(void) const
returns quality.
Definition: TTrackMC.h:217
bool charge(void) const
returns charge matching.
Definition: TTrackMC.h:181
double ptFraction(void) const
returns pt fraction.
Definition: TTrackMC.h:187
unsigned state(void) const
returns state.
Definition: TTrackMC.h:211
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
Definition: TTrackMC.cxx:141
double pzFraction(void) const
returns pz fraction.
Definition: TTrackMC.h:193
double wireFraction(void) const
returns wire fraction(F1).
Definition: TTrackMC.h:199
std::string qualityString(void) const
returns quality.
Definition: TTrackMC.cxx:285
A class to represent a track in tracking.
Definition: TTrack.h:129
A tracking module.
Definition: TrkReco.h:46