1#ifndef JSHOWERBJORKENY_INCLUDE
2#define JSHOWERBJORKENY_INCLUDE
80 using JRegressor_t::operator();
97 const std::string pdfFile,
108 JRegressor_t::debug =
debug;
109 JRegressor_t::T_ns.setRange(parameters.
TMin_ns, parameters.
TMax_ns);
111 JRegressor_t::MAXIMUM_ITERATIONS =
NMax;
113 this->estimator.reset(getMEstimator(parameters.
mestimator));
137 for (JEvt::const_iterator shower = in.begin(); shower != in.end(); ++shower) {
140 shower->getE(), 0.0);
146 for (JDataL0_t::const_iterator i = dataL0.begin(); i != dataL0.end(); ++i) {
149 top.insert(i->getPMTIdentifier());
160 for (JDetectorSubset_t::iterator module = subdetector.begin();
161 module != subdetector.end(); ++module) {
169 for (
unsigned int i = 0; i != dom.size(); ++i) {
179 const size_t count = top.count(
id);
181 buffer.push_back(
JPMTW0(dom.
getPMT(i), rate_Hz, count));
186 this->step.resize(2);
190 double f_h = 1 - 0.681 * (std::pow(shower->getE()/0.863, -0.207));
194 buffer.begin(), buffer.end());
196 double NDF =
getCount(buffer.begin(), buffer.end()) - this->step.size();
198 JShower3EY sh_fit(this->value.getPosition(), this->value.getDirection(),
199 this->value.getT(),
correct(this->value.getEem() + this->value.getEh()), this->value.getBy());
201 double y =
getFinalBjY(this->value.getEem(), this->value.getEh());
208 NDF, sh_fit.
getE()));
210 out.rbegin()->setW(5, y);
211 out.rbegin()->setW(6, this->value.getEem());
212 out.rbegin()->setW(7, this->value.getEh());
230 return E_h / (E_em + E_h);
Algorithms for hit clustering and sorting.
Auxiliary class to extract a subset of optical modules from a detector.
Data structure for detector geometry and calibration.
Basic data structure for L0 hit.
Basic data structure for L1 hit.
Reduced data structure for L1 hit.
Match operator for Cherenkov light from shower in any direction.
Data regression method for JFIT::JShowerEH.
Basic data structure for time and time over threshold information of hit.
Detector subset without binary search functionality.
Router for direct addressing of module data in detector data structure.
Data structure for a composite optical module.
void rotate(const JRotation3D &R)
Rotate module.
const JPMT & getPMT(const int index) const
Get PMT.
Data structure for fit of energy.
Data structure for set of track fit results.
Data structure for vertex fit.
Data structure for fit of straight line in positive z-direction with energy.
Auxiliary class for correction of energy determined by JShowerEnergy.cc.
Simple fit method based on Powell's algorithm, see reference: Numerical Recipes in C++,...
JAxis3D & rotate_back(const JRotation3D &R)
Rotate back axis.
Data structure for direction in three dimensions.
const JPosition3D & getPosition() const
Get position.
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
JTime & add(const JTime &value)
Addition operator.
JVersor3D getDirection(const JVector3D &pos) const
Get photon direction of Cherenkov light on PMT.
3D track with energy and Bjorken Y.
double getBjY() const
Get Bjorken Y.
double getE() const
Get energy.
Data structure for vector in three dimensions.
Data structure for normalised vector in positive z-direction.
const JClass_t & getReference() const
Get reference to object.
class to handle the direction fit of the shower reconstruction, mainly dedicated for ORCA
const JSummaryRouter & summary
JEvt operator()(const KM3NETDAQ::JDAQEvent &event, const JFIT::JEvt &in)
Declaration of the member function that actually performs the reconstruction.
const JShowerEnergyCorrection & correct
JRegressor< JShowerEH, JSimplex > JRegressor_t
const JModuleRouter & router
double getFinalBjY(double E_em, double E_h)
JShowerBjorkenY(const JShowerBjorkenYParameters_t ¶meters, const JModuleRouter &router, const JSummaryRouter &summary, const std::string pdfFile, const JShowerEnergyCorrection &correct, const int debug=0)
Parameterized constructor.
Router for fast addressing of summary data in KM3NETDAQ::JDAQSummaryslice data structure as a functio...
double getRate() const
Get default rate.
const JDAQSummaryFrame & getSummaryFrame() const
Get default summary frame.
Data storage class for rate measurements of all PMTs in one module.
static const int JSHOWER_BJORKEN_Y
size_t getCount(const array_type< T > &buffer, const JCompare_t &compare)
Count number of unique values.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
double getQuality(const double chi2, const int N, const int NDF)
Get quality of fit.
JPosition3D getPosition(const JFit &fit)
Get position.
JFit getFit(const JHistory &history, const JTrack3D &track, const double Q, const int NDF, const double energy=0.0, const int status=SINGLE_STAGE)
Get fit.
JDirection3D getDirection(const JFit &fit)
Get direction.
bool is_valid(const json &js)
Check validity of JSon data.
bool getDAQStatus(const JDAQFrameStatus &frame, const JStatus &status)
Test status of DAQ.
bool getPMTStatus(const JStatus &status)
Test status of PMT.
static const int PMT_DISABLE
KM3NeT Data Definitions v3.5.1-1-gd514d72 https://git.km3net.de/common/km3net-dataformat.
Model for fit to acoustics data.
JHistory & add(const int type)
Add event to history.
Auxiliary class for handling PMT geometry, rate and response.
Template definition of a data regressor of given model.
Data structure for fit parameters.
double fit_step
simplex initial step
double TMax_ns
maximum time for local coincidences [ns]
double VMax_npe
maximum number of of photo-electrons
int NMax
maximum number of iterations
int mestimator
M-estimator
double roadWidth_m
road width [m]
double TMin_ns
minimum time for local coincidences [ns]