All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
t0::MCParticleHitMatching Class Reference
Inheritance diagram for t0::MCParticleHitMatching:

Public Member Functions

 MCParticleHitMatching (fhicl::ParameterSet const &p)
 
 MCParticleHitMatching (MCParticleHitMatching const &)=delete
 
 MCParticleHitMatching (MCParticleHitMatching &&)=delete
 
MCParticleHitMatchingoperator= (MCParticleHitMatching const &)=delete
 
MCParticleHitMatchingoperator= (MCParticleHitMatching &&)=delete
 

Private Member Functions

void produce (art::Event &e) override
 

Private Attributes

std::unique_ptr
< IHitParticleAssociations
fHitParticleAssociations
 
bool fOverrideRealData
 if real data, tell it to run anyway (=0) More...
 

Detailed Description

Definition at line 39 of file MCParticleHitMatching_module.cc.

Constructor & Destructor Documentation

t0::MCParticleHitMatching::MCParticleHitMatching ( fhicl::ParameterSet const &  p)
explicit

Definition at line 62 of file MCParticleHitMatching_module.cc.

63  : EDProducer{pset}
64 {
65  // Get the tool for MC Truth matching
66  //const fhicl::ParameterSet& hitPartAssnsParams = pset.get<fhicl::ParameterSet>("HitParticleAssociations"); // unused
67 
68  fOverrideRealData = pset.get<bool>("OverrideRealData", false);
69 
70  // Get the tool for MC Truth matching
71  fHitParticleAssociations = art::make_tool<IHitParticleAssociations>(pset.get<fhicl::ParameterSet>("HitParticleAssociations"));
72 
73  produces<HitParticleAssociations> ();
74 }
bool fOverrideRealData
if real data, tell it to run anyway (=0)
std::unique_ptr< IHitParticleAssociations > fHitParticleAssociations
t0::MCParticleHitMatching::MCParticleHitMatching ( MCParticleHitMatching const &  )
delete
t0::MCParticleHitMatching::MCParticleHitMatching ( MCParticleHitMatching &&  )
delete

Member Function Documentation

MCParticleHitMatching& t0::MCParticleHitMatching::operator= ( MCParticleHitMatching const &  )
delete
MCParticleHitMatching& t0::MCParticleHitMatching::operator= ( MCParticleHitMatching &&  )
delete
void t0::MCParticleHitMatching::produce ( art::Event &  e)
overrideprivate

Definition at line 76 of file MCParticleHitMatching_module.cc.

77 {
78  if(evt.isRealData() && !fOverrideRealData) return;
79 
80  std::unique_ptr<HitParticleAssociations> MCPartHitassn( new HitParticleAssociations);
81 
82  fHitParticleAssociations->CreateHitParticleAssociations(evt, MCPartHitassn.get());
83 
84  evt.put(std::move(MCPartHitassn));
85 } // Produce
art::Assns< simb::MCParticle, recob::Hit, anab::BackTrackerHitMatchingData > HitParticleAssociations
bool fOverrideRealData
if real data, tell it to run anyway (=0)
std::unique_ptr< IHitParticleAssociations > fHitParticleAssociations
TCEvent evt
Definition: DataStructs.cxx:8

Member Data Documentation

std::unique_ptr<IHitParticleAssociations> t0::MCParticleHitMatching::fHitParticleAssociations
private

Definition at line 57 of file MCParticleHitMatching_module.cc.

bool t0::MCParticleHitMatching::fOverrideRealData
private

if real data, tell it to run anyway (=0)

Definition at line 58 of file MCParticleHitMatching_module.cc.


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