Declaration of the member function that actually performs the reconstruction.
174 if ( InPreFits.empty() )
return;
182 JEvt::iterator __end = InPreFits.end();
183 std::copy(InPreFits.begin(), __end, back_inserter(OutFits));
185 if (numberOfPrefits > 0) {
186 advance(__end = InPreFits.begin(), min(numberOfPrefits, InPreFits.size()));
189 partial_sort(InPreFits.begin(), __end, InPreFits.end(),
qualitySorter);
192 buildL0(timeSliceBuildL0, *
moduleRouter_, back_inserter(dataL0));
194 for (JEvt::const_iterator shower = InPreFits.begin(); shower != __end; ++shower) {
210 for (JDataL0_t::const_iterator i = dataL0.begin(); i != dataL0.end(); ++i) {
212 const JHitW0 hit(*i, R_Hz);
215 const double D = hit_pos.
getDistance(pt.getPosition());
216 const double t_res = hit.getT() - pt.getT(hit_pos);
218 const JDirection3D photonDir(hit_pos - pt.getPosition());
219 const double cosT = photonDir.
getDot(hit.getDirection());
221 if(D < Dmax_m && (t_res >= -25 && t_res <= 25) && (cosT >= -1 && cosT <= 0.1)){
222 top.insert(hit.getPMTIdentifier());
223 const JVector3D d(photonDir.getDX(), photonDir.getDY(), photonDir.getDZ());
226 if(D < Dmax_m && (t_res > -30 && t_res < 20)){
235 const JDirection3D conversion(start_dir.getX(), start_dir.getY(), start_dir.getZ());
244 double max_theta = 0, max_phi = 0, scan_step = 0;
247 if(start_E > 10 && radius < 100){
259 const JAngle3D start_dir_angles(start_dir.getX(), start_dir.getY(), start_dir.getZ());
261 for(
double E = -15; E <= 5; E += 7.5){
262 for(
double th = -max_theta; th <= max_theta; th += scan_step){
263 for(
double ph = -max_phi; ph <= max_phi; ph += scan_step){
269 const double theta = th *
PI / 180;
270 const double phi = ph *
PI / 180;
271 const double scan_E = start_E + E;
273 const JAngle3D dir_shifted_angles(start_dir_angles.getTheta() + theta,
274 start_dir_angles.getPhi() + phi);
275 const JVector3D dir_shifted(dir_shifted_angles.getDX(),
276 dir_shifted_angles.getDY(),
277 dir_shifted_angles.getDZ());
284 for (JDetectorSubset_t::iterator module = subdetector.begin();
285 module != subdetector.end(); ++module) {
290 for (
unsigned int i = 0; i != module->size(); ++i) {
292 JPMT pmt(module->getPMT(i));
293 buffer.push_back(
JPMTW0(pmt, R_Hz, top.count(
id)));
297 for(JPMTW0_t::iterator pmt = buffer.begin(); pmt != buffer.end(); ++pmt ){
301 shower_hypothesis.
LogLik = chi2;
302 shower_hypothesis.
Energy = scan_E;
303 shower_hypothesis.
Direction = dir_shifted;
305 shower_hypotheses.push_back(shower_hypothesis);
314 partial_sort(shower_hypotheses.begin(), __end2, shower_hypotheses.end(),
sortLogLik);
319 const double dir_step = 0.05;
324 const double scan_E = hp->Energy;
330 const JDirection3D conversion(startVersor.getDX(), startVersor.getDY(), startVersor.getDZ());
334 for(JDetector::const_iterator module =
detector.begin();
335 module !=
detector.end(); ++module) {
339 if (pt.getDistance(pos) < Dmax_m) {
340 for (
unsigned int i = 0; i != module->size(); ++i) {
342 JPMT pmt(module->getPMT(i));
344 buffer.push_back(
JPMTW0(pmt, R_Hz, top.count(
id)));
349 const int NDF = buffer.size() -
fit_.step.size();
358 const JTrack3D td(resPos, resDir, shower->getT());
359 double E_reco_corrected = abs(
fit_.value.getE() - 4);
364 const double p0 = -2.028;
365 const double p1 = 0.7683;
366 if(E_reco_corrected > 6){
367 E_reco_corrected = (E_reco_corrected - p0) / (1 +
p1);
374 tb, -chi2, NDF, E_reco_corrected,
377 OutFits.push_back(outFit);