FdProfileReconstructor.h
Go to the documentation of this file.
1 
9 #ifndef _FdProfileReconstructorKG_FdProfileReconstructor_h_
10 #define _FdProfileReconstructorKG_FdProfileReconstructor_h_
11 
12 #include <deque>
13 #include <vector>
14 #include <map>
15 #include <utl/Vector.h>
16 #include <utl/Point.h>
17 #include <utl/TabulatedFunction.h>
18 #include <utl/PhysicalFunctions.h>
19 
20 #include <fwk/VModule.h>
22 #include "OpticalHalo.h"
23 
24 namespace fevt{
25  class Eye;
26 }
27 namespace evt{
28  class ShowerFRecData;
29 }
30 
31 
32 
33 namespace FdProfileReconstructorKG {
34 
35  class EnergyFitter;
36  class RootCFMatrixOutput;
37 
70 
71  public:
74 
78 
79  // stuff for SuperModule-mode
80  void SetFluorescenceYieldScaleFactor(const double f)
81  { fFfac = f; }
82  void SetCherenkovYieldScaleFactor(const double f)
83  { fCfac = f; }
85  { return fFfac; }
87  { return fCfac; }
88 
89  void SetPropagateGeometryErrors(const bool propagate)
90  { fPropagateGeometryErrors = propagate; }
91  void SetPropagateAtmUncertainties(const bool propagate)
92  { fPropagateAtmUncertainties = propagate; }
94  {return fPropagateGeometryErrors; }
97 
98  void SetInclinedModelDepthBinning(const double dX)
100 
101  void SetYieldRefit(bool what);
102  void SetAlwaysGuessXMaxFromAperture(const bool what)
103  { fAlwaysGuessXMaxFromAperture = what; }
104 
105  void SetVerbosity(const int verbosity)
106  { fVerbosity = verbosity; }
107  void SetEnergyFitterVerbosity(int verbosity);
108  void SetErrorPropagationVerbosity(const int verbosity)
109  { fErrPropVerb = verbosity; }
110  int GetVerbosity() const
111  { return fVerbosity; }
113  { return fErrPropVerb; }
114  int GetEnergyFitterVerbosity() const;
115 
116  private:
117  void InitProfiles(fevt::Eye& eye);
118  bool InitializeAtmosphere(const bool flatEarth,
119  double& minDist,
120  double& maxDist);
121  bool GetShowerFRecData(evt::Event& event, fevt::Eye& eye);
122  bool CalculateProfiles(fevt::Eye& eye);
124  void CalculateDetEff(const fevt::Eye& eye);
125  void AddPointsOutsideFOV();
126  double GuessShowerMaximum(evt::Event& event, const fevt::Eye& eye);
127  void DeleteCFMatrix();
128 
129  // functions used in error propagation
131  void CalculateTotalErrors(fevt::Eye& eye);
132  void SetGeometry(fevt::Eye& eye, double nSigRp, double nSigChi0,
133  double nSigT0, double nSigPhi, double nSigTheta);
134  bool ReFitProfile(fevt::Eye& eye, double nSigRp, double nSigChi0,
135  double nSigT0, double nSigPhi, double nSigTheta,
136  std::vector<std::vector<double> >& results);
137 
139  eX0 = 0,
145  };
146 
147  // options for invisible energy
150 
151  // XML options
152  double fEcut; // lower energy cut off for this calculation
153  int fVerbosity; // controls print level for Profile reconstructor
154  int fErrPropVerb; // controls print level for error propagation
155  int fPropagateGeometryErrors; // geometrical error calculation
156  int fPropagateAtmUncertainties; // atmospheric error calculation
157  int fRescaleErrors; // rescaling errors according to PDG fudge
158  int fmaxErrPropPoints; // max number of points to be used during err. prop.
159  double fCfac; // scale factor for Cherenkov light
160  double fFfac; // scale factor for Fluorescence light
161  double fInclinedModelMaxCosZenith ; // min. angle for inclined profile model
163 
164  // options for lateral shower light width
171 
175 
177 
178  // data members
179  double fXmax; // current guess of shower maximum
180  std::deque<double> fDepth; // vector of slant depths
181  utl::TabulatedFunction fRelEff; // vector of relative detector effs
182  evt::ShowerFRecData* fShowerFRecData; // either global or eye data
183  unsigned int fOutSideFOV; // points outside field of view
184 
185  // current Cherenkov-Fluorescence matrix
187  // Cherenkov-Fluorescence matrix map
188  std::map<int, CherenkovFluorescenceMatrix*> fChFlPtrMap;
189  // vector of geom. track positions
190  std::deque<std::vector<utl::Point> > fTrackPositions;
191 
192  EnergyFitter* fEnergyFitter; // object for GH and energy fitting
193  double fRp; // current Rp
194  double fChi0; // current Chi0
195  double fT0; // current T0
196  utl::Vector fAxis; // current axis
197  utl::Point fCore; // current core
198  bool fErrorCalcMode;// variable to flag error calculation mode
199  std::vector<double> fGeomVariance; // variances of GH parameters and Eem
200  std::vector<double> fAtmVariance; // variances of GH parameters and Eem
201 
202  RootCFMatrixOutput* fRootCFMOutput; // for debugging and visualization
203 
204  REGISTER_MODULE("FdProfileReconstructorKG",FdProfileReconstructor);
205 
206  };
207 }
208 
209 
210 #endif // _FdProfileReconstructorKG_FdProfileReconstructor_h_
211 
CherenkovFluorescenceMatrix::eDirectCherenkovLDF fDirCherLDF
Point object.
Definition: Point.h:32
Fluorescence Detector Eye Event.
Definition: FEvent/Eye.h:29
utl::InvisibleEnergy::ECompositionModel fComposition
Class to hold collection (x,y) points and provide interpolation between them.
bool ReFitProfile(fevt::Eye &eye, double nSigRp, double nSigChi0, double nSigT0, double nSigPhi, double nSigTheta, std::vector< std::vector< double > > &results)
bool InitializeAtmosphere(const bool flatEarth, double &minDist, double &maxDist)
std::deque< std::vector< utl::Point > > fTrackPositions
void SetGeometry(fevt::Eye &eye, double nSigRp, double nSigChi0, double nSigT0, double nSigPhi, double nSigTheta)
fwk::VModule::ResultFlag Run(evt::Event &event)
Run: invoked once per event.
bool GetShowerFRecData(evt::Event &event, fevt::Eye &eye)
Module interface.
Definition: VModule.h:53
fwk::VModule::ResultFlag Init()
Initialize: invoked at beginning of run (NOT beginning of event)
fwk::VModule::ResultFlag Finish()
Finish: invoked at end of the run (NOT end of the event)
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
double GuessShowerMaximum(evt::Event &event, const fevt::Eye &eye)
CherenkovFluorescenceMatrix::eMultipleScatteringLDF fMultScatLDF
Calculation of Cherenkov and Fluorescence matrix.
Vector object.
Definition: Vector.h:30
Interface class to access to Fluorescence reconstruction of a Shower.
CherenkovFluorescenceMatrix::eFluorescenceLDF fFluoLDF
CherenkovFluorescenceMatrix::eScatteredCherenkovLDF fScatCherLDF
REGISTER_MODULE("FdProfileReconstructorKG", FdProfileReconstructor)
module to fit Gaisser-Hillas function to energy deposit profile and to derive total shower energy ...
Definition: EnergyFitter.h:28
std::map< int, CherenkovFluorescenceMatrix * > fChFlPtrMap
utl::InvisibleEnergy::EInteractionModel fInvisibleEnergyModel

, generated on Tue Sep 26 2023.