Public Member Functions | Private Member Functions | Private Attributes | List of all members
DUNE::NeutrinoShowerEff Class Reference
Inheritance diagram for DUNE::NeutrinoShowerEff:
art::EDAnalyzer art::detail::Analyzer art::detail::LegacyModule art::Observer art::ModuleBase

Public Member Functions

 NeutrinoShowerEff (fhicl::ParameterSet const &pset)
 
- Public Member Functions inherited from art::EDAnalyzer
 EDAnalyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDAnalyzer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Analyzer
virtual ~Analyzer () noexcept
 
 Analyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 Analyzer (Table< Config > const &config)
 
void doBeginJob (SharedResources const &resources)
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
- Public Member Functions inherited from art::Observer
 ~Observer () noexcept
 
 Observer (Observer const &)=delete
 
 Observer (Observer &&)=delete
 
Observeroperator= (Observer const &)=delete
 
Observeroperator= (Observer &&)=delete
 
void registerProducts (ProductDescriptions &, ModuleDescription const &)
 
void fillDescriptions (ModuleDescription const &)
 
fhicl::ParameterSetID selectorConfig () const
 
- Public Member Functions inherited from art::ModuleBase
virtual ~ModuleBase () noexcept
 
 ModuleBase ()
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Private Member Functions

void beginJob () override
 
void endJob () override
 
void beginRun (const art::Run &run) override
 
void analyze (const art::Event &evt) override
 
void processEff (detinfo::DetectorClocksData const &clockData, const art::Event &evt, bool &isFiducial)
 
void truthMatcher (detinfo::DetectorClocksData const &clockData, std::vector< art::Ptr< recob::Hit >> all_hits, std::vector< art::Ptr< recob::Hit >> shower_hits, const simb::MCParticle *&MCparticle, double &Efrac, double &Ecomplet)
 
template<size_t N>
void checkCNNtrkshw (detinfo::DetectorClocksData const &clockData, const art::Event &evt, std::vector< art::Ptr< recob::Hit >> all_hits)
 
bool insideFV (double vertex[4])
 
void doEfficiencies ()
 
void reset ()
 

Private Attributes

art::InputTag fMCTruthModuleLabel
 
art::InputTag fHitModuleLabel
 
art::InputTag fShowerModuleLabel
 
art::InputTag fCNNEMModuleLabel
 
int fNeutrinoPDGcode
 
int fLeptonPDGcode
 
double fMaxNeutrinoE
 
bool fSaveMCTree
 
double fMaxEfrac
 
double fMinCompleteness
 
TTree * fEventTree
 
TH1D * h_Ev_den
 
TH1D * h_Ev_num
 
TH1D * h_Ev_num_dEdx
 
TH1D * h_Ee_den
 
TH1D * h_Ee_num
 
TH1D * h_Ee_num_dEdx
 
TH1D * h_Pe_den
 
TH1D * h_Pe_num
 
TH1D * h_theta_den
 
TH1D * h_theta_num
 
TH1D * h_Efrac_shContamination
 
TH1D * h_Efrac_shPurity
 
TH1D * h_Ecomplet_lepton
 
TH1D * h_Efrac_NueCCPurity
 
TH1D * h_Ecomplet_NueCC
 
TH1D * h_HighestHitsProducedParticlePDG_NueCC
 
TH1D * h_HighestHitsProducedParticlePDG_bkg
 
TH1D * h_Efrac_bkgPurity
 
TH1D * h_Ecomplet_bkg
 
TEfficiency * h_Eff_Ev = 0
 
TEfficiency * h_Eff_Ev_dEdx = 0
 
TEfficiency * h_Eff_Ee = 0
 
TEfficiency * h_Eff_Ee_dEdx = 0
 
TEfficiency * h_Eff_Pe = 0
 
TEfficiency * h_Eff_theta = 0
 
TH1D * h_esh_bestplane_NueCC
 
TH1D * h_esh_bestplane_NC
 
TH1D * h_dEdX_electronorpositron_NueCC
 
TH1D * h_dEdX_electronorpositron_NC
 
TH1D * h_dEdX_photon_NueCC
 
TH1D * h_dEdX_photon_NC
 
TH1D * h_dEdX_proton_NueCC
 
TH1D * h_dEdX_proton_NC
 
TH1D * h_dEdX_neutron_NueCC
 
TH1D * h_dEdX_neutron_NC
 
TH1D * h_dEdX_chargedpion_NueCC
 
TH1D * h_dEdX_chargedpion_NC
 
TH1D * h_dEdX_neutralpion_NueCC
 
TH1D * h_dEdX_neutralpion_NC
 
TH1D * h_dEdX_everythingelse_NueCC
 
TH1D * h_dEdX_everythingelse_NC
 
TH1D * h_dEdXasymm_electronorpositron_NueCC
 
TH1D * h_dEdXasymm_photon_NC
 
TH1D * h_mpi0_electronorpositron_NueCC
 
TH1D * h_mpi0_photon_NC
 
TH1D * h_trklike_em
 
TH1D * h_trklike_nonem
 
TH1D * h_CosThetaShDirwrtTrueparticle_electronorpositron_NueCC
 
TH1D * h_CosThetaShDirwrtTrueparticle_electronorpositron_NC
 
TH1D * h_CosThetaShDirwrtTrueparticle_photon_NueCC
 
TH1D * h_CosThetaShDirwrtTrueparticle_photon_NC
 
TH1D * h_CosThetaShDirwrtTrueparticle_proton_NueCC
 
TH1D * h_CosThetaShDirwrtTrueparticle_proton_NC
 
TH1D * h_CosThetaShDirwrtTrueparticle_chargedpion_NueCC
 
TH1D * h_CosThetaShDirwrtTrueparticle_chargedpion_NC
 
TH1D * h_ShStartXwrtTrueparticleStartXDiff_electronorpositron_NueCC
 
TH1D * h_ShStartYwrtTrueparticleStartYDiff_electronorpositron_NueCC
 
TH1D * h_ShStartZwrtTrueparticleStartZDiff_electronorpositron_NueCC
 
TH1D * h_ShStartXwrtTrueparticleStartXDiff_electronorpositron_NC
 
TH1D * h_ShStartYwrtTrueparticleStartYDiff_electronorpositron_NC
 
TH1D * h_ShStartZwrtTrueparticleStartZDiff_electronorpositron_NC
 
TH1D * h_ShStartXwrtTrueparticleStartXDiff_photon_NueCC
 
TH1D * h_ShStartYwrtTrueparticleStartYDiff_photon_NueCC
 
TH1D * h_ShStartZwrtTrueparticleStartZDiff_photon_NueCC
 
TH1D * h_ShStartXwrtTrueparticleStartXDiff_photon_NC
 
TH1D * h_ShStartYwrtTrueparticleStartYDiff_photon_NC
 
TH1D * h_ShStartZwrtTrueparticleStartZDiff_photon_NC
 
TH1D * h_ShStartXwrtTrueparticleEndXDiff_photon_NueCC
 
TH1D * h_ShStartYwrtTrueparticleEndYDiff_photon_NueCC
 
TH1D * h_ShStartZwrtTrueparticleEndZDiff_photon_NueCC
 
TH1D * h_ShStartXwrtTrueparticleEndXDiff_photon_NC
 
TH1D * h_ShStartYwrtTrueparticleEndYDiff_photon_NC
 
TH1D * h_ShStartZwrtTrueparticleEndZDiff_photon_NC
 
TH1D * h_ShStartXwrtTrueparticleStartXDiff_proton_NueCC
 
TH1D * h_ShStartYwrtTrueparticleStartYDiff_proton_NueCC
 
TH1D * h_ShStartZwrtTrueparticleStartZDiff_proton_NueCC
 
TH1D * h_ShStartXwrtTrueparticleStartXDiff_proton_NC
 
TH1D * h_ShStartYwrtTrueparticleStartYDiff_proton_NC
 
TH1D * h_ShStartZwrtTrueparticleStartZDiff_proton_NC
 
TH1D * h_ShStartXwrtTrueparticleStartXDiff_chargedpion_NueCC
 
TH1D * h_ShStartYwrtTrueparticleStartYDiff_chargedpion_NueCC
 
TH1D * h_ShStartZwrtTrueparticleStartZDiff_chargedpion_NueCC
 
TH1D * h_ShStartXwrtTrueparticleStartXDiff_chargedpion_NC
 
TH1D * h_ShStartYwrtTrueparticleStartYDiff_chargedpion_NC
 
TH1D * h_ShStartZwrtTrueparticleStartZDiff_chargedpion_NC
 
int Event
 
int Run
 
int SubRun
 
int MC_incoming_PDG
 
int MC_lepton_PDG
 
int MC_isCC
 
int MC_channel
 
int MC_target
 
double MC_Q2
 
double MC_W
 
double MC_vertex [4]
 
double MC_incoming_P [4]
 
double MC_lepton_startMomentum [4]
 
double MC_lepton_endMomentum [4]
 
double MC_lepton_startXYZT [4]
 
double MC_lepton_endXYZT [4]
 
double MC_lepton_theta
 
int MC_leptonID
 
int MC_LeptonTrack
 
double sh_direction_X [MAX_SHOWERS]
 
double sh_direction_Y [MAX_SHOWERS]
 
double sh_direction_Z [MAX_SHOWERS]
 
double sh_start_X [MAX_SHOWERS]
 
double sh_start_Y [MAX_SHOWERS]
 
double sh_start_Z [MAX_SHOWERS]
 
double sh_energy [MAX_SHOWERS][3]
 
double sh_MIPenergy [MAX_SHOWERS][3]
 
double sh_dEdx [MAX_SHOWERS][3]
 
int sh_bestplane [MAX_SHOWERS]
 
double sh_length [MAX_SHOWERS]
 
int sh_hasPrimary_e [MAX_SHOWERS]
 
double sh_Efrac_contamination [MAX_SHOWERS]
 
double sh_purity [MAX_SHOWERS]
 
double sh_completeness [MAX_SHOWERS]
 
int sh_nHits [MAX_SHOWERS]
 
int sh_largest
 
int sh_pdg [MAX_SHOWERS]
 
double sh_dEdxasymm [MAX_SHOWERS]
 
double sh_mpi0
 
int n_recoShowers
 
double sh_Efrac_best
 
float fFidVolCutX
 
float fFidVolCutY
 
float fFidVolCutZ
 
float fFidVolXmin
 
float fFidVolXmax
 
float fFidVolYmin
 
float fFidVolYmax
 
float fFidVolZmin
 
float fFidVolZmax
 
art::ServiceHandle< geo::Geometry const > geom
 

Additional Inherited Members

- Public Types inherited from art::EDAnalyzer
using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 
- Protected Member Functions inherited from art::Observer
std::string const & processName () const
 
bool wantAllEvents () const noexcept
 
bool wantEvent (ScheduleID id, Event const &e) const
 
Handle< TriggerResultsgetTriggerResults (Event const &e) const
 
 Observer (fhicl::ParameterSet const &config)
 
 Observer (std::vector< std::string > const &select_paths, std::vector< std::string > const &reject_paths, fhicl::ParameterSet const &config)
 
- Protected Member Functions inherited from art::ModuleBase
ConsumesCollectorconsumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Detailed Description

Definition at line 36 of file NeutrinoShowerEff_module.cc.

Constructor & Destructor Documentation

DUNE::NeutrinoShowerEff::NeutrinoShowerEff ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 255 of file NeutrinoShowerEff_module.cc.

255  : EDAnalyzer(p)
256  {
257  fMCTruthModuleLabel = p.get<art::InputTag>("MCTruthModuleLabel");
258  fHitModuleLabel = p.get<art::InputTag>("HitModuleLabel");
259  fShowerModuleLabel = p.get<art::InputTag>("ShowerModuleLabel");
260  fCNNEMModuleLabel = p.get<art::InputTag>("CNNEMModuleLabel", "");
261  fLeptonPDGcode = p.get<int>("LeptonPDGcode");
262  fNeutrinoPDGcode = p.get<int>("NeutrinoPDGcode");
263  fMaxNeutrinoE = p.get<double>("MaxNeutrinoE");
264  fMaxEfrac = p.get<double>("MaxEfrac");
265  fMinCompleteness = p.get<double>("MinCompleteness");
266  fSaveMCTree = p.get<bool>("SaveMCTree");
267  fFidVolCutX = p.get<float>("FidVolCutX");
268  fFidVolCutY = p.get<float>("FidVolCutY");
269  fFidVolCutZ = p.get<float>("FidVolCutZ");
270  }
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.h:25
p
Definition: test.py:223

Member Function Documentation

void DUNE::NeutrinoShowerEff::analyze ( const art::Event evt)
overrideprivate

Definition at line 841 of file NeutrinoShowerEff_module.cc.

842  {
843 
844  reset();
845 
846  Event = event.id().event();
847  Run = event.run();
848  SubRun = event.subRun();
849  bool isFiducial = false;
850 
851  auto const clockData =
853 
854  processEff(clockData, event, isFiducial);
855  if (fSaveMCTree) {
856  if (isFiducial) fEventTree->Fill();
857  }
858  }
void processEff(detinfo::DetectorClocksData const &clockData, const art::Event &evt, bool &isFiducial)
Event finding and building.
void DUNE::NeutrinoShowerEff::beginJob ( )
overrideprivatevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 274 of file NeutrinoShowerEff_module.cc.

275  {
276  cout << "job begin..." << endl;
277 
278  // Get geometry.
279  auto const* geo = lar::providerFrom<geo::Geometry>();
280  // Define histogram boundaries (cm).
281  // For now only draw cryostat=0.
282  double minx = 1e9;
283  double maxx = -1e9;
284  double miny = 1e9;
285  double maxy = -1e9;
286  double minz = 1e9;
287  double maxz = -1e9;
288  for (size_t i = 0; i < geo->NTPC(); ++i) {
289  double local[3] = {0., 0., 0.};
290  double world[3] = {0., 0., 0.};
291  const geo::TPCGeo& tpc = geo->TPC(i);
292  tpc.LocalToWorld(local, world);
293  if (minx > world[0] - geo->DetHalfWidth(i)) minx = world[0] - geo->DetHalfWidth(i);
294  if (maxx < world[0] + geo->DetHalfWidth(i)) maxx = world[0] + geo->DetHalfWidth(i);
295  if (miny > world[1] - geo->DetHalfHeight(i)) miny = world[1] - geo->DetHalfHeight(i);
296  if (maxy < world[1] + geo->DetHalfHeight(i)) maxy = world[1] + geo->DetHalfHeight(i);
297  if (minz > world[2] - geo->DetLength(i) / 2.) minz = world[2] - geo->DetLength(i) / 2.;
298  if (maxz < world[2] + geo->DetLength(i) / 2.) maxz = world[2] + geo->DetLength(i) / 2.;
299  }
300 
301  fFidVolXmin = minx + fFidVolCutX;
302  fFidVolXmax = maxx - fFidVolCutX;
303  fFidVolYmin = miny + fFidVolCutY;
304  fFidVolYmax = maxy - fFidVolCutY;
305  fFidVolZmin = minz + fFidVolCutZ;
306  fFidVolZmax = maxz - fFidVolCutZ;
307 
308  std::cout << "Fiducial volume:"
309  << "\n"
310  << fFidVolXmin << "\t< x <\t" << fFidVolXmax << "\n"
311  << fFidVolYmin << "\t< y <\t" << fFidVolYmax << "\n"
312  << fFidVolZmin << "\t< z <\t" << fFidVolZmax << "\n";
313 
315 
316  double E_bins[21] = {0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4, 4.5, 5.0,
317  5.5, 6.0, 7.0, 8.0, 10.0, 12.0, 14.0, 17.0, 20.0, 25.0};
318  double theta_bin[44] = {0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.,
319  11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 22.,
320  24., 26., 28., 30., 32., 34., 36., 38., 40., 42., 44.,
321  46., 48., 50., 55., 60., 65., 70., 75., 80., 85., 90.};
322  // double Pbins[18] ={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};
323 
324  h_Ev_den =
325  tfs->make<TH1D>("h_Ev_den",
326  "Neutrino Energy; Neutrino Energy (GeV); Shower Reconstruction Efficiency",
327  20,
328  E_bins);
329  h_Ev_den->Sumw2();
330  h_Ev_num =
331  tfs->make<TH1D>("h_Ev_num",
332  "Neutrino Energy; Neutrino Energy (GeV); Shower Reconstruction Efficiency",
333  20,
334  E_bins);
335  h_Ev_num->Sumw2();
336  h_Ev_num_dEdx =
337  tfs->make<TH1D>("h_Ev_num_dEdx",
338  "Neutrino Energy; Neutrino Energy (GeV); Shower Reconstruction Efficiency",
339  20,
340  E_bins);
341  h_Ev_num_dEdx->Sumw2();
342 
343  h_Ee_den =
344  tfs->make<TH1D>("h_Ee_den",
345  "Electron Energy; Electron Energy (GeV); Shower Reconstruction Efficiency",
346  20,
347  E_bins);
348  h_Ee_den->Sumw2();
349  h_Ee_num =
350  tfs->make<TH1D>("h_Ee_num",
351  "Electron Energy; Electron Energy (GeV); Shower Reconstruction Efficiency",
352  20,
353  E_bins);
354  h_Ee_num->Sumw2();
355  h_Ee_num_dEdx =
356  tfs->make<TH1D>("h_Ee_num_dEdx",
357  "Electron Energy; Electron Energy (GeV); Shower Reconstruction Efficiency",
358  20,
359  E_bins);
360  h_Ee_num_dEdx->Sumw2();
361 
362  h_Pe_den = tfs->make<TH1D>(
363  "h_Pe_den",
364  "Electron Momentum; Electron Momentum (GeV); Shower reconstruction Efficiency",
365  20,
366  E_bins);
367  h_Pe_den->Sumw2();
368  h_Pe_num = tfs->make<TH1D>(
369  "h_Pe_num",
370  "Electron Momentum; Electron Momentum (GeV); Shower reconstruction Efficiency",
371  20,
372  E_bins);
373  h_Pe_num->Sumw2();
374 
375  h_theta_den = tfs->make<TH1D>(
376  "h_theta_den",
377  "CosTheta; CosTheta w.r.t beam direction (Degrees); Shower reconstruction Efficiency",
378  43,
379  theta_bin);
380  h_theta_den->Sumw2();
381  h_theta_num = tfs->make<TH1D>(
382  "h_theta_num",
383  "CosTheta; CosTheta w.r.t beam direction (Degrees); Shower reconstruction Efficiency",
384  43,
385  theta_bin);
386  h_theta_num->Sumw2();
387 
388  h_Efrac_shContamination = tfs->make<TH1D>(
389  "h_Efrac_shContamination", "Efrac Lepton; Energy fraction (contamination);", 60, 0, 1.2);
390  h_Efrac_shContamination->Sumw2();
392  tfs->make<TH1D>("h_Efrac_shPurity", "Efrac Lepton; Energy fraction (Purity);", 60, 0, 1.2);
393  h_Efrac_shPurity->Sumw2();
395  tfs->make<TH1D>("h_Ecomplet_lepton", "Ecomplet Lepton; Shower Completeness;", 60, 0, 1.2);
396  h_Ecomplet_lepton->Sumw2();
397 
399  tfs->make<TH1D>("h_HighestHitsProducedParticlePDG_NueCC",
400  "PDG Code; PDG Code;",
401  4,
402  -0.5,
403  3.5); //0 for undefined, 1=electron, 2=photon, 3=anything else //Signal
406  tfs->make<TH1D>("h_HighestHitsProducedParticlePDG_bkg",
407  "PDG Code; PDG Code;",
408  4,
409  -0.5,
410  3.5); //0 for undefined, 1=electron, 2=photon, 3=anything else //bkg
412 
413  h_Efrac_NueCCPurity = tfs->make<TH1D>(
414  "h_Efrac_NueCCPurity", "Efrac NueCC; Energy fraction (Purity);", 60, 0, 1.2); //Signal
415  h_Efrac_NueCCPurity->Sumw2();
417  tfs->make<TH1D>("h_Ecomplet_NueCC", "Ecomplet NueCC; Shower Completeness;", 60, 0, 1.2);
418  h_Ecomplet_NueCC->Sumw2();
419 
420  h_Efrac_bkgPurity = tfs->make<TH1D>(
421  "h_Efrac_bkgPurity", "Efrac bkg; Energy fraction (Purity);", 60, 0, 1.2); //Background
422  h_Efrac_bkgPurity->Sumw2();
424  tfs->make<TH1D>("h_Ecomplet_bkg", "Ecomplet bkg; Shower Completeness;", 60, 0, 1.2);
425  h_Ecomplet_bkg->Sumw2();
426 
428  tfs->make<TH1D>("h_esh_bestplane_NueCC", "Best plane; Best plane;", 4, -0.5, 3.5);
430  tfs->make<TH1D>("h_esh_bestplane_NC", "Best plane; Best plane;", 4, -0.5, 3.5);
431  h_dEdX_electronorpositron_NueCC = tfs->make<TH1D>("h_dEdX_electronorpositron_NueCC",
432  "dE/dX; Electron or Positron dE/dX (MeV/cm);",
433  100,
434  0.0,
435  15.0);
436  h_dEdX_electronorpositron_NC = tfs->make<TH1D>("h_dEdX_electronorpositron_NC",
437  "dE/dX; Electron or Positron dE/dX (MeV/cm);",
438  100,
439  0.0,
440  15.0);
442  tfs->make<TH1D>("h_dEdX_photon_NueCC", "dE/dX; photon dE/dX (MeV/cm);", 100, 0.0, 15.0);
444  tfs->make<TH1D>("h_dEdX_photon_NC", "dE/dX; photon dE/dX (MeV/cm);", 100, 0.0, 15.0);
446  tfs->make<TH1D>("h_dEdX_proton_NueCC", "dE/dX; proton dE/dX (MeV/cm);", 100, 0.0, 15.0);
448  tfs->make<TH1D>("h_dEdX_proton_NC", "dE/dX; proton dE/dX (MeV/cm);", 100, 0.0, 15.0);
450  tfs->make<TH1D>("h_dEdX_neutron_NueCC", "dE/dX; neutron dE/dX (MeV/cm);", 100, 0.0, 15.0);
452  tfs->make<TH1D>("h_dEdX_neutron_NC", "dE/dX; neutron dE/dX (MeV/cm);", 100, 0.0, 15.0);
453  h_dEdX_chargedpion_NueCC = tfs->make<TH1D>(
454  "h_dEdX_chargedpion_NueCC", "dE/dX; charged pion dE/dX (MeV/cm);", 100, 0.0, 15.0);
455  h_dEdX_chargedpion_NC = tfs->make<TH1D>(
456  "h_dEdX_chargedpion_NC", "dE/dX; charged pion dE/dX (MeV/cm);", 100, 0.0, 15.0);
457  h_dEdX_neutralpion_NueCC = tfs->make<TH1D>(
458  "h_dEdX_neutralpion_NueCC", "dE/dX; neutral pion dE/dX (MeV/cm);", 100, 0.0, 15.0);
459  h_dEdX_neutralpion_NC = tfs->make<TH1D>(
460  "h_dEdX_neutralpion_NC", "dE/dX; neutral pion dE/dX (MeV/cm);", 100, 0.0, 15.0);
461  h_dEdX_everythingelse_NueCC = tfs->make<TH1D>(
462  "h_dEdX_everythingelse_NueCC", "dE/dX; everythingelse dE/dX (MeV/cm);", 100, 0.0, 15.0);
463  h_dEdX_everythingelse_NC = tfs->make<TH1D>(
464  "h_dEdX_everythingelse_NC", "dE/dX; everythingelse dE/dX (MeV/cm);", 100, 0.0, 15.0);
465 
467  tfs->make<TH1D>("h_dEdXasymm_electronorpositron_NueCC",
468  "dE/dX asymmetry; Electron or Positron dE/dX asymmetry;",
469  60,
470  0.0,
471  1.2);
472  h_dEdXasymm_photon_NC = tfs->make<TH1D>(
473  "h_dEdXasymm_photon_NC", "dE/dX asymmetry; photon dE/dx asymmetry;", 60, 0.0, 1.2);
474 
476  tfs->make<TH1D>("h_mpi0_electronorpositron_NueCC",
477  "m(#gamma#gamma); Electron or Positron dE/dX (MeV/cm);",
478  100,
479  0,
480  1);
481  h_mpi0_photon_NC = tfs->make<TH1D>(
482  "h_mpi0_photon_NC", "m(#gamma#gamma); Electron or Positron dE/dX (MeV/cm);", 100, 0, 1);
483 
484  h_esh_bestplane_NueCC->Sumw2();
485  h_esh_bestplane_NC->Sumw2();
488  h_dEdX_photon_NueCC->Sumw2();
489  h_dEdX_photon_NC->Sumw2();
490  h_dEdX_proton_NueCC->Sumw2();
491  h_dEdX_proton_NC->Sumw2();
492  h_dEdX_neutron_NueCC->Sumw2();
493  h_dEdX_neutron_NC->Sumw2();
494  h_dEdX_chargedpion_NueCC->Sumw2();
495  h_dEdX_chargedpion_NC->Sumw2();
496  h_dEdX_neutralpion_NueCC->Sumw2();
497  h_dEdX_neutralpion_NC->Sumw2();
499  h_dEdX_everythingelse_NC->Sumw2();
500 
502  h_dEdXasymm_photon_NC->Sumw2();
503 
505  h_mpi0_photon_NC->Sumw2();
506 
507  h_trklike_em = tfs->make<TH1D>("h_trklike_em", "EM hits; Track-like Score;", 100, 0, 1);
509  tfs->make<TH1D>("h_trklike_nonem", "Non-EM hits; Track-like Score;", 100, 0, 1);
510 
511  //Study the constheta angle between the reconstructed shower direction w.r.t MC true particle direction
513  tfs->make<TH1D>("h_CosThetaShDirwrtTrueparticle_electronorpositron_NueCC",
514  "CosTheta; cos#theta;",
515  110,
516  -1.1,
517  1.1);
519  tfs->make<TH1D>("h_CosThetaShDirwrtTrueparticle_electronorpositron_NC",
520  "CosTheta;cos#theta;",
521  110,
522  -1.1,
523  1.1);
525  "h_CosThetaShDirwrtTrueparticle_photon_NueCC", "CosTheta;cos#theta;", 110, -1.1, 1.1);
527  "h_CosThetaShDirwrtTrueparticle_photon_NC", "CosTheta;cos#theta;", 110, -1.1, 1.1);
529  "h_CosThetaShDirwrtTrueparticle_proton_NueCC", "CosTheta;cos#theta;", 110, -1.1, 1.1);
531  "h_CosThetaShDirwrtTrueparticle_proton_NC", "CosTheta;cos#theta;", 110, -1.1, 1.1);
533  "h_CosThetaShDirwrtTrueparticle_chargedpion_NueCC", "CosTheta;cos#theta;", 110, -1.1, 1.1);
535  "h_CosThetaShDirwrtTrueparticle_chargedpion_NC", "CosTheta;cos#theta;", 110, -1.1, 1.1);
536 
537  //Study the reconstructed shower start position (x,y,z) w.r.t MC true particle start position
539  tfs->make<TH1D>("h_ShStartXwrtTrueparticleStartXDiff_electronorpositron_NueCC",
540  "ShVx-TrueParticleVx; ShVx-TrueParticleVx (cm);",
541  100,
542  -5.0,
543  5.0);
545  tfs->make<TH1D>("h_ShStartYwrtTrueparticleStartYDiff_electronorpositron_NueCC",
546  "ShVy-TrueParticleVy; ShVy-TrueParticleVy (cm);",
547  100,
548  -5.0,
549  5.0);
551  tfs->make<TH1D>("h_ShStartZwrtTrueparticleStartZDiff_electronorpositron_NueCC",
552  "ShVz-TrueParticleVz; ShVz-TrueParticleVz (cm);",
553  100,
554  -5.0,
555  5.0);
556 
558  tfs->make<TH1D>("h_ShStartXwrtTrueparticleStartXDiff_electronorpositron_NC",
559  "ShVx-TrueParticleVx; ShVx-TrueParticleVx (cm);",
560  100,
561  -5.0,
562  5.0);
564  tfs->make<TH1D>("h_ShStartYwrtTrueparticleStartYDiff_electronorpositron_NC",
565  "ShVy-TrueParticleVy; ShVy-TrueParticleVy (cm);",
566  100,
567  -5.0,
568  5.0);
570  tfs->make<TH1D>("h_ShStartZwrtTrueparticleStartZDiff_electronorpositron_NC",
571  "ShVz-TrueParticleVz; ShVz-TrueParticleVz (cm);",
572  100,
573  -5.0,
574  5.0);
575 
577  tfs->make<TH1D>("h_ShStartXwrtTrueparticleStartXDiff_photon_NueCC",
578  "ShVx-TrueParticleVx; ShVx-TrueParticleVx (cm);",
579  100,
580  -5.0,
581  5.0);
583  tfs->make<TH1D>("h_ShStartYwrtTrueparticleStartYDiff_photon_NueCC",
584  "ShVy-TrueParticleVy; ShVy-TrueParticleVy (cm);",
585  100,
586  -5.0,
587  5.0);
589  tfs->make<TH1D>("h_ShStartZwrtTrueparticleStartZDiff_photon_NueCC",
590  "ShVz-TrueParticleVz; ShVz-TrueParticleVz (cm);",
591  100,
592  -5.0,
593  5.0);
594 
596  tfs->make<TH1D>("h_ShStartXwrtTrueparticleStartXDiff_photon_NC",
597  "ShVx-TrueParticleVx; ShVx-TrueParticleVx (cm);",
598  100,
599  -5.0,
600  5.0);
602  tfs->make<TH1D>("h_ShStartYwrtTrueparticleStartYDiff_photon_NC",
603  "ShVy-TrueParticleVy; ShVy-TrueParticleVy (cm);",
604  100,
605  -5.0,
606  5.0);
608  tfs->make<TH1D>("h_ShStartZwrtTrueparticleStartZDiff_photon_NC",
609  "ShVz-TrueParticleVz; ShVz-TrueParticleVz (cm);",
610  100,
611  -5.0,
612  5.0);
613 
615  tfs->make<TH1D>("h_ShStartXwrtTrueparticleEndXDiff_photon_NueCC",
616  "ShVx-TrueParticleVx; ShVx-TrueParticleVx (cm);",
617  100,
618  -5.0,
619  5.0);
621  tfs->make<TH1D>("h_ShStartYwrtTrueparticleEndYDiff_photon_NueCC",
622  "ShVy-TrueParticleVy; ShVy-TrueParticleVy (cm);",
623  100,
624  -5.0,
625  5.0);
627  tfs->make<TH1D>("h_ShStartZwrtTrueparticleEndZDiff_photon_NueCC",
628  "ShVz-TrueParticleVz; ShVz-TrueParticleVz (cm);",
629  100,
630  -5.0,
631  5.0);
632 
634  tfs->make<TH1D>("h_ShStartXwrtTrueparticleEndXDiff_photon_NC",
635  "ShVx-TrueParticleVx; ShVx-TrueParticleVx (cm);",
636  100,
637  -5.0,
638  5.0);
640  tfs->make<TH1D>("h_ShStartYwrtTrueparticleEndYDiff_photon_NC",
641  "ShVy-TrueParticleVy; ShVy-TrueParticleVy (cm);",
642  100,
643  -5.0,
644  5.0);
646  tfs->make<TH1D>("h_ShStartZwrtTrueparticleEndZDiff_photon_NC",
647  "ShVz-TrueParticleVz; ShVz-TrueParticleVz (cm);",
648  100,
649  -5.0,
650  5.0);
651 
653  tfs->make<TH1D>("h_ShStartXwrtTrueparticleStartXDiff_proton_NueCC",
654  "ShVx-TrueParticleVx; ShVx-TrueParticleVx (cm);",
655  100,
656  -5.0,
657  5.0);
659  tfs->make<TH1D>("h_ShStartYwrtTrueparticleStartYDiff_proton_NueCC",
660  "ShVy-TrueParticleVy; ShVy-TrueParticleVy (cm);",
661  100,
662  -5.0,
663  5.0);
665  tfs->make<TH1D>("h_ShStartZwrtTrueparticleStartZDiff_proton_NueCC",
666  "ShVz-TrueParticleVz; ShVz-TrueParticleVz (cm);",
667  100,
668  -5.0,
669  5.0);
670 
672  tfs->make<TH1D>("h_ShStartXwrtTrueparticleStartXDiff_proton_NC",
673  "ShVx-TrueParticleVx; ShVx-TrueParticleVx (cm);",
674  100,
675  -5.0,
676  5.0);
678  tfs->make<TH1D>("h_ShStartYwrtTrueparticleStartYDiff_proton_NC",
679  "ShVy-TrueParticleVy; ShVy-TrueParticleVy (cm);",
680  100,
681  -5.0,
682  5.0);
684  tfs->make<TH1D>("h_ShStartZwrtTrueparticleStartZDiff_proton_NC",
685  "ShVz-TrueParticleVz; ShVz-TrueParticleVz (cm);",
686  100,
687  -5.0,
688  5.0);
689 
691  tfs->make<TH1D>("h_ShStartXwrtTrueparticleStartXDiff_chargedpion_NueCC",
692  "ShVx-TrueParticleVx; ShVx-TrueParticleVx (cm);",
693  100,
694  -5.0,
695  5.0);
697  tfs->make<TH1D>("h_ShStartYwrtTrueparticleStartYDiff_chargedpion_NueCC",
698  "ShVy-TrueParticleVy; ShVy-TrueParticleVy (cm);",
699  100,
700  -5.0,
701  5.0);
703  tfs->make<TH1D>("h_ShStartZwrtTrueparticleStartZDiff_chargedpion_NueCC",
704  "ShVz-TrueParticleVz; ShVz-TrueParticleVz (cm);",
705  100,
706  -5.0,
707  5.0);
708 
710  tfs->make<TH1D>("h_ShStartXwrtTrueparticleStartXDiff_chargedpion_NC",
711  "ShVx-TrueParticleVx; ShVx-TrueParticleVx (cm);",
712  100,
713  -5.0,
714  5.0);
716  tfs->make<TH1D>("h_ShStartYwrtTrueparticleStartYDiff_chargedpion_NC",
717  "ShVy-TrueParticleVy; ShVy-TrueParticleVy (cm);",
718  100,
719  -5.0,
720  5.0);
722  tfs->make<TH1D>("h_ShStartZwrtTrueparticleStartZDiff_chargedpion_NC",
723  "ShVz-TrueParticleVz; ShVz-TrueParticleVz (cm);",
724  100,
725  -5.0,
726  5.0);
727 
728  //Study the constheta angle between the reconstructed shower direction w.r.t MC true particle direction
737 
738  //Study the reconstructed shower start position (x,y,z) w.r.t MC true particle start position
742 
746 
750 
754 
758 
762 
766 
770 
774 
778 
779  if (fSaveMCTree) {
780  fEventTree = new TTree("Event", "Event Tree from Sim & Reco");
781  fEventTree->Branch("eventNo", &Event);
782  fEventTree->Branch("runNo", &Run);
783  fEventTree->Branch("subRunNo", &SubRun);
784  fEventTree->Branch("mc_incoming_PDG", &MC_incoming_PDG);
785  fEventTree->Branch("mc_lepton_PDG", &MC_lepton_PDG);
786  fEventTree->Branch("mc_isCC", &MC_isCC);
787  fEventTree->Branch("mc_target", &MC_target);
788  fEventTree->Branch("mc_channel", &MC_channel);
789  fEventTree->Branch("mc_Q2", &MC_Q2);
790  fEventTree->Branch("mc_W", &MC_W);
791  fEventTree->Branch("mc_vertex", &MC_vertex, "mc_vertex[4]/D");
792  fEventTree->Branch("mc_incoming_P", &MC_incoming_P, "mc_incoming_P[4]/D");
793  fEventTree->Branch(
794  "mc_lepton_startMomentum", &MC_lepton_startMomentum, "mc_lepton_startMomentum[4]/D");
795  fEventTree->Branch(
796  "mc_lepton_endMomentum", &MC_lepton_endMomentum, "mc_lepton_endMomentum[4]/D");
797  fEventTree->Branch("mc_lepton_startXYZT", &MC_lepton_startXYZT, "mc_lepton_startXYZT[4]/D");
798  fEventTree->Branch("mc_lepton_endXYZT", &MC_lepton_endXYZT, "mc_lepton_endXYZT[4]/D");
799  fEventTree->Branch("mc_lepton_theta", &MC_lepton_theta, "mc_lepton_theta/D");
800  fEventTree->Branch("mc_leptonID", &MC_leptonID, "mc_leptonID/I");
801 
802  fEventTree->Branch("n_showers", &n_recoShowers);
803  fEventTree->Branch("sh_direction_X", &sh_direction_X, "sh_direction_X[n_showers]/D");
804  fEventTree->Branch("sh_direction_Y", &sh_direction_Y, "sh_direction_Y[n_showers]/D");
805  fEventTree->Branch("sh_direction_Z", &sh_direction_Z, "sh_direction_Z[n_showers]/D");
806  fEventTree->Branch("sh_start_X", &sh_start_X, "sh_start_X[n_showers]/D");
807  fEventTree->Branch("sh_start_Y", &sh_start_Y, "sh_start_Y[n_showers]/D");
808  fEventTree->Branch("sh_start_Z", &sh_start_Z, "sh_start_Z[n_showers]/D");
809  fEventTree->Branch("sh_energy", &sh_energy, "sh_energy[n_showers][3]/D");
810  fEventTree->Branch("sh_MIPenergy", &sh_MIPenergy, "sh_MIPenergy[n_showers][3]/D");
811  fEventTree->Branch("sh_dEdx", &sh_dEdx, "sh_dEdx[n_showers][3]/D");
812  fEventTree->Branch("sh_bestplane", &sh_bestplane, "sh_bestplane[n_showers]/I");
813  fEventTree->Branch("sh_length", &sh_length, "sh_length[n_showers]/D");
814  fEventTree->Branch("sh_hasPrimary_e", &sh_hasPrimary_e, "sh_hasPrimary_e[n_showers]/I");
815  fEventTree->Branch(
816  "sh_Efrac_contamination", &sh_Efrac_contamination, "sh_Efrac_contamination[n_showers]/D");
817  fEventTree->Branch("sh_purity", &sh_purity, "sh_purity[n_showers]/D");
818  fEventTree->Branch("sh_completeness", &sh_completeness, "sh_completeness[n_showers]/D");
819  fEventTree->Branch("sh_Efrac_best", &sh_Efrac_best, "sh_Efrac_best/D");
820  fEventTree->Branch("sh_nHits", &sh_nHits, "sh_nHits[n_showers]/I");
821  fEventTree->Branch("sh_largest", &sh_largest, "sh_largest/I");
822  fEventTree->Branch("sh_pdg", &sh_pdg, "sh_pdg[n_showers]/I");
823  fEventTree->Branch("sh_dEdxasymm", &sh_dEdxasymm, "sh_dEdxasymm[n_showers]/D");
824  fEventTree->Branch("sh_mpi0", &sh_mpi0, "sh_mpi0/D");
825  }
826  }
TH1D * h_ShStartXwrtTrueparticleStartXDiff_electronorpositron_NC
double sh_energy[MAX_SHOWERS][3]
TH1D * h_ShStartYwrtTrueparticleStartYDiff_electronorpositron_NC
Geometry information for a single TPC.
Definition: TPCGeo.h:38
double sh_dEdx[MAX_SHOWERS][3]
TH1D * h_ShStartXwrtTrueparticleStartXDiff_electronorpositron_NueCC
TH1D * h_ShStartYwrtTrueparticleStartYDiff_electronorpositron_NueCC
TH1D * h_ShStartZwrtTrueparticleStartZDiff_electronorpositron_NueCC
double sh_Efrac_contamination[MAX_SHOWERS]
TH1D * h_ShStartZwrtTrueparticleStartZDiff_electronorpositron_NC
LArSoft geometry interface.
Definition: ChannelGeo.h:16
double sh_MIPenergy[MAX_SHOWERS][3]
void LocalToWorld(const double *tpc, double *world) const
Transform point from local TPC frame to world frame.
Definition: TPCGeo.h:563
QTextStream & endl(QTextStream &s)
TH1D * h_CosThetaShDirwrtTrueparticle_electronorpositron_NueCC
void DUNE::NeutrinoShowerEff::beginRun ( const art::Run run)
overrideprivate

Definition at line 835 of file NeutrinoShowerEff_module.cc.

836  {
837  mf::LogInfo("NeutrinoShowerEff") << "begin run..." << endl;
838  }
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
QTextStream & endl(QTextStream &s)
template<size_t N>
void DUNE::NeutrinoShowerEff::checkCNNtrkshw ( detinfo::DetectorClocksData const &  clockData,
const art::Event evt,
std::vector< art::Ptr< recob::Hit >>  all_hits 
)
private

Definition at line 1495 of file NeutrinoShowerEff_module.cc.

1498  {
1499  if (fCNNEMModuleLabel.empty()) return;
1500 
1503 
1505  if (hitResults) {
1506  int trkLikeIdx = hitResults->getIndex("track");
1507  int emLikeIdx = hitResults->getIndex("em");
1508  if ((trkLikeIdx < 0) || (emLikeIdx < 0)) {
1509  throw cet::exception("NeutrinoShowerEff")
1510  << "No em/track labeled columns in MVA data products." << std::endl;
1511  }
1512 
1513  for (size_t i = 0; i < all_hits.size(); ++i) {
1514  //find out if the hit was generated by an EM particle
1515  bool isEMparticle = false;
1516  int pdg = INT_MAX;
1517  std::vector<sim::TrackIDE> TrackIDs = bt_serv->HitToEveTrackIDEs(clockData, all_hits[i]);
1518  if (!TrackIDs.size()) continue;
1519 
1520  int trkid = INT_MAX;
1521  double maxE = -1;
1522  for (size_t k = 0; k < TrackIDs.size(); k++) {
1523  if (TrackIDs[k].energy > maxE) {
1524  maxE = TrackIDs[k].energy;
1525  trkid = TrackIDs[k].trackID;
1526  }
1527  }
1528  if (trkid != INT_MAX) {
1529  auto* particle = pi_serv->TrackIdToParticle_P(trkid);
1530  if (particle) {
1531  pdg = particle->PdgCode();
1532  if (std::abs(pdg) == 11 || //electron/positron
1533  pdg == 22 || //photon
1534  pdg == 111) { //pi0
1535  isEMparticle = true;
1536  }
1537  }
1538  }
1539  auto vout = hitResults->getOutput(all_hits[i]);
1540  double trk_like = -1, trk_or_em = vout[trkLikeIdx] + vout[emLikeIdx];
1541  if (trk_or_em > 0) {
1542  trk_like = vout[trkLikeIdx] / trk_or_em;
1543  if (isEMparticle) { h_trklike_em->Fill(trk_like); }
1544  else {
1545  h_trklike_nonem->Fill(trk_like);
1546  }
1547  }
1548  }
1549  }
1550  else {
1551  std::cout << "Couldn't get hitResults." << std::endl;
1552  }
1553  }
int PdgCode() const
Definition: MCParticle.h:212
std::vector< TrackID > TrackIDs
const simb::MCParticle * TrackIdToParticle_P(int id) const
bool empty() const noexcept
Definition: InputTag.cc:73
T abs(T value)
std::vector< sim::TrackIDE > HitToEveTrackIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
static std::unique_ptr< MVAReader > create(const art::Event &evt, const art::InputTag &tag)
Definition: MVAReader.h:110
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
void DUNE::NeutrinoShowerEff::doEfficiencies ( )
private

Definition at line 1443 of file NeutrinoShowerEff_module.cc.

1444  {
1445 
1447 
1448  if (TEfficiency::CheckConsistency(*h_Ev_num, *h_Ev_den)) {
1449  h_Eff_Ev = tfs->make<TEfficiency>(*h_Ev_num, *h_Ev_den);
1450  TGraphAsymmErrors* grEff_Ev = h_Eff_Ev->CreateGraph();
1451  grEff_Ev->Write("grEff_Ev");
1452  h_Eff_Ev->Write("h_Eff_Ev");
1453  }
1454 
1455  if (TEfficiency::CheckConsistency(*h_Ev_num_dEdx, *h_Ev_den)) {
1456  h_Eff_Ev_dEdx = tfs->make<TEfficiency>(*h_Ev_num_dEdx, *h_Ev_den);
1457  TGraphAsymmErrors* grEff_Ev_dEdx = h_Eff_Ev_dEdx->CreateGraph();
1458  grEff_Ev_dEdx->Write("grEff_Ev_dEdx");
1459  h_Eff_Ev_dEdx->Write("h_Eff_Ev_dEdx");
1460  }
1461 
1462  if (TEfficiency::CheckConsistency(*h_Ee_num, *h_Ee_den)) {
1463  h_Eff_Ee = tfs->make<TEfficiency>(*h_Ee_num, *h_Ee_den);
1464  TGraphAsymmErrors* grEff_Ee = h_Eff_Ee->CreateGraph();
1465  grEff_Ee->Write("grEff_Ee");
1466  h_Eff_Ee->Write("h_Eff_Ee");
1467  }
1468 
1469  if (TEfficiency::CheckConsistency(*h_Ee_num_dEdx, *h_Ee_den)) {
1470  h_Eff_Ee_dEdx = tfs->make<TEfficiency>(*h_Ee_num_dEdx, *h_Ee_den);
1471  TGraphAsymmErrors* grEff_Ee_dEdx = h_Eff_Ee_dEdx->CreateGraph();
1472  grEff_Ee_dEdx->Write("grEff_Ee_dEdx");
1473  h_Eff_Ee_dEdx->Write("h_Eff_Ee_dEdx");
1474  }
1475 
1476  if (TEfficiency::CheckConsistency(*h_Pe_num, *h_Pe_den)) {
1477  h_Eff_Pe = tfs->make<TEfficiency>(*h_Pe_num, *h_Pe_den);
1478  TGraphAsymmErrors* grEff_Pe = h_Eff_Pe->CreateGraph();
1479  grEff_Pe->Write("grEff_Pe");
1480  h_Eff_Pe->Write("h_Eff_Pe");
1481  }
1482  if (TEfficiency::CheckConsistency(*h_theta_num, *h_theta_den)) {
1483  h_Eff_theta = tfs->make<TEfficiency>(*h_theta_num, *h_theta_den);
1484  TGraphAsymmErrors* grEff_theta = h_Eff_theta->CreateGraph();
1485  grEff_theta->Write("grEff_theta");
1486  h_Eff_theta->Write("h_Eff_theta");
1487  }
1488  }
void DUNE::NeutrinoShowerEff::endJob ( )
overrideprivatevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 829 of file NeutrinoShowerEff_module.cc.

830  {
831  doEfficiencies();
832  }
bool DUNE::NeutrinoShowerEff::insideFV ( double  vertex[4])
private

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Definition at line 1426 of file NeutrinoShowerEff_module.cc.

1427  {
1428 
1429  //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1430  //This is temporarily we should define a common FV
1431  double x = vertex[0];
1432  double y = vertex[1];
1433  double z = vertex[2];
1434 
1435  if (x > fFidVolXmin && x < fFidVolXmax && y > fFidVolYmin && y < fFidVolYmax &&
1436  z > fFidVolZmin && z < fFidVolZmax)
1437  return true;
1438  else
1439  return false;
1440  }
list x
Definition: train.py:276
vertex reconstruction
void DUNE::NeutrinoShowerEff::processEff ( detinfo::DetectorClocksData const &  clockData,
const art::Event evt,
bool isFiducial 
)
private

save neutrino's interaction info

save lepton

Definition at line 861 of file NeutrinoShowerEff_module.cc.

864  {
865 
866  //!save neutrino's interaction info
868  event.getByLabel(fMCTruthModuleLabel, MCtruthHandle);
869  std::vector<art::Ptr<simb::MCTruth>> MCtruthlist;
870  art::fill_ptr_vector(MCtruthlist, MCtruthHandle);
871  art::Ptr<simb::MCTruth> MCtruth;
872 
873  //For now assume that there is only one neutrino interaction...
874  int MCinteractions = MCtruthlist.size();
875  for (int i = 0; i < MCinteractions; i++) {
876  MCtruth = MCtruthlist[i];
877  if (MCtruth->NeutrinoSet()) {
878  simb::MCNeutrino nu = MCtruth->GetNeutrino();
879  if (nu.CCNC() == 0)
880  MC_isCC = 1;
881  else if (nu.CCNC() == 1)
882  MC_isCC = 0;
883  simb::MCParticle neutrino = nu.Nu();
884  MC_target = nu.Target();
886  MC_Q2 = nu.QSqr();
888  MC_W = nu.W();
889  const TLorentzVector& nu_momentum = nu.Nu().Momentum(0);
890  nu_momentum.GetXYZT(MC_incoming_P);
891  const TLorentzVector& vertex = neutrino.Position(0);
892  vertex.GetXYZT(MC_vertex);
893  simb::MCParticle lepton = nu.Lepton();
894  MC_lepton_PDG = lepton.PdgCode();
895  }
896  }
897 
898  //!save lepton
899  simb::MCParticle* MClepton = NULL;
901  const sim::ParticleList& plist = pi_serv->ParticleList();
902  simb::MCParticle* particle = 0;
903 
904  for (sim::ParticleList::const_iterator ipar = plist.begin(); ipar != plist.end(); ++ipar) {
905  particle = ipar->second;
906  if (std::abs(particle->PdgCode()) == fLeptonPDGcode &&
907  particle->Mother() == 0) { //primary lepton
908  const TLorentzVector& lepton_momentum = particle->Momentum(0);
909  const TLorentzVector& lepton_position = particle->Position(0);
910  const TLorentzVector& lepton_positionEnd = particle->EndPosition();
911  const TLorentzVector& lepton_momentumEnd = particle->EndMomentum();
912  lepton_momentum.GetXYZT(MC_lepton_startMomentum);
913  lepton_position.GetXYZT(MC_lepton_startXYZT);
914  lepton_positionEnd.GetXYZT(MC_lepton_endXYZT);
915  lepton_momentumEnd.GetXYZT(MC_lepton_endMomentum);
916  MC_leptonID = particle->TrackId();
917  MClepton = particle;
918  }
919  }
920  //Saving denominator histograms for lepton pions and protons
921  isFiducial = insideFV(MC_vertex);
922  if (!isFiducial) return;
923  double Pe = sqrt(pow(MC_lepton_startMomentum[0], 2) + pow(MC_lepton_startMomentum[1], 2) +
925  double Pv =
926  sqrt(pow(MC_incoming_P[0], 2) + pow(MC_incoming_P[1], 2) + pow(MC_incoming_P[2], 2));
927  double theta_e = acos((MC_incoming_P[0] * MC_lepton_startMomentum[0] +
930  (Pv * Pe));
931  theta_e *= (180.0 / 3.14159);
932 
933  //save CC events within the fiducial volume with the favorite neutrino flavor
935  if (MClepton) {
936  h_Ev_den->Fill(MC_incoming_P[3]);
937  h_Ee_den->Fill(MC_lepton_startMomentum[3]);
938  h_Pe_den->Fill(Pe);
939  h_theta_den->Fill(theta_e);
940  }
941  }
942 
943  //========================================================================
944  //========================================================================
945  // Reco stuff
946  //========================================================================
947  //========================================================================
949  if (!event.getByLabel(fShowerModuleLabel, showerHandle)) {
950  mf::LogError("NeutrinoShowerEff")
951  << "Could not find shower with label " << fShowerModuleLabel.encode();
952  return;
953  }
954  std::vector<art::Ptr<recob::Shower>> showerlist;
955  art::fill_ptr_vector(showerlist, showerHandle);
956 
958  std::vector<art::Ptr<recob::Hit>> all_hits;
959  if (event.getByLabel(fHitModuleLabel, hitHandle)) { art::fill_ptr_vector(all_hits, hitHandle); }
960 
961  n_recoShowers = showerlist.size();
962  //if ( n_recoShowers == 0 || n_recoShowers> MAX_SHOWERS ) return;
963  art::FindManyP<recob::Hit> sh_hitsAll(showerHandle, event, fShowerModuleLabel);
964  cout << "Found this many showers " << n_recoShowers << endl;
965  double Efrac_contamination = 999.0;
966  double Efrac_contaminationNueCC = 999.0;
967 
968  double Ecomplet_lepton = 0.0;
969  double Ecomplet_NueCC = 0.0;
970  int ParticlePDG_HighestShHits = 0; //undefined
971  int shower_bestplane = 0;
972  double Showerparticlededx_inbestplane = 0.0;
973  double dEdxasymm_largestshw = -1.;
974 
975  int showerPDGwithHighestHitsforFillingdEdX =
976  0; //0=undefined,1=electronorpositronshower,2=photonshower,3=protonshower,4=neutronshower,5=chargedpionshower,6=neutralpionshower,7=everythingelseshower
977 
978  double ShAngle = -9999.0, ShVxTrueParticleVxDiff = -9999.0, ShVyTrueParticleVyDiff = -9999.0,
979  ShVzTrueParticleVzDiff = -9999.0, ShStartVxTrueParticleEndVxDiff = -9999.0,
980  ShStartVyTrueParticleEndVyDiff = -9999.0, ShStartVzTrueParticleEndVzDiff = -9999.0;
981 
982  const simb::MCParticle* MClepton_reco = NULL;
983  int nHits = 0;
984 
985  TVector3 p1, p2;
986  double E1st = 0;
987  double E2nd = 0;
988 
989  for (int i = 0; i < n_recoShowers; i++) {
990 
991  art::Ptr<recob::Shower> shower = showerlist[i];
992  sh_direction_X[i] = shower->Direction().X();
993  sh_direction_Y[i] = shower->Direction().Y();
994  sh_direction_Z[i] = shower->Direction().Z();
995  sh_start_X[i] = shower->ShowerStart().X();
996  sh_start_Y[i] = shower->ShowerStart().Y();
997  sh_start_Z[i] = shower->ShowerStart().Z();
998  sh_bestplane[i] = shower->best_plane();
999  sh_length[i] = shower->Length();
1000  for (size_t j = 0; j < shower->Energy().size(); j++)
1001  sh_energy[i][j] = shower->Energy()[j];
1002  for (size_t j = 0; j < shower->MIPEnergy().size(); j++)
1003  sh_MIPenergy[i][j] = shower->MIPEnergy()[j];
1004  for (size_t j = 0; j < shower->dEdx().size(); j++)
1005  sh_dEdx[i][j] = shower->dEdx()[j];
1006 
1007  double dEdxasymm = -1;
1008  double dEdx0 = 0;
1009  if (shower->best_plane() >= 0 && shower->best_plane() < int(shower->dEdx().size())) {
1010  dEdx0 = shower->dEdx()[shower->best_plane()];
1011  }
1012  double dEdx1 = 0;
1013  double maxE = 0;
1014  for (int j = 0; j < 3; ++j) {
1015  if (j == shower->best_plane()) continue;
1016  if (j >= int(shower->Energy().size())) continue;
1017  if (shower->Energy()[j] > maxE) {
1018  maxE = shower->Energy()[j];
1019  dEdx1 = shower->dEdx()[j];
1020  }
1021  }
1022  if (dEdx0 || dEdx1) { dEdxasymm = std::abs(dEdx0 - dEdx1) / (dEdx0 + dEdx1); }
1023  sh_dEdxasymm[i] = dEdxasymm;
1024 
1025  if (shower->best_plane() >= 0 && shower->best_plane() < int(shower->Energy().size())) {
1026  if (shower->Energy()[shower->best_plane()] > E1st) {
1027  if (p1.Mag()) {
1028  E2nd = E1st;
1029  p2 = p1;
1030  }
1031  E1st = shower->Energy()[shower->best_plane()];
1032  p1[0] = E1st * shower->Direction().X();
1033  p1[1] = E1st * shower->Direction().Y();
1034  p1[2] = E1st * shower->Direction().Z();
1035  }
1036  else {
1037  if (shower->Energy()[shower->best_plane()] > E2nd) {
1038  E2nd = shower->Energy()[shower->best_plane()];
1039  p2[0] = E2nd * shower->Direction().X();
1040  p2[1] = E2nd * shower->Direction().Y();
1041  p2[2] = E2nd * shower->Direction().Z();
1042  }
1043  }
1044  }
1045 
1046  std::vector<art::Ptr<recob::Hit>> sh_hits = sh_hitsAll.at(i);
1047 
1048  if (!sh_hits.size()) {
1049  //no shower hits found, try pfparticle
1050  // PFParticles
1052  std::vector<art::Ptr<recob::PFParticle>> pfps;
1053  if (event.getByLabel(fShowerModuleLabel, pfpHandle)) art::fill_ptr_vector(pfps, pfpHandle);
1054  // Clusters
1056  std::vector<art::Ptr<recob::Cluster>> clusters;
1057  if (event.getByLabel(fShowerModuleLabel, clusterHandle))
1058  art::fill_ptr_vector(clusters, clusterHandle);
1059  art::FindManyP<recob::PFParticle> fmps(showerHandle, event, fShowerModuleLabel);
1060  art::FindManyP<recob::Cluster> fmcp(pfpHandle, event, fShowerModuleLabel);
1061  art::FindManyP<recob::Hit> fmhc(clusterHandle, event, fShowerModuleLabel);
1062  if (fmps.isValid()) {
1063  std::vector<art::Ptr<recob::PFParticle>> pfs = fmps.at(i);
1064  for (size_t ipf = 0; ipf < pfs.size(); ++ipf) {
1065  if (fmcp.isValid()) {
1066  std::vector<art::Ptr<recob::Cluster>> clus = fmcp.at(pfs[ipf].key());
1067  for (size_t iclu = 0; iclu < clus.size(); ++iclu) {
1068  if (fmhc.isValid()) {
1069  std::vector<art::Ptr<recob::Hit>> hits = fmhc.at(clus[iclu].key());
1070  for (size_t ihit = 0; ihit < hits.size(); ++ihit) {
1071  sh_hits.push_back(hits[ihit]);
1072  }
1073  }
1074  }
1075  }
1076  }
1077  }
1078  }
1079 
1080  const simb::MCParticle* particle;
1081  double tmpEfrac_contamination =
1082  0.0; // fraction of non EM energy contatiminatio (see truthMatcher for
1083  // definition)
1084  double tmpEcomplet = 0;
1085 
1086  int tmp_nHits = sh_hits.size();
1087 
1088  truthMatcher(clockData, all_hits, sh_hits, particle, tmpEfrac_contamination, tmpEcomplet);
1089  if (!particle) continue;
1090 
1091  sh_Efrac_contamination[i] = tmpEfrac_contamination;
1092  sh_purity[i] = 1 - tmpEfrac_contamination;
1093  sh_completeness[i] = tmpEcomplet;
1094  sh_nHits[i] = tmp_nHits;
1095  sh_hasPrimary_e[i] = 0;
1096  sh_pdg[i] = particle->PdgCode();
1097 
1098  //Shower with highest hits
1099  if (tmp_nHits > nHits) {
1100  sh_largest = i;
1101  dEdxasymm_largestshw = dEdxasymm;
1102  nHits = tmp_nHits;
1103  Ecomplet_NueCC = tmpEcomplet;
1104  Efrac_contaminationNueCC = tmpEfrac_contamination;
1105  //Calculate Shower anagle w.r.t True particle
1106  double ShDirMag =
1107  sqrt(pow(sh_direction_X[i], 2) + pow(sh_direction_Y[i], 2) + pow(sh_direction_Z[i], 2));
1108  ShAngle = (sh_direction_X[i] * particle->Px() + sh_direction_Y[i] * particle->Py() +
1109  sh_direction_Z[i] * particle->Pz()) /
1110  (ShDirMag * particle->P());
1111 
1112  ShVxTrueParticleVxDiff = sh_start_X[i] - particle->Vx();
1113  ShVyTrueParticleVyDiff = sh_start_Y[i] - particle->Vy();
1114  ShVzTrueParticleVzDiff = sh_start_Z[i] - particle->Vz();
1115 
1116  //put overflow and underflow at top and bottom bins:
1117  if (ShVxTrueParticleVxDiff > 5)
1118  ShVxTrueParticleVxDiff = 4.99;
1119  else if (ShVxTrueParticleVxDiff < -5)
1120  ShVxTrueParticleVxDiff = -5;
1121  if (ShVyTrueParticleVyDiff > 5)
1122  ShVyTrueParticleVyDiff = 4.99;
1123  else if (ShVyTrueParticleVyDiff < -5)
1124  ShVyTrueParticleVyDiff = -5;
1125  if (ShVzTrueParticleVzDiff > 5)
1126  ShVzTrueParticleVzDiff = 4.99;
1127  else if (ShVzTrueParticleVzDiff < -5)
1128  ShVzTrueParticleVzDiff = -5;
1129 
1130  ShStartVxTrueParticleEndVxDiff = sh_start_X[i] - particle->EndX();
1131  ShStartVyTrueParticleEndVyDiff = sh_start_Y[i] - particle->EndY();
1132  ShStartVzTrueParticleEndVzDiff = sh_start_Z[i] - particle->EndZ();
1133 
1134  if (std::abs(particle->PdgCode()) == 11) { ParticlePDG_HighestShHits = 1; }
1135  else if (particle->PdgCode() == 22) {
1136  ParticlePDG_HighestShHits = 2;
1137  }
1138  else {
1139  ParticlePDG_HighestShHits = 3;
1140  }
1141 
1142  //dedx for different showers
1143  //Highest hits shower pdg for the dEdx study 0=undefined,1=electronorpositronshower,2=photonshower,3=protonshower,4=neutronshower,5=chargedpionshower,6=neutralpionshower,7=everythingelseshower
1144  shower_bestplane = shower->best_plane();
1145  if (shower_bestplane < 0 || shower_bestplane >= int(shower->dEdx().size())) {
1146  //bestplane is not set properly, just pick the first plane that has dEdx
1147  for (size_t i = 0; i < shower->dEdx().size(); ++i) {
1148  if (shower->dEdx()[i]) {
1149  shower_bestplane = i;
1150  break;
1151  }
1152  }
1153  }
1154  if (shower_bestplane < 0 || shower_bestplane >= int(shower->dEdx().size())) {
1155  //still a problem? just set it to 0
1156  shower_bestplane = 0;
1157  }
1158 
1159  if (shower_bestplane >= 0 and shower_bestplane < int(shower->dEdx().size()))
1160  Showerparticlededx_inbestplane = shower->dEdx()[shower_bestplane];
1161 
1162  if (std::abs(particle->PdgCode()) == 11) { //lepton shower
1163  showerPDGwithHighestHitsforFillingdEdX = 1;
1164  }
1165  else if (particle->PdgCode() == 22) { //photon shower
1166  showerPDGwithHighestHitsforFillingdEdX = 2;
1167  }
1168  else if (particle->PdgCode() == 2212) { //proton shower
1169  showerPDGwithHighestHitsforFillingdEdX = 3;
1170  }
1171  else if (particle->PdgCode() == 2112) { //neutron shower
1172  showerPDGwithHighestHitsforFillingdEdX = 4;
1173  }
1174  else if (std::abs(particle->PdgCode()) == 211) { //charged pion shower
1175  showerPDGwithHighestHitsforFillingdEdX = 5;
1176  }
1177  else if (particle->PdgCode() == 111) { //neutral pion shower
1178  showerPDGwithHighestHitsforFillingdEdX = 6;
1179  }
1180  else { //everythingelse shower
1181  showerPDGwithHighestHitsforFillingdEdX = 7;
1182  }
1183  }
1184 
1185  if (particle->PdgCode() == fLeptonPDGcode && particle->TrackId() == MC_leptonID)
1186  sh_hasPrimary_e[i] = 1;
1187  // save the best shower based on non EM and number of hits
1188 
1189  if (std::abs(particle->PdgCode()) == fLeptonPDGcode && particle->TrackId() == MC_leptonID) {
1190 
1191  if (tmpEcomplet > Ecomplet_lepton) {
1192 
1193  Ecomplet_lepton = tmpEcomplet;
1194 
1195  Efrac_contamination = tmpEfrac_contamination;
1196  MClepton_reco = particle;
1197  sh_Efrac_best = Efrac_contamination;
1198  }
1199  }
1200  } //end of looping all the showers
1201 
1202  if (p1.Mag() && p2.Mag()) { sh_mpi0 = sqrt(pow(p1.Mag() + p2.Mag(), 2) - (p1 + p2).Mag2()); }
1203  else
1204  sh_mpi0 = 0;
1205 
1206  if (MClepton_reco && MClepton) {
1208  h_Efrac_shContamination->Fill(Efrac_contamination);
1209  h_Efrac_shPurity->Fill(1 - Efrac_contamination);
1210  h_Ecomplet_lepton->Fill(Ecomplet_lepton);
1211 
1212  // Selecting good showers requires completeness of gretaer than 70 % and Purity > 70 %
1213  if (Efrac_contamination < fMaxEfrac && Ecomplet_lepton > fMinCompleteness) {
1214 
1215  h_Pe_num->Fill(Pe);
1216  h_Ev_num->Fill(MC_incoming_P[3]);
1217  h_Ee_num->Fill(MC_lepton_startMomentum[3]);
1218  h_theta_num->Fill(theta_e);
1219 
1220  if (Showerparticlededx_inbestplane > 1 && Showerparticlededx_inbestplane < 3) {
1221  h_Ev_num_dEdx->Fill(MC_incoming_P[3]);
1222  h_Ee_num_dEdx->Fill(MC_lepton_startMomentum[3]);
1223  }
1224  }
1225  }
1226  }
1227 
1228  //NueCC SIgnal and background Completeness
1229  if (MC_isCC == 1 && (fNeutrinoPDGcode == std::abs(MC_incoming_PDG)) && isFiducial) {
1230  h_HighestHitsProducedParticlePDG_NueCC->Fill(ParticlePDG_HighestShHits);
1231 
1232  if (ParticlePDG_HighestShHits > 0) { // atleat one shower is reconstructed
1233  h_Ecomplet_NueCC->Fill(Ecomplet_NueCC);
1234  h_Efrac_NueCCPurity->Fill(1 - Efrac_contaminationNueCC);
1235 
1236  h_esh_bestplane_NueCC->Fill(shower_bestplane);
1237  if (showerPDGwithHighestHitsforFillingdEdX == 1) //electron or positron shower
1238  {
1239  h_dEdX_electronorpositron_NueCC->Fill(Showerparticlededx_inbestplane);
1240  //Study the angle between the reconstructed shower direction w.r.t MC true particle direction
1242 
1243  //Study the reconstructed shower start position (x,y,z) w.r.t MC true particle start position
1245  ShVxTrueParticleVxDiff);
1247  ShVyTrueParticleVyDiff);
1249  ShVzTrueParticleVzDiff);
1250 
1251  h_dEdXasymm_electronorpositron_NueCC->Fill(dEdxasymm_largestshw);
1252 
1253  h_mpi0_electronorpositron_NueCC->Fill(sh_mpi0);
1254  }
1255  else if (showerPDGwithHighestHitsforFillingdEdX == 2) //photon shower
1256  {
1257  h_dEdX_photon_NueCC->Fill(Showerparticlededx_inbestplane);
1259  h_ShStartXwrtTrueparticleStartXDiff_photon_NueCC->Fill(ShVxTrueParticleVxDiff);
1260  h_ShStartYwrtTrueparticleStartYDiff_photon_NueCC->Fill(ShVyTrueParticleVyDiff);
1261  h_ShStartZwrtTrueparticleStartZDiff_photon_NueCC->Fill(ShVzTrueParticleVzDiff);
1262 
1263  h_ShStartXwrtTrueparticleEndXDiff_photon_NueCC->Fill(ShStartVxTrueParticleEndVxDiff);
1264  h_ShStartYwrtTrueparticleEndYDiff_photon_NueCC->Fill(ShStartVyTrueParticleEndVyDiff);
1265  h_ShStartZwrtTrueparticleEndZDiff_photon_NueCC->Fill(ShStartVzTrueParticleEndVzDiff);
1266  }
1267  else if (showerPDGwithHighestHitsforFillingdEdX == 3) //proton shower
1268  {
1269  h_dEdX_proton_NueCC->Fill(Showerparticlededx_inbestplane);
1271 
1272  h_ShStartXwrtTrueparticleStartXDiff_proton_NueCC->Fill(ShVxTrueParticleVxDiff);
1273  h_ShStartYwrtTrueparticleStartYDiff_proton_NueCC->Fill(ShVyTrueParticleVyDiff);
1274  h_ShStartZwrtTrueparticleStartZDiff_proton_NueCC->Fill(ShVzTrueParticleVzDiff);
1275  }
1276  else if (showerPDGwithHighestHitsforFillingdEdX == 4) //neutron shower
1277  {
1278  h_dEdX_neutron_NueCC->Fill(Showerparticlededx_inbestplane);
1279  }
1280  else if (showerPDGwithHighestHitsforFillingdEdX == 5) //charged pion shower
1281  {
1282  h_dEdX_chargedpion_NueCC->Fill(Showerparticlededx_inbestplane);
1284  h_ShStartXwrtTrueparticleStartXDiff_chargedpion_NueCC->Fill(ShVxTrueParticleVxDiff);
1285  h_ShStartYwrtTrueparticleStartYDiff_chargedpion_NueCC->Fill(ShVyTrueParticleVyDiff);
1286  h_ShStartZwrtTrueparticleStartZDiff_chargedpion_NueCC->Fill(ShVzTrueParticleVzDiff);
1287  }
1288  else if (showerPDGwithHighestHitsforFillingdEdX == 6) //neutral pion shower
1289  {
1290  h_dEdX_neutralpion_NueCC->Fill(Showerparticlededx_inbestplane);
1291  }
1292  else if (showerPDGwithHighestHitsforFillingdEdX == 7) //everythingelse shower
1293  {
1294  h_dEdX_everythingelse_NueCC->Fill(Showerparticlededx_inbestplane);
1295  }
1296  }
1297  }
1298  else if (!MC_isCC && isFiducial) {
1299  h_HighestHitsProducedParticlePDG_bkg->Fill(ParticlePDG_HighestShHits);
1300 
1301  if (ParticlePDG_HighestShHits > 0) {
1302  h_Ecomplet_bkg->Fill(Ecomplet_NueCC);
1303  h_Efrac_bkgPurity->Fill(1 - Efrac_contaminationNueCC);
1304 
1305  h_esh_bestplane_NC->Fill(shower_bestplane);
1306  if (showerPDGwithHighestHitsforFillingdEdX == 1) //electron or positron shower
1307  {
1308  h_dEdX_electronorpositron_NC->Fill(Showerparticlededx_inbestplane);
1310 
1311  h_ShStartXwrtTrueparticleStartXDiff_electronorpositron_NC->Fill(ShVxTrueParticleVxDiff);
1312  h_ShStartYwrtTrueparticleStartYDiff_electronorpositron_NC->Fill(ShVyTrueParticleVyDiff);
1313  h_ShStartZwrtTrueparticleStartZDiff_electronorpositron_NC->Fill(ShVzTrueParticleVzDiff);
1314  }
1315  else if (showerPDGwithHighestHitsforFillingdEdX == 2) //photon shower
1316  {
1317  h_dEdX_photon_NC->Fill(Showerparticlededx_inbestplane);
1319 
1320  h_ShStartXwrtTrueparticleStartXDiff_photon_NC->Fill(ShVxTrueParticleVxDiff);
1321  h_ShStartYwrtTrueparticleStartYDiff_photon_NC->Fill(ShVyTrueParticleVyDiff);
1322  h_ShStartZwrtTrueparticleStartZDiff_photon_NC->Fill(ShVzTrueParticleVzDiff);
1323 
1324  h_ShStartXwrtTrueparticleEndXDiff_photon_NC->Fill(ShStartVxTrueParticleEndVxDiff);
1325  h_ShStartYwrtTrueparticleEndYDiff_photon_NC->Fill(ShStartVyTrueParticleEndVyDiff);
1326  h_ShStartZwrtTrueparticleEndZDiff_photon_NC->Fill(ShStartVzTrueParticleEndVzDiff);
1327 
1328  h_dEdXasymm_photon_NC->Fill(dEdxasymm_largestshw);
1329 
1330  h_mpi0_photon_NC->Fill(sh_mpi0);
1331  }
1332  else if (showerPDGwithHighestHitsforFillingdEdX == 3) //proton shower
1333  {
1334  h_dEdX_proton_NC->Fill(Showerparticlededx_inbestplane);
1336 
1337  h_ShStartXwrtTrueparticleStartXDiff_proton_NC->Fill(ShVxTrueParticleVxDiff);
1338  h_ShStartYwrtTrueparticleStartYDiff_proton_NC->Fill(ShVyTrueParticleVyDiff);
1339  h_ShStartZwrtTrueparticleStartZDiff_proton_NC->Fill(ShVzTrueParticleVzDiff);
1340  }
1341  else if (showerPDGwithHighestHitsforFillingdEdX == 4) //neutron shower
1342  {
1343  h_dEdX_neutron_NC->Fill(Showerparticlededx_inbestplane);
1344  }
1345  else if (showerPDGwithHighestHitsforFillingdEdX == 5) //charged pion shower
1346  {
1347  h_dEdX_chargedpion_NC->Fill(Showerparticlededx_inbestplane);
1349  h_ShStartXwrtTrueparticleStartXDiff_chargedpion_NC->Fill(ShVxTrueParticleVxDiff);
1350  h_ShStartYwrtTrueparticleStartYDiff_chargedpion_NC->Fill(ShVyTrueParticleVyDiff);
1351  h_ShStartZwrtTrueparticleStartZDiff_chargedpion_NC->Fill(ShVzTrueParticleVzDiff);
1352  }
1353  else if (showerPDGwithHighestHitsforFillingdEdX == 6) //neutral pion shower
1354  {
1355  h_dEdX_neutralpion_NC->Fill(Showerparticlededx_inbestplane);
1356  }
1357  else if (showerPDGwithHighestHitsforFillingdEdX == 7) //everythingelse shower
1358  {
1359  h_dEdX_everythingelse_NC->Fill(Showerparticlededx_inbestplane);
1360  }
1361  } //if(ParticlePDG_HighestShHits>0)
1362  } //else if(!MC_isCC&&isFiducial)
1363 
1364  checkCNNtrkshw<4>(clockData, event, all_hits);
1365  }
int best_plane() const
Definition: Shower.h:200
TH1D * h_ShStartXwrtTrueparticleStartXDiff_electronorpositron_NC
const TVector3 & ShowerStart() const
Definition: Shower.h:192
const TLorentzVector & Position(const int i=0) const
Definition: MCParticle.h:219
int PdgCode() const
Definition: MCParticle.h:212
int CCNC() const
Definition: MCNeutrino.h:148
double QSqr() const
Definition: MCNeutrino.h:157
const simb::MCNeutrino & GetNeutrino() const
Definition: MCTruth.h:77
double Py(const int i=0) const
Definition: MCParticle.h:231
double sh_energy[MAX_SHOWERS][3]
const TLorentzVector & EndPosition() const
Definition: MCParticle.h:225
double EndZ() const
Definition: MCParticle.h:228
double Length() const
Definition: Shower.h:201
int Mother() const
Definition: MCParticle.h:213
const simb::MCParticle & Nu() const
Definition: MCNeutrino.h:146
TH1D * h_ShStartYwrtTrueparticleStartYDiff_electronorpositron_NC
constexpr T pow(T x)
Definition: pow.h:72
const std::vector< double > & Energy() const
Definition: Shower.h:195
double Px(const int i=0) const
Definition: MCParticle.h:230
double sh_dEdx[MAX_SHOWERS][3]
intermediate_table::const_iterator const_iterator
void truthMatcher(detinfo::DetectorClocksData const &clockData, std::vector< art::Ptr< recob::Hit >> all_hits, std::vector< art::Ptr< recob::Hit >> shower_hits, const simb::MCParticle *&MCparticle, double &Efrac, double &Ecomplet)
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
double EndY() const
Definition: MCParticle.h:227
TH1D * h_ShStartXwrtTrueparticleStartXDiff_electronorpositron_NueCC
std::string encode() const
Definition: InputTag.cc:97
int TrackId() const
Definition: MCParticle.h:210
TH1D * h_ShStartYwrtTrueparticleStartYDiff_electronorpositron_NueCC
int InteractionType() const
Definition: MCNeutrino.h:150
T abs(T value)
const simb::MCParticle & Lepton() const
Definition: MCNeutrino.h:147
double W() const
Definition: MCNeutrino.h:154
const std::vector< double > & dEdx() const
Definition: Shower.h:203
const std::vector< double > & MIPEnergy() const
Definition: Shower.h:198
def key(type, name=None)
Definition: graph.py:13
double P(const int i=0) const
Definition: MCParticle.h:234
const TVector3 & Direction() const
Definition: Shower.h:189
const sim::ParticleList & ParticleList() const
TH1D * h_ShStartZwrtTrueparticleStartZDiff_electronorpositron_NueCC
double Vx(const int i=0) const
Definition: MCParticle.h:221
int Target() const
Definition: MCNeutrino.h:151
const TLorentzVector & Momentum(const int i=0) const
Definition: MCParticle.h:220
double Pz(const int i=0) const
Definition: MCParticle.h:232
double Vz(const int i=0) const
Definition: MCParticle.h:223
bool NeutrinoSet() const
Definition: MCTruth.h:78
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:297
double EndX() const
Definition: MCParticle.h:226
double sh_Efrac_contamination[MAX_SHOWERS]
TH1D * h_ShStartZwrtTrueparticleStartZDiff_electronorpositron_NC
Event generator information.
Definition: MCNeutrino.h:18
double sh_MIPenergy[MAX_SHOWERS][3]
const TLorentzVector & EndMomentum() const
Definition: MCParticle.h:240
double Vy(const int i=0) const
Definition: MCParticle.h:222
QTextStream & endl(QTextStream &s)
Event finding and building.
TH1D * h_CosThetaShDirwrtTrueparticle_electronorpositron_NueCC
vertex reconstruction
void DUNE::NeutrinoShowerEff::reset ( )
private

Definition at line 1557 of file NeutrinoShowerEff_module.cc.

1558  {
1559 
1560  MC_incoming_PDG = -999;
1561  MC_lepton_PDG = -999;
1562  MC_isCC = -999;
1563  MC_channel = -999;
1564  MC_target = -999;
1565  MC_Q2 = -999.0;
1566  MC_W = -999.0;
1567  MC_lepton_theta = -999.0;
1568  MC_leptonID = -999;
1569  MC_LeptonTrack = -999;
1570 
1571  for (int i = 0; i < MAX_SHOWERS; i++) {
1572  sh_direction_X[i] = -999.0;
1573  sh_direction_Y[i] = -999.0;
1574  sh_direction_Z[i] = -999.0;
1575  sh_start_X[i] = -999.0;
1576  sh_start_Y[i] = -999.0;
1577  sh_start_Z[i] = -999.0;
1578  sh_bestplane[i] = -999.0;
1579  sh_length[i] = -999.0;
1580  sh_hasPrimary_e[i] = -999.0;
1581  sh_Efrac_contamination[i] = -999.0;
1582  sh_purity[i] = -999.0;
1583  sh_completeness[i] = -999.0;
1584  sh_nHits[i] = -999.0;
1585  for (int j = 0; j < 3; j++) {
1586  sh_energy[i][j] = -999.0;
1587  sh_MIPenergy[i][j] = -999.0;
1588  sh_dEdx[i][j] = -999.0;
1589  }
1590  sh_pdg[i] = -999;
1591  sh_dEdxasymm[i] = -999;
1592  }
1593  sh_largest = -999;
1594  sh_mpi0 = -999;
1595  }
#define MAX_SHOWERS
double sh_energy[MAX_SHOWERS][3]
double sh_dEdx[MAX_SHOWERS][3]
double sh_Efrac_contamination[MAX_SHOWERS]
double sh_MIPenergy[MAX_SHOWERS][3]
void DUNE::NeutrinoShowerEff::truthMatcher ( detinfo::DetectorClocksData const &  clockData,
std::vector< art::Ptr< recob::Hit >>  all_hits,
std::vector< art::Ptr< recob::Hit >>  shower_hits,
const simb::MCParticle *&  MCparticle,
double &  Efrac,
double &  Ecomplet 
)
private

Definition at line 1369 of file NeutrinoShowerEff_module.cc.

1375  {
1376 
1377  MCparticle = 0;
1378  Efrac = 1.0;
1379  Ecomplet = 0;
1380 
1383  std::map<int, double> trkID_E;
1384  for (size_t j = 0; j < shower_hits.size(); ++j) {
1385  art::Ptr<recob::Hit> hit = shower_hits[j];
1386  std::vector<sim::TrackIDE> TrackIDs = bt_serv->HitToEveTrackIDEs(clockData, hit);
1387  for (size_t k = 0; k < TrackIDs.size(); k++) {
1388  if (trkID_E.find(std::abs(TrackIDs[k].trackID)) == trkID_E.end())
1389  trkID_E[std::abs(TrackIDs[k].trackID)] = 0;
1390  trkID_E[std::abs(TrackIDs[k].trackID)] += TrackIDs[k].energy;
1391  }
1392  }
1393  double max_E = -999.0;
1394  double total_E = 0.0;
1395  int TrackID = -999;
1396  double partial_E = 0.0;
1397 
1398  if (empty(trkID_E)) return; // Ghost shower???
1399 
1400  for (std::map<int, double>::iterator ii = trkID_E.begin(); ii != trkID_E.end(); ++ii) {
1401  total_E += ii->second;
1402  if ((ii->second) > max_E) {
1403  partial_E = ii->second;
1404  max_E = ii->second;
1405  TrackID = ii->first;
1406  }
1407  }
1408  MCparticle = pi_serv->TrackIdToParticle_P(TrackID);
1409 
1410  Efrac = 1 - (partial_E / total_E);
1411 
1412  //completeness
1413  double totenergy = 0;
1414  for (size_t k = 0; k < all_hits.size(); ++k) {
1415  art::Ptr<recob::Hit> hit = all_hits[k];
1416  std::vector<sim::TrackIDE> TrackIDs = bt_serv->HitToEveTrackIDEs(clockData, hit);
1417  for (size_t l = 0; l < TrackIDs.size(); ++l) {
1418  if (std::abs(TrackIDs[l].trackID) == TrackID) { totenergy += TrackIDs[l].energy; }
1419  }
1420  }
1421  Ecomplet = partial_E / totenergy;
1422  }
intermediate_table::iterator iterator
std::vector< TrackID > TrackIDs
const simb::MCParticle * TrackIdToParticle_P(int id) const
static QStrList * l
Definition: config.cpp:1044
T abs(T value)
Detector simulation of raw signals on wires.
std::vector< sim::TrackIDE > HitToEveTrackIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
Definition: StdUtils.h:97

Member Data Documentation

int DUNE::NeutrinoShowerEff::Event
private

Definition at line 193 of file NeutrinoShowerEff_module.cc.

art::InputTag DUNE::NeutrinoShowerEff::fCNNEMModuleLabel
private

Definition at line 68 of file NeutrinoShowerEff_module.cc.

TTree* DUNE::NeutrinoShowerEff::fEventTree
private

Definition at line 77 of file NeutrinoShowerEff_module.cc.

float DUNE::NeutrinoShowerEff::fFidVolCutX
private

Definition at line 239 of file NeutrinoShowerEff_module.cc.

float DUNE::NeutrinoShowerEff::fFidVolCutY
private

Definition at line 240 of file NeutrinoShowerEff_module.cc.

float DUNE::NeutrinoShowerEff::fFidVolCutZ
private

Definition at line 241 of file NeutrinoShowerEff_module.cc.

float DUNE::NeutrinoShowerEff::fFidVolXmax
private

Definition at line 244 of file NeutrinoShowerEff_module.cc.

float DUNE::NeutrinoShowerEff::fFidVolXmin
private

Definition at line 243 of file NeutrinoShowerEff_module.cc.

float DUNE::NeutrinoShowerEff::fFidVolYmax
private

Definition at line 246 of file NeutrinoShowerEff_module.cc.

float DUNE::NeutrinoShowerEff::fFidVolYmin
private

Definition at line 245 of file NeutrinoShowerEff_module.cc.

float DUNE::NeutrinoShowerEff::fFidVolZmax
private

Definition at line 248 of file NeutrinoShowerEff_module.cc.

float DUNE::NeutrinoShowerEff::fFidVolZmin
private

Definition at line 247 of file NeutrinoShowerEff_module.cc.

art::InputTag DUNE::NeutrinoShowerEff::fHitModuleLabel
private

Definition at line 66 of file NeutrinoShowerEff_module.cc.

int DUNE::NeutrinoShowerEff::fLeptonPDGcode
private

Definition at line 71 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::fMaxEfrac
private

Definition at line 74 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::fMaxNeutrinoE
private

Definition at line 72 of file NeutrinoShowerEff_module.cc.

art::InputTag DUNE::NeutrinoShowerEff::fMCTruthModuleLabel
private

Definition at line 65 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::fMinCompleteness
private

Definition at line 75 of file NeutrinoShowerEff_module.cc.

int DUNE::NeutrinoShowerEff::fNeutrinoPDGcode
private

Definition at line 70 of file NeutrinoShowerEff_module.cc.

bool DUNE::NeutrinoShowerEff::fSaveMCTree
private

Definition at line 73 of file NeutrinoShowerEff_module.cc.

art::InputTag DUNE::NeutrinoShowerEff::fShowerModuleLabel
private

Definition at line 67 of file NeutrinoShowerEff_module.cc.

art::ServiceHandle<geo::Geometry const> DUNE::NeutrinoShowerEff::geom
private

Definition at line 250 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_CosThetaShDirwrtTrueparticle_chargedpion_NC
private

Definition at line 148 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_CosThetaShDirwrtTrueparticle_chargedpion_NueCC
private

Definition at line 147 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_CosThetaShDirwrtTrueparticle_electronorpositron_NC
private

Definition at line 142 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_CosThetaShDirwrtTrueparticle_electronorpositron_NueCC
private

Definition at line 141 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_CosThetaShDirwrtTrueparticle_photon_NC
private

Definition at line 144 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_CosThetaShDirwrtTrueparticle_photon_NueCC
private

Definition at line 143 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_CosThetaShDirwrtTrueparticle_proton_NC
private

Definition at line 146 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_CosThetaShDirwrtTrueparticle_proton_NueCC
private

Definition at line 145 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_dEdX_chargedpion_NC
private

Definition at line 124 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_dEdX_chargedpion_NueCC
private

Definition at line 123 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_dEdX_electronorpositron_NC
private

Definition at line 116 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_dEdX_electronorpositron_NueCC
private

Definition at line 115 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_dEdX_everythingelse_NC
private

Definition at line 128 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_dEdX_everythingelse_NueCC
private

Definition at line 127 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_dEdX_neutralpion_NC
private

Definition at line 126 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_dEdX_neutralpion_NueCC
private

Definition at line 125 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_dEdX_neutron_NC
private

Definition at line 122 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_dEdX_neutron_NueCC
private

Definition at line 121 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_dEdX_photon_NC
private

Definition at line 118 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_dEdX_photon_NueCC
private

Definition at line 117 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_dEdX_proton_NC
private

Definition at line 120 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_dEdX_proton_NueCC
private

Definition at line 119 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_dEdXasymm_electronorpositron_NueCC
private

Definition at line 130 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_dEdXasymm_photon_NC
private

Definition at line 131 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_Ecomplet_bkg
private

Definition at line 103 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_Ecomplet_lepton
private

Definition at line 96 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_Ecomplet_NueCC
private

Definition at line 99 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_Ee_den
private

Definition at line 84 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_Ee_num
private

Definition at line 85 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_Ee_num_dEdx
private

Definition at line 86 of file NeutrinoShowerEff_module.cc.

TEfficiency* DUNE::NeutrinoShowerEff::h_Eff_Ee = 0
private

Definition at line 107 of file NeutrinoShowerEff_module.cc.

TEfficiency* DUNE::NeutrinoShowerEff::h_Eff_Ee_dEdx = 0
private

Definition at line 108 of file NeutrinoShowerEff_module.cc.

TEfficiency* DUNE::NeutrinoShowerEff::h_Eff_Ev = 0
private

Definition at line 105 of file NeutrinoShowerEff_module.cc.

TEfficiency* DUNE::NeutrinoShowerEff::h_Eff_Ev_dEdx = 0
private

Definition at line 106 of file NeutrinoShowerEff_module.cc.

TEfficiency* DUNE::NeutrinoShowerEff::h_Eff_Pe = 0
private

Definition at line 109 of file NeutrinoShowerEff_module.cc.

TEfficiency* DUNE::NeutrinoShowerEff::h_Eff_theta = 0
private

Definition at line 110 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_Efrac_bkgPurity
private

Definition at line 102 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_Efrac_NueCCPurity
private

Definition at line 98 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_Efrac_shContamination
private

Definition at line 94 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_Efrac_shPurity
private

Definition at line 95 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_esh_bestplane_NC
private

Definition at line 114 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_esh_bestplane_NueCC
private

Definition at line 113 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_Ev_den
private

Definition at line 80 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_Ev_num
private

Definition at line 81 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_Ev_num_dEdx
private

Definition at line 82 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_HighestHitsProducedParticlePDG_bkg
private

Definition at line 101 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_HighestHitsProducedParticlePDG_NueCC
private

Definition at line 100 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_mpi0_electronorpositron_NueCC
private

Definition at line 133 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_mpi0_photon_NC
private

Definition at line 134 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_Pe_den
private

Definition at line 88 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_Pe_num
private

Definition at line 89 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartXwrtTrueparticleEndXDiff_photon_NC
private

Definition at line 172 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartXwrtTrueparticleEndXDiff_photon_NueCC
private

Definition at line 168 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartXwrtTrueparticleStartXDiff_chargedpion_NC
private

Definition at line 188 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartXwrtTrueparticleStartXDiff_chargedpion_NueCC
private

Definition at line 184 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartXwrtTrueparticleStartXDiff_electronorpositron_NC
private

Definition at line 155 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartXwrtTrueparticleStartXDiff_electronorpositron_NueCC
private

Definition at line 151 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartXwrtTrueparticleStartXDiff_photon_NC
private

Definition at line 163 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartXwrtTrueparticleStartXDiff_photon_NueCC
private

Definition at line 159 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartXwrtTrueparticleStartXDiff_proton_NC
private

Definition at line 180 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartXwrtTrueparticleStartXDiff_proton_NueCC
private

Definition at line 176 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartYwrtTrueparticleEndYDiff_photon_NC
private

Definition at line 173 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartYwrtTrueparticleEndYDiff_photon_NueCC
private

Definition at line 169 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartYwrtTrueparticleStartYDiff_chargedpion_NC
private

Definition at line 189 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartYwrtTrueparticleStartYDiff_chargedpion_NueCC
private

Definition at line 185 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartYwrtTrueparticleStartYDiff_electronorpositron_NC
private

Definition at line 156 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartYwrtTrueparticleStartYDiff_electronorpositron_NueCC
private

Definition at line 152 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartYwrtTrueparticleStartYDiff_photon_NC
private

Definition at line 164 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartYwrtTrueparticleStartYDiff_photon_NueCC
private

Definition at line 160 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartYwrtTrueparticleStartYDiff_proton_NC
private

Definition at line 181 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartYwrtTrueparticleStartYDiff_proton_NueCC
private

Definition at line 177 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartZwrtTrueparticleEndZDiff_photon_NC
private

Definition at line 174 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartZwrtTrueparticleEndZDiff_photon_NueCC
private

Definition at line 170 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartZwrtTrueparticleStartZDiff_chargedpion_NC
private

Definition at line 190 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartZwrtTrueparticleStartZDiff_chargedpion_NueCC
private

Definition at line 186 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartZwrtTrueparticleStartZDiff_electronorpositron_NC
private

Definition at line 157 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartZwrtTrueparticleStartZDiff_electronorpositron_NueCC
private

Definition at line 153 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartZwrtTrueparticleStartZDiff_photon_NC
private

Definition at line 165 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartZwrtTrueparticleStartZDiff_photon_NueCC
private

Definition at line 161 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartZwrtTrueparticleStartZDiff_proton_NC
private

Definition at line 182 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_ShStartZwrtTrueparticleStartZDiff_proton_NueCC
private

Definition at line 178 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_theta_den
private

Definition at line 91 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_theta_num
private

Definition at line 92 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_trklike_em
private

Definition at line 137 of file NeutrinoShowerEff_module.cc.

TH1D* DUNE::NeutrinoShowerEff::h_trklike_nonem
private

Definition at line 138 of file NeutrinoShowerEff_module.cc.

int DUNE::NeutrinoShowerEff::MC_channel
private

Definition at line 201 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::MC_incoming_P[4]
private

Definition at line 206 of file NeutrinoShowerEff_module.cc.

int DUNE::NeutrinoShowerEff::MC_incoming_PDG
private

Definition at line 198 of file NeutrinoShowerEff_module.cc.

int DUNE::NeutrinoShowerEff::MC_isCC
private

Definition at line 200 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::MC_lepton_endMomentum[4]
private

Definition at line 208 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::MC_lepton_endXYZT[4]
private

Definition at line 210 of file NeutrinoShowerEff_module.cc.

int DUNE::NeutrinoShowerEff::MC_lepton_PDG
private

Definition at line 199 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::MC_lepton_startMomentum[4]
private

Definition at line 207 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::MC_lepton_startXYZT[4]
private

Definition at line 209 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::MC_lepton_theta
private

Definition at line 211 of file NeutrinoShowerEff_module.cc.

int DUNE::NeutrinoShowerEff::MC_leptonID
private

Definition at line 212 of file NeutrinoShowerEff_module.cc.

int DUNE::NeutrinoShowerEff::MC_LeptonTrack
private

Definition at line 213 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::MC_Q2
private

Definition at line 203 of file NeutrinoShowerEff_module.cc.

int DUNE::NeutrinoShowerEff::MC_target
private

Definition at line 202 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::MC_vertex[4]
private

Definition at line 205 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::MC_W
private

Definition at line 204 of file NeutrinoShowerEff_module.cc.

int DUNE::NeutrinoShowerEff::n_recoShowers
private

Definition at line 236 of file NeutrinoShowerEff_module.cc.

int DUNE::NeutrinoShowerEff::Run
private

Definition at line 194 of file NeutrinoShowerEff_module.cc.

int DUNE::NeutrinoShowerEff::sh_bestplane[MAX_SHOWERS]
private

Definition at line 224 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::sh_completeness[MAX_SHOWERS]
private

Definition at line 229 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::sh_dEdx[MAX_SHOWERS][3]
private

Definition at line 223 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::sh_dEdxasymm[MAX_SHOWERS]
private

Definition at line 233 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::sh_direction_X[MAX_SHOWERS]
private

Definition at line 215 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::sh_direction_Y[MAX_SHOWERS]
private

Definition at line 216 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::sh_direction_Z[MAX_SHOWERS]
private

Definition at line 217 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::sh_Efrac_best
private

Definition at line 237 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::sh_Efrac_contamination[MAX_SHOWERS]
private

Definition at line 227 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::sh_energy[MAX_SHOWERS][3]
private

Definition at line 221 of file NeutrinoShowerEff_module.cc.

int DUNE::NeutrinoShowerEff::sh_hasPrimary_e[MAX_SHOWERS]
private

Definition at line 226 of file NeutrinoShowerEff_module.cc.

int DUNE::NeutrinoShowerEff::sh_largest
private

Definition at line 231 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::sh_length[MAX_SHOWERS]
private

Definition at line 225 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::sh_MIPenergy[MAX_SHOWERS][3]
private

Definition at line 222 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::sh_mpi0
private

Definition at line 234 of file NeutrinoShowerEff_module.cc.

int DUNE::NeutrinoShowerEff::sh_nHits[MAX_SHOWERS]
private

Definition at line 230 of file NeutrinoShowerEff_module.cc.

int DUNE::NeutrinoShowerEff::sh_pdg[MAX_SHOWERS]
private

Definition at line 232 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::sh_purity[MAX_SHOWERS]
private

Definition at line 228 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::sh_start_X[MAX_SHOWERS]
private

Definition at line 218 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::sh_start_Y[MAX_SHOWERS]
private

Definition at line 219 of file NeutrinoShowerEff_module.cc.

double DUNE::NeutrinoShowerEff::sh_start_Z[MAX_SHOWERS]
private

Definition at line 220 of file NeutrinoShowerEff_module.cc.

int DUNE::NeutrinoShowerEff::SubRun
private

Definition at line 195 of file NeutrinoShowerEff_module.cc.


The documentation for this class was generated from the following file: