1 #ifndef JMUONSIMPLEX_INCLUDE
2 #define JMUONSIMPLEX_INCLUDE
102 if ( InPreFits.empty() )
return;
122 JRegressor_t fit(sigma_ns);
127 JRegressor_t::MAXIMUM_ITERATIONS = 10000;
129 const double TMAX_NS = 50.0;
131 JEvt::iterator __end = InPreFits.end();
137 if (InPreFits.begin() != __end) {
139 std::copy(InPreFits.begin(), __end, std::back_inserter(OutFits));
141 if (numberOfPrefits > 0) {
142 std::advance(__end = InPreFits.begin(), std::min(numberOfPrefits, OutFits.size()));
145 std::partial_sort(InPreFits.begin(), __end, InPreFits.end(),
qualitySorter);
147 __end = std::partition( InPreFits.begin(), __end,
154 for (KM3NETDAQ::JDAQTimeslice::const_iterator i = timeSlice.begin();
155 i != timeSlice.end(); ++i) {
161 buildL0(buffer, std::back_inserter(dataL0));
162 buildL2(buffer, std::back_inserter(dataL1));
168 for (JFIT::JEvt::const_iterator track = InPreFits.begin(); track != __end; ++track) {
176 for (JDataL1_t::const_iterator i = dataL1.begin(); i != dataL1.end(); ++i) {
189 data.reserve(data.size() + dataL0.size());
191 JDataR1_t::iterator __end1 = data.end();
193 for (JDataL0_t::iterator i = dataL0.begin(); i != dataL0.end(); ++i) {
195 if ( std::find_if( data.begin(), __end1,
196 std::bind2nd(std::equal_to<KM3NETDAQ::JDAQModuleIdentifier>(), i->getModuleID()))
218 const int NDF =
JFIT::getCount(data.begin(), data.end()) - fit.step.size();
222 const double chi2 = fit(
JFIT::JLine3Z(tz), data.begin(), data.end() );
226 track3D.rotate_back(R);
228 const double energy(0);
Data regression method for JFIT::JLine3Z.
Template definition of a data regressor of given model.
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Definition for fit results, A good fit should hold: OKAY.
int getCount(const JHitL0 &hit)
Get hit count.
Auxiliary class to test history.
Data structure for fit of straight line in positive z-direction.
Container for historical events.
Linear fit of JFIT::JLine1Z.
class to handle the Simplex angular reconstruction.
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.
Basic data structure for L0 hit.
Definition of fit parameters from various applications.
Basic data structure for time and time over threshold information of hit.
Data structure for vector in three dimensions.
Auxiliary class to test history.
JMuonSimplex()
Default constructor.
JDirection3D getDirection(const JFit &fit)
Get direction.
Auxiliary class to match data points with given model.
void getJEvt(const KM3NETDAQ::JDAQTimeslice &timeSlice, JFIT::JEvt &InPreFits, JFIT::JEvt &OutFits) const
Declaration of Member function that actually performs the reconstruction.
counter_type advance(counter_type &counter, const counter_type value, const counter_type limit=std::numeric_limits< counter_type >::max())
Advance counter.
JLANG::JSharedPointer< const JDETECTOR::JModuleRouter > router_
JMuonSimplex(const JLANG::JSharedPointer< const JDETECTOR::JModuleRouter > &router, const JFIT::JMuonSimplexParameters_t ¶meters)
Parameterized constructor.
Reduced data structure for L1 hit.
JPosition3D getPosition(const JFit &fit)
Get position.
double getQuality(const double chi2, const int NDF)
Get quality of fit.
Data structure for set of track fit results.
Data structure for fit of straight line paralel to z-axis.
bool hasModule(const JObjectID &id) const
Has module.
void copy(const Head &from, JHead &to)
Copy header from from to to.
Reduced data structure for L1 hit.
2-dimensional frame with time calibrated data from one optical module.
bool qualitySorter(const JFit &first, const JFit &second)
Comparison of fit results.
Data structure for normalised vector in positive z-direction.
JPosition3D & rotate(const JRotation3D &R)
Rotate.
JFIT::JMuonSimplexParameters_t parameters_
Basic data structure for L1 hit.