1 #ifndef JSHOWERPREFIT_INCLUDE
2 #define JSHOWERPREFIT_INCLUDE
39 namespace JRECONSTRUCTION
82 const double STANDARD_DEVIATIONS = 3.0;
105 copy(dataL1.begin(), dataL1.end(), back_inserter(dataL0));
107 for (buffer_type::const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
110 dataL0.push_back(*i);
114 for (buffer_type::const_iterator
root = dataL1.begin();
root != dataL1.end(); ++
root) {
116 buffer_type data(1, *
root);
120 for (buffer_type::const_iterator i = dataL0.begin(); i != dataL0.end(); ++i) {
122 if((
root->getModuleIdentifier() != i->getModuleIdentifier() ) && matching(*i)){
127 buffer_type::iterator __end1 =
clusterizeWeight(data.begin() + 1, data.end(), match3G);
132 double chi2 = numeric_limits<double>::max();
133 int NDF =
distance(data.begin(), __end1) - JEstimator_t::NUMBER_OF_PARAMETERS;
138 double ymin = numeric_limits<double>::max();
140 buffer_type::iterator __end2 = __end1;
143 JEstimator_t::NUMBER_OF_PARAMETERS; ++
n, --__end2) {
145 sort(data.begin() + 1, __end1, compare);
150 fit(data.begin(), __end2);
158 NDF =
distance(data.begin(), __end2) - JEstimator_t::NUMBER_OF_PARAMETERS;
166 ymin -= STANDARD_DEVIATIONS * STANDARD_DEVIATIONS;
171 const int number_of_outliers =
distance(data.begin(), __end1) - JEstimator_t::NUMBER_OF_PARAMETERS - 1;
173 buffer_type::iterator __end2 = __end1;
175 for (
int n = 0;
n <= number_of_outliers; ++
n) {
179 fit(data.begin(), __end2);
182 NDF =
distance(data.begin(), __end2) - JEstimator_t::NUMBER_OF_PARAMETERS;
189 buffer_type::iterator imax = __end2;
191 for (buffer_type::iterator i = data.begin() + 1; i != __end2; ++i) {
201 if (ymax > STANDARD_DEVIATIONS * STANDARD_DEVIATIONS) {
203 swap(*imax, *__end2);
216 out.rbegin()->setW(13, chi2);
217 out.rbegin()->setW(14, N);
double getT() const
Get calibrated time of hit.
int getModuleID() const
Get module identifier.
JBinder2nd< JHit_t > JBind2nd(const JMatch< JHit_t > &match, const JHit_t &second)
Auxiliary method to create JBinder2nd object.
Linear fit of bright point (position and time) between hits (objects with position and time)...
Algorithms for hit clustering and sorting.
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
Data structure for vertex fit.
then JPlot1D f $WORKDIR postfit[prefit\] root
Router for direct addressing of module data in detector data structure.
*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
Auxiliary class to convert binary JMatch operator and given hit to unary match operator.
class to handle first step of the shower reconstruction in ORCA: it reconstructs the shower vertex...
Basic data structure for time and time over threshold information of hit.
Data structure for fit parameters.
static struct JTRIGGER::@76 clusterizeWeight
Anonymous struct for weighed clustering of hits.
double getQuality(const double chi2, const int N, const int NDF)
Get quality of fit.
JShowerPrefit(const JShowerPrefitParameters_t ¶meters, const JModuleRouter &router, const int debug=0)
Parameterized constructor.
JEvt operator()(const KM3NETDAQ::JDAQEvent &event) const
Declaration of the operator that performs the reconstruction.
bool operator()(const JHitR1 &hit) const
static const int JSHOWERPREFIT
The template JSharedPointer class can be used to share a pointer to an object.
const JModuleRouter & router
Direct access to module in detector data structure.
Data structure for L2 parameters.
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.
Linear fit of JFIT::JPoint4D.
Auxiliary class for permutations of L1 hits.
Data structure for set of track fit results.
alias put_queue eval echo n
int getCount(const T &hit)
Get hit count.
void copy(const Head &from, JHead &to)
Copy header from from to to.
match_t(const JHitR1 &root, const double TMax_ns)
Reduced data structure for L1 hit.
double getChi2(const double P)
Get chi2 corresponding to given probability.
Data structure for normalised vector in positive z-direction.
then usage $script[input file[working directory[option]]] nWhere option can be N
Match operator for Cherenkov light from shower in any direction.