BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkReco.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// $Id: TrkReco.h,v 1.30 2011/10/08 01:56:15 maoh Exp $
3//-----------------------------------------------------------------------------
4// Filename : TrkReco.h
5// Section : Tracking
6// Owner : Yoshi Iwasaki
7// Email : [email protected]
8//-----------------------------------------------------------------------------
9// Description : A tracking module.
10// See http://bsunsrv1.kek.jp/~yiwasaki/tracking/
11//-----------------------------------------------------------------------------
12
13#ifndef TrkReco_FLAG_
14#define TrkReco_FLAG_
15
16#ifdef TRKRECO_DEBUG_DETAIL
17#ifndef TRKRECO_DEBUG
18#define TRKRECO_DEBUG
19#endif
20#endif
21
22#include "GaudiKernel/Algorithm.h"
23#include "GaudiKernel/NTuple.h"
24#include <string>
25
26#define HEP_SHORT_NAMES
27#include "CLHEP/Alist/AList.h"
31class TMDC;
32class TMDCWireHit;
33class TFinderBase;
35class TCurlFinder;
36class TTrack;
37class TTrackMC;
38
39class MdcCalibFunSvc;
40class IBesTimerSvc;
41class BesTimer;
42
44
45/// A tracking module.
46class TrkReco : public Algorithm {
47
48 public:
49 /// returns TrkReco.
50 //static TrkReco * getTrkReco(void);
51 TrkReco(const std::string& name, ISvcLocator* pSvcLocator);
52 StatusCode initialize();
53 StatusCode execute();
54 StatusCode finalize();
55 StatusCode beginRun();
56 StatusCode endRun(){};
57
58 public:// BASF interfaces
59 /// initializes TrkReco.
60// void init(int * status);
61
62 /// terminates TrkReco.
63// void term(void);
64
65 /// processes an event.
66// void event(BesEvent *, int *);
67// void event(void);
68
69 /// temporarily required
70// void begin_run(BesEvent *, int *) {};
71// void end_run(BesEvent *, int *) {};
72 void disp_stat(const char *);
73
74 public:// TrkReco interfaces
75 /// returns name.
76//zsl std::string name(void) const;
77
78 /// returns version.
79//liuqg std::string version(void) const;
80
81 /// dumps debug information.
82 void dump(const std::string & message = std::string(""),
83 const std::string & prefix = std::string("")) const;
84
85 /// returns a pointer to the rphi finder.
86 const TFinderBase * confFinder(void) const;
87
88 /// returns a pointer to the curl finder.
89 const TFinderBase * curlFinder(void) const;
90
91 /// returns a pointer to TTrackManager.
92 const TTrackManager & trackManager(void) const;
93
94 public: // to access information
95 /// clears all TMDC information.
96 void clear(void);
97
98 /// clears TMDC information.
99 void fastClear(void);
100
101 /// returns a list of reconstructed tracks.
102 const AList<TTrack> & tracks(void) const;
103
104 private:
105 /// initiate Parameters
106 void initPara(void);
107
108 /// returns true if an event is MC.
109 bool mcEvent(void) const;
110
111 /// creates MC info. of reconstructed tracks.
112 void mcInformation(void);
113
114 /// cal maxdistance temporary in conformal plane
115 double maxdDistance(TMLink *) const;
116
117 TMDC * cdcInit(void);
118
119 /// initiate and fill Tuple
120 void InitTuple(void);
121 void FillTuple(void);
122
123 public:// public members for basf interface
124
125 //...RawData/TUPLE...
136 //...MDC...
138 std::string _cdcVersion;
140
141 //...Bunch Time...
143
144 //...TrkReco...
151
152 //...Perfect Finder...
155
156 //...Conformal Finder...
174
175 //...Old Conformal Finder...
185
186 //...Track Manager...
197
198 //...Curl Finder...
231 double z_cut;
238
239 //jialk
246
247 private:
248// static TrkReco * _TrkReco;
249 TMDC * _cdc;
250 TFinderBase * _perfectFinder;
251 TFinderBase * _confFinder;
252 TCurlFinder * _curlFinder;
253 TTrackManager _trackManager;
254 TRungeFitter _rkfitter;
255 RawDataProviderSvc * _rawDataProviderSvc;
256 MdcCalibFunSvc * _mdcCalibFunSvc;
257 MdcGeomSvc * _mdcGeomSvc;
258
259 unsigned _nEvents;
260 AList<TTrackMC> _mcTracks;
261
262 //Tuple related
263 IBesTimerSvc* m_timersvc;
264 BesTimer* m_timer[2];
265 double t0_bes;
266 double t0Sta;
267 int havedigi[43][288];
268 int MC_DIGI_SIZE;
269
270 NTuple::Tuple* m_tuple; //rec3D
271 NTuple::Item<float> t_mcphi,t_mctheta,t_mcptot,t_mcpt,t_mcpz,t_mct0,t_nDigi,
272 t_pt,t_ptot,t_dr,t_dz,t_tanlmd,t_phi,t_radius,t_chi2,t_ndf,t_nHits,t_nCores,t_nSegs,
273 t_length,t_length2,t_evtNo,
274 t_dpt,t_dptot,t_dlmd,t_dphi,
275 t_t0,t0_sta,
276 t_good_theta,t_gdNLayers,t_mcNLayers,t_bestNLayers,t_bestMcNLayers;
277
278 NTuple::Tuple* m_tuple2; //rec2D
279 NTuple::Item<float> t2_mctheta,t2_mcpt,t2_nDigi,t2_length,t2_ndf,t2_evtNo,t2_chi2,t2_nHits,t2_nSegs,t2_length2,t2_radius;
280
281 NTuple::Tuple* m_tuple3; //raw
282 NTuple::Item<float> t3_mct0,t3_mcptot,t3_mcpt,t3_mctheta,t3_mcphi, t3_mcpid, t3_evtNo;
283
284 NTuple::Tuple* m_tuple31; //raw/event
285 NTuple::Item<float> t3_nDigi,t3_goodLength, t3_t0Rec, t3_t0, t3_t0Sta, t3_finalLength, t3_length;
286
287 NTuple::Tuple* m_tuple4; //hits
288 NTuple::Item<float> t4_Dist,t4_drift,t4_dDrift,t4_mcDrift,t4_mcLR,t4_pull,t4_lyrId,t4_localId;
289 NTuple::Item<float> t4_LR,t4_tdc,t4_z,t4_bz,t4_fz,t4_fy,t4_phi, t4_nHits;
290
291 NTuple::Tuple* m_tuple5; //charge
292 NTuple::Item<float> t5_ptotPos, t5_ptotNeg, t5_drPos, t5_drNeg, t5_dzPos, t5_dzNeg;
293
294 NTuple::Tuple* m_tuple6; //unreconstructed.
295 NTuple::Item<float> u_length2,u_mcptot,u_mcpt,u_mctheta,u_nDigi,u_evtNo,u_mct0,ut_t0,ut0_sta;
296
297 NTuple::Tuple* m_tuple7; //time test.
298 NTuple::Item<float> ti_eventTime, ti_recTrkNum, ti_evtNo, ti_nHits, ti_nDigi;
299
300 NTuple::Tuple* m_tuple9; //segments
301 NTuple::Item<float> t9_times, t9_nLinks, t9_nUsed, t9_nSL, t9_mctheta;
302
303 NTuple::Tuple* m_tuple10; //raw hit
304 NTuple::Item<float> t10_tdc, t10_adc, t10_drift, t10_dDrift,t10_lyrId,t10_localId;
305};
306
307//-----------------------------------------------------------------------------
308
309#ifdef TRKRECO_NO_INLINE
310#define inline
311#else
312#undef inline
313#define TrkReco_INLINE_DEFINE_HERE
314#endif
315
316#ifdef TrkReco_INLINE_DEFINE_HERE
317
318inline
319const TFinderBase *
321 return (TFinderBase *) _confFinder;
322}
323
324inline
325const TFinderBase *
327 return (TFinderBase *) _curlFinder;
328}
329
330inline
331const AList<TTrack> &
332TrkReco::tracks(void) const {
333 return _trackManager.tracksFinal();
334}
335
336/*
337inline
338std::string
339TrkReco::name(void) const {
340 return std::string("TrkReco");
341}
342*/
343
344inline
345const TTrackManager &
347 return _trackManager;
348}
349
350#endif
351
352#undef inline
353
354#endif /* TrkReco_FLAG_ */
float TrkRecoHelixFitterChisqMax
Definition: TrkReco.cxx:78
A class to find tracks with the conformal method.
A virtual class for a track finder in tracking.
Definition: TFinderBase.h:31
Definition: TMDC.h:61
A class to fit a TTrackBase object to a 3D line.
Definition: TRungeFitter.h:34
A class to have MC information of TTrack.
Definition: TTrackMC.h:54
A manager of TTrack information to make outputs as MdcRec_trk.
Definition: TTrackManager.h:44
const AList< TTrack > & tracksFinal(void) const
returns a list of tracks writen to MdcRec_trk.
A class to represent a track in tracking.
Definition: TTrack.h:129
A tracking module.
Definition: TrkReco.h:46
int b_conformalSalvageLoadWidth
Definition: TrkReco.h:168
int b_doSalvage
Definition: TrkReco.h:189
float b_conformalStereoZ3
Definition: TrkReco.h:179
double selector_replace_dz
Definition: TrkReco.h:218
int b_doAssociation
Definition: TrkReco.h:194
double range_for_stereo3
Definition: TrkReco.h:227
double good_distance_for_salvage
Definition: TrkReco.h:203
int b_doConformalFastFinder
Definition: TrkReco.h:159
double range_for_stereo_last2d_search
Definition: TrkReco.h:210
int on_correction
Definition: TrkReco.h:235
int b_conformalMinNCores
Definition: TrkReco.h:165
int b_conformalFittingFlag
Definition: TrkReco.h:162
double range_for_stereo4
Definition: TrkReco.h:228
int b_doConformalFinderStereo
Definition: TrkReco.h:176
double MIN_RADIUS_OF_STRANGE_TRACK
Definition: TrkReco.h:244
int b_sortMode
Definition: TrkReco.h:193
int superlayer_for_stereo_search
Definition: TrkReco.h:208
int output_2dtracks
Definition: TrkReco.h:236
int b_perfectFitting
Definition: TrkReco.h:154
double z_diff_for_last_attend
Definition: TrkReco.h:232
int min_salvage
Definition: TrkReco.h:201
double range_for_stereo1
Definition: TrkReco.h:225
int b_useAllHits
Definition: TrkReco.h:146
int stereo_2dfind
Definition: TrkReco.h:219
float b_conformalStereoSzLinkDistance
Definition: TrkReco.h:173
int b_conformalFittingCorrections
Definition: TrkReco.h:183
int b_doT0Reset
Definition: TrkReco.h:147
float b_helixFitterChisqMax
Definition: TrkReco.h:150
double range_for_stereo6
Definition: TrkReco.h:230
int b_doT0Determination
Definition: TrkReco.h:191
bool m_keepUnmatch
Definition: TrkReco.h:134
StatusCode execute()
Definition: TrkReco.cxx:321
bool m_combineTracking
Definition: TrkReco.h:132
int curl_version
Definition: TrkReco.h:237
double bad_distance_for_salvage
Definition: TrkReco.h:202
int b_conformalMinNLinksForSegment
Definition: TrkReco.h:164
std::string _cdcVersion
Definition: TrkReco.h:138
double range_for_stereo_search
Definition: TrkReco.h:207
float b_conformalStereoZ4
Definition: TrkReco.h:180
double trace3d_distance
Definition: TrkReco.h:213
double merge_ratio
Definition: TrkReco.h:221
float b_salvageLevel
Definition: TrkReco.h:167
double range_for_stereo2
Definition: TrkReco.h:226
double selector_max_sigma
Definition: TrkReco.h:216
double minimum_2DTrackLength
Definition: TrkReco.h:241
int useESTime
Definition: TrkReco.h:142
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
returns name.
double merge_z_diff
Definition: TrkReco.h:222
float b_conformalMaxSigma
Definition: TrkReco.h:163
StatusCode beginRun()
Definition: TrkReco.cxx:302
int m_CalibFlag
Definition: TrkReco.h:184
double minimum_closeHitsLength
Definition: TrkReco.h:243
float b_conformalStereoChisq3
Definition: TrkReco.h:181
double ULTIMATE_MIN_RADIUS_OF_STRANGE_TRACK
Definition: TrkReco.h:245
double minimum_seedLength
Definition: TrkReco.h:240
int b_doCurlFinder
Definition: TrkReco.h:199
double ratio_used_wire
Definition: TrkReco.h:224
int min_sequence
Definition: TrkReco.h:204
void fastClear(void)
clears TMDC information.
Definition: TrkReco.cxx:970
float b_fudgeFactor
Definition: TrkReco.h:139
int b_conformalFinder
Definition: TrkReco.h:157
int b_conformalStereoMode
Definition: TrkReco.h:169
double selector_strange_pz
Definition: TrkReco.h:217
int b_tuple
Definition: TrkReco.h:128
bool m_dropHot
Definition: TrkReco.h:131
int b_conformalMinNSegments
Definition: TrkReco.h:166
int min_fullwire
Definition: TrkReco.h:205
const AList< TTrack > & tracks(void) const
returns a list of reconstructed tracks.
Definition: TrkReco.h:332
void clear(void)
clears all TMDC information.
Definition: TrkReco.cxx:956
int b_doMCAnalysis
Definition: TrkReco.h:149
int b_goodTrk
Definition: TrkReco.h:129
double trace2d_first_distance
Definition: TrkReco.h:212
double range_for_stereo5
Definition: TrkReco.h:229
int b_mcHit
Definition: TrkReco.h:127
int b_doConformalFinder
Definition: TrkReco.h:158
float b_cdcVersion
Definition: TrkReco.h:137
int b_test
Definition: TrkReco.h:196
double mask_distance
Definition: TrkReco.h:223
int b_debugLevel
Definition: TrkReco.h:145
int b_doPerfectFinder
Definition: TrkReco.h:153
double min_svd_electrons
Definition: TrkReco.h:234
float b_associateSigma
Definition: TrkReco.h:195
int b_mcPar
Definition: TrkReco.h:126
int b_nTracksForT0
Definition: TrkReco.h:192
int b_conformalStereoLoadWidth
Definition: TrkReco.h:170
const TTrackManager & trackManager(void) const
returns a pointer to TTrackManager.
Definition: TrkReco.h:346
float b_conformalStereoSzSegmentDistance
Definition: TrkReco.h:172
int min_segment
Definition: TrkReco.h:200
double minimum_3DTrackLength
Definition: TrkReco.h:242
int b_doConformalSlowFinder
Definition: TrkReco.h:160
bool m_keepBadTdc
Definition: TrkReco.h:133
double trace2d_distance
Definition: TrkReco.h:211
float b_conformalFraction
Definition: TrkReco.h:178
double b_momentumCut
Definition: TrkReco.h:187
int b_nT0ResetMax
Definition: TrkReco.h:148
StatusCode initialize()
Definition: TrkReco.cxx:99
int b_doMerge
Definition: TrkReco.h:190
int b_RungeKuttaCorrection
Definition: TrkReco.h:135
int svd_reconstruction
Definition: TrkReco.h:233
double range_for_axial_last2d_search
Definition: TrkReco.h:209
int b_timeTest
Definition: TrkReco.h:130
float b_conformalStereoMaxSigma
Definition: TrkReco.h:171
int b_conformalPerfectSegmentFinding
Definition: TrkReco.h:161
double range_for_axial_search
Definition: TrkReco.h:206
float b_conformalStereoChisq4
Definition: TrkReco.h:182
StatusCode endRun()
Definition: TrkReco.h:56
const TFinderBase * confFinder(void) const
returns a pointer to the rphi finder.
Definition: TrkReco.h:320
const TFinderBase * curlFinder(void) const
returns a pointer to the curl finder.
Definition: TrkReco.h:326
int b_fittingFlag
Definition: TrkReco.h:188
StatusCode finalize()
Definition: TrkReco.cxx:284
void disp_stat(const char *)
initializes TrkReco.
Definition: TrkReco.cxx:315
double selector_max_impact
Definition: TrkReco.h:215
int determine_one_track
Definition: TrkReco.h:214
double z_cut
Definition: TrkReco.h:231
int merge_exe
Definition: TrkReco.h:220
int b_doConformalFinderCosmic
Definition: TrkReco.h:177