SphericalShowerFront.h
Go to the documentation of this file.
1 #ifndef _MdGeometryFitterAG_SphericalShowerFront_h_
2 #define _MdGeometryFitterAG_SphericalShowerFront_h_
3 
4 #include <TVector3.h>
5 
6 #include <utl/PhysicalConstants.h>
7 
8 // Model of a shower front as an expanding sphere with the center located one radius away
9 // from the shower core in the direction of the shower axis. The parameters adjusted during the reconstruction
10 // are the axis direction, the arrival time of the shower front at the core position, and (optionally) the radius of curvature.
11 
12 namespace MdGeometryFitterAG {
13 
15 
16  public:
17  SphericalShowerFront(TVector3 axis1, double t01, double radius1, TVector3 core1) : axis(axis1), t0(t01), radius(radius1), core(core1) {}
18 
19  // Calculate the arrival time of the shower front at a given position
20  double operator()(const TVector3 &pos) const {
21 
22  const TVector3 detectorToCore = pos-core; // desired position wrt the core
23  const TVector3 centerToCore = axis*radius; // sphere center wrt the core
24  const TVector3 detectorToCenter = detectorToCore - centerToCore; // position wrt the sphere center
25  const double rDetector = detectorToCenter.Mag(); // distance from position to center
26  const double delay = (rDetector-radius) / utl::kSpeedOfLight; // delay of the front arrival at the detector wrt to the arrival time at the core position
27  const double arrivalTime = t0 + delay; // correct the arrival time with the core time
28 
29  return arrivalTime;
30  }
31 
32  private:
33  TVector3 axis; // shower axis
34  double t0; // arrival time of the sphere at the core
35  double radius; // radius of curvature
36  TVector3 core; // core position
37  };
38 
39 }
40 
41 #endif
42 
43 
44 
SphericalShowerFront(TVector3 axis1, double t01, double radius1, TVector3 core1)
static int delay
Definition: XbAlgo.cc:20
constexpr double kSpeedOfLight
double operator()(const TVector3 &pos) const

, generated on Tue Sep 26 2023.