32 #include "art_root_io/TFileService.h" 38 #include "TEfficiency.h" 39 #include "TGraphAsymmErrors.h" 44 #define MAX_TRACKS 1000 71 bool insideFV(
double vertex[4]);
72 void doEfficiencies();
85 double MC_incoming_P[4];
87 double MC_lepton_startMomentum[4];
138 TEfficiency* h_Eff_Ev = 0;
139 TEfficiency* h_Eff_Pmu = 0;
140 TEfficiency* h_Eff_theta = 0;
141 TEfficiency* h_Eff_Pproton = 0;
142 TEfficiency* h_Eff_Ppion_plus = 0;
143 TEfficiency* h_Eff_Ppion_minus = 0;
145 TEfficiency* h_Eff_Lmuon = 0;
146 TEfficiency* h_Eff_Lproton = 0;
147 TEfficiency* h_Eff_Lpion_plus = 0;
148 TEfficiency* h_Eff_Lpion_minus = 0;
165 TEfficiency* h_Eff_Pkaon = 0;
166 TEfficiency* h_Eff_Pmichel = 0;
167 TEfficiency* h_Eff_Lkaon = 0;
168 TEfficiency* h_Eff_Lmichel = 0;
207 std::cout <<
"job begin..." << std::endl;
208 auto const*
geo = lar::providerFrom<geo::Geometry>();
218 auto const world = tpc.GetCenter();
219 if (minx > world.X() - tpc.HalfWidth()) minx = world.X() - tpc.HalfWidth();
220 if (maxx < world.X() + tpc.HalfWidth()) maxx = world.X() + tpc.HalfWidth();
221 if (miny > world.Y() - tpc.HalfHeight()) miny = world.Y() - tpc.HalfHeight();
222 if (maxy < world.Y() + tpc.HalfHeight()) maxy = world.Y() + tpc.HalfHeight();
223 if (minz > world.Z() - tpc.Length() / 2.) minz = world.Z() - tpc.Length() / 2.;
224 if (maxz < world.Z() + tpc.Length() / 2.) maxz = world.Z() + tpc.Length() / 2.;
234 std::cout <<
"Fiducial volume:" 242 double E_bins[21] = {0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4, 4.5, 5.0,
243 5.5, 6.0, 7.0, 8.0, 10.0, 12.0, 14.0, 17.0, 20.0, 25.0};
244 double theta_bin[44] = {0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.,
245 11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 22.,
246 24., 26., 28., 30., 32., 34., 36., 38., 40., 42., 44.,
247 46., 48., 50., 55., 60., 65., 70., 75., 80., 85., 90.};
249 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.5, 3.0};
251 for (
int i = 0; i < 21; ++i)
253 for (
int i = 0; i < 18; ++i)
257 "h_Ev_den",
"Neutrino Energy; Neutrino Energy (GeV); Tracking Efficiency", 20, E_bins);
259 "h_Ev_num",
"Neutrino Energy; Neutrino Energy (GeV); Tracking Efficiency", 20, E_bins);
261 "h_Pmu_den",
"Muon Momentum; Muon Momentum (GeV); Tracking Efficiency", 20, E_bins);
263 "h_Pmu_num",
"Muon Momentum; Muon Momentum (GeV); Tracking Efficiency", 20, E_bins);
265 tfs->make<TH1D>(
"h_theta_den",
266 "Theta; Theta w.r.t beam direction (Degrees); Tracking Efficiency",
270 tfs->make<TH1D>(
"h_theta_num",
271 "Theta; Theta w.r.t beam direction (Degrees); Tracking Efficiency",
275 "h_Pproton_den",
"Protons; Proton Momentum (GeV); Tracking Efficiency", 17, Pbins);
277 "h_Pproton_num",
"Protons; Proton Momentum (GeV); Tracking Efficiency", 17, Pbins);
279 "h_Ppion_plus_den",
"Pions Plus; Pion Momentum (GeV); Tracking Efficiency", 17, Pbins);
281 "h_Ppion_plus_num",
"Pions Plus; Pion Momentum (GeV); Tracking Efficiency", 17, Pbins);
283 "h_Ppion_minus_den",
"Pions Minus; Pion Momentum (GeV); Tracking Efficiency", 17, Pbins);
285 "h_Ppion_minus_num",
"Pions Minus; Pion Momentum (GeV); Tracking Efficiency", 17, Pbins);
290 h_theta_den->Sumw2();
291 h_theta_num->Sumw2();
292 h_Pproton_den->Sumw2();
293 h_Pproton_num->Sumw2();
294 h_Ppion_plus_den->Sumw2();
295 h_Ppion_plus_num->Sumw2();
296 h_Ppion_minus_den->Sumw2();
297 h_Ppion_minus_num->Sumw2();
299 h_Efrac_lepton = tfs->make<TH1D>(
"h_Efrac_lepton",
"Efrac Lepton; Track Purity;", 60, 0, 1.2);
301 tfs->make<TH1D>(
"h_Ecomplet_lepton",
"Ecomplet Lepton; Track Completeness;", 60, 0, 1.2);
302 h_Efrac_proton = tfs->make<TH1D>(
"h_Efrac_proton",
"Efrac Proton; Track Purity;", 60, 0, 1.2);
304 tfs->make<TH1D>(
"h_Ecomplet_proton",
"Ecomplet Proton; Track Completeness;", 60, 0, 1.2);
306 tfs->make<TH1D>(
"h_Efrac_pion_plus",
"Efrac Pion +; Track Purity;", 60, 0, 1.2);
308 tfs->make<TH1D>(
"h_Ecomplet_pion_plus",
"Ecomplet Pion +; Track Completeness;", 60, 0, 1.2);
310 tfs->make<TH1D>(
"h_Efrac_pion_minus",
"Efrac Pion -; Track Purity;", 60, 0, 1.2);
312 tfs->make<TH1D>(
"h_Ecomplet_pion_minus",
"Ecomplet Pion -; Track Completeness;", 60, 0, 1.2);
314 "h_trackRes_lepton",
"Muon Residual; Truth length - Reco length (cm);", 200, -100, 100);
316 "h_trackRes_proton",
"Proton Residual; Truth length - Reco length (cm);", 200, -100, 100);
318 "h_trackRes_pion_plus",
"Pion + Residual; Truth length - Reco length (cm);", 200, -100, 100);
320 "h_trackRes_pion_minus",
"Pion - Residual; Truth length - Reco length (cm);", 200, -100, 100);
330 h_trackRes_proton->Sumw2();
331 h_trackRes_pion_plus->Sumw2();
332 h_trackRes_pion_minus->Sumw2();
335 tfs->make<TH1D>(
"h_muon_length",
"Muon Length; Muon Truth Length (cm)", 40, 0, 100);
337 tfs->make<TH1D>(
"h_proton_length",
"Proton Length; Proton Truth Length (cm)", 40, 0, 100);
339 tfs->make<TH1D>(
"h_pionp_length",
"Pion + Length; Pion^{+} Truth Length (cm)", 40, 0, 100);
341 tfs->make<TH1D>(
"h_pionm_length",
"Pion - Length; Pion^{-} Truth Length (cm)", 40, 0, 100);
344 tfs->make<TH1D>(
"h_muonwtrk_length",
"Muon Length; Muon Truth Length (cm)", 40, 0, 100);
346 tfs->make<TH1D>(
"h_protonwtrk_length",
"Proton Length; Proton Truth Length (cm)", 40, 0, 100);
348 "h_pionpwtrk_length",
"Pion + Length; Pion^{+} Truth Length (cm)", 40, 0, 100);
350 "h_pionmwtrk_length",
"Pion - Length; Pion^{-} Truth Length (cm)", 40, 0, 100);
353 h_muonwtrk_length->Sumw2();
354 h_proton_length->Sumw2();
355 h_protonwtrk_length->Sumw2();
356 h_pionp_length->Sumw2();
357 h_pionpwtrk_length->Sumw2();
358 h_pionm_length->Sumw2();
359 h_pionmwtrk_length->Sumw2();
362 tfs->make<TH1D>(
"h_Pkaon_den",
"Kaon; Kaon Momentum (GeV); Tracking Efficiency", 17, Pbins);
364 tfs->make<TH1D>(
"h_Pkaon_num",
"Kaon; Kaon Momentum (GeV); Tracking Efficiency", 17, Pbins);
366 tfs->make<TH1D>(
"h_Pmichel_e_den",
367 "Michel Electron; Michele e Momentum (GeV); Tracking Efficiency",
371 tfs->make<TH1D>(
"h_Pmichel_e_num",
372 "Michel Electron; Michele e Momentum (GeV); Tracking Efficiency",
376 h_Pkaon_num->Sumw2();
377 h_Pmichel_e_den->Sumw2();
378 h_Pmichel_e_num->Sumw2();
379 h_Efrac_kaon = tfs->make<TH1D>(
"h_Efrac_kaon",
"Efrac Kaon; Track Purity;", 60, 0, 1.2);
381 tfs->make<TH1D>(
"h_Ecomplet_kaon",
"Ecomplet Kaon; Track Completeness;", 60, 0, 1.2);
383 "h_trackRes_kaon",
"Kaon Residual; Truth length - Reco length (cm);", 200, -100, 100);
385 tfs->make<TH1D>(
"h_Efrac_michel",
"Efrac Michel; Track Energy fraction;", 60, 0, 1.2);
387 tfs->make<TH1D>(
"h_Ecomplet_michel",
"Ecomplet Michel; Track Completeness;", 60, 0, 1.2);
389 "h_trackRes_michel",
"Michel Residual; Truth length - Reco length (cm);", 200, -100, 100);
391 tfs->make<TH1D>(
"h_kaon_length",
"Kaon Length; Kaon Truth Length (cm)", 40, 0, 100);
393 tfs->make<TH1D>(
"h_kaonwtrk_length",
"Kaon Length; Kaon Truth Length (cm)", 40, 0, 100);
395 tfs->make<TH1D>(
"h_michel_length",
"Michel Length; Michel e Truth Length (cm)", 40, 0, 100);
397 "h_michelwtrk_length",
"Michel Length; Michel e Truth Length (cm)", 40, 0, 100);
402 h_Efrac_michel->Sumw2();
405 h_kaon_length->Sumw2();
406 h_kaonwtrk_length->Sumw2();
407 h_michel_length->Sumw2();
408 h_michelwtrk_length->Sumw2();
418 mf::LogInfo(
"NeutrinoTrackingEff") <<
"begin run..." << std::endl;
433 std::vector<art::Ptr<simb::MCTruth>> MCtruthlist;
438 MCtruth = MCtruthlist[0];
443 else if (nu.
CCNC() == 1)
447 const TLorentzVector& nu_momentum = nu.
Nu().
Momentum(0);
455 double tmp_leadingPionPlusE = 0.0;
456 double tmp_leadingPionMinusE = 0.0;
457 double tmp_leadingProtonE = 0.0;
471 auto const clockData =
477 particle = ipar->second;
479 const TLorentzVector& lepton_momentum = particle->
Momentum(0);
486 if (particle->
Mother() == 0) {
488 if (particle->
PdgCode() == 2212) {
489 if (particle->
Momentum().E() > tmp_leadingProtonE) {
490 tmp_leadingProtonE = particle->
Momentum().E();
493 sqrt(pow(particle->
Momentum().Px(), 2) + pow(particle->
Momentum().Py(), 2) +
498 else if (particle->
PdgCode() == 211) {
499 if (particle->
Momentum().E() > tmp_leadingPionPlusE) {
500 tmp_leadingPionPlusE = particle->
Momentum().E();
503 sqrt(pow(particle->
Momentum().Px(), 2) + pow(particle->
Momentum().Py(), 2) +
505 MCpion_plus = particle;
508 else if (particle->
PdgCode() == -211) {
509 if (particle->
Momentum().E() > tmp_leadingPionMinusE) {
510 tmp_leadingPionMinusE = particle->
Momentum().E();
513 sqrt(pow(particle->
Momentum().Px(), 2) + pow(particle->
Momentum().Py(), 2) +
515 MCpion_minus = particle;
525 if (particle->
Mother() == 0) {
526 const TLorentzVector& positionStart = particle->
Position(0);
529 if (particle->
PdgCode() == 321) {
541 else if (particle->
PdgCode() == 2212) {
542 if (particle->
Momentum().E() > tmp_leadingProtonE) {
543 tmp_leadingProtonE = particle->
Momentum().E();
546 sqrt(pow(particle->
Momentum().Px(), 2) + pow(particle->
Momentum().Py(), 2) +
551 else if (particle->
PdgCode() == 211) {
552 if (particle->
Momentum().E() > tmp_leadingPionPlusE) {
553 tmp_leadingPionPlusE = particle->
Momentum().E();
556 sqrt(pow(particle->
Momentum().Px(), 2) + pow(particle->
Momentum().Py(), 2) +
558 MCpion_plus = particle;
561 else if (particle->
PdgCode() == -211) {
562 if (particle->
Momentum().E() > tmp_leadingPionMinusE) {
563 tmp_leadingPionMinusE = particle->
Momentum().E();
566 sqrt(pow(particle->
Momentum().Px(), 2) + pow(particle->
Momentum().Py(), 2) +
568 MCpion_minus = particle;
571 else if (particle->
Process() ==
"Decay" &&
578 else if (TMath::Abs(particle->
PdgCode() == 321)) {
596 theta_mu *= (180.0 / 3.14159);
597 double truth_lengthLepton =
truthLength(clockData, detProp, MClepton);
598 double proton_length =
truthLength(clockData, detProp, MCproton);
599 double pion_plus_length =
truthLength(clockData, detProp, MCpion_plus);
600 double pion_minus_length =
truthLength(clockData, detProp, MCpion_minus);
601 double kaonLength =
truthLength(clockData, detProp, MCkaon);
602 double michelLength =
truthLength(clockData, detProp, MCmichel);
664 std::vector<art::Ptr<recob::Track>> tracklist;
666 int n_recoTrack = tracklist.size();
669 if (n_recoTrack == 0) {
670 MF_LOG_DEBUG(
"NeutrinoTrackingEff") <<
"There are no reco tracks... bye";
673 MF_LOG_DEBUG(
"NeutrinoTrackingEff") <<
"Found this many reco tracks " << n_recoTrack;
675 double Efrac_lepton = 0.0;
676 double Ecomplet_lepton = 0.0;
677 double Efrac_proton = 0.0;
678 double Ecomplet_proton = 0.0;
679 double Efrac_pionplus = 0.0;
680 double Ecomplet_pionplus = 0.0;
681 double Efrac_pionminus = 0.0;
682 double Ecomplet_pionminus = 0.0;
683 double Efrac_kaon = 0.0;
684 double Ecomplet_kaon = 0.0;
685 double Efrac_michel = 0.0;
686 double Ecomplet_michel = 0.0;
687 double trackLength_lepton = 0.0;
688 double trackLength_proton = 0.0;
689 double trackLength_pion_plus = 0.0;
690 double trackLength_pion_minus = 0.0;
691 double trackLength_kaon = 0.0;
692 double trackLength_michel = 0.0;
700 std::vector<art::Ptr<recob::Hit>> tmp_all_trackHits = track_hits.at(0);
701 std::vector<art::Ptr<recob::Hit>> all_hits;
703 auto const pd =
event.getProductDescription(tmp_all_trackHits[0].
id());
704 if (pd && event.
getByLabel(pd->inputTag(), hithandle)) {
708 for (
int i = 0; i < n_recoTrack; i++) {
710 std::vector<art::Ptr<recob::Hit>> all_trackHits = track_hits.at(i);
712 double tmpEcomplet = 0;
714 truthMatcher(clockData, all_hits, all_trackHits, particle, tmpEfrac, tmpEcomplet);
715 if (!particle)
continue;
719 if (tmpEcomplet > Ecomplet_lepton) {
720 Ecomplet_lepton = tmpEcomplet;
721 Efrac_lepton = tmpEfrac;
722 trackLength_lepton = track->
Length();
723 MClepton_reco = particle;
728 if (tmpEcomplet > Ecomplet_proton) {
729 Ecomplet_proton = tmpEcomplet;
730 Efrac_proton = tmpEfrac;
731 trackLength_proton = track->
Length();
732 MCproton_reco = particle;
737 if (tmpEcomplet > Ecomplet_pionplus) {
738 Ecomplet_pionplus = tmpEcomplet;
739 Efrac_pionplus = tmpEfrac;
740 trackLength_pion_plus = track->
Length();
741 MCpion_plus_reco = particle;
746 if (tmpEcomplet > Ecomplet_pionminus) {
747 Ecomplet_pionminus = tmpEcomplet;
748 Efrac_pionminus = tmpEfrac;
749 trackLength_pion_minus = track->
Length();
750 MCpion_minus_reco = particle;
756 if (tmpEcomplet > Ecomplet_kaon) {
757 Ecomplet_kaon = tmpEcomplet;
758 Efrac_kaon = tmpEfrac;
759 trackLength_kaon = track->
Length();
760 MCkaon_reco = particle;
766 if (tmpEcomplet > Ecomplet_michel) {
767 Ecomplet_michel = tmpEcomplet;
768 Efrac_michel = tmpEfrac;
769 trackLength_michel = track->
Length();
770 MCmichel_reco = particle;
775 double Reco_LengthRes = truth_lengthLepton - trackLength_lepton;
776 double Reco_LengthResProton = proton_length - trackLength_proton;
777 double Reco_LengthResPionPlus = pion_plus_length - trackLength_pion_plus;
778 double Reco_LengthResPionMinus = pion_minus_length - trackLength_pion_minus;
780 if (MClepton_reco && MClepton) {
791 if (MCproton_reco && MCproton) {
800 if (MCpion_plus_reco && MCpion_plus) {
809 if (MCpion_minus_reco && MCpion_minus) {
818 if (MCkaon_reco && MCkaon) {
830 if (MClepton_reco && MClepton) {
837 if (MCkaon_reco && MCkaon) {
844 if (MCproton_reco && MCproton) {
851 if (MCpion_plus_reco && MCpion_plus) {
858 if (MCpion_minus_reco && MCpion_minus) {
865 if (MCmichel_reco && MCmichel) {
884 std::map<int, double> trkID_E;
885 for (
size_t j = 0; j < track_hits.size(); ++j) {
888 for (
size_t k = 0; k < TrackIDs.size(); k++) {
889 trkID_E[TrackIDs[k].trackID] += TrackIDs[k].energy;
892 double max_E = -999.0;
893 double total_E = 0.0;
901 if (!trkID_E.size()) {
906 total_E += ii->second;
907 if ((ii->second) > max_E) {
908 partial_E = ii->second;
921 if (TrackID < 0)
return;
923 Efrac = (partial_E) / total_E;
926 double totenergy = 0;
927 for (
size_t k = 0; k < all_hits.size(); ++k) {
930 for (
size_t l = 0; l < TrackIDs.size(); ++l) {
931 if (TrackIDs[l].trackID == TrackID) totenergy += TrackIDs[l].energy;
934 Ecomplet = partial_E / totenergy;
945 if (!MCparticle)
return -999.0;
947 std::vector<double> TPCLengthHits(numberTrajectoryPoints, 0.0);
948 int FirstHit = 0, LastHit = 0;
949 double TPCLength = 0.0;
950 bool BeenInVolume =
false;
954 for (
unsigned int MCHit = 0; MCHit < TPCLengthHits.size(); ++MCHit) {
956 TPCLengthHits[MCHit] = sqrt(pow((MCparticle->
Vx(MCHit - 1) - MCparticle->
Vx(MCHit)), 2) +
957 pow((MCparticle->
Vy(MCHit - 1) - MCparticle->
Vy(MCHit)), 2) +
958 pow((MCparticle->
Vz(MCHit - 1) - MCparticle->
Vz(MCHit)), 2));
965 double DriftTimeCorrection = fabs(position.X() - XPlanePosition) /
fDriftVelocity;
966 double TimeAtPlane = MCparticle->
T() + DriftTimeCorrection;
978 for (
int Hit = FirstHit + 1; Hit <= LastHit; ++Hit)
979 TPCLength += TPCLengthHits[Hit];
985 double const x = vertex[0];
986 double const y = vertex[1];
987 double const z = vertex[2];
999 TGraphAsymmErrors* grEff_Ev =
h_Eff_Ev->CreateGraph();
1000 grEff_Ev->Write(
"grEff_Ev");
1005 TGraphAsymmErrors* grEff_Pmu =
h_Eff_Pmu->CreateGraph();
1006 grEff_Pmu->Write(
"grEff_Pmu");
1011 TGraphAsymmErrors* grEff_theta =
h_Eff_theta->CreateGraph();
1012 grEff_theta->Write(
"grEff_theta");
1017 TGraphAsymmErrors* grEff_Pproton =
h_Eff_Pproton->CreateGraph();
1018 grEff_Pproton->Write(
"grEff_Pproton");
1024 grEff_Ppion_plus->Write(
"grEff_Ppion_plus");
1030 grEff_Ppion_minus->Write(
"grEff_Ppion_minus");
1035 TGraphAsymmErrors* grEff_Lmuon =
h_Eff_Lmuon->CreateGraph();
1036 grEff_Lmuon->Write(
"grEff_Lmuon");
1041 TGraphAsymmErrors* grEff_Lproton =
h_Eff_Lproton->CreateGraph();
1042 grEff_Lproton->Write(
"grEff_Lproton");
1048 grEff_Lpion_plus->Write(
"grEff_Lpion_plus");
1054 grEff_Lpion_minus->Write(
"grEff_Lpion_minus");
1059 TGraphAsymmErrors* grEff_Pkaon =
h_Eff_Pkaon->CreateGraph();
1060 grEff_Pkaon->Write(
"grEff_Pkaon");
1065 TGraphAsymmErrors* grEff_Lkaon =
h_Eff_Lkaon->CreateGraph();
1066 grEff_Lkaon->Write(
"grEff_Lkaon");
1071 TGraphAsymmErrors* grEff_Pmichel =
h_Eff_Pmichel->CreateGraph();
1072 grEff_Pmichel->Write(
"grEff_Pmichel");
1077 TGraphAsymmErrors* grEff_Lmichel =
h_Eff_Lmichel->CreateGraph();
1078 grEff_Lmichel->Write(
"grEff_Lmichel");
art::ServiceHandle< geo::Geometry const > geom
unsigned int NumberTrajectoryPoints() const
const TLorentzVector & Position(const int i=0) const
const simb::MCNeutrino & GetNeutrino() const
Utilities related to art service access.
TEfficiency * h_Eff_Lpion_minus
TEfficiency * h_Eff_Lmuon
std::vector< sim::TrackIDE > HitToTrackIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
std::string fTrackModuleLabel
Point_t const & GetCenter() const
Returns the centre of the wire plane in world coordinates [cm].
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
std::vector< TrackID > TrackIDs
const simb::MCParticle * TrackIdToParticle_P(int id) const
std::string fMCTruthModuleLabel
TH1D * h_michelwtrk_length
const simb::MCParticle & Nu() const
list_type::const_iterator const_iterator
Geometry information for a single TPC.
::geo::Point_t toPoint(Point const &p)
Convert the specified point into a geo::Point_t.
TEfficiency * h_Eff_Ppion_minus
std::string Process() const
TH1D * h_protonwtrk_length
TH1D * h_trackRes_pion_plus
TEfficiency * h_Eff_Lpion_plus
void truthMatcher(detinfo::DetectorClocksData const &clockData, std::vector< art::Ptr< recob::Hit >> all_hits, std::vector< art::Ptr< recob::Hit >> track_hits, const simb::MCParticle *&MCparticle, double &Efrac, double &Ecomplet)
void processEff(const art::Event &evt)
constexpr double TickPeriod() const noexcept
A single tick period in microseconds.
TPCGeo const & TPC(TPCID const &tpcid=tpc_zero) const
Returns the specified TPC.
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
TPCID FindTPCAtPosition(Point_t const &point) const
Returns the ID of the TPC at specified location.
TEfficiency * h_Eff_theta
double Length(size_t p=0) const
Access to various track properties.
#define DEFINE_ART_MODULE(klass)
TEfficiency * h_Eff_Pproton
TEfficiency * h_Eff_Lproton
void analyze(const art::Event &evt)
T get(std::string const &key) const
double MC_lepton_startMomentum[4]
double T(const int i=0) const
TEfficiency * h_Eff_Pmichel
ElecClock const & TPCClock() const noexcept
Borrow a const TPC clock with time set to Trigger time [us].
unsigned int NumberTimeSamples() const
Provides recob::Track data product.
TH1D * h_Efrac_pion_minus
void beginRun(const art::Run &run)
The data type to uniquely identify a TPC.
double truthLength(const detinfo::DetectorClocksData &clockData, detinfo::DetectorPropertiesData const &detProp, const simb::MCParticle *MCparticle)
Definition of data types for geometry description.
Detector simulation of raw signals on wires.
const sim::ParticleList & ParticleList() const
double MC_leading_PionPlusP
double Vx(const int i=0) const
TH1D * h_Ecomplet_pion_plus
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
int MC_leading_PionMinusID
Contains all timing reference information for the detector.
TH1D * h_trackRes_pion_minus
int MC_leading_PionPlusID
const TLorentzVector & Momentum(const int i=0) const
TH1D * h_pionmwtrk_length
TEfficiency * h_Eff_Lkaon
double Vz(const int i=0) const
int trigger_offset(DetectorClocksData const &data)
PlaneGeo const & Plane(geo::View_t view) const
Return the plane in the tpc with View_t view.
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
double MC_leading_ProtonP
Event generator information.
Namespace collecting geometry-related classes utilities.
TH1D * h_pionpwtrk_length
double MC_leading_PionMinusP
TH1D * h_Ecomplet_pion_minus
TEfficiency * h_Eff_Lmichel
TEfficiency * h_Eff_Pkaon
bool insideFV(double vertex[4])
double Vy(const int i=0) const
art framework interface to geometry description
TEfficiency * h_Eff_Ppion_plus
Event finding and building.
Encapsulate the construction of a single detector plane.
The data type to uniquely identify a cryostat.