ShowerSRecData.cc
Go to the documentation of this file.
1 #include <fwk/LocalCoordinateSystem.h>
2 #include <evt/ShowerScintillatorRecData.h>
3 #include <utl/AugerException.h>
4 #include <utl/ErrorLogger.h>
5 #include <utl/TabulatedFunctionErrors.h>
6 #include <utl/Math.h>
7 #include <utl/Deprecator.h>
8 #include <utl/ParameterStorage.h>
9 
10 #include <utl/LameShadowPtr_imp.h>
11 #include <evt/ShowerSRecData.h>
12 
13 
15 
16 
17 using namespace std;
18 using namespace utl;
19 using namespace evt;
20 
21 
22 namespace evt {
23 
24  // static members
25 
26  const double ShowerSRecData::kBary = 0.5;
27  const double ShowerSRecData::kPlaneFitLinear = 1;
28  const double ShowerSRecData::kPlaneFitLinear2 = 1.1;
29  const double ShowerSRecData::kPlaneFit3d = 1.2;
30  const double ShowerSRecData::kLDFEstimate = 2;
31  const double ShowerSRecData::kLDFEstimateAndCurvature = 2.5;
32  const double ShowerSRecData::kLDF = 3;
33  const double ShowerSRecData::kLDFAndCurvature = 3.5;
34  const double ShowerSRecData::kLDFSilents = 4;
35  const double ShowerSRecData::kLDFSilentsAndCurvature = 4.5;
36  const double ShowerSRecData::kLDFGlobalFit = 5;
37  const double ShowerSRecData::kLDFBeta = 0.1;
38  const double ShowerSRecData::kLDFGamma = 0.01;
39  const double ShowerSRecData::kLDFLowerLimit = 0.001;
40 
41 
42  Point
43  ShowerSRecData::GetShowerCenter()
44  const
45  {
46  if (fCurvature)
47  return fCore + fAxis/fCurvature;
48  else
49  return fCore;
50  }
51 
52 
53  void
54  ShowerSRecData::MakeLDF()
55  {
56  if (fLDF)
57  ERROR("LDF exists. Not replacing");
58  else
59  fLDF = new TabulatedFunctionErrors;
60  }
61 
62 
63  void
64  ShowerSRecData::MakeMPDHistogram(const int nBins, const double min, const double max)
65  {
66  fMPDHistogram = new Histogram<double>(nBins, min, max);
67  }
68 
69 
70  void
71  ShowerSRecData::SetAngleErrors(const Vector::Triple& u_v_w,
72  const Vector::Triple& sigma_u2_uv_v2)
73  {
74  PropagateAxisErrors(u_v_w, sigma_u2_uv_v2, fThetaError, fPhiError, fCorrelationThetaPhi);
75  }
76 
77 
78  const char*
80  const
81  {
82  switch (fShowerSizeType) {
83  case eS1000: return "S1000";
84  case eS450: return "S450";
85  case eN19: return "N19";
86  case eS300: return "S300";
87  case eUndefined: return "Undefined";
88  }
89 
90  // never arrive here
91  return "";
92  }
93 
94 
95  void
96  ShowerSRecData::MakeScintillatorRecShower()
97  {
98  if (!fShowerScintillatorRecData)
99  fShowerScintillatorRecData = new ShowerScintillatorRecData();
100  else
101  ERROR("ScintillatorRecShower already exists - Not replacing");
102  }
103 
104 
105  const CoordinateSystemPtr&
106  ShowerSRecData::GetBarycenterCoordinateSystem()
107  const
108  {
109  if (!fBarycenterCoordinateSystem)
110  fBarycenterCoordinateSystem = fwk::LocalCoordinateSystem::Create(fBarycenter);
111  return fBarycenterCoordinateSystem;
112  }
113 
114 
115  const CoordinateSystemPtr&
116  ShowerSRecData::GetCoreCoordinateSystem()
117  const
118  {
119  if (!fCoreCoordinateSystem)
120  fCoreCoordinateSystem = fwk::LocalCoordinateSystem::Create(fCore);
121  return fCoreCoordinateSystem;
122  }
123 
124 
125  const CoordinateSystemPtr&
127  const
128  {
129  if (!fShowerCoordinateSystem) {
130  const auto& coreCS = GetCoreCoordinateSystem();
131  const double theta = GetAxis().GetTheta(coreCS);
132  const double phi = GetAxis().GetPhi(coreCS);
133  fShowerCoordinateSystem = CoordinateSystem::RotationY(theta, CoordinateSystem::RotationZ(phi, coreCS));
134  }
135  return fShowerCoordinateSystem;
136  }
137 
138 }
#define LAMESHADOWPTR_INST(_T_...)
Point object.
Definition: Point.h:32
Interface class to access to the SD Reconstruction of a Shower.
CoordinateSystemPtr GetShowerCoordinateSystem(const double theta, const double phi, const Point &core)
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
#define max(a, b)
boost::tuple< double, double, double > Triple
Coordinate triple for easy getting or setting of coordinates.
Definition: Triple.h:15
void PropagateAxisErrors(const Vector::Triple &u_v_w, const Vector::Triple &sigma_u2_uv_v2, double &thetaError, double &phiError, double &thetaPhiCorrelation)
string GetShowerSizeLabel(const LDFFitConfig &config)
Class to access shower scintillator reconstructed data.
static Policy::type Create(const utl::Point &theOrigin)
Create the standard local coordinate system for a Point.
#define ERROR(message)
Macro for logging error messages.
Definition: ErrorLogger.h:165

, generated on Tue Sep 26 2023.