#include "art/Framework/Core/EDAnalyzer.h"
#include "art/Framework/Core/ModuleMacros.h"
#include "art/Framework/Principal/Event.h"
#include "art/Framework/Principal/Handle.h"
#include "art/Framework/Principal/Run.h"
#include "art/Framework/Principal/SubRun.h"
#include "canvas/Utilities/InputTag.h"
#include "fhiclcpp/ParameterSet.h"
#include "messagefacility/MessageLogger/MessageLogger.h"
#include "art/Framework/Services/Registry/ServiceHandle.h"
#include "lardataalg/DetectorInfo/DetectorPropertiesStandard.h"
#include "lardata/DetectorInfoServices/DetectorPropertiesService.h"
#include "lardata/DetectorInfoServices/DetectorClocksService.h"
#include "larcore/Geometry/Geometry.h"
#include "larcore/CoreUtils/ServiceUtil.h"
#include "larcorealg/Geometry/GeometryCore.h"
#include "larcorealg/Geometry/BoxBoundedGeo.h"
#include "larsim/MCCheater/BackTrackerService.h"
#include "larsim/MCCheater/ParticleInventoryService.h"
#include "art_root_io/TFileService.h"
#include "lardataobj/AnalysisBase/T0.h"
#include "larreco/RecoAlg/TrackMomentumCalculator.h"
#include "lardataobj/RecoBase/PFParticle.h"
#include "lardataobj/RecoBase/Shower.h"
#include "lardataobj/RecoBase/Slice.h"
#include "lardataobj/RecoBase/Track.h"
#include "lardataobj/RecoBase/Hit.h"
#include "lardataobj/RecoBase/Cluster.h"
#include "lardataobj/AnalysisBase/Calorimetry.h"
#include "lardataobj/AnalysisBase/ParticleID.h"
#include "lardataobj/RecoBase/PFParticleMetadata.h"
#include "lardataobj/RecoBase/MCSFitResult.h"
#include "nusimdata/SimulationBase/MCParticle.h"
#include "nusimdata/SimulationBase/MCTruth.h"
#include "larcorealg/GeoAlgo/GeoAlgo.h"
#include "TH1D.h"
#include "sbncode/CAFMaker/RecoUtils/RecoUtils.h"
Go to the source code of this file.
|
float | Completion (const simb::MCParticle &particle, float particleE, const std::vector< std::pair< int, float >> &matches, const std::vector< simb::MCParticle > &particles) |
|
float | Purity (const simb::MCParticle &particle, float totalE, const std::vector< std::pair< int, float >> &matches, const std::vector< simb::MCParticle > &particles) |
|
float | ContainedLength (const TVector3 &v0, const TVector3 &v1, const std::vector< geoalgo::AABox > &boxes) |
|
float Completion |
( |
const simb::MCParticle & |
particle, |
|
|
float |
particleE, |
|
|
const std::vector< std::pair< int, float >> & |
matches, |
|
|
const std::vector< simb::MCParticle > & |
particles |
|
) |
| |
Definition at line 318 of file MuPVertexStudy_module.cc.
319 for (
auto const &pair: matches) {
320 if (pair.first == particle.TrackId()) {
321 return pair.second / particleE;
float ContainedLength |
( |
const TVector3 & |
v0, |
|
|
const TVector3 & |
v1, |
|
|
const std::vector< geoalgo::AABox > & |
boxes |
|
) |
| |
float Purity |
( |
const simb::MCParticle & |
particle, |
|
|
float |
totalE, |
|
|
const std::vector< std::pair< int, float >> & |
matches, |
|
|
const std::vector< simb::MCParticle > & |
particles |
|
) |
| |
Definition at line 327 of file MuPVertexStudy_module.cc.
329 for (
auto const &pair: matches) {
330 bool matches =
false;
331 if (pair.first == particle.TrackId()) matches =
true;
333 for (
int i_d = 0; i_d < particle.NumberDaughters(); i_d++) {
334 if (pair.first == particle.Daughter(i_d)) {
335 bool showerDaughter =
true;
336 for (
unsigned i_p = 0; i_p < particles.size(); i_p++) {
337 if (pair.first == particles[i_p].TrackId()) {
338 showerDaughter = particles[i_p].Process() ==
"muIoni";
342 matches = showerDaughter;
347 if (matches) matchE += pair.second;
349 return matchE / totalE;