BOSS 8.0.0
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 : yoshihito.iwasaki@kek.jp
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"
28#include "RawDataProviderSvc/IRawDataProviderSvc.h"
29#include "TrkReco/TRungeFitter.h"
30#include "TrkReco/TTrackManager.h"
31class TMDC;
32class TMDCWireHit;
33class TFinderBase;
35class TCurlFinder;
36class TTrack;
37class TTrackMC;
38
39#include "BesTimerSvc/BesTimer.h"
40#include "BesTimerSvc/IBesTimerSvc.h"
41#include "MdcCalibFunSvc/IMdcCalibFunSvc.h"
42
44
45/// A tracking module.
46class TrkReco : public Algorithm {
47
48public:
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
57public: // BASF interfaces
58 /// initializes TrkReco.
59 // void init(int * status);
60
61 /// terminates TrkReco.
62 // void term(void);
63
64 /// processes an event.
65 // void event(BesEvent *, int *);
66 // void event(void);
67
68 /// temporarily required
69 // void begin_run(BesEvent *, int *) {};
70 // void end_run(BesEvent *, int *) {};
71 void disp_stat( const char* );
72
73public: // TrkReco interfaces
74 /// returns name.
75 // zsl std::string name(void) const;
76
77 /// returns version.
78 // liuqg std::string version(void) const;
79
80 /// dumps debug information.
81 void dump( const std::string& message = std::string( "" ),
82 const std::string& prefix = std::string( "" ) ) const;
83
84 /// returns a pointer to the rphi finder.
85 const TFinderBase* confFinder( void ) const;
86
87 /// returns a pointer to the curl finder.
88 const TFinderBase* curlFinder( void ) const;
89
90 /// returns a pointer to TTrackManager.
91 const TTrackManager& trackManager( void ) const;
92
93public: // to access information
94 /// clears all TMDC information.
95 void clear( void );
96
97 /// clears TMDC information.
98 void fastClear( void );
99
100 /// returns a list of reconstructed tracks.
101 const AList<TTrack>& tracks( void ) const;
102
103private:
104 /// initiate Parameters
105 void initPara( void );
106
107 /// returns true if an event is MC.
108 bool mcEvent( void ) const;
109
110 /// creates MC info. of reconstructed tracks.
111 void mcInformation( void );
112
113 /// cal maxdistance temporary in conformal plane
114 double maxdDistance( TMLink* ) const;
115
116 TMDC* cdcInit( void );
117
118 /// initiate and fill Tuple
119 void InitTuple( void );
120 void FillTuple( void );
121
122public: // public members for basf interface
123 //...RawData/TUPLE...
134 //...MDC...
136 std::string _cdcVersion;
138
139 //...Bunch Time...
141
142 //...TrkReco...
149
150 //...Perfect Finder...
153
154 //...Conformal Finder...
172
173 //...Old Conformal Finder...
183
184 //...Track Manager...
195
196 //...Curl Finder...
229 double z_cut;
236
237 // jialk
244
245private:
246 bool m_beginRun{ false };
247
248 // static TrkReco * _TrkReco;
249 TMDC* _cdc;
250 TFinderBase* _perfectFinder;
251 TFinderBase* _confFinder;
252 TCurlFinder* _curlFinder;
253 TTrackManager _trackManager;
254 TRungeFitter _rkfitter;
255 IRawDataProviderSvc* _rawDataProviderSvc;
256 IMdcCalibFunSvc* _mdcCalibFunSvc;
257 IMdcGeomSvc* _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, t_pt,
272 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, t_dpt, t_dptot, t_dlmd, t_dphi, t_t0, t0_sta, t_good_theta,
274 t_gdNLayers, t_mcNLayers, t_bestNLayers, t_bestMcNLayers;
275
276 NTuple::Tuple* m_tuple2; // rec2D
277 NTuple::Item<float> t2_mctheta, t2_mcpt, t2_nDigi, t2_length, t2_ndf, t2_evtNo, t2_chi2,
278 t2_nHits, t2_nSegs, t2_length2, t2_radius;
279
280 NTuple::Tuple* m_tuple3; // raw
281 NTuple::Item<float> t3_mct0, t3_mcptot, t3_mcpt, t3_mctheta, t3_mcphi, t3_mcpid, t3_evtNo;
282
283 NTuple::Tuple* m_tuple31; // raw/event
284 NTuple::Item<float> t3_nDigi, t3_goodLength, t3_t0Rec, t3_t0, t3_t0Sta, t3_finalLength,
285 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,
289 t4_localId;
290 NTuple::Item<float> t4_LR, t4_tdc, t4_z, t4_bz, t4_fz, t4_fy, t4_phi, t4_nHits;
291
292 NTuple::Tuple* m_tuple5; // charge
293 NTuple::Item<float> t5_ptotPos, t5_ptotNeg, t5_drPos, t5_drNeg, t5_dzPos, t5_dzNeg;
294
295 NTuple::Tuple* m_tuple6; // unreconstructed.
296 NTuple::Item<float> u_length2, u_mcptot, u_mcpt, u_mctheta, u_nDigi, u_evtNo, u_mct0, ut_t0,
297 ut0_sta;
298
299 NTuple::Tuple* m_tuple7; // time test.
300 NTuple::Item<float> ti_eventTime, ti_recTrkNum, ti_evtNo, ti_nHits, ti_nDigi;
301
302 NTuple::Tuple* m_tuple9; // segments
303 NTuple::Item<float> t9_times, t9_nLinks, t9_nUsed, t9_nSL, t9_mctheta;
304
305 NTuple::Tuple* m_tuple10; // raw hit
306 NTuple::Item<float> t10_tdc, t10_adc, t10_drift, t10_dDrift, t10_lyrId, t10_localId;
307};
308
309//-----------------------------------------------------------------------------
310
311#ifdef TRKRECO_NO_INLINE
312# define inline
313#else
314# undef inline
315# define TrkReco_INLINE_DEFINE_HERE
316#endif
317
318#ifdef TrkReco_INLINE_DEFINE_HERE
319
320inline const TFinderBase* TrkReco::confFinder( void ) const {
321 return (TFinderBase*)_confFinder;
322}
323
324inline const TFinderBase* TrkReco::curlFinder( void ) const {
325 return (TFinderBase*)_curlFinder;
326}
327
328inline const AList<TTrack>& TrkReco::tracks( void ) const {
329 return _trackManager.tracksFinal();
330}
331
332/*
333inline
334std::string
335TrkReco::name(void) const {
336 return std::string("TrkReco");
337}
338*/
339
340inline const TTrackManager& TrkReco::trackManager( void ) const { return _trackManager; }
341
342#endif
343
344#undef inline
345
346#endif /* TrkReco_FLAG_ */
float TrkRecoHelixFitterChisqMax
Definition TrkReco.cxx:73
A class to find tracks with the conformal method.
A virtual class for a track finder in tracking.
A class to fit a TTrackBase object to a 3D line.
A class to have MC information of TTrack.
A manager of TTrack information to make outputs as MdcRec_trk.
A class to represent a track in tracking.
int b_conformalSalvageLoadWidth
Definition TrkReco.h:166
int b_doSalvage
Definition TrkReco.h:187
float b_conformalStereoZ3
Definition TrkReco.h:177
double selector_replace_dz
Definition TrkReco.h:216
int b_doAssociation
Definition TrkReco.h:192
double range_for_stereo3
Definition TrkReco.h:225
double good_distance_for_salvage
Definition TrkReco.h:201
int b_doConformalFastFinder
Definition TrkReco.h:157
double range_for_stereo_last2d_search
Definition TrkReco.h:208
int on_correction
Definition TrkReco.h:233
int b_conformalMinNCores
Definition TrkReco.h:163
int b_conformalFittingFlag
Definition TrkReco.h:160
double range_for_stereo4
Definition TrkReco.h:226
int b_doConformalFinderStereo
Definition TrkReco.h:174
double MIN_RADIUS_OF_STRANGE_TRACK
Definition TrkReco.h:242
int b_sortMode
Definition TrkReco.h:191
int superlayer_for_stereo_search
Definition TrkReco.h:206
int output_2dtracks
Definition TrkReco.h:234
int b_perfectFitting
Definition TrkReco.h:152
double z_diff_for_last_attend
Definition TrkReco.h:230
int min_salvage
Definition TrkReco.h:199
double range_for_stereo1
Definition TrkReco.h:223
int b_useAllHits
Definition TrkReco.h:144
int stereo_2dfind
Definition TrkReco.h:217
float b_conformalStereoSzLinkDistance
Definition TrkReco.h:171
int b_conformalFittingCorrections
Definition TrkReco.h:181
int b_doT0Reset
Definition TrkReco.h:145
float b_helixFitterChisqMax
Definition TrkReco.h:148
double range_for_stereo6
Definition TrkReco.h:228
int b_doT0Determination
Definition TrkReco.h:189
bool m_keepUnmatch
Definition TrkReco.h:132
StatusCode execute()
Definition TrkReco.cxx:274
bool m_combineTracking
Definition TrkReco.h:130
int curl_version
Definition TrkReco.h:235
double bad_distance_for_salvage
Definition TrkReco.h:200
int b_conformalMinNLinksForSegment
Definition TrkReco.h:162
std::string _cdcVersion
Definition TrkReco.h:136
double range_for_stereo_search
Definition TrkReco.h:205
float b_conformalStereoZ4
Definition TrkReco.h:178
double trace3d_distance
Definition TrkReco.h:211
double merge_ratio
Definition TrkReco.h:219
float b_salvageLevel
Definition TrkReco.h:165
double range_for_stereo2
Definition TrkReco.h:224
double selector_max_sigma
Definition TrkReco.h:214
double minimum_2DTrackLength
Definition TrkReco.h:239
int useESTime
Definition TrkReco.h:140
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
returns name.
double merge_z_diff
Definition TrkReco.h:220
float b_conformalMaxSigma
Definition TrkReco.h:161
StatusCode beginRun()
Definition TrkReco.cxx:258
int m_CalibFlag
Definition TrkReco.h:182
double minimum_closeHitsLength
Definition TrkReco.h:241
float b_conformalStereoChisq3
Definition TrkReco.h:179
double ULTIMATE_MIN_RADIUS_OF_STRANGE_TRACK
Definition TrkReco.h:243
double minimum_seedLength
Definition TrkReco.h:238
int b_doCurlFinder
Definition TrkReco.h:197
double ratio_used_wire
Definition TrkReco.h:222
int min_sequence
Definition TrkReco.h:202
void fastClear(void)
clears TMDC information.
Definition TrkReco.cxx:990
float b_fudgeFactor
Definition TrkReco.h:137
int b_conformalFinder
Definition TrkReco.h:155
int b_conformalStereoMode
Definition TrkReco.h:167
double selector_strange_pz
Definition TrkReco.h:215
TrkReco(const std::string &name, ISvcLocator *pSvcLocator)
returns TrkReco.
Definition TrkReco.cxx:75
int b_tuple
Definition TrkReco.h:126
bool m_dropHot
Definition TrkReco.h:129
int b_conformalMinNSegments
Definition TrkReco.h:164
int min_fullwire
Definition TrkReco.h:203
const AList< TTrack > & tracks(void) const
returns a list of reconstructed tracks.
Definition TrkReco.h:328
void clear(void)
clears all TMDC information.
Definition TrkReco.cxx:977
int b_doMCAnalysis
Definition TrkReco.h:147
int b_goodTrk
Definition TrkReco.h:127
double trace2d_first_distance
Definition TrkReco.h:210
double range_for_stereo5
Definition TrkReco.h:227
int b_mcHit
Definition TrkReco.h:125
int b_doConformalFinder
Definition TrkReco.h:156
float b_cdcVersion
Definition TrkReco.h:135
int b_test
Definition TrkReco.h:194
double mask_distance
Definition TrkReco.h:221
int b_debugLevel
Definition TrkReco.h:143
int b_doPerfectFinder
Definition TrkReco.h:151
double min_svd_electrons
Definition TrkReco.h:232
float b_associateSigma
Definition TrkReco.h:193
int b_mcPar
Definition TrkReco.h:124
int b_nTracksForT0
Definition TrkReco.h:190
int b_conformalStereoLoadWidth
Definition TrkReco.h:168
const TTrackManager & trackManager(void) const
returns a pointer to TTrackManager.
Definition TrkReco.h:340
float b_conformalStereoSzSegmentDistance
Definition TrkReco.h:170
int min_segment
Definition TrkReco.h:198
double minimum_3DTrackLength
Definition TrkReco.h:240
int b_doConformalSlowFinder
Definition TrkReco.h:158
bool m_keepBadTdc
Definition TrkReco.h:131
double trace2d_distance
Definition TrkReco.h:209
float b_conformalFraction
Definition TrkReco.h:176
double b_momentumCut
Definition TrkReco.h:185
int b_nT0ResetMax
Definition TrkReco.h:146
StatusCode initialize()
Definition TrkReco.cxx:93
int b_doMerge
Definition TrkReco.h:188
int b_RungeKuttaCorrection
Definition TrkReco.h:133
int svd_reconstruction
Definition TrkReco.h:231
double range_for_axial_last2d_search
Definition TrkReco.h:207
int b_timeTest
Definition TrkReco.h:128
float b_conformalStereoMaxSigma
Definition TrkReco.h:169
int b_conformalPerfectSegmentFinding
Definition TrkReco.h:159
double range_for_axial_search
Definition TrkReco.h:204
float b_conformalStereoChisq4
Definition TrkReco.h:180
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:324
int b_fittingFlag
Definition TrkReco.h:186
StatusCode finalize()
Definition TrkReco.cxx:240
void disp_stat(const char *)
initializes TrkReco.
Definition TrkReco.cxx:268
double selector_max_impact
Definition TrkReco.h:213
int determine_one_track
Definition TrkReco.h:212
double z_cut
Definition TrkReco.h:229
int merge_exe
Definition TrkReco.h:218
int b_doConformalFinderCosmic
Definition TrkReco.h:175