10 #include "art/Framework/Core/EDAnalyzer.h"
11 #include "art/Framework/Core/ModuleMacros.h"
12 #include "art/Framework/Principal/Event.h"
13 #include "art/Framework/Principal/Handle.h"
14 #include "art/Framework/Principal/Run.h"
15 #include "art/Framework/Principal/SubRun.h"
16 #include "canvas/Utilities/InputTag.h"
17 #include "fhiclcpp/ParameterSet.h"
18 #include "messagefacility/MessageLogger/MessageLogger.h"
20 #include "art_root_io/TFileService.h"
27 #include "nusimdata/SimulationBase/MCParticle.h"
30 #include "nusimdata/SimulationBase/MCTruth.h"
31 #include "nusimdata/SimulationBase/GTruth.h"
38 #include <boost/uuid/uuid.hpp>
39 #include <boost/uuid/uuid_generators.hpp>
40 #include <boost/uuid/uuid_io.hpp>
61 void analyze(art::Event
const&
e)
override;
76 bool InDetector(
const double&
x,
const double&
y,
const double&
z)
const;
79 bool InDetector(
const art::Ptr<simb::MCParticle>,
int & step);
90 (std::set<std::string>
const& vol_names)
const;
359 _save_pi0_tree =
p.get<
bool>(
"SavePi0Tree",
true);
360 _simulating_dirt =
p.get<
bool>(
"SimulatingDirt",
false);
362 art::ServiceHandle<art::TFileService> fs;
363 _tree = fs->make<TTree>(
"OBTree",
"");
365 _tree->Branch(
"run", &_run,
"run/I");
366 _tree->Branch(
"subrun", &_subrun,
"subrun/I");
367 _tree->Branch(
"event", &_event,
"event/I");
370 _tree->Branch(
"nu_e", &_nu_e,
"nu_e/F");
371 _tree->Branch(
"nu_pdg", &_nu_pdg,
"nu_pdg/I");
372 _tree->Branch(
"nu_ccnc", &_nu_ccnc,
"nu_ccnc/I");
373 _tree->Branch(
"nu_mode", &_nu_mode,
"nu_mode/I");
374 _tree->Branch(
"nu_int_type", &_nu_int_type,
"nu_int_type/I");
375 _tree->Branch(
"nu_vtx_x", &_nu_vtx_x,
"nu_vtx_x/F");
376 _tree->Branch(
"nu_vtx_y", &_nu_vtx_y,
"nu_vtx_y/F");
377 _tree->Branch(
"nu_vtx_z", &_nu_vtx_z,
"nu_vtx_z/F");
378 _tree->Branch(
"nu_px", &_nu_px,
"nu_px/F");
379 _tree->Branch(
"nu_py", &_nu_py,
"nu_px/F");
380 _tree->Branch(
"nu_pz", &_nu_pz,
"nu_px/F");
381 _tree->Branch(
"nu_pip_mult", &_nu_pip_mult,
"nu_pip_mult/I");
382 _tree->Branch(
"nu_pi0_mult", &_nu_pi0_mult,
"nu_pi0_mult/I");
383 _tree->Branch(
"nu_p_mult", &_nu_p_mult,
"nu_p_mult/I");
384 _tree->Branch(
"pars_pdg",
"std::vector<int>", &_pars_pdg);
385 _tree->Branch(
"pars_e",
"std::vector<float>", &_pars_e);
388 _tree->Branch(
"mcp_px",
"std::vector<float>", &_mcp_px);
389 _tree->Branch(
"mcp_py",
"std::vector<float>", &_mcp_py);
390 _tree->Branch(
"mcp_pz",
"std::vector<float>", &_mcp_pz);
391 _tree->Branch(
"mcp_e",
"std::vector<float>", &_mcp_e);
392 _tree->Branch(
"mcp_vx",
"std::vector<float>", &_mcp_vx);
393 _tree->Branch(
"mcp_vy",
"std::vector<float>", &_mcp_vy);
394 _tree->Branch(
"mcp_vz",
"std::vector<float>", &_mcp_vz);
395 _tree->Branch(
"mcp_endx",
"std::vector<float>", &_mcp_endx);
396 _tree->Branch(
"mcp_endy",
"std::vector<float>", &_mcp_endy);
397 _tree->Branch(
"mcp_endz",
"std::vector<float>", &_mcp_endz);
398 _tree->Branch(
"mcp_pdg",
"std::vector<float>", &_mcp_pdg);
399 _tree->Branch(
"mcp_mother",
"std::vector<float>", &_mcp_mother);
400 _tree->Branch(
"mcp_status_code",
"std::vector<float>", &_mcp_status_code);
401 _tree->Branch(
"mcp_process",
"std::vector<std::string>", &_mcp_process);
402 _tree->Branch(
"mcp_end_process",
"std::vector<std::string>", &_mcp_end_process);
403 _tree->Branch(
"mcp_intpc",
"std::vector<bool>", &_mcp_intpc);
404 _tree->Branch(
"mcp_intpc_e",
"std::vector<float>", &_mcp_intpc_e);
405 _tree->Branch(
"mcp_trackid",
"std::vector<float>", &_mcp_trackid);
406 _tree->Branch(
"mcp_intpc_nu_e",
"std::vector<float>", &_mcp_intpc_nu_e);
409 _tree->Branch(
"neut_daughters_pdg",
"std::vector<int>", &_neut_daughters_pdg);
410 _tree->Branch(
"neut_daughters_px",
"std::vector<float>", &_neut_daughters_px);
411 _tree->Branch(
"neut_daughters_py",
"std::vector<float>", &_neut_daughters_py);
412 _tree->Branch(
"neut_daughters_pz",
"std::vector<float>", &_neut_daughters_pz);
413 _tree->Branch(
"neut_daughters_e",
"std::vector<float>", &_neut_daughters_e);
414 _tree->Branch(
"neut_daughters_startprocess",
"std::vector<std::string>", &_neut_daughters_startprocess);
415 _tree->Branch(
"neut_daughters_endprocess",
"std::vector<std::string>", &_neut_daughters_endprocess);
416 _tree->Branch(
"neut_daughters_start_x",
"std::vector<float>", &_neut_daughters_start_x);
417 _tree->Branch(
"neut_daughters_start_y",
"std::vector<float>", &_neut_daughters_start_y);
418 _tree->Branch(
"neut_daughters_start_z",
"std::vector<float>", &_neut_daughters_start_z);
419 _tree->Branch(
"neut_daughters_end_x",
"std::vector<float>", &_neut_daughters_end_x);
420 _tree->Branch(
"neut_daughters_end_y",
"std::vector<float>", &_neut_daughters_end_y);
421 _tree->Branch(
"neut_daughters_end_z",
"std::vector<float>", &_neut_daughters_end_z);
422 _tree->Branch(
"neut_daughters_trackid",
"std::vector<float>", &_neut_daughters_trackid);
425 _tree->Branch(
"neut_grand_daughters_pdg",
"std::vector<int>", &_neut_grand_daughters_pdg);
426 _tree->Branch(
"neut_grand_daughters_px",
"std::vector<float>", &_neut_grand_daughters_px);
427 _tree->Branch(
"neut_grand_daughters_py",
"std::vector<float>", &_neut_grand_daughters_py);
428 _tree->Branch(
"neut_grand_daughters_pz",
"std::vector<float>", &_neut_grand_daughters_pz);
429 _tree->Branch(
"neut_grand_daughters_e",
"std::vector<float>", &_neut_grand_daughters_e);
430 _tree->Branch(
"neut_grand_daughters_startprocess",
"std::vector<std::string>", &_neut_grand_daughters_startprocess);
431 _tree->Branch(
"neut_grand_daughters_endprocess",
"std::vector<std::string>", &_neut_grand_daughters_endprocess);
432 _tree->Branch(
"neut_grand_daughters_start_x",
"std::vector<float>", &_neut_grand_daughters_start_x);
433 _tree->Branch(
"neut_grand_daughters_start_y",
"std::vector<float>", &_neut_grand_daughters_start_y);
434 _tree->Branch(
"neut_grand_daughters_start_z",
"std::vector<float>", &_neut_grand_daughters_start_z);
435 _tree->Branch(
"neut_grand_daughters_end_x",
"std::vector<float>", &_neut_grand_daughters_end_x);
436 _tree->Branch(
"neut_grand_daughters_end_y",
"std::vector<float>", &_neut_grand_daughters_end_y);
437 _tree->Branch(
"neut_grand_daughters_end_z",
"std::vector<float>", &_neut_grand_daughters_end_z);
438 _tree->Branch(
"neut_grand_daughters_trackid",
"std::vector<float>", &_neut_grand_daughters_trackid);
440 _tree->Branch(
"mct_pdg",
"std::vector<float>", &_mct_pdg);
441 _tree->Branch(
"mct_process",
"std::vector<std::string>", &_mct_process);
442 _tree->Branch(
"mct_start_x",
"std::vector<float>", &_mct_start_x);
443 _tree->Branch(
"mct_start_y",
"std::vector<float>", &_mct_start_y);
444 _tree->Branch(
"mct_start_z",
"std::vector<float>", &_mct_start_z);
445 _tree->Branch(
"mct_end_x",
"std::vector<float>", &_mct_end_x);
446 _tree->Branch(
"mct_end_y",
"std::vector<float>", &_mct_end_y);
447 _tree->Branch(
"mct_end_z",
"std::vector<float>", &_mct_end_z);
448 _tree->Branch(
"mct_start_px",
"std::vector<float>", &_mct_start_px);
449 _tree->Branch(
"mct_start_py",
"std::vector<float>", &_mct_start_py);
450 _tree->Branch(
"mct_start_pz",
"std::vector<float>", &_mct_start_pz);
451 _tree->Branch(
"mct_start_e",
"std::vector<float>", &_mct_start_e);
452 _tree->Branch(
"mct_mother_pdg",
"std::vector<float>", &_mct_mother_pdg);
453 _tree->Branch(
"mct_ancestor_pdg",
"std::vector<float>", &_mct_ancestor_pdg);
454 _tree->Branch(
"mct_mother_process",
"std::vector<std::string>>", &_mct_mother_process);
455 _tree->Branch(
"mct_ancestor_process",
"std::vector<std::string>>", &_mct_ancestor_process);
456 _tree->Branch(
"mct_mother_in_ob_trackid",
"std::vector<float>", &_mct_mother_in_ob_trackid);
457 _tree->Branch(
"mct_n_lt1", &_n_mct_lt1,
"mct_n_lt1/I");
458 _tree->Branch(
"mct_n_lt1_from_ob", &_n_mct_lt1_from_ob,
"mct_n_lt1_from_ob/I");
460 _tree->Branch(
"mcs_pdg",
"std::vector<float>", &_mcs_pdg);
461 _tree->Branch(
"mcs_process",
"std::vector<std::string>", &_mcs_process);
462 _tree->Branch(
"mcs_start_x",
"std::vector<float>", &_mcs_start_x);
463 _tree->Branch(
"mcs_start_y",
"std::vector<float>", &_mcs_start_y);
464 _tree->Branch(
"mcs_start_z",
"std::vector<float>", &_mcs_start_z);
465 _tree->Branch(
"mcs_end_x",
"std::vector<float>", &_mcs_end_x);
466 _tree->Branch(
"mcs_end_y",
"std::vector<float>", &_mcs_end_y);
467 _tree->Branch(
"mcs_end_z",
"std::vector<float>", &_mcs_end_z);
468 _tree->Branch(
"mcs_start_px",
"std::vector<float>", &_mcs_start_px);
469 _tree->Branch(
"mcs_start_py",
"std::vector<float>", &_mcs_start_py);
470 _tree->Branch(
"mcs_start_pz",
"std::vector<float>", &_mcs_start_pz);
471 _tree->Branch(
"mcs_start_e",
"std::vector<float>", &_mcs_start_e);
472 _tree->Branch(
"mcs_charge_col",
"std::vector<double>", &_mcs_charge_col);
473 _tree->Branch(
"mcs_charge_ind2",
"std::vector<double>", &_mcs_charge_ind2);
474 _tree->Branch(
"mcs_charge_ind1",
"std::vector<double>", &_mcs_charge_ind1);
475 _tree->Branch(
"mcs_mother_pdg",
"std::vector<float>", &_mcs_mother_pdg);
476 _tree->Branch(
"mcs_mother_trackid",
"std::vector<float>", &_mcs_mother_trackid);
477 _tree->Branch(
"mcs_mother_start_x",
"std::vector<float>", &_mcs_mother_start_x);
478 _tree->Branch(
"mcs_mother_start_y",
"std::vector<float>", &_mcs_mother_start_y);
479 _tree->Branch(
"mcs_mother_start_z",
"std::vector<float>", &_mcs_mother_start_z);
480 _tree->Branch(
"mcs_mother_start_e",
"std::vector<float>", &_mcs_mother_start_e);
481 _tree->Branch(
"mcs_mother_end_x",
"std::vector<float>", &_mcs_mother_end_x);
482 _tree->Branch(
"mcs_mother_end_y",
"std::vector<float>", &_mcs_mother_end_y);
483 _tree->Branch(
"mcs_mother_end_z",
"std::vector<float>", &_mcs_mother_end_z);
484 _tree->Branch(
"mcs_mother_end_e",
"std::vector<float>", &_mcs_mother_end_e);
485 _tree->Branch(
"mcs_ancestor_pdg",
"std::vector<float>", &_mcs_ancestor_pdg);
486 _tree->Branch(
"mcs_mother_process",
"std::vector<std::string>>", &_mcs_mother_process);
487 _tree->Branch(
"mcs_ancestor_process",
"std::vector<std::string>>", &_mcs_ancestor_process);
488 _tree->Branch(
"mcs_ancestor_start_e",
"std::vector<float>", &_mcs_ancestor_start_e);
489 _tree->Branch(
"mcs_ancestor_end_e",
"std::vector<float>", &_mcs_ancestor_end_e);
490 _tree->Branch(
"mcs_mother_in_ob_trackid",
"std::vector<float>", &_mcs_mother_in_ob_trackid);
491 _tree->Branch(
"mcs_n_lt1", &_n_mcs_lt1,
"mcs_n_lt1/I");
492 _tree->Branch(
"mcs_n_lt1_from_ob", &_n_mcs_lt1_from_ob,
"mcs_n_lt1_from_ob/I");
495 if (_save_pi0_tree) {
496 _pi0_tree = fs->make<TTree>(
"Pi0Tree",
"");
498 _pi0_tree->Branch(
"run", &_run,
"run/I");
499 _pi0_tree->Branch(
"subrun", &_subrun,
"subrun/I");
500 _pi0_tree->Branch(
"event", &_event,
"event/I");
502 _pi0_tree->Branch(
"pi0_par_e", &_pi0_par_e,
"pi0_par_e/F");
503 _pi0_tree->Branch(
"pi0_par_start_x", &_pi0_par_start_x,
"pi0_par_start_x/F");
504 _pi0_tree->Branch(
"pi0_par_start_y", &_pi0_par_start_y,
"pi0_par_start_y/F");
505 _pi0_tree->Branch(
"pi0_par_start_z", &_pi0_par_start_z,
"pi0_par_start_z/F");
506 _pi0_tree->Branch(
"pi0_par_end_x", &_pi0_par_end_x,
"pi0_par_end_x/F");
507 _pi0_tree->Branch(
"pi0_par_end_y", &_pi0_par_end_y,
"pi0_par_end_y/F");
508 _pi0_tree->Branch(
"pi0_par_end_z", &_pi0_par_end_z,
"pi0_par_end_z/F");
509 _pi0_tree->Branch(
"pi0_par_mother_pdg", &_pi0_par_mother_pdg,
"pi0_par_mother_pdg/I");
510 _pi0_tree->Branch(
"pi0_par_mother_e", &_pi0_par_mother_e,
"pi0_par_mother_e/F");
511 _pi0_tree->Branch(
"pi0_par_mother_end_e", &_pi0_par_mother_end_e,
"pi0_par_mother_end_e/F");
512 _pi0_tree->Branch(
"pi0_par_ancestor_trackid", &_pi0_par_ancestor_trackid,
"pi0_par_ancestor_trackid/I");
513 _pi0_tree->Branch(
"pi0_par_ancestor_uuid",
"std::string", &_pi0_par_ancestor_uuid);
515 _pi0_tree->Branch(
"pi0_event_particles_pdg",
"std::vector<int>", &_pi0_event_particles_pdg);
516 _pi0_tree->Branch(
"pi0_event_particles_e",
"std::vector<float>", &_pi0_event_particles_e);
518 _pi0_tree->Branch(
"pi0_daughters_pdg",
"std::vector<int>", &_pi0_daughters_pdg);
519 _pi0_tree->Branch(
"pi0_daughters_e",
"std::vector<float>", &_pi0_daughters_e);
520 _pi0_tree->Branch(
"pi0_daughters_startprocess",
"std::vector<std::string>", &_pi0_daughters_startprocess);
521 _pi0_tree->Branch(
"pi0_daughters_endprocess",
"std::vector<std::string>", &_pi0_daughters_endprocess);
522 _pi0_tree->Branch(
"pi0_daughters_start_x",
"std::vector<float>", &_pi0_daughters_start_x);
523 _pi0_tree->Branch(
"pi0_daughters_start_y",
"std::vector<float>", &_pi0_daughters_start_y);
524 _pi0_tree->Branch(
"pi0_daughters_start_z",
"std::vector<float>", &_pi0_daughters_start_z);
525 _pi0_tree->Branch(
"pi0_daughters_end_x",
"std::vector<float>", &_pi0_daughters_end_x);
526 _pi0_tree->Branch(
"pi0_daughters_end_y",
"std::vector<float>", &_pi0_daughters_end_y);
527 _pi0_tree->Branch(
"pi0_daughters_end_z",
"std::vector<float>", &_pi0_daughters_end_z);
529 _pi0_tree->Branch(
"pi0_genealogy_pdg",
"std::vector<int>", &_pi0_genealogy_pdg);
530 _pi0_tree->Branch(
"pi0_genealogy_startprocess",
"std::vector<std::string>", &_pi0_genealogy_startprocess);
531 _pi0_tree->Branch(
"pi0_genealogy_endprocess",
"std::vector<std::string>", &_pi0_genealogy_endprocess);
532 _pi0_tree->Branch(
"pi0_genealogy_mother",
"std::vector<int>", &_pi0_genealogy_mother);
533 _pi0_tree->Branch(
"pi0_genealogy_e",
"std::vector<float>", &_pi0_genealogy_e);
534 _pi0_tree->Branch(
"pi0_genealogy_start_x",
"std::vector<float>", &_pi0_genealogy_start_x);
535 _pi0_tree->Branch(
"pi0_genealogy_start_y",
"std::vector<float>", &_pi0_genealogy_start_y);
536 _pi0_tree->Branch(
"pi0_genealogy_start_z",
"std::vector<float>", &_pi0_genealogy_start_z);
537 _pi0_tree->Branch(
"pi0_genealogy_end_x",
"std::vector<float>", &_pi0_genealogy_end_x);
538 _pi0_tree->Branch(
"pi0_genealogy_end_y",
"std::vector<float>", &_pi0_genealogy_end_y);
539 _pi0_tree->Branch(
"pi0_genealogy_end_z",
"std::vector<float>", &_pi0_genealogy_end_z);
540 _pi0_tree->Branch(
"pi0_genealogy_trackid",
"std::vector<float>", &_pi0_genealogy_trackid);
545 _pi0_tree->Branch(
"nu_e", &_nu_e,
"nu_e/F");
546 _pi0_tree->Branch(
"nu_pdg", &_nu_pdg,
"nu_pdg/I");
547 _pi0_tree->Branch(
"nu_ccnc", &_nu_ccnc,
"nu_ccnc/I");
548 _pi0_tree->Branch(
"nu_mode", &_nu_mode,
"nu_mode/I");
549 _pi0_tree->Branch(
"nu_vtx_x", &_nu_vtx_x,
"nu_vtx_x/F");
550 _pi0_tree->Branch(
"nu_vtx_y", &_nu_vtx_y,
"nu_vtx_y/F");
551 _pi0_tree->Branch(
"nu_vtx_z", &_nu_vtx_z,
"nu_vtx_z/F");
552 _pi0_tree->Branch(
"nu_pip_mult", &_nu_pip_mult,
"nu_pip_mult/I");
553 _pi0_tree->Branch(
"nu_pi0_mult", &_nu_pi0_mult,
"nu_pi0_mult/I");
554 _pi0_tree->Branch(
"nu_p_mult", &_nu_p_mult,
"nu_p_mult/I");
555 _pi0_tree->Branch(
"pars_pdg",
"std::vector<int>", &_pars_pdg);
556 _pi0_tree->Branch(
"pars_e",
"std::vector<float>", &_pars_e);
560 if (_save_muon_tree) {
561 _muon_tree = fs->make<TTree>(
"MuonTree",
"");
563 _muon_tree->Branch(
"run", &_run,
"run/I");
564 _muon_tree->Branch(
"subrun", &_subrun,
"subrun/I");
565 _muon_tree->Branch(
"event", &_event,
"event/I");
567 _muon_tree->Branch(
"muon_par_e", &_muon_par_e,
"muon_par_e/F");
568 _muon_tree->Branch(
"muon_par_start_x", &_muon_par_start_x,
"muon_par_start_x/F");
569 _muon_tree->Branch(
"muon_par_start_y", &_muon_par_start_y,
"muon_par_start_y/F");
570 _muon_tree->Branch(
"muon_par_start_z", &_muon_par_start_z,
"muon_par_start_z/F");
571 _muon_tree->Branch(
"muon_par_end_x", &_muon_par_end_x,
"muon_par_end_x/F");
572 _muon_tree->Branch(
"muon_par_end_y", &_muon_par_end_y,
"muon_par_end_y/F");
573 _muon_tree->Branch(
"muon_par_end_z", &_muon_par_end_z,
"muon_par_end_z/F");
574 _muon_tree->Branch(
"muon_par_mother_pdg", &_muon_par_mother_pdg,
"muon_par_mother_pdg/I");
575 _muon_tree->Branch(
"muon_par_mother_e", &_muon_par_mother_e,
"muon_par_mother_e/F");
576 _muon_tree->Branch(
"muon_par_mother_end_e", &_muon_par_mother_end_e,
"muon_par_mother_end_e/F");
577 _muon_tree->Branch(
"muon_par_ancestor_trackid", &_muon_par_ancestor_trackid,
"muon_par_ancestor_trackid/I");
578 _muon_tree->Branch(
"muon_par_ancestor_uuid",
"std::string", &_muon_par_ancestor_uuid);
580 _muon_tree->Branch(
"muon_event_particles_pdg",
"std::vector<int>", &_muon_event_particles_pdg);
581 _muon_tree->Branch(
"muon_event_particles_e",
"std::vector<float>", &_muon_event_particles_e);
583 _muon_tree->Branch(
"muon_daughters_pdg",
"std::vector<int>", &_muon_daughters_pdg);
584 _muon_tree->Branch(
"muon_daughters_e",
"std::vector<float>", &_muon_daughters_e);
585 _muon_tree->Branch(
"muon_daughters_startprocess",
"std::vector<std::string>", &_muon_daughters_startprocess);
586 _muon_tree->Branch(
"muon_daughters_endprocess",
"std::vector<std::string>", &_muon_daughters_endprocess);
587 _muon_tree->Branch(
"muon_daughters_start_x",
"std::vector<float>", &_muon_daughters_start_x);
588 _muon_tree->Branch(
"muon_daughters_start_y",
"std::vector<float>", &_muon_daughters_start_y);
589 _muon_tree->Branch(
"muon_daughters_start_z",
"std::vector<float>", &_muon_daughters_start_z);
590 _muon_tree->Branch(
"muon_daughters_end_x",
"std::vector<float>", &_muon_daughters_end_x);
591 _muon_tree->Branch(
"muon_daughters_end_y",
"std::vector<float>", &_muon_daughters_end_y);
592 _muon_tree->Branch(
"muon_daughters_end_z",
"std::vector<float>", &_muon_daughters_end_z);
594 _muon_tree->Branch(
"muon_genealogy_pdg",
"std::vector<int>", &_muon_genealogy_pdg);
595 _muon_tree->Branch(
"muon_genealogy_startprocess",
"std::vector<std::string>", &_muon_genealogy_startprocess);
596 _muon_tree->Branch(
"muon_genealogy_endprocess",
"std::vector<std::string>", &_muon_genealogy_endprocess);
597 _muon_tree->Branch(
"muon_genealogy_mother",
"std::vector<int>", &_muon_genealogy_mother);
598 _muon_tree->Branch(
"muon_genealogy_e",
"std::vector<float>", &_muon_genealogy_e);
599 _muon_tree->Branch(
"muon_genealogy_start_x",
"std::vector<float>", &_muon_genealogy_start_x);
600 _muon_tree->Branch(
"muon_genealogy_start_y",
"std::vector<float>", &_muon_genealogy_start_y);
601 _muon_tree->Branch(
"muon_genealogy_start_z",
"std::vector<float>", &_muon_genealogy_start_z);
602 _muon_tree->Branch(
"muon_genealogy_end_x",
"std::vector<float>", &_muon_genealogy_end_x);
603 _muon_tree->Branch(
"muon_genealogy_end_y",
"std::vector<float>", &_muon_genealogy_end_y);
604 _muon_tree->Branch(
"muon_genealogy_end_z",
"std::vector<float>", &_muon_genealogy_end_z);
605 _muon_tree->Branch(
"muon_genealogy_trackid",
"std::vector<float>", &_muon_genealogy_trackid);
609 _muon_tree->Branch(
"nu_e", &_nu_e,
"nu_e/F");
610 _muon_tree->Branch(
"nu_pdg", &_nu_pdg,
"nu_pdg/I");
611 _muon_tree->Branch(
"nu_ccnc", &_nu_ccnc,
"nu_ccnc/I");
612 _muon_tree->Branch(
"nu_mode", &_nu_mode,
"nu_mode/I");
613 _muon_tree->Branch(
"nu_vtx_x", &_nu_vtx_x,
"nu_vtx_x/F");
614 _muon_tree->Branch(
"nu_vtx_y", &_nu_vtx_y,
"nu_vtx_y/F");
615 _muon_tree->Branch(
"nu_vtx_z", &_nu_vtx_z,
"nu_vtx_z/F");
616 _muon_tree->Branch(
"nu_pip_mult", &_nu_pip_mult,
"nu_pip_mult/I");
617 _muon_tree->Branch(
"nu_pi0_mult", &_nu_pi0_mult,
"nu_pi0_mult/I");
618 _muon_tree->Branch(
"nu_p_mult", &_nu_p_mult,
"nu_p_mult/I");
619 _muon_tree->Branch(
"pars_pdg",
"std::vector<int>", &_pars_pdg);
620 _muon_tree->Branch(
"pars_e",
"std::vector<float>", &_pars_e);
624 _sr_tree = fs->make<TTree>(
"pottree",
"");
625 _sr_tree->Branch(
"run", &_sr_run,
"run/I");
626 _sr_tree->Branch(
"subrun", &_sr_subrun,
"subrun/I");
627 _sr_tree->Branch(
"begintime", &_sr_begintime,
"begintime/D");
628 _sr_tree->Branch(
"endtime", &_sr_endtime,
"endtime/D");
629 _sr_tree->Branch(
"pot", &_sr_pot,
"pot/D");
632 art::ServiceHandle<geo::Geometry const> geo;
633 _x_min = std::min_element(geo->begin_TPC(), geo->end_TPC(), [](
auto const &lhs,
auto const &rhs){
return lhs.BoundingBox().MinX() < rhs.BoundingBox().MinX();})->MinX();
634 _y_min = std::min_element(geo->begin_TPC(), geo->end_TPC(), [](
auto const &lhs,
auto const &rhs){
return lhs.BoundingBox().MinY() < rhs.BoundingBox().MinY();})->MinY();
635 _z_min = std::min_element(geo->begin_TPC(), geo->end_TPC(), [](
auto const &lhs,
auto const &rhs){
return lhs.BoundingBox().MinZ() < rhs.BoundingBox().MinZ();})->MinZ();
636 _x_max = std::max_element(geo->begin_TPC(), geo->end_TPC(), [](
auto const &lhs,
auto const &rhs){
return lhs.BoundingBox().MaxX() < rhs.BoundingBox().MaxX();})->MaxX();
637 _y_max = std::max_element(geo->begin_TPC(), geo->end_TPC(), [](
auto const &lhs,
auto const &rhs){
return lhs.BoundingBox().MaxY() < rhs.BoundingBox().MaxY();})->MaxY();
638 _z_max = std::max_element(geo->begin_TPC(), geo->end_TPC(), [](
auto const &lhs,
auto const &rhs){
return lhs.BoundingBox().MaxZ() < rhs.BoundingBox().MaxZ();})->MaxZ();
640 std::cout <<
"TPC limits: " << std::endl;
641 std::cout <<
"\tx_max\t" << _x_max << std::endl;
642 std::cout <<
"\tx_min\t" << _x_min << std::endl;
643 std::cout <<
"\ty_max\t" << _y_max << std::endl;
644 std::cout <<
"\ty_min\t" << _y_min << std::endl;
645 std::cout <<
"\tz_max\t" << _z_max << std::endl;
646 std::cout <<
"\tz_min\t" << _z_min << std::endl;
653 _subrun = e.id().subRun();
654 _event = e.id().event();
657 _uuid = boost::uuids::random_generator()();
658 _uuid_str = boost::lexical_cast<std::string>(_uuid) +
"-" + _event;
662 std::set<std::string> volnameset(_overburden_volumes.begin(), _overburden_volumes.end());
663 _part_filter = CreateParticleVolumeFilter(volnameset);
666 fGeometry = lar::providerFrom<geo::Geometry>();
672 art::Handle<std::vector<simb::MCTruth>> mct_h;
673 e.getByLabel(_mctruth_producer, mct_h);
675 std::vector<art::Ptr<simb::MCTruth>> mct_v;
676 art::fill_ptr_vector(mct_v, mct_h);
681 for (
size_t i = 0; i < mct_v.size(); i++) {
686 if(!mct_v[i]->NeutrinoSet()) {
690 _nu_e = mct_v[i]->GetNeutrino().Nu().E();
691 _nu_pdg = mct_v[i]->GetNeutrino().Nu().PdgCode();
692 _nu_ccnc = mct_v[i]->GetNeutrino().CCNC();
693 _nu_mode = mct_v[i]->GetNeutrino().Mode();
694 _nu_int_type = mct_v[i]->GetNeutrino().InteractionType();
695 _nu_vtx_x = mct_v[i]->GetNeutrino().Nu().Vx();
696 _nu_vtx_y = mct_v[i]->GetNeutrino().Nu().Vy();
697 _nu_vtx_z = mct_v[i]->GetNeutrino().Nu().Vz();
698 _nu_px = mct_v[i]->GetNeutrino().Nu().Px();
699 _nu_py = mct_v[i]->GetNeutrino().Nu().Py();
700 _nu_pz = mct_v[i]->GetNeutrino().Nu().Pz();
706 if (_simulating_dirt && InDetector(_nu_vtx_x, _nu_vtx_y, _nu_vtx_z)) {
720 for (
int p = 0;
p < mct_v[i]->NParticles();
p++) {
721 auto const & mcp = mct_v[i]->GetParticle(
p);
723 if (mcp.StatusCode() != 1)
continue;
725 _pars_pdg.push_back(mcp.PdgCode());
726 _pars_e.push_back(mcp.E());
728 if (mcp.PdgCode() == 111) {
731 }
else if (
std::abs(mcp.PdgCode()) == 211) {
734 else if (
std::abs(mcp.PdgCode()) == 2112) {
741 std::cout <<
"MCTruth product " << _mctruth_producer <<
" not found..." << std::endl;
746 art::Handle<std::vector<simb::MCParticle> > mcp_h;
747 e.getByLabel(_mcparticle_producer, mcp_h);
748 if(!mcp_h.isValid()){
749 std::cout <<
"MCParticle product " << _mcparticle_producer <<
" not found..." << std::endl;
755 std::vector<art::Ptr<simb::MCParticle>> mcp_v;
756 art::fill_ptr_vector(mcp_v, mcp_h);
760 for (
size_t i = 0; i < mcp_v.size(); i++) {
761 auto mcp = mcp_v.at(i);
763 _trackid_to_mcparticle[mcp->TrackId()] = *mcp;
766 for (
size_t i = 0; i < mcp_v.size(); i++) {
767 auto mcp = mcp_v.at(i);
772 if (mcp->Process() ==
"primary") {
774 _mcp_px.push_back(mcp->Px());
775 _mcp_py.push_back(mcp->Py());
776 _mcp_pz.push_back(mcp->Pz());
777 _mcp_e.push_back(mcp->E());
779 _mcp_vx.push_back(mcp->Vx());
780 _mcp_vy.push_back(mcp->Vy());
781 _mcp_vz.push_back(mcp->Vz());
782 _mcp_endx.push_back(mcp->EndX());
783 _mcp_endy.push_back(mcp->EndY());
784 _mcp_endz.push_back(mcp->EndZ());
786 _mcp_pdg.push_back(mcp->PdgCode());
787 _mcp_mother.push_back(mcp->Mother());
788 _mcp_status_code.push_back(mcp->StatusCode());
789 _mcp_process.push_back(mcp->Process());
790 _mcp_end_process.push_back(mcp->EndProcess());
791 _mcp_trackid.push_back(mcp->TrackId());
797 bool in_det = InDetector(mcp, step);
798 _mcp_intpc.push_back(in_det);
800 if (mcp->PdgCode() == 2112 && in_det){
801 unsigned int nSec = mcp->NumberDaughters();
802 for (
size_t d = 0; d < nSec; ++d) {
803 auto d_search = _trackid_to_mcparticle.find(mcp->Daughter(d));
804 if (d_search != _trackid_to_mcparticle.end()) {
805 auto const& daughter = d_search->second;
806 _neut_daughters_pdg.push_back(daughter.PdgCode());
807 _neut_daughters_px.push_back(daughter.Px());
808 _neut_daughters_py.push_back(daughter.Py());
809 _neut_daughters_pz.push_back(daughter.Pz());
810 _neut_daughters_e.push_back(daughter.E());
811 _neut_daughters_startprocess.push_back(daughter.Process());
812 _neut_daughters_endprocess.push_back(daughter.EndProcess());
813 _neut_daughters_start_x.push_back(daughter.Vx());
814 _neut_daughters_start_y.push_back(daughter.Vy());
815 _neut_daughters_start_z.push_back(daughter.Vz());
816 _neut_daughters_end_x.push_back(daughter.EndX());
817 _neut_daughters_end_y.push_back(daughter.EndY());
818 _neut_daughters_end_z.push_back(daughter.EndZ());
819 _neut_daughters_trackid.push_back(daughter.TrackId());
824 if (
std::abs(daughter.PdgCode())==211 || daughter.PdgCode()==111 || daughter.PdgCode()==2112){
825 unsigned int ngd = daughter.NumberDaughters();
826 for (
size_t gd = 0; gd < ngd ; ++gd) {
827 auto gd_search = _trackid_to_mcparticle.find(daughter.Daughter(gd));
828 if (gd_search != _trackid_to_mcparticle.end()) {
829 auto const& granddaughter = gd_search->second;
833 _neut_grand_daughters_pdg.push_back(granddaughter.PdgCode());
834 _neut_grand_daughters_px.push_back(granddaughter.Px());
835 _neut_grand_daughters_py.push_back(granddaughter.Py());
836 _neut_grand_daughters_pz.push_back(granddaughter.Pz());
837 _neut_grand_daughters_e.push_back(granddaughter.E());
838 _neut_grand_daughters_startprocess.push_back(granddaughter.Process());
839 _neut_grand_daughters_endprocess.push_back(granddaughter.EndProcess());
840 _neut_grand_daughters_start_x.push_back(granddaughter.Vx());
841 _neut_grand_daughters_start_y.push_back(granddaughter.Vy());
842 _neut_grand_daughters_start_z.push_back(granddaughter.Vz());
843 _neut_grand_daughters_end_x.push_back(granddaughter.EndX());
844 _neut_grand_daughters_end_y.push_back(granddaughter.EndY());
845 _neut_grand_daughters_end_z.push_back(granddaughter.EndZ());
846 _neut_grand_daughters_trackid.push_back(granddaughter.TrackId());
865 _mcp_intpc_nu_e.push_back(mcp->E(step));
866 _mcp_intpc_e.push_back(mcp->E(step-1));
872 _mcp_intpc_e.push_back(-9999.);
873 _mcp_intpc_nu_e.push_back(-9999.);
889 art::Handle<std::vector<sim::MCTrack> > mc_track_h;
890 e.getByLabel(_mctrack_producer, mc_track_h);
891 if(!mc_track_h.isValid()){
892 std::cout <<
"MCTrack product " << _mctrack_producer <<
" not found..." << std::endl;
893 throw std::exception();
896 std::vector<art::Ptr<sim::MCTrack>> mc_track_v;
897 art::fill_ptr_vector(mc_track_v, mc_track_h);
899 for (
size_t i = 0; i < mc_track_v.size(); i++) {
900 auto mc_track = mc_track_v.at(i);
910 auto iter = _trackid_to_mcparticle.find(mc_track->TrackID());
911 int mother_in_ob = -1;
912 if (iter != _trackid_to_mcparticle.end()) {
913 mother_in_ob = FindMotherInOverburden(iter->second);
917 if (mc_track->Start().E() < 1) {
919 if (mother_in_ob != -1){
920 _n_mct_lt1_from_ob ++;
926 if (mc_track->size() == 0) {
930 geo::Point_t mctrackstartPoint(mc_track->Start().X(),mc_track->Start().Y(), mc_track->Start().Z());
931 geo::Point_t mctrackendPoint(mc_track->End().X(),mc_track->End().Y(), mc_track->End().Z());
936 if (!mctpcstartGeo || !mctpcendGeo)
continue;
939 if (!mctpcstartGeo->ActiveBoundingBox().ContainsPosition(mctrackstartPoint) ||
943 _mct_pdg.push_back(mc_track->PdgCode());
944 _mct_process.push_back(mc_track->Process());
946 _mct_start_x.push_back(mc_track->Start().X());
947 _mct_start_y.push_back(mc_track->Start().Y());
948 _mct_start_z.push_back(mc_track->Start().Z());
950 _mct_end_x.push_back(mc_track->End().X());
951 _mct_end_y.push_back(mc_track->End().Y());
952 _mct_end_z.push_back(mc_track->End().Z());
954 _mct_start_px.push_back(mc_track->Start().Px());
955 _mct_start_py.push_back(mc_track->Start().Py());
956 _mct_start_pz.push_back(mc_track->Start().Pz());
957 _mct_start_e.push_back(mc_track->Start().E());
959 _mct_mother_pdg.push_back(mc_track->MotherPdgCode());
960 _mct_mother_process.push_back(mc_track->MotherProcess());
961 _mct_ancestor_pdg.push_back(mc_track->AncestorPdgCode());
962 _mct_ancestor_process.push_back(mc_track->AncestorProcess());
964 _mct_mother_in_ob_trackid.push_back(mother_in_ob);
971 art::Handle<std::vector<sim::MCShower> > mc_shower_h;
972 e.getByLabel(_mcshower_producer, mc_shower_h);
973 if(!mc_shower_h.isValid()){
974 std::cout <<
"MCShower product " << _mcshower_producer <<
" not found..." << std::endl;
975 throw std::exception();
978 std::vector<art::Ptr<sim::MCShower>> mc_shower_v;
979 art::fill_ptr_vector(mc_shower_v, mc_shower_h);
981 for (
size_t i = 0; i < mc_shower_v.size(); i++) {
982 auto mc_shower = mc_shower_v.at(i);
991 auto iter = _trackid_to_mcparticle.find(mc_shower->TrackID());
992 int mother_in_ob = -1;
993 if (iter != _trackid_to_mcparticle.end()) {
994 mother_in_ob = FindMotherInOverburden(iter->second);
998 if (mc_shower->Start().E() < 1) {
1000 if (mother_in_ob != -1){
1001 _n_mcs_lt1_from_ob ++;
1009 bool end_in_det = InDetector(mc_shower->End().X(), mc_shower->End().Y(), mc_shower->End().Z());
1015 _mcs_pdg.push_back(mc_shower->PdgCode());
1016 _mcs_process.push_back(mc_shower->Process());
1018 _mcs_start_x.push_back(mc_shower->Start().X());
1019 _mcs_start_y.push_back(mc_shower->Start().Y());
1020 _mcs_start_z.push_back(mc_shower->Start().Z());
1022 _mcs_end_x.push_back(mc_shower->End().X());
1023 _mcs_end_y.push_back(mc_shower->End().Y());
1024 _mcs_end_z.push_back(mc_shower->End().Z());
1026 _mcs_start_px.push_back(mc_shower->Start().Px());
1027 _mcs_start_py.push_back(mc_shower->Start().Py());
1028 _mcs_start_pz.push_back(mc_shower->Start().Pz());
1029 _mcs_start_e.push_back(mc_shower->Start().E());
1030 _mcs_charge_col.push_back(mc_shower->Charge(2));
1031 _mcs_charge_ind2.push_back(mc_shower->Charge(1));
1032 _mcs_charge_ind1.push_back(mc_shower->Charge(0));
1034 _mcs_mother_pdg.push_back(mc_shower->MotherPdgCode());
1035 _mcs_mother_trackid.push_back(mc_shower->MotherTrackID());
1036 _mcs_mother_start_x.push_back(mc_shower->MotherStart().X());
1037 _mcs_mother_start_y.push_back(mc_shower->MotherStart().Y());
1038 _mcs_mother_start_z.push_back(mc_shower->MotherStart().Z());
1039 _mcs_mother_start_e.push_back(mc_shower->MotherStart().E());
1040 _mcs_mother_end_x.push_back(mc_shower->MotherEnd().X());
1041 _mcs_mother_end_y.push_back(mc_shower->MotherEnd().Y());
1042 _mcs_mother_end_z.push_back(mc_shower->MotherEnd().Z());
1043 _mcs_mother_end_e.push_back(mc_shower->MotherEnd().E());
1045 _mcs_mother_process.push_back(mc_shower->MotherProcess());
1046 _mcs_ancestor_pdg.push_back(mc_shower->AncestorPdgCode());
1047 _mcs_ancestor_process.push_back(mc_shower->AncestorProcess());
1048 _mcs_ancestor_start_e.push_back(mc_shower->AncestorStart().E());
1049 _mcs_ancestor_end_e.push_back(mc_shower->AncestorEnd().E());
1050 _mcs_mother_in_ob_trackid.push_back(mother_in_ob);
1052 if (mc_shower->MotherPdgCode() == 111 && _save_pi0_tree) {
1053 SavePi0ShowerInfo(mc_shower->MotherTrackID());
1056 if (
std::abs(mc_shower->MotherPdgCode()) == 13 && _save_muon_tree) {
1057 SaveMuonShowerInfo(mc_shower->MotherTrackID());
1068 auto it = std::find(_pi0_ids.begin(), _pi0_ids.end(), pi0_track_id);
1069 if (it != _pi0_ids.end()) {
1073 _pi0_ids.push_back(pi0_track_id);
1076 auto iter = _trackid_to_mcparticle.find(pi0_track_id);
1077 if (iter == _trackid_to_mcparticle.end()) {
1082 simb::MCParticle pi0_mcp = iter->second;
1086 _pi0_par_e = pi0_mcp.E();
1087 _pi0_par_start_x = pi0_mcp.Vx();
1088 _pi0_par_start_y = pi0_mcp.Vy();
1089 _pi0_par_start_z = pi0_mcp.Vz();
1090 _pi0_par_end_x = pi0_mcp.EndX();
1091 _pi0_par_end_y = pi0_mcp.EndY();
1092 _pi0_par_end_z = pi0_mcp.EndZ();
1100 simb::MCParticle pi0_mother_mcp;
1101 if (pi0_mcp.Mother() == 0) {
1103 pi0_mother_mcp = pi0_mcp;
1105 iter = _trackid_to_mcparticle.find(pi0_mcp.Mother());
1106 if (iter == _trackid_to_mcparticle.end()) {
1109 pi0_mother_mcp = iter->second;
1113 _pi0_par_mother_pdg = pi0_mother_mcp.PdgCode();
1114 _pi0_par_mother_e = pi0_mother_mcp.E();
1115 _pi0_par_mother_end_e = pi0_mother_mcp.EndE();
1120 for (
int d = 0; d < pi0_mother_mcp.NumberDaughters(); d++) {
1121 iter = _trackid_to_mcparticle.find(pi0_mother_mcp.Daughter(d));
1122 if (iter != _trackid_to_mcparticle.end()) {
1123 simb::MCParticle daughter = iter->second;
1124 _pi0_event_particles_pdg.push_back(daughter.PdgCode());
1125 _pi0_event_particles_e.push_back(daughter.E());
1130 _pi0_genealogy_pdg.push_back(pi0_mother_mcp.PdgCode());
1131 _pi0_genealogy_startprocess.push_back(pi0_mother_mcp.Process());
1132 _pi0_genealogy_endprocess.push_back(pi0_mother_mcp.EndProcess());
1133 _pi0_genealogy_mother.push_back(pi0_mother_mcp.Mother());
1134 _pi0_genealogy_e.push_back(pi0_mother_mcp.E());
1135 _pi0_genealogy_start_x.push_back(pi0_mother_mcp.Vx());
1136 _pi0_genealogy_start_y.push_back(pi0_mother_mcp.Vy());
1137 _pi0_genealogy_start_z.push_back(pi0_mother_mcp.Vy());
1138 _pi0_genealogy_end_x.push_back(pi0_mother_mcp.EndX());
1139 _pi0_genealogy_end_y.push_back(pi0_mother_mcp.EndY());
1140 _pi0_genealogy_end_z.push_back(pi0_mother_mcp.EndZ());
1141 _pi0_genealogy_trackid.push_back(pi0_mother_mcp.TrackId());
1145 simb::MCParticle mcp = pi0_mother_mcp;
1147 iter = _trackid_to_mcparticle.find(mcp.Mother());
1148 if (iter == _trackid_to_mcparticle.end()) {
1152 _pi0_genealogy_pdg.push_back(mcp.PdgCode());
1153 _pi0_genealogy_startprocess.push_back(mcp.Process());
1154 _pi0_genealogy_endprocess.push_back(mcp.EndProcess());
1155 _pi0_genealogy_mother.push_back(mcp.Mother());
1156 _pi0_genealogy_e.push_back(mcp.E());
1157 _pi0_genealogy_start_x.push_back(mcp.Vx());
1158 _pi0_genealogy_start_y.push_back(mcp.Vy());
1159 _pi0_genealogy_start_z.push_back(mcp.Vy());
1160 _pi0_genealogy_end_x.push_back(mcp.EndX());
1161 _pi0_genealogy_end_y.push_back(mcp.EndY());
1162 _pi0_genealogy_end_z.push_back(mcp.EndZ());
1163 _pi0_genealogy_trackid.push_back(mcp.TrackId());
1166 _pi0_par_ancestor_trackid = _pi0_genealogy_trackid.back();
1167 _pi0_par_ancestor_uuid = _uuid_str +
"-" +
std::to_string(_pi0_par_ancestor_trackid);
1171 for (
int d = 0; d < pi0_mcp.NumberDaughters(); d++) {
1172 iter = _trackid_to_mcparticle.find(pi0_mcp.Daughter(d));
1173 if (iter != _trackid_to_mcparticle.end()) {
1174 simb::MCParticle daughter = iter->second;
1175 _pi0_daughters_pdg.push_back(daughter.PdgCode());
1176 _pi0_daughters_e.push_back(daughter.E());
1177 _pi0_daughters_startprocess.push_back(daughter.Process());
1178 _pi0_daughters_endprocess.push_back(daughter.EndProcess());
1179 _pi0_daughters_start_x.push_back(daughter.Vx());
1180 _pi0_daughters_start_y.push_back(daughter.Vy());
1181 _pi0_daughters_start_z.push_back(daughter.Vz());
1182 _pi0_daughters_end_x.push_back(daughter.EndX());
1183 _pi0_daughters_end_y.push_back(daughter.EndY());
1184 _pi0_daughters_end_z.push_back(daughter.EndZ());
1192 _pi0_event_particles_pdg.clear();
1193 _pi0_event_particles_e.clear();
1195 _pi0_daughters_pdg.clear();
1196 _pi0_daughters_e.clear();
1197 _pi0_daughters_startprocess.clear();
1198 _pi0_daughters_endprocess.clear();
1199 _pi0_daughters_start_x.clear();
1200 _pi0_daughters_start_y.clear();
1201 _pi0_daughters_start_z.clear();
1202 _pi0_daughters_end_x.clear();
1203 _pi0_daughters_end_y.clear();
1204 _pi0_daughters_end_z.clear();
1206 _pi0_genealogy_pdg.clear();
1207 _pi0_genealogy_startprocess.clear();
1208 _pi0_genealogy_endprocess.clear();
1209 _pi0_genealogy_mother.clear();
1210 _pi0_genealogy_e.clear();
1211 _pi0_genealogy_start_x.clear();
1212 _pi0_genealogy_start_y.clear();
1213 _pi0_genealogy_start_z.clear();
1214 _pi0_genealogy_end_x.clear();
1215 _pi0_genealogy_end_y.clear();
1216 _pi0_genealogy_end_z.clear();
1217 _pi0_genealogy_trackid.clear();
1223 auto it = std::find(_muon_ids.begin(), _muon_ids.end(), muon_track_id);
1224 if (it != _muon_ids.end()) {
1228 _muon_ids.push_back(muon_track_id);
1231 auto iter = _trackid_to_mcparticle.find(muon_track_id);
1232 if (iter == _trackid_to_mcparticle.end()) {
1235 simb::MCParticle muon_mcp = iter->second;
1239 _muon_par_e = muon_mcp.E();
1240 _muon_par_start_x = muon_mcp.Vx();
1241 _muon_par_start_y = muon_mcp.Vy();
1242 _muon_par_start_z = muon_mcp.Vz();
1243 _muon_par_end_x = muon_mcp.EndX();
1244 _muon_par_end_y = muon_mcp.EndY();
1245 _muon_par_end_z = muon_mcp.EndZ();
1248 simb::MCParticle muon_mother_mcp;
1249 if (muon_mcp.Mother() == 0) {
1251 muon_mother_mcp = muon_mcp;
1253 iter = _trackid_to_mcparticle.find(muon_mcp.Mother());
1254 if (iter == _trackid_to_mcparticle.end()) {
1257 muon_mother_mcp = iter->second;
1267 _muon_par_mother_pdg = muon_mother_mcp.PdgCode();
1268 _muon_par_mother_e = muon_mother_mcp.E();
1269 _muon_par_mother_end_e = muon_mother_mcp.EndE();
1274 for (
int d = 0; d < muon_mother_mcp.NumberDaughters(); d++) {
1275 iter = _trackid_to_mcparticle.find(muon_mother_mcp.Daughter(d));
1276 if (iter != _trackid_to_mcparticle.end()) {
1277 simb::MCParticle daughter = iter->second;
1278 _muon_event_particles_pdg.push_back(daughter.PdgCode());
1279 _muon_event_particles_e.push_back(daughter.E());
1284 _muon_genealogy_pdg.push_back(muon_mother_mcp.PdgCode());
1285 _muon_genealogy_startprocess.push_back(muon_mother_mcp.Process());
1286 _muon_genealogy_endprocess.push_back(muon_mother_mcp.EndProcess());
1287 _muon_genealogy_mother.push_back(muon_mother_mcp.Mother());
1288 _muon_genealogy_e.push_back(muon_mother_mcp.E());
1289 _muon_genealogy_start_x.push_back(muon_mother_mcp.Vx());
1290 _muon_genealogy_start_y.push_back(muon_mother_mcp.Vy());
1291 _muon_genealogy_start_z.push_back(muon_mother_mcp.Vy());
1292 _muon_genealogy_end_x.push_back(muon_mother_mcp.EndX());
1293 _muon_genealogy_end_y.push_back(muon_mother_mcp.EndY());
1294 _muon_genealogy_end_z.push_back(muon_mother_mcp.EndZ());
1295 _muon_genealogy_trackid.push_back(muon_mother_mcp.TrackId());
1299 simb::MCParticle mcp = muon_mother_mcp;
1301 iter = _trackid_to_mcparticle.find(mcp.Mother());
1302 if (iter == _trackid_to_mcparticle.end()) {
1306 _muon_genealogy_pdg.push_back(mcp.PdgCode());
1307 _muon_genealogy_startprocess.push_back(mcp.Process());
1308 _muon_genealogy_endprocess.push_back(mcp.EndProcess());
1309 _muon_genealogy_mother.push_back(mcp.Mother());
1310 _muon_genealogy_e.push_back(mcp.E());
1311 _muon_genealogy_start_x.push_back(mcp.Vx());
1312 _muon_genealogy_start_y.push_back(mcp.Vy());
1313 _muon_genealogy_start_z.push_back(mcp.Vy());
1314 _muon_genealogy_end_x.push_back(mcp.EndX());
1315 _muon_genealogy_end_y.push_back(mcp.EndY());
1316 _muon_genealogy_end_z.push_back(mcp.EndZ());
1317 _muon_genealogy_trackid.push_back(mcp.TrackId());
1320 _muon_par_ancestor_trackid = _muon_genealogy_trackid.back();
1321 _muon_par_ancestor_uuid = _uuid_str +
"-" +
std::to_string(_muon_par_ancestor_trackid);
1325 for (
int d = 0; d < muon_mcp.NumberDaughters(); d++) {
1326 iter = _trackid_to_mcparticle.find(muon_mcp.Daughter(d));
1327 if (iter != _trackid_to_mcparticle.end()) {
1328 simb::MCParticle daughter = iter->second;
1329 _muon_daughters_pdg.push_back(daughter.PdgCode());
1330 _muon_daughters_e.push_back(daughter.E());
1331 _muon_daughters_startprocess.push_back(daughter.Process());
1332 _muon_daughters_endprocess.push_back(daughter.EndProcess());
1333 _muon_daughters_start_x.push_back(daughter.Vx());
1334 _muon_daughters_start_y.push_back(daughter.Vy());
1335 _muon_daughters_start_z.push_back(daughter.Vz());
1336 _muon_daughters_end_x.push_back(daughter.EndX());
1337 _muon_daughters_end_y.push_back(daughter.EndY());
1338 _muon_daughters_end_z.push_back(daughter.EndZ());
1346 _muon_event_particles_pdg.clear();
1347 _muon_event_particles_e.clear();
1349 _muon_daughters_pdg.clear();
1350 _muon_daughters_e.clear();
1351 _muon_daughters_startprocess.clear();
1352 _muon_daughters_endprocess.clear();
1353 _muon_daughters_start_x.clear();
1354 _muon_daughters_start_y.clear();
1355 _muon_daughters_start_z.clear();
1356 _muon_daughters_end_x.clear();
1357 _muon_daughters_end_y.clear();
1358 _muon_daughters_end_z.clear();
1360 _muon_genealogy_pdg.clear();
1361 _muon_genealogy_startprocess.clear();
1362 _muon_genealogy_endprocess.clear();
1363 _muon_genealogy_mother.clear();
1364 _muon_genealogy_e.clear();
1365 _muon_genealogy_start_x.clear();
1366 _muon_genealogy_start_y.clear();
1367 _muon_genealogy_start_z.clear();
1368 _muon_genealogy_end_x.clear();
1369 _muon_genealogy_end_y.clear();
1370 _muon_genealogy_end_z.clear();
1371 _muon_genealogy_trackid.clear();
1378 if (mcp.Process() ==
"primary") {
1384 bool vtx_in_ob = _part_filter->mustKeep(
Point_t{{ mcp.Vx(),
1388 auto iter = _trackid_to_mcparticle.find(mcp.Mother());
1389 if (iter == _trackid_to_mcparticle.end()) {
1392 auto mother = iter->second;
1396 && mcp.Process() !=
"primary"
1399 return mcp.TrackId();
1402 return FindMotherInOverburden(mother);
1407 (std::set<std::string>
const& vol_names)
const
1411 if (vol_names.empty())
return {};
1413 auto const& geom = *art::ServiceHandle<geo::Geometry const>();
1415 std::vector<std::vector<TGeoNode const*>> node_paths
1416 = geom.FindAllVolumePaths(vol_names);
1421 GeoVolumePairs.reserve(node_paths.size());
1425 for (
size_t iVolume = 0; iVolume < node_paths.size(); ++iVolume) {
1426 std::vector<TGeoNode const*>
path = node_paths[iVolume];
1428 TGeoTranslation* pTransl =
new TGeoTranslation(0.,0.,0.);
1429 TGeoRotation* pRot =
new TGeoRotation();
1430 for (TGeoNode
const* node: path) {
1431 TGeoTranslation thistranslate(*node->GetMatrix());
1432 TGeoRotation thisrotate(*node->GetMatrix());
1433 pTransl->Add(&thistranslate);
1434 *pRot=*pRot * thisrotate;
1439 TGeoTranslation* pTransl2 =
new TGeoTranslation(pTransl->GetTranslation()[0],
1440 pTransl->GetTranslation()[1],
1441 pTransl->GetTranslation()[2]);
1442 double phi=0.,theta=0.,psi=0.;
1443 pRot->GetAngles(phi,theta,psi);
1444 TGeoRotation* pRot2 =
new TGeoRotation();
1445 pRot2->SetAngles(phi,theta,psi);
1447 TGeoCombiTrans* pTransf =
new TGeoCombiTrans(*pTransl2,*pRot2);
1448 GeoVolumePairs.emplace_back(node_paths[iVolume].back()->GetVolume(), pTransf);
1452 return std::make_unique<util::PositionInVolumeFilter>(std::move(GeoVolumePairs));
1460 _n_mct_lt1_from_ob = 0;
1462 _n_mcs_lt1_from_ob = 0;
1476 _mcp_mother.clear();
1477 _mcp_status_code.clear();
1478 _mcp_process.clear();
1479 _mcp_end_process.clear();
1481 _mcp_intpc_e.clear();
1482 _mcp_trackid.clear();
1483 _mcp_intpc_nu_e.clear();
1485 _neut_daughters_pdg.clear();
1486 _neut_daughters_e.clear();
1487 _neut_daughters_px.clear();
1488 _neut_daughters_py.clear();
1489 _neut_daughters_pz.clear();
1490 _neut_daughters_startprocess.clear();
1491 _neut_daughters_endprocess.clear();
1492 _neut_daughters_start_x.clear();
1493 _neut_daughters_start_y.clear();
1494 _neut_daughters_start_z.clear();
1495 _neut_daughters_end_x.clear();
1496 _neut_daughters_end_y.clear();
1497 _neut_daughters_end_z.clear();
1498 _neut_daughters_trackid.clear();
1500 _neut_grand_daughters_pdg.clear();
1501 _neut_grand_daughters_e.clear();
1502 _neut_grand_daughters_px.clear();
1503 _neut_grand_daughters_py.clear();
1504 _neut_grand_daughters_pz.clear();
1505 _neut_grand_daughters_startprocess.clear();
1506 _neut_grand_daughters_endprocess.clear();
1507 _neut_grand_daughters_start_x.clear();
1508 _neut_grand_daughters_start_y.clear();
1509 _neut_grand_daughters_start_z.clear();
1510 _neut_grand_daughters_end_x.clear();
1511 _neut_grand_daughters_end_y.clear();
1512 _neut_grand_daughters_end_z.clear();
1513 _neut_grand_daughters_trackid.clear();
1516 _mcs_process.clear();
1517 _mcs_start_x.clear();
1518 _mcs_start_y.clear();
1519 _mcs_start_z.clear();
1523 _mcs_start_px.clear();
1524 _mcs_start_py.clear();
1525 _mcs_start_pz.clear();
1526 _mcs_start_e.clear();
1527 _mcs_charge_col.clear();
1528 _mcs_charge_ind2.clear();
1529 _mcs_charge_ind1.clear();
1530 _mcs_mother_pdg.clear();
1531 _mcs_mother_trackid.clear();
1532 _mcs_mother_process.clear();
1533 _mcs_mother_start_x.clear();
1534 _mcs_mother_start_y.clear();
1535 _mcs_mother_start_z.clear();
1536 _mcs_mother_start_e.clear();
1537 _mcs_mother_end_x.clear();
1538 _mcs_mother_end_y.clear();
1539 _mcs_mother_end_z.clear();
1540 _mcs_mother_end_e.clear();
1541 _mcs_ancestor_pdg.clear();
1542 _mcs_ancestor_process.clear();
1543 _mcs_ancestor_start_e.clear();
1544 _mcs_ancestor_end_e.clear();
1545 _mcs_mother_in_ob_trackid.clear();
1549 _mct_process.clear();
1550 _mct_start_x.clear();
1551 _mct_start_y.clear();
1552 _mct_start_z.clear();
1556 _mct_start_px.clear();
1557 _mct_start_py.clear();
1558 _mct_start_pz.clear();
1559 _mct_start_e.clear();
1560 _mct_mother_pdg.clear();
1561 _mct_mother_process.clear();
1562 _mct_ancestor_pdg.clear();
1563 _mct_ancestor_process.clear();
1564 _mct_mother_in_ob_trackid.clear();
1573 const double&
z)
const {
1575 return (((x > xminc0 && x < xmaxc0)
1576 || (x > xminc1 && x < xmaxc1))
1577 && y > ymin && y < ymax
1578 && z > zmin && z < zmax);
1593 auto t = mcp->Trajectory();
1596 fGeometry = lar::providerFrom<geo::Geometry>();
1598 for (
size_t i = 0; i < t.size(); i++) {
1600 const TLorentzVector& pos = mcp->Position(i);
1605 if (!tpcGeo)
continue;
1607 if (tpcGeo->ActiveBoundingBox().ContainsPosition(trackPoint)){
1621 _sr_subrun = sr.subRun();
1622 _sr_begintime = sr.beginTime().value();
1623 _sr_endtime = sr.endTime().value();
1625 art::Handle<sumdata::POTSummary> pot_handle;
1626 sr.getByLabel(_mctruth_producer, pot_handle);
1628 if (pot_handle.isValid()) {
1629 _sr_pot = pot_handle->totpot;
std::vector< float > _mct_mother_pdg
std::vector< float > _muon_genealogy_end_z
The full muon genealogy, from its mother all the way to the ancestor (end z)
TTree * _muon_tree
A muon TTree, one entry per muon.
std::vector< float > _mcs_mother_start_e
int _nu_pip_mult
Pi0 multiplicity.
float _pi0_par_end_y
The pi0 end y.
process_name opflash particleana ie ie ie z
std::vector< int > _muon_genealogy_mother
The full muon genealogy, from its mother all the way to the ancestor (mother track id) ...
std::vector< float > _mcp_intpc_e
std::vector< float > _mct_start_pz
float _pi0_par_e
The pi0 energy.
std::vector< float > _mcs_mother_start_z
int _n_mcs_lt1
Number of MC showers with energy less than 10 MeV.
float _muon_par_end_z
The muon end z.
std::vector< float > _mcp_vx
std::string _mctruth_producer
std::vector< float > _pi0_daughters_end_z
All the pi0 daughters (usually two photons) (end z)
int _n_mct_lt1
Number of MC tracks with energy less than 10 MeV.
std::vector< float > _pi0_daughters_end_y
All the pi0 daughters (usually two photons) (end y)
std::vector< float > _mcs_start_z
std::vector< std::string > _mcs_ancestor_process
std::vector< float > _pi0_genealogy_start_x
The full pi0 genealogy, from its mother all the way to the ancestor (start x)
std::vector< float > _mcp_pdg
Utilities related to art service access.
std::vector< float > _mct_end_x
void SaveMuonShowerInfo(int muon_track_id)
Saves the muon info to a separate tree, give the muon track id.
std::vector< float > _mcs_mother_end_x
std::vector< float > _neut_grand_daughters_end_z
All the neutrons grand daughters end z.
process_name opflash particleana ie x
float _pi0_par_start_z
The pi0 start z.
std::vector< float > _mcs_ancestor_pdg
std::vector< float > _mcp_status_code
std::map< unsigned int, simb::MCParticle > _trackid_to_mcparticle
std::vector< float > _neut_grand_daughters_px
All the neutrons grand daughters momentrum in x direction.
std::vector< float > _mcs_start_e
std::vector< float > _mcp_endx
std::vector< float > _neut_daughters_pz
All the neutron daughters momentrum in z direction.
bool InDetector(const double &x, const double &y, const double &z) const
Check if the point is in the detector.
std::vector< float > _mcp_endy
std::vector< float > _neut_daughters_end_x
All the neutron daughters end x.
std::vector< float > _mcs_mother_end_e
std::vector< float > _mct_start_py
std::vector< std::string > _muon_daughters_endprocess
void clear_vectors()
Clear vectors.
std::vector< float > _muon_genealogy_e
The full muon genealogy, from its mother all the way to the ancestor (energy)
std::vector< float > _mcs_mother_end_z
std::vector< VolumeInfo_t > AllVolumeInfo_t
std::vector< float > _pars_e
All other particles produced - energy.
Geometry information for a single TPC.
std::vector< float > _mcs_ancestor_start_e
std::vector< std::string > _pi0_genealogy_startprocess
The full pi0 genealogy, from its mother all the way to the ancestor (start process) ...
std::vector< float > _neut_daughters_trackid
All the neutron daughters trackid.
std::array< double, 3 > Point_t
std::vector< float > _muon_genealogy_start_z
The full muon genealogy, from its mother all the way to the ancestor (start z)
geo::BoxBoundedGeo const & ActiveBoundingBox() const
Returns the box of the active volume of this TPC.
geo::TPCGeo const * PositionToTPCptr(geo::Point_t const &point) const
Returns the TPC at specified location.
std::vector< float > _pi0_daughters_end_x
All the pi0 daughters (usually two photons) (end x)
double _z_max
z-max of volume box used to determine whether to save track information
int FindMotherInOverburden(simb::MCParticle)
Finds the ancestors that was created in the Ovrburden, if any.
double _sr_begintime
Subrun start time.
std::vector< float > _mct_start_px
float _pi0_par_mother_e
The pi0 mother energy.
std::vector< float > _muon_daughters_end_y
All the muon daughters (usually two photons) (end y)
std::unique_ptr< util::PositionInVolumeFilter > _part_filter
std::vector< float > _mcp_trackid
std::vector< std::string > _neut_daughters_startprocess
All the neutron daughters start process.
int _muon_par_mother_pdg
The muon mother pdg.
std::vector< float > _neut_grand_daughters_e
All the neutrons grand daughters energy.
std::vector< std::string > _muon_genealogy_startprocess
The full muon genealogy, from its mother all the way to the ancestor (start process) ...
float _muon_par_mother_e
The muon mother energy.
std::vector< float > _mcs_start_pz
int _nu_p_mult
Proton multiplicity.
std::vector< int > _pars_pdg
All other particles produced - pdg code.
std::vector< int > _pi0_genealogy_pdg
The full pi0 genealogy, from its mother all the way to the ancestor (pdg)
std::vector< float > _mct_end_z
std::vector< float > _mcs_mother_pdg
std::vector< float > _muon_event_particles_e
All the particles produced together with the muon.
void analyze(art::Event const &e) override
std::vector< float > _mcs_start_py
double _y_max
y-max of volume box used to determine whether to save track information
std::string _mcparticle_producer
std::vector< float > _mcp_intpc_nu_e
std::vector< float > _mcs_mother_start_y
double _sr_pot
Subrun POT.
float _muon_par_mother_end_e
The muon mother energy at end.
std::vector< float > _mct_start_x
std::vector< float > _mcp_vy
BEGIN_PROLOG triggeremu_data_config_icarus settings PMTADCthresholds sequence::icarus_stage0_multiTPC_TPC physics sequence::icarus_stage0_EastHits_TPC physics sequence::icarus_stage0_WestHits_TPC physics producers purityana0 caloskimCalorimetryCryoE physics caloskimCalorimetryCryoW physics path
std::vector< float > _mcp_mother
float _pi0_par_start_y
The pi0 start y.
std::vector< bool > _mcp_intpc
std::vector< float > _neut_daughters_start_y
All the neutron daughters start y.
std::vector< std::string > _mct_mother_process
std::vector< int > _muon_event_particles_pdg
All the particles produced together with the muon.
int _muon_par_ancestor_trackid
The muon primary particle ancestor track id (allows easy muon clustering by cosmic interaction) ...
std::vector< float > _pi0_genealogy_trackid
The full pi0 genealogy, from its mother all the way to the ancestor (trackid)
std::vector< unsigned int > _muon_ids
std::vector< float > _neut_grand_daughters_start_y
All the neutrons grand daughters start y.
std::vector< std::string > _neut_grand_daughters_startprocess
All the neutrons grand daughters start process.
std::vector< float > _muon_genealogy_start_x
The full muon genealogy, from its mother all the way to the ancestor (start x)
std::vector< float > _muon_genealogy_end_y
The full muon genealogy, from its mother all the way to the ancestor (end y)
std::vector< float > _pi0_daughters_e
All the pi0 daughters (usually two photons) (energy)
OBAnaICARUS(fhicl::ParameterSet const &p)
OBAnaICARUS & operator=(OBAnaICARUS const &)=delete
std::vector< float > _mcp_e
process_name opflash particleana ie ie y
std::vector< float > _neut_grand_daughters_end_x
All the neutrons grand daughters end x.
std::vector< std::string > _neut_daughters_endprocess
std::vector< float > _neut_grand_daughters_end_y
All the neutrons grand daughters end y.
std::vector< float > _pi0_genealogy_start_y
The full pi0 genealogy, from its mother all the way to the ancestor (start y)
std::vector< float > _neut_daughters_start_z
All the neutron daughters start z.
std::vector< float > _neut_grand_daughters_start_x
All the neutrons grand daughters start x.
std::vector< float > _mct_pdg
std::vector< float > _mct_start_y
std::vector< float > _mcs_mother_start_x
float _muon_par_end_x
The muon end x.
std::vector< float > _mcs_start_y
std::vector< float > _neut_daughters_start_x
All the neutron daughters start x.
std::string _mctrack_producer
int _pi0_par_mother_pdg
The pi0 mother pdg.
TTree * _sr_tree
TTree filled per subrun.
std::vector< float > _mct_start_z
std::vector< float > _pi0_daughters_start_z
All the pi0 daughters (usually two photons) (start z)
float _muon_par_start_x
The muon start x.
std::vector< float > _mcp_px
std::vector< std::string > _pi0_daughters_endprocess
std::vector< unsigned int > _pi0_ids
int _pi0_par_ancestor_trackid
The pi0 primary particle ancestor track id (allows easy pi0 clustering by cosmic interaction) ...
std::vector< float > _pi0_genealogy_end_y
The full pi0 genealogy, from its mother all the way to the ancestor (end y)
std::string _mcshower_producer
int _n_mct_lt1_from_ob
Number of MC tracks with energy less than 10 MeV and coming from OB.
std::vector< std::string > _neut_grand_daughters_endprocess
TTree * _pi0_tree
A pi0 TTree, one entry per pi0.
Description of geometry of one entire detector.
std::vector< float > _muon_genealogy_start_y
The full muon genealogy, from its mother all the way to the ancestor (start y)
Class def header for mctrack data container.
std::vector< float > _mcs_mother_in_ob_trackid
double _y_min
y-min of volume box used to determine whether to save track information
float _muon_par_start_z
The muon start z.
std::vector< int > _muon_daughters_pdg
All the muon daughters (usually two photons) (pdg)
std::vector< float > _pi0_daughters_start_x
All the pi0 daughters (usually two photons) (start x)
std::vector< float > _mcs_mother_trackid
std::vector< int > _neut_grand_daughters_pdg
All the neutron daughters.
std::vector< float > _mcs_end_y
std::vector< std::string > _mcs_process
std::vector< float > _muon_daughters_end_z
All the muon daughters (usually two photons) (end z)
std::vector< float > _mcs_ancestor_end_e
float _pi0_par_mother_end_e
The pi0 mother energy at end.
std::vector< int > _pi0_daughters_pdg
All the pi0 daughters (usually two photons) (pdg)
int _sr_subrun
Subrun Subrun number.
std::vector< std::string > _mct_ancestor_process
float _pi0_par_end_x
The pi0 end x.
std::vector< double > _mcs_charge_col
std::vector< float > _muon_genealogy_end_x
The full muon genealogy, from its mother all the way to the ancestor (end x)
std::vector< float > _neut_daughters_e
All the neutron daughters energy.
std::string _uuid_str
Same as uuid, but converted to string.
float _pi0_par_start_x
The pi0 start x.
std::unique_ptr< util::PositionInVolumeFilter > CreateParticleVolumeFilter(std::set< std::string > const &vol_names) const
Configures and returns a particle filter.
double _x_min
x-min of volume box used to determine whether to save track information
std::vector< float > _pi0_daughters_start_y
All the pi0 daughters (usually two photons) (start y)
std::vector< double > _mcs_charge_ind1
std::vector< float > _pi0_genealogy_end_x
The full pi0 genealogy, from its mother all the way to the ancestor (end x)
std::vector< float > _mct_end_y
std::vector< float > _muon_daughters_start_y
All the muon daughters (usually two photons) (start y)
std::vector< float > _mcp_vz
std::vector< float > _mcs_pdg
void beginSubRun(art::SubRun const &sr) override
std::vector< float > _neut_grand_daughters_trackid
All the neutrons grand daughters trackid.
std::vector< std::string > _muon_daughters_startprocess
All the muon daughters (usually two photons) (energy) (start process)
boost::uuids::uuid _uuid
A unique ID to identify different events in files with same event number.
float _muon_par_start_y
The muon start y.
std::string to_string(WindowPattern const &pattern)
std::vector< float > _muon_daughters_end_x
All the muon daughters (usually two photons) (end x)
std::vector< int > _pi0_event_particles_pdg
All the particles produced together with the pi0.
std::vector< float > _mcp_endz
int _sr_run
Subrun Run number.
std::vector< float > _neut_daughters_end_y
All the neutron daughters end y.
std::vector< float > _muon_daughters_start_x
All the muon daughters (usually two photons) (start x)
std::vector< float > _mcs_end_x
double _x_max
x-max of volume box used to determine whether to save track information
Class def header for MCShower data container.
std::vector< float > _muon_daughters_e
All the muon daughters (usually two photons) (energy)
std::vector< std::string > _mct_process
std::vector< std::string > _mcs_mother_process
std::vector< std::string > _mcp_process
std::vector< std::string > _overburden_volumes
int _n_mcs_lt1_from_ob
Number of MC showers with energy less than 10 MeV and coming from OB.
std::vector< std::string > _pi0_genealogy_endprocess
The full pi0 genealogy, from its mother all the way to the ancestor (end process) ...
double _sr_endtime
Subrun end time.
float _pi0_par_end_z
The pi0 end z.
std::vector< float > _mct_ancestor_pdg
std::vector< int > _neut_daughters_pdg
All the neutron daughters.
std::vector< double > _mcs_charge_ind2
Defines classes to filter particles based on their trajectory.
std::vector< float > _neut_grand_daughters_start_z
All the neutrons grand daughters start z.
std::vector< float > _mcp_py
int _nu_pi0_mult
Pi plus multiplicity.
std::vector< float > _pi0_genealogy_end_z
The full pi0 genealogy, from its mother all the way to the ancestor (end z)
std::vector< float > _muon_daughters_start_z
All the muon daughters (usually two photons) (start z)
float _muon_par_end_y
The muon end y.
void SavePi0ShowerInfo(int pi0_track_id)
Saves the pi0 info to a separate tree, give the pi0 track id.
std::vector< float > _pi0_genealogy_e
The full pi0 genealogy, from its mother all the way to the ancestor (energy)
std::string _muon_par_ancestor_uuid
The muon unique ID for the event.
std::string _pi0_par_ancestor_uuid
The pi0 unique ID for the event.
std::vector< float > _muon_genealogy_trackid
The full muon genealogy, from its mother all the way to the ancestor (trackid)
std::vector< float > _pi0_event_particles_e
All the particles produced together with the pi0.
std::vector< float > _mcs_start_px
std::vector< float > _mct_start_e
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
std::vector< std::string > _muon_genealogy_endprocess
The full muon genealogy, from its mother all the way to the ancestor (end process) ...
std::vector< float > _mcs_start_x
std::vector< float > _neut_grand_daughters_py
All the neutrons grand daughters momentrum in y direction.
double _z_min
z-min of volume box used to determine whether to save track information
std::vector< float > _mcs_mother_end_y
std::vector< std::string > _mcp_end_process
std::vector< float > _mcp_pz
std::vector< float > _neut_daughters_end_z
All the neutron daughters end z.
std::vector< float > _neut_grand_daughters_pz
All the neutrons grand daughters momentrum in z direction.
std::vector< std::string > _pi0_daughters_startprocess
All the pi0 daughters (usually two photons) (energy) (start process)
float _muon_par_e
The muon energy.
bool ContainsPosition(geo::Point_t const &point, double wiggle=1.0) const
Returns whether this volume contains the specified point.
std::vector< int > _pi0_genealogy_mother
The full pi0 genealogy, from its mother all the way to the ancestor (mother track id) ...
std::vector< float > _mcs_end_z
art framework interface to geometry description
std::vector< int > _muon_genealogy_pdg
The full muon genealogy, from its mother all the way to the ancestor (pdg)
BEGIN_PROLOG could also be cout
std::vector< float > _neut_daughters_py
All the neutron daughters momentrum in y direction.
std::vector< float > _pi0_genealogy_start_z
The full pi0 genealogy, from its mother all the way to the ancestor (start z)
std::vector< float > _mct_mother_in_ob_trackid
std::vector< float > _neut_daughters_px
All the neutron daughters momentrum in x direction.