SdCompositionParameters.h
Go to the documentation of this file.
1 #ifndef _SdCompParam_SdCompositionParameters_h_
2 #define _SdCompParam_SdCompositionParameters_h_
3 
4 // Offline headers
5 #include <fwk/VModule.h>
6 #include <evt/Event.h>
7 #include <sevt/SEvent.h>
8 #include <sevt/Station.h>
9 #include <sevt/StationConstants.h>
10 
11 // ROOT headers
12 #include <TGraphErrors.h>
13 #include <TF1.h>
14 
15 // Standard c++ headers
16 #include <vector>
17 
18 
19 namespace SdCompParam {
20 
22  unsigned int fStationId;
23  double fCorrRisetime;
25  double fDistance;
27  double fSecZenith;
29  double fSignal;
30  unsigned short fRejectCode;
34  };
35 
36 
40 
41  std::vector<StationSdParameterData*> fStationData;
42  double fFitPar0;
43  double fFitPar1;
44  double fRisetime1000;
48  double fXmax;
49  double fXmaxErrorUp;
51  };
52 
53 
54  struct DeltaResults {
55  DeltaResults();
56  ~DeltaResults();
57 
58  std::vector<StationSdParameterData*> fStationData;
59  double Delta;
60  };
61 
62 
87 
88  public:
90  virtual ~SdCompositionParameters();
91 
92  // Init, Run, and Finish functions
96 
97  // Static public members for access outside this module
98  static double fgRisetime;
99  static double fgRisetimeError;
100  static double fgRisetimeReducedChi2;
103 
104  protected:
105  // Variables read from the xml file to configure the
106  // risetime recalculation (if used)
109 
110  private:
111  // Calculate the Risetime and return that value
112  double FitEventRiseTime(evt::Event& event);
113  double RecalculateRiseTime(sevt::Station& station);
115 
116  // Variables used for the riestime fit
117  TFormula* fRTWeights;
118  TFormula* fRTErrorFunc;
119  unsigned int fRejectedStations;
120  unsigned int fRTRejectedStations;
121  unsigned int fLDFRejectedStations;
122 
123  // Variables read from the xml file to configure the risetime routines
124  float fMinimumSignalForRiseTimeFit; //Signal size in VEM
125  float fMinimumDistanceForRiseTimeFit; //Distance in meters
126  float fMaximumDistanceForRiseTimeFit; //Distance in meters
127  float fDistanceToInterpolateFitResult; //Distance in meters to evaluate the fit at
128  bool fIncludeSaturatedForRiseTimeFit; //True or False
130  bool fForceRiseTimeRecalculation; //Don't trust others to calculate it
131  char* fRTWeightingFunction; //Function describing the
132  //weight as a function of distance/signal size
138 
141  double LeedsDeltaCalculation(evt::Event& event);
142  double LDFParametersCalculation(evt::Event& event);
143  double PhotonEnergyCalculation(evt::Event& event, double E_hadron, double secZenith);
144  bool RTCandidateFlag(evt::Event& event, int saturationflag, double distance, bool usest, double rtcorr, double signal);
145  bool SbCandidateFlag(int saturationflag, double distance, bool sat1000);
146  bool SelectionDeltaRiseTime(int nst, double hadrenergy, bool doAltSel);
147  bool SelectionRiseTime1000(int nst, int nstClose, double hadrenergy, bool doAltSel);
148  bool SelectionLDFPar(int nst, evt::Event& event);
149  int SaturationFlag(sevt::Station& station);
171  bool fCut1000;
172  TFormula* fRTBenchmark;
179  double secZenith;
180  double recEnergy;
181  // Derived variables
183 
184  REGISTER_MODULE("SdCompositionParameters", SdCompositionParameters);
185 
186  };
187 
188 }
189 
190 
191 #endif
bool SelectionRiseTime1000(int nst, int nstClose, double hadrenergy, bool doAltSel)
std::vector< StationSdParameterData * > fStationData
double LDFParametersCalculation(evt::Event &event)
REGISTER_MODULE("SdCompositionParameters", SdCompositionParameters)
fwk::VModule::ResultFlag Run(evt::Event &theEvent)
Run: invoked once per event.
class to hold data at Station level
std::vector< StationSdParameterData * > fStationData
double PhotonEnergyCalculation(evt::Event &event, double E_hadron, double secZenith)
fwk::VModule::ResultFlag Init()
Initialize: invoked at beginning of run (NOT beginning of event)
bool SelectionDeltaRiseTime(int nst, double hadrenergy, bool doAltSel)
Module interface.
Definition: VModule.h:53
sevt::StationConstants::SignalComponent fComponent
double RecalculateRiseTime(sevt::Station &station)
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
bool RTCandidateFlag(evt::Event &event, int saturationflag, double distance, bool usest, double rtcorr, double signal)
bool SelectionLDFPar(int nst, evt::Event &event)
This module calculates composition sensitive variables for an event. Included are risetime at 1000m...
static SdCompositionParameterResults * fgCompositionParameterResults
fwk::VModule::ResultFlag Finish()
Finish: invoked at end of the run (NOT end of the event)
bool SbCandidateFlag(int saturationflag, double distance, bool sat1000)

, generated on Tue Sep 26 2023.