33 #include "art_root_io/TFileService.h" 39 #include "TEfficiency.h" 40 #include "TGraphAsymmErrors.h" 45 #define MAX_TRACKS 1000 72 bool insideFV(
double vertex[4]);
73 void doEfficiencies();
86 double MC_incoming_P[4];
88 double MC_lepton_startMomentum[4];
139 TEfficiency* h_Eff_Ev = 0;
140 TEfficiency* h_Eff_Pmu = 0;
141 TEfficiency* h_Eff_theta = 0;
142 TEfficiency* h_Eff_Pproton = 0;
143 TEfficiency* h_Eff_Ppion_plus = 0;
144 TEfficiency* h_Eff_Ppion_minus = 0;
146 TEfficiency* h_Eff_Lmuon = 0;
147 TEfficiency* h_Eff_Lproton = 0;
148 TEfficiency* h_Eff_Lpion_plus = 0;
149 TEfficiency* h_Eff_Lpion_minus = 0;
166 TEfficiency* h_Eff_Pkaon = 0;
167 TEfficiency* h_Eff_Pmichel = 0;
168 TEfficiency* h_Eff_Lkaon = 0;
169 TEfficiency* h_Eff_Lmichel = 0;
209 std::cout <<
"job begin..." << std::endl;
210 auto const*
geo = lar::providerFrom<geo::Geometry>();
220 auto const world = tpc.GetCenter();
221 if (minx > world.X() - tpc.HalfWidth()) minx = world.X() - tpc.HalfWidth();
222 if (maxx < world.X() + tpc.HalfWidth()) maxx = world.X() + tpc.HalfWidth();
223 if (miny > world.Y() - tpc.HalfHeight()) miny = world.Y() - tpc.HalfHeight();
224 if (maxy < world.Y() + tpc.HalfHeight()) maxy = world.Y() + tpc.HalfHeight();
225 if (minz > world.Z() - tpc.Length() / 2.) minz = world.Z() - tpc.Length() / 2.;
226 if (maxz < world.Z() + tpc.Length() / 2.) maxz = world.Z() + tpc.Length() / 2.;
236 std::cout <<
"Fiducial volume:" 244 double E_bins[21] = {0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4, 4.5, 5.0,
245 5.5, 6.0, 7.0, 8.0, 10.0, 12.0, 14.0, 17.0, 20.0, 25.0};
246 double theta_bin[44] = {0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.,
247 11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 22.,
248 24., 26., 28., 30., 32., 34., 36., 38., 40., 42., 44.,
249 46., 48., 50., 55., 60., 65., 70., 75., 80., 85., 90.};
251 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};
253 for (
int i = 0; i < 21; ++i)
255 for (
int i = 0; i < 18; ++i)
259 "h_Ev_den",
"Neutrino Energy; Neutrino Energy (GeV); Tracking Efficiency", 20, E_bins);
261 "h_Ev_num",
"Neutrino Energy; Neutrino Energy (GeV); Tracking Efficiency", 20, E_bins);
263 "h_Pmu_den",
"Muon Momentum; Muon Momentum (GeV); Tracking Efficiency", 20, E_bins);
265 "h_Pmu_num",
"Muon Momentum; Muon Momentum (GeV); Tracking Efficiency", 20, E_bins);
267 tfs->make<TH1D>(
"h_theta_den",
268 "Theta; Theta w.r.t beam direction (Degrees); Tracking Efficiency",
272 tfs->make<TH1D>(
"h_theta_num",
273 "Theta; Theta w.r.t beam direction (Degrees); Tracking Efficiency",
277 "h_Pproton_den",
"Protons; Proton Momentum (GeV); Tracking Efficiency", 17, Pbins);
279 "h_Pproton_num",
"Protons; Proton Momentum (GeV); Tracking Efficiency", 17, Pbins);
281 "h_Ppion_plus_den",
"Pions Plus; Pion Momentum (GeV); Tracking Efficiency", 17, Pbins);
283 "h_Ppion_plus_num",
"Pions Plus; Pion Momentum (GeV); Tracking Efficiency", 17, Pbins);
285 "h_Ppion_minus_den",
"Pions Minus; Pion Momentum (GeV); Tracking Efficiency", 17, Pbins);
287 "h_Ppion_minus_num",
"Pions Minus; Pion Momentum (GeV); Tracking Efficiency", 17, Pbins);
292 h_theta_den->Sumw2();
293 h_theta_num->Sumw2();
294 h_Pproton_den->Sumw2();
295 h_Pproton_num->Sumw2();
296 h_Ppion_plus_den->Sumw2();
297 h_Ppion_plus_num->Sumw2();
298 h_Ppion_minus_den->Sumw2();
299 h_Ppion_minus_num->Sumw2();
301 h_Efrac_lepton = tfs->make<TH1D>(
"h_Efrac_lepton",
"Efrac Lepton; Track Purity;", 60, 0, 1.2);
303 tfs->make<TH1D>(
"h_Ecomplet_lepton",
"Ecomplet Lepton; Track Completeness;", 60, 0, 1.2);
304 h_Efrac_proton = tfs->make<TH1D>(
"h_Efrac_proton",
"Efrac Proton; Track Purity;", 60, 0, 1.2);
306 tfs->make<TH1D>(
"h_Ecomplet_proton",
"Ecomplet Proton; Track Completeness;", 60, 0, 1.2);
308 tfs->make<TH1D>(
"h_Efrac_pion_plus",
"Efrac Pion +; Track Purity;", 60, 0, 1.2);
310 tfs->make<TH1D>(
"h_Ecomplet_pion_plus",
"Ecomplet Pion +; Track Completeness;", 60, 0, 1.2);
312 tfs->make<TH1D>(
"h_Efrac_pion_minus",
"Efrac Pion -; Track Purity;", 60, 0, 1.2);
314 tfs->make<TH1D>(
"h_Ecomplet_pion_minus",
"Ecomplet Pion -; Track Completeness;", 60, 0, 1.2);
316 "h_trackRes_lepton",
"Muon Residual; Truth length - Reco length (cm);", 200, -100, 100);
318 "h_trackRes_proton",
"Proton Residual; Truth length - Reco length (cm);", 200, -100, 100);
320 "h_trackRes_pion_plus",
"Pion + Residual; Truth length - Reco length (cm);", 200, -100, 100);
322 "h_trackRes_pion_minus",
"Pion - Residual; Truth length - Reco length (cm);", 200, -100, 100);
332 h_trackRes_proton->Sumw2();
333 h_trackRes_pion_plus->Sumw2();
334 h_trackRes_pion_minus->Sumw2();
337 tfs->make<TH1D>(
"h_muon_length",
"Muon Length; Muon Truth Length (cm)", 40, 0, 100);
339 tfs->make<TH1D>(
"h_proton_length",
"Proton Length; Proton Truth Length (cm)", 40, 0, 100);
341 tfs->make<TH1D>(
"h_pionp_length",
"Pion + Length; Pion^{+} Truth Length (cm)", 40, 0, 100);
343 tfs->make<TH1D>(
"h_pionm_length",
"Pion - Length; Pion^{-} Truth Length (cm)", 40, 0, 100);
346 tfs->make<TH1D>(
"h_muonwtrk_length",
"Muon Length; Muon Truth Length (cm)", 40, 0, 100);
348 tfs->make<TH1D>(
"h_protonwtrk_length",
"Proton Length; Proton Truth Length (cm)", 40, 0, 100);
350 "h_pionpwtrk_length",
"Pion + Length; Pion^{+} Truth Length (cm)", 40, 0, 100);
352 "h_pionmwtrk_length",
"Pion - Length; Pion^{-} Truth Length (cm)", 40, 0, 100);
355 h_muonwtrk_length->Sumw2();
356 h_proton_length->Sumw2();
357 h_protonwtrk_length->Sumw2();
358 h_pionp_length->Sumw2();
359 h_pionpwtrk_length->Sumw2();
360 h_pionm_length->Sumw2();
361 h_pionmwtrk_length->Sumw2();
364 tfs->make<TH1D>(
"h_Pkaon_den",
"Kaon; Kaon Momentum (GeV); Tracking Efficiency", 17, Pbins);
366 tfs->make<TH1D>(
"h_Pkaon_num",
"Kaon; Kaon Momentum (GeV); Tracking Efficiency", 17, Pbins);
368 tfs->make<TH1D>(
"h_Pmichel_e_den",
369 "Michel Electron; Michele e Momentum (GeV); Tracking Efficiency",
373 tfs->make<TH1D>(
"h_Pmichel_e_num",
374 "Michel Electron; Michele e Momentum (GeV); Tracking Efficiency",
378 h_Pkaon_num->Sumw2();
379 h_Pmichel_e_den->Sumw2();
380 h_Pmichel_e_num->Sumw2();
381 h_Efrac_kaon = tfs->make<TH1D>(
"h_Efrac_kaon",
"Efrac Kaon; Track Purity;", 60, 0, 1.2);
383 tfs->make<TH1D>(
"h_Ecomplet_kaon",
"Ecomplet Kaon; Track Completeness;", 60, 0, 1.2);
385 "h_trackRes_kaon",
"Kaon Residual; Truth length - Reco length (cm);", 200, -100, 100);
387 tfs->make<TH1D>(
"h_Efrac_michel",
"Efrac Michel; Track Energy fraction;", 60, 0, 1.2);
389 tfs->make<TH1D>(
"h_Ecomplet_michel",
"Ecomplet Michel; Track Completeness;", 60, 0, 1.2);
391 "h_trackRes_michel",
"Michel Residual; Truth length - Reco length (cm);", 200, -100, 100);
393 tfs->make<TH1D>(
"h_kaon_length",
"Kaon Length; Kaon Truth Length (cm)", 40, 0, 100);
395 tfs->make<TH1D>(
"h_kaonwtrk_length",
"Kaon Length; Kaon Truth Length (cm)", 40, 0, 100);
397 tfs->make<TH1D>(
"h_michel_length",
"Michel Length; Michel e Truth Length (cm)", 40, 0, 100);
399 "h_michelwtrk_length",
"Michel Length; Michel e Truth Length (cm)", 40, 0, 100);
404 h_Efrac_michel->Sumw2();
407 h_kaon_length->Sumw2();
408 h_kaonwtrk_length->Sumw2();
409 h_michel_length->Sumw2();
410 h_michelwtrk_length->Sumw2();
420 mf::LogInfo(
"NeutrinoTrackingEff") <<
"begin run..." << std::endl;
435 std::vector<art::Ptr<simb::MCTruth>> MCtruthlist;
440 MCtruth = MCtruthlist[0];
445 else if (nu.
CCNC() == 1)
449 const TLorentzVector& nu_momentum = nu.
Nu().
Momentum(0);
457 double tmp_leadingPionPlusE = 0.0;
458 double tmp_leadingPionMinusE = 0.0;
459 double tmp_leadingProtonE = 0.0;
473 auto const clockData =
479 particle = ipar->second;
481 const TLorentzVector& lepton_momentum = particle->
Momentum(0);
488 if (particle->
Mother() == 0) {
490 if (particle->
PdgCode() == 2212) {
491 if (particle->
Momentum().E() > tmp_leadingProtonE) {
492 tmp_leadingProtonE = particle->
Momentum().E();
495 sqrt(pow(particle->
Momentum().Px(), 2) + pow(particle->
Momentum().Py(), 2) +
500 else if (particle->
PdgCode() == 211) {
501 if (particle->
Momentum().E() > tmp_leadingPionPlusE) {
502 tmp_leadingPionPlusE = particle->
Momentum().E();
505 sqrt(pow(particle->
Momentum().Px(), 2) + pow(particle->
Momentum().Py(), 2) +
507 MCpion_plus = particle;
510 else if (particle->
PdgCode() == -211) {
511 if (particle->
Momentum().E() > tmp_leadingPionMinusE) {
512 tmp_leadingPionMinusE = particle->
Momentum().E();
515 sqrt(pow(particle->
Momentum().Px(), 2) + pow(particle->
Momentum().Py(), 2) +
517 MCpion_minus = particle;
527 if (particle->
Mother() == 0) {
528 const TLorentzVector& positionStart = particle->
Position(0);
531 if (particle->
PdgCode() == 321) {
543 else if (particle->
PdgCode() == 2212) {
544 if (particle->
Momentum().E() > tmp_leadingProtonE) {
545 tmp_leadingProtonE = particle->
Momentum().E();
548 sqrt(pow(particle->
Momentum().Px(), 2) + pow(particle->
Momentum().Py(), 2) +
553 else if (particle->
PdgCode() == 211) {
554 if (particle->
Momentum().E() > tmp_leadingPionPlusE) {
555 tmp_leadingPionPlusE = particle->
Momentum().E();
558 sqrt(pow(particle->
Momentum().Px(), 2) + pow(particle->
Momentum().Py(), 2) +
560 MCpion_plus = particle;
563 else if (particle->
PdgCode() == -211) {
564 if (particle->
Momentum().E() > tmp_leadingPionMinusE) {
565 tmp_leadingPionMinusE = particle->
Momentum().E();
568 sqrt(pow(particle->
Momentum().Px(), 2) + pow(particle->
Momentum().Py(), 2) +
570 MCpion_minus = particle;
573 else if (particle->
Process() ==
"Decay" &&
580 else if (TMath::Abs(particle->
PdgCode() == 321)) {
598 theta_mu *= (180.0 / 3.14159);
599 double truth_lengthLepton =
truthLength(clockData, detProp, MClepton);
600 double proton_length =
truthLength(clockData, detProp, MCproton);
601 double pion_plus_length =
truthLength(clockData, detProp, MCpion_plus);
602 double pion_minus_length =
truthLength(clockData, detProp, MCpion_minus);
603 double kaonLength =
truthLength(clockData, detProp, MCkaon);
604 double michelLength =
truthLength(clockData, detProp, MCmichel);
666 std::vector<art::Ptr<recob::Track>> tracklist;
668 int n_recoTrack = tracklist.size();
671 if (n_recoTrack == 0) {
672 MF_LOG_DEBUG(
"NeutrinoTrackingEff") <<
"There are no reco tracks... bye";
675 MF_LOG_DEBUG(
"NeutrinoTrackingEff") <<
"Found this many reco tracks " << n_recoTrack;
677 double Efrac_lepton = 0.0;
678 double Ecomplet_lepton = 0.0;
679 double Efrac_proton = 0.0;
680 double Ecomplet_proton = 0.0;
681 double Efrac_pionplus = 0.0;
682 double Ecomplet_pionplus = 0.0;
683 double Efrac_pionminus = 0.0;
684 double Ecomplet_pionminus = 0.0;
685 double Efrac_kaon = 0.0;
686 double Ecomplet_kaon = 0.0;
687 double Efrac_michel = 0.0;
688 double Ecomplet_michel = 0.0;
689 double trackLength_lepton = 0.0;
690 double trackLength_proton = 0.0;
691 double trackLength_pion_plus = 0.0;
692 double trackLength_pion_minus = 0.0;
693 double trackLength_kaon = 0.0;
694 double trackLength_michel = 0.0;
702 std::vector<art::Ptr<recob::Hit>> tmp_all_trackHits = track_hits.at(0);
703 std::vector<art::Ptr<recob::Hit>> all_hits;
705 auto const pd =
event.getProductDescription(tmp_all_trackHits[0].
id());
706 if (pd && event.
getByLabel(pd->inputTag(), hithandle)) {
710 for (
int i = 0; i < n_recoTrack; i++) {
712 std::vector<art::Ptr<recob::Hit>> all_trackHits = track_hits.at(i);
714 double tmpEcomplet = 0;
716 truthMatcher(clockData, all_hits, all_trackHits, particle, tmpEfrac, tmpEcomplet);
717 if (!particle)
continue;
721 if (tmpEcomplet > Ecomplet_lepton) {
722 Ecomplet_lepton = tmpEcomplet;
723 Efrac_lepton = tmpEfrac;
724 trackLength_lepton = track->
Length();
725 MClepton_reco = particle;
730 if (tmpEcomplet > Ecomplet_proton) {
731 Ecomplet_proton = tmpEcomplet;
732 Efrac_proton = tmpEfrac;
733 trackLength_proton = track->
Length();
734 MCproton_reco = particle;
739 if (tmpEcomplet > Ecomplet_pionplus) {
740 Ecomplet_pionplus = tmpEcomplet;
741 Efrac_pionplus = tmpEfrac;
742 trackLength_pion_plus = track->
Length();
743 MCpion_plus_reco = particle;
748 if (tmpEcomplet > Ecomplet_pionminus) {
749 Ecomplet_pionminus = tmpEcomplet;
750 Efrac_pionminus = tmpEfrac;
751 trackLength_pion_minus = track->
Length();
752 MCpion_minus_reco = particle;
758 if (tmpEcomplet > Ecomplet_kaon) {
759 Ecomplet_kaon = tmpEcomplet;
760 Efrac_kaon = tmpEfrac;
761 trackLength_kaon = track->
Length();
762 MCkaon_reco = particle;
768 if (tmpEcomplet > Ecomplet_michel) {
769 Ecomplet_michel = tmpEcomplet;
770 Efrac_michel = tmpEfrac;
771 trackLength_michel = track->
Length();
772 MCmichel_reco = particle;
777 double Reco_LengthRes = truth_lengthLepton - trackLength_lepton;
778 double Reco_LengthResProton = proton_length - trackLength_proton;
779 double Reco_LengthResPionPlus = pion_plus_length - trackLength_pion_plus;
780 double Reco_LengthResPionMinus = pion_minus_length - trackLength_pion_minus;
782 if (MClepton_reco && MClepton) {
793 if (MCproton_reco && MCproton) {
802 if (MCpion_plus_reco && MCpion_plus) {
811 if (MCpion_minus_reco && MCpion_minus) {
820 if (MCkaon_reco && MCkaon) {
832 if (MClepton_reco && MClepton) {
839 if (MCkaon_reco && MCkaon) {
846 if (MCproton_reco && MCproton) {
853 if (MCpion_plus_reco && MCpion_plus) {
860 if (MCpion_minus_reco && MCpion_minus) {
867 if (MCmichel_reco && MCmichel) {
886 std::map<int, double> trkID_E;
887 for (
size_t j = 0; j < track_hits.size(); ++j) {
890 for (
size_t k = 0; k < TrackIDs.size(); k++) {
891 trkID_E[TrackIDs[k].trackID] += TrackIDs[k].energy;
894 double max_E = -999.0;
895 double total_E = 0.0;
903 if (!trkID_E.size()) {
908 total_E += ii->second;
909 if ((ii->second) > max_E) {
910 partial_E = ii->second;
923 if (TrackID < 0)
return;
925 Efrac = (partial_E) / total_E;
928 double totenergy = 0;
929 for (
size_t k = 0; k < all_hits.size(); ++k) {
932 for (
size_t l = 0; l < TrackIDs.size(); ++l) {
933 if (TrackIDs[l].trackID == TrackID) totenergy += TrackIDs[l].energy;
936 Ecomplet = partial_E / totenergy;
947 if (!MCparticle)
return -999.0;
949 std::vector<double> TPCLengthHits(numberTrajectoryPoints, 0.0);
950 int FirstHit = 0, LastHit = 0;
951 double TPCLength = 0.0;
952 bool BeenInVolume =
false;
956 for (
unsigned int MCHit = 0; MCHit < TPCLengthHits.size(); ++MCHit) {
958 TPCLengthHits[MCHit] = sqrt(pow((MCparticle->
Vx(MCHit - 1) - MCparticle->
Vx(MCHit)), 2) +
959 pow((MCparticle->
Vy(MCHit - 1) - MCparticle->
Vy(MCHit)), 2) +
960 pow((MCparticle->
Vz(MCHit - 1) - MCparticle->
Vz(MCHit)), 2));
966 double DriftTimeCorrection = fabs(position.X() - XPlanePosition) /
fDriftVelocity;
967 double TimeAtPlane = MCparticle->
T() + DriftTimeCorrection;
979 for (
int Hit = FirstHit + 1; Hit <= LastHit; ++Hit)
980 TPCLength += TPCLengthHits[Hit];
986 double const x = vertex[0];
987 double const y = vertex[1];
988 double const z = vertex[2];
1000 TGraphAsymmErrors* grEff_Ev =
h_Eff_Ev->CreateGraph();
1001 grEff_Ev->Write(
"grEff_Ev");
1006 TGraphAsymmErrors* grEff_Pmu =
h_Eff_Pmu->CreateGraph();
1007 grEff_Pmu->Write(
"grEff_Pmu");
1012 TGraphAsymmErrors* grEff_theta =
h_Eff_theta->CreateGraph();
1013 grEff_theta->Write(
"grEff_theta");
1018 TGraphAsymmErrors* grEff_Pproton =
h_Eff_Pproton->CreateGraph();
1019 grEff_Pproton->Write(
"grEff_Pproton");
1025 grEff_Ppion_plus->Write(
"grEff_Ppion_plus");
1031 grEff_Ppion_minus->Write(
"grEff_Ppion_minus");
1036 TGraphAsymmErrors* grEff_Lmuon =
h_Eff_Lmuon->CreateGraph();
1037 grEff_Lmuon->Write(
"grEff_Lmuon");
1042 TGraphAsymmErrors* grEff_Lproton =
h_Eff_Lproton->CreateGraph();
1043 grEff_Lproton->Write(
"grEff_Lproton");
1049 grEff_Lpion_plus->Write(
"grEff_Lpion_plus");
1055 grEff_Lpion_minus->Write(
"grEff_Lpion_minus");
1060 TGraphAsymmErrors* grEff_Pkaon =
h_Eff_Pkaon->CreateGraph();
1061 grEff_Pkaon->Write(
"grEff_Pkaon");
1066 TGraphAsymmErrors* grEff_Lkaon =
h_Eff_Lkaon->CreateGraph();
1067 grEff_Lkaon->Write(
"grEff_Lkaon");
1072 TGraphAsymmErrors* grEff_Pmichel =
h_Eff_Pmichel->CreateGraph();
1073 grEff_Pmichel->Write(
"grEff_Pmichel");
1078 TGraphAsymmErrors* grEff_Lmichel =
h_Eff_Lmichel->CreateGraph();
1079 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.
cout<< "Opened file "<< fin<< " ixs= "<< ixs<< endl;if(ixs==0) hhh=(TH1F *) fff-> Get("h1")
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.
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
Interface for a class providing readout channel mapping to geometry.
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
Point_t toPoint(Point const &p)
Convert the specified point into a geo::Point_t.
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
PlaneGeo const & FirstPlane(TPCID const &tpcid) const
Returns the first plane of the specified TPC.
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.
Provides recob::Track data product.
TH1D * h_trackRes_pion_minus
int MC_leading_PionPlusID
const TLorentzVector & Momentum(const int i=0) const
TH1D * h_pionmwtrk_length
geo::WireReadoutGeom const & wireReadoutGeom
TEfficiency * h_Eff_Lkaon
double Vz(const int i=0) const
int trigger_offset(DetectorClocksData const &data)
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
double MC_leading_ProtonP
Event generator information.
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.