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