PandaRoot
PndTrkCleanup.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 #ifndef PndTrkCleanup_H
14 #define PndTrkCleanup_H 1
15 
17 #include "PndTrkConstants.h"
18 
19 // Root includes
20 #include "TROOT.h"
21 
22 class PndTrkCleanup : public TObject {
23 
24  public:
29 
30  bool BadTrack_ParStt(Double_t Oxx, Double_t Oyy, Double_t Rr, Double_t Stawradius, Short_t Charge,
31  Double_t Xcross[2], // Xcross[0]=point of entrance;
32  // Xcross[1]=point of exit.
33  Double_t Ycross[2], Short_t nHits, Short_t *ListHits, Double_t info[][7], int istampa, Double_t cut, Short_t maxnum,
34  Short_t islack // uncertainty allowed as far as
35  // the n. of hits that should be present in a given section of the Stt track.
36  );
37 
38  bool GoodTrack(Double_t info[][7], // input
39  bool farthest_hit_is_boundary, // input
40  Double_t Ox, // input; center of the current track;
41  Double_t Oy, // input; center of the current track;
42  Double_t R, // input; Radius of the current track;
43  Short_t Charge, // input; Charge of the current track;
44  Short_t nHits, // input
45  Short_t *ListHits, // input
46  Short_t *StrawCode, // first straw boundary code (a straw can belong to 2 boundaries);
47  Short_t *StrawCode2,
48  Short_t *TubeID, // input
49  Short_t *nParContiguous, // input
50  Short_t ListParContiguous[][6], // input
51  Double_t *xTube, // input
52  Double_t *yTube, // input
53  Double_t *zTube, // input
54  Double_t *xxyyTube, // input
55 
56  Short_t &holes // input and output
57 
58  );
59 
60  bool IsThereMvdHitInBarrel(Double_t Xintersect, // input, X position of the point of crossing as calculated from the track trajectory;
61  Double_t Yintersect, // input, Y position of the point of crossing as calculated from the track trajectory;
62  Double_t Zintersect, // input, Z position of the point of crossing as calculated from the track trajectory;
63 
64  Short_t nPixelHitsinTrack, // number of Mvd Pixel hits in this track;
65  Short_t *ListMvdPixelHitsinTrack, // ... and their list;
66  Double_t *XMvdPixel, // list of the X positions of ALL Mvd hits of the event;
67  Double_t *YMvdPixel, // list of the Y positions of ALL Mvd hits of the event;
68  Double_t *ZMvdPixel, // list of the Z positions of ALL Mvd hits of the event;
69  Short_t nStripHitsinTrack, // number of Mvd Strip hits in this track;
70  Short_t *ListMvdStripHitsinTrack, // ... and their list;
71  Double_t *XMvdStrip, // list of the X positions of ALL Mvd hits of the event;
72  Double_t *YMvdStrip, // list of the Y positions of ALL Mvd hits of the event;
73  Double_t *ZMvdStrip // list of the Z positions of ALL Mvd hits of the event;
74  );
75 
76  bool IsThereHitInMvdMiniDisk(Double_t ZLayerBegin, // Z of the beginning of the layer (end of layer = + 0.02);
77  Short_t nPixelHitsinTrack, // number of Mvd Pixel hits in this track;
78  Short_t *ListMvdPixelHitsinTrack, // ... and their list;
79  Double_t *XMvdPixel, Double_t *YMvdPixel, Double_t *ZMvdPixel,
80 
81  Short_t nStripHitsinTrack, // number of Mvd Strip hits in this track;
82  Short_t *ListMvdStripHitsinTrack, // ... and their list;
83  Double_t *XMvdStrip, Double_t *YMvdStrip, Double_t *ZMvdStrip,
84 
85  PndTrkCTGeometryCalculations *GeometryCalculator // pointer to
86  // the class doing the geometrical calculations;
87 
88  );
89 
90  bool MvdCleanup(Double_t Ox, Double_t Oy, Double_t R, Double_t fi0, Double_t kappa, Double_t charge,
91  Double_t *XMvdPixel, // list of the X positions of ALL Mvd hits of the event;
92  Double_t *XMvdStrip, // list of the X positions of ALL Mvd hits of the event;
93  Double_t *YMvdPixel, // list of the Y positions of ALL Mvd hits of the event;
94  Double_t *YMvdStrip, // list of the Y positions of ALL Mvd hits of the event;
95  Double_t *ZMvdPixel, // list of the Z positions of ALL Mvd hits of the event;
96  Double_t *ZMvdStrip, // list of the Z positions of ALL Mvd hits of the event;
97  Short_t nPixelHitsinTrack, // number of Mvd Pixel hits in this track;
98  Short_t *ListMvdPixelHitsinTrack,
99  Short_t nStripHitsinTrack, // number of Mvd Strip hits in this track;
100  Short_t *ListMvdStripHitsinTrack, Double_t extra_distance, Double_t extra_distance_Z, PndTrkCTGeometryCalculations *GeomCalculator);
101 
102  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,
103  PndTrkCTGeometryCalculations *GeomCalculator);
104 
106 
107  // input
108  Short_t nHits, Short_t *ListHits, Double_t info[][7], Double_t RStrawDetInnerParMax,
109 
110  // output
111  Short_t *nInnerHits, Short_t *ListInnerHits, Short_t *nOuterHits, Short_t *ListOuterHits,
112 
113  Short_t *nInnerHitsLeft, Short_t *ListInnerHitsLeft, Short_t *nInnerHitsRight, Short_t *ListInnerHitsRight,
114 
115  Short_t *nOuterHitsLeft, Short_t *ListOuterHitsLeft, Short_t *nOuterHitsRight, Short_t *ListOuterHitsRight);
116 
118 
119  // input
120  Double_t info[][7], Short_t *ListHits, Short_t nHits, Double_t RStrawDetInnerParMax,
121 
122  // output
123 
124  Short_t *ListInnerHitsLeft, Short_t *ListInnerHitsRight, Short_t *ListOuterHitsLeft, Short_t *ListOuterHitsRight, Short_t *nInnerHitsLeft, Short_t *nInnerHitsRight,
125  Short_t *nOuterHitsLeft, Short_t *nOuterHitsRight);
126 
127  bool SttParalCleanup(Double_t ApotemaInnerParMax, Double_t ApotemaMinOuterPar, Short_t Charge, Double_t FI0, Double_t FiLimitAdmissible, Double_t GAP, Double_t info[][7],
128  int istampa, int IVOLTE, Short_t *Listofhits, Short_t nHits, Double_t Oxx, Double_t Oyy, Double_t Rr,
129  Double_t RStrawDetMax, // radius of circle encompassing ALL
130  // the straw detector;
131  Double_t RStrawDetMin, Double_t Start[3], Double_t Strawradius);
132 
133  bool SttSkewCleanup(Double_t ApotemaMaxSkew, Double_t ApotemaMinSkew, Short_t Charge,
134  Double_t cut, // cut distance (in cm).
135  Double_t FI0, Double_t FiLimitAdmissible, Double_t GAP, Double_t info[][7], int istampa, int IVOLTE, Short_t *Listofhits,
136  Short_t maxnum, // max number allowed of failures to pass the cut.
137  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);
138 
139  bool TrackCleanup(Double_t ApotemaMaxInnerPar, Double_t ApotemaMaxSkew, Double_t ApotemaMinOuterPar, Double_t ApotemaMinSkew, Double_t *auxS, Short_t Charge, Double_t FI0,
140  Double_t GAP, Double_t info[][7], int istampa, int IVOLTE, Double_t KAPPA, Short_t *ListHitsPar, Short_t *ListHitsSkew, int MAXSTTHITS,
141  Short_t nHitsPar, // n. hits parall Stt
142  Short_t nHitsSkew, // n. hits parall Stt
143  Double_t Oxx, Double_t Oyy, Double_t Rr, Double_t RStrawDetMax, Double_t RStrawDetMin, Double_t Start[3], Double_t Strawradius);
144 
145  bool Track_Crosses_MvdBarrelFullAzimuthalCoverage(Double_t Ox, // track trajectory center;
146  Double_t Oy, // track trajectory center;
147  Double_t R, // track trajectory radius;
148  Double_t fi0, // FI0 of the Helix of the particle trajectory;
149  Double_t kappa, // KAPPA of the Helix of the particle trajectory;
150  Double_t charge, // charge of the particle;
151 
152  const Double_t Zlow, // Z low limit of this barrel;
153  const Double_t Zup, // Z upper limit of this barrel;
154  Double_t RBarrel, // R of this barrel at which the intersection of the particle
155  // trajectory is calculated;
156  PndTrkCTGeometryCalculations *GeometryCalculator, // pointer
157  Double_t extra_distance_Z, // in cm; extra distance allowed during decision
158  // if there should be an hit in a Mvd sensitive layer;
159  Double_t &Xintersect, // output, X position of the point of crossing;
160  Double_t &Yintersect, // output, Y position of the point of crossing;
161  Double_t &Zintersect // output, Z position of the point of crossing;
162  );
163 
165 
166  // in this function it is assumed to deal with an Mvd Barrel section composed of an Inner Barrel with
167  // RMin radius and an Outer Barrel with RMax radius.
168  // Both the Inner and Outer Barrel have their own azimuthal (partial) coverage defined by a number of
169  // azimuthal gaps ( ngapInner and ngapOuter respectively, maximum 4 gaps) with a certain range in Fi
170  // defined in the arrays : gap_lowInner - gap_upInner and gap_lowOuter - gap_upOuter respectively;
171 
172  Double_t Ox, // track trajectory center;
173  Double_t Oy, // track trajectory center;
174  Double_t R, // track trajectory radius;
175  Double_t fi0, // FI0 of the Helix of the particle trajectory;
176  Double_t kappa, // KAPPA of the Helix of the particle trajectory;
177  Double_t charge, // charge of the particle;
178 
179  Double_t Zlow, // Z low limit of this barrel;
180  Double_t Zup, // Z upper limit of this barrel;
181 
182  Double_t RInnerBarrel, // R Minimum of this barrel at which the intersection of the particle
183  // trajectory is calculated;
184  int ngapInner, // number of gaps in the azimuthal coverage;
185  const Double_t *gap_lowInner, // array of low limits of the range of the azimuthal gaps (radians);
186  const Double_t *gap_upInner, // array of upper limits of the range of the azimuthal gaps (radians);
187 
188  Double_t ROuterBarrel, // R Minimum of this barrel at which the intersection of the particle
189  // trajectory is calculated;
190  int ngapOuter, // number of gaps in the azimuthal coverage;
191  const Double_t *gap_lowOuter, // array of low limits of the range of the azimuthal gaps (radians);
192  const Double_t *gap_upOuter, // array of upper limits of the range of the azimuthal gaps (radians);
193 
194  PndTrkCTGeometryCalculations *GeometryCalculator, // pointer
195  Double_t extra_distance_Z, // in cm; extra distance allowed during decision
196  // if there should be an hit in a Mvd sensitive layer;
197 
198  Double_t *Xintersect, // output, X position of the point of crossing track-Inner Barrel
199  // and track-Outer Barrel;
200  Double_t *Yintersect, // output, Y position of the point of crossing;
201  Double_t *Zintersect // output, Z position of the point of crossing;
202  );
203 
204  bool Track_Crosses_MvdMiniDisk_withMargin(Double_t ZLayerBegin, // Z of the beginning of the layer (end of layer = + 0.02);
205  Double_t xmargin, // safety margin in X coordinate;
206  Double_t ymargin, // safety margin in Y coordinate;
207 
208  Double_t Ox, // track trajectory center;
209  Double_t Oy, // track trajectory center;
210  Double_t R, // track trajectory radius;
211  Double_t fi0, // FI0 of the Helix of the particle trajectory;
212  Double_t kappa, // KAPPA of the Helix of the particle trajectory;
213  Double_t charge, // charge of the particle;
214 
215  PndTrkCTGeometryCalculations *GeometryCalculator // pointer to
216  // the class doing the geometrical calculations;
217  );
218 
219  bool XYCleanup(
220  // general infos about the axial Straws;
221  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,
222  Double_t *yTube, Double_t *zTube, Double_t *xxyyTube,
223  // the following are the info of the track under scrutiny;
224  Double_t Ox, Double_t Oy, Double_t R, Short_t Charge, Short_t *ListHits, Short_t nHits, Double_t RStrawDetInnerParMax,
225  Short_t nScitilHitsInTrack, // input, # of SciTil hits in the current track;
226  Short_t *ListSciTilHitsinTrack, // input, list of SciTil hits in the current track;
227  Double_t posizSciTil[][3] // input, info on all the SciTil position;
228  );
229 
231 };
232 
233 #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)
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)
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])
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)
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)