29 #include "art_root_io/TFileService.h" 30 #include "canvas/Persistency/Common/FindManyP.h" 35 #include "TEfficiency.h" 36 #include "TGraphAsymmErrors.h" 41 #define MAX_TRACKS 1000 68 bool insideFV(
double vertex[4]);
69 void doEfficiencies();
82 double MC_incoming_P[4];
84 double MC_lepton_startMomentum[4];
135 TEfficiency* h_Eff_Ev = 0;
136 TEfficiency* h_Eff_Pmu = 0;
137 TEfficiency* h_Eff_theta = 0;
138 TEfficiency* h_Eff_Pproton = 0;
139 TEfficiency* h_Eff_Ppion_plus = 0;
140 TEfficiency* h_Eff_Ppion_minus = 0;
142 TEfficiency* h_Eff_Lmuon = 0;
143 TEfficiency* h_Eff_Lproton = 0;
144 TEfficiency* h_Eff_Lpion_plus = 0;
145 TEfficiency* h_Eff_Lpion_minus = 0;
162 TEfficiency* h_Eff_Pkaon = 0;
163 TEfficiency* h_Eff_Pmichel = 0;
164 TEfficiency* h_Eff_Lkaon = 0;
165 TEfficiency* h_Eff_Lmichel = 0;
205 std::cout <<
"job begin..." <<
std::endl;
206 auto const*
geo = lar::providerFrom<geo::Geometry>();
215 for (
size_t i = 0; i <
geo->NTPC(); ++i) {
216 double local[3] = {0., 0., 0.};
217 double world[3] = {0., 0., 0.};
220 if (minx > world[0] -
geo->DetHalfWidth(i)) minx = world[0] -
geo->DetHalfWidth(i);
221 if (maxx < world[0] +
geo->DetHalfWidth(i)) maxx = world[0] +
geo->DetHalfWidth(i);
222 if (miny > world[1] -
geo->DetHalfHeight(i)) miny = world[1] -
geo->DetHalfHeight(i);
223 if (maxy < world[1] +
geo->DetHalfHeight(i)) maxy = world[1] +
geo->DetHalfHeight(i);
224 if (minz > world[2] -
geo->DetLength(i) / 2.) minz = world[2] -
geo->DetLength(i) / 2.;
225 if (maxz < world[2] +
geo->DetLength(i) / 2.) maxz = world[2] +
geo->DetLength(i) / 2.;
235 std::cout <<
"Fiducial volume:" 243 double E_bins[21] = {0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4, 4.5, 5.0,
244 5.5, 6.0, 7.0, 8.0, 10.0, 12.0, 14.0, 17.0, 20.0, 25.0};
245 double theta_bin[44] = {0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.,
246 11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 22.,
247 24., 26., 28., 30., 32., 34., 36., 38., 40., 42., 44.,
248 46., 48., 50., 55., 60., 65., 70., 75., 80., 85., 90.};
250 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};
252 for (
int i = 0; i < 21; ++i)
254 for (
int i = 0; i < 18; ++i)
258 "h_Ev_den",
"Neutrino Energy; Neutrino Energy (GeV); Tracking Efficiency", 20, E_bins);
260 "h_Ev_num",
"Neutrino Energy; Neutrino Energy (GeV); Tracking Efficiency", 20, E_bins);
262 "h_Pmu_den",
"Muon Momentum; Muon Momentum (GeV); Tracking Efficiency", 20, E_bins);
264 "h_Pmu_num",
"Muon Momentum; Muon Momentum (GeV); Tracking Efficiency", 20, E_bins);
266 tfs->make<TH1D>(
"h_theta_den",
267 "Theta; Theta w.r.t beam direction (Degrees); Tracking Efficiency",
271 tfs->make<TH1D>(
"h_theta_num",
272 "Theta; Theta w.r.t beam direction (Degrees); Tracking Efficiency",
276 "h_Pproton_den",
"Protons; Proton Momentum (GeV); Tracking Efficiency", 17, Pbins);
278 "h_Pproton_num",
"Protons; Proton Momentum (GeV); Tracking Efficiency", 17, Pbins);
280 "h_Ppion_plus_den",
"Pions Plus; Pion Momentum (GeV); Tracking Efficiency", 17, Pbins);
282 "h_Ppion_plus_num",
"Pions Plus; Pion Momentum (GeV); Tracking Efficiency", 17, Pbins);
284 "h_Ppion_minus_den",
"Pions Minus; Pion Momentum (GeV); Tracking Efficiency", 17, Pbins);
286 "h_Ppion_minus_num",
"Pions Minus; Pion Momentum (GeV); Tracking Efficiency", 17, Pbins);
291 h_theta_den->Sumw2();
292 h_theta_num->Sumw2();
293 h_Pproton_den->Sumw2();
294 h_Pproton_num->Sumw2();
295 h_Ppion_plus_den->Sumw2();
296 h_Ppion_plus_num->Sumw2();
297 h_Ppion_minus_den->Sumw2();
298 h_Ppion_minus_num->Sumw2();
300 h_Efrac_lepton = tfs->make<TH1D>(
"h_Efrac_lepton",
"Efrac Lepton; Track Purity;", 60, 0, 1.2);
302 tfs->make<TH1D>(
"h_Ecomplet_lepton",
"Ecomplet Lepton; Track Completeness;", 60, 0, 1.2);
303 h_Efrac_proton = tfs->make<TH1D>(
"h_Efrac_proton",
"Efrac Proton; Track Purity;", 60, 0, 1.2);
305 tfs->make<TH1D>(
"h_Ecomplet_proton",
"Ecomplet Proton; Track Completeness;", 60, 0, 1.2);
307 tfs->make<TH1D>(
"h_Efrac_pion_plus",
"Efrac Pion +; Track Purity;", 60, 0, 1.2);
309 tfs->make<TH1D>(
"h_Ecomplet_pion_plus",
"Ecomplet Pion +; Track Completeness;", 60, 0, 1.2);
311 tfs->make<TH1D>(
"h_Efrac_pion_minus",
"Efrac Pion -; Track Purity;", 60, 0, 1.2);
313 tfs->make<TH1D>(
"h_Ecomplet_pion_minus",
"Ecomplet Pion -; Track Completeness;", 60, 0, 1.2);
315 "h_trackRes_lepton",
"Muon Residual; Truth length - Reco length (cm);", 200, -100, 100);
317 "h_trackRes_proton",
"Proton Residual; Truth length - Reco length (cm);", 200, -100, 100);
319 "h_trackRes_pion_plus",
"Pion + Residual; Truth length - Reco length (cm);", 200, -100, 100);
321 "h_trackRes_pion_minus",
"Pion - Residual; Truth length - Reco length (cm);", 200, -100, 100);
331 h_trackRes_proton->Sumw2();
332 h_trackRes_pion_plus->Sumw2();
333 h_trackRes_pion_minus->Sumw2();
336 tfs->make<TH1D>(
"h_muon_length",
"Muon Length; Muon Truth Length (cm)", 40, 0, 100);
338 tfs->make<TH1D>(
"h_proton_length",
"Proton Length; Proton Truth Length (cm)", 40, 0, 100);
340 tfs->make<TH1D>(
"h_pionp_length",
"Pion + Length; Pion^{+} Truth Length (cm)", 40, 0, 100);
342 tfs->make<TH1D>(
"h_pionm_length",
"Pion - Length; Pion^{-} Truth Length (cm)", 40, 0, 100);
345 tfs->make<TH1D>(
"h_muonwtrk_length",
"Muon Length; Muon Truth Length (cm)", 40, 0, 100);
347 tfs->make<TH1D>(
"h_protonwtrk_length",
"Proton Length; Proton Truth Length (cm)", 40, 0, 100);
349 "h_pionpwtrk_length",
"Pion + Length; Pion^{+} Truth Length (cm)", 40, 0, 100);
351 "h_pionmwtrk_length",
"Pion - Length; Pion^{-} Truth Length (cm)", 40, 0, 100);
354 h_muonwtrk_length->Sumw2();
355 h_proton_length->Sumw2();
356 h_protonwtrk_length->Sumw2();
357 h_pionp_length->Sumw2();
358 h_pionpwtrk_length->Sumw2();
359 h_pionm_length->Sumw2();
360 h_pionmwtrk_length->Sumw2();
363 tfs->make<TH1D>(
"h_Pkaon_den",
"Kaon; Kaon Momentum (GeV); Tracking Efficiency", 17, Pbins);
365 tfs->make<TH1D>(
"h_Pkaon_num",
"Kaon; Kaon Momentum (GeV); Tracking Efficiency", 17, Pbins);
367 tfs->make<TH1D>(
"h_Pmichel_e_den",
368 "Michel Electron; Michele e Momentum (GeV); Tracking Efficiency",
372 tfs->make<TH1D>(
"h_Pmichel_e_num",
373 "Michel Electron; Michele e Momentum (GeV); Tracking Efficiency",
377 h_Pkaon_num->Sumw2();
378 h_Pmichel_e_den->Sumw2();
379 h_Pmichel_e_num->Sumw2();
380 h_Efrac_kaon = tfs->make<TH1D>(
"h_Efrac_kaon",
"Efrac Kaon; Track Purity;", 60, 0, 1.2);
382 tfs->make<TH1D>(
"h_Ecomplet_kaon",
"Ecomplet Kaon; Track Completeness;", 60, 0, 1.2);
384 "h_trackRes_kaon",
"Kaon Residual; Truth length - Reco length (cm);", 200, -100, 100);
386 tfs->make<TH1D>(
"h_Efrac_michel",
"Efrac Michel; Track Energy fraction;", 60, 0, 1.2);
388 tfs->make<TH1D>(
"h_Ecomplet_michel",
"Ecomplet Michel; Track Completeness;", 60, 0, 1.2);
390 "h_trackRes_michel",
"Michel Residual; Truth length - Reco length (cm);", 200, -100, 100);
392 tfs->make<TH1D>(
"h_kaon_length",
"Kaon Length; Kaon Truth Length (cm)", 40, 0, 100);
394 tfs->make<TH1D>(
"h_kaonwtrk_length",
"Kaon Length; Kaon Truth Length (cm)", 40, 0, 100);
396 tfs->make<TH1D>(
"h_michel_length",
"Michel Length; Michel e Truth Length (cm)", 40, 0, 100);
398 "h_michelwtrk_length",
"Michel Length; Michel e Truth Length (cm)", 40, 0, 100);
403 h_Efrac_michel->Sumw2();
406 h_kaon_length->Sumw2();
407 h_kaonwtrk_length->Sumw2();
408 h_michel_length->Sumw2();
409 h_michelwtrk_length->Sumw2();
438 std::vector<art::Ptr<simb::MCTruth>> MCtruthlist;
443 MCtruth = MCtruthlist[0];
448 else if (nu.
CCNC() == 1)
452 const TLorentzVector& nu_momentum = nu.
Nu().
Momentum(0);
460 double tmp_leadingPionPlusE = 0.0;
461 double tmp_leadingPionMinusE = 0.0;
462 double tmp_leadingProtonE = 0.0;
472 const sim::ParticleList& plist = pi_serv->
ParticleList();
476 auto const clockData =
482 particle = ipar->second;
484 const TLorentzVector& lepton_momentum = particle->
Momentum(0);
491 if (particle->
Mother() == 0) {
493 if (particle->
PdgCode() == 2212) {
494 if (particle->
Momentum().E() > tmp_leadingProtonE) {
495 tmp_leadingProtonE = particle->
Momentum().E();
503 else if (particle->
PdgCode() == 211) {
504 if (particle->
Momentum().E() > tmp_leadingPionPlusE) {
505 tmp_leadingPionPlusE = particle->
Momentum().E();
510 MCpion_plus = particle;
513 else if (particle->
PdgCode() == -211) {
514 if (particle->
Momentum().E() > tmp_leadingPionMinusE) {
515 tmp_leadingPionMinusE = particle->
Momentum().E();
520 MCpion_minus = particle;
530 if (particle->
Mother() == 0) {
531 const TLorentzVector& positionStart = particle->
Position(0);
534 if (particle->
PdgCode() == 321) {
546 else if (particle->
PdgCode() == 2212) {
547 if (particle->
Momentum().E() > tmp_leadingProtonE) {
548 tmp_leadingProtonE = particle->
Momentum().E();
556 else if (particle->
PdgCode() == 211) {
557 if (particle->
Momentum().E() > tmp_leadingPionPlusE) {
558 tmp_leadingPionPlusE = particle->
Momentum().E();
563 MCpion_plus = particle;
566 else if (particle->
PdgCode() == -211) {
567 if (particle->
Momentum().E() > tmp_leadingPionMinusE) {
568 tmp_leadingPionMinusE = particle->
Momentum().E();
573 MCpion_minus = particle;
576 else if (particle->
Process() ==
"Decay" &&
583 else if (TMath::Abs(particle->
PdgCode() == 321)) {
601 theta_mu *= (180.0 / 3.14159);
602 double truth_lengthLepton =
truthLength(clockData, detProp, MClepton);
603 double proton_length =
truthLength(clockData, detProp, MCproton);
604 double pion_plus_length =
truthLength(clockData, detProp, MCpion_plus);
605 double pion_minus_length =
truthLength(clockData, detProp, MCpion_minus);
606 double kaonLength =
truthLength(clockData, detProp, MCkaon);
607 double michelLength =
truthLength(clockData, detProp, MCmichel);
669 std::vector<art::Ptr<recob::Track>> tracklist;
671 int n_recoTrack = tracklist.size();
673 art::FindManyP<recob::Hit> track_hits(trackListHandle, event,
fTrackModuleLabel);
674 if (n_recoTrack == 0) {
675 MF_LOG_DEBUG(
"NeutrinoTrackingEff") <<
"There are no reco tracks... bye";
678 MF_LOG_DEBUG(
"NeutrinoTrackingEff") <<
"Found this many reco tracks " << n_recoTrack;
680 double Efrac_lepton = 0.0;
681 double Ecomplet_lepton = 0.0;
682 double Efrac_proton = 0.0;
683 double Ecomplet_proton = 0.0;
684 double Efrac_pionplus = 0.0;
685 double Ecomplet_pionplus = 0.0;
686 double Efrac_pionminus = 0.0;
687 double Ecomplet_pionminus = 0.0;
688 double Efrac_kaon = 0.0;
689 double Ecomplet_kaon = 0.0;
690 double Efrac_michel = 0.0;
691 double Ecomplet_michel = 0.0;
692 double trackLength_lepton = 0.0;
693 double trackLength_proton = 0.0;
694 double trackLength_pion_plus = 0.0;
695 double trackLength_pion_minus = 0.0;
696 double trackLength_kaon = 0.0;
697 double trackLength_michel = 0.0;
705 std::vector<art::Ptr<recob::Hit>> tmp_all_trackHits = track_hits.at(0);
706 std::vector<art::Ptr<recob::Hit>> all_hits;
708 auto const pd =
event.getProductDescription(tmp_all_trackHits[0].
id());
709 if (pd && event.
getByLabel(pd->inputTag(), hithandle)) {
713 for (
int i = 0; i < n_recoTrack; i++) {
715 std::vector<art::Ptr<recob::Hit>> all_trackHits = track_hits.at(i);
717 double tmpEcomplet = 0;
719 truthMatcher(clockData, all_hits, all_trackHits, particle, tmpEfrac, tmpEcomplet);
720 if (!particle)
continue;
724 if (tmpEcomplet > Ecomplet_lepton) {
725 Ecomplet_lepton = tmpEcomplet;
726 Efrac_lepton = tmpEfrac;
727 trackLength_lepton = track->
Length();
728 MClepton_reco = particle;
733 if (tmpEcomplet > Ecomplet_proton) {
734 Ecomplet_proton = tmpEcomplet;
735 Efrac_proton = tmpEfrac;
736 trackLength_proton = track->
Length();
737 MCproton_reco = particle;
742 if (tmpEcomplet > Ecomplet_pionplus) {
743 Ecomplet_pionplus = tmpEcomplet;
744 Efrac_pionplus = tmpEfrac;
745 trackLength_pion_plus = track->
Length();
746 MCpion_plus_reco = particle;
751 if (tmpEcomplet > Ecomplet_pionminus) {
752 Ecomplet_pionminus = tmpEcomplet;
753 Efrac_pionminus = tmpEfrac;
754 trackLength_pion_minus = track->
Length();
755 MCpion_minus_reco = particle;
761 if (tmpEcomplet > Ecomplet_kaon) {
762 Ecomplet_kaon = tmpEcomplet;
763 Efrac_kaon = tmpEfrac;
764 trackLength_kaon = track->
Length();
765 MCkaon_reco = particle;
771 if (tmpEcomplet > Ecomplet_michel) {
772 Ecomplet_michel = tmpEcomplet;
773 Efrac_michel = tmpEfrac;
774 trackLength_michel = track->
Length();
775 MCmichel_reco = particle;
780 double Reco_LengthRes = truth_lengthLepton - trackLength_lepton;
781 double Reco_LengthResProton = proton_length - trackLength_proton;
782 double Reco_LengthResPionPlus = pion_plus_length - trackLength_pion_plus;
783 double Reco_LengthResPionMinus = pion_minus_length - trackLength_pion_minus;
785 if (MClepton_reco && MClepton) {
796 if (MCproton_reco && MCproton) {
805 if (MCpion_plus_reco && MCpion_plus) {
814 if (MCpion_minus_reco && MCpion_minus) {
823 if (MCkaon_reco && MCkaon) {
835 if (MClepton_reco && MClepton) {
842 if (MCkaon_reco && MCkaon) {
849 if (MCproton_reco && MCproton) {
856 if (MCpion_plus_reco && MCpion_plus) {
863 if (MCpion_minus_reco && MCpion_minus) {
870 if (MCmichel_reco && MCmichel) {
890 std::map<int, double> trkID_E;
891 for (
size_t j = 0; j < track_hits.size(); ++j) {
894 for (
size_t k = 0;
k < TrackIDs.size();
k++) {
895 trkID_E[TrackIDs[
k].trackID] += TrackIDs[
k].energy;
899 double max_E = -999.0;
900 double total_E = 0.0;
908 if (!trkID_E.size()) {
913 total_E += ii->second;
914 if ((ii->second) > max_E) {
915 partial_E = ii->second;
918 if (TrackID < 0) E_em += ii->second;
929 if (TrackID < 0)
return;
931 Efrac = (partial_E) / total_E;
934 double totenergy = 0;
935 for (
size_t k = 0;
k < all_hits.size(); ++
k) {
938 for (
size_t l = 0;
l < TrackIDs.size(); ++
l) {
939 if (TrackIDs[
l].trackID == TrackID) totenergy += TrackIDs[
l].energy;
942 Ecomplet = partial_E / totenergy;
954 if (!MCparticle)
return -999.0;
956 std::vector<double> TPCLengthHits(numberTrajectoryPoints, 0.0);
957 int FirstHit = 0, LastHit = 0;
958 double TPCLength = 0.0;
959 bool BeenInVolume =
false;
963 for (
unsigned int MCHit = 0; MCHit < TPCLengthHits.size(); ++MCHit) {
964 const TLorentzVector& tmpPosition = MCparticle->
Position(MCHit);
965 double const tmpPosArray[] = {tmpPosition[0], tmpPosition[1], tmpPosition[2]};
967 TPCLengthHits[MCHit] = sqrt(
pow((MCparticle->
Vx(MCHit - 1) - MCparticle->
Vx(MCHit)), 2) +
968 pow((MCparticle->
Vy(MCHit - 1) - MCparticle->
Vy(MCHit)), 2) +
969 pow((MCparticle->
Vz(MCHit - 1) - MCparticle->
Vz(MCHit)), 2));
976 double DriftTimeCorrection = fabs(tmpPosition[0] - XPlanePosition) /
fDriftVelocity;
977 double TimeAtPlane = MCparticle->
T() + DriftTimeCorrection;
989 for (
int Hit = FirstHit + 1;
Hit <= LastHit; ++
Hit)
990 TPCLength += TPCLengthHits[
Hit];
997 double const x = vertex[0];
998 double const y = vertex[1];
999 double const z = vertex[2];
1012 TGraphAsymmErrors* grEff_Ev =
h_Eff_Ev->CreateGraph();
1013 grEff_Ev->Write(
"grEff_Ev");
1018 TGraphAsymmErrors* grEff_Pmu =
h_Eff_Pmu->CreateGraph();
1019 grEff_Pmu->Write(
"grEff_Pmu");
1024 TGraphAsymmErrors* grEff_theta =
h_Eff_theta->CreateGraph();
1025 grEff_theta->Write(
"grEff_theta");
1030 TGraphAsymmErrors* grEff_Pproton =
h_Eff_Pproton->CreateGraph();
1031 grEff_Pproton->Write(
"grEff_Pproton");
1037 grEff_Ppion_plus->Write(
"grEff_Ppion_plus");
1043 grEff_Ppion_minus->Write(
"grEff_Ppion_minus");
1048 TGraphAsymmErrors* grEff_Lmuon =
h_Eff_Lmuon->CreateGraph();
1049 grEff_Lmuon->Write(
"grEff_Lmuon");
1054 TGraphAsymmErrors* grEff_Lproton =
h_Eff_Lproton->CreateGraph();
1055 grEff_Lproton->Write(
"grEff_Lproton");
1061 grEff_Lpion_plus->Write(
"grEff_Lpion_plus");
1067 grEff_Lpion_minus->Write(
"grEff_Lpion_minus");
1072 TGraphAsymmErrors* grEff_Pkaon =
h_Eff_Pkaon->CreateGraph();
1073 grEff_Pkaon->Write(
"grEff_Pkaon");
1078 TGraphAsymmErrors* grEff_Lkaon =
h_Eff_Lkaon->CreateGraph();
1079 grEff_Lkaon->Write(
"grEff_Lkaon");
1084 TGraphAsymmErrors* grEff_Pmichel =
h_Eff_Pmichel->CreateGraph();
1085 grEff_Pmichel->Write(
"grEff_Pmichel");
1090 TGraphAsymmErrors* grEff_Lmichel =
h_Eff_Lmichel->CreateGraph();
1091 grEff_Lmichel->Write(
"grEff_Lmichel");
def analyze(root, level, gtrees, gbranches, doprint)
art::ServiceHandle< geo::Geometry const > geom
unsigned int NumberTrajectoryPoints() const
const TLorentzVector & Position(const int i=0) const
const simb::MCNeutrino & GetNeutrino() const
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
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
Geometry information for a single TPC.
TEfficiency * h_Eff_Ppion_minus
Geometry information for a single cryostat.
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.
geo::TPCID FindTPCAtPosition(double const worldLoc[3]) const
Returns the ID of the TPC at specified location.
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
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
CryostatGeo const & Cryostat(geo::CryostatID const &cryoid) const
Returns the specified cryostat.
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
int MC_leading_PionMinusID
Contains all timing reference information for the detector.
const TPCGeo & TPC(unsigned int itpc) const
Return the itpc'th TPC in the cryostat.
TH1D * h_trackRes_pion_minus
int MC_leading_PionPlusID
const TLorentzVector & Momentum(const int i=0) const
TH1D * h_pionmwtrk_length
Provides recob::Track data product.
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.
LArSoft geometry interface.
TH1D * h_pionpwtrk_length
double MC_leading_PionMinusP
TH1D * h_Ecomplet_pion_minus
TEfficiency * h_Eff_Lmichel
TEfficiency * h_Eff_Pkaon
void LocalToWorld(const double *tpc, double *world) const
Transform point from local TPC frame to world frame.
const double * PlaneLocation(unsigned int p) const
bool insideFV(double vertex[4])
double Vy(const int i=0) const
TEfficiency * h_Eff_Ppion_plus
QTextStream & endl(QTextStream &s)
Event finding and building.