BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/TrkReco/TrkReco/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"
28#include "TrkReco/TTrackManager.h"
29#include "RawDataProviderSvc/RawDataProviderSvc.h"
30#include "TrkReco/TRungeFitter.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.
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.
const AList< TTrack > & tracksFinal(void) const
returns a list of tracks writen to MdcRec_trk.
A class to represent a track in tracking.
StatusCode execute()
Definition: TrkReco.cxx:321
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
returns name.
StatusCode beginRun()
Definition: TrkReco.cxx:302
void fastClear(void)
clears TMDC information.
Definition: TrkReco.cxx:970
const AList< TTrack > & tracks(void) const
returns a list of reconstructed tracks.
void clear(void)
clears all TMDC information.
Definition: TrkReco.cxx:956
const TTrackManager & trackManager(void) const
returns a pointer to TTrackManager.
StatusCode initialize()
Definition: TrkReco.cxx:99
const TFinderBase * confFinder(void) const
returns a pointer to the rphi finder.
const TFinderBase * curlFinder(void) const
returns a pointer to the curl finder.
StatusCode finalize()
Definition: TrkReco.cxx:284
void disp_stat(const char *)
initializes TrkReco.
Definition: TrkReco.cxx:315