Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
G4MismatchAna Class Reference
Inheritance diagram for G4MismatchAna:
art::EDAnalyzer art::EventObserverBase art::Consumer art::EngineCreator

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 G4MismatchAna (fhicl::ParameterSet const &p)
 
 G4MismatchAna (G4MismatchAna const &)=delete
 
 G4MismatchAna (G4MismatchAna &&)=delete
 
G4MismatchAnaoperator= (G4MismatchAna const &)=delete
 
G4MismatchAnaoperator= (G4MismatchAna &&)=delete
 
void analyze (art::Event const &e) override
 
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< Tconsumes (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< Tconsumes (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< TconsumesView (InputTag const &it)
 
template<typename T , BranchType = InEvent>
ProductToken< TmayConsume (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< TmayConsume (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< TmayConsumeView (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 fGenLabel
 
std::string fG4Label
 
std::string fSRLabel
 
TTree * fGENIETree
 
TTree * fSliceTree
 
int fRun
 
int fSubRun
 
int fEvent
 
int fCycle
 
int fTruth
 
int fSlice
 
bool fIsMismatched
 
double fNuEnergy
 
int fNuPDG
 
bool fIsLeptonMissing
 
double fLepEnergy
 
int fLepPDG
 
double fW
 
double fX
 
double fY
 
double fQSqr
 
int fMissingParticles
 
double fMissingEnergy
 
double fNumuCosRej
 
double fNumuReMID
 
double fNumuCVN
 
double fNueCosRejCore
 
double fNueCosRejPeri
 
double fNueCVN
 
double fNCCVN
 

Detailed Description

Definition at line 31 of file G4MismatchAna_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

G4MismatchAna::G4MismatchAna ( fhicl::ParameterSet const &  p)
explicit

Definition at line 93 of file G4MismatchAna_module.cc.

References fCycle, fEvent, fGENIETree, fIsLeptonMissing, fIsMismatched, fLepEnergy, fLepPDG, fMissingEnergy, fMissingParticles, fNCCVN, fNueCosRejCore, fNueCVN, fNuEnergy, fNumuCosRej, fNumuCVN, fNumuReMID, fNuPDG, fQSqr, fRun, fSlice, fSliceTree, fSubRun, fTruth, fW, fX, fY, and art::TFileDirectory::make().

94  :
95  EDAnalyzer(p),
96  fGenLabel(p.get<std::string>("GenLabel")),
97  fG4Label(p.get<std::string>("G4Label")),
98  fSRLabel(p.get<std::string>("SRLabel"))
99 {
101 
102  // Set up input tree
103  fGENIETree = tfs->make<TTree>("G4MismatchGENIE", "G4MismatchGENIE");
104 
105  fGENIETree->Branch("Run", &fRun);
106  fGENIETree->Branch("SubRun", &fSubRun);
107  fGENIETree->Branch("Event", &fEvent);
108  fGENIETree->Branch("Cycle", &fCycle);
109  fGENIETree->Branch("Truth", &fTruth);
110  fGENIETree->Branch("IsMismatched", &fIsMismatched);
111  fGENIETree->Branch("NuEnergy", &fNuEnergy);
112  fGENIETree->Branch("NuPDG", &fNuPDG);
113  fGENIETree->Branch("IsLeptonMissing", &fIsLeptonMissing);
114  fGENIETree->Branch("LepEnergy", &fLepEnergy);
115  fGENIETree->Branch("LepPDG", &fLepPDG);
116  fGENIETree->Branch("W", &fW);
117  fGENIETree->Branch("X", &fX);
118  fGENIETree->Branch("Y", &fY);
119  fGENIETree->Branch("QSqr", &fQSqr);
120  fGENIETree->Branch("MissingParticles", &fMissingParticles);
121  fGENIETree->Branch("MissingEnergy", &fMissingEnergy);
122 
123  fSliceTree = tfs->make<TTree>("G4MismatchSlice", "G4MismatchSlice");
124 
125  fSliceTree->Branch("Run", &fRun);
126  fSliceTree->Branch("SubRun", &fSubRun);
127  fSliceTree->Branch("Event", &fEvent);
128  fSliceTree->Branch("Cycle", &fCycle);
129  fSliceTree->Branch("Slice", &fSlice);
130  fSliceTree->Branch("IsMismatched", &fIsMismatched);
131  fSliceTree->Branch("NuEnergy", &fNuEnergy);
132  fSliceTree->Branch("NuPDG", &fNuPDG);
133  fSliceTree->Branch("IsLeptonMissing", &fIsLeptonMissing);
134  fSliceTree->Branch("LepEnergy", &fLepEnergy);
135  fSliceTree->Branch("LepPDG", &fLepPDG);
136  fSliceTree->Branch("W", &fW);
137  fSliceTree->Branch("X", &fX);
138  fSliceTree->Branch("Y", &fY);
139  fSliceTree->Branch("QSqr", &fQSqr);
140  fSliceTree->Branch("MissingParticles", &fMissingParticles);
141  fSliceTree->Branch("MissingEnergy", &fMissingEnergy);
142  fSliceTree->Branch("NumuCosRej", &fNumuCosRej);
143  fSliceTree->Branch("NumuReMID", &fNumuReMID);
144  fSliceTree->Branch("NumuCVN", &fNumuCVN);
145  fSliceTree->Branch("NueCosRejCore", &fNueCosRejCore);
146  fSliceTree->Branch("NueCosRejPeri", &fNueCosRejCore);
147  fSliceTree->Branch("NueCVN", &fNueCVN);
148  fSliceTree->Branch("NCCVN", &fNCCVN);
149 }
const char * p
Definition: xmltok.h:285
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
T * make(ARGS...args) const
enum BeamMode string
G4MismatchAna::G4MismatchAna ( G4MismatchAna const &  )
delete
G4MismatchAna::G4MismatchAna ( G4MismatchAna &&  )
delete

Member Function Documentation

void G4MismatchAna::analyze ( art::Event const &  e)
overridevirtual

Implements art::EDAnalyzer.

Definition at line 151 of file G4MismatchAna_module.cc.

References caf::SRNueCosRej::cospidcorebdt, caf::SRNueCosRej::cospidperibdt, caf::SRIDBranch::cosrej, om::cout, caf::SRIDBranch::cvnloosepreselptp, caf::SRHeader::cycle, DEFINE_ART_MODULE(), release_diff::diff, caf::SRLorentzVector::E, simb::MCParticle::E(), allTimeWatchdog::endl, art::EventID::event(), stan::math::fabs(), fCycle, fEvent, fG4Label, fGENIETree, fGenLabel, art::fill_ptr_vector(), fIsLeptonMissing, fIsMismatched, fLepEnergy, fLepPDG, fMissingEnergy, fMissingParticles, fNCCVN, fNueCosRejCore, fNueCosRejPeri, fNueCVN, fNuEnergy, fNumuCosRej, fNumuCVN, fNumuReMID, fNuPDG, modifyFHiCL::found, fQSqr, fRun, fSlice, fSliceTree, fSRLabel, fSubRun, fTruth, fW, fX, fY, art::DataViewImpl::getByLabel(), simb::MCTruth::GetNeutrino(), simb::MCTruth::GetParticle(), caf::StandardRecord::hdr, MECModelEnuComparisons::i, art::Event::id(), calib::j, simb::MCNeutrino::Lepton(), make_pair(), caf::StandardRecord::mc, caf::SRCVNResult::ncid, art::errors::NotFound, simb::MCTruth::NParticles(), caf::SRTruthBranch::nu, simb::MCNeutrino::Nu(), caf::SRIDBranch::nuecosrej, caf::SRCVNResult::nueid, caf::SRCosRej::numucontpid2020, caf::SRCVNResult::numuid, caf::SRTrueParticle::p, part, caf::SRTrueParticle::pdg, simb::MCParticle::PdgCode(), caf::SRRemid::pid, simb::MCParticle::Position(), art::errors::ProductNotFound, simb::MCNeutrino::QSqr(), caf::SRIDBranch::remid, art::EventID::run(), caf::StandardRecord::sel, sr, simb::MCParticle::StatusCode(), art::EventID::subRun(), simb::MCNeutrino::W(), simb::MCNeutrino::X(), and simb::MCNeutrino::Y().

152 {
153  // Get GENIE information
155  try { e.getByLabel(fGenLabel, truthList); }
156  catch(...) { throw art::Exception(art::errors::ProductNotFound) << "Failed to get MC truth information."; }
157  std::vector<art::Ptr<simb::MCTruth>> truthPtrs;
158  art::fill_ptr_vector(truthPtrs, truthList);
159  // const simb::MCTruth* truth = truthPtrs[0].get();
160 
161  // Get G4 information
163  try { e.getByLabel(fG4Label, g4List); }
164  catch(...) { throw art::Exception(art::errors::ProductNotFound) << "Failed to get simulated particles."; }
165  std::vector<art::Ptr<sim::Particle>> particles;
166  art::fill_ptr_vector(particles, g4List);
167 
168  // Get SR information
170  try { e.getByLabel(fSRLabel, srList); }
171  catch(...) { throw art::Exception(art::errors::ProductNotFound) << "Failed to get standard record."; }
172  std::vector<art::Ptr<caf::StandardRecord>> srPtrs;
173  art::fill_ptr_vector(srPtrs, srList);
174 
175  // Reset tree variables that need resetting
176  fIsMismatched = false;
177  fIsLeptonMissing = true;
178  fMissingParticles = 0;
179  fMissingEnergy = 0;
180  fCycle = -5;
181 
182  // Fill event info
183  fRun = e.id().run();
184  fSubRun = e.id().subRun();
185  fEvent = e.id().event();
186 
187  // Loop over G4 particles to find primary lepton
188  for (size_t i = 0; i < truthPtrs.size(); ++i) {
189 
190  const simb::MCTruth* truth = truthPtrs[i].get();
191 
192  fTruth = i;
193 
194  // Neutrino and lepton truth information
195  fIsMismatched = false;
196  fIsLeptonMissing = true;
197  simb::MCNeutrino nu = truth->GetNeutrino();
198  fNuEnergy = nu.Nu().E();
199  fNuPDG = nu.Nu().PdgCode();
200  fLepEnergy = nu.Lepton().E();
201  fLepPDG = nu.Lepton().PdgCode();
202  fW = nu.W();
203  fX = nu.X();
204  fY = nu.Y();
205  fQSqr = nu.QSqr();
206 
207  for (art::Ptr<sim::Particle> part : particles) {
208  if (part->Mother() == 0 && part->PdgCode() == fLepPDG && fabs(part->E()-fLepEnergy) < 0.01) {
209  fIsLeptonMissing = false; // found the lepton in G4 record
210  break;
211  }
212  }
213 
214  // Construct a list of GENIE primary particles
215  std::vector<std::pair<int, double>> primaries;
216  for (size_t i = 0; i < (size_t)truth->NParticles(); ++i) {
218  if (part.StatusCode() == 1 && part.PdgCode() < 2000000000) {
219  primaries.push_back(std::make_pair(part.PdgCode(), part.E()));
220  }
221  }
222 
223  // Look for all primaries in G4 truth list
224  for (auto primary : primaries) {
225  bool found = false;
226  for (art::Ptr<sim::Particle> part : particles) {
227  // If it's a G4 particle with the same PDG code and within 10 MeV energy,
228  // call them matched. This isn't infallible but the chances of false positives
229  // should be small compared to the rate at which mismatches occur
230  if (part->Mother() == 0 && part->PdgCode() == primary.first
231  && fabs(part->E()-primary.second) < 0.01) {
232  found = true;
233  break; // if we found this primary, don't need to keep looping
234  }
235  } // for G4 particle
236  if (!found) { // if there's a missing particle, then make note of that
237  fIsMismatched = true;
239  fMissingEnergy += primary.second;
240  } // if particle is missing
241  } // for primary
242 
243  // Spit out a warning message if we have a mismatch here
244  if (fIsMismatched) {
246  << "////////////////////////////////////////////" << std::endl
247  << "/ /" << std::endl
248  << "/ GENIE VS GEANT MISMATCH FOUND! /" << std::endl
249  << "/ /" << std::endl
250  << "////////////////////////////////////////////" << std::endl
251  << std::endl;
252  }
253 
254  fGENIETree->Fill();
255 
256  }
257 
258  for (size_t i = 0; i < srPtrs.size(); ++i) {
259 
260  const caf::StandardRecord* sr = srPtrs[i].get();
261 
262  // If we haven't matched any GENIE truth to this slice, just skip it
263  if (sr->mc.nu.size() == 0) continue;
264 
265  // Loop over generators to find the one that matches this slice
266  const simb::MCTruth* tru = nullptr;
267  for (art::Ptr<simb::MCTruth> truth : truthPtrs) {
268  TVector3 genPos = truth->GetNeutrino().Nu().Position().Vect();
269  TVector3 slcPos = sr->mc.nu[0].vtx;
270  TVector3 diff = genPos - slcPos;
271  if (diff.Mag() < 0.01) { // If vertices match within 0.01cm, call it a match
272  tru = truth.get();
273  break; // Found what we were looking for
274  }
275  }
276  if (!tru) throw art::Exception(art::errors::NotFound) << "No valid GENIE truth found for this slice.";
277 
278  fSlice = i;
279  fCycle = sr->hdr.cycle;
280 
282  fNumuReMID = sr->sel.remid.pid;
284 
288 
290 
291 
292  // Neutrino and lepton truth information
293  fIsMismatched = false;
294  fIsLeptonMissing = true;
295  fMissingParticles = 0;
296  fMissingEnergy = 0;
297  simb::MCNeutrino nu = tru->GetNeutrino();
298  fNuEnergy = nu.Nu().E();
299  fNuPDG = nu.Nu().PdgCode();
300  fLepEnergy = nu.Lepton().E();
301  fLepPDG = nu.Lepton().PdgCode();
302  fW = nu.W();
303  fX = nu.X();
304  fY = nu.Y();
305  fQSqr = nu.QSqr();
306 
307  // Loop over G4 particles to find primary lepton
308  for (size_t j = 0; j < sr->mc.nu[0].prim.size(); ++j) {
309  caf::SRTrueParticle p = sr->mc.nu[0].prim[j];
310  if (p.pdg == fLepPDG && fabs(p.p.E-fLepEnergy) < 0.01) {
311  fIsLeptonMissing = false; // found the lepton in G4 record
312  break;
313  }
314  }
315 
316  // Get GENIE primaries for this specific interaction
317  std::vector<std::pair<int, double>> primaries;
318  for (size_t i = 0; i < (size_t)tru->NParticles(); ++i) {
319  simb::MCParticle part = tru->GetParticle(i);
320  if (part.StatusCode() == 1 && part.PdgCode() < 2000000000) {
321  primaries.push_back(std::make_pair(part.PdgCode(), part.E()));
322  }
323  }
324 
325  // Loop over GENIE primaries
326  for (auto primary : primaries) {
327  bool found = false;
328  // Loop over G4 particles in StandardRecord
329  for (size_t j = 0; j < sr->mc.nu[0].prim.size(); ++j) {
330  caf::SRTrueParticle p = sr->mc.nu[0].prim[j];
331  if (primary.first == p.pdg && fabs(primary.second-p.p.E) < 0.01) {
332  found = true;
333  break;
334  }
335  }
336  if (!found) { // If there's a particle missing, keep track of what it is
337  fIsMismatched = true;
339  fMissingEnergy += primary.second;
340  }
341  }
342  fSliceTree->Fill();
343 
344  } // for slice i
345 
346 }
double E(const int i=0) const
Definition: MCParticle.h:232
float ncid
Likelihood Neutral Current.
Definition: SRCVNResult.h:23
const TLorentzVector & Position(const int i=0) const
Definition: MCParticle.h:218
int PdgCode() const
Definition: MCParticle.h:211
double QSqr() const
Definition: MCNeutrino.h:157
const simb::MCNeutrino & GetNeutrino() const
Definition: MCTruth.h:76
SRHeader hdr
Header branch: run, subrun, etc.
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
SRCosRej cosrej
Output from CosRej (Cosmic Rejection)
Definition: SRIDBranch.h:47
int Mother() const
Definition: MCParticle.h:212
const char * p
Definition: xmltok.h:285
const simb::MCParticle & Nu() const
Definition: MCNeutrino.h:146
int StatusCode() const
Definition: MCParticle.h:210
std::pair< Spectrum *, CheatDecomp * > make_pair(SpectrumLoaderBase &loader_data, SpectrumLoaderBase &loader_mc, HistAxis *axis, Cut *cut, const SystShifts &shift, const Var &wei)
Definition: DataMCLoad.C:336
SRCVNResult cvnloosepreselptp
Output from CVN - Loose Presel plus PtP cut (many-class PID)
Definition: SRIDBranch.h:54
int NParticles() const
Definition: MCTruth.h:74
float nueid
Likelihood Charge Current NuE.
Definition: SRCVNResult.h:21
float cospidperibdt
Nue cosrej PID for the peripheral sample for 2020+.
Definition: SRNueCosRej.h:126
TString part[npart]
Definition: Style.C:32
float pid
PID value output by kNN.
Definition: SRRemid.h:25
const simb::MCParticle & Lepton() const
Definition: MCNeutrino.h:147
double W() const
Definition: MCNeutrino.h:154
double Y() const
Definition: MCNeutrino.h:156
SRNueCosRej nuecosrej
Output from NueCosRej (Nue Cosmic Rejection)
Definition: SRIDBranch.h:48
SRRemid remid
Output from RecoMuonID (ReMId) package.
Definition: SRIDBranch.h:39
float cospidcorebdt
Nue cosrej PID for the core sample for 2020+.
Definition: SRNueCosRej.h:128
caf::StandardRecord * sr
double X() const
Definition: MCNeutrino.h:155
const double j
Definition: BetheBloch.cxx:29
OStream cout
Definition: OStream.cxx:6
const simb::MCParticle & GetParticle(int i) const
Definition: MCTruth.h:75
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
The StandardRecord is the primary top-level object in the Common Analysis File trees.
SRIDBranch sel
Selector (PID) branch.
float numuid
Likelihood Charge Current NuMu.
Definition: SRCVNResult.h:20
SRTruthBranch mc
Truth branch for MC: energy, flavor, etc.
Event generator information.
Definition: MCTruth.h:32
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:464
float numucontpid2020
cosmic rejection PID for contained events; 2020 Analysis
Definition: SRCosRej.h:34
Float_t e
Definition: plot.C:35
Event generator information.
Definition: MCNeutrino.h:18
Definition: fwd.h:28
std::vector< SRNeutrino > nu
implemented as a vector to maintain mc.nu structure, i.e. not a pointer, but with 0 or 1 entries...
Definition: SRTruthBranch.h:25
int cycle
MC simulation cycle number.
Definition: SRHeader.h:23
SRLorentzVector p
Momentum 4-vector.
detail::CachedProducts& art::EventObserverBase::cachedProducts ( )
inlineprotectedinherited

Definition at line 79 of file EventObserverBase.h.

References art::EventObserverBase::selectors_.

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 146 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

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

Definition at line 161 of file Consumer.h.

References T.

162 {
163  if (!moduleContext_)
164  return;
165 
166  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
167 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
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 171 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

172 {
173  if (!moduleContext_)
174  return ViewToken<T>::invalid();
175 
176  consumables_[BT].emplace_back(ConsumableType::ViewElement,
177  TypeID{typeid(T)},
178  it.label(),
179  it.instance(),
180  it.process());
181  return ViewToken<T>{it};
182 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited
CurrentProcessingContext const* art::EDAnalyzer::currentContext ( ) const
protectedinherited
seed_t art::EngineCreator::get_seed_value ( fhicl::ParameterSet const &  pset,
char const  key[] = "seed",
seed_t const  implicit_seed = -1 
)
inherited
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_.

62  {
64  }
detail::CachedProducts selectors_
art::Handle< art::TriggerResults > getOneTriggerResults(Event const &) const
Float_t e
Definition: plot.C:35
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 189 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

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

Definition at line 204 of file Consumer.h.

References T.

205 {
206  if (!moduleContext_)
207  return;
208 
209  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
210 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
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 214 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

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

Definition at line 25 of file EventObserverBase.h.

26  {
27  return false;
28  }
static cet::exempt_ptr<Consumer> art::Consumer::non_module_context ( )
staticinherited
G4MismatchAna& G4MismatchAna::operator= ( G4MismatchAna const &  )
delete
G4MismatchAna& G4MismatchAna::operator= ( G4MismatchAna &&  )
delete
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited
std::string const& art::EventObserverBase::processName ( ) const
inlineinherited
void art::EventObserverBase::registerProducts ( MasterProductRegistry ,
ProductDescriptions ,
ModuleDescription const &   
)
inlineinherited

Definition at line 33 of file EventObserverBase.h.

References string.

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

Definition at line 56 of file EventObserverBase.h.

References art::EventObserverBase::selector_config_id_.

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

Referenced by art::RootOutput::endJob().

void art::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited
bool art::EventObserverBase::wantAllEvents ( ) const
inlineinherited

Definition at line 46 of file EventObserverBase.h.

References art::EventObserverBase::wantAllEvents_.

Referenced by art::RootOutput::RootOutput().

47  {
48  return wantAllEvents_;
49  }
bool art::EventObserverBase::wantEvent ( Event const &  e)
inlineinherited

Definition at line 51 of file EventObserverBase.h.

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

52  {
53  return selectors_.wantEvent(e);
54  }
detail::CachedProducts selectors_
Float_t e
Definition: plot.C:35
bool wantEvent(Event const &)
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 G4MismatchAna::fCycle
private

Definition at line 61 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

int G4MismatchAna::fEvent
private

Definition at line 60 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

std::string G4MismatchAna::fG4Label
private

Definition at line 50 of file G4MismatchAna_module.cc.

Referenced by analyze().

TTree* G4MismatchAna::fGENIETree
private

Definition at line 54 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

std::string G4MismatchAna::fGenLabel
private

Definition at line 49 of file G4MismatchAna_module.cc.

Referenced by analyze().

bool G4MismatchAna::fIsLeptonMissing
private

Definition at line 68 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

bool G4MismatchAna::fIsMismatched
private

Definition at line 65 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

double G4MismatchAna::fLepEnergy
private

Definition at line 69 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

int G4MismatchAna::fLepPDG
private

Definition at line 70 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

double G4MismatchAna::fMissingEnergy
private

Definition at line 78 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

int G4MismatchAna::fMissingParticles
private

Definition at line 77 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

double G4MismatchAna::fNCCVN
private

Definition at line 88 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

double G4MismatchAna::fNueCosRejCore
private

Definition at line 84 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

double G4MismatchAna::fNueCosRejPeri
private

Definition at line 85 of file G4MismatchAna_module.cc.

Referenced by analyze().

double G4MismatchAna::fNueCVN
private

Definition at line 86 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

double G4MismatchAna::fNuEnergy
private

Definition at line 66 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

double G4MismatchAna::fNumuCosRej
private

Definition at line 80 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

double G4MismatchAna::fNumuCVN
private

Definition at line 82 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

double G4MismatchAna::fNumuReMID
private

Definition at line 81 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

int G4MismatchAna::fNuPDG
private

Definition at line 67 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

double G4MismatchAna::fQSqr
private

Definition at line 75 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

int G4MismatchAna::fRun
private

Definition at line 58 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

int G4MismatchAna::fSlice
private

Definition at line 63 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

TTree* G4MismatchAna::fSliceTree
private

Definition at line 55 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

std::string G4MismatchAna::fSRLabel
private

Definition at line 51 of file G4MismatchAna_module.cc.

Referenced by analyze().

int G4MismatchAna::fSubRun
private

Definition at line 59 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

int G4MismatchAna::fTruth
private

Definition at line 62 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

double G4MismatchAna::fW
private

Definition at line 72 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

double G4MismatchAna::fX
private

Definition at line 73 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().

double G4MismatchAna::fY
private

Definition at line 74 of file G4MismatchAna_module.cc.

Referenced by analyze(), and G4MismatchAna().


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