BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/TrkReco/TrkReco/TBuilder0.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// $Id: TBuilder0.h,v 1.6 2010/03/31 09:58:59 liucy Exp $
3//-----------------------------------------------------------------------------
4// Filename : TBuilder0.h
5// Section : Tracking
6// Owner : Yoshi Iwasaki
7// Email : [email protected]
8//-----------------------------------------------------------------------------
9// Description : A class to build a track.
10// See http://bsunsrv1.kek.jp/~yiwasaki/tracking/
11//-----------------------------------------------------------------------------
12
13#ifndef TBuilder0_FLAG_
14#define TBuilder0_FLAG_
15
16#ifdef TRKRECO_DEBUG_DETAIL
17#ifndef TRKRECO_DEBUG
18#define TRKRECO_DEBUG
19#endif
20#endif
21
22#include <string>
23
24#define HEP_SHORT_NAMES
25#include "CLHEP/Alist/AList.h"
26#include "TrkReco/TMSelector.h"
27#include "TrkReco/THelixFitter.h"
28#include "TrkReco/TCosmicFitter.h"
29
30class TTrack;
31class TMLink;
32class TSegment;
33
34/// A class to build a track.
35class TBuilder0 {
36
37 public:
38 /// Constructor.
39 TBuilder0(const std::string & name);
40
41 /// Constructor with salvage level.
42 TBuilder0(const std::string & name,
43 float salvageLevel);
44
45 /// Constructor with parameters.
46 TBuilder0(const std::string & name,
47 float stereoZ3,
48 float stereoZ4,
49 float stereoChisq3,
50 float stereoChisq4,
51 float stereoMaxSigma,
52 unsigned fittingCorrections,
53 float salvageLevel);
54
55 /// Destructor
56 virtual ~TBuilder0();
57
58 public:// Selectors
59 /// returns name.
60 const std::string & name(void) const;
61
62 /// dumps debug information.
63 void dump(const std::string & message = std::string(""),
64 const std::string & prefix = std::string("")) const;
65
66 /// returns a track selector.
67 const TMSelector & trackSelector(void) const;
68
69 /// builds a r/phi track from TMLinks or from Segments.
70 TTrack * buildRphi(const AList<TMLink> &) const;
71
72 /// appends stereo hits to a track. (old version)
73 TTrack * buildStereo0(TTrack & track, const AList<TMLink> &) const;
74
75 /// appends stereo hits to a track.
76 virtual TTrack * buildStereo(TTrack & track, const AList<TMLink> &) const;
77
78 /// appends TMLinks in a list.
79 void appendClusters(TTrack & track, const AList<TMLink> &) const;
80
81 /// salvages links in a list. Used links will be removed from a list.
82 void salvage(TTrack & track, AList<TMLink> & list) const;
83
84 /// fits a track using a private fitter.
85 virtual int fit(TTrackBase &) const;
86
87 public:// Modifiers
88 /// sets a track selector.
89 virtual const TMSelector & trackSelector(const TMSelector &);
90
91 private://
92 void selectHits(AList<TMLink> & list) const;
93 // -50:bad consective, -20:not consective, -1:not in the same layer, 0:consective and chrg<=0, 1:consective and chrg>0
94 int consectiveHits(TMLink &l, TMLink & s, int ichg) const;
95 int check2CnHits(TMLink &l, TMLink & s, int ichg) const;
96 int checkHits(unsigned i, unsigned j, unsigned k) const;
97 void salvageNormal(TTrack & track, AList<TMLink> & list) const;
98
99 private:
100 std::string _name;
101// THelixFitter _fitter;
102 TCosmicFitter _fitter;
103 double _salvageLevel;
104
105 protected:// for buildRphi
108
109 protected:// for buildStereo
116};
117
118//-----------------------------------------------------------------------------
119
120#ifdef TBuilder0_NO_INLINE
121#define inline
122#else
123#undef inline
124#define TBuilder0_INLINE_DEFINE_HERE
125#endif
126
127#ifdef TBuilder0_INLINE_DEFINE_HERE
128
129inline
130const TMSelector &
132 return _trackSelector;
133}
134
135inline
136const std::string &
137TBuilder0::name(void) const {
138 return _name;
139}
140
141inline
142int
144 return _fitter.fit(a);
145}
146
147#endif
148
149#undef inline
150
151#endif /* TBuilder0_FLAG_ */
XmlRpcServer s
Definition: HelloServer.cpp:11
TTrack * buildRphi(const AList< TMLink > &) const
builds a r/phi track from TMLinks or from Segments.
Definition: TBuilder0.cxx:83
const TMSelector & trackSelector(void) const
returns a track selector.
virtual ~TBuilder0()
Destructor.
Definition: TBuilder0.cxx:75
TTrack * buildStereo0(TTrack &track, const AList< TMLink > &) const
appends stereo hits to a track. (old version)
Definition: TBuilder0.cxx:307
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
Definition: TBuilder0.cxx:79
const std::string & name(void) const
returns name.
virtual TTrack * buildStereo(TTrack &track, const AList< TMLink > &) const
appends stereo hits to a track.
Definition: TBuilder0.cxx:535
void salvage(TTrack &track, AList< TMLink > &list) const
salvages links in a list. Used links will be removed from a list.
Definition: TBuilder0.cxx:1479
virtual int fit(TTrackBase &) const
fits a track using a private fitter.
void appendClusters(TTrack &track, const AList< TMLink > &) const
appends TMLinks in a list.
Definition: TBuilder0.cxx:1417
A class to fit a TTrackBase object to a helix.
int fit(TTrackBase &) const
A class to select a TTrackBase object.
A class to relate TMDCWireHit and TTrack objects.
A virtual class for a track class in tracking.
A class to represent a track in tracking.