1 #ifndef __JFIT__JSHOWER3EZREGRESSOR__ 
    2 #define __JFIT__JSHOWER3EZREGRESSOR__ 
   85       const JPDF_t::JSupervisor supervisor(
new JPDF_t::JDefaultResult(
JMATH::zero));
 
   87       for (
int i = 0; 
i != NUMBER_OF_PDFS; ++
i) {
 
   93           const string file_name = 
getFilename(fileDescriptor, pdf_t[
i]);
 
   95           NOTICE(
"loading PDF from file " << file_name << 
"... " << flush);
 
   97           pdf.
load(file_name.c_str());
 
  111       for (
int i = 1; 
i < NUMBER_OF_PDFS; 
i += 2) {
 
  113         npe[ 
i ].add(npe[
i-1]);
 
  117         npe[
i-1].swap(buffer);
 
  140       const double z  = 
D.getDot(shower_dir);
 
  141       const double x  = 
D.getX()  -  z * shower.
getDX();
 
  142       const double y  = 
D.getY()  -  z * shower.
getDY();
 
  143       const double cosDelta = z/
D.getLength();  
 
  145       U.rotate(JRotation3Z(-atan2(
y,
x)));                  
 
  147       const double theta = U.getTheta();
 
  148       const double phi   = fabs(U.getPhi());
 
  159       const bool hit = pmt.
getN() != 0;
 
  162       return estimator->getRho(
u);
 
  187                               const double cosDelta,
 
  190                               const double E)
 const 
  194       for (
int i = 0; 
i != NUMBER_OF_PDFS; ++
i) {
 
  196         if (!npe[
i].empty() && D <= npe[
i].getXmax()) {
 
  212             ERROR(error << std::endl);
 
  224     static const int    NUMBER_OF_PDFS = 2;
 
  271       const JPDF_t::JSupervisor supervisor(
new JPDF_t::JDefaultResult(
JMATH::zero));
 
  273       for (
int i = 0; 
i != NUMBER_OF_PDFS; ++
i) {
 
  279           const string file_name = 
getFilename(fileDescriptor, pdf_t[
i]);
 
  281           NOTICE(
"loading PDF from file " << file_name << 
"... " << flush);
 
  283           pdf.
load(file_name.c_str());
 
  297       for (
int i = 1; 
i < NUMBER_OF_PDFS; 
i += 2) {
 
  299         npe[ 
i ].add(npe[
i-1]);
 
  303         npe[
i-1].swap(buffer);
 
  327       const double z  = 
D.getDot(shower_dir);
 
  328       const double x  = 
D.getX()  -  z * shower.
getDX();
 
  329       const double y  = 
D.getY()  -  z * shower.
getDY();
 
  330       const double R2 = 
D.getLengthSquared() - z*z;
 
  331       const double R = sqrt(R2);
 
  332       const double d = 
D.getLength();  
 
  333       const double cos_th0 = z/
d;  
 
  335       U.rotate(JRotation3Z(-atan2(
y,
x)));                  
 
  337       const double theta = U.getTheta();
 
  338       const double phi   = fabs(U.getPhi());
 
  349       const bool hit = pmt.
getN() != 0;
 
  350       const double u = H1.getChi2(hit);
 
  354       result.chi2     = estimator->getRho(
u);
 
  364       result.gradient.mul(estimator->getPsi(
u));
 
  365       result.gradient.mul(H1.getDerivativeOfChi2(hit));                    
 
  392                               const double cosDelta,
 
  395                               const double E)
 const 
  399       for (
int i = 0; 
i != NUMBER_OF_PDFS; ++
i) {
 
  401         if (!npe[
i].empty() && D <= npe[
i].getXmax()) {
 
  413             ERROR(error << std::endl);
 
  425     static const int    NUMBER_OF_PDFS = 2;
 
Template definition of a data regressor of given model. 
 
JPHYSICS::JPDFTable< JFunction1D_t, JPDFMaplist_t > JPDF_t
 
double getE() const 
Get energy. 
 
void load(const char *file_name)
Load from input file. 
 
General purpose data regression method. 
 
double getR() const 
Get rate. 
 
then usage $script< input file >[option[primary[working directory]]] nWhere option can be E
 
JTOOLS::JSplineFunction1S_t JFunction1D_t
 
This include file containes various data structures that can be used as specific return types for the...
 
Auxiliary class for handling PMT geometry, rate and response. 
 
Data structure for vertex fit. 
 
scattered light from EM shower 
 
const JDirection3D & getDirection() const 
Get direction. 
 
JTOOLS::JMapList< JTOOLS::JPolint0FunctionalMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalGridMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalGridMap > > > > JPDFMaplist_t
 
JNPE_t::result_type getH1(const double D, const double cosDelta, const double theta, const double phi, const double E) const 
Get signal hypothesis value for time integrated PDF. 
 
static const JZero zero
Function object to assign zero value. 
 
JTOOLS::JMapList< JTOOLS::JPolint0FunctionalMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalGridMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalGridMap > > > > JNPEMaplist_t
 
Definition of zero value for any class. 
 
static const JFIT::JPDFType_t pdf_t[NUMBER_OF_PDFS]
 
JTOOLS::JMapList< JTOOLS::JPolint1FunctionalMapH, JTOOLS::JMapList< JTOOLS::JPolint1FunctionalMap, JTOOLS::JMapList< JTOOLS::JPolint1FunctionalGridMap, JTOOLS::JMapList< JTOOLS::JPolint1FunctionalGridMap > > > > JNPEMaplist_t
 
double getDY() const 
Get y direction. 
 
Various implementations of functional maps. 
 
Numbering scheme for PDF types. 
 
double operator()(const JShower3EZ &shower, const JPMTW0 &pmt) const 
Fit function. 
 
Data structure for fit of straight line in positive z-direction with energy. 
 
minimiser_type::result_type result_type
 
The template JSharedPointer class can be used to share a pointer to an object. 
 
Data structure for vector in three dimensions. 
 
multifunction_t::result_type result_type
 
JPHYSICS::JNPETable< double, double, JNPEMaplist_t > JNPE_t
 
static double Vmax_npe
Maximal integral of PDF [npe]. 
 
direct light from EM shower 
 
JTOOLS::JMapList< JTOOLS::JPolint0FunctionalMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalGridMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalGridMap > > > > JPDFMaplist_t
 
const JPosition3D & getPosition() const 
Get position. 
 
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function. 
 
General purpose messaging. 
 
const JVersor3Z & getDirection() const 
Get direction. 
 
Fit method based on the Levenberg-Marquardt method. 
 
JNPE_t::result_type getH1(const double D, const double cosDelta, const double theta, const double phi, const double E) const 
Get signal hypothesis value for time integrated PDF. 
 
JRegressor(const std::string &fileDescriptor)
Parameterized constructor. 
 
then JCookie sh JDataQuality D $DETECTOR_ID R
 
virtual const char * what() const override
Get error message. 
 
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
 
int getN() const 
Get number of hits. 
 
Auxiliary class to define a range between two values. 
 
Simple fit method based on Powell's algorithm, see reference: Numerical Recipes in C++...
 
double getDX() const 
Get x direction. 
 
result_type operator()(const JShower3EZ &shower, const JPMTW0 &pmt) const 
Fit function. 
 
std::string getFilename(const std::string &file_name)
Get file name part, i.e. part after last JEEP::PATHNAME_SEPARATOR if any. 
 
static double Vmax_npe
Maximal integral of PDF [npe]. 
 
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function. 
 
static JTimeRange T_ns
Time window with respect to Cherenkov hypothesis [ns]. 
 
JNPE_t::result_type getH0(const double R_Hz) const 
Get background hypothesis value for time integrated PDF. 
 
Data structure for position in three dimensions. 
 
Data structure for normalised vector in three dimensions. 
 
JTOOLS::JSplineFunction1S_t JFunction1D_t
 
double getChi2(const double P)
Get chi2 corresponding to given probability. 
 
Data structure for normalised vector in positive z-direction. 
 
JPHYSICS::JPDFTable< JFunction1D_t, JPDFMaplist_t > JPDF_t
 
Abstract class for global fit method. 
 
do echo Generating $dir eval D
 
static JTimeRange T_ns
Time window with respect to Cherenkov hypothesis [ns]. 
 
JNPE_t::result_type getH0(const double R_Hz) const 
Get background hypothesis value for time integrated PDF. 
 
Maximum likelihood estimator (M-estimators). 
 
JTOOLS::JRange< double > JTimeRange
Type definition for time range (unit [s]). 
 
JPHYSICS::JNPETable< double, double, JNPEMaplist_t > JNPE_t
 
JRegressor(const std::string &fileDescriptor)
Parameterized constructor.