1 #ifndef JSHOWERENERGYPREFIT_INCLUDE
2 #define JSHOWERENERGYPREFIT_INCLUDE
59 namespace JRECONSTRUCTION {}
60 namespace JPP {
using namespace JRECONSTRUCTION; }
62 namespace JRECONSTRUCTION {
79 using JRegressor_t::operator();
95 const std::string pdfFile,
124 const double chi2 = std::numeric_limits<double>::max())
135 operator bool()
const
137 return chi2 != std::numeric_limits<double>::max();
166 for (JEvt::const_iterator shower = in.begin(); shower != in.end(); ++shower) {
177 for (JDataL0_t::const_iterator i = dataL0.begin(); i != dataL0.end(); ++i) {
180 top.insert(i->getPMTIdentifier());
186 for (JDetector::const_iterator module = subdetector.begin(); module != subdetector.end(); ++module) {
188 for (
size_t i = 0; i != module->size(); ++i) {
198 const int NDF = data.size() - 1;
207 for (
int i = 0; i !=
N; ++i) {
217 for (
int i = 0; i !=
N; ++i) {
221 result[i].
chi2 = (*this)(result[i].
x, data.begin(), data.end());
225 if (result[i].chi2 < result[j].chi2) {
235 result[4] = result[1];
236 result[2] =
JResult(0.5 * (result[0].x + result[4].x));
240 result[4] = result[2];
241 result[2] = result[1];
245 result[0] = result[1];
246 result[4] = result[3];
250 result[0] = result[2];
251 result[2] = result[3];
255 result[0] = result[3];
256 result[2] =
JResult(0.5 * (result[0].x + result[4].x));
260 result[1] =
JResult(0.5 * (result[0].x + result[2].x));
261 result[3] =
JResult(0.5 * (result[2].x + result[4].x));
263 }
while (result[4].x - result[0].x >
resolution);
266 if (result[1].chi2 != result[3].chi2) {
268 result[2].
x += 0.25 * (result[3].
x - result[1].
x) * (result[1].chi2 - result[3].chi2) / (result[1].
chi2 + result[3].
chi2 - 2*result[2].
chi2);
270 result[2].
chi2 = (*this)(result[2].
x, data.begin(), data.end());
275 const double E = result[2].
x.
getE();
277 JShower3E sh_fit(sh.getPosition(), sh.getDirection(), sh.getT(),
E);
282 shower->getNDF(), sh_fit.getE()));
static int debug
debug level (default is off).
Template definition of a data regressor of given model.
double getE() const
Get energy.
JRegressor< JEnergy, JSimplex > JRegressor_t
Algorithms for hit clustering and sorting.
Template specialisation of L0 builder for JHitL0 data type.
static double Vmax_npe
Maximal integral of PDF [npe].
JEvt operator()(const KM3NETDAQ::JDAQEvent &event, const JFIT::JEvt &in)
Declaration of the member function that actually performs the reconstruction.
const JSummaryRouter & summary
Data structure for vertex fit.
Router for direct addressing of module data in detector data structure.
Data structure for fit parameters.
double getRate() const
Get default rate.
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
Basic data structure for time and time over threshold information of hit.
static const int JSHOWERENERGYPREFIT
Data structure for detector geometry and calibration.
JResult(const JEnergy &x=0.0, const double chi2=std::numeric_limits< double >::max())
Constructor.
Basic data structure for L0 hit.
Auxiliary class to extract a subset of optical modules from a detector.
Auxiliary class for energy estimation.
class to handle the third step of the shower reconstruction, mainly dedicated for ORCA ...
JDirection3D getDirection(const Vec &dir)
Get direction.
JPosition3D getPosition(const Vec &pos)
Get position.
JShowerEnergyPrefit(const JShowerEnergyPrefitParameters_t ¶meters, const JModuleRouter &router, const JSummaryRouter &summary, const std::string pdfFile, const int debug=0)
Parameterized constructor.
static JTimeRange T_ns
Time window with respect to Cherenkov hypothesis [ns].
Router for fast addressing of summary data in JDAQSummaryslice data structure as a function of the op...
Detector subset without binary search functionality.
JFit getFit(const JHistory &history, const JTrack3D &track, const double Q, const int NDF, const double energy=0.0, const int status=0)
Get fit.
Reduced data structure for L1 hit.
const JClass_t & getReference() const
Get reference to object.
Data regression method for JFIT::JShower3EZ only focused on the energy estimation from a bright point...
Data structure for set of track fit results.
Simple fit method based on Powell's algorithm, see reference: Numerical Recipes in C++...
Auxiliary class for simultaneously handling light yields and response of PMT.
Regressor function object for JShower3EZ fit using JSimplex minimiser.
Data structure for fit of energy.
double getNPE(const Hit &hit)
Get true charge of hit.
static int MAXIMUM_ITERATIONS
maximal number of iterations
JMEstimator * getMEstimator(const int type)
Get M-Estimator.
Template specialisation of class JModel to match hit with bright point.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
const JModuleRouter & router
then usage $script[input file[working directory[option]]] nWhere option can be N
Match operator for Cherenkov light from shower in any direction.
Basic data structure for L1 hit.
then usage $script[input file[working directory[option]]] nWhere option can be E