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

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 MuonTrackingEff (fhicl::ParameterSet const &pset)
 
virtual ~MuonTrackingEff ()
 
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 >> AllHits, std::vector< art::Ptr< recob::Hit >> track_hits, const simb::MCParticle *&MCparticle, double &Purity, double &Completeness, double &TotalRecoEnergy)
 
void FuncDistanceAndAngleBetweenTracks (art::Ptr< recob::Track > Track1, art::Ptr< recob::Track > Track2, double &TempDistanceBetweenTracks, double &TempAngleBetweenTracks, double &TempCriteriaTwoTracks)
 
void FuncDistanceAndAngleBetweenTruthAndRecoTrack (const simb::MCParticle *&MCparticle, art::Ptr< recob::Track > Track, double &TempDistanceBetweenTruthAndRecoTrack, double &TempAngleBeetweenTruthAndRecoTrack)
 
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 fMuonPDGCode
 
double MCTruthMuonVertex [4]
 
int MCTruthMuonID
 
double MCTruthMuonMomentum
 
double MCTruthMuonThetaXZ =0
 
double MCTruthMuonThetaYZ =0
 
int EventCounter =0
 
int CountMCTruthMuon =0
 
int CountRecoMuon =0
 
int CountGoodLeadingMuonTrack =0
 
int CountNoRecoTracks =0
 
int CountNoMuonTracks =0
 
int CountBadLeadingMuonTrack =0
 
int CountCompleteness =0
 
int CountPurity =0
 
int CountTrackLengthTooShort =0
 
int CountTrackLengthTooLong =0
 
int CountBadLeadingMuonTrackAndOnlyOneMuonTrack =0
 
int CountBadLeadingMuonTrackButLeadingPlusSecondGood =0
 
int CountBadLeadingMuonTrackAndLeadingPlusSecondBad =0
 
int CountBadLeadingMuonTrackAndLeadingPlusSecondBadCompleteness =0
 
int CountBadLeadingMuonTrackAndLeadingPlusSecondBadPurity =0
 
int CountBadLeadingMuonTrackAndLeadingPlusSecondBadTrackTooShort =0
 
int CountBadLeadingMuonTrackAndLeadingPlusSecondBadTrackTooLong =0
 
int CountBadLeadingMuonTrackAndOnlyOneMuonTrackCompleteness =0
 
int CountBadLeadingMuonTrackAndOnlyOneMuonTrackPurity =0
 
int CountBadLeadingMuonTrackAndOnlyOneMuonTrackTrackTooShort =0
 
int CountBadLeadingMuonTrackAndOnlyOneMuonTrackTrackTooLong =0
 
double Criteria
 
int GoodEvents1MuonTrack =0
 
int GoodEvents2MuonTrack =0
 
int GoodEvents3MuonTrack =0
 
int GoodEvents4OrMoreMuonTrack =0
 
int BadEvents0MuonTrack =0
 
int BadEvents1MuonTrack =0
 
int BadEvents2MuonTrack =0
 
int BadEvents3MuonTrack =0
 
int BadEvents4OrMoreMuonTrack =0
 
TH1D * h_Purity
 
TH1D * h_Completeness
 
TH1D * h_TrackRes
 
TH1D * h_TotalRecoEnergy
 
TH1D * h_TruthLength
 
TH1D * h_VertexRes
 
TH1D * h_DirectionRes
 
TH1D * h_Efficiency_ThetaXZ
 
TH1D * h_ThetaXZ_den
 
TH1D * h_ThetaXZ_num
 
TH1D * h_Efficiency_ThetaYZ
 
TH1D * h_ThetaYZ_den
 
TH1D * h_ThetaYZ_num
 
TH1D * h_Efficiency_SinThetaYZ
 
TH1D * h_SinThetaYZ_den
 
TH1D * h_SinThetaYZ_num
 
TH2D * h_Efficiency_ThetaXZ_ThetaYZ
 
TH2D * h_ThetaXZ_ThetaYZ_den
 
TH2D * h_ThetaXZ_ThetaYZ_num
 
TH2D * h_FailedReconstruction_ThetaXZ_ThetaYZ
 
TH2D * h_Efficiency_ThetaXZ_SinThetaYZ
 
TH2D * h_ThetaXZ_SinThetaYZ_den
 
TH2D * h_ThetaXZ_SinThetaYZ_num
 
TH2D * h_FailedReconstruction_ThetaXZ_SinThetaYZ
 
TH2D * h_Efficiency_ThetaXZ_ThetaYZ_LeadingPlusSecond
 
TH2D * h_ThetaXZ_ThetaYZ_LeadingPlusSecondOk
 
TH2D * h_ThetaXZ_ThetaYZ_LeadingPlusSecondOk_num
 
TH2D * h_Efficiency_ThetaXZ_ThetaYZ_DifferenceLeadingAndLeadingPlusSecond
 
TH2D * h_Efficiency_ThetaXZ_SinThetaYZ_LeadingPlusSecond
 
TH2D * h_ThetaXZ_SinThetaYZ_LeadingPlusSecondOk
 
TH2D * h_ThetaXZ_SinThetaYZ_LeadingPlusSecondOk_num
 
TH2D * h_NoRecoTrackAtAll_ThetaXZ_SinThetaYZ
 
TH2D * h_NoMuonTrack_ThetaXZ_SinThetaYZ
 
TH2D * h_TrackTooShort_ThetaXZ_SinThetaYZ
 
TH2D * h_TrackTooLong_ThetaXZ_SinThetaYZ
 
TH2D * h_Completeness_ThetaXZ_SinThetaYZ
 
TH2D * h_Purity_ThetaXZ_SinThetaYZ
 
TH2D * h_Criteria_NRecoTrack
 
TH2D * h_Criteria_NRecoTrack_den
 
TH2D * h_Criteria_NRecoTrack_num
 
TH2D * h_Criteria_NMuonTrack
 
TH2D * h_Criteria_NMuonTrack_den
 
TH2D * h_Criteria_NMuonTrack_num
 
TH2D * h_NoMuonTrack_MaxTrackLength_PDGCode
 
TH2D * h_MuonTrackStitching_TrackRes_Completeness
 
TH2D * h_MuonTrackStitching_TrackResLeading_TrackResSecond
 
TH2D * h_MuonTrackStitching_Distance_Angle
 
TH2D * h_MuonTrackStitching_TrackResSecondMuon_Angle
 
TH2D * h_MuonTrackStitching_CompletenessSecondMuon_Angle
 
TH2D * h_MuonTrackStitching_CriteriaTwoTracks_Angle
 
TH2D * h_MuonTrackStitching_FailedCriteria_TrackRes_Completeness
 
TH2D * h_MuonTrackStitching_FailedCriteria_TrackResLeading_TrackResSecond
 
TH2D * h_MuonTrackStitching_FailedCriteria_CompletenessLeading_CompletenessSecond
 
TH2D * h_MuonTrackStitching_FailedCriteria_Distance_Angle
 
TH2D * h_MuonTrackStitching_FailedCriteria_TrackResSecondMuon_Angle
 
TH2D * h_MuonTrackStitching_FailedCriteria_CompletenessSecondMuon_Angle
 
TH2D * h_MuonTrackStitching_FailedCriteria_CriteriaTwoTracks_Angle
 
TH2D * h_MuonTrackStitching_MatchedCriteria_TrackRes_Completeness
 
TH2D * h_MuonTrackStitching_MatchedCriteria_TrackResLeading_TrackResSecond
 
TH2D * h_MuonTrackStitching_MatchedCriteria_Distance_Angle
 
TH2D * h_MuonTrackStitching_MatchedCriteria_CriteriaTwoTracks_Angle
 
TH2D * h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_TrackRes_Completeness
 
TH2D * h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_TrackResLeading_TrackResSecond
 
TH2D * h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_Distance_Angle
 
TH2D * h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_TrackRes_Completeness
 
TH2D * h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_TrackResLeading_TrackResSecond
 
TH2D * h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_Distance_Angle
 
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
 
int NThetaXZBins =36
 
int ThetaXZBinMin =0
 
int ThetaXZBinMax =360
 
int NThetaYZBins =18
 
int ThetaYZBinMin =-90
 
int ThetaYZBinMax =90
 
int NSinThetaYZBins =18
 
int SinThetaYZBinMin =-1
 
int SinThetaYZBinMax =1
 
int NCriteriaBins =13
 
double CriteriaBinMin =-0.25
 
double CriteriaBinMax =6.25
 
int NRecoTracksBins =19
 
double RecoTracksBinMin =-0.25
 
double RecoTracksBinMax =9.25
 

Detailed Description

Definition at line 63 of file MuonTrackingEff_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::MuonTrackingEff::MuonTrackingEff ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 303 of file MuonTrackingEff_module.cc.

References reconfigure().

304  : EDAnalyzer(parameterSet)
305 {
306  reconfigure(parameterSet);
307 }
void reconfigure(fhicl::ParameterSet const &pset)
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
DUNE::MuonTrackingEff::~MuonTrackingEff ( )
virtual

Definition at line 309 of file MuonTrackingEff_module.cc.

309  {
310  //destructor
311 }

Member Function Documentation

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

Definition at line 606 of file MuonTrackingEff_module.cc.

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

606  {
607  if (event.isRealData()) return;
608 
609  bool isFiducial = false;
610  processEff(event, isFiducial);
611 }
void processEff(const art::Event &evt, bool &isFiducial)
Event finding and building.
void DUNE::MuonTrackingEff::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 323 of file MuonTrackingEff_module.cc.

References CriteriaBinMax, CriteriaBinMin, fFidVolCutX, fFidVolCutY, fFidVolCutZ, geo::TPCGeo::LocalToWorld(), art::TFileDirectory::make(), NCriteriaBins, NRecoTracksBins, NSinThetaYZBins, NThetaXZBins, NThetaYZBins, RecoTracksBinMax, RecoTracksBinMin, SinThetaYZBinMax, SinThetaYZBinMin, ThetaXZBinMax, ThetaXZBinMin, ThetaYZBinMax, and ThetaYZBinMin.

323  {
324  std::cout<<"job begin..."<<std::endl;
325  // Get geometry.
326  auto const* geo = lar::providerFrom<geo::Geometry>();
327  // Define histogram boundaries (cm).
328  // For now only draw cryostat=0.
329  double minx = 1e9;
330  double maxx = -1e9;
331  double miny = 1e9;
332  double maxy = -1e9;
333  double minz = 1e9;
334  double maxz = -1e9;
335  for (size_t i = 0; i<geo->NTPC(); ++i){
336  double local[3] = {0.,0.,0.};
337  double world[3] = {0.,0.,0.};
338  const geo::TPCGeo &tpc = geo->TPC(i);
339  tpc.LocalToWorld(local,world);
340  if (minx>world[0]-geo->DetHalfWidth(i))
341  minx = world[0]-geo->DetHalfWidth(i);
342  if (maxx<world[0]+geo->DetHalfWidth(i))
343  maxx = world[0]+geo->DetHalfWidth(i);
344  if (miny>world[1]-geo->DetHalfHeight(i))
345  miny = world[1]-geo->DetHalfHeight(i);
346  if (maxy<world[1]+geo->DetHalfHeight(i))
347  maxy = world[1]+geo->DetHalfHeight(i);
348  if (minz>world[2]-geo->DetLength(i)/2.)
349  minz = world[2]-geo->DetLength(i)/2.;
350  if (maxz<world[2]+geo->DetLength(i)/2.)
351  maxz = world[2]+geo->DetLength(i)/2.;
352  }
353 
354  fFidVolXmin = minx + fFidVolCutX;
355  fFidVolXmax = maxx - fFidVolCutX;
356  fFidVolYmin = miny + fFidVolCutY;
357  fFidVolYmax = maxy - fFidVolCutY;
358  fFidVolZmin = minz + fFidVolCutZ;
359  fFidVolZmax = maxz - fFidVolCutZ;
360 
361  std::cout<<"Fiducial volume:"<<"\n"
362  <<fFidVolXmin<<"\t< x <\t"<<fFidVolXmax<<"\n"
363  <<fFidVolYmin<<"\t< y <\t"<<fFidVolYmax<<"\n"
364  <<fFidVolZmin<<"\t< z <\t"<<fFidVolZmax<<"\n";
365 
367 
368  //TH1D's
369  gStyle->SetTitleOffset (1.3,"Y");
370 
371  //Single Criteria and total reco energy
372  h_Purity = tfs->make<TH1D>("h_Purity","All events: Purity vs. # events; Purity; # events",60,0,1.2);
373 
374  h_Completeness = tfs->make<TH1D>("h_Completeness","All events: Completeness vs # events; Completeness; # events",60,0,1.2);
375  h_Completeness->SetLineColor(kBlue);
376 
377  h_TrackRes = tfs->make<TH1D>("h_TrackRes", "All events: L_{reco}/L_{truth} vs. # events; L_{reco}/L_{truth}; # events;",75,0,1.5);
378  h_TrackRes->SetLineColor(kRed);
379 
380  h_TotalRecoEnergy = tfs->make<TH1D>("h_TotalRecoEnergy", "All events: Total reco energy (sum of all hits in all tracks) vs. # events; E_{reco., tot.} [MeV]; # events",100,0,1000);
381 
382  h_TruthLength = tfs->make<TH1D>("h_TruthLength", "All events: truth muon length vs. # events; truth muon length [cm]; # events",100,0,300);
383 
384  h_VertexRes = tfs->make<TH1D>("h_VertexRes", "All events: Vertex residuals vs. # events; #Delta vertex_{truth-teco} [cm]; # events", 300,0,300);
385 
386  h_DirectionRes = tfs->make<TH1D>("h_DirectionRes", "All events: Angular residuals vs. # events; #Delta#theta_{truth-reco} [#circ]; # events", 180,0,180);
387 
388  //Efficiency ThetaXZ
389  h_Efficiency_ThetaXZ = tfs->make<TH1D>("h_Efficiency_ThetaXZ","Muon reco efficiency vs. #theta_{XZ}; #theta_{XZ} [#circ]; Efficiency",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax);
390  h_ThetaXZ_den = tfs->make<TH1D>("h_ThetaXZ_den","# generated muons vs. #theta_{XZ}; #theta_{XZ} [#circ]; # generated muons",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax);
391  h_ThetaXZ_num = tfs->make<TH1D>("h_ThetaXZ_num","# reconstructed muons vs. #theta_{XZ}; #theta_{XZ} [#circ]; # reconstructed muons",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax);
392 
393  //Efficiency ThetaYZ
394  h_Efficiency_ThetaYZ = tfs->make<TH1D>("h_Efficiency_ThetaYZ","Muon reco efficiency vs. #theta_{YZ}; #theta_{YZ} [#circ]; Muon reco efficiency",NThetaYZBins,ThetaYZBinMin,ThetaYZBinMax);;
395  h_ThetaYZ_den = tfs->make<TH1D>("h_ThetaYZ_den","# generated muons vs. #theta_{YZ}; #theta_{YZ} [#circ]; # generated muons",NThetaYZBins,ThetaYZBinMin,ThetaYZBinMax);
396  h_ThetaYZ_num = tfs->make<TH1D>("h_ThetaYZ_num","# reconstructed muons vs. #theta_{YZ}; #theta_{YZ} [#circ]; # reconstructed muons",NThetaYZBins,ThetaYZBinMin,ThetaYZBinMax);
397 
398  //Efficiency SinThetaYZ
399  h_Efficiency_SinThetaYZ = tfs->make<TH1D>("h_Efficiency_SinThetaYZ","Muon reco efficiency vs. sin(#theta_{YZ}); sin(#theta_{YZ}); Muon reco efficiency",NSinThetaYZBins,SinThetaYZBinMin,SinThetaYZBinMax);;
400  h_SinThetaYZ_den = tfs->make<TH1D>("h_SinThetaYZ_den","# generated muons vs. sin(#theta_{YZ}); sin(#theta_{YZ}); # generated muons",NSinThetaYZBins,SinThetaYZBinMin,SinThetaYZBinMax);
401  h_SinThetaYZ_num = tfs->make<TH1D>("h_SinThetaYZ_num","# reconstructed muons vs. sin(#theta_{YZ}); sin(#theta_{YZ}); # reconstructed muons",NSinThetaYZBins,SinThetaYZBinMin,SinThetaYZBinMax);
402 
403  h_Purity->Sumw2();
404  h_Completeness->Sumw2();
405  h_TrackRes->Sumw2();
406  h_TotalRecoEnergy->Sumw2();
407  h_TruthLength->Sumw2();
408  h_VertexRes->Sumw2();
409  h_DirectionRes->Sumw2();
410 
411  h_Efficiency_SinThetaYZ->Sumw2();
412  h_SinThetaYZ_den->Sumw2();
413  h_SinThetaYZ_num->Sumw2();
414 
415  h_Efficiency_ThetaXZ->Sumw2();
416  h_ThetaXZ_den->Sumw2();
417  h_ThetaXZ_num->Sumw2();
418 
419  h_Efficiency_ThetaYZ->Sumw2();
420  h_ThetaYZ_den->Sumw2();
421  h_ThetaYZ_num->Sumw2();
422 
423 
424  //TH2D's
425  //Efficiency and Failed Reconstruction ThetaXZ vs. ThetaYZ
426  h_Efficiency_ThetaXZ_ThetaYZ = tfs->make<TH2D>("h_Efficiency_ThetaXZ_ThetaYZ","Muon reco efficiency: #theta_{XZ} vs. #theta_{YZ}; #theta_{XZ} [#circ]; #theta_{YZ} [#circ]",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NThetaYZBins,ThetaYZBinMin,ThetaYZBinMax);
427  h_Efficiency_ThetaXZ_ThetaYZ->SetOption("colz");
428 
429  h_ThetaXZ_ThetaYZ_den = tfs->make<TH2D>("h_ThetaXZ_ThetaYZ_den","# generated muons: #theta_{XZ} vs. #theta_{YZ}; #theta_{XZ} [#circ]; #theta_{YZ} [#circ]",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NThetaYZBins,ThetaYZBinMin,ThetaYZBinMax);
430  h_ThetaXZ_ThetaYZ_den->SetOption("colz");
431 
432  h_ThetaXZ_ThetaYZ_num = tfs->make<TH2D>("h_ThetaXZ_ThetaYZ_num","# reconstructed muons: #theta_{XZ} vs. #theta_{YZ}; #theta_{XZ} [#circ]; #theta_{YZ} [#circ]",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NThetaYZBins,ThetaYZBinMin,ThetaYZBinMax);
433  h_ThetaXZ_ThetaYZ_num->SetOption("colz");
434 
435  h_FailedReconstruction_ThetaXZ_ThetaYZ = tfs->make<TH2D>("h_FailedReconstruction_ThetaXZ_ThetaYZ","# failed reconstructions: #theta_{XZ} vs. #theta_{YZ}; #theta_{XZ} [#circ]; #theta_{YZ} [#circ]",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NThetaYZBins,ThetaYZBinMin,ThetaYZBinMax);
436  h_FailedReconstruction_ThetaXZ_ThetaYZ->SetOption("colz");
437 
438  //Efficiency and Failed Reconstruction ThetaXZ vs. SinThetaYZ
439  h_Efficiency_ThetaXZ_SinThetaYZ = tfs->make<TH2D>("h_Efficiency_ThetaXZ_SinThetaYZ","Muon reco efficiency: #theta_{XZ} vs. sin(#theta_{YZ}); #theta_{XZ} [#circ]; sin(#theta_{YZ})",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NSinThetaYZBins,SinThetaYZBinMin,SinThetaYZBinMax);
440  h_Efficiency_ThetaXZ_SinThetaYZ->SetOption("colz");
441 
442  h_ThetaXZ_SinThetaYZ_den = tfs->make<TH2D>("h_ThetaXZ_SinThetaYZ_den","# generated muons: #theta_{XZ} vs. sin(#theta_{YZ}); #theta_{XZ} [#circ]; sin(#theta_{YZ})",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NSinThetaYZBins,SinThetaYZBinMin,SinThetaYZBinMax);
443  h_ThetaXZ_SinThetaYZ_den->SetOption("colz");
444 
445  h_ThetaXZ_SinThetaYZ_num = tfs->make<TH2D>("h_ThetaXZ_SinThetaYZ_num","# reconstructed muons: #theta_{XZ} vs. sin(#theta_{YZ}); #theta_{XZ} [#circ]; sin(#theta_{YZ}); #theta_{XZ} [#circ]; sin(#theta_{YZ})",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NSinThetaYZBins,SinThetaYZBinMin,SinThetaYZBinMax);
446  h_ThetaXZ_SinThetaYZ_num->SetOption("colz");
447 
448  h_FailedReconstruction_ThetaXZ_SinThetaYZ = tfs->make<TH2D>("h_FailedReconstruction_ThetaXZ_SinThetaYZ","# failed reconstructions: #theta_{XZ} vs. sin(#theta_{YZ}); #theta_{XZ} [#circ]; sin(#theta_{YZ})",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NSinThetaYZBins,SinThetaYZBinMin,SinThetaYZBinMax);
450 
451  //Efficiency ThetaXZ vs. ThetaYZ after summing up leading plus second
452  h_Efficiency_ThetaXZ_ThetaYZ_LeadingPlusSecond = tfs->make<TH2D>("h_Efficiency_ThetaXZ_ThetaYZ_LeadingPlusSecond","Muon reco efficiency after stitching: #theta_{XZ} vs. #theta_{YZ}; #theta_{XZ} [#circ]; #theta_{YZ} [#circ]",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NThetaYZBins,ThetaYZBinMin,ThetaYZBinMax);
454 
455  h_ThetaXZ_ThetaYZ_LeadingPlusSecondOk = tfs->make<TH2D>("h_ThetaXZ_ThetaYZ_LeadingPlusSecondOk","# reconstructed muons after stitching (failed before stitching): #theta_{XZ} vs #theta_{YZ}; #theta_{XZ} [#circ]; #theta_{YZ} [#circ]",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NThetaYZBins,ThetaYZBinMin,ThetaYZBinMax);
456  h_ThetaXZ_ThetaYZ_LeadingPlusSecondOk->SetOption("colz");
457 
458  h_ThetaXZ_ThetaYZ_LeadingPlusSecondOk_num = tfs->make<TH2D>("h_ThetaXZ_ThetaYZ_LeadingPlusSecondOk_num","# reconstructed muons after stitching: #theta_{XZ} vs. #theta_{YZ}; #theta_{XZ} [#circ]; #theta_{YZ} [#circ]",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NThetaYZBins,ThetaYZBinMin,ThetaYZBinMax);
460 
461  //Efficiency ThetaXZ vs. SinThetaYZ after summing up leading plus second
462  h_Efficiency_ThetaXZ_SinThetaYZ_LeadingPlusSecond = tfs->make<TH2D>("h_Efficiency_ThetaXZ_SinThetaYZ_LeadingPlusSecond","Muon reco efficiency after stitching: #theta_{XZ} vs. sin(#theta_{YZ}); #theta_{XZ} [#circ]; sin(#theta_{YZ})",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NSinThetaYZBins,SinThetaYZBinMin,SinThetaYZBinMax);
464 
465  h_ThetaXZ_SinThetaYZ_LeadingPlusSecondOk = tfs->make<TH2D>("h_ThetaXZ_SinThetaYZ_LeadingPlusSecondOk","# reconstructed muons after stitching (failed before stitching): #theta_{XZ} vs. sin(#theta_{YZ}); #theta_{XZ} [#circ]; sin(#theta_{YZ})",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NSinThetaYZBins,SinThetaYZBinMin,SinThetaYZBinMax);
466  h_ThetaXZ_SinThetaYZ_LeadingPlusSecondOk->SetOption("colz");
467 
468  h_ThetaXZ_SinThetaYZ_LeadingPlusSecondOk_num = tfs->make<TH2D>("h_ThetaXZ_SinThetaYZ_LeadingPlusSecondOk_num","# reconstructed muons after stitching: #theta_{XZ} vs. sin(#theta_{YZ}); #theta_{XZ} [#circ]; sin(#theta_{YZ})",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NSinThetaYZBins,SinThetaYZBinMin,SinThetaYZBinMax);
470 
471  //Difference in efficiency before and after summing up leading plus second: ThetaXZ vs. ThetaYZ
472  h_Efficiency_ThetaXZ_ThetaYZ_DifferenceLeadingAndLeadingPlusSecond = tfs->make<TH2D>("h_Efficiency_ThetaXZ_ThetaYZ_DifferenceLeadingAndLeadingPlusSecond","Muon reco efficiency: difference before and after stitching: #theta_{XZ} vs. #theta_{YZ}; #theta_{XZ} [#circ]; #theta_{YZ} [#circ]",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NThetaYZBins,ThetaYZBinMin,ThetaYZBinMax);
474 
475  //Failed Criteria
476  h_NoRecoTrackAtAll_ThetaXZ_SinThetaYZ = tfs->make<TH2D>("h_NoRecoTrackAtAll_ThetaXZ_SinThetaYZ","# events with no reco track at all: #theta_{XZ} vs. sin(#theta_{YZ}); #theta_{XZ} [#circ]; sin(#theta_{YZ})",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NSinThetaYZBins,SinThetaYZBinMin,SinThetaYZBinMax);
477  h_NoRecoTrackAtAll_ThetaXZ_SinThetaYZ->SetOption("colz");
478 
479  h_NoMuonTrack_ThetaXZ_SinThetaYZ = tfs->make<TH2D>("h_NoMuonTrack_ThetaXZ_SinThetaYZ","# events with no muon track: #theta_{XZ} vs. sin(#theta_{YZ}); #theta_{XZ} [#circ]; sin(#theta_{YZ})",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NSinThetaYZBins,SinThetaYZBinMin,SinThetaYZBinMax);
480  h_NoMuonTrack_ThetaXZ_SinThetaYZ->SetOption("colz");
481 
482  h_TrackTooShort_ThetaXZ_SinThetaYZ = tfs->make<TH2D>("h_TrackTooShort_ThetaXZ_SinThetaYZ","# events with L_{reco}/L_{truth} < 75%: #theta_{XZ} vs. sin(#theta_{YZ}); #theta_{XZ} [#circ]; sin(#theta_{YZ})",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NSinThetaYZBins,SinThetaYZBinMin,SinThetaYZBinMax);
483  h_TrackTooShort_ThetaXZ_SinThetaYZ->SetOption("colz");
484 
485  h_TrackTooLong_ThetaXZ_SinThetaYZ = tfs->make<TH2D>("h_TrackTooLong_ThetaXZ_SinThetaYZ","#events with L_{reco}/L_{truth} > 125%: #theta_{XZ} vs. sin(#theta_{YZ}); #theta_{XZ} [#circ]; sin(#theta_{YZ})",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NSinThetaYZBins,SinThetaYZBinMin,SinThetaYZBinMax);
486  h_TrackTooLong_ThetaXZ_SinThetaYZ->SetOption("colz");
487 
488  h_Completeness_ThetaXZ_SinThetaYZ = tfs->make<TH2D>("h_Completeness_ThetaXZ_SinThetaYZ","# events with Completeness < 50%: #theta_{XZ} vs. sin(#theta_{YZ}); #theta_{XZ} [#circ]; sin(#theta_{YZ})",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NSinThetaYZBins,SinThetaYZBinMin,SinThetaYZBinMax);
489  h_Completeness_ThetaXZ_SinThetaYZ->SetOption("colz");
490 
491  h_Purity_ThetaXZ_SinThetaYZ = tfs->make<TH2D>("h_Purity_ThetaXZ_SinThetaYZ","# events with Purity < 50%: #theta_{XZ} vs. sin(#theta_{YZ}); #theta_{XZ} [#circ]; sin(#theta_{YZ})",NThetaXZBins,ThetaXZBinMin,ThetaXZBinMax,NSinThetaYZBins,SinThetaYZBinMin,SinThetaYZBinMax);
492  h_Purity_ThetaXZ_SinThetaYZ->SetOption("colz");
493 
494  //Criteria vs. NRecoTrack
495  h_Criteria_NRecoTrack = tfs->make<TH2D>("h_Criteria_NRecoTrack","Ratio: criteria vs. # reco tracks; Criteria; # reco tracks",NCriteriaBins,CriteriaBinMin,CriteriaBinMax,NRecoTracksBins,RecoTracksBinMin,RecoTracksBinMax);
496  h_Criteria_NRecoTrack->SetOption("colz");
497 
498  h_Criteria_NRecoTrack_num = tfs->make<TH2D>("h_Criteria_NRecoTrack_num","# events: criteria vs. # reco tracks; Criteria; # reco tracks",NCriteriaBins,CriteriaBinMin,CriteriaBinMax,NRecoTracksBins,RecoTracksBinMin,RecoTracksBinMax);
499  h_Criteria_NRecoTrack_num->SetOption("colz");
500 
501  h_Criteria_NRecoTrack_den = tfs->make<TH2D>("h_Criteria_NRecoTrack_den","Divider histogram; Criteria; # reco tracks",NCriteriaBins,CriteriaBinMin,CriteriaBinMax,NRecoTracksBins,RecoTracksBinMin,RecoTracksBinMax);
502  h_Criteria_NRecoTrack_den->SetOption("colz");
503 
504  //Criteria vs. NMuonTrack
505  h_Criteria_NMuonTrack = tfs->make<TH2D>("h_Criteria_NMuonTrack","Ratio: criteria vs. # muon tracks; Criteria; # muon tracks",NCriteriaBins,CriteriaBinMin,CriteriaBinMax,NRecoTracksBins,RecoTracksBinMin,RecoTracksBinMax);
506  h_Criteria_NMuonTrack->SetOption("colz");
507 
508  h_Criteria_NMuonTrack_num = tfs->make<TH2D>("h_Criteria_NMuonTrack_num","# events: criteria vs. # muon tracks; Criteria; # muon tracks",NCriteriaBins,CriteriaBinMin,CriteriaBinMax,NRecoTracksBins,RecoTracksBinMin,RecoTracksBinMax);
509  h_Criteria_NMuonTrack_num->SetOption("colz");
510 
511  h_Criteria_NMuonTrack_den = tfs->make<TH2D>("h_Criteria_NMuonTrack_den","Divider histogram; Criteria; # muon tracks",NCriteriaBins,CriteriaBinMin,CriteriaBinMax,NRecoTracksBins,RecoTracksBinMin,RecoTracksBinMax);
512  h_Criteria_NMuonTrack_den->SetOption("colz");
513 
514  //NoMuonTrack: Max length of no muon track vs. PDG code of that track (MC truth)
515  h_NoMuonTrack_MaxTrackLength_PDGCode = tfs->make<TH2D>("h_NoMuonTrack_MaxTrackLength_PDGCode", "Events with no muon track: L_{reco, max} vs. PDG Code; L_{reco} [cm]; PDG Code",100,0.,200.,200,-100.,100.);
516  h_NoMuonTrack_MaxTrackLength_PDGCode->SetOption("colz");
517 
518  //Stitching variables: all events
519  h_MuonTrackStitching_TrackRes_Completeness = tfs->make<TH2D>("h_MuonTrackStitching_TrackRes_Completeness", "All events: L_{reco}/L_{truth} (leading) vs. Completeness (leading); L_{reco}/L_{truth} (leading); Completeness (leading)",150,0.,1.5,150,0.,1.5);
521 
522  h_MuonTrackStitching_TrackResLeading_TrackResSecond = tfs->make<TH2D>("h_MuonTrackStitching_TrackResLeading_TrackResSecond", "All events: L_{reco}/L_{truth} (leading) vs. L_{reco}/L_{truth} (second); L_{reco}/L_{truth} (leading); L_{reco}/L_{truth} (second)",150,0.,1.5,150,0.,1.5);
524 
525  h_MuonTrackStitching_Distance_Angle = tfs->make<TH2D>("h_MuonTrackStitching_Distance_Angle", "All events: distance vs. angle b/w leading and second muon track; Distance [cm]; Angle [#circ]",100,0.,100.,100,0.,180.);
526  h_MuonTrackStitching_Distance_Angle->SetOption("colz");
527 
528  h_MuonTrackStitching_TrackResSecondMuon_Angle = tfs->make<TH2D>("h_MuonTrackStitching_TrackResSecondMuon_Angle", "All events: L_{reco}/L_{truth} (second) vs. angle; L_{reco}/L_{truth} (second); Angle [#circ]",150,0.,1.5,180,0,180.);
530 
531  h_MuonTrackStitching_CompletenessSecondMuon_Angle = tfs->make<TH2D>("h_MuonTrackStitching_CompletenessSecondMuon_Angle", "All events: Completeness (second) vs. angle; Completeness (second); Angle [#circ]",120,0.,1.2,180,0,180.);
533 
534  h_MuonTrackStitching_CriteriaTwoTracks_Angle = tfs->make<TH2D>("h_MuonTrackStitching_CriteriaTwoTracks_Angle", "All events: CriteriaTwoTracks vs. angle; Criteria; Angle [#circ]",7,0.75,4.25,180,0,180.);
536 
537  //Stitching variables: bad events
538  h_MuonTrackStitching_FailedCriteria_TrackRes_Completeness = tfs->make<TH2D>("h_MuonTrackStitching_FailedCriteria_TrackRes_Completeness", "Bad events: L_{reco}/L_{truth} (leading) vs. Completeness (leading); L_{reco}/L_{truth} (leading); Completeness (leading)",150,0.,1.5,150,0.,1.5);
540 
541  h_MuonTrackStitching_FailedCriteria_Distance_Angle = tfs->make<TH2D>("h_MuonTrackStitching_FailedCriteria_Distance_Angle", "Bad events: distance vs. angle b/w leading and second muon track; Distance [cm]; Angle [#circ]",100,0.,100.,100,0.,180.);
543 
544  h_MuonTrackStitching_FailedCriteria_TrackResLeading_TrackResSecond = tfs->make<TH2D>("h_MuonTrackStitching_FailedCriteria_TrackResLeading_TrackResSecond", "Bad events: L_{reco}/L_{truth} (leading) vs. L_{reco}/L_{truth} (second); L_{reco}/L_{truth} (leading); L_{reco}/L_{truth} (second)",150,0.,1.5,150,0.,1.5);
546 
547  h_MuonTrackStitching_FailedCriteria_CompletenessLeading_CompletenessSecond = tfs->make<TH2D>("*h_MuonTrackStitching_FailedCriteria_CompletenessLeading_CompletenessSecond", "Bad events: Completeness (leading) vs. Completeness (second); Completeness (leading); Completeness (second)",150,0.,1.5,150,0.,1.5);
549 
550  h_MuonTrackStitching_FailedCriteria_TrackResSecondMuon_Angle = tfs->make<TH2D>("h_MuonTrackStitching_FailedCriteria_TrackResSecondMuon_Angle", "Bad events: L_{reco}/L_{truth} (second) vs. angle; L_{reco}/L_{truth} (second); Angle [#circ]",150,0.,1.5,180,0,180.);
552 
553  h_MuonTrackStitching_FailedCriteria_CompletenessSecondMuon_Angle = tfs->make<TH2D>("h_MuonTrackStitching_FailedCriteria_CompletenessSecondMuon_Angle", "Bad events: Completeness (second) vs. angle; Completeness (second); Angle [#circ]",120,0.,1.2,180,0,180.);
555 
556  h_MuonTrackStitching_FailedCriteria_CriteriaTwoTracks_Angle = tfs->make<TH2D>("h_MuonTrackStitching_FailedCriteria_CriteriaTwoTracks_Angle", "Bad events: CriteriaTwoTracks vs. angle; Criteria; Angle [#circ]",7,0.75,4.25,180,0,180.);
558 
559  //Stitching variables: good events
560  h_MuonTrackStitching_MatchedCriteria_TrackRes_Completeness = tfs->make<TH2D>("h_MuonTrackStitching_MatchedCriteria_TrackRes_Completeness", "Good events: L_{reco}/L_{truth} (leading) vs. Completeness (leading); L_{reco}/L_{truth} (leading); Completeness (leading)",150,0.,1.5,150,0.,1.5);
562 
563  h_MuonTrackStitching_MatchedCriteria_Distance_Angle = tfs->make<TH2D>("h_MuonTrackStitching_MatchedCriteria_Distance_Angle", "Good events: distance vs. angle b/w leading and second muon track; Distance [cm]; Angle [#circ]",100,0.,100.,100,0.,180.);
565 
566  h_MuonTrackStitching_MatchedCriteria_TrackResLeading_TrackResSecond = tfs->make<TH2D>("h_MuonTrackStitching_MatchedCriteria_TrackResLeading_TrackResSecond", "Good events: L_{reco}/L_{truth} (leading) vs. L_{reco}/L_{truth} (second); L_{reco}/L_{truth} (leading); L_{reco}/L_{truth} (second)",150,0.,1.5,150,0.,1.5);
568 
569  h_MuonTrackStitching_MatchedCriteria_CriteriaTwoTracks_Angle = tfs->make<TH2D>("h_MuonTrackStitching_MatchedCriteria_CriteriaTwoTracks_Angle", "Good events: CriteriaTwoTracks vs. angle b/w leading and second muon track; Criteria; Angle [#circ]",7,0.75,4.25,100,0.,180.);
571 
572  //Stitching variables: bad events but leading plus second ok
573  h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_TrackRes_Completeness = tfs->make<TH2D>("h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_TrackRes_Completeness", "Bad events but leading + second is good: L_{reco}/L_{truth} (leading) vs. Completeness (leading); L_{reco}/L_{truth} (leading); Completeness (leading)",150,0.,1.5,150,0.,1.5);
575 
576  h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_Distance_Angle = tfs->make<TH2D>("h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_Distance_Angle", "Bad events but leading + second is good: distance vs. angle b/w leading and second muon track; Distance [cm]; Angle [#circ]",100,0.,100.,100,0.,180.);
578 
579  h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_TrackResLeading_TrackResSecond = tfs->make<TH2D>("h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_TrackResLeading_TrackResSecond", "Bad events but leading + second is good: L_{reco}/L_{truth} (leading) vs. L_{reco}/L_{truth} (second); L_{reco}/L_{truth} (leading); L_{reco}/L_{truth} (second)",150,0.,1.5,150,0.,1.5);
581 
582  //Stitching variables: bad events and leading plus second not ok
583  h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_TrackRes_Completeness = tfs->make<TH2D>("h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_TrackRes_Completeness", "Bad events and leading + second is bad: L_{reco}/L_{truth} (leading) vs. Completeness (leading); L_{reco}/L_{truth} (leading); Completeness (leading)",150,0.,1.5,150,0.,1.5);
585 
586  h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_Distance_Angle = tfs->make<TH2D>("h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_Distance_Angle", "Bad events and leading + second is bad: distance vs. angle b/w leading and second muon track; Distance [cm]; Angle [#circ]",100,0.,100.,100,0.,180.);
588 
589  h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_TrackResLeading_TrackResSecond = tfs->make<TH2D>("h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_TrackResLeading_TrackResSecond", "Bad events and leading + second is bad: L_{reco}/L_{truth} (leading) vs. L_{reco}/L_{truth} (second); L_{reco}/L_{truth} (leading); L_{reco}/L_{truth} (second)",150,0.,1.5,150,0.,1.5);
591 
592 
593 
594 }
TH2D * h_MuonTrackStitching_FailedCriteria_CriteriaTwoTracks_Angle
Geometry information for a single TPC.
Definition: TPCGeo.h:37
TH2D * h_MuonTrackStitching_MatchedCriteria_TrackResLeading_TrackResSecond
TH2D * h_Efficiency_ThetaXZ_SinThetaYZ_LeadingPlusSecond
TH2D * h_MuonTrackStitching_FailedCriteria_Distance_Angle
TH2D * h_MuonTrackStitching_MatchedCriteria_TrackRes_Completeness
TH2D * h_MuonTrackStitching_MatchedCriteria_CriteriaTwoTracks_Angle
TH2D * h_MuonTrackStitching_FailedCriteria_CompletenessSecondMuon_Angle
TH2D * h_MuonTrackStitching_FailedCriteria_CompletenessLeading_CompletenessSecond
TH2D * h_MuonTrackStitching_FailedCriteria_TrackRes_Completeness
TH2D * h_MuonTrackStitching_TrackResLeading_TrackResSecond
TH2D * h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_TrackResLeading_TrackResSecond
TH2D * h_Efficiency_ThetaXZ_ThetaYZ_DifferenceLeadingAndLeadingPlusSecond
TH2D * h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_TrackRes_Completeness
TH2D * h_MuonTrackStitching_FailedCriteria_TrackResSecondMuon_Angle
T * make(ARGS...args) const
TH2D * h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_TrackResLeading_TrackResSecond
TH2D * h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_Distance_Angle
TH2D * h_MuonTrackStitching_CompletenessSecondMuon_Angle
TH2D * h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_TrackRes_Completeness
TH2D * h_MuonTrackStitching_FailedCriteria_TrackResLeading_TrackResSecond
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
TH2D * h_MuonTrackStitching_MatchedCriteria_Distance_Angle
TH2D * h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_Distance_Angle
void DUNE::MuonTrackingEff::beginRun ( const art::Run run)

Definition at line 602 of file MuonTrackingEff_module.cc.

602  {
603  mf::LogInfo("MuonTrackingEff")<<"begin run..."<<std::endl;
604 }
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::MuonTrackingEff::doEfficiencies ( )

Definition at line 1160 of file MuonTrackingEff_module.cc.

References CountBadLeadingMuonTrackAndLeadingPlusSecondBad, CountBadLeadingMuonTrackAndLeadingPlusSecondBadCompleteness, CountBadLeadingMuonTrackAndLeadingPlusSecondBadPurity, CountBadLeadingMuonTrackAndLeadingPlusSecondBadTrackTooLong, CountBadLeadingMuonTrackAndLeadingPlusSecondBadTrackTooShort, CountBadLeadingMuonTrackAndOnlyOneMuonTrack, CountBadLeadingMuonTrackButLeadingPlusSecondGood, CountCompleteness, CountGoodLeadingMuonTrack, CountMCTruthMuon, CountNoMuonTracks, CountNoRecoTracks, CountPurity, CountTrackLengthTooLong, CountTrackLengthTooShort, DEFINE_ART_MODULE, NCriteriaBins, and NRecoTracksBins.

Referenced by endJob().

1160  {
1161  std::cout << std::endl;
1162 
1163  std::cout << "EventCounter: " << "\t" << EventCounter << std::endl;
1164 
1165  std::cout << "CountMCTruthMuon: " << "\t" << CountMCTruthMuon << " = " << 100*static_cast<double>(CountMCTruthMuon)/static_cast<double>(EventCounter) <<"%" << std::endl;
1166 
1167  std::cout << "CountGoodLeadingMuonTrack (=good events): " << "\t" << CountGoodLeadingMuonTrack << "/" << CountMCTruthMuon << " = " << 100*static_cast<double>(CountGoodLeadingMuonTrack)/static_cast<double>(CountMCTruthMuon) <<"%" << std::endl;
1168 
1169  std::cout << "CountBadLeadingMuonTrack+CountNoRecoTracks+CountNoMuonTracks (=bad events): " << "\t" << CountBadLeadingMuonTrack+CountNoRecoTracks+CountNoMuonTracks << " = " << 100*static_cast<double>(CountBadLeadingMuonTrack+CountNoRecoTracks+CountNoMuonTracks)/static_cast<double>(CountMCTruthMuon) <<"%" << std::endl;
1170 
1171  std::cout << "CountNoRecoTracks+CountNoMuonTracks: " << "\t" << CountNoRecoTracks+CountNoMuonTracks << " = " << 100*static_cast<double>(CountNoRecoTracks+CountNoMuonTracks)/static_cast<double>(CountMCTruthMuon) <<"%" << std::endl;
1172 
1173  std::cout << "CountTrackLengthTooShort: " << "\t" << CountTrackLengthTooShort << " = " << 100*static_cast<double>(CountTrackLengthTooShort)/static_cast<double>(CountMCTruthMuon) <<"%" << std::endl;
1174 
1175 
1176  std::cout << "CountCompleteness: " << "\t" << CountCompleteness << " = " << 100*static_cast<double>(CountCompleteness)/static_cast<double>(CountMCTruthMuon) <<"%" << std::endl;
1177 
1178  std::cout << "CountTrackLengthTooLong: " << "\t" << CountTrackLengthTooLong << " = " << 100*static_cast<double>(CountTrackLengthTooLong)/static_cast<double>(CountMCTruthMuon) <<"%" << std::endl;
1179 
1180  std::cout << "CountPurity: " << "\t" << CountPurity << " = " << 100*static_cast<double>(CountPurity)/static_cast<double>(CountMCTruthMuon) <<"%" << std::endl;
1181 
1182 
1183  std::cout << std::endl;
1184 
1185  std::cout << "GoodLeadingMuonTrack+CountBadLeadingMuonTrackButLeadingPlusSecondGood (=good events after stitching): " << "\t" << CountGoodLeadingMuonTrack+CountBadLeadingMuonTrackButLeadingPlusSecondGood << "/" << CountMCTruthMuon << " = " << 100*static_cast<double>(CountGoodLeadingMuonTrack+CountBadLeadingMuonTrackButLeadingPlusSecondGood)/static_cast<double>(CountMCTruthMuon) <<"%" << std::endl;
1186 
1187  std::cout << "CountBadLeadingMuonTrack+CountNoRecoTracks+CountNoMuonTracks-CountBadLeadingMuonTrackButLeadingPlusSecondGood (=bad events after stitching) : " << "\t" << CountBadLeadingMuonTrack+CountNoRecoTracks+CountNoMuonTracks-CountBadLeadingMuonTrackButLeadingPlusSecondGood << " = " << 100*static_cast<double>(CountBadLeadingMuonTrack+CountNoRecoTracks+CountNoMuonTracks-CountBadLeadingMuonTrackButLeadingPlusSecondGood)/static_cast<double>(CountMCTruthMuon) <<"%" << std::endl;
1188 
1189  std::cout << std::endl;
1190 
1191  std::cout << "CountBadLeadingMuonTrackButLeadingPlusSecondGood: " << "\t" << CountBadLeadingMuonTrackButLeadingPlusSecondGood << " = " << 100*static_cast<double>(CountBadLeadingMuonTrackButLeadingPlusSecondGood)/static_cast<double>(CountMCTruthMuon) <<"%" << std::endl;
1192 
1193  std::cout << "CountBadLeadingMuonTrackAndOnlyOneMuonTrack: " << "\t" << CountBadLeadingMuonTrackAndOnlyOneMuonTrack << " = " << 100*static_cast<double>(CountBadLeadingMuonTrackAndOnlyOneMuonTrack)/static_cast<double>(CountMCTruthMuon) <<"%" << std::endl;
1194 
1195 
1196  std::cout << "CountBadLeadingMuonTrackAndLeadingPlusSecondBad: " << "\t" << CountBadLeadingMuonTrackAndLeadingPlusSecondBad << " = " << 100*static_cast<double>(CountBadLeadingMuonTrackAndLeadingPlusSecondBad)/static_cast<double>(CountMCTruthMuon) <<"%" << std::endl;
1197 
1198  std::cout << "CountNoRecoTracks: " << "\t" << CountNoRecoTracks << " = " << 100*static_cast<double>(CountNoRecoTracks)/static_cast<double>(CountMCTruthMuon) <<"%" << std::endl;
1199 
1200  std::cout << "CountNoMuonTracks: " << "\t" << CountNoMuonTracks << " = " << 100*static_cast<double>(CountNoMuonTracks)/static_cast<double>(CountMCTruthMuon) <<"%" << std::endl;
1201 
1202  std::cout << std::endl;
1203 
1204  std::cout << "CountBadLeadingMuonTrackAndOnlyOneMuonTrackCompleteness: " << CountBadLeadingMuonTrackAndOnlyOneMuonTrackCompleteness << std::endl;
1205  std::cout << "CountBadLeadingMuonTrackAndOnlyOneMuonTrackPurity: " << CountBadLeadingMuonTrackAndOnlyOneMuonTrackPurity << std::endl;
1206  std::cout << "CountBadLeadingMuonTrackAndOnlyOneMuonTrackTrackTooShort: " << CountBadLeadingMuonTrackAndOnlyOneMuonTrackTrackTooShort << std::endl;
1207  std::cout << "CountBadLeadingMuonTrackAndOnlyOneMuonTrackTrackTooLong: " << CountBadLeadingMuonTrackAndOnlyOneMuonTrackTrackTooLong << std::endl;
1208 
1209  std::cout << std::endl;
1210 
1211  std::cout << "CountBadLeadingMuonTrackAndLeadingPlusSecondBadCompleteness: " << "\t" << CountBadLeadingMuonTrackAndLeadingPlusSecondBadCompleteness << " = " << 100*static_cast<double>(CountBadLeadingMuonTrackAndLeadingPlusSecondBadCompleteness)/static_cast<double>(CountMCTruthMuon) <<"%" << std::endl;
1212 
1213  std::cout << "CountBadLeadingMuonTrackAndLeadingPlusSecondBadPurity: " << "\t" << CountBadLeadingMuonTrackAndLeadingPlusSecondBadPurity << " = " << 100*static_cast<double>(CountBadLeadingMuonTrackAndLeadingPlusSecondBadPurity)/static_cast<double>(CountMCTruthMuon) <<"%" << std::endl;
1214 
1215  std::cout << "CountBadLeadingMuonTrackAndLeadingPlusSecondBadTrackTooShort: " << "\t" << CountBadLeadingMuonTrackAndLeadingPlusSecondBadTrackTooShort << " = " << 100*static_cast<double>(CountBadLeadingMuonTrackAndLeadingPlusSecondBadTrackTooShort)/static_cast<double>(CountMCTruthMuon) <<"%" << std::endl;
1216 
1217  std::cout << "CountBadLeadingMuonTrackAndLeadingPlusSecondBadTrackTooLong: " << "\t" << CountBadLeadingMuonTrackAndLeadingPlusSecondBadTrackTooLong << " = " << 100*static_cast<double>(CountBadLeadingMuonTrackAndLeadingPlusSecondBadTrackTooLong)/static_cast<double>(CountMCTruthMuon) <<"%" << std::endl;
1218 
1219  std::cout << std::endl;
1220 
1221  std::cout << "GoodEvents1MuonTrack: " << GoodEvents1MuonTrack << std::endl;
1222  std::cout << "GoodEvents2MuonTrack: " << GoodEvents2MuonTrack << std::endl;
1223  std::cout << "GoodEvents3MuonTrack: " << GoodEvents3MuonTrack << std::endl;
1224  std::cout << "GoodEvents4OrMoreMuonTrack: " << GoodEvents4OrMoreMuonTrack << std::endl;
1225 
1226  std::cout << "BadEvents0MuonTrack: " << BadEvents0MuonTrack << std::endl;
1227  std::cout << "BadEvents1MuonTrack: " << BadEvents1MuonTrack << std::endl;
1228  std::cout << "BadEvents2MuonTrack: " << BadEvents2MuonTrack << std::endl;
1229  std::cout << "BadEvents3MuonTrack: " << BadEvents3MuonTrack << std::endl;
1230  std::cout << "BadEvents4OrMoreMuonTrack: " << BadEvents4OrMoreMuonTrack << std::endl;
1231 
1233 
1234  for(int i=0; i < (NCriteriaBins+1)/2; ++i)
1235  {
1236  for(int j=0; j < (NRecoTracksBins+1)/2; ++j)
1237  {
1238  if(i==0)
1239  {
1240  h_Criteria_NRecoTrack_den->SetBinContent(1+2*i,1+2*j,CountNoRecoTracks);
1241  h_Criteria_NMuonTrack_den->SetBinContent(1+2*i,1+2*j,CountNoRecoTracks);
1242  }
1243  else if(i==1)
1244  {
1245  h_Criteria_NRecoTrack_den->SetBinContent(1+2*i,1+2*j,CountNoMuonTracks);
1246  h_Criteria_NMuonTrack_den->SetBinContent(1+2*i,1+2*j,CountNoMuonTracks);
1247  }
1248  else if(i==2)
1249  {
1250  h_Criteria_NRecoTrack_den->SetBinContent(1+2*i,1+2*j,CountCompleteness);
1251  h_Criteria_NMuonTrack_den->SetBinContent(1+2*i,1+2*j,CountCompleteness);
1252  }
1253  else if(i==3)
1254  {
1255  h_Criteria_NRecoTrack_den->SetBinContent(1+2*i,1+2*j,CountPurity);
1256  h_Criteria_NMuonTrack_den->SetBinContent(1+2*i,1+2*j,CountPurity);
1257  }
1258  else if(i==4)
1259  {
1260  h_Criteria_NRecoTrack_den->SetBinContent(1+2*i,1+2*j,CountTrackLengthTooShort);
1261  h_Criteria_NMuonTrack_den->SetBinContent(1+2*i,1+2*j,CountTrackLengthTooShort);
1262  }
1263  else if(i==5)
1264  {
1265  h_Criteria_NRecoTrack_den->SetBinContent(1+2*i,1+2*j,CountTrackLengthTooLong);
1266  h_Criteria_NMuonTrack_den->SetBinContent(1+2*i,1+2*j,CountTrackLengthTooLong);
1267  }
1268  else if(i==6)
1269  {
1270  h_Criteria_NRecoTrack_den->SetBinContent(1+2*i,1+2*j,CountRecoMuon);
1271  h_Criteria_NMuonTrack_den->SetBinContent(1+2*i,1+2*j,CountRecoMuon);
1272  }
1273  }
1274  }
1275 
1276 
1280 
1283 
1286 
1290 
1294 
1297 }
TH2D * h_Efficiency_ThetaXZ_SinThetaYZ_LeadingPlusSecond
TH2D * h_Efficiency_ThetaXZ_ThetaYZ_DifferenceLeadingAndLeadingPlusSecond
int CountBadLeadingMuonTrackAndLeadingPlusSecondBadTrackTooShort
int CountBadLeadingMuonTrackAndLeadingPlusSecondBadTrackTooLong
int CountBadLeadingMuonTrackAndOnlyOneMuonTrackTrackTooShort
int CountBadLeadingMuonTrackAndLeadingPlusSecondBadCompleteness
void DUNE::MuonTrackingEff::endJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 596 of file MuonTrackingEff_module.cc.

References doEfficiencies().

596  {
597 
598  doEfficiencies();
599 
600 }
void DUNE::MuonTrackingEff::FuncDistanceAndAngleBetweenTracks ( art::Ptr< recob::Track Track1,
art::Ptr< recob::Track Track2,
double &  TempDistanceBetweenTracks,
double &  TempAngleBetweenTracks,
double &  TempCriteriaTwoTracks 
)

Definition at line 1064 of file MuonTrackingEff_module.cc.

References recob::Track::End(), recob::Track::EndDirection(), recob::Track::Vertex(), and recob::Track::VertexDirection().

Referenced by processEff().

1065 {
1066 
1067 TempDistanceBetweenTracks = sqrt(pow(Track1->End().X()-Track2->Vertex().X(),2) + pow(Track1->End().Y()-Track2->Vertex().Y(),2) + pow(Track1->End().Z()-Track2->Vertex().Z(),2));
1068 TempAngleBetweenTracks = (180.0/3.14159)*Track1->EndDirection().Angle(Track2->VertexDirection());
1069 TempCriteriaTwoTracks = 1.;
1070 
1071 if(TempDistanceBetweenTracks > sqrt(pow(Track1->End().X()-Track2->End().X(),2) + pow(Track1->End().Y()-Track2->End().Y(),2) + pow(Track1->End().Z()-Track2->End().Z(),2)))
1072  {
1073  TempDistanceBetweenTracks = sqrt(pow(Track1->End().X()-Track2->End().X(),2) + pow(Track1->End().Y()-Track2->End().Y(),2) + pow(Track1->End().Z()-Track2->End().Z(),2));
1074  TempAngleBetweenTracks = 180. - (180.0/3.14159)*Track1->EndDirection().Angle(Track2->EndDirection());
1075  TempCriteriaTwoTracks = 2.;
1076  }
1077 
1078 if(TempDistanceBetweenTracks > sqrt(pow(Track1->Vertex().X()-Track2->End().X(),2) + pow(Track1->Vertex().Y()-Track2->End().Y(),2) + pow(Track1->Vertex().Z()-Track2->End().Z(),2)))
1079  {
1080  TempDistanceBetweenTracks = sqrt(pow(Track1->Vertex().X()-Track2->End().X(),2) + pow(Track1->Vertex().Y()-Track2->End().Y(),2) + pow(Track1->Vertex().Z()-Track2->End().Z(),2));
1081  TempAngleBetweenTracks = (180.0/3.14159)*Track1->VertexDirection().Angle(Track2->EndDirection());
1082  TempCriteriaTwoTracks = 3.;
1083  }
1084 
1085 if(TempDistanceBetweenTracks > sqrt(pow(Track1->Vertex().X()-Track2->Vertex().X(),2) + pow(Track1->Vertex().Y()-Track2->Vertex().Y(),2) + pow(Track1->Vertex().Z()-Track2->Vertex().Z(),2)))
1086  {
1087  TempDistanceBetweenTracks = sqrt(pow(Track1->Vertex().X()-Track2->Vertex().X(),2) + pow(Track1->Vertex().Y()-Track2->Vertex().Y(),2) + pow(Track1->Vertex().Z()-Track2->Vertex().Z(),2));
1088  TempAngleBetweenTracks = 180. - (180.0/3.14159)*Track1->VertexDirection().Angle(Track2->VertexDirection());
1089  TempCriteriaTwoTracks = 4.;
1090  }
1091 
1092 }
TVector3 VertexDirection() const
Covariance matrices are either set or not.
Definition: Track.h:247
TVector3 Vertex() const
Covariance matrices are either set or not.
Definition: Track.h:245
TVector3 EndDirection() const
Covariance matrices are either set or not.
Definition: Track.h:248
TVector3 End() const
Covariance matrices are either set or not.
Definition: Track.h:246
void DUNE::MuonTrackingEff::FuncDistanceAndAngleBetweenTruthAndRecoTrack ( const simb::MCParticle *&  MCparticle,
art::Ptr< recob::Track Track,
double &  TempDistanceBetweenTruthAndRecoTrack,
double &  TempAngleBeetweenTruthAndRecoTrack 
)

Definition at line 1094 of file MuonTrackingEff_module.cc.

References recob::Track::Vertex(), simb::MCParticle::Vx(), simb::MCParticle::Vy(), and simb::MCParticle::Vz().

Referenced by processEff().

1095 {
1096 TempDistanceBetweenTruthAndRecoTrack = sqrt(pow(Track->Vertex().X() - MCparticle->Vx(),2) + pow(Track->Vertex().Y() - MCparticle->Vy(),2) + pow(Track->Vertex().Z() - MCparticle->Vz(),2));
1097 
1098 TempAngleBeetweenTruthAndRecoTrack=0;
1099 
1100 }
double Vx(const int i=0) const
Definition: MCParticle.h:225
TVector3 Vertex() const
Covariance matrices are either set or not.
Definition: Track.h:245
double Vz(const int i=0) const
Definition: MCParticle.h:227
double Vy(const int i=0) const
Definition: MCParticle.h:226
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::MuonTrackingEff::insideFV ( double  vertex[4])

Definition at line 1146 of file MuonTrackingEff_module.cc.

References x, y, and z.

Referenced by processEff().

1146  {
1147 
1148  double x = vertex[0];
1149  double y = vertex[1];
1150  double z = vertex[2];
1151 
1152  if (x>fFidVolXmin && x<fFidVolXmax&&
1153  y>fFidVolYmin && y<fFidVolYmax&&
1154  z>fFidVolZmin && z<fFidVolZmax)
1155  return true;
1156  else
1157  return false;
1158 }
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::MuonTrackingEff::processEff ( const art::Event evt,
bool &  isFiducial 
)

Definition at line 613 of file MuonTrackingEff_module.cc.

References sim::ParticleList::begin(), sim::ParticleList::end(), art::fill_ptr_vector(), fMuonPDGCode, FuncDistanceAndAngleBetweenTracks(), FuncDistanceAndAngleBetweenTruthAndRecoTrack(), art::DataViewImpl::get(), art::DataViewImpl::getByLabel(), recob::Track::ID(), insideFV(), recob::Track::Length(), LOG_DEBUG, MCTruthMuonID, MCTruthMuonMomentum, simb::MCParticle::Momentum(), simb::MCParticle::Mother(), cheat::ParticleInventoryService::ParticleList(), simb::MCParticle::PdgCode(), simb::MCParticle::Position(), track, simb::MCParticle::TrackId(), truthLength(), truthMatcher(), recob::Track::Vertex(), and simb::MCParticle::Vz().

Referenced by analyze().

613  {
614 
615  EventCounter++;
616  simb::MCParticle *MCTruthMuonParticle = NULL;
617 
619  const sim::ParticleList& plist = pi_serv->ParticleList();
620  simb::MCParticle *particle=0;
621 
622  for( sim::ParticleList::const_iterator ipar = plist.begin(); ipar!=plist.end(); ++ipar){
623  particle = ipar->second;
624 
625  if( particle->Mother() == 0 ){ //0=particle has no mother particle, 1=particle has a mother particle
626  const TLorentzVector& positionStart = particle->Position(0);
627  positionStart.GetXYZT(MCTruthMuonVertex); //MCTruthMuonVertex[0-2]=truth vertex, MCTruthMuonVertex[3]=t=0
628  }
629 
630  if( particle->PdgCode() == fMuonPDGCode ){ // Particle cannon muon
631  MCTruthMuonParticle = particle;
632  MCTruthMuonID = particle->TrackId();
633  MCTruthMuonMomentum = sqrt(pow(particle->Momentum().Px(),2)+pow(particle->Momentum().Py(),2)+pow(particle->Momentum().Pz(),2));
634 
635  if(particle->Momentum().Pz() >=0 && particle->Momentum().Px() >=0)
636  {
637  MCTruthMuonThetaXZ = (180.0/3.14159)*atan(particle->Momentum().Px()/particle->Momentum().Pz());
638  }
639  else if(particle->Momentum().Pz() < 0 && particle->Momentum().Px() >=0)
640  {
641  MCTruthMuonThetaXZ = 180.0 + (180.0/3.14159)*atan(particle->Momentum().Px()/particle->Momentum().Pz());
642  }
643  else if(particle->Momentum().Pz() < 0 && particle->Momentum().Px() < 0)
644  {
645  MCTruthMuonThetaXZ = 180.0 + (180.0/3.14159)*atan(particle->Momentum().Px()/particle->Momentum().Pz());
646  }
647  else if(particle->Momentum().Pz() >= 0 && particle->Momentum().Px() < 0)
648  {
649  MCTruthMuonThetaXZ = 360.0 + (180.0/3.14159)*atan(particle->Momentum().Px()/particle->Momentum().Pz());
650  }
651 
652  MCTruthMuonThetaYZ = (180.0/3.14159)*asin(particle->Momentum().Py()/MCTruthMuonMomentum);
653  }
654  }
655  double MCTruthLengthMuon = truthLength(MCTruthMuonParticle);
656  h_TruthLength->Fill(MCTruthLengthMuon);
657 
658  //===================================================================
659  //Saving denominator histograms
660  //===================================================================
661  isFiducial =insideFV( MCTruthMuonVertex );
662  if( !isFiducial ) return;
663 
664  //save events for Nucleon decay and particle cannon
665  if( MCTruthMuonParticle ){
667  h_ThetaYZ_den->Fill(MCTruthMuonThetaYZ);
668  h_SinThetaYZ_den->Fill(sin((3.14159/180.)*MCTruthMuonThetaYZ));
669  h_ThetaXZ_ThetaYZ_den->Fill(MCTruthMuonThetaXZ,MCTruthMuonThetaYZ);
670  h_ThetaXZ_SinThetaYZ_den->Fill(MCTruthMuonThetaXZ,sin((3.14159/180.)*MCTruthMuonThetaYZ));
672  }
673 
674 
675 
676  //========================================================================
677  // Reco stuff, once we have selected a MC Particle let's find out if there is a track associated
678  //========================================================================
679 
680  int NMuonTracks=0;
681 
682  art::Handle<std::vector<recob::Track>> TrackListHandle;
683  if(! event.getByLabel(fTrackModuleLabel, TrackListHandle)) return;
684  std::vector<art::Ptr<recob::Track> > TrackList;
685  art::fill_ptr_vector(TrackList, TrackListHandle);
686  int NRecoTracks = TrackList.size();
687  art::FindManyP<recob::Hit> track_hits(TrackListHandle, event, fTrackModuleLabel);
688  if( NRecoTracks == 0 ){
689  LOG_DEBUG("MuonTrackingEff")<<"There are no reco tracks... bye";
690  std::cout << "There are no reco tracks! MCTruthMuonThetaXZ: " << std::endl;
691 
692  Criteria=0.;
694  h_FailedReconstruction_ThetaXZ_SinThetaYZ->Fill(MCTruthMuonThetaXZ,sin((3.14159/180.)*MCTruthMuonThetaYZ));
695  h_NoRecoTrackAtAll_ThetaXZ_SinThetaYZ->Fill(MCTruthMuonThetaXZ,sin((3.14159/180.)*MCTruthMuonThetaYZ));
696  h_Criteria_NRecoTrack_num->Fill(Criteria,static_cast<double>(NRecoTracks));
697  h_Criteria_NMuonTrack_num->Fill(Criteria,static_cast<double>(NMuonTracks));
699  return;
700  }
701  LOG_DEBUG("MuonTrackingEff")<<"Found this many reco tracks "<<NRecoTracks;
702 
703  //std::cout << "NRecoTracks: " << NRecoTracks << std::endl;
704 
705  double PurityLeadingMuon=0.;
706  double CompletenessLeadingMuon=0.;
707  double RecoLengthLeadingMuon=0.;
708  art::Ptr<recob::Track> TrackLeadingMuon;
709 
710  double RecoLengthSecondMuon=0.;
711  double CompletenessSecondMuon=0.;
712  double PuritySecondMuon=0.;
713  art::Ptr<recob::Track> TrackSecondMuon;
714 
715  double TrackLengthMuonSum=0.;
716  double tmpTotalRecoEnergy=0.;
717 
718  double MaxLengthNoRecoMuon=0;
719  int PDGCodeMaxLengthNoRecoMuon=0;
720 
721  const simb::MCParticle *RecoMuonParticle = NULL;
722 
723  std::vector<art::Ptr<recob::Hit>> tmp_TrackHits = track_hits.at(0);
724  std::vector<art::Ptr<recob::Hit>> AllHits;
726  if(event.get(tmp_TrackHits[0].id(), HitHandle)) art::fill_ptr_vector(AllHits, HitHandle);
727 
728 
729  //Loop over reco tracks
730  for(int i=0; i<NRecoTracks; i++) {
731  art::Ptr<recob::Track> track = TrackList[i];
732  std::vector<art::Ptr<recob::Hit>> TrackHits = track_hits.at(i);
733  double tmpPurity=0.;
734  double tmpCompleteness=0.;
735  const simb::MCParticle *particle;
736 
737  truthMatcher(AllHits, TrackHits, particle, tmpPurity, tmpCompleteness, tmpTotalRecoEnergy);
738 
739  if (!particle) { std::cout << "ERROR: Truth matcher didn't find a particle!" << std::endl; continue;}
740 
741  if(track->Length() > MaxLengthNoRecoMuon && particle->PdgCode() != fMuonPDGCode && particle->TrackId() != MCTruthMuonID)
742  {
743  MaxLengthNoRecoMuon = track->Length();
744  PDGCodeMaxLengthNoRecoMuon = particle->PdgCode();
745  }
746  //some muon tracks have Completeness=0 and Purity=0 but are still considered as muon tracks in function truthmatcher. Getting rid of these tracks by asking tmpCompleteness > 0 && tmpPurity > 0
747  if( (particle->PdgCode() == fMuonPDGCode) && (particle->TrackId() == MCTruthMuonID) && tmpCompleteness > 0 && tmpPurity > 0 ){
748 
749  NMuonTracks++;
750  TrackLengthMuonSum+=track->Length();
751 
752  if(NMuonTracks==1)
753  {
754  CompletenessLeadingMuon = tmpCompleteness;
755  PurityLeadingMuon = tmpPurity;
756  RecoLengthLeadingMuon = track->Length();
757  TrackLeadingMuon = track;
758 
759  RecoMuonParticle = particle;
760  }
761 
762 
763  if(NMuonTracks>=2 && tmpCompleteness > CompletenessLeadingMuon )
764  {
765 
766  CompletenessSecondMuon = CompletenessLeadingMuon;
767  PuritySecondMuon = PurityLeadingMuon;
768  RecoLengthSecondMuon = RecoLengthLeadingMuon;
769  TrackSecondMuon = TrackLeadingMuon;
770 
771  CompletenessLeadingMuon = tmpCompleteness;
772  PurityLeadingMuon = tmpPurity;
773  RecoLengthLeadingMuon = track->Length();
774  TrackLeadingMuon = track;
775 
776  RecoMuonParticle = particle;
777  }
778 
779  else if(NMuonTracks>=2 && tmpCompleteness < CompletenessLeadingMuon && tmpCompleteness > CompletenessSecondMuon)
780  {
781  CompletenessSecondMuon = tmpCompleteness;
782  PuritySecondMuon = tmpPurity;
783  RecoLengthSecondMuon = track->Length();
784  TrackSecondMuon = track;
785  }
786  }
787  }
788 
789  h_TotalRecoEnergy->Fill(tmpTotalRecoEnergy);
790 
791 
792 
793  //Muon events
794  //=========================================================
795 
796  if( RecoMuonParticle && MCTruthMuonParticle )
797  {
798  CountRecoMuon++;
799  h_Purity->Fill(PurityLeadingMuon);
800  h_Completeness->Fill(CompletenessLeadingMuon);
801  h_TrackRes->Fill(RecoLengthLeadingMuon/MCTruthLengthMuon);
802 
803  std::cout << "TrackLeadingMuon->Vertex().X(): " << TrackLeadingMuon->Vertex().X() << std::endl;
804  std::cout << "MCTruthMuonParticle->Vz(): " << MCTruthMuonParticle->Vz() << std::endl;
805  std::cout << " " << std::endl;
806 
807  double DistanceBetweenTruthAndRecoTrack;
808  double AngleBetweenTruthAndRecoTrack;
809  FuncDistanceAndAngleBetweenTruthAndRecoTrack(RecoMuonParticle,TrackLeadingMuon,DistanceBetweenTruthAndRecoTrack,AngleBetweenTruthAndRecoTrack);
810 
811  h_VertexRes->Fill(DistanceBetweenTruthAndRecoTrack);
812  h_DirectionRes->Fill(AngleBetweenTruthAndRecoTrack);
813 
814  h_MuonTrackStitching_TrackRes_Completeness->Fill(RecoLengthLeadingMuon/MCTruthLengthMuon, CompletenessLeadingMuon);
815  if(NMuonTracks>=2)
816  {
817  double DistanceBetweenTracks;
818  double AngleBetweenTracks;
819  double CriteriaTwoTracks;
820 
821  FuncDistanceAndAngleBetweenTracks(TrackSecondMuon,TrackLeadingMuon,DistanceBetweenTracks, AngleBetweenTracks, CriteriaTwoTracks);
822 
823  h_MuonTrackStitching_TrackResLeading_TrackResSecond->Fill(RecoLengthLeadingMuon/MCTruthLengthMuon,RecoLengthSecondMuon/MCTruthLengthMuon);
824  h_MuonTrackStitching_Distance_Angle->Fill(DistanceBetweenTracks,AngleBetweenTracks);
825  h_MuonTrackStitching_TrackResSecondMuon_Angle->Fill(RecoLengthSecondMuon/MCTruthLengthMuon,AngleBetweenTracks);
826  h_MuonTrackStitching_CompletenessSecondMuon_Angle->Fill(CompletenessSecondMuon,AngleBetweenTracks);
827  h_MuonTrackStitching_CriteriaTwoTracks_Angle->Fill(CriteriaTwoTracks, AngleBetweenTracks);
828  }
829 
830  //Completeness
831  if(CompletenessLeadingMuon < 0.5)
832  {
834  Criteria=2.;
835  h_Completeness_ThetaXZ_SinThetaYZ->Fill(MCTruthMuonThetaXZ,sin((3.14159/180.)*MCTruthMuonThetaYZ));
836  h_Criteria_NRecoTrack_num->Fill(Criteria,static_cast<double>(NRecoTracks));
837  h_Criteria_NMuonTrack_num->Fill(Criteria,static_cast<double>(NMuonTracks));
838  }
839  //Purity
840  if(PurityLeadingMuon < 0.5)
841  {
842  CountPurity++;
843  Criteria=3.;
844  h_Purity_ThetaXZ_SinThetaYZ->Fill(MCTruthMuonThetaXZ,sin((3.14159/180.)*MCTruthMuonThetaYZ));
845  h_Criteria_NRecoTrack_num->Fill(Criteria,static_cast<double>(NRecoTracks));
846  h_Criteria_NMuonTrack_num->Fill(Criteria,static_cast<double>(NMuonTracks));
847  }
848  //Track too short
849  if(RecoLengthLeadingMuon/MCTruthLengthMuon < 0.75)
850  {
852  Criteria=4.;
853  h_TrackTooShort_ThetaXZ_SinThetaYZ->Fill(MCTruthMuonThetaXZ,sin((3.14159/180.)*MCTruthMuonThetaYZ));
854  h_Criteria_NRecoTrack_num->Fill(Criteria,static_cast<double>(NRecoTracks));
855  h_Criteria_NMuonTrack_num->Fill(Criteria,static_cast<double>(NMuonTracks));
856  }
857  //Track too long
858  if(RecoLengthLeadingMuon/MCTruthLengthMuon > 1.25)
859  {
861  Criteria=5.;
862  h_TrackTooLong_ThetaXZ_SinThetaYZ->Fill(MCTruthMuonThetaXZ,sin((3.14159/180.)*MCTruthMuonThetaYZ));
863  h_Criteria_NRecoTrack_num->Fill(Criteria,static_cast<double>(NRecoTracks));
864  h_Criteria_NMuonTrack_num->Fill(Criteria,static_cast<double>(NMuonTracks));
865 
866  /*std::cout << "Track too long!" << std::endl;
867  art::ServiceHandle<cheat::BackTracker> bt2;
868  const sim::ParticleList& plist2 = bt2->ParticleList();
869  simb::MCParticle *particle2=0;
870 
871  std::cout << "EventCounter: " << EventCounter << std::endl;
872  for( sim::ParticleList::const_iterator ipar2 = plist2.begin(); ipar2!=plist2.end(); ++ipar2)
873  {
874  particle2 = ipar2->second;
875  std::cout << "particle2->TrackId(): " << particle2->TrackId() << std::endl;
876  std::cout << "particle2->PdgCode(): " << particle2->PdgCode() << std::endl;
877  std::cout << "particle2->Momentum().P(): " << particle2->Momentum().P() << std::endl;
878  std::cout << "tuthLength(particle2): " << truthLength(particle2) << std::endl;
879  std::cout << "particle2->Position(): (x,y,z): " << particle2->Vx() << "\t" << particle2->Vy() << "\t" << particle2->Vz() << std::endl;
880  std::cout << "particle2->Momentum(): (Px,Py,Pz): " << particle2->Momentum().Px() << "\t" << particle2->Momentum().Py() << "\t" << particle2->Momentum().Pz() << std::endl;
881  std::cout << "particle2->Position().T(): " << particle2->Position().T() << std::endl;
882  std::cout << "" << std::endl;
883  }*/
884 
885  }
886  //Reco failed at least one of the above criteria
887  if(CompletenessLeadingMuon < 0.5 || PurityLeadingMuon < 0.5 || RecoLengthLeadingMuon/MCTruthLengthMuon < 0.75 || RecoLengthLeadingMuon/MCTruthLengthMuon > 1.25)
888  {
891  h_FailedReconstruction_ThetaXZ_SinThetaYZ->Fill(MCTruthMuonThetaXZ,sin((3.14159/180.)*MCTruthMuonThetaYZ));
892  h_MuonTrackStitching_FailedCriteria_TrackRes_Completeness->Fill(RecoLengthLeadingMuon/MCTruthLengthMuon, CompletenessLeadingMuon);
893 
894 
895  if(NMuonTracks==1) {BadEvents1MuonTrack++;}
896  if(NMuonTracks==2) {BadEvents2MuonTrack++;}
897  if(NMuonTracks==3) {BadEvents3MuonTrack++;}
898  if(NMuonTracks==4) {BadEvents4OrMoreMuonTrack++;}
899 
900  if(NMuonTracks>=2)
901  {
902  double AngleBetweenTracks;
903  double DistanceBetweenTracks;
904  double CriteriaTwoTracks;
905  FuncDistanceAndAngleBetweenTracks(TrackSecondMuon,TrackLeadingMuon,DistanceBetweenTracks, AngleBetweenTracks, CriteriaTwoTracks);
906 
907  if(AngleBetweenTracks>160.)
908  {
909  std::cout << "EventCounter: " << EventCounter << std::endl;
910  std::cout << "Angle b/w tracks: " << AngleBetweenTracks << std::endl;
911  std::cout << "CriteriaTwoTracks: " << CriteriaTwoTracks << std::endl;
912  std::cout << "CompletenessLeadingMuon: " << CompletenessLeadingMuon << std::endl;
913  std::cout << "CompletenessSecondMuon: " << CompletenessSecondMuon << std::endl;
914  std::cout << "PurityLeadingMuon: " << PurityLeadingMuon << std::endl;
915  std::cout << "PuritySecondMuon: " << PuritySecondMuon << std::endl;
916  std::cout << "TrackLeadingMuon: " << RecoLengthLeadingMuon/MCTruthLengthMuon << std::endl;
917  std::cout << "TrackResSecondMuon: " << RecoLengthSecondMuon/MCTruthLengthMuon << std::endl;
918  std::cout << "TrackID leading: " << TrackLeadingMuon->ID() << std::endl;
919  std::cout << "TrackID second: " << TrackSecondMuon->ID() << std::endl;
920  }
921 
922  h_MuonTrackStitching_FailedCriteria_Distance_Angle->Fill(DistanceBetweenTracks,AngleBetweenTracks);
923  h_MuonTrackStitching_FailedCriteria_TrackResLeading_TrackResSecond->Fill(RecoLengthLeadingMuon/MCTruthLengthMuon,RecoLengthSecondMuon/MCTruthLengthMuon);
924  h_MuonTrackStitching_FailedCriteria_CompletenessLeading_CompletenessSecond->Fill(CompletenessLeadingMuon,CompletenessSecondMuon);
925  h_MuonTrackStitching_FailedCriteria_TrackResSecondMuon_Angle->Fill(RecoLengthSecondMuon/MCTruthLengthMuon, AngleBetweenTracks);
926  h_MuonTrackStitching_FailedCriteria_CompletenessSecondMuon_Angle->Fill(CompletenessSecondMuon, AngleBetweenTracks);
927  h_MuonTrackStitching_FailedCriteria_CriteriaTwoTracks_Angle->Fill(CriteriaTwoTracks, AngleBetweenTracks);
928  if( (CompletenessLeadingMuon+CompletenessSecondMuon) >= 0.5 && PurityLeadingMuon >= 0.5 && PuritySecondMuon >= 0.5 && (RecoLengthLeadingMuon+RecoLengthSecondMuon)/MCTruthLengthMuon >= 0.75 && (RecoLengthLeadingMuon+RecoLengthSecondMuon)/MCTruthLengthMuon <= 1.25 ) {
931  h_ThetaXZ_SinThetaYZ_LeadingPlusSecondOk->Fill(MCTruthMuonThetaXZ,sin((3.14159/180.)*MCTruthMuonThetaYZ));
932 
933  h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_TrackRes_Completeness->Fill(RecoLengthLeadingMuon/MCTruthLengthMuon, CompletenessLeadingMuon);
934  h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_TrackResLeading_TrackResSecond->Fill(RecoLengthLeadingMuon/MCTruthLengthMuon,RecoLengthSecondMuon/MCTruthLengthMuon);
935  h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_Distance_Angle->Fill(DistanceBetweenTracks,AngleBetweenTracks);
936  }
937  if (( CompletenessLeadingMuon+CompletenessSecondMuon) < 0.5 || PurityLeadingMuon < 0.5 || PuritySecondMuon < 0.5 || (RecoLengthLeadingMuon+RecoLengthSecondMuon)/MCTruthLengthMuon < 0.75 || (RecoLengthLeadingMuon+RecoLengthSecondMuon)/MCTruthLengthMuon > 1.25 )
938  {
940 
941  h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_TrackRes_Completeness->Fill(RecoLengthLeadingMuon/MCTruthLengthMuon, CompletenessLeadingMuon);
942  h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_TrackResLeading_TrackResSecond->Fill(RecoLengthLeadingMuon/MCTruthLengthMuon,RecoLengthSecondMuon/MCTruthLengthMuon);
943  h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_Distance_Angle->Fill(DistanceBetweenTracks,AngleBetweenTracks);
944  }
945  if((CompletenessLeadingMuon+CompletenessSecondMuon) < 0.5) {CountBadLeadingMuonTrackAndLeadingPlusSecondBadCompleteness++;}
946  if(PurityLeadingMuon < 0.5 || PuritySecondMuon < 0.5 ) {CountBadLeadingMuonTrackAndLeadingPlusSecondBadPurity++;}
947  if((RecoLengthLeadingMuon+RecoLengthSecondMuon)/MCTruthLengthMuon < 0.75) {CountBadLeadingMuonTrackAndLeadingPlusSecondBadTrackTooShort++;}
948  if((RecoLengthLeadingMuon+RecoLengthSecondMuon)/MCTruthLengthMuon > 1.25) {CountBadLeadingMuonTrackAndLeadingPlusSecondBadTrackTooLong++;}
949 
950  }
951  else if(NMuonTracks==1)
952  {
954  if(CompletenessLeadingMuon < 0.5) {CountBadLeadingMuonTrackAndOnlyOneMuonTrackCompleteness++;}
955  if(PurityLeadingMuon < 0.5) {CountBadLeadingMuonTrackAndOnlyOneMuonTrackPurity++;}
956  if(RecoLengthLeadingMuon/MCTruthLengthMuon < 0.75) {CountBadLeadingMuonTrackAndOnlyOneMuonTrackTrackTooShort++;}
957  if(RecoLengthLeadingMuon/MCTruthLengthMuon > 1.25) {CountBadLeadingMuonTrackAndOnlyOneMuonTrackTrackTooLong++;}
958  }
959  }
960  //Reco succesful according to the above criteria
961  if(CompletenessLeadingMuon >= 0.5 && PurityLeadingMuon >= 0.5 && RecoLengthLeadingMuon/MCTruthLengthMuon >= 0.75 && RecoLengthLeadingMuon/MCTruthLengthMuon <= 1.25)
962  {
964  Criteria=6.;
966  h_ThetaYZ_num->Fill(MCTruthMuonThetaYZ);
967  h_SinThetaYZ_num->Fill(sin((3.14159/180.)*MCTruthMuonThetaYZ));
968  h_ThetaXZ_ThetaYZ_num->Fill(MCTruthMuonThetaXZ,MCTruthMuonThetaYZ);
969  h_ThetaXZ_SinThetaYZ_num->Fill(MCTruthMuonThetaXZ,sin((3.14159/180.)*MCTruthMuonThetaYZ));
970  h_Criteria_NRecoTrack_num->Fill(Criteria,static_cast<double>(NRecoTracks));
971  h_Criteria_NMuonTrack_num->Fill(Criteria,static_cast<double>(NMuonTracks));
972 
973  h_MuonTrackStitching_MatchedCriteria_TrackRes_Completeness->Fill(RecoLengthLeadingMuon/MCTruthLengthMuon, CompletenessLeadingMuon);
974 
975  if(NMuonTracks==1) {GoodEvents1MuonTrack++;}
976  if(NMuonTracks==2) {GoodEvents2MuonTrack++;}
977  if(NMuonTracks==3) {GoodEvents3MuonTrack++;}
978  if(NMuonTracks==4) {GoodEvents4OrMoreMuonTrack++;}
979 
980  if(NMuonTracks>=2)
981  {
982  h_MuonTrackStitching_MatchedCriteria_TrackResLeading_TrackResSecond->Fill(RecoLengthLeadingMuon/MCTruthLengthMuon,RecoLengthSecondMuon/MCTruthLengthMuon);
983 
984  double AngleBetweenTracks;
985  double DistanceBetweenTracks;
986  double CriteriaTwoTracks;
987  FuncDistanceAndAngleBetweenTracks(TrackSecondMuon,TrackLeadingMuon,DistanceBetweenTracks, AngleBetweenTracks, CriteriaTwoTracks);
988  h_MuonTrackStitching_MatchedCriteria_Distance_Angle->Fill(DistanceBetweenTracks,AngleBetweenTracks);
989  h_MuonTrackStitching_MatchedCriteria_CriteriaTwoTracks_Angle->Fill(CriteriaTwoTracks, AngleBetweenTracks);
990  }
991  }
992  }
993  //No muon track
994  if( !RecoMuonParticle && MCTruthMuonParticle )
995  {
998  Criteria=1.;
999  h_NoMuonTrack_ThetaXZ_SinThetaYZ->Fill(MCTruthMuonThetaXZ,sin((3.14159/180.)*MCTruthMuonThetaYZ));
1001  h_FailedReconstruction_ThetaXZ_SinThetaYZ->Fill(MCTruthMuonThetaXZ,sin((3.14159/180.)*MCTruthMuonThetaYZ));
1002  h_Criteria_NRecoTrack_num->Fill(Criteria,static_cast<double>(NRecoTracks));
1003  h_Criteria_NMuonTrack_num->Fill(Criteria,static_cast<double>(NMuonTracks));
1004  h_NoMuonTrack_MaxTrackLength_PDGCode->Fill(MaxLengthNoRecoMuon, static_cast<double>(PDGCodeMaxLengthNoRecoMuon));
1005  }
1006 }
const TLorentzVector & Position(const int i=0) const
Definition: MCParticle.h:223
int PdgCode() const
Definition: MCParticle.h:216
void FuncDistanceAndAngleBetweenTruthAndRecoTrack(const simb::MCParticle *&MCparticle, art::Ptr< recob::Track > Track, double &TempDistanceBetweenTruthAndRecoTrack, double &TempAngleBeetweenTruthAndRecoTrack)
int Mother() const
Definition: MCParticle.h:217
list_type::const_iterator const_iterator
Definition: ParticleList.h:132
TH2D * h_MuonTrackStitching_FailedCriteria_CriteriaTwoTracks_Angle
TH2D * h_MuonTrackStitching_MatchedCriteria_TrackResLeading_TrackResSecond
TH2D * h_MuonTrackStitching_FailedCriteria_Distance_Angle
TH2D * h_MuonTrackStitching_MatchedCriteria_TrackRes_Completeness
int TrackId() const
Definition: MCParticle.h:214
TH2D * h_MuonTrackStitching_MatchedCriteria_CriteriaTwoTracks_Angle
TH2D * h_MuonTrackStitching_FailedCriteria_CompletenessSecondMuon_Angle
TH2D * h_MuonTrackStitching_FailedCriteria_CompletenessLeading_CompletenessSecond
bool insideFV(double vertex[4])
TH2D * h_MuonTrackStitching_FailedCriteria_TrackRes_Completeness
TH2D * h_MuonTrackStitching_TrackResLeading_TrackResSecond
double Length(size_t p=0) const
Access to various track properties.
Definition: Track.h:174
TH2D * h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_TrackResLeading_TrackResSecond
int CountBadLeadingMuonTrackAndLeadingPlusSecondBadTrackTooShort
TH2D * h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_TrackRes_Completeness
iterator begin()
Definition: ParticleList.h:305
void FuncDistanceAndAngleBetweenTracks(art::Ptr< recob::Track > Track1, art::Ptr< recob::Track > Track2, double &TempDistanceBetweenTracks, double &TempAngleBetweenTracks, double &TempCriteriaTwoTracks)
TH2D * h_MuonTrackStitching_FailedCriteria_TrackResSecondMuon_Angle
int ID() const
Definition: Track.h:205
TH2D * h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_TrackResLeading_TrackResSecond
int CountBadLeadingMuonTrackAndLeadingPlusSecondBadTrackTooLong
TH2D * h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_Distance_Angle
TVector3 Vertex() const
Covariance matrices are either set or not.
Definition: Track.h:245
const TLorentzVector & Momentum(const int i=0) const
Definition: MCParticle.h:224
TH2D * h_MuonTrackStitching_CompletenessSecondMuon_Angle
double Vz(const int i=0) const
Definition: MCParticle.h:227
#define LOG_DEBUG(id)
TH2D * h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_TrackRes_Completeness
double truthLength(const simb::MCParticle *MCparticle)
TH2D * h_MuonTrackStitching_FailedCriteria_TrackResLeading_TrackResSecond
void truthMatcher(std::vector< art::Ptr< recob::Hit >> AllHits, std::vector< art::Ptr< recob::Hit >> track_hits, const simb::MCParticle *&MCparticle, double &Purity, double &Completeness, double &TotalRecoEnergy)
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:464
int CountBadLeadingMuonTrackAndOnlyOneMuonTrackTrackTooShort
Float_t track
Definition: plot.C:34
int CountBadLeadingMuonTrackAndLeadingPlusSecondBadCompleteness
TH2D * h_MuonTrackStitching_MatchedCriteria_Distance_Angle
Event finding and building.
TH2D * h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_Distance_Angle
std::string const& art::EventObserverBase::processName ( ) const
inlineinherited
void DUNE::MuonTrackingEff::reconfigure ( fhicl::ParameterSet const &  pset)

Definition at line 313 of file MuonTrackingEff_module.cc.

References fhicl::ParameterSet::get().

Referenced by MuonTrackingEff().

313  {
314 
315  fMCTruthModuleLabel = p.get<std::string>("MCTruthModuleLabel");
316  fTrackModuleLabel = p.get<std::string>("TrackModuleLabel");
317  fMuonPDGCode = p.get<int>("MuonPDGCode");
318  fFidVolCutX = p.get<float>("FidVolCutX");
319  fFidVolCutY = p.get<float>("FidVolCutY");
320  fFidVolCutZ = p.get<float>("FidVolCutZ");
321 }
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::MuonTrackingEff::truthLength ( const simb::MCParticle MCparticle)

Definition at line 1103 of file MuonTrackingEff_module.cc.

References geo::GeometryCore::FindTPCAtPosition(), geom, simb::MCParticle::NumberTrajectoryPoints(), simb::MCParticle::Position(), simb::MCParticle::Vx(), simb::MCParticle::Vy(), and simb::MCParticle::Vz().

Referenced by processEff().

1103  {
1104  //calculate the truth length considering only the part that is inside the TPC
1105  //Base on a piece of code from dune/TrackingAna/TrackingEfficiency_module.cc
1106 
1107  if( !MCparticle ) return -999.0;
1108  int numberTrajectoryPoints = MCparticle->NumberTrajectoryPoints();
1109  std::vector<double> TPCLengthHits(numberTrajectoryPoints, 0);
1110  int FirstHit=0, LastHit=0;
1111  double TPCLength = 0.0;
1112  bool BeenInVolume = false;
1113 
1114  for(unsigned int MCHit=0; MCHit < TPCLengthHits.size(); ++MCHit) {
1115  const TLorentzVector& tmpPosition= MCparticle->Position(MCHit);
1116  double const tmpPosArray[]={tmpPosition[0],tmpPosition[1],tmpPosition[2]};
1117  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));
1118  geo::TPCID tpcid = geom->FindTPCAtPosition(tmpPosArray);
1119  if(tpcid.isValid) {
1120  // -- Check if hit is within drift window...
1121  /* geo::CryostatGeo const& cryo = geom->Cryostat(tpcid.Cryostat);
1122  geo::TPCGeo const& tpc = cryo.TPC(tpcid.TPC);
1123  double XPlanePosition = tpc.PlaneLocation(0)[0];
1124  std::cout << "XPlanePosition: " << XPlanePosition << std::endl;
1125 
1126  double DriftTimeCorrection = fabs( tmpPosition[0] - XPlanePosition ) / XDriftVelocity;
1127  std::cout << "DriftTimeCorrection: " << DriftTimeCorrection << std::endl;
1128  std::cout << "tmpPosition[0]: " << tmpPosition[0] << std::endl;
1129  std::cout << "XDriftVelocity: " << XDriftVelocity << std::endl;
1130  std::cout << "MCparticle->T(): " << MCparticle->T() << std::endl;
1131  double TimeAtPlane = MCparticle->T() + DriftTimeCorrection;
1132  std::cout << "TimeAtPlane: " << TimeAtPlane << "\t" << "detprop->TriggerOffset(): " << detprop->TriggerOffset() << std::endl;
1133  std::cout << "WindowSize: " << WindowSize << std::endl;
1134  if( TimeAtPlane < detprop->TriggerOffset() || TimeAtPlane > detprop->TriggerOffset() + WindowSize ){ std::cout << "BYE" << std::endl; continue;} */
1135  LastHit = MCHit;
1136  if( !BeenInVolume ) {
1137  BeenInVolume = true;
1138  FirstHit = MCHit;
1139  }
1140  }
1141  }
1142  for (int Hit = FirstHit+1; Hit <= LastHit; ++Hit ) TPCLength += TPCLengthHits[Hit];
1143  return TPCLength;
1144 }
unsigned int NumberTrajectoryPoints() const
Definition: MCParticle.h:222
const TLorentzVector & Position(const int i=0) const
Definition: MCParticle.h:223
art::ServiceHandle< geo::Geometry > geom
geo::TPCID FindTPCAtPosition(double const worldLoc[3]) const
Returns the ID of the TPC at specified location.
The data type to uniquely identify a TPC.
Definition: geo_types.h:195
double Vx(const int i=0) const
Definition: MCParticle.h:225
double Vz(const int i=0) const
Definition: MCParticle.h:227
double Vy(const int i=0) const
Definition: MCParticle.h:226
void DUNE::MuonTrackingEff::truthMatcher ( std::vector< art::Ptr< recob::Hit >>  AllHits,
std::vector< art::Ptr< recob::Hit >>  track_hits,
const simb::MCParticle *&  MCparticle,
double &  Purity,
double &  Completeness,
double &  TotalRecoEnergy 
)

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 1008 of file MuonTrackingEff_module.cc.

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

Referenced by processEff().

1008  {
1009 
1010  //std::cout<<"truthMatcher..."<<std::endl;
1013  std::map<int,double> trkID_E; //map that connects TrackID and energy for each hit <trackID, energy>
1014  for(size_t j = 0; j < track_hits.size(); ++j){ //loop over all the hits in this track
1015  art::Ptr<recob::Hit> hit = track_hits[j];
1016  std::vector<sim::TrackIDE> TrackIDs = bt_serv->HitToTrackIDEs(hit); //TrackIDE contains TrackID, energy and energyFrac. A hit can have several TrackIDs (so this hit is associated with multiple MC truth track IDs (EM shower IDs are negative). If a hit ahs multiple trackIDs, "energyFrac" contains the fraction of the energy of for each ID compared to the total energy of the hit. "energy" contains only the energy associated with the specific ID in that case. This requires MC truth info!
1017  for(size_t k = 0; k < TrackIDs.size(); k++){ //Loop over the TrackIDs of each hit
1018  trkID_E[TrackIDs[k].trackID] += TrackIDs[k].energy; //sum up the energy for each TrackID and store <TrackID, energy> in "TrkID_E"
1019  }
1020  }
1021 
1022 
1023  double E_em =0.0;
1024  double max_E = -999.0;
1025  double TotalEnergyTrack = 0.0;
1026  int TrackID = -999;
1027  double PartialEnergyTrackID=0.0; // amount of energy deposited by the particle that deposited more energy... tomato potato... blabla
1030  if( !trkID_E.size() ) {
1031  MCparticle = 0;
1032  return; //Ghost track???
1033  }
1034  for(std::map<int,double>::iterator ii = trkID_E.begin(); ii!=trkID_E.end(); ++ii){ //trkID_E contains the trackID (first) and corresponding energy (second) for a specific track, summed up over all events. here looping over all trekID_E's
1035  TotalEnergyTrack += ii->second; //and summing up the energy of all hits in the track (TotalEnergyTrack)
1036  if((ii->second)>max_E){ //looking for the trakID with the highest energy in the track. this is PartialEnergyTrackID and max_E then
1037  PartialEnergyTrackID = ii->second;
1038  max_E = ii->second;
1039  TrackID = ii->first; //saving trackID of the ID with the highest energy contribution in the track to assign it to MCparticle later
1040  if( TrackID < 0 ) E_em += ii->second; //IDs of em shower particles are negative
1041  }
1042  }
1043  MCparticle = pi_serv->TrackIdToParticle_P(TrackID);
1044  //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
1045  //an EM particle, the negative of the parent track ID is saved in TrackIDE for the daughter particle
1046  //we don't want to track gammas or any other EM activity
1047  if( TrackID < 0 ) {return;}
1048 
1049  //Purity = (PartialEnergyTrackID+E_em)/TotalEnergyTrack;
1050  Purity = PartialEnergyTrackID/TotalEnergyTrack;
1051 
1052  //completeness
1053  TotalRecoEnergy =0;
1054  for(size_t k = 0; k < AllHits.size(); ++k){ //loop over all hits (all hits in all tracks of the event, not only the hits in the track we were looking at before)
1055  art::Ptr<recob::Hit> hit = AllHits[k];
1056  std::vector<sim::TrackIDE> TrackIDs = bt_serv->HitToTrackIDEs(hit);
1057  for(size_t l = 0; l < TrackIDs.size(); ++l){ //and over all track IDs of the hits
1058  if(TrackIDs[l].trackID==TrackID) TotalRecoEnergy += TrackIDs[l].energy; //and sum up the energy fraction of all hits that correspond ot the saved trackID
1059  }
1060  }
1061  Completeness = PartialEnergyTrackID/TotalRecoEnergy;
1062 }
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

int DUNE::MuonTrackingEff::BadEvents0MuonTrack =0
private

Definition at line 148 of file MuonTrackingEff_module.cc.

int DUNE::MuonTrackingEff::BadEvents1MuonTrack =0
private

Definition at line 149 of file MuonTrackingEff_module.cc.

int DUNE::MuonTrackingEff::BadEvents2MuonTrack =0
private

Definition at line 150 of file MuonTrackingEff_module.cc.

int DUNE::MuonTrackingEff::BadEvents3MuonTrack =0
private

Definition at line 151 of file MuonTrackingEff_module.cc.

int DUNE::MuonTrackingEff::BadEvents4OrMoreMuonTrack =0
private

Definition at line 152 of file MuonTrackingEff_module.cc.

int DUNE::MuonTrackingEff::CountBadLeadingMuonTrack =0
private

Definition at line 120 of file MuonTrackingEff_module.cc.

int DUNE::MuonTrackingEff::CountBadLeadingMuonTrackAndLeadingPlusSecondBad =0
private

Definition at line 128 of file MuonTrackingEff_module.cc.

Referenced by doEfficiencies().

int DUNE::MuonTrackingEff::CountBadLeadingMuonTrackAndLeadingPlusSecondBadCompleteness =0
private

Definition at line 130 of file MuonTrackingEff_module.cc.

Referenced by doEfficiencies().

int DUNE::MuonTrackingEff::CountBadLeadingMuonTrackAndLeadingPlusSecondBadPurity =0
private

Definition at line 131 of file MuonTrackingEff_module.cc.

Referenced by doEfficiencies().

int DUNE::MuonTrackingEff::CountBadLeadingMuonTrackAndLeadingPlusSecondBadTrackTooLong =0
private

Definition at line 133 of file MuonTrackingEff_module.cc.

Referenced by doEfficiencies().

int DUNE::MuonTrackingEff::CountBadLeadingMuonTrackAndLeadingPlusSecondBadTrackTooShort =0
private

Definition at line 132 of file MuonTrackingEff_module.cc.

Referenced by doEfficiencies().

int DUNE::MuonTrackingEff::CountBadLeadingMuonTrackAndOnlyOneMuonTrack =0
private

Definition at line 126 of file MuonTrackingEff_module.cc.

Referenced by doEfficiencies().

int DUNE::MuonTrackingEff::CountBadLeadingMuonTrackAndOnlyOneMuonTrackCompleteness =0
private

Definition at line 135 of file MuonTrackingEff_module.cc.

int DUNE::MuonTrackingEff::CountBadLeadingMuonTrackAndOnlyOneMuonTrackPurity =0
private

Definition at line 136 of file MuonTrackingEff_module.cc.

int DUNE::MuonTrackingEff::CountBadLeadingMuonTrackAndOnlyOneMuonTrackTrackTooLong =0
private

Definition at line 138 of file MuonTrackingEff_module.cc.

int DUNE::MuonTrackingEff::CountBadLeadingMuonTrackAndOnlyOneMuonTrackTrackTooShort =0
private

Definition at line 137 of file MuonTrackingEff_module.cc.

int DUNE::MuonTrackingEff::CountBadLeadingMuonTrackButLeadingPlusSecondGood =0
private

Definition at line 127 of file MuonTrackingEff_module.cc.

Referenced by doEfficiencies().

int DUNE::MuonTrackingEff::CountCompleteness =0
private

Definition at line 121 of file MuonTrackingEff_module.cc.

Referenced by doEfficiencies().

int DUNE::MuonTrackingEff::CountGoodLeadingMuonTrack =0
private

Definition at line 117 of file MuonTrackingEff_module.cc.

Referenced by doEfficiencies().

int DUNE::MuonTrackingEff::CountMCTruthMuon =0
private

Definition at line 114 of file MuonTrackingEff_module.cc.

Referenced by doEfficiencies().

int DUNE::MuonTrackingEff::CountNoMuonTracks =0
private

Definition at line 119 of file MuonTrackingEff_module.cc.

Referenced by doEfficiencies().

int DUNE::MuonTrackingEff::CountNoRecoTracks =0
private

Definition at line 118 of file MuonTrackingEff_module.cc.

Referenced by doEfficiencies().

int DUNE::MuonTrackingEff::CountPurity =0
private

Definition at line 122 of file MuonTrackingEff_module.cc.

Referenced by doEfficiencies().

int DUNE::MuonTrackingEff::CountRecoMuon =0
private

Definition at line 115 of file MuonTrackingEff_module.cc.

int DUNE::MuonTrackingEff::CountTrackLengthTooLong =0
private

Definition at line 124 of file MuonTrackingEff_module.cc.

Referenced by doEfficiencies().

int DUNE::MuonTrackingEff::CountTrackLengthTooShort =0
private

Definition at line 123 of file MuonTrackingEff_module.cc.

Referenced by doEfficiencies().

double DUNE::MuonTrackingEff::Criteria
private

Definition at line 140 of file MuonTrackingEff_module.cc.

double DUNE::MuonTrackingEff::CriteriaBinMax =6.25
private

Definition at line 293 of file MuonTrackingEff_module.cc.

Referenced by beginJob().

double DUNE::MuonTrackingEff::CriteriaBinMin =-0.25
private

Definition at line 292 of file MuonTrackingEff_module.cc.

Referenced by beginJob().

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

Definition at line 272 of file MuonTrackingEff_module.cc.

int DUNE::MuonTrackingEff::EventCounter =0
private

Definition at line 112 of file MuonTrackingEff_module.cc.

float DUNE::MuonTrackingEff::fFidVolCutX
private

Definition at line 261 of file MuonTrackingEff_module.cc.

Referenced by beginJob().

float DUNE::MuonTrackingEff::fFidVolCutY
private

Definition at line 262 of file MuonTrackingEff_module.cc.

Referenced by beginJob().

float DUNE::MuonTrackingEff::fFidVolCutZ
private

Definition at line 263 of file MuonTrackingEff_module.cc.

Referenced by beginJob().

float DUNE::MuonTrackingEff::fFidVolXmax
private

Definition at line 266 of file MuonTrackingEff_module.cc.

float DUNE::MuonTrackingEff::fFidVolXmin
private

Definition at line 265 of file MuonTrackingEff_module.cc.

float DUNE::MuonTrackingEff::fFidVolYmax
private

Definition at line 268 of file MuonTrackingEff_module.cc.

float DUNE::MuonTrackingEff::fFidVolYmin
private

Definition at line 267 of file MuonTrackingEff_module.cc.

float DUNE::MuonTrackingEff::fFidVolZmax
private

Definition at line 270 of file MuonTrackingEff_module.cc.

float DUNE::MuonTrackingEff::fFidVolZmin
private

Definition at line 269 of file MuonTrackingEff_module.cc.

std::string DUNE::MuonTrackingEff::fMCTruthModuleLabel
private

Definition at line 93 of file MuonTrackingEff_module.cc.

int DUNE::MuonTrackingEff::fMuonPDGCode
private

Definition at line 95 of file MuonTrackingEff_module.cc.

Referenced by processEff().

std::string DUNE::MuonTrackingEff::fTrackModuleLabel
private

Definition at line 94 of file MuonTrackingEff_module.cc.

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

Definition at line 276 of file MuonTrackingEff_module.cc.

Referenced by truthLength().

int DUNE::MuonTrackingEff::GoodEvents1MuonTrack =0
private

Definition at line 143 of file MuonTrackingEff_module.cc.

int DUNE::MuonTrackingEff::GoodEvents2MuonTrack =0
private

Definition at line 144 of file MuonTrackingEff_module.cc.

int DUNE::MuonTrackingEff::GoodEvents3MuonTrack =0
private

Definition at line 145 of file MuonTrackingEff_module.cc.

int DUNE::MuonTrackingEff::GoodEvents4OrMoreMuonTrack =0
private

Definition at line 146 of file MuonTrackingEff_module.cc.

TH1D* DUNE::MuonTrackingEff::h_Completeness
private

Definition at line 157 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_Completeness_ThetaXZ_SinThetaYZ
private

Definition at line 211 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_Criteria_NMuonTrack
private

Definition at line 220 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_Criteria_NMuonTrack_den
private

Definition at line 221 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_Criteria_NMuonTrack_num
private

Definition at line 222 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_Criteria_NRecoTrack
private

Definition at line 215 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_Criteria_NRecoTrack_den
private

Definition at line 216 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_Criteria_NRecoTrack_num
private

Definition at line 217 of file MuonTrackingEff_module.cc.

TH1D* DUNE::MuonTrackingEff::h_DirectionRes
private

Definition at line 162 of file MuonTrackingEff_module.cc.

TH1D* DUNE::MuonTrackingEff::h_Efficiency_SinThetaYZ
private

Definition at line 175 of file MuonTrackingEff_module.cc.

TH1D* DUNE::MuonTrackingEff::h_Efficiency_ThetaXZ
private

Definition at line 165 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_Efficiency_ThetaXZ_SinThetaYZ
private

Definition at line 188 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_Efficiency_ThetaXZ_SinThetaYZ_LeadingPlusSecond
private

Definition at line 202 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_Efficiency_ThetaXZ_ThetaYZ
private

Definition at line 182 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_Efficiency_ThetaXZ_ThetaYZ_DifferenceLeadingAndLeadingPlusSecond
private

Definition at line 199 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_Efficiency_ThetaXZ_ThetaYZ_LeadingPlusSecond
private

Definition at line 194 of file MuonTrackingEff_module.cc.

TH1D* DUNE::MuonTrackingEff::h_Efficiency_ThetaYZ
private

Definition at line 170 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_FailedReconstruction_ThetaXZ_SinThetaYZ
private

Definition at line 191 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_FailedReconstruction_ThetaXZ_ThetaYZ
private

Definition at line 185 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_CompletenessSecondMuon_Angle
private

Definition at line 232 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_CriteriaTwoTracks_Angle
private

Definition at line 233 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_Distance_Angle
private

Definition at line 230 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_FailedCriteria_CompletenessLeading_CompletenessSecond
private

Definition at line 238 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_FailedCriteria_CompletenessSecondMuon_Angle
private

Definition at line 241 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_FailedCriteria_CriteriaTwoTracks_Angle
private

Definition at line 242 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_FailedCriteria_Distance_Angle
private

Definition at line 239 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_FailedCriteria_TrackRes_Completeness
private

Definition at line 236 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_FailedCriteria_TrackResLeading_TrackResSecond
private

Definition at line 237 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_FailedCriteria_TrackResSecondMuon_Angle
private

Definition at line 240 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_Distance_Angle
private

Definition at line 258 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_TrackRes_Completeness
private

Definition at line 256 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_FailedCriteriaAndLeadingPlusSecondBad_TrackResLeading_TrackResSecond
private

Definition at line 257 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_Distance_Angle
private

Definition at line 253 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_TrackRes_Completeness
private

Definition at line 251 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_FailedCriteriaButLeadingPlusSecondGood_TrackResLeading_TrackResSecond
private

Definition at line 252 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_MatchedCriteria_CriteriaTwoTracks_Angle
private

Definition at line 248 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_MatchedCriteria_Distance_Angle
private

Definition at line 247 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_MatchedCriteria_TrackRes_Completeness
private

Definition at line 245 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_MatchedCriteria_TrackResLeading_TrackResSecond
private

Definition at line 246 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_TrackRes_Completeness
private

Definition at line 228 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_TrackResLeading_TrackResSecond
private

Definition at line 229 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_MuonTrackStitching_TrackResSecondMuon_Angle
private

Definition at line 231 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_NoMuonTrack_MaxTrackLength_PDGCode
private

Definition at line 225 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_NoMuonTrack_ThetaXZ_SinThetaYZ
private

Definition at line 208 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_NoRecoTrackAtAll_ThetaXZ_SinThetaYZ
private

Definition at line 207 of file MuonTrackingEff_module.cc.

TH1D* DUNE::MuonTrackingEff::h_Purity
private

Definition at line 156 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_Purity_ThetaXZ_SinThetaYZ
private

Definition at line 212 of file MuonTrackingEff_module.cc.

TH1D* DUNE::MuonTrackingEff::h_SinThetaYZ_den
private

Definition at line 176 of file MuonTrackingEff_module.cc.

TH1D* DUNE::MuonTrackingEff::h_SinThetaYZ_num
private

Definition at line 177 of file MuonTrackingEff_module.cc.

TH1D* DUNE::MuonTrackingEff::h_ThetaXZ_den
private

Definition at line 166 of file MuonTrackingEff_module.cc.

TH1D* DUNE::MuonTrackingEff::h_ThetaXZ_num
private

Definition at line 167 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_ThetaXZ_SinThetaYZ_den
private

Definition at line 189 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_ThetaXZ_SinThetaYZ_LeadingPlusSecondOk
private

Definition at line 203 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_ThetaXZ_SinThetaYZ_LeadingPlusSecondOk_num
private

Definition at line 204 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_ThetaXZ_SinThetaYZ_num
private

Definition at line 190 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_ThetaXZ_ThetaYZ_den
private

Definition at line 183 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_ThetaXZ_ThetaYZ_LeadingPlusSecondOk
private

Definition at line 195 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_ThetaXZ_ThetaYZ_LeadingPlusSecondOk_num
private

Definition at line 196 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_ThetaXZ_ThetaYZ_num
private

Definition at line 184 of file MuonTrackingEff_module.cc.

TH1D* DUNE::MuonTrackingEff::h_ThetaYZ_den
private

Definition at line 171 of file MuonTrackingEff_module.cc.

TH1D* DUNE::MuonTrackingEff::h_ThetaYZ_num
private

Definition at line 172 of file MuonTrackingEff_module.cc.

TH1D* DUNE::MuonTrackingEff::h_TotalRecoEnergy
private

Definition at line 159 of file MuonTrackingEff_module.cc.

TH1D* DUNE::MuonTrackingEff::h_TrackRes
private

Definition at line 158 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_TrackTooLong_ThetaXZ_SinThetaYZ
private

Definition at line 210 of file MuonTrackingEff_module.cc.

TH2D* DUNE::MuonTrackingEff::h_TrackTooShort_ThetaXZ_SinThetaYZ
private

Definition at line 209 of file MuonTrackingEff_module.cc.

TH1D* DUNE::MuonTrackingEff::h_TruthLength
private

Definition at line 160 of file MuonTrackingEff_module.cc.

TH1D* DUNE::MuonTrackingEff::h_VertexRes
private

Definition at line 161 of file MuonTrackingEff_module.cc.

int DUNE::MuonTrackingEff::MCTruthMuonID
private

Definition at line 103 of file MuonTrackingEff_module.cc.

Referenced by processEff().

double DUNE::MuonTrackingEff::MCTruthMuonMomentum
private

Definition at line 104 of file MuonTrackingEff_module.cc.

Referenced by processEff().

double DUNE::MuonTrackingEff::MCTruthMuonThetaXZ =0
private

Definition at line 108 of file MuonTrackingEff_module.cc.

double DUNE::MuonTrackingEff::MCTruthMuonThetaYZ =0
private

Definition at line 109 of file MuonTrackingEff_module.cc.

double DUNE::MuonTrackingEff::MCTruthMuonVertex[4]
private

Definition at line 100 of file MuonTrackingEff_module.cc.

int DUNE::MuonTrackingEff::NCriteriaBins =13
private

Definition at line 291 of file MuonTrackingEff_module.cc.

Referenced by beginJob(), and doEfficiencies().

int DUNE::MuonTrackingEff::NRecoTracksBins =19
private

Definition at line 295 of file MuonTrackingEff_module.cc.

Referenced by beginJob(), and doEfficiencies().

int DUNE::MuonTrackingEff::NSinThetaYZBins =18
private

Definition at line 287 of file MuonTrackingEff_module.cc.

Referenced by beginJob().

int DUNE::MuonTrackingEff::NThetaXZBins =36
private

Definition at line 279 of file MuonTrackingEff_module.cc.

Referenced by beginJob().

int DUNE::MuonTrackingEff::NThetaYZBins =18
private

Definition at line 283 of file MuonTrackingEff_module.cc.

Referenced by beginJob().

double DUNE::MuonTrackingEff::RecoTracksBinMax =9.25
private

Definition at line 297 of file MuonTrackingEff_module.cc.

Referenced by beginJob().

double DUNE::MuonTrackingEff::RecoTracksBinMin =-0.25
private

Definition at line 296 of file MuonTrackingEff_module.cc.

Referenced by beginJob().

int DUNE::MuonTrackingEff::SinThetaYZBinMax =1
private

Definition at line 289 of file MuonTrackingEff_module.cc.

Referenced by beginJob().

int DUNE::MuonTrackingEff::SinThetaYZBinMin =-1
private

Definition at line 288 of file MuonTrackingEff_module.cc.

Referenced by beginJob().

int DUNE::MuonTrackingEff::ThetaXZBinMax =360
private

Definition at line 281 of file MuonTrackingEff_module.cc.

Referenced by beginJob().

int DUNE::MuonTrackingEff::ThetaXZBinMin =0
private

Definition at line 280 of file MuonTrackingEff_module.cc.

Referenced by beginJob().

int DUNE::MuonTrackingEff::ThetaYZBinMax =90
private

Definition at line 285 of file MuonTrackingEff_module.cc.

Referenced by beginJob().

int DUNE::MuonTrackingEff::ThetaYZBinMin =-90
private

Definition at line 284 of file MuonTrackingEff_module.cc.

Referenced by beginJob().

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

Definition at line 273 of file MuonTrackingEff_module.cc.

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

Definition at line 275 of file MuonTrackingEff_module.cc.

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

Definition at line 274 of file MuonTrackingEff_module.cc.


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