ScatteringSurfaces.h
Go to the documentation of this file.
1 ///
2 /// \file ScatteringSurfaces.h
3 /// \brief Construct a set of scattering surfaces for Lutz.
4 /// \author messier@indiana.edu
5 ///
6 #include <vector>
7 namespace geo { class GeometryBase; }
8 namespace bpfit { class Path; }
9 
10 namespace bpfit {
11  ///
12  /// \brief Construct scattering surfaces for Lutz
13  ///
15  public:
16  ///
17  /// \brief Construct tool for building scattering surfaces
18  ///
19  /// \param PDG - Assumed track particle ID (PDG code)
20  /// \param dstol - Largest step size allowed (cm)
21  /// \param dxtol - Largest step size allowed (radiation lengths)
22  /// \param dttol - Largest RMS scatter allowd (cm)
23  ///
24  /// This class will attempt to place scattering surfaces between a
25  /// set of measurement planes. The distance between scattering
26  /// planes will be as large as possible subject to the tolerances
27  /// above:
28  ///
29  /// - No two planes will be allowed to be more than dstol apart
30  /// from each other in units of cm. Typical value dstol = 100 cm
31  ///
32  /// - No two planes will be allowed to be more than dxtol apart
33  /// from each other in units of radiation lengths. Typical value
34  /// dxtol = 2.0
35  ///
36  /// - The predicted RMS scatter between two planes will be kept
37  /// within dttol. That is, the produce of the estimated RMS
38  /// scattering angle of the particle times the step size must be
39  /// smaller than dttol. Typical value dttol = 0.3 cm
40  ///
41  /// The class will try to meet all the criteria above, but it will
42  /// not insert more than one scattering plane between
43  /// measurements.
44  ///
45  /// The class will ensure that at least one scattering plane is
46  /// inserted among the measurements.
47  ///
48  ScatteringSurfaces(int PDG,
49  double dstol,
50  double dxtol,
51  double dttol);
52  ///
53  /// \brief Build scattering surfaces
54  /// \param geo - Detector geometry
55  /// \param p0 - Track start point (x/y/z cm)
56  /// \param p1 - Track end point (x/y/z cm)
57  /// \param s - list of measurement plane locations
58  ///
59  /// All of the measurement planes s are candidates for locations
60  /// of scattering surfaces. In the interests of optimization, some
61  /// surfaces will be dropped if the expected scattering is rather
62  /// small.
63  ///
64  void MakeSurfaces(const geo::GeometryBase& geo,
65  const double* p0,
66  const double* p1,
67  const std::vector<double>& s);
68 
69  ///
70  /// \brief The number of scattering planes constructed
71  ///
72  unsigned int N() const;
73 
74  ///
75  /// \brief The location of the ith scattering plane
76  ///
77  double S(unsigned int i) const;
78 
79  ///
80  /// \brief The predicted RMS scattering angle at plane i
81  ///
82  double SigAlpha(unsigned int i) const;
83 
84  private:
85  void CheckLimits(double* beta, double* p);
86  void ForceOnePlane(const Path& path,
87  const std::vector<double>& s);
88  bool GoodStep(double ds, double dx, double dt);
89  void GetStepData(const Path& path,
90  const std::vector<double>& s,
91  unsigned int i1,
92  unsigned int i2,
93  double* ds,
94  double* smid,
95  double* dx,
96  double* psi,
97  double* dt);
98  unsigned int MakeStep(const Path& path,
99  const std::vector<double>& s,
100  unsigned int i1);
101  void MakeSteps(const Path& path,
102  const std::vector<double>& s);
103  private:
104  unsigned int fPDG; ///< Assumed track PDG code
105  double fdStol; ///< Largest allowed step (cm)
106  double fdXtol; ///< Largest allowed step (rad. len.)
107  double fdTtol; ///< Largest allowed RMS scatter (cm)
108  std::vector<double> fS; ///< Locations of scattering surfaces
109  std::vector<double> fSigAlpha; ///< RMS scattering uncertainties
110  };
111 }
112 ////////////////////////////////////////////////////////////////////////
double fdStol
Largest allowed step (cm)
#define S(x, n)
Construct scattering surfaces for Lutz.
const char * p
Definition: xmltok.h:285
Double_t beta
const XML_Char * s
Definition: expat.h:262
Definition: Cand.cxx:23
double dx[NP][NC]
Track parameters (s, X0, KE, beta, ...) along a particular path in the detector.
Definition: Path.h:18
std::vector< double > fSigAlpha
RMS scattering uncertainties.
A very simple service to remember what detector we&#39;re working in.
const std::string path
Definition: plot_BEN.C:43
unsigned int fPDG
Assumed track PDG code.
double fdXtol
Largest allowed step (rad. len.)
std::vector< double > fS
Locations of scattering surfaces.
The geometry of one entire detector (near, far, ipnd)
Definition: GeometryBase.h:49
double fdTtol
Largest allowed RMS scatter (cm)
Helper for AttenCurve.
Definition: Path.h:10