LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
DUNE::NeutrinoTrackingEff Class Reference
Inheritance diagram for DUNE::NeutrinoTrackingEff:
art::EDAnalyzer art::EventObserverBase art::Consumer art::EngineCreator

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 NeutrinoTrackingEff (fhicl::ParameterSet const &pset)
 
virtual ~NeutrinoTrackingEff ()
 
void beginJob ()
 
void endJob ()
 
void beginRun (const art::Run &run)
 
void analyze (const art::Event &evt)
 
void reconfigure (fhicl::ParameterSet const &pset)
 
void processEff (const art::Event &evt, bool &isFiducial)
 
void truthMatcher (std::vector< art::Ptr< recob::Hit >> all_hits, std::vector< art::Ptr< recob::Hit >> track_hits, const simb::MCParticle *&MCparticle, double &Efrac, double &Ecomplet)
 
double truthLength (const simb::MCParticle *MCparticle)
 
bool insideFV (double vertex[4])
 
void doEfficiencies ()
 
std::string workerType () const
 
bool modifiesEvent () const
 
void registerProducts (MasterProductRegistry &, ProductDescriptions &, ModuleDescription const &)
 
std::string const & processName () const
 
bool wantAllEvents () const
 
bool wantEvent (Event const &e)
 
fhicl::ParameterSetID selectorConfig () const
 
art::Handle< art::TriggerResultsgetTriggerResults (Event const &e) const
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< T > consumes (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< T > consumesView (InputTag const &it)
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< T > mayConsume (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< T > mayConsumeView (InputTag const &it)
 
base_engine_tcreateEngine (seed_t seed)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label)
 
seed_t get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1)
 

Static Public Member Functions

static cet::exempt_ptr< Consumernon_module_context ()
 

Protected Member Functions

CurrentProcessingContext const * currentContext () const
 
detail::CachedProducts & cachedProducts ()
 
void validateConsumedProduct (BranchType const bt, ProductInfo const &pi)
 
void prepareForJob (fhicl::ParameterSet const &pset)
 
void showMissingConsumes () const
 

Private Attributes

std::string fMCTruthModuleLabel
 
std::string fTrackModuleLabel
 
int fNeutrinoPDGcode
 
int fLeptonPDGcode
 
double fMaxNeutrinoE
 
double fMaxLeptonP
 
bool fisNeutrinoInt
 
int MC_isCC
 
int MC_incoming_PDG
 
double MC_incoming_P [4]
 
double MC_vertex [4]
 
double MC_lepton_startMomentum [4]
 
int MC_leading_protonID
 
int MC_leading_PionPlusID
 
int MC_leading_PionMinusID
 
int MC_leptonID
 
int MC_kaonID
 
int MC_michelID
 
double MC_leptonP
 
double MC_leading_PionPlusP
 
double MC_leading_ProtonP
 
double MC_leading_PionMinusP
 
double MC_kaonP
 
double MC_michelP
 
TH1D * h_Ev_den
 
TH1D * h_Ev_num
 
TH1D * h_Pmu_den
 
TH1D * h_Pmu_num
 
TH1D * h_theta_den
 
TH1D * h_theta_num
 
TH1D * h_Pproton_den
 
TH1D * h_Pproton_num
 
TH1D * h_Ppion_plus_den
 
TH1D * h_Ppion_plus_num
 
TH1D * h_Ppion_minus_den
 
TH1D * h_Ppion_minus_num
 
TH1D * h_Efrac_lepton
 
TH1D * h_Ecomplet_lepton
 
TH1D * h_Efrac_proton
 
TH1D * h_Ecomplet_proton
 
TH1D * h_Efrac_pion_plus
 
TH1D * h_Ecomplet_pion_plus
 
TH1D * h_Efrac_pion_minus
 
TH1D * h_Ecomplet_pion_minus
 
TH1D * h_trackRes_lepton
 
TH1D * h_trackRes_proton
 
TH1D * h_trackRes_pion_plus
 
TH1D * h_trackRes_pion_minus
 
TH1D * h_muon_length
 
TH1D * h_proton_length
 
TH1D * h_pionp_length
 
TH1D * h_pionm_length
 
TH1D * h_muonwtrk_length
 
TH1D * h_protonwtrk_length
 
TH1D * h_pionpwtrk_length
 
TH1D * h_pionmwtrk_length
 
TEfficiency * h_Eff_Ev = 0
 
TEfficiency * h_Eff_Pmu = 0
 
TEfficiency * h_Eff_theta = 0
 
TEfficiency * h_Eff_Pproton = 0
 
TEfficiency * h_Eff_Ppion_plus = 0
 
TEfficiency * h_Eff_Ppion_minus = 0
 
TEfficiency * h_Eff_Lmuon = 0
 
TEfficiency * h_Eff_Lproton = 0
 
TEfficiency * h_Eff_Lpion_plus = 0
 
TEfficiency * h_Eff_Lpion_minus = 0
 
TH1D * h_Pkaon_den
 
TH1D * h_Pkaon_num
 
TH1D * h_Pmichel_e_den
 
TH1D * h_Pmichel_e_num
 
TH1D * h_Efrac_kaon
 
TH1D * h_Ecomplet_kaon
 
TH1D * h_trackRes_kaon
 
TH1D * h_Efrac_michel
 
TH1D * h_Ecomplet_michel
 
TH1D * h_trackRes_michel
 
TH1D * h_kaon_length
 
TH1D * h_michel_length
 
TH1D * h_kaonwtrk_length
 
TH1D * h_michelwtrk_length
 
TEfficiency * h_Eff_Pkaon =0
 
TEfficiency * h_Eff_Pmichel =0
 
TEfficiency * h_Eff_Lkaon = 0
 
TEfficiency * h_Eff_Lmichel =0
 
float fFidVolCutX
 
float fFidVolCutY
 
float fFidVolCutZ
 
float fFidVolXmin
 
float fFidVolXmax
 
float fFidVolYmin
 
float fFidVolYmax
 
float fFidVolZmin
 
float fFidVolZmax
 
detinfo::DetectorProperties const * detprop = lar::providerFrom<detinfo::DetectorPropertiesService>()
 
detinfo::DetectorClocks const * ts = lar::providerFrom<detinfo::DetectorClocksService>()
 
double XDriftVelocity = detprop->DriftVelocity()*1e-3
 
double WindowSize = detprop->NumberTimeSamples() * ts->TPCClock().TickPeriod() * 1e3
 
art::ServiceHandle< geo::Geometrygeom
 

Detailed Description

Definition at line 60 of file NeutrinoTrackingEff_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

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

Definition at line 200 of file NeutrinoTrackingEff_module.cc.

References reconfigure().

201  : EDAnalyzer(parameterSet)
202 {
203  reconfigure(parameterSet);
204 }
void reconfigure(fhicl::ParameterSet const &pset)
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
DUNE::NeutrinoTrackingEff::~NeutrinoTrackingEff ( )
virtual

Definition at line 206 of file NeutrinoTrackingEff_module.cc.

206  {
207  //destructor
208 }

Member Function Documentation

void DUNE::NeutrinoTrackingEff::analyze ( const art::Event evt)

Definition at line 387 of file NeutrinoTrackingEff_module.cc.

References art::Event::isRealData(), and processEff().

387  {
388  if (event.isRealData()) return;
389 
390  bool isFiducial = false;
391  processEff(event, isFiducial);
392 }
void processEff(const art::Event &evt, bool &isFiducial)
Event finding and building.
void DUNE::NeutrinoTrackingEff::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 224 of file NeutrinoTrackingEff_module.cc.

References fFidVolCutX, fFidVolCutY, fFidVolCutZ, geo::TPCGeo::LocalToWorld(), and art::TFileDirectory::make().

224  {
225  std::cout<<"job begin..."<<std::endl;
226  // Get geometry.
227  auto const* geo = lar::providerFrom<geo::Geometry>();
228  // Define histogram boundaries (cm).
229  // For now only draw cryostat=0.
230  double minx = 1e9;
231  double maxx = -1e9;
232  double miny = 1e9;
233  double maxy = -1e9;
234  double minz = 1e9;
235  double maxz = -1e9;
236  for (size_t i = 0; i<geo->NTPC(); ++i){
237  double local[3] = {0.,0.,0.};
238  double world[3] = {0.,0.,0.};
239  const geo::TPCGeo &tpc = geo->TPC(i);
240  tpc.LocalToWorld(local,world);
241  if (minx>world[0]-geo->DetHalfWidth(i))
242  minx = world[0]-geo->DetHalfWidth(i);
243  if (maxx<world[0]+geo->DetHalfWidth(i))
244  maxx = world[0]+geo->DetHalfWidth(i);
245  if (miny>world[1]-geo->DetHalfHeight(i))
246  miny = world[1]-geo->DetHalfHeight(i);
247  if (maxy<world[1]+geo->DetHalfHeight(i))
248  maxy = world[1]+geo->DetHalfHeight(i);
249  if (minz>world[2]-geo->DetLength(i)/2.)
250  minz = world[2]-geo->DetLength(i)/2.;
251  if (maxz<world[2]+geo->DetLength(i)/2.)
252  maxz = world[2]+geo->DetLength(i)/2.;
253  }
254 
255  fFidVolXmin = minx + fFidVolCutX;
256  fFidVolXmax = maxx - fFidVolCutX;
257  fFidVolYmin = miny + fFidVolCutY;
258  fFidVolYmax = maxy - fFidVolCutY;
259  fFidVolZmin = minz + fFidVolCutZ;
260  fFidVolZmax = maxz - fFidVolCutZ;
261 
262  std::cout<<"Fiducial volume:"<<"\n"
263  <<fFidVolXmin<<"\t< x <\t"<<fFidVolXmax<<"\n"
264  <<fFidVolYmin<<"\t< y <\t"<<fFidVolYmax<<"\n"
265  <<fFidVolZmin<<"\t< z <\t"<<fFidVolZmax<<"\n";
266 
268 
269  double E_bins[21] ={0,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4,4.5,5.0,5.5,6.0,7.0,8.0,10.0,12.0,14.0,17.0,20.0,25.0};
270  double theta_bin[44]= { 0.,1.,2.,3.,4.,5.,6.,7.,8.,9.,10.,11.,12.,13.,14.,15.,16.,17.,18.,19.,20.,22.,24.,26.,28.,30.,32.,34.,36.,38.,40.,42.,44.,46.,48.,50.,55.,60.,65.,70.,75.,80.,85.,90.};
271  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};
272 
273  for (int i = 0; i<21; ++i) E_bins[i] *= fMaxNeutrinoE/25.;
274  for (int i = 0; i<18; ++i) Pbins[i] *= fMaxLeptonP/3.0;
275 
276  h_Ev_den = tfs->make<TH1D>("h_Ev_den","Neutrino Energy; Neutrino Energy (GeV); Tracking Efficiency",20,E_bins);
277  h_Ev_num = tfs->make<TH1D>("h_Ev_num","Neutrino Energy; Neutrino Energy (GeV); Tracking Efficiency",20,E_bins);
278  h_Pmu_den = tfs->make<TH1D>("h_Pmu_den","Muon Momentum; Muon Momentum (GeV); Tracking Efficiency",20,E_bins);
279  h_Pmu_num = tfs->make<TH1D>("h_Pmu_num","Muon Momentum; Muon Momentum (GeV); Tracking Efficiency",20,E_bins);
280  h_theta_den = tfs->make<TH1D>("h_theta_den","Theta; Theta w.r.t beam direction (Degrees); Tracking Efficiency",43,theta_bin);
281  h_theta_num = tfs->make<TH1D>("h_theta_num","Theta; Theta w.r.t beam direction (Degrees); Tracking Efficiency",43,theta_bin);
282  h_Pproton_den = tfs->make<TH1D>("h_Pproton_den","Protons; Proton Momentum (GeV); Tracking Efficiency", 17, Pbins);
283  h_Pproton_num = tfs->make<TH1D>("h_Pproton_num","Protons; Proton Momentum (GeV); Tracking Efficiency", 17, Pbins);
284  h_Ppion_plus_den = tfs->make<TH1D>("h_Ppion_plus_den", "Pions Plus; Pion Momentum (GeV); Tracking Efficiency", 17, Pbins);
285  h_Ppion_plus_num = tfs->make<TH1D>("h_Ppion_plus_num", "Pions Plus; Pion Momentum (GeV); Tracking Efficiency", 17, Pbins);
286  h_Ppion_minus_den = tfs->make<TH1D>("h_Ppion_minus_den", "Pions Minus; Pion Momentum (GeV); Tracking Efficiency", 17, Pbins);
287  h_Ppion_minus_num = tfs->make<TH1D>("h_Ppion_minus_num", "Pions Minus; Pion Momentum (GeV); Tracking Efficiency", 17, Pbins);
288  h_Ev_den->Sumw2();
289  h_Ev_num->Sumw2();
290  h_Pmu_den->Sumw2();
291  h_Pmu_num->Sumw2();
292  h_theta_den->Sumw2();
293  h_theta_num->Sumw2();
294  h_Pproton_den->Sumw2();
295  h_Pproton_num->Sumw2();
296  h_Ppion_plus_den->Sumw2();
297  h_Ppion_plus_num->Sumw2();
298  h_Ppion_minus_den->Sumw2();
299  h_Ppion_minus_num->Sumw2();
300 
301  h_Efrac_lepton = tfs->make<TH1D>("h_Efrac_lepton","Efrac Lepton; Track Purity;",60,0,1.2);
302  h_Ecomplet_lepton = 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);
304  h_Ecomplet_proton = tfs->make<TH1D>("h_Ecomplet_proton","Ecomplet Proton; Track Completeness;",60,0,1.2);
305  h_Efrac_pion_plus = tfs->make<TH1D>("h_Efrac_pion_plus","Efrac Pion +; Track Purity;",60,0,1.2);
306  h_Ecomplet_pion_plus = tfs->make<TH1D>("h_Ecomplet_pion_plus","Ecomplet Pion +; Track Completeness;",60,0,1.2);
307  h_Efrac_pion_minus = tfs->make<TH1D>("h_Efrac_pion_minus","Efrac Pion -; Track Purity;",60,0,1.2);
308  h_Ecomplet_pion_minus = tfs->make<TH1D>("h_Ecomplet_pion_minus","Ecomplet Pion -; Track Completeness;",60,0,1.2);
309  h_trackRes_lepton = tfs->make<TH1D>("h_trackRes_lepton", "Muon Residual; Truth length - Reco length (cm);",200,-100,100);
310  h_trackRes_proton = tfs->make<TH1D>("h_trackRes_proton", "Proton Residual; Truth length - Reco length (cm);",200,-100,100);
311  h_trackRes_pion_plus = tfs->make<TH1D>("h_trackRes_pion_plus", "Pion + Residual; Truth length - Reco length (cm);",200,-100,100);
312  h_trackRes_pion_minus = tfs->make<TH1D>("h_trackRes_pion_minus", "Pion - Residual; Truth length - Reco length (cm);",200,-100,100);
313  h_Efrac_lepton->Sumw2();
314  h_Ecomplet_lepton->Sumw2();
315  h_Efrac_proton->Sumw2();
316  h_Ecomplet_proton->Sumw2();
317  h_Efrac_pion_plus->Sumw2();
318  h_Ecomplet_pion_plus->Sumw2();
319  h_Efrac_pion_minus->Sumw2();
320  h_Ecomplet_pion_minus->Sumw2();
321  h_trackRes_lepton->Sumw2();
322  h_trackRes_proton->Sumw2();
323  h_trackRes_pion_plus->Sumw2();
324  h_trackRes_pion_minus->Sumw2();
325 
326  h_muon_length = tfs->make<TH1D>("h_muon_length","Muon Length; Muon Truth Length (cm)",40,0,100);
327  h_proton_length = tfs->make<TH1D>("h_proton_length","Proton Length; Proton Truth Length (cm)",40,0,100);
328  h_pionp_length = tfs->make<TH1D>("h_pionp_length","Pion + Length; Pion^{+} Truth Length (cm)",40,0,100);
329  h_pionm_length = tfs->make<TH1D>("h_pionm_length","Pion - Length; Pion^{-} Truth Length (cm)",40,0,100);
330 
331  h_muonwtrk_length = tfs->make<TH1D>("h_muonwtrk_length","Muon Length; Muon Truth Length (cm)",40,0,100);
332  h_protonwtrk_length = tfs->make<TH1D>("h_protonwtrk_length","Proton Length; Proton Truth Length (cm)",40,0,100);
333  h_pionpwtrk_length = tfs->make<TH1D>("h_pionpwtrk_length","Pion + Length; Pion^{+} Truth Length (cm)",40,0,100);
334  h_pionmwtrk_length = tfs->make<TH1D>("h_pionmwtrk_length","Pion - Length; Pion^{-} Truth Length (cm)",40,0,100);
335 
336  h_muon_length->Sumw2();
337  h_muonwtrk_length->Sumw2();
338  h_proton_length->Sumw2();
339  h_protonwtrk_length->Sumw2();
340  h_pionp_length->Sumw2();
341  h_pionpwtrk_length->Sumw2();
342  h_pionm_length->Sumw2();
343  h_pionmwtrk_length->Sumw2();
344 
345  h_Pkaon_den = tfs->make<TH1D>("h_Pkaon_den","Kaon; Kaon Momentum (GeV); Tracking Efficiency", 17, Pbins);
346  h_Pkaon_num = tfs->make<TH1D>("h_Pkaon_num","Kaon; Kaon Momentum (GeV); Tracking Efficiency", 17, Pbins);
347  h_Pmichel_e_den = tfs->make<TH1D>("h_Pmichel_e_den","Michel Electron; Michele e Momentum (GeV); Tracking Efficiency", 17, Pbins);
348  h_Pmichel_e_num = tfs->make<TH1D>("h_Pmichel_e_num","Michel Electron; Michele e Momentum (GeV); Tracking Efficiency", 17, Pbins);
349  h_Pkaon_den->Sumw2();
350  h_Pkaon_num->Sumw2();
351  h_Pmichel_e_den->Sumw2();
352  h_Pmichel_e_num->Sumw2();
353  h_Efrac_kaon = tfs->make<TH1D>("h_Efrac_kaon","Efrac Kaon; Track Purity;",60,0,1.2);
354  h_Ecomplet_kaon = tfs->make<TH1D>("h_Ecomplet_kaon","Ecomplet Kaon; Track Completeness;",60,0,1.2);
355  h_trackRes_kaon = tfs->make<TH1D>("h_trackRes_kaon","Kaon Residual; Truth length - Reco length (cm);",200,-100,100);
356  h_Efrac_michel = tfs->make<TH1D>("h_Efrac_michel","Efrac Michel; Track Energy fraction;",60,0,1.2);
357  h_Ecomplet_michel = tfs->make<TH1D>("h_Ecomplet_michel","Ecomplet Michel; Track Completeness;",60,0,1.2);
358  h_trackRes_michel = tfs->make<TH1D>("h_trackRes_michel","Michel Residual; Truth length - Reco length (cm);",200,-100,100);
359  h_kaon_length = tfs->make<TH1D>("h_kaon_length","Kaon Length; Kaon Truth Length (cm)",40,0,100);
360  h_kaonwtrk_length = tfs->make<TH1D>("h_kaonwtrk_length","Kaon Length; Kaon Truth Length (cm)",40,0,100);
361  h_michel_length = tfs->make<TH1D>("h_michel_length","Michel Length; Michel e Truth Length (cm)",40,0,100);
362  h_michelwtrk_length = tfs->make<TH1D>("h_michelwtrk_length","Michel Length; Michel e Truth Length (cm)",40,0,100);
363 
364  h_Efrac_kaon->Sumw2();
365  h_Ecomplet_kaon->Sumw2();
366  h_trackRes_kaon->Sumw2();
367  h_Efrac_michel->Sumw2();
368  h_Ecomplet_michel->Sumw2();
369  h_trackRes_michel->Sumw2();
370  h_kaon_length->Sumw2();
371  h_kaonwtrk_length->Sumw2();
372  h_michel_length->Sumw2();
373  h_michelwtrk_length->Sumw2();
374 
375 }
Geometry information for a single TPC.
Definition: TPCGeo.h:37
T * make(ARGS...args) const
Namespace collecting geometry-related classes utilities.
void LocalToWorld(const double *tpc, double *world) const
Transform point from local TPC frame to world frame.
Definition: TPCGeo.h:490
void DUNE::NeutrinoTrackingEff::beginRun ( const art::Run run)

Definition at line 383 of file NeutrinoTrackingEff_module.cc.

383  {
384  mf::LogInfo("NeutrinoTrackingEff")<<"begin run..."<<std::endl;
385 }
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
detail::CachedProducts& art::EventObserverBase::cachedProducts ( )
inlineprotectedinherited

Definition at line 79 of file EventObserverBase.h.

References art::EventObserverBase::selectors_.

Referenced by art::EDAnalyzer::doEvent(), and art::OutputModule::doWriteEvent().

80  {
81  return selectors_;
82  }
detail::CachedProducts selectors_
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::consumes ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::consumes ( InputTag const &  it)
inherited

Definition at line 147 of file Consumer.h.

References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

148 {
149  if (!moduleContext_)
150  return ProductToken<T>::invalid();
151 
152  consumables_[BT].emplace_back(ConsumableType::Product,
153  TypeID{typeid(T)},
154  it.label(),
155  it.instance(),
156  it.process());
157  return ProductToken<T>{it};
158 }
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
template<typename T , art::BranchType BT>
void art::Consumer::consumesMany ( )
inherited

Definition at line 162 of file Consumer.h.

163 {
164  if (!moduleContext_)
165  return;
166 
167  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
168 }
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::consumesView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::consumesView ( InputTag const &  it)
inherited

Definition at line 172 of file Consumer.h.

References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

173 {
174  if (!moduleContext_)
175  return ViewToken<T>::invalid();
176 
177  consumables_[BT].emplace_back(ConsumableType::ViewElement,
178  TypeID{typeid(T)},
179  it.label(),
180  it.instance(),
181  it.process());
182  return ViewToken<T>{it};
183 }
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
EngineCreator::base_engine_t & EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited

Definition at line 32 of file EngineCreator.cc.

References art::EngineCreator::rng().

34 {
35  return rng()->createEngine(
36  placeholder_schedule_id(), seed, kind_of_engine_to_make);
37 }
long seed
Definition: chem4.cc:68
static art::ServiceHandle< art::RandomNumberGenerator > & rng()
EngineCreator::base_engine_t & EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited

Definition at line 40 of file EngineCreator.cc.

References art::EngineCreator::rng().

43 {
44  return rng()->createEngine(
45  placeholder_schedule_id(), seed, kind_of_engine_to_make, engine_label);
46 }
long seed
Definition: chem4.cc:68
static art::ServiceHandle< art::RandomNumberGenerator > & rng()
CurrentProcessingContext const * art::EDAnalyzer::currentContext ( ) const
protectedinherited

Definition at line 114 of file EDAnalyzer.cc.

References art::EDAnalyzer::current_context_.

Referenced by art::EDAnalyzer::workerType().

115  {
116  return current_context_.get();
117  }
CPC_exempt_ptr current_context_
Definition: EDAnalyzer.h:179
void DUNE::NeutrinoTrackingEff::doEfficiencies ( )

Definition at line 918 of file NeutrinoTrackingEff_module.cc.

References DEFINE_ART_MODULE, h_Ev_den, h_Ev_num, h_kaon_length, h_kaonwtrk_length, h_michel_length, h_michelwtrk_length, h_muon_length, h_muonwtrk_length, h_pionm_length, h_pionmwtrk_length, h_pionp_length, h_pionpwtrk_length, h_Pkaon_den, h_Pkaon_num, h_Pmichel_e_den, h_Pmichel_e_num, h_Pmu_den, h_Pmu_num, h_Ppion_minus_den, h_Ppion_minus_num, h_Ppion_plus_den, h_Ppion_plus_num, h_Pproton_den, h_Pproton_num, h_proton_length, h_protonwtrk_length, h_theta_den, h_theta_num, and art::TFileDirectory::make().

Referenced by endJob().

918  {
919 
921 
922  if(TEfficiency::CheckConsistency(*h_Ev_num,*h_Ev_den)){
923  h_Eff_Ev = tfs->make<TEfficiency>(*h_Ev_num,*h_Ev_den);
924  TGraphAsymmErrors *grEff_Ev = h_Eff_Ev->CreateGraph();
925  grEff_Ev->Write("grEff_Ev");
926  h_Eff_Ev->Write("h_Eff_Ev");
927  }
928  if(TEfficiency::CheckConsistency(*h_Pmu_num,*h_Pmu_den)){
929  h_Eff_Pmu = tfs->make<TEfficiency>(*h_Pmu_num,*h_Pmu_den);
930  TGraphAsymmErrors *grEff_Pmu = h_Eff_Pmu->CreateGraph();
931  grEff_Pmu->Write("grEff_Pmu");
932  h_Eff_Pmu->Write("h_Eff_Pmu");
933  }
934  if(TEfficiency::CheckConsistency(*h_theta_num,*h_theta_den)){
935  h_Eff_theta = tfs->make<TEfficiency>(*h_theta_num,*h_theta_den);
936  TGraphAsymmErrors *grEff_theta = h_Eff_theta->CreateGraph();
937  grEff_theta->Write("grEff_theta");
938  h_Eff_theta->Write("h_Eff_theta");
939  }
940  if(TEfficiency::CheckConsistency(*h_Pproton_num,*h_Pproton_den)){
941  h_Eff_Pproton = tfs->make<TEfficiency>(*h_Pproton_num,*h_Pproton_den);
942  TGraphAsymmErrors *grEff_Pproton = h_Eff_Pproton->CreateGraph();
943  grEff_Pproton->Write("grEff_Pproton");
944  h_Eff_Pproton->Write("h_Eff_Pproton");
945  }
946  if(TEfficiency::CheckConsistency(*h_Ppion_plus_num,*h_Ppion_plus_den)){
948  TGraphAsymmErrors *grEff_Ppion_plus = h_Eff_Ppion_plus->CreateGraph();
949  grEff_Ppion_plus->Write("grEff_Ppion_plus");
950  h_Eff_Ppion_plus->Write("h_Eff_Ppion_plus");
951  }
952  if(TEfficiency::CheckConsistency(*h_Ppion_minus_num,*h_Ppion_minus_den)){
954  TGraphAsymmErrors *grEff_Ppion_minus = h_Eff_Ppion_minus->CreateGraph();
955  grEff_Ppion_minus->Write("grEff_Ppion_minus");
956  h_Eff_Ppion_minus->Write("h_Eff_Ppion_minus");
957  }
958  if(TEfficiency::CheckConsistency(*h_muonwtrk_length,*h_muon_length)){
959  h_Eff_Lmuon = tfs->make<TEfficiency>(*h_muonwtrk_length,*h_muon_length);
960  TGraphAsymmErrors *grEff_Lmuon = h_Eff_Lmuon->CreateGraph();
961  grEff_Lmuon->Write("grEff_Lmuon");
962  h_Eff_Lmuon->Write("h_Eff_Lmuon");
963  }
964  if(TEfficiency::CheckConsistency(*h_protonwtrk_length,*h_proton_length)){
965  h_Eff_Lproton = tfs->make<TEfficiency>(*h_protonwtrk_length,*h_proton_length);
966  TGraphAsymmErrors *grEff_Lproton = h_Eff_Lproton->CreateGraph();
967  grEff_Lproton->Write("grEff_Lproton");
968  h_Eff_Lproton->Write("h_Eff_Lproton");
969  }
970  if(TEfficiency::CheckConsistency(*h_pionpwtrk_length,*h_pionp_length)){
972  TGraphAsymmErrors *grEff_Lpion_plus = h_Eff_Lpion_plus->CreateGraph();
973  grEff_Lpion_plus->Write("grEff_Lpion_plus");
974  h_Eff_Lpion_plus->Write("h_Eff_Lpion_plus");
975  }
976  if(TEfficiency::CheckConsistency(*h_pionpwtrk_length,*h_pionp_length)){
978  TGraphAsymmErrors *grEff_Lpion_minus = h_Eff_Lpion_minus->CreateGraph();
979  grEff_Lpion_minus->Write("grEff_Lpion_minus");
980  h_Eff_Lpion_minus->Write("h_Eff_Lpion_minus");
981  }
982  if(TEfficiency::CheckConsistency(*h_Pkaon_num,*h_Pkaon_den)){
983  h_Eff_Pkaon = tfs->make<TEfficiency>(*h_Pkaon_num,*h_Pkaon_den);
984  TGraphAsymmErrors *grEff_Pkaon = h_Eff_Pkaon->CreateGraph();
985  grEff_Pkaon->Write("grEff_Pkaon");
986  h_Eff_Pkaon->Write("h_Eff_Pkaon");
987  }
988  if(TEfficiency::CheckConsistency(*h_kaonwtrk_length,*h_kaon_length)){
989  h_Eff_Lkaon = tfs->make<TEfficiency>(*h_kaonwtrk_length,*h_kaon_length);
990  TGraphAsymmErrors *grEff_Lkaon = h_Eff_Lkaon->CreateGraph();
991  grEff_Lkaon->Write("grEff_Lkaon");
992  h_Eff_Lkaon->Write("h_Eff_Lkaon");
993  }
994  if(TEfficiency::CheckConsistency(*h_Pmichel_e_num,*h_Pmichel_e_den)){
995  h_Eff_Pmichel = tfs->make<TEfficiency>(*h_Pmichel_e_num,*h_Pmichel_e_den);
996  TGraphAsymmErrors *grEff_Pmichel = h_Eff_Pmichel->CreateGraph();
997  grEff_Pmichel->Write("grEff_Pmichel");
998  h_Eff_Pmichel->Write("h_Eff_Pmichel");
999  }
1000  if(TEfficiency::CheckConsistency(*h_michelwtrk_length,*h_michel_length)){
1001  h_Eff_Lmichel = tfs->make<TEfficiency>(*h_michelwtrk_length,*h_michel_length);
1002  TGraphAsymmErrors *grEff_Lmichel = h_Eff_Lmichel->CreateGraph();
1003  grEff_Lmichel->Write("grEff_Lmichel");
1004  h_Eff_Lmichel->Write("h_Eff_Lmichel");
1005  }
1006 
1007 }
T * make(ARGS...args) const
void DUNE::NeutrinoTrackingEff::endJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 377 of file NeutrinoTrackingEff_module.cc.

References doEfficiencies().

377  {
378 
379  doEfficiencies();
380 
381 }
EngineCreator::seed_t EngineCreator::get_seed_value ( fhicl::ParameterSet const &  pset,
char const  key[] = "seed",
seed_t const  implicit_seed = -1 
)
inherited

Definition at line 49 of file EngineCreator.cc.

References fhicl::ParameterSet::get().

Referenced by art::MixFilter< T >::initEngine_().

52 {
53  auto const& explicit_seeds = pset.get<std::vector<int>>(key, {});
54  return explicit_seeds.empty() ? implicit_seed : explicit_seeds.front();
55 }
art::Handle<art::TriggerResults> art::EventObserverBase::getTriggerResults ( Event const &  e) const
inlineinherited

Definition at line 61 of file EventObserverBase.h.

References art::detail::CachedProducts::getOneTriggerResults(), and art::EventObserverBase::selectors_.

Referenced by art::OutputModule::doWriteEvent().

62  {
64  }
detail::CachedProducts selectors_
art::Handle< art::TriggerResults > getOneTriggerResults(Event const &) const
Float_t e
Definition: plot.C:34
bool DUNE::NeutrinoTrackingEff::insideFV ( double  vertex[4])

Definition at line 904 of file NeutrinoTrackingEff_module.cc.

References x, y, and z.

Referenced by processEff().

904  {
905 
906  double x = vertex[0];
907  double y = vertex[1];
908  double z = vertex[2];
909 
910  if (x>fFidVolXmin && x<fFidVolXmax&&
911  y>fFidVolYmin && y<fFidVolYmax&&
912  z>fFidVolZmin && z<fFidVolZmax)
913  return true;
914  else
915  return false;
916 }
Float_t x
Definition: compare.C:6
Float_t y
Definition: compare.C:6
Double_t z
Definition: plot.C:279
vertex reconstruction
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::mayConsume ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::mayConsume ( InputTag const &  it)
inherited

Definition at line 190 of file Consumer.h.

References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

191 {
192  if (!moduleContext_)
193  return ProductToken<T>::invalid();
194 
195  consumables_[BT].emplace_back(ConsumableType::Product,
196  TypeID{typeid(T)},
197  it.label(),
198  it.instance(),
199  it.process());
200  return ProductToken<T>{it};
201 }
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
template<typename T , art::BranchType BT>
void art::Consumer::mayConsumeMany ( )
inherited

Definition at line 205 of file Consumer.h.

206 {
207  if (!moduleContext_)
208  return;
209 
210  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
211 }
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::mayConsumeView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::mayConsumeView ( InputTag const &  it)
inherited

Definition at line 215 of file Consumer.h.

References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

216 {
217  if (!moduleContext_)
218  return ViewToken<T>::invalid();
219 
220  consumables_[BT].emplace_back(ConsumableType::ViewElement,
221  TypeID{typeid(T)},
222  it.label(),
223  it.instance(),
224  it.process());
225  return ViewToken<T>{it};
226 }
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
bool art::EventObserverBase::modifiesEvent ( ) const
inlineinherited

Definition at line 25 of file EventObserverBase.h.

26  {
27  return false;
28  }
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited

Definition at line 89 of file Consumer.cc.

References fhicl::ParameterSet::get_if_present().

Referenced by art::EDProducer::doBeginJob(), art::EDFilter::doBeginJob(), and art::EDAnalyzer::doBeginJob().

90 {
91  if (!moduleContext_)
92  return;
93 
94  pset.get_if_present("errorOnMissingConsumes", requireConsumes_);
95  for (auto& consumablesPerBranch : consumables_) {
96  cet::sort_all(consumablesPerBranch);
97  }
98 }
bool requireConsumes_
Definition: Consumer.h:137
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
void DUNE::NeutrinoTrackingEff::processEff ( const art::Event evt,
bool &  isFiducial 
)

save neutrino's interaction info

save FS particles

Definition at line 394 of file NeutrinoTrackingEff_module.cc.

References sim::ParticleList::begin(), simb::MCNeutrino::CCNC(), sim::ParticleList::end(), art::fill_ptr_vector(), fLeptonPDGcode, art::DataViewImpl::get(), art::DataViewImpl::getByLabel(), simb::MCTruth::GetNeutrino(), insideFV(), recob::Track::Length(), LOG_DEBUG, MC_kaonID, MC_leading_PionMinusID, MC_leading_PionPlusID, MC_leading_protonID, MC_leptonID, MC_michelID, simb::MCParticle::Momentum(), simb::MCParticle::Mother(), simb::MCTruth::NeutrinoSet(), simb::MCNeutrino::Nu(), cheat::ParticleInventoryService::ParticleList(), simb::MCParticle::PdgCode(), simb::MCParticle::Position(), simb::MCParticle::Process(), track, simb::MCParticle::TrackId(), truthLength(), and truthMatcher().

Referenced by analyze().

394  {
395 
398  event.getByLabel(fMCTruthModuleLabel, MCtruthHandle);
399  std::vector<art::Ptr<simb::MCTruth>> MCtruthlist;
400  art::fill_ptr_vector(MCtruthlist, MCtruthHandle);
401  art::Ptr<simb::MCTruth> MCtruth;
402 
403  //For now assume that there is only one neutrino interaction...
404  MCtruth = MCtruthlist[0];
405  if( MCtruth->NeutrinoSet() ){
406  simb::MCNeutrino nu = MCtruth->GetNeutrino();
407  if( nu.CCNC() == 0 ) MC_isCC = 1;
408  else if ( nu.CCNC() == 1 ) MC_isCC = 0;
409  simb::MCParticle neutrino = nu.Nu();
410  MC_incoming_PDG = nu.Nu().PdgCode();
411  const TLorentzVector& nu_momentum = nu.Nu().Momentum(0);
412  nu_momentum.GetXYZT(MC_incoming_P);
413  const TLorentzVector& vertex =neutrino.Position(0);
414  vertex.GetXYZT(MC_vertex);
415  }
416 
418 
419  double tmp_leadingPionPlusE = 0.0;
420  double tmp_leadingPionMinusE = 0.0;
421  double tmp_leadingProtonE = 0.0;
422 
423  simb::MCParticle *MClepton = NULL;
424  simb::MCParticle *MCproton = NULL;
425  simb::MCParticle *MCpion_plus = NULL;
426  simb::MCParticle *MCpion_minus = NULL;
427  simb::MCParticle *MCkaon = NULL;
428  simb::MCParticle *MCmichel = NULL;
429 
431  const sim::ParticleList& plist = pi_serv->ParticleList();
432  simb::MCParticle *particle=0;
433  int i=0; // particle index
434 
435  for( sim::ParticleList::const_iterator ipar = plist.begin(); ipar!=plist.end(); ++ipar){
436  particle = ipar->second;
437  if( particle->PdgCode() == fLeptonPDGcode && particle->Mother() == 0 ){ //primary lepton
438  const TLorentzVector& lepton_momentum =particle->Momentum(0);
439  lepton_momentum.GetXYZT(MC_lepton_startMomentum);
440  MC_leptonID = particle->TrackId();
441  MC_leptonP = sqrt(pow(particle->Momentum().Px(),2)+pow(particle->Momentum().Py(),2)+pow(particle->Momentum().Pz(),2));
442  MClepton = particle;
443  }
444  if( particle->Mother() == 0 ){ //save primary particle i.e. from the neutrino interaction
445  //save leading pion and proton
446  if( particle->PdgCode() == 2212 ){
447  if(particle->Momentum().E() > tmp_leadingProtonE){
448  tmp_leadingProtonE = particle->Momentum().E();
449  MC_leading_protonID = particle->TrackId();
450  MC_leading_ProtonP = sqrt(pow(particle->Momentum().Px(),2)+pow(particle->Momentum().Py(),2)+pow(particle->Momentum().Pz(),2));
451  MCproton = particle;
452  }
453  }
454  else if( particle->PdgCode() == 211 ){
455  if(particle->Momentum().E() > tmp_leadingPionPlusE){
456  tmp_leadingPionPlusE = particle->Momentum().E();
457  MC_leading_PionPlusID = particle->TrackId();
458  MC_leading_PionPlusP = sqrt(pow(particle->Momentum().Px(),2)+pow(particle->Momentum().Py(),2)+pow(particle->Momentum().Pz(),2));
459  MCpion_plus = particle;
460  }
461  }
462  else if( particle->PdgCode() == -211 ){
463  if(particle->Momentum().E() > tmp_leadingPionMinusE){
464  tmp_leadingPionMinusE = particle->Momentum().E();
465  MC_leading_PionMinusID = particle->TrackId();
466  MC_leading_PionMinusP = sqrt(pow(particle->Momentum().Px(),2)+pow(particle->Momentum().Py(),2)+pow(particle->Momentum().Pz(),2));
467  MCpion_minus = particle;
468  }
469  }
470  i++; //paticle index
471  }
472 
473  //=======================================================================================
474  //add Nucleon decay stuff and particle cannon
475  //=======================================================================================
476  if(!fisNeutrinoInt ){
477  if( particle->Mother() == 0 ){
478  const TLorentzVector& positionStart = particle->Position(0);
479  positionStart.GetXYZT(MC_vertex);
480  }
481  if( particle->PdgCode() == 321 ){ //save primary Kaon
482  MC_kaonID = particle->TrackId();
483  MC_kaonP = sqrt(pow(particle->Momentum().Px(),2)+pow(particle->Momentum().Py(),2)+pow(particle->Momentum().Pz(),2));
484  MCkaon = particle;
485  }
486  else if( particle->PdgCode() == fLeptonPDGcode ){ // Particle cannon muon
487  MC_leptonID = particle->TrackId();
488  MC_leptonP = sqrt(pow(particle->Momentum().Px(),2)+pow(particle->Momentum().Py(),2)+pow(particle->Momentum().Pz(),2));
489  MClepton = particle;
490  }
491  else if( particle->PdgCode() == 2212 ){
492  if(particle->Momentum().E() > tmp_leadingProtonE){
493  tmp_leadingProtonE = particle->Momentum().E();
494  MC_leading_protonID = particle->TrackId();
495  MC_leading_ProtonP = sqrt(pow(particle->Momentum().Px(),2)+pow(particle->Momentum().Py(),2)+pow(particle->Momentum().Pz(),2));
496  MCproton = particle;
497  }
498  }
499  else if( particle->PdgCode() == 211 ){
500  if(particle->Momentum().E() > tmp_leadingPionPlusE){
501  tmp_leadingPionPlusE = particle->Momentum().E();
502  MC_leading_PionPlusID = particle->TrackId();
503  MC_leading_PionPlusP = sqrt(pow(particle->Momentum().Px(),2)+pow(particle->Momentum().Py(),2)+pow(particle->Momentum().Pz(),2));
504  MCpion_plus = particle;
505  }
506  }
507  else if( particle->PdgCode() == -211 ){
508  if(particle->Momentum().E() > tmp_leadingPionMinusE){
509  tmp_leadingPionMinusE = particle->Momentum().E();
510  MC_leading_PionMinusID = particle->TrackId();
511  MC_leading_PionMinusP = sqrt(pow(particle->Momentum().Px(),2)+pow(particle->Momentum().Py(),2)+pow(particle->Momentum().Pz(),2));
512  MCpion_minus = particle;
513  }
514  }
515  else if( particle->Process() =="Decay" && particle->PdgCode() == -11){ // michel electron from muon decay
516  MC_michelID = particle->TrackId();
517  MC_michelP = sqrt(pow(particle->Momentum().Px(),2)+pow(particle->Momentum().Py(),2)+pow(particle->Momentum().Pz(),2));
518  MCmichel = particle;
519  }
520  else if( TMath::Abs(particle->PdgCode() == 321) ){ //save primary Kaon
521  MC_kaonID = particle->TrackId();
522  MC_kaonP = sqrt(pow(particle->Momentum().Px(),2)+pow(particle->Momentum().Py(),2)+pow(particle->Momentum().Pz(),2));
523  MCkaon = particle;
524  }
525  }
526  }
527  //===================================================================
528  //Saving denominator histograms
529  //===================================================================
530  isFiducial =insideFV( MC_vertex );
531  if( !isFiducial ) return;
532  double Pv = sqrt(pow(MC_incoming_P[0],2)+pow(MC_incoming_P[1],2)+pow(MC_incoming_P[2],2));
534  theta_mu *= (180.0/3.14159);
535  double truth_lengthLepton = truthLength(MClepton);
536  double proton_length = truthLength(MCproton);
537  double pion_plus_length = truthLength(MCpion_plus);
538  double pion_minus_length = truthLength(MCpion_minus);
539  double kaonLength = truthLength(MCkaon);
540  double michelLength = truthLength(MCmichel);
541 
542  //save CC events within the fiducial volume with the favorite neutrino flavor
544  if( MClepton ){
545  h_Ev_den->Fill(MC_incoming_P[3]);
546  h_Pmu_den->Fill(MC_leptonP);
547  h_theta_den->Fill(theta_mu);
548  h_muon_length->Fill(truth_lengthLepton);
549  }
550  if( MCproton ){
552  h_proton_length->Fill(proton_length);
553  }
554  if( MCpion_plus ){
556  h_pionp_length->Fill(pion_plus_length);
557  }
558  if( MCpion_minus ){
560  h_pionm_length->Fill(pion_minus_length);
561  }
562  if( MCkaon ){
563  h_Pkaon_den->Fill(MC_kaonP);
564  h_kaon_length->Fill(kaonLength);
565  }
566  }
567 
568  //save events for Nucleon decay and particle cannon
569  if(!fisNeutrinoInt ){
570  if( MClepton ){
571  h_Pmu_den->Fill(MC_leptonP);
572  h_muon_length->Fill(truth_lengthLepton);
573  }
574  if( MCkaon ){
575  h_Pkaon_den->Fill(MC_kaonP);
576  h_kaon_length->Fill(kaonLength);
577  }
578  if( MCproton ){
580  h_proton_length->Fill(proton_length);
581  }
582  if( MCpion_plus ){
584  h_pionp_length->Fill(pion_plus_length);
585  }
586  if( MCpion_minus ){
588  h_pionm_length->Fill(pion_minus_length);
589  }
590  if( MCmichel ){
592  h_michel_length->Fill(michelLength);
593  }
594  }
595 
596  //========================================================================
597  // Reco stuff, once we have selected a MC Particle let's find out if there is a track associated
598  //========================================================================
599  art::Handle<std::vector<recob::Track>> trackListHandle;
600  if(! event.getByLabel(fTrackModuleLabel, trackListHandle)) return;
601  std::vector<art::Ptr<recob::Track> > tracklist;
602  art::fill_ptr_vector(tracklist, trackListHandle);
603  int n_recoTrack = tracklist.size();
604 
605  art::FindManyP<recob::Hit> track_hits(trackListHandle, event, fTrackModuleLabel);
606  if( n_recoTrack == 0 ){
607  LOG_DEBUG("NeutrinoTrackingEff")<<"There are no reco tracks... bye";
608  return;
609  }
610  LOG_DEBUG("NeutrinoTrackingEff")<<"Found this many reco tracks "<<n_recoTrack;
611 
612 
613  double Efrac_lepton =0.0;
614  double Ecomplet_lepton =0.0;
615  double Efrac_proton =0.0;
616  double Ecomplet_proton =0.0;
617  double Efrac_pionplus =0.0;
618  double Ecomplet_pionplus =0.0;
619  double Efrac_pionminus =0.0;
620  double Ecomplet_pionminus =0.0;
621  double Efrac_kaon =0.0;
622  double Ecomplet_kaon =0.0;
623  double Efrac_michel =0.0;
624  double Ecomplet_michel =0.0;
625  double trackLength_lepton =0.0;
626  double trackLength_proton =0.0;
627  double trackLength_pion_plus =0.0;
628  double trackLength_pion_minus =0.0;
629  double trackLength_kaon =0.0;
630  double trackLength_michel =0.0;
631  const simb::MCParticle *MClepton_reco = NULL;
632  const simb::MCParticle *MCproton_reco = NULL;
633  const simb::MCParticle *MCpion_plus_reco = NULL;
634  const simb::MCParticle *MCpion_minus_reco = NULL;
635  const simb::MCParticle *MCkaon_reco = NULL;
636  const simb::MCParticle *MCmichel_reco = NULL;
637 
638  std::vector<art::Ptr<recob::Hit>> tmp_all_trackHits = track_hits.at(0);
639  std::vector<art::Ptr<recob::Hit>> all_hits;
641  if(event.get(tmp_all_trackHits[0].id(), hithandle)) art::fill_ptr_vector(all_hits, hithandle);
642 
643  for(int i=0; i<n_recoTrack; i++) {
644  art::Ptr<recob::Track> track = tracklist[i];
645  std::vector<art::Ptr<recob::Hit>> all_trackHits = track_hits.at(i);
646  double tmpEfrac = 0;
647  double tmpEcomplet =0;
648  const simb::MCParticle *particle;
649  truthMatcher( all_hits, all_trackHits, particle, tmpEfrac, tmpEcomplet );
650  if (!particle) continue;
651  //std::cout<<particle->PdgCode()<<" "<<particle->TrackId()<<" Efrac "<<tmpEfrac<<std::endl;
652  if( (particle->PdgCode() == fLeptonPDGcode) && (particle->TrackId() == MC_leptonID) ){
653  //save the best track ... based on completeness if there is more than one track
654  //if( tmpEfrac > Efrac_lepton ){ ///this was base on purity
655  if( tmpEcomplet > Ecomplet_lepton ){
656  Ecomplet_lepton = tmpEcomplet;
657  Efrac_lepton = tmpEfrac;
658  trackLength_lepton = track->Length();
659  MClepton_reco = particle;
660  }
661  }
662  else if( (particle->PdgCode() == 2212) && (particle->TrackId() == MC_leading_protonID) ){
663  //save the best track ... based on completeness if there is more than one track
664  if( tmpEcomplet > Ecomplet_proton ){
665  Ecomplet_proton = tmpEcomplet;
666  Efrac_proton = tmpEfrac;
667  trackLength_proton = track->Length();
668  MCproton_reco = particle;
669  }
670  }
671  else if( (particle->PdgCode() == 211) && (particle->TrackId() == MC_leading_PionPlusID) ){
672  //save the best track ... based on completeness if there is more than one track
673  if( tmpEcomplet > Ecomplet_pionplus ){
674  Ecomplet_pionplus = tmpEcomplet;
675  Efrac_pionplus = tmpEfrac;
676  trackLength_pion_plus = track->Length();
677  MCpion_plus_reco = particle;
678  }
679  }
680  else if( (particle->PdgCode() == -211) && (particle->TrackId() == MC_leading_PionMinusID) ){
681  //save the best track ... based on completeness if there is more than one track
682  if( tmpEcomplet > Ecomplet_pionminus ){
683  Ecomplet_pionminus = tmpEcomplet;
684  Efrac_pionminus = tmpEfrac;
685  trackLength_pion_minus = track->Length();
686  MCpion_minus_reco = particle;
687  }
688  }
689  //kaon from nucleon decay
690  else if( (TMath::Abs(particle->PdgCode()) == 321) && (particle->TrackId() == MC_kaonID) ){
691  //save the best track ... based on completeness if there is more than one track
692  if( tmpEcomplet > Ecomplet_kaon ){
693  Ecomplet_kaon = tmpEcomplet;
694  Efrac_kaon = tmpEfrac;
695  trackLength_kaon = track->Length();
696  MCkaon_reco = particle;
697  }
698  }
699  //michel from nucleon decay
700  else if( (particle->PdgCode() == -11) && (particle->TrackId() == MC_michelID) ){
701  //save the best track ... based on completeness if there is more than one track
702  if( tmpEcomplet > Ecomplet_michel ){
703  Ecomplet_michel = tmpEcomplet;
704  Efrac_michel = tmpEfrac;
705  trackLength_michel = track->Length();
706  MCmichel_reco = particle;
707  }
708  }
709 
710  }
711 
712  double Reco_LengthRes = truth_lengthLepton-trackLength_lepton;
713  double Reco_LengthResProton = proton_length-trackLength_proton;
714  double Reco_LengthResPionPlus = pion_plus_length-trackLength_pion_plus;
715  double Reco_LengthResPionMinus = pion_minus_length-trackLength_pion_minus;
716 
717  if( MClepton_reco && MClepton ){
719  h_Pmu_num->Fill(MC_leptonP);
720  h_Ev_num->Fill(MC_incoming_P[3]);
721  h_theta_num->Fill(theta_mu);
722  h_Efrac_lepton->Fill(Efrac_lepton);
723  h_Ecomplet_lepton->Fill(Ecomplet_lepton);
724  h_trackRes_lepton->Fill(Reco_LengthRes);
725  h_muonwtrk_length->Fill(truth_lengthLepton);
726  }
727  }
728  if( MCproton_reco && MCproton ){
731  h_Efrac_proton->Fill(Efrac_proton);
732  h_Ecomplet_proton->Fill(Ecomplet_proton);
733  h_trackRes_proton->Fill(Reco_LengthResProton);
734  h_protonwtrk_length->Fill(proton_length);
735  }
736  }
737  if( MCpion_plus_reco && MCpion_plus ){
740  h_Efrac_pion_plus->Fill(Efrac_pionplus);
741  h_Ecomplet_pion_plus->Fill(Ecomplet_pionplus);
742  h_trackRes_pion_plus->Fill(Reco_LengthResPionPlus);
743  h_pionpwtrk_length->Fill(pion_plus_length);
744  }
745  }
746  if( MCpion_minus_reco && MCpion_minus ){
749  h_Efrac_pion_minus->Fill(Efrac_pionminus);
750  h_Ecomplet_pion_minus->Fill(Ecomplet_pionminus);
751  h_trackRes_pion_minus->Fill(Reco_LengthResPionMinus);
752  h_pionmwtrk_length->Fill(pion_minus_length);
753  }
754  }
755  if( MCkaon_reco && MCkaon ){
757  h_Pkaon_num->Fill(MC_kaonP);
758  h_Efrac_kaon->Fill(Efrac_kaon);
759  h_Ecomplet_kaon->Fill(Ecomplet_kaon);
760  h_trackRes_kaon->Fill(kaonLength-trackLength_kaon);
761  h_kaonwtrk_length->Fill(kaonLength);
762  }
763  }
764  //Non neutrino events
765  //=========================================================
766  if(!fisNeutrinoInt ){
767  if( MClepton_reco && MClepton ){
768  h_Pmu_num->Fill(MC_leptonP);
769  h_Efrac_lepton->Fill(Efrac_lepton);
770  h_Ecomplet_lepton->Fill(Ecomplet_lepton);
771  h_trackRes_lepton->Fill(Reco_LengthRes);
772  h_muonwtrk_length->Fill(truth_lengthLepton);
773  }
774  if( MCkaon_reco && MCkaon ){
775  h_Pkaon_num->Fill(MC_kaonP);
776  h_Efrac_kaon->Fill(Efrac_kaon);
777  h_Ecomplet_kaon->Fill(Ecomplet_kaon);
778  h_trackRes_kaon->Fill(kaonLength-trackLength_kaon);
779  h_kaonwtrk_length->Fill(kaonLength);
780  }
781  if( MCproton_reco && MCproton ){
783  h_Efrac_proton->Fill(Efrac_proton);
784  h_Ecomplet_proton->Fill(Ecomplet_proton);
785  h_trackRes_proton->Fill(Reco_LengthResProton);
786  h_protonwtrk_length->Fill(proton_length);
787  }
788  if( MCpion_plus_reco && MCpion_plus ){
790  h_Efrac_pion_plus->Fill(Efrac_pionplus);
791  h_Ecomplet_pion_plus->Fill(Ecomplet_pionplus);
792  h_trackRes_pion_plus->Fill(Reco_LengthResPionPlus);
793  h_pionpwtrk_length->Fill(pion_plus_length);
794  }
795  if( MCpion_minus_reco && MCpion_minus ){
797  h_Efrac_pion_minus->Fill(Efrac_pionminus);
798  h_Ecomplet_pion_minus->Fill(Ecomplet_pionminus);
799  h_trackRes_pion_minus->Fill(Reco_LengthResPionMinus);
800  h_pionmwtrk_length->Fill(pion_minus_length);
801  }
802  if( MCmichel_reco && MCmichel ){
804  h_Efrac_michel->Fill(Efrac_michel);
805  h_Ecomplet_michel->Fill(Ecomplet_michel);
806  h_trackRes_michel->Fill(michelLength-trackLength_michel);
807  h_michelwtrk_length->Fill(michelLength);
808  }
809 
810  }
811 
812 }
double truthLength(const simb::MCParticle *MCparticle)
const TLorentzVector & Position(const int i=0) const
Definition: MCParticle.h:223
int PdgCode() const
Definition: MCParticle.h:216
int CCNC() const
Definition: MCNeutrino.h:152
const simb::MCNeutrino & GetNeutrino() const
Definition: MCTruth.h:74
int Mother() const
Definition: MCParticle.h:217
const simb::MCParticle & Nu() const
Definition: MCNeutrino.h:150
list_type::const_iterator const_iterator
Definition: ParticleList.h:132
std::string Process() const
Definition: MCParticle.h:219
int TrackId() const
Definition: MCParticle.h:214
void truthMatcher(std::vector< art::Ptr< recob::Hit >> all_hits, std::vector< art::Ptr< recob::Hit >> track_hits, const simb::MCParticle *&MCparticle, double &Efrac, double &Ecomplet)
double Length(size_t p=0) const
Access to various track properties.
Definition: Track.h:170
iterator begin()
Definition: ParticleList.h:305
const TLorentzVector & Momentum(const int i=0) const
Definition: MCParticle.h:224
#define LOG_DEBUG(id)
bool NeutrinoSet() const
Definition: MCTruth.h:75
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:464
Event generator information.
Definition: MCNeutrino.h:18
Float_t track
Definition: plot.C:34
Event finding and building.
vertex reconstruction
std::string const& art::EventObserverBase::processName ( ) const
inlineinherited
void DUNE::NeutrinoTrackingEff::reconfigure ( fhicl::ParameterSet const &  pset)

Definition at line 210 of file NeutrinoTrackingEff_module.cc.

References fhicl::ParameterSet::get().

Referenced by NeutrinoTrackingEff().

210  {
211 
212  fMCTruthModuleLabel = p.get<std::string>("MCTruthModuleLabel");
213  fTrackModuleLabel = p.get<std::string>("TrackModuleLabel");
214  fisNeutrinoInt = p.get<bool>("isNeutrinoInt");
215  fLeptonPDGcode = p.get<int>("LeptonPDGcode");
216  fNeutrinoPDGcode = p.get<int>("NeutrinoPDGcode");
217  fMaxNeutrinoE = p.get<double>("MaxNeutrinoE");
218  fMaxLeptonP = p.get<double>("MaxLeptonP");
219  fFidVolCutX = p.get<float>("FidVolCutX");
220  fFidVolCutY = p.get<float>("FidVolCutY");
221  fFidVolCutZ = p.get<float>("FidVolCutZ");
222 }
void art::EventObserverBase::registerProducts ( MasterProductRegistry ,
ProductDescriptions ,
ModuleDescription const &   
)
inlineinherited

Definition at line 33 of file EventObserverBase.h.

36  {}
fhicl::ParameterSetID art::EventObserverBase::selectorConfig ( ) const
inlineinherited

Definition at line 56 of file EventObserverBase.h.

References art::EventObserverBase::selector_config_id_.

Referenced by art::RootOutputFile::writeOne().

57  {
58  return selector_config_id_;
59  }
fhicl::ParameterSetID selector_config_id_
void art::Consumer::showMissingConsumes ( ) const
protectedinherited

Definition at line 125 of file Consumer.cc.

Referenced by art::EDProducer::doEndJob(), art::EDFilter::doEndJob(), art::EDAnalyzer::doEndJob(), and art::RootOutput::endJob().

126 {
127  if (!moduleContext_)
128  return;
129 
130  // If none of the branches have missing consumes statements, exit early.
131  if (std::all_of(cbegin(missingConsumes_),
132  cend(missingConsumes_),
133  [](auto const& perBranch) { return perBranch.empty(); }))
134  return;
135 
136  constexpr cet::HorizontalRule rule{60};
137  mf::LogPrint log{"MTdiagnostics"};
138  log << '\n'
139  << rule('=') << '\n'
140  << "The following consumes (or mayConsume) statements are missing from\n"
141  << module_context(moduleDescription_) << '\n'
142  << rule('-') << '\n';
143 
144  cet::for_all_with_index(
145  missingConsumes_, [&log](std::size_t const i, auto const& perBranch) {
146  for (auto const& pi : perBranch) {
147  log << " "
148  << assemble_consumes_statement(static_cast<BranchType>(i), pi)
149  << '\n';
150  }
151  });
152  log << rule('=');
153 }
cet::exempt_ptr< ModuleDescription const > moduleDescription_
Definition: Consumer.h:140
constexpr T pi()
Returns the constant pi (up to 35 decimal digits of precision)
bool moduleContext_
Definition: Consumer.h:136
ConsumableProductSets missingConsumes_
Definition: Consumer.h:139
double DUNE::NeutrinoTrackingEff::truthLength ( const simb::MCParticle MCparticle)

Definition at line 869 of file NeutrinoTrackingEff_module.cc.

References geo::GeometryCore::Cryostat(), geo::GeometryCore::FindTPCAtPosition(), geom, simb::MCParticle::NumberTrajectoryPoints(), geo::TPCGeo::PlaneLocation(), simb::MCParticle::Position(), simb::MCParticle::T(), geo::CryostatGeo::TPC(), detinfo::DetectorProperties::TriggerOffset(), simb::MCParticle::Vx(), simb::MCParticle::Vy(), simb::MCParticle::Vz(), WindowSize, and XDriftVelocity.

Referenced by processEff().

869  {
870  //calculate the truth length considering only the part that is inside the TPC
871  //Base on a peace of code from dune/TrackingAna/TrackingEfficiency_module.cc
872 
873  if( !MCparticle ) return -999.0;
874  int numberTrajectoryPoints = MCparticle->NumberTrajectoryPoints();
875  std::vector<double> TPCLengthHits(numberTrajectoryPoints, 0.0);
876  int FirstHit=0, LastHit=0;
877  double TPCLength = 0.0;
878  bool BeenInVolume = false;
879 
880  for(unsigned int MCHit=0; MCHit < TPCLengthHits.size(); ++MCHit) {
881  const TLorentzVector& tmpPosition= MCparticle->Position(MCHit);
882  double const tmpPosArray[]={tmpPosition[0],tmpPosition[1],tmpPosition[2]};
883  if (MCHit!=0) TPCLengthHits[MCHit] = sqrt( pow( (MCparticle->Vx(MCHit-1)-MCparticle->Vx(MCHit)),2)+ pow( (MCparticle->Vy(MCHit-1)-MCparticle->Vy(MCHit)),2)+ pow( (MCparticle->Vz(MCHit-1)-MCparticle->Vz(MCHit)),2));
884  geo::TPCID tpcid = geom->FindTPCAtPosition(tmpPosArray);
885  if(tpcid.isValid) {
886  // -- Check if hit is within drift window...
887  geo::CryostatGeo const& cryo = geom->Cryostat(tpcid.Cryostat);
888  geo::TPCGeo const& tpc = cryo.TPC(tpcid.TPC);
889  double XPlanePosition = tpc.PlaneLocation(0)[0];
890  double DriftTimeCorrection = fabs( tmpPosition[0] - XPlanePosition ) / XDriftVelocity;
891  double TimeAtPlane = MCparticle->T() + DriftTimeCorrection;
892  if( TimeAtPlane < detprop->TriggerOffset() || TimeAtPlane > detprop->TriggerOffset() + WindowSize ) continue;
893  LastHit = MCHit;
894  if( !BeenInVolume ) {
895  BeenInVolume = true;
896  FirstHit = MCHit;
897  }
898  }
899  }
900  for (int Hit = FirstHit+1; Hit <= LastHit; ++Hit ) TPCLength += TPCLengthHits[Hit];
901  return TPCLength;
902 }
unsigned int NumberTrajectoryPoints() const
Definition: MCParticle.h:222
const TLorentzVector & Position(const int i=0) const
Definition: MCParticle.h:223
virtual int TriggerOffset() const =0
Geometry information for a single TPC.
Definition: TPCGeo.h:37
Geometry information for a single cryostat.
Definition: CryostatGeo.h:36
detinfo::DetectorProperties const * detprop
geo::TPCID FindTPCAtPosition(double const worldLoc[3]) const
Returns the ID of the TPC at specified location.
double T(const int i=0) const
Definition: MCParticle.h:228
CryostatGeo const & Cryostat(geo::CryostatID const &cryoid) const
Returns the specified cryostat.
The data type to uniquely identify a TPC.
Definition: geo_types.h:195
art::ServiceHandle< geo::Geometry > geom
double Vx(const int i=0) const
Definition: MCParticle.h:225
const TPCGeo & TPC(unsigned int itpc) const
Return the itpc&#39;th TPC in the cryostat.
double Vz(const int i=0) const
Definition: MCParticle.h:227
const double * PlaneLocation(unsigned int p) const
Returns the coordinates of the center of the specified plane [cm].
Definition: TPCGeo.cxx:413
double Vy(const int i=0) const
Definition: MCParticle.h:226
void DUNE::NeutrinoTrackingEff::truthMatcher ( std::vector< art::Ptr< recob::Hit >>  all_hits,
std::vector< art::Ptr< recob::Hit >>  track_hits,
const simb::MCParticle *&  MCparticle,
double &  Efrac,
double &  Ecomplet 
)

if the collection of hits have more than one particle associate save the particle w/ the highest energy deposition since we are looking for muons/pions/protons this should be enough

Definition at line 814 of file NeutrinoTrackingEff_module.cc.

References cheat::BackTrackerService::HitToTrackIDEs(), and cheat::ParticleInventoryService::TrackIdToParticle_P().

Referenced by processEff().

814  {
815 
816  //std::cout<<"truthMatcher..."<<std::endl;
819  std::map<int,double> trkID_E;
820  for(size_t j = 0; j < track_hits.size(); ++j){
821  art::Ptr<recob::Hit> hit = track_hits[j];
822  std::vector<sim::TrackIDE> TrackIDs = bt_serv->HitToTrackIDEs(hit);
823  for(size_t k = 0; k < TrackIDs.size(); k++){
824  trkID_E[TrackIDs[k].trackID] += TrackIDs[k].energy;
825  }
826  }
827  double E_em =0.0;
828  double max_E = -999.0;
829  double total_E = 0.0;
830  int TrackID = -999;
831  double partial_E =0.0; // amount of energy deposited by the particle that deposited more energy... tomato potato... blabla
834  if( !trkID_E.size() ) {
835  MCparticle = 0;
836  return; //Ghost track???
837  }
838  for(std::map<int,double>::iterator ii = trkID_E.begin(); ii!=trkID_E.end(); ++ii){
839  total_E += ii->second;
840  if((ii->second)>max_E){
841  partial_E = ii->second;
842  max_E = ii->second;
843  TrackID = ii->first;
844  if( TrackID < 0 ) E_em += ii->second;
845  }
846  }
847  MCparticle = pi_serv->TrackIdToParticle_P(TrackID);
848 
849  //In the current simulation, we do not save EM Shower daughters in GEANT. But we do save the energy deposition in TrackIDEs. If the energy deposition is from a particle that is the daughter of
850  //an EM particle, the negative of the parent track ID is saved in TrackIDE for the daughter particle
851  //we don't want to track gammas or any other EM activity
852  if( TrackID < 0 ) return;
853 
854  //Efrac = (partial_E+E_em)/total_E;
855  Efrac = (partial_E)/total_E;
856 
857  //completeness
858  double totenergy =0;
859  for(size_t k = 0; k < all_hits.size(); ++k){
860  art::Ptr<recob::Hit> hit = all_hits[k];
861  std::vector<sim::TrackIDE> TrackIDs = bt_serv->HitToTrackIDEs(hit);
862  for(size_t l = 0; l < TrackIDs.size(); ++l){
863  if(TrackIDs[l].trackID==TrackID) totenergy += TrackIDs[l].energy;
864  }
865  }
866  Ecomplet = partial_E/totenergy;
867 }
const simb::MCParticle * TrackIdToParticle_P(int const &id)
intermediate_table::iterator iterator
const std::vector< sim::TrackIDE > HitToTrackIDEs(recob::Hit const &hit)
std::vector< TrackID > TrackIDs
Detector simulation of raw signals on wires.
void art::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited

Definition at line 101 of file Consumer.cc.

References art::errors::ProductRegistrationFailure.

103 {
104  // Early exits if consumes tracking has been disabled or if the
105  // consumed product is an allowed consumable.
106  if (!moduleContext_)
107  return;
108 
109  if (cet::binary_search_all(consumables_[bt], pi))
110  return;
111 
112  if (requireConsumes_) {
114  "Consumer: an error occurred during validation of a "
115  "retrieved product\n\n")
116  << "The following consumes (or mayConsume) statement is missing from\n"
117  << module_context(moduleDescription_) << ":\n\n"
118  << " " << assemble_consumes_statement(bt, pi) << "\n\n";
119  }
120 
121  missingConsumes_[bt].insert(pi);
122 }
cet::exempt_ptr< ModuleDescription const > moduleDescription_
Definition: Consumer.h:140
bool requireConsumes_
Definition: Consumer.h:137
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
constexpr T pi()
Returns the constant pi (up to 35 decimal digits of precision)
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
ConsumableProductSets missingConsumes_
Definition: Consumer.h:139
bool art::EventObserverBase::wantAllEvents ( ) const
inlineinherited
bool art::EventObserverBase::wantEvent ( Event const &  e)
inlineinherited
std::string art::EDAnalyzer::workerType ( ) const
inlineinherited

Definition at line 109 of file EDAnalyzer.h.

References art::EDAnalyzer::currentContext().

110  {
111  return "WorkerT<EDAnalyzer>";
112  }

Member Data Documentation

detinfo::DetectorProperties const* DUNE::NeutrinoTrackingEff::detprop = lar::providerFrom<detinfo::DetectorPropertiesService>()
private

Definition at line 190 of file NeutrinoTrackingEff_module.cc.

float DUNE::NeutrinoTrackingEff::fFidVolCutX
private

Definition at line 179 of file NeutrinoTrackingEff_module.cc.

Referenced by beginJob().

float DUNE::NeutrinoTrackingEff::fFidVolCutY
private

Definition at line 180 of file NeutrinoTrackingEff_module.cc.

Referenced by beginJob().

float DUNE::NeutrinoTrackingEff::fFidVolCutZ
private

Definition at line 181 of file NeutrinoTrackingEff_module.cc.

Referenced by beginJob().

float DUNE::NeutrinoTrackingEff::fFidVolXmax
private

Definition at line 184 of file NeutrinoTrackingEff_module.cc.

float DUNE::NeutrinoTrackingEff::fFidVolXmin
private

Definition at line 183 of file NeutrinoTrackingEff_module.cc.

float DUNE::NeutrinoTrackingEff::fFidVolYmax
private

Definition at line 186 of file NeutrinoTrackingEff_module.cc.

float DUNE::NeutrinoTrackingEff::fFidVolYmin
private

Definition at line 185 of file NeutrinoTrackingEff_module.cc.

float DUNE::NeutrinoTrackingEff::fFidVolZmax
private

Definition at line 188 of file NeutrinoTrackingEff_module.cc.

float DUNE::NeutrinoTrackingEff::fFidVolZmin
private

Definition at line 187 of file NeutrinoTrackingEff_module.cc.

bool DUNE::NeutrinoTrackingEff::fisNeutrinoInt
private

Definition at line 88 of file NeutrinoTrackingEff_module.cc.

int DUNE::NeutrinoTrackingEff::fLeptonPDGcode
private

Definition at line 85 of file NeutrinoTrackingEff_module.cc.

Referenced by processEff().

double DUNE::NeutrinoTrackingEff::fMaxLeptonP
private

Definition at line 87 of file NeutrinoTrackingEff_module.cc.

double DUNE::NeutrinoTrackingEff::fMaxNeutrinoE
private

Definition at line 86 of file NeutrinoTrackingEff_module.cc.

std::string DUNE::NeutrinoTrackingEff::fMCTruthModuleLabel
private

Definition at line 82 of file NeutrinoTrackingEff_module.cc.

int DUNE::NeutrinoTrackingEff::fNeutrinoPDGcode
private

Definition at line 84 of file NeutrinoTrackingEff_module.cc.

std::string DUNE::NeutrinoTrackingEff::fTrackModuleLabel
private

Definition at line 83 of file NeutrinoTrackingEff_module.cc.

art::ServiceHandle<geo::Geometry> DUNE::NeutrinoTrackingEff::geom
private

Definition at line 194 of file NeutrinoTrackingEff_module.cc.

Referenced by truthLength().

TH1D* DUNE::NeutrinoTrackingEff::h_Ecomplet_kaon
private

Definition at line 164 of file NeutrinoTrackingEff_module.cc.

TH1D* DUNE::NeutrinoTrackingEff::h_Ecomplet_lepton
private

Definition at line 124 of file NeutrinoTrackingEff_module.cc.

TH1D* DUNE::NeutrinoTrackingEff::h_Ecomplet_michel
private

Definition at line 167 of file NeutrinoTrackingEff_module.cc.

TH1D* DUNE::NeutrinoTrackingEff::h_Ecomplet_pion_minus
private

Definition at line 130 of file NeutrinoTrackingEff_module.cc.

TH1D* DUNE::NeutrinoTrackingEff::h_Ecomplet_pion_plus
private

Definition at line 128 of file NeutrinoTrackingEff_module.cc.

TH1D* DUNE::NeutrinoTrackingEff::h_Ecomplet_proton
private

Definition at line 126 of file NeutrinoTrackingEff_module.cc.

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

Definition at line 145 of file NeutrinoTrackingEff_module.cc.

TEfficiency* DUNE::NeutrinoTrackingEff::h_Eff_Lkaon = 0
private

Definition at line 175 of file NeutrinoTrackingEff_module.cc.

TEfficiency* DUNE::NeutrinoTrackingEff::h_Eff_Lmichel =0
private

Definition at line 176 of file NeutrinoTrackingEff_module.cc.

TEfficiency* DUNE::NeutrinoTrackingEff::h_Eff_Lmuon = 0
private

Definition at line 152 of file NeutrinoTrackingEff_module.cc.

TEfficiency* DUNE::NeutrinoTrackingEff::h_Eff_Lpion_minus = 0
private

Definition at line 155 of file NeutrinoTrackingEff_module.cc.

TEfficiency* DUNE::NeutrinoTrackingEff::h_Eff_Lpion_plus = 0
private

Definition at line 154 of file NeutrinoTrackingEff_module.cc.

TEfficiency* DUNE::NeutrinoTrackingEff::h_Eff_Lproton = 0
private

Definition at line 153 of file NeutrinoTrackingEff_module.cc.

TEfficiency* DUNE::NeutrinoTrackingEff::h_Eff_Pkaon =0
private

Definition at line 173 of file NeutrinoTrackingEff_module.cc.

TEfficiency* DUNE::NeutrinoTrackingEff::h_Eff_Pmichel =0
private

Definition at line 174 of file NeutrinoTrackingEff_module.cc.

TEfficiency* DUNE::NeutrinoTrackingEff::h_Eff_Pmu = 0
private

Definition at line 146 of file NeutrinoTrackingEff_module.cc.

TEfficiency* DUNE::NeutrinoTrackingEff::h_Eff_Ppion_minus = 0
private

Definition at line 150 of file NeutrinoTrackingEff_module.cc.

TEfficiency* DUNE::NeutrinoTrackingEff::h_Eff_Ppion_plus = 0
private

Definition at line 149 of file NeutrinoTrackingEff_module.cc.

TEfficiency* DUNE::NeutrinoTrackingEff::h_Eff_Pproton = 0
private

Definition at line 148 of file NeutrinoTrackingEff_module.cc.

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

Definition at line 147 of file NeutrinoTrackingEff_module.cc.

TH1D* DUNE::NeutrinoTrackingEff::h_Efrac_kaon
private

Definition at line 163 of file NeutrinoTrackingEff_module.cc.

TH1D* DUNE::NeutrinoTrackingEff::h_Efrac_lepton
private

Definition at line 123 of file NeutrinoTrackingEff_module.cc.

TH1D* DUNE::NeutrinoTrackingEff::h_Efrac_michel
private

Definition at line 166 of file NeutrinoTrackingEff_module.cc.

TH1D* DUNE::NeutrinoTrackingEff::h_Efrac_pion_minus
private

Definition at line 129 of file NeutrinoTrackingEff_module.cc.

TH1D* DUNE::NeutrinoTrackingEff::h_Efrac_pion_plus
private

Definition at line 127 of file NeutrinoTrackingEff_module.cc.

TH1D* DUNE::NeutrinoTrackingEff::h_Efrac_proton
private

Definition at line 125 of file NeutrinoTrackingEff_module.cc.

TH1D* DUNE::NeutrinoTrackingEff::h_Ev_den
private

Definition at line 110 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_Ev_num
private

Definition at line 111 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_kaon_length
private

Definition at line 169 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_kaonwtrk_length
private

Definition at line 171 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_michel_length
private

Definition at line 170 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_michelwtrk_length
private

Definition at line 172 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_muon_length
private

Definition at line 136 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_muonwtrk_length
private

Definition at line 140 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_pionm_length
private

Definition at line 139 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_pionmwtrk_length
private

Definition at line 143 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_pionp_length
private

Definition at line 138 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_pionpwtrk_length
private

Definition at line 142 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_Pkaon_den
private

Definition at line 159 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_Pkaon_num
private

Definition at line 160 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_Pmichel_e_den
private

Definition at line 161 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_Pmichel_e_num
private

Definition at line 162 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_Pmu_den
private

Definition at line 112 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_Pmu_num
private

Definition at line 113 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_Ppion_minus_den
private

Definition at line 120 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_Ppion_minus_num
private

Definition at line 121 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_Ppion_plus_den
private

Definition at line 118 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_Ppion_plus_num
private

Definition at line 119 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_Pproton_den
private

Definition at line 116 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_Pproton_num
private

Definition at line 117 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_proton_length
private

Definition at line 137 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_protonwtrk_length
private

Definition at line 141 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_theta_den
private

Definition at line 114 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_theta_num
private

Definition at line 115 of file NeutrinoTrackingEff_module.cc.

Referenced by doEfficiencies().

TH1D* DUNE::NeutrinoTrackingEff::h_trackRes_kaon
private

Definition at line 165 of file NeutrinoTrackingEff_module.cc.

TH1D* DUNE::NeutrinoTrackingEff::h_trackRes_lepton
private

Definition at line 131 of file NeutrinoTrackingEff_module.cc.

TH1D* DUNE::NeutrinoTrackingEff::h_trackRes_michel
private

Definition at line 168 of file NeutrinoTrackingEff_module.cc.

TH1D* DUNE::NeutrinoTrackingEff::h_trackRes_pion_minus
private

Definition at line 134 of file NeutrinoTrackingEff_module.cc.

TH1D* DUNE::NeutrinoTrackingEff::h_trackRes_pion_plus
private

Definition at line 133 of file NeutrinoTrackingEff_module.cc.

TH1D* DUNE::NeutrinoTrackingEff::h_trackRes_proton
private

Definition at line 132 of file NeutrinoTrackingEff_module.cc.

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

Definition at line 92 of file NeutrinoTrackingEff_module.cc.

int DUNE::NeutrinoTrackingEff::MC_incoming_PDG
private

Definition at line 91 of file NeutrinoTrackingEff_module.cc.

int DUNE::NeutrinoTrackingEff::MC_isCC
private

Definition at line 90 of file NeutrinoTrackingEff_module.cc.

int DUNE::NeutrinoTrackingEff::MC_kaonID
private

Definition at line 100 of file NeutrinoTrackingEff_module.cc.

Referenced by processEff().

double DUNE::NeutrinoTrackingEff::MC_kaonP
private

Definition at line 107 of file NeutrinoTrackingEff_module.cc.

int DUNE::NeutrinoTrackingEff::MC_leading_PionMinusID
private

Definition at line 98 of file NeutrinoTrackingEff_module.cc.

Referenced by processEff().

double DUNE::NeutrinoTrackingEff::MC_leading_PionMinusP
private

Definition at line 106 of file NeutrinoTrackingEff_module.cc.

int DUNE::NeutrinoTrackingEff::MC_leading_PionPlusID
private

Definition at line 97 of file NeutrinoTrackingEff_module.cc.

Referenced by processEff().

double DUNE::NeutrinoTrackingEff::MC_leading_PionPlusP
private

Definition at line 104 of file NeutrinoTrackingEff_module.cc.

int DUNE::NeutrinoTrackingEff::MC_leading_protonID
private

Definition at line 96 of file NeutrinoTrackingEff_module.cc.

Referenced by processEff().

double DUNE::NeutrinoTrackingEff::MC_leading_ProtonP
private

Definition at line 105 of file NeutrinoTrackingEff_module.cc.

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

Definition at line 94 of file NeutrinoTrackingEff_module.cc.

int DUNE::NeutrinoTrackingEff::MC_leptonID
private

Definition at line 99 of file NeutrinoTrackingEff_module.cc.

Referenced by processEff().

double DUNE::NeutrinoTrackingEff::MC_leptonP
private

Definition at line 103 of file NeutrinoTrackingEff_module.cc.

int DUNE::NeutrinoTrackingEff::MC_michelID
private

Definition at line 101 of file NeutrinoTrackingEff_module.cc.

Referenced by processEff().

double DUNE::NeutrinoTrackingEff::MC_michelP
private

Definition at line 108 of file NeutrinoTrackingEff_module.cc.

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

Definition at line 93 of file NeutrinoTrackingEff_module.cc.

detinfo::DetectorClocks const* DUNE::NeutrinoTrackingEff::ts = lar::providerFrom<detinfo::DetectorClocksService>()
private

Definition at line 191 of file NeutrinoTrackingEff_module.cc.

double DUNE::NeutrinoTrackingEff::WindowSize = detprop->NumberTimeSamples() * ts->TPCClock().TickPeriod() * 1e3
private

Definition at line 193 of file NeutrinoTrackingEff_module.cc.

Referenced by truthLength().

double DUNE::NeutrinoTrackingEff::XDriftVelocity = detprop->DriftVelocity()*1e-3
private

Definition at line 192 of file NeutrinoTrackingEff_module.cc.

Referenced by truthLength().


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