16 #include <evt/Event.h>
18 #include <fevt/FEvent.h>
20 #include <fevt/Telescope.h>
21 #include <fevt/EyeRecData.h>
22 #include <fevt/TelescopeRecData.h>
23 #include <fevt/FdConstants.h>
25 #include <utl/AugerException.h>
26 #include <utl/ErrorLogger.h>
30 using namespace FdLightCollectionEfficiencyKG;
39 const int verbosity) :
40 fTelRec(telRec), fVerbosity(verbosity)
51 INFO(
"Skipping telescope. No telescope-aperture light trace");
57 std::pair<double, double> startStop
64 pair<double, double> thisStartStop
69 msg <<
"Determined start/stop for light component " << lcIt->GetLabel()
70 <<
": Start=" << thisStartStop.first <<
" End=" << thisStartStop.second;
73 if (thisStartStop.first > startStop.first)
74 startStop.first = thisStartStop.first;
75 if (thisStartStop.second < startStop.second)
76 startStop.second = thisStartStop.second;
81 msg <<
"Determined telescope lc-eff start/stop: Start="
82 << startStop.first <<
" End=" << startStop.second;
90 timeRanges.push_back(startStop);
95 std::pair<double, double>
98 const double effThreshold)
100 const unsigned int nPoints = lcEff.
GetNPoints();
101 unsigned int iStart = 0;
102 for (; iStart < nPoints; ++iStart) {
103 if (lcEff.
GetY(iStart) > effThreshold)
107 int iStop = nPoints-1;
108 for (; iStop > 0; --iStop) {
109 if (lcEff.
GetY(iStop) > effThreshold)
114 const double start = (iStart == 0
115 ? lAtAperture.
GetX(iStart)
116 : (lAtAperture.
GetX(iStart-1) + lAtAperture.
GetX(iStart)) / 2.);
119 const double stop = (iStop == (int)nPoints-1
120 ? lAtAperture.
GetX(iStop)
121 : (lAtAperture.
GetX(iStop+1) + lAtAperture.
GetX(iStop)) / 2.);
123 return std::make_pair(start, stop);
unsigned int GetNPoints() const
const std::list< std::pair< double, double > > & GetSpotFarFromBorderTimeRanges() const
fevt::TelescopeRecData & fTelRec
The depth binning for the profile that's calculated from the GH fit.
#define INFO(message)
Macro for logging informational messages.
boost::transform_iterator< LabeledObjectFunctor, typename MultiObjectContainer::const_iterator, LabeledTabulatedFunctionErrors > ConstIterator
utl::TabulatedFunctionErrors & GetLightFlux(const FdConstants::LightSource source=fevt::FdConstants::eTotal)
Light flux at diaphragm, photons/m^2 versus time in ns.
bool HasLightFlux(const FdConstants::LightSource source=FdConstants::eTotal) const
Check that light profile for source /par source is present.
std::pair< double, double > CalculateStartStopTimes(const utl::TabulatedFunctionErrors &lcEff, const utl::TabulatedFunctionErrors &lAtAperture, const double effThreshold)
Telescope-specific shower reconstruction data.
utl::MultiTabulatedFunctionErrors & GetLightCollectionEfficiency()
Get the light-collection-efficiency multi tabulated function (for various LightSources) ...
A collection of TabulatedFunctionErrors, which provides methods to access different sources...
TimeRangeCalculator(fevt::TelescopeRecData &telRec, const int verbosity=0)
const double & GetY(const unsigned int idx) const
void UpdateSpotFarFromBorderTimes(const double effThreshold)
total (shower and background)
const double & GetX(const unsigned int idx) const
int fVerbosity
global verbosity flag