BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
TCurlFinder.h
Go to the documentation of this file.
1#ifndef TCURLFINDER_FLAG_
2#define TCURLFINDER_FLAG_
3
4#ifdef TRKRECO_DEBUG_DETAIL
5#ifndef TRKRECO_DEBUG
6#define TRKRECO_DEBUG
7#endif
8#endif
9#define HEP_SHORT_NAMES
10#include "CLHEP/Matrix/DiagMatrix.h"
11
12#include "TrkReco/TFinderBase.h"
14#include "TrkReco/TMSelector.h"
16
17using CLHEP::HepDiagMatrix;
18
19class TMDCWire;
20class TMLink;
21class TTrack;
22class TMDCWireHit;
23class TCircle;
24class TSegmentCurl;
25
26class TCurlFinder : public TFinderBase {
27
28public:
29 TCurlFinder(void);
30 ~TCurlFinder(void);
31 std::string name(void) const;
32 std::string version(void) const;
33
34 TCurlFinder(const unsigned min_segment,
35 const unsigned min_salvage,
36 const double bad_distance_for_salvage,
37 const double good_distance_for_salvage,
38 const unsigned min_sequence,
39 const unsigned min_fullwire,
40 const double range_for_axial_search,
41 const double range_for_stereo_search,
42 const unsigned superlayer_for_stereo_search,
43 const double range_for_axial_last2d_search,
44 const double range_for_stereo_last2d_search,
45 const double trace2d_distance,
46 const double trace2d_first_distance,
47 const double trace3d_distance,
48 const unsigned determine_one_track,
49 const double selector_max_impact,
50 const double selector_max_sigma,
51 const double selector_strange_pz,
52 const double selector_replace_dz,
53 const unsigned stereo_2dfind,
54 const unsigned merge_exe,
55 const double merge_ratio,
56 const double merge_z_diff,
57 const double mask_distance,
58 const double ratio_used_wire,
59 const double range_for_stereo1,
60 const double range_for_stereo2,
61 const double range_for_stereo3,
62 const double range_for_stereo4,
63 const double range_for_stereo5,
64 const double range_for_stereo6,
65 const double z_cut,
66 const double z_diff_for_last_attend,
67 const unsigned svd_reconstruction,
68 const double min_svd_electrons,
69 const unsigned on_correction,
70 const unsigned output_2dtracks,
71 const unsigned curl_version,
72 //jialk
73 const double minimum_seedLength,
74 const double minimum_2DTrackLength,
75 const double minimum_3DTrackLength,
76 const double minimum_closeHitsLength,
77 const double MIN_RADIUS_OF_STRANGE_TRACK,
78 const double ULTIMATE_MIN_RADIUS_OF_STRANGE_TRACK);
79
80
81 /// main function
82 int doit(const AList<TMDCWireHit> & axialHits,
83 const AList<TMDCWireHit> & stereoHits,
84 AList<TTrack> & tracks,
85 AList<TTrack> & tracks2D);
86
87 /// cleans all members of this class
88 void clear(void);
89
90private:
91 IMagneticFieldSvc* m_pmgnIMF;
92 /// Utility Section
93 double distance(const double, const double) const;
94 unsigned offset(const unsigned) const;
95 unsigned layerId(const double &) const;
96 unsigned maxLocalLayerId(const unsigned) const;
97 int nextSuperAxialLayerId(const unsigned, const int) const;
98 int nextSuperStereoLayerId(const unsigned, const int) const;
99 void makeList(AList<TMLink>&, const AList<TSegmentCurl>&, const AList<TMLink>&);
100 void makeList(AList<TMLink>&, const AList<TMLink>&, const AList<TMLink>&);
101 unsigned nAxialHits(const double&) const;
102
103 /// Sub Main Section #1
104 void makeWireHitsListsSegments(const AList<TMDCWireHit>&, const AList<TMDCWireHit>&);
105
106 /// Sub Main Section #2
107 int checkSortSegments(void);
108
109 /// Sub Main Section #3
110 void makeCurlTracks(AList<TTrack> &tracks,
111 AList<TTrack> &tracks2D);
112
113 /// Utility of #1
114 void linkNeighboringWires(AList<TMLink>*, const unsigned);
115 void setNeighboringWires(TMLink*, const TMLink*);
116 void createSuperLayer(void);
117 void createSegments(AList<TMLink>&);
118 void searchSegment(TMLink*, AList<TMLink>&, AList<TMLink>&, TSegmentCurl*);
119 TMLink * findLink(const TMLink*, const AList<TMLink>&);
120
121 /// Utility of #2
122 void checkExceptionalSegmentsType01(void);
123 void checkExceptionalSegmentsType02(void);
124 void checkExceptionalSegmentsType03(void);
125
126 /// Utility of #3
127 /// 3D Track
128 TTrack * make3DTrack(const TCircle*);
129 TTrack * make3DTrack(const TCircle*, AList<TSegmentCurl>&);
130 void findCloseHits(AList<TMLink>&, TTrack&, AList<TMLink>&);
131 void salvage3DTrack(TTrack*, bool = true);
132 TTrack* merge3DTrack(TTrack*, AList<TTrack>&);
133 bool check3DTrack(TTrack*);
134 int trace3DTrack(TTrack*);
135 void mask3DTrack(TTrack*, AList<TMLink>&);
136 void assignTracks(void);
137 void checkRelation(AList<TTrack>&);
138 void check2DTracks(void);
139
140 /// 2D Track
141 TCircle * make2DTrack(const AList<TMLink>&, const AList<TSegmentCurl>&, const unsigned);
142 void searchAxialCand(AList<TMLink>&, const AList<TMLink>&, const TCircle*,
143 const int, const unsigned, const double);
144 void searchStereoCand(AList<TMLink>&, const AList<TMLink>&, const TCircle*,
145 const int, const unsigned, const double);
146 unsigned searchHits(const TMLink*, const TCircle*, const double) const;
147 unsigned searchHits(AList<TMLink>&, const AList<TMLink>&, const TCircle*, const double) const;
148 unsigned checkAppendHits(const AList<TMLink>&, AList<TMLink>&) const;
149 double distance(const TTrack&, const TMLink&) const;
150 int trace2DTrack(TCircle*);
151 bool check2DCircle(TCircle*);
152 TCircle * dividing2DTrack(TCircle*);
153 bool fitWDD(TCircle&,double&,int&) const;
154 void removeStereo(TCircle&) const;
155
156 /// MC
157 int makeWithMC(const AList<TMDCWireHit>&, const AList<TMDCWireHit>&,AList<TTrack>&);
158
159 /// Plot
160 void makeCdcFrame(void);
161 void plotSegment(const AList<TMLink>&, const int flag = 1);
162 void plotCircle(const TCircle&, const int flag = 1);
163 void plotTrack(const TTrack&, const int flag = 1);
164 void writeSegment(const AList<TMLink>&, const int type = 0);
165
166 /// Dump
167 void dumpType1(TTrack*);
168 void dumpType2(TTrack*);
169
170 AList<TMLink> m_unusedAxialHitsOriginal;
171 AList<TMLink> m_unusedAxialHits;
172 AList<TMLink> m_allAxialHitsOriginal;
173
174 AList<TMLink> m_unusedStereoHitsOriginal;
175 AList<TMLink> m_unusedStereoHits;
176 AList<TMLink> m_allStereoHitsOriginal;
177
178 AList<TMLink> m_removedHits;
179
180 AList<TCircle> m_circles;
181 AList<TCircle> m_allCircles;
182 AList<TTrack> m_tracks;
183 AList<TTrack> m_allTracks;
184 AList<TTrack> m_svdTracks;
185 AList<TTrack> m_2dTracks;
186
187 AList<TMDCWireHit> m_hitsOnInnerSuperLayer;
188
189//Liuqg
190 AList<TMLink> m_unusedAxialHitsOnEachLayer[19]; //origin is 32
191 AList<TMLink> m_unusedStereoHitsOnEachLayer[24]; //origin is 18
192 AList<TMLink> m_unusedAxialHitsOnEachSuperLayer[5]; //origin is 6
193 AList<TMLink> m_unusedStereoHitsOnEachSuperLayer[6]; //origin is 5
194 AList<TSegmentCurl> m_segmentList;
195
196 TCurlFinderParameter m_param;
197
198 TBuilderCurl m_builder;
199 TMSelector m_trackSelector;
200
201 THelixFitter m_fitter;
202
203 //for debug
204 void debugCheckSegments0(void);
205 void debugCheckSegments1(void);
206 void debugCheckSegments2(void);
207 void debugCheckSegments(const double localId, const double layerId,
208 const double localId2,const double layerId2);
209
210 bool m_debugCdcFrame;
211 int m_debugPlotFlag;
212 int m_debugFileNumber;
213};
214
215#endif /* TCURLFINDER_FLAG_ */
void makeList(AList< TMLink > &layer, AList< TMLink > &list, double q, int border, int checkB, TMLink *layer0)
A class to build a Curl track.
Definition: TBuilderCurl.h:54
A class to represent a circle in tracking.
Definition: TCircle.h:42
std::string name(void) const
returns name.
int doit(const AList< TMDCWireHit > &axialHits, const AList< TMDCWireHit > &stereoHits, AList< TTrack > &tracks, AList< TTrack > &tracks2D)
main function
std::string version(void) const
returns version.
~TCurlFinder(void)
void clear(void)
cleans all members of this class
TCurlFinder(void)
Definition: TCurlFinder.cxx:43
A virtual class for a track finder in tracking.
Definition: TFinderBase.h:31
A class to fit a TTrackBase object to a helix.
Definition: THelixFitter.h:48
A class to represent a wire in MDC.
Definition: TMDCWire.h:55
A class to select a TTrackBase object.
Definition: TMSelector.h:32
A class to represent a track in tracking.
Definition: TTrack.h:129