FairRoot/PandaRoot
PndTrkCleanup.h
Go to the documentation of this file.
1 #ifndef PndTrkCleanup_H
2 #define PndTrkCleanup_H 1
3 
5 #include "PndTrkConstants.h"
6 
7 // Root includes
8 #include "TROOT.h"
9 
10 
11 class PndTrkCleanup : public TObject
12 {
13 
14 
15  public:
16 
17 
22 
23 
24  bool BadTrack_ParStt(
25  Double_t Oxx,
26  Double_t Oyy,
27  Double_t Rr,
28  Double_t Stawradius,
29  Short_t Charge,
30  Double_t Xcross[2], // Xcross[0]=point of entrance;
31  // Xcross[1]=point of exit.
32  Double_t Ycross[2],
33  Short_t nHits,
34  Short_t* ListHits,
35  Double_t info[][7],
36  int istampa,
37  Double_t cut,
38  Short_t maxnum,
39  Short_t islack// uncertainty allowed as far as
40  // the n. of hits that should be present in a given section of the Stt track.
41  );
42 
43 
44  bool GoodTrack(
45  Double_t info[][7], // input
46  bool farthest_hit_is_boundary, // input
47  Double_t Ox, // input; center of the current track;
48  Double_t Oy, // input; center of the current track;
49  Double_t R, // input; Radius of the current track;
50  Short_t Charge, // input; Charge of the current track;
51  Short_t nHits, // input
52  Short_t* ListHits, // input
53  Short_t *StrawCode, // first straw boundary code (a straw can belong to 2 boundaries);
54  Short_t *StrawCode2,
55  Short_t *TubeID, // input
56  Short_t *nParContiguous, // input
57  Short_t ListParContiguous[][6], // input
58  Double_t *xTube, // input
59  Double_t *yTube, // input
60  Double_t *zTube, // input
61  Double_t *xxyyTube, // input
62 
63  Short_t & holes // input and output
64 
65  );
66 
67 
69  Double_t Xintersect, // input, X position of the point of crossing as calculated from the track trajectory;
70  Double_t Yintersect, // input, Y position of the point of crossing as calculated from the track trajectory;
71  Double_t Zintersect, // input, Z position of the point of crossing as calculated from the track trajectory;
72 
73  Short_t nPixelHitsinTrack, // number of Mvd Pixel hits in this track;
74  Short_t * ListMvdPixelHitsinTrack, // ... and their list;
75  Double_t* XMvdPixel, // list of the X positions of ALL Mvd hits of the event;
76  Double_t* YMvdPixel, // list of the Y positions of ALL Mvd hits of the event;
77  Double_t* ZMvdPixel, // list of the Z positions of ALL Mvd hits of the event;
78  Short_t nStripHitsinTrack, // number of Mvd Strip hits in this track;
79  Short_t * ListMvdStripHitsinTrack, // ... and their list;
80  Double_t* XMvdStrip, // list of the X positions of ALL Mvd hits of the event;
81  Double_t* YMvdStrip, // list of the Y positions of ALL Mvd hits of the event;
82  Double_t* ZMvdStrip // list of the Z positions of ALL Mvd hits of the event;
83  );
84 
85 
87  Double_t ZLayerBegin, // Z of the beginning of the layer (end of layer = + 0.02);
88  Short_t nPixelHitsinTrack, // number of Mvd Pixel hits in this track;
89  Short_t * ListMvdPixelHitsinTrack, // ... and their list;
90  Double_t * XMvdPixel,
91  Double_t * YMvdPixel,
92  Double_t * ZMvdPixel,
93 
94 
95  Short_t nStripHitsinTrack, // number of Mvd Strip hits in this track;
96  Short_t * ListMvdStripHitsinTrack, // ... and their list;
97  Double_t * XMvdStrip,
98  Double_t * YMvdStrip,
99  Double_t * ZMvdStrip,
100 
101  PndTrkCTGeometryCalculations * GeometryCalculator // pointer to
102  // the class doing the geometrical calculations;
103 
104  );
105 
106 
107  bool MvdCleanup(
108  Double_t Ox,
109  Double_t Oy,
110  Double_t R,
111  Double_t fi0,
112  Double_t kappa,
113  Double_t charge,
114  Double_t* XMvdPixel, // list of the X positions of ALL Mvd hits of the event;
115  Double_t* XMvdStrip, // list of the X positions of ALL Mvd hits of the event;
116  Double_t* YMvdPixel, // list of the Y positions of ALL Mvd hits of the event;
117  Double_t* YMvdStrip, // list of the Y positions of ALL Mvd hits of the event;
118  Double_t* ZMvdPixel, // list of the Z positions of ALL Mvd hits of the event;
119  Double_t* ZMvdStrip, // list of the Z positions of ALL Mvd hits of the event;
120  Short_t nPixelHitsinTrack, // number of Mvd Pixel hits in this track;
121  Short_t * ListMvdPixelHitsinTrack,
122  Short_t nStripHitsinTrack, // number of Mvd Strip hits in this track;
123  Short_t * ListMvdStripHitsinTrack,
124  Double_t extra_distance,
125  Double_t extra_distance_Z,
126  PndTrkCTGeometryCalculations* GeomCalculator
127  );
128 
129 
130  bool MvdCleanup_prova(
131  Double_t Ox,
132  Double_t Oy,
133  Double_t R,
134  Double_t fi0,
135  Double_t kappa,
136  Double_t charge,
137  Double_t semiverticalgap,
138  Short_t nMvdHits,
139  PndTrkCTGeometryCalculations* GeomCalculator
140  );
141 
143 
144  // input
145  Short_t nHits,
146  Short_t *ListHits,
147  Double_t info[][7],
148  Double_t RStrawDetInnerParMax,
149 
150  // output
151  Short_t *nInnerHits,
152  Short_t *ListInnerHits,
153  Short_t *nOuterHits,
154  Short_t *ListOuterHits,
155 
156  Short_t *nInnerHitsLeft,
157  Short_t *ListInnerHitsLeft,
158  Short_t *nInnerHitsRight,
159  Short_t *ListInnerHitsRight,
160 
161  Short_t *nOuterHitsLeft,
162  Short_t *ListOuterHitsLeft,
163  Short_t *nOuterHitsRight,
164  Short_t *ListOuterHitsRight
165  );
166 
167 
169 
170  // input
171  Double_t info[][7],
172  Short_t *ListHits,
173  Short_t nHits,
174  Double_t RStrawDetInnerParMax,
175 
176  // output
177 
178  Short_t *ListInnerHitsLeft,
179  Short_t *ListInnerHitsRight,
180  Short_t *ListOuterHitsLeft,
181  Short_t *ListOuterHitsRight,
182  Short_t *nInnerHitsLeft,
183  Short_t *nInnerHitsRight,
184  Short_t *nOuterHitsLeft,
185  Short_t *nOuterHitsRight
186  );
187 
188 
189  bool SttParalCleanup(
190  Double_t ApotemaInnerParMax,
191  Double_t ApotemaMinOuterPar,
192  Short_t Charge,
193  Double_t FI0,
194  Double_t FiLimitAdmissible,
195  Double_t GAP,
196  Double_t info[][7],
197  int istampa,
198  int IVOLTE,
199  Short_t *Listofhits,
200  Short_t nHits,
201  Double_t Oxx,
202  Double_t Oyy,
203  Double_t Rr,
204  Double_t RStrawDetMax, // radius of circle encompassing ALL
205  // the straw detector;
206  Double_t RStrawDetMin,
207  Double_t Start[3],
208  Double_t Strawradius
209  );
210 
211 bool SttSkewCleanup(
212  Double_t ApotemaMaxSkew,
213  Double_t ApotemaMinSkew,
214  Short_t Charge,
215  Double_t cut, // cut distance (in cm).
216  Double_t FI0,
217  Double_t FiLimitAdmissible,
218  Double_t GAP,
219  Double_t info[][7],
220  int istampa,
221  int IVOLTE,
222  Short_t *Listofhits,
223  Short_t maxnum, // max number allowed of failures to pass the cut.
224  int MAXSTTHITS,
225  Short_t nHits,
226  Double_t Oxx,
227  Double_t Oyy,
228  Double_t Rr,
229  Double_t RStrawDetMax,
230  Double_t *S,
231  Double_t Start[3],
232  Double_t Strawradius
233  );
234 
235  bool TrackCleanup(
236  Double_t ApotemaMaxInnerPar,
237  Double_t ApotemaMaxSkew,
238  Double_t ApotemaMinOuterPar,
239  Double_t ApotemaMinSkew,
240  Double_t *auxS,
241  Short_t Charge,
242  Double_t FI0,
243  Double_t GAP,
244  Double_t info[][7],
245  int istampa,
246  int IVOLTE,
247  Double_t KAPPA,
248  Short_t *ListHitsPar,
249  Short_t *ListHitsSkew,
250  int MAXSTTHITS,
251  Short_t nHitsPar, // n. hits parall Stt
252  Short_t nHitsSkew, // n. hits parall Stt
253  Double_t Oxx,
254  Double_t Oyy,
255  Double_t Rr,
256  Double_t RStrawDetMax,
257  Double_t RStrawDetMin,
258  Double_t Start[3],
259  Double_t Strawradius
260  );
261 
262 
263 
264 
265 
267  Double_t Ox, // track trajectory center;
268  Double_t Oy, // track trajectory center;
269  Double_t R, // track trajectory radius;
270  Double_t fi0, // FI0 of the Helix of the particle trajectory;
271  Double_t kappa, // KAPPA of the Helix of the particle trajectory;
272  Double_t charge, // charge of the particle;
273 
274  const Double_t Zlow, // Z low limit of this barrel;
275  const Double_t Zup, // Z upper limit of this barrel;
276  Double_t RBarrel, // R of this barrel at which the intersection of the particle
277  // trajectory is calculated;
278  PndTrkCTGeometryCalculations * GeometryCalculator, // pointer
279  Double_t extra_distance_Z, // in cm; extra distance allowed during decision
280  // if there should be an hit in a Mvd sensitive layer;
281  Double_t &Xintersect, // output, X position of the point of crossing;
282  Double_t &Yintersect, // output, Y position of the point of crossing;
283  Double_t &Zintersect // output, Z position of the point of crossing;
284  );
285 
286 
288 
289 // in this function it is assumed to deal with an Mvd Barrel section composed of an Inner Barrel with
290 // RMin radius and an Outer Barrel with RMax radius.
291 // Both the Inner and Outer Barrel have their own azimuthal (partial) coverage defined by a number of
292 // azimuthal gaps ( ngapInner and ngapOuter respectively, maximum 4 gaps) with a certain range in Fi
293 // defined in the arrays : gap_lowInner - gap_upInner and gap_lowOuter - gap_upOuter respectively;
294 
295  Double_t Ox, // track trajectory center;
296  Double_t Oy, // track trajectory center;
297  Double_t R, // track trajectory radius;
298  Double_t fi0, // FI0 of the Helix of the particle trajectory;
299  Double_t kappa, // KAPPA of the Helix of the particle trajectory;
300  Double_t charge, // charge of the particle;
301 
302  Double_t Zlow, // Z low limit of this barrel;
303  Double_t Zup, // Z upper limit of this barrel;
304 
305 
306 
307  Double_t RInnerBarrel, // R Minimum of this barrel at which the intersection of the particle
308  // trajectory is calculated;
309  int ngapInner, // number of gaps in the azimuthal coverage;
310  const Double_t * gap_lowInner, // array of low limits of the range of the azimuthal gaps (radians);
311  const Double_t * gap_upInner, // array of upper limits of the range of the azimuthal gaps (radians);
312 
313  Double_t ROuterBarrel, // R Minimum of this barrel at which the intersection of the particle
314  // trajectory is calculated;
315  int ngapOuter, // number of gaps in the azimuthal coverage;
316  const Double_t * gap_lowOuter, // array of low limits of the range of the azimuthal gaps (radians);
317  const Double_t * gap_upOuter, // array of upper limits of the range of the azimuthal gaps (radians);
318 
319  PndTrkCTGeometryCalculations * GeometryCalculator, // pointer
320  Double_t extra_distance_Z, // in cm; extra distance allowed during decision
321  // if there should be an hit in a Mvd sensitive layer;
322 
323  Double_t *Xintersect, // output, X position of the point of crossing track-Inner Barrel
324  // and track-Outer Barrel;
325  Double_t *Yintersect, // output, Y position of the point of crossing;
326  Double_t *Zintersect // output, Z position of the point of crossing;
327  );
328 
329 
330 
332  Double_t ZLayerBegin, // Z of the beginning of the layer (end of layer = + 0.02);
333  Double_t xmargin, // safety margin in X coordinate;
334  Double_t ymargin, // safety margin in Y coordinate;
335 
336  Double_t Ox, // track trajectory center;
337  Double_t Oy, // track trajectory center;
338  Double_t R, // track trajectory radius;
339  Double_t fi0, // FI0 of the Helix of the particle trajectory;
340  Double_t kappa, // KAPPA of the Helix of the particle trajectory;
341  Double_t charge, // charge of the particle;
342 
343  PndTrkCTGeometryCalculations * GeometryCalculator // pointer to
344  // the class doing the geometrical calculations;
345  );
346 
347  bool XYCleanup(
348  // general infos about the axial Straws;
349  int istampa,
350  Double_t info[][7],
351  Short_t (*ListParContiguous)[6],
352  Short_t *nParContiguous,
353  Short_t *StrawCode,
354  Short_t *StrawCode2,
355  Short_t *TubeID,
356  Double_t *xTube,
357  Double_t *yTube,
358  Double_t *zTube,
359  Double_t *xxyyTube,
360  // the following are the info of the track under scrutiny;
361  Double_t Ox,
362  Double_t Oy,
363  Double_t R,
364  Short_t Charge,
365  Short_t *ListHits,
366  Short_t nHits,
367  Double_t RStrawDetInnerParMax,
368  Short_t nScitilHitsInTrack, // input, # of SciTil hits in the current track;
369  Short_t* ListSciTilHitsinTrack, // input, list of SciTil hits in the current track;
370  Double_t posizSciTil[][3] // input, info on all the SciTil position;
371  );
372 
373 
375 
376 };
377 
378 #endif
bool SttSkewCleanup(Double_t ApotemaMaxSkew, Double_t ApotemaMinSkew, Short_t Charge, Double_t cut, Double_t FI0, Double_t FiLimitAdmissible, Double_t GAP, Double_t info[][7], int istampa, int IVOLTE, Short_t *Listofhits, Short_t maxnum, int MAXSTTHITS, Short_t nHits, Double_t Oxx, Double_t Oyy, Double_t Rr, Double_t RStrawDetMax, Double_t *S, Double_t Start[3], Double_t Strawradius)
bool IsThereHitInMvdMiniDisk(Double_t ZLayerBegin, Short_t nPixelHitsinTrack, Short_t *ListMvdPixelHitsinTrack, Double_t *XMvdPixel, Double_t *YMvdPixel, Double_t *ZMvdPixel, Short_t nStripHitsinTrack, Short_t *ListMvdStripHitsinTrack, Double_t *XMvdStrip, Double_t *YMvdStrip, Double_t *ZMvdStrip, PndTrkCTGeometryCalculations *GeometryCalculator)
bool Track_Crosses_MvdBarrelPartialAzimuthalCoverage(Double_t Ox, Double_t Oy, Double_t R, Double_t fi0, Double_t kappa, Double_t charge, Double_t Zlow, Double_t Zup, Double_t RInnerBarrel, int ngapInner, const Double_t *gap_lowInner, const Double_t *gap_upInner, Double_t ROuterBarrel, int ngapOuter, const Double_t *gap_lowOuter, const Double_t *gap_upOuter, PndTrkCTGeometryCalculations *GeometryCalculator, Double_t extra_distance_Z, Double_t *Xintersect, Double_t *Yintersect, Double_t *Zintersect)
bool Track_Crosses_MvdMiniDisk_withMargin(Double_t ZLayerBegin, Double_t xmargin, Double_t ymargin, Double_t Ox, Double_t Oy, Double_t R, Double_t fi0, Double_t kappa, Double_t charge, PndTrkCTGeometryCalculations *GeometryCalculator)
timer Start()
void SeparateInnerOuterParallel(Short_t nHits, Short_t *ListHits, Double_t info[][7], Double_t RStrawDetInnerParMax, Short_t *nInnerHits, Short_t *ListInnerHits, Short_t *nOuterHits, Short_t *ListOuterHits, Short_t *nInnerHitsLeft, Short_t *ListInnerHitsLeft, Short_t *nInnerHitsRight, Short_t *ListInnerHitsRight, Short_t *nOuterHitsLeft, Short_t *ListOuterHitsLeft, Short_t *nOuterHitsRight, Short_t *ListOuterHitsRight)
double cut[MAX]
Definition: autocutx.C:36
void SeparateInnerOuterRightLeftAxialStt(Double_t info[][7], Short_t *ListHits, Short_t nHits, Double_t RStrawDetInnerParMax, Short_t *ListInnerHitsLeft, Short_t *ListInnerHitsRight, Short_t *ListOuterHitsLeft, Short_t *ListOuterHitsRight, Short_t *nInnerHitsLeft, Short_t *nInnerHitsRight, Short_t *nOuterHitsLeft, Short_t *nOuterHitsRight)
bool XYCleanup(int istampa, Double_t info[][7], Short_t(*ListParContiguous)[6], Short_t *nParContiguous, Short_t *StrawCode, Short_t *StrawCode2, Short_t *TubeID, Double_t *xTube, Double_t *yTube, Double_t *zTube, Double_t *xxyyTube, Double_t Ox, Double_t Oy, Double_t R, Short_t Charge, Short_t *ListHits, Short_t nHits, Double_t RStrawDetInnerParMax, Short_t nScitilHitsInTrack, Short_t *ListSciTilHitsinTrack, Double_t posizSciTil[][3])
int nHits
Definition: RiemannTest.C:16
Double_t
bool SttParalCleanup(Double_t ApotemaInnerParMax, Double_t ApotemaMinOuterPar, Short_t Charge, Double_t FI0, Double_t FiLimitAdmissible, Double_t GAP, Double_t info[][7], int istampa, int IVOLTE, Short_t *Listofhits, Short_t nHits, Double_t Oxx, Double_t Oyy, Double_t Rr, Double_t RStrawDetMax, Double_t RStrawDetMin, Double_t Start[3], Double_t Strawradius)
bool Track_Crosses_MvdBarrelFullAzimuthalCoverage(Double_t Ox, Double_t Oy, Double_t R, Double_t fi0, Double_t kappa, Double_t charge, const Double_t Zlow, const Double_t Zup, Double_t RBarrel, PndTrkCTGeometryCalculations *GeometryCalculator, Double_t extra_distance_Z, Double_t &Xintersect, Double_t &Yintersect, Double_t &Zintersect)
bool BadTrack_ParStt(Double_t Oxx, Double_t Oyy, Double_t Rr, Double_t Stawradius, Short_t Charge, Double_t Xcross[2], Double_t Ycross[2], Short_t nHits, Short_t *ListHits, Double_t info[][7], int istampa, Double_t cut, Short_t maxnum, Short_t islack)
bool GoodTrack(Double_t info[][7], bool farthest_hit_is_boundary, Double_t Ox, Double_t Oy, Double_t R, Short_t Charge, Short_t nHits, Short_t *ListHits, Short_t *StrawCode, Short_t *StrawCode2, Short_t *TubeID, Short_t *nParContiguous, Short_t ListParContiguous[][6], Double_t *xTube, Double_t *yTube, Double_t *zTube, Double_t *xxyyTube, Short_t &holes)
ClassDef(PndTrkCleanup, 1)
bool IsThereMvdHitInBarrel(Double_t Xintersect, Double_t Yintersect, Double_t Zintersect, Short_t nPixelHitsinTrack, Short_t *ListMvdPixelHitsinTrack, Double_t *XMvdPixel, Double_t *YMvdPixel, Double_t *ZMvdPixel, Short_t nStripHitsinTrack, Short_t *ListMvdStripHitsinTrack, Double_t *XMvdStrip, Double_t *YMvdStrip, Double_t *ZMvdStrip)
bool TrackCleanup(Double_t ApotemaMaxInnerPar, Double_t ApotemaMaxSkew, Double_t ApotemaMinOuterPar, Double_t ApotemaMinSkew, Double_t *auxS, Short_t Charge, Double_t FI0, Double_t GAP, Double_t info[][7], int istampa, int IVOLTE, Double_t KAPPA, Short_t *ListHitsPar, Short_t *ListHitsSkew, int MAXSTTHITS, Short_t nHitsPar, Short_t nHitsSkew, Double_t Oxx, Double_t Oyy, Double_t Rr, Double_t RStrawDetMax, Double_t RStrawDetMin, Double_t Start[3], Double_t Strawradius)
Double_t R
Definition: checkhelixhit.C:61
bool MvdCleanup(Double_t Ox, Double_t Oy, Double_t R, Double_t fi0, Double_t kappa, Double_t charge, Double_t *XMvdPixel, Double_t *XMvdStrip, Double_t *YMvdPixel, Double_t *YMvdStrip, Double_t *ZMvdPixel, Double_t *ZMvdStrip, Short_t nPixelHitsinTrack, Short_t *ListMvdPixelHitsinTrack, Short_t nStripHitsinTrack, Short_t *ListMvdStripHitsinTrack, Double_t extra_distance, Double_t extra_distance_Z, PndTrkCTGeometryCalculations *GeomCalculator)
bool MvdCleanup_prova(Double_t Ox, Double_t Oy, Double_t R, Double_t fi0, Double_t kappa, Double_t charge, Double_t semiverticalgap, Short_t nMvdHits, PndTrkCTGeometryCalculations *GeomCalculator)