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

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 NCNNKerasVal (fhicl::ParameterSet const &p)
 
virtual ~NCNNKerasVal ()
 
void analyze (const art::Event &evt)
 
void beginJob ()
 
void beginRun (art::Run const &run)
 
void reconfigure (fhicl::ParameterSet const &p)
 
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 fSliceLabel
 
std::string fCellHitLabel
 
std::string fVertexLabel
 
std::string fProngLabel
 
std::string fProngInstance
 
std::string fCVNLabel
 
std::string fShowerLIDLabel
 
std::string fShowerLabel
 
std::string fCosmicTrackLabel
 
std::string fMCTruthModuleLabel
 
std::string fPIDLibPath
 
std::string fNCKerasFile
 
std::string fNCCosRejPIDFile
 
std::string fCosRejLabel
 
keras::KerasModelkeras_5nn
 
TTree * fTree
 
float cosmicid
 
float shwGap
 
float shwnhit
 
float shwnhitx
 
float shwnhity
 
float shwwwidth
 
float shwcalE
 
float partptp
 
float shwdirY
 
float shwlen
 
float shwxminusy
 
float shwxplusy
 
float shwxovery
 
float nmiphit
 
float nshwlid
 
float kerasValue
 
float abdtValue
 
float gbdtValue
 
fhicl::ParameterSet fParticleIDAlgPSet
 

Detailed Description

Definition at line 62 of file NCNNKerasVal_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

ncid::NCNNKerasVal::NCNNKerasVal ( fhicl::ParameterSet const &  p)
explicit

Definition at line 120 of file NCNNKerasVal_module.cc.

References reconfigure().

120  :
121  EDAnalyzer(p),
122  fMCTruthModuleLabel(p.get< std::string>("MCTruthModuleLabel")),
123  //fParticleIDAlg(0),
124  fParticleIDAlgPSet(p.get< fhicl::ParameterSet >("ParticleIDAlgPSet"))
125  {
126  this->reconfigure(p);
127  }
const char * p
Definition: xmltok.h:285
fhicl::ParameterSet fParticleIDAlgPSet
void reconfigure(fhicl::ParameterSet const &p)
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
std::string fMCTruthModuleLabel
enum BeamMode string
ncid::NCNNKerasVal::~NCNNKerasVal ( )
virtual

Definition at line 130 of file NCNNKerasVal_module.cc.

131  {
132  }

Member Function Documentation

void ncid::NCNNKerasVal::analyze ( const art::Event evt)

OK, Cuts/////////////// Event Quality Cuts

NC Official Containment Cuts

Definition at line 190 of file NCNNKerasVal_module.cc.

References rb::CellHit::Cell(), slid::CompareByEnergy(), keras::KerasModel::compute_output(), cosmicid, DEFINE_ART_MODULE(), allTimeWatchdog::endl, fCellHitLabel, fCosRejLabel, fCVNLabel, art::fill_ptr_vector(), check_time_usage::float, fMCTruthModuleLabel, fProngInstance, fProngLabel, fShowerLIDLabel, fSliceLabel, fTree, fVertexLabel, art::DataViewImpl::getByLabel(), rb::RecoHit::IsCalibrated(), rb::Cluster::IsNoise(), keras_5nn, kerasValue, geo::kXorY, m, rb::Cluster::MostContiguousPlanes(), simb::MCTruth::NeutrinoSet(), nmiphit, nshwlid, partptp, rb::RecoHit::PECorr(), art::PtrVector< T >::push_back(), rb::RecoHit::RecoHit(), keras::DataChunk::set_data(), ncid::NCKeras::SetCosPIDKeras(), shwcalE, shwdirY, shwGap, shwlen, shwnhit, shwnhitx, shwnhity, shwwwidth, shwxminusy, shwxovery, shwxplusy, cheat::BackTracker::SliceToMCTruth(), and registry_explorer::v.

191  {
193  bool isMCTruthListEmpty = false;
195  try {
196  evt.getByLabel(fMCTruthModuleLabel, mclist);
197  if(mclist->empty()) isMCTruthListEmpty = true;
198  }
199  catch(...) { isMCTruthListEmpty = true; }
200  if(isMCTruthListEmpty){
201  mf::LogError("MCTruth Error") << "Error retrieving MCTruth list." << std::endl;
202  return;
203  }
204 
205  // Get the slices in the event
207  evt.getByLabel( fSliceLabel, sliceHandle);
208 
209  std::vector<art::Ptr<rb::Cluster> > slices;
210  art::fill_ptr_vector(slices, sliceHandle);
211 
213  evt.getByLabel(fCellHitLabel, htHandle);
214 
216  for(unsigned int m = 0; m < htHandle->size(); ++m){
217  allHits.push_back(art::Ptr<rb::CellHit>(htHandle,m));
218  }
219  // Get things associated with slices
220  art::FindManyP<rb::Prong> prongAssn(sliceHandle, evt, art::InputTag(fProngLabel, fProngInstance));
221  art::FindMany<slid::ShowerLID> showerLidAssn(sliceHandle, evt, fShowerLIDLabel);
223  art::FindManyP<rb::Vertex> vertexAssn(sliceHandle, evt, fVertexLabel);
224  const int nslices = slices.size();
225  cosmicid = -5.; // CVN values
226  shwGap = -5.; // LIDShower values
227  shwnhit = -5.;
228  shwnhitx = -5.;
229  shwnhity = -5.;
230  shwwwidth = -5.;
231  shwcalE = -5.;
232  partptp = -5.; //nckeras.ProngTransMom();
233  shwdirY = -5.;
234  shwlen = -5.;
235  kerasValue = -5.;
236 
237  // Loop over slices
238  for(int isli = 0; isli < nslices; ++isli){
239  art::Ptr<rb::Cluster> thisSlice = slices.at(isli);
240  if(thisSlice->IsNoise()) continue;
241  if(!prongAssn.isValid()) continue;
242  //Get True neutrino info
243  std::vector<cheat::NeutrinoEffPur> SlicePurr = bt->SliceToMCTruth(slices[isli]->AllCells(), slices[isli]->AllCells());
244 
245  if(SlicePurr.size() == 0) continue;
246 
247  const art::Ptr<simb::MCTruth> &SliceTruth = SlicePurr[0].neutrinoInt;
248  if(!SliceTruth->NeutrinoSet()) continue;
249 
250  ncid::NCKeras nckeras;
251  std::vector< art::Ptr<rb::Prong> > prongs = prongAssn.at(isli);
252  if(prongs.empty()) continue;
253 
254  art::FindManyP<cvn::Result> fmCVN(slices, evt, fCVNLabel);
255  // CVN Validation
256  if(!fmCVN.isValid()) continue;
257 
258  std::vector< art::Ptr<cosrej::NueCosRej> > cosrejs = fmcr.at(isli);
259  if(cosrejs.empty()) continue;
260 
261  std::vector< art::Ptr<cvn::Result> > cvns = fmCVN.at(isli);
262  // showerLidAssn Validation
263  if(!showerLidAssn.isValid()) continue;
264 
265  std::vector<const slid::ShowerLID*> shwlids = showerLidAssn.at(isli);
266  if(shwlids.empty()) continue;
267 
268  sort(shwlids.begin(), shwlids.end(), slid::CompareByEnergy);
269  art::FindOneP<rb::Shower> foSh(shwlids, evt, fShowerLIDLabel);
270  nshwlid = shwlids.size();
271  cet::maybe_ref< art::Ptr<rb::Shower> const > roSh(foSh.at(0));
272  art::Ptr<rb::Shower> shower = roSh.ref();
273  std::vector< art::Ptr<rb::Shower> > showers;
274  showers.push_back(shower);
275 
276  art::FindOneP<slid::ShowerLID> foShLID(showers, evt,fShowerLIDLabel);
277  // foShLID validation
278  if(!foShLID.isValid()) continue;
279 
280  cet::maybe_ref< art::Ptr<slid::ShowerLID> const > roShLID(foShLID.at(0));
281  art::Ptr<slid::ShowerLID> showerLID = roShLID.ref();
282  /////////////OK, Cuts///////////////
283  /// Event Quality Cuts
284  if(cosrejs[0]->HitsPerPlane() >= 8) continue;
285  if(showers.size() == 0) continue;
286  if(showerLID->Gap() >= 100.) continue;
287  if(thisSlice->MostContiguousPlanes(geo::kXorY) <= 2) continue;
288  /// NC Official Containment Cuts
289  if(cosrejs[0]->StartDistToFront() < 10) continue;
290  if(cosrejs[0]->StopDistToFront() < 10) continue;
291  if(cosrejs[0]->StartDistToBack() < 10) continue;
292  if(cosrejs[0]->StopDistToBack() < 10) continue;
293  if(cosrejs[0]->StartDistToTop() < 10) continue;
294  if(cosrejs[0]->StopDistToTop() < 10) continue;
295  if(cosrejs[0]->StartDistToWest() < 10) continue;
296  if(cosrejs[0]->StopDistToWest() < 10) continue;
297  if(cosrejs[0]->StartDistToEast() < 10) continue;
298  if(cosrejs[0]->StopDistToEast() < 10) continue;
299 
300  int nMipHitt = 0;
301  for(size_t hitIdx = 0; hitIdx < slices[isli]->NCell(); ++hitIdx){
302  const art::Ptr<rb::CellHit>& chptr = slices[isli]->Cell(hitIdx);
303  const rb::RecoHit Reco = slices[isli]->RecoHit(chptr);
304  if(!Reco.IsCalibrated()) continue;
305  if((Reco.PECorr() > 100.0) && (Reco.PECorr() < 245.0)) nMipHitt++;
306  } // end of hits loop
307 
308  if(!cvns.empty()) cosmicid = cvns[0]->fOutput[14];
309  shwGap = showerLID->Gap();
310  shwnhit = shower->NCell();
311  shwwwidth = showerLID->Radius();
312  shwcalE = showerLID->ShowerEnergy();
313  shwnhitx = shower->NXCell();
314  shwdirY = (float)shower->Dir().Y();
315  shwnhity = shower->NYCell();
316  shwlen = shower->TotalLength();
320  nmiphit = nMipHitt;
321  partptp = cosrejs[0]->ParticleShowerTransMom();
322 
323  // Keras model
324  keras::DataChunk *sample = new keras::DataChunkFlat();
325  float myfloats[] = {partptp,
326  cosmicid,
327  nmiphit,
328  shwcalE,
329  shwnhit,
330  nshwlid,
331  shwnhitx,
332  shwnhity,
333  shwxminusy,
334  shwxplusy,
335  shwxovery,
336  shwdirY,
337  shwlen,
338  shwwwidth,
339  shwGap};
340 
341  std::vector<float> v (myfloats, myfloats + sizeof(myfloats) / sizeof(float) );
342  sample->set_data(v);
343  kerasValue = keras_5nn->compute_output(sample)[0];
344  nckeras.SetCosPIDKeras(kerasValue);
345  delete sample;
346 
347  fTree->Fill();
348  } // end loop over slices
349  } // end of analyzer
X or Y views.
Definition: PlaneGeo.h:30
void SetCosPIDKeras(double input)
Definition: NCKeras.h:28
virtual void set_data(std::vector< std::vector< std::vector< float > > > const &)
Definition: KerasModel.h:38
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
std::vector< float > compute_output(keras::DataChunk *dc)
Definition: KerasModel.cxx:354
bool CompareByEnergy(const slid::ShowerLID *a, const slid::ShowerLID *b)
Definition: ShowerLID.cxx:51
Calibrated quantities relying on position in the orthogonal view. To generate a rb::CellHit from a rb...
Definition: RecoHit.h:19
unsigned short Cell() const
Definition: CellHit.h:40
keras::KerasModel * keras_5nn
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:441
bool IsCalibrated() const
You MUST check here before accessing PECorr, MIP or GeV.
Definition: RecoHit.cxx:35
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
int MostContiguousPlanes(geo::View_t view) const
Longest run of adjacent planes with hits.
Definition: Cluster.cxx:635
std::string fMCTruthModuleLabel
bool NeutrinoSet() const
Definition: MCTruth.h:77
float PECorr() const
Definition: RecoHit.cxx:47
bool IsNoise() const
Is the noise flag set?
Definition: Cluster.h:163
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:464
std::vector< NeutrinoEffPur > SliceToMCTruth(const std::vector< const rb::CellHit * > &sliceHits, const std::vector< const rb::CellHit * > &allHits, bool sortPur=false) const
Given a collection of hits (often a slice), returns vector of structures of MCTruth, efficiency, and purity of that neutrino interaction relative to the slice. Efficiency is defined as FLS energy from neutrino interaction in slice / total FLS energy from neutrino interaction in event. This vector is sorted from the highest efficiency interaction to lowest. This function returns all MCTruth, including those without neutrino interactions, i.e. cosmics.
void ncid::NCNNKerasVal::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 152 of file NCNNKerasVal_module.cc.

References abdtValue, cosmicid, fTree, gbdtValue, kerasValue, art::TFileDirectory::make(), nmiphit, nshwlid, partptp, shwcalE, shwdirY, shwGap, shwlen, shwnhit, shwnhitx, shwnhity, shwwwidth, shwxminusy, shwxovery, and shwxplusy.

153  {
155  fTree = tfs->make<TTree>("Testtree", "Testtree");
156 
157  fTree->Branch("cosmicid", &cosmicid, "cosmicid/F");
158  fTree->Branch("shwGap", &shwGap, "shwGap/F");
159  fTree->Branch("shwnhit", &shwnhit, "shwnhit/F");
160  fTree->Branch("shwnhitx", &shwnhitx, "shwnhitx/F");
161  fTree->Branch("shwnhity", &shwnhity, "shwnhity/F");
162  fTree->Branch("shwwwidth", &shwwwidth, "shwwwidth/F");
163  fTree->Branch("shwcalE", &shwcalE, "shwcalE/F");
164  fTree->Branch("partptp", &partptp, "partptp/F");
165  fTree->Branch("shwdirY", &shwdirY, "shwdirY/F");
166  fTree->Branch("shwlen", &shwlen, "shwlen/F");
167  fTree->Branch("shwxminusy", &shwxminusy, "shwxminusy/F");
168  fTree->Branch("shwxplusy", &shwxplusy, "shwxplusy/F");
169  fTree->Branch("shwxovery", &shwxovery, "shwxovery/F");
170  fTree->Branch("nmiphit", &nmiphit, "nmiphit/F");
171  fTree->Branch("nshwlid", &nshwlid, "nshwlid/F");
172  fTree->Branch("kerasValue", &kerasValue, "kerasValue/F");
173  fTree->Branch("abdtValue", &abdtValue, "abdtValue/F");
174  fTree->Branch("gbdtValue", &gbdtValue, "gbdtValue/F");
175  }
T * make(ARGS...args) const
void ncid::NCNNKerasVal::beginRun ( art::Run const &  run)
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 178 of file NCNNKerasVal_module.cc.

References allTimeWatchdog::endl, util::EnvExpansion(), cet::file_exists(), fNCKerasFile, fPIDLibPath, keras_5nn, and string.

179  {
181  // Make sure we can find the Neural Networks weight file
182  if(!cet::file_exists(pidlibpath+fNCKerasFile)){
183  throw cet::exception("NCKeras")
184  << "Couldn't find file " << pidlibpath+fNCKerasFile <<std::endl;
185  }
186  keras_5nn = new keras::KerasModel(pidlibpath+fNCKerasFile, false);
187  }
std::string EnvExpansion(const std::string &inString)
Function to expand environment variables.
Definition: EnvExpand.cxx:8
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
keras::KerasModel * keras_5nn
bool file_exists(std::string const &qualified_filename)
enum BeamMode string
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
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited
std::string const& art::EventObserverBase::processName ( ) const
inlineinherited
void ncid::NCNNKerasVal::reconfigure ( fhicl::ParameterSet const &  p)

Definition at line 135 of file NCNNKerasVal_module.cc.

References fCellHitLabel, fCosRejLabel, fCVNLabel, fMCTruthModuleLabel, fNCKerasFile, fParticleIDAlgPSet, fPIDLibPath, fProngInstance, fProngLabel, fShowerLabel, fShowerLIDLabel, fSliceLabel, fhicl::ParameterSet::get(), and string.

Referenced by NCNNKerasVal().

136  {
137  fMCTruthModuleLabel = p.get< std::string >("MCTruthModuleLabel");
138  fSliceLabel = p.get< std::string >("SliceLabel");
139  fCellHitLabel = p.get< std::string >("CellHitLabel");
140  fProngLabel = p.get< std::string >("ProngLabel");
141  fProngInstance = p.get< std::string >("ProngInstance");
142  fCVNLabel = p.get< std::string >("CVNLabel");
143  fShowerLabel = p.get< std::string >("ShowerLabel");
144  fShowerLIDLabel = p.get< std::string >("ShowerLIDLabel");
145  fPIDLibPath = p.get< std::string >("PIDLibPath");
146  fNCKerasFile = p.get< std::string >("NCKerasFile");
147  fCosRejLabel = p.get< std::string >("CosRejLabel");
148  fParticleIDAlgPSet = p.get< fhicl::ParameterSet >("ParticleIDAlgPSet");
149  }
const char * p
Definition: xmltok.h:285
fhicl::ParameterSet fParticleIDAlgPSet
T get(std::string const &key) const
Definition: ParameterSet.h:231
std::string fMCTruthModuleLabel
enum BeamMode string
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

float ncid::NCNNKerasVal::abdtValue
private

Definition at line 106 of file NCNNKerasVal_module.cc.

Referenced by beginJob().

float ncid::NCNNKerasVal::cosmicid
private

Definition at line 90 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and beginJob().

std::string ncid::NCNNKerasVal::fCellHitLabel
private

Definition at line 74 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and reconfigure().

std::string ncid::NCNNKerasVal::fCosmicTrackLabel
private

Definition at line 81 of file NCNNKerasVal_module.cc.

std::string ncid::NCNNKerasVal::fCosRejLabel
private

Definition at line 86 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and reconfigure().

std::string ncid::NCNNKerasVal::fCVNLabel
private

Definition at line 78 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and reconfigure().

std::string ncid::NCNNKerasVal::fMCTruthModuleLabel
private

Definition at line 82 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and reconfigure().

std::string ncid::NCNNKerasVal::fNCCosRejPIDFile
private

Definition at line 85 of file NCNNKerasVal_module.cc.

std::string ncid::NCNNKerasVal::fNCKerasFile
private

Definition at line 84 of file NCNNKerasVal_module.cc.

Referenced by beginRun(), and reconfigure().

fhicl::ParameterSet ncid::NCNNKerasVal::fParticleIDAlgPSet
private

Definition at line 109 of file NCNNKerasVal_module.cc.

Referenced by reconfigure().

std::string ncid::NCNNKerasVal::fPIDLibPath
private

Definition at line 83 of file NCNNKerasVal_module.cc.

Referenced by beginRun(), and reconfigure().

std::string ncid::NCNNKerasVal::fProngInstance
private

Definition at line 77 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and reconfigure().

std::string ncid::NCNNKerasVal::fProngLabel
private

Definition at line 76 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and reconfigure().

std::string ncid::NCNNKerasVal::fShowerLabel
private

Definition at line 80 of file NCNNKerasVal_module.cc.

Referenced by reconfigure().

std::string ncid::NCNNKerasVal::fShowerLIDLabel
private

Definition at line 79 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and reconfigure().

std::string ncid::NCNNKerasVal::fSliceLabel
private

Definition at line 73 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and reconfigure().

TTree* ncid::NCNNKerasVal::fTree
private

Definition at line 88 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and beginJob().

std::string ncid::NCNNKerasVal::fVertexLabel
private

Definition at line 75 of file NCNNKerasVal_module.cc.

Referenced by analyze().

float ncid::NCNNKerasVal::gbdtValue
private

Definition at line 107 of file NCNNKerasVal_module.cc.

Referenced by beginJob().

keras::KerasModel* ncid::NCNNKerasVal::keras_5nn
private

Definition at line 87 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and beginRun().

float ncid::NCNNKerasVal::kerasValue
private

Definition at line 105 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and beginJob().

float ncid::NCNNKerasVal::nmiphit
private

Definition at line 103 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and beginJob().

float ncid::NCNNKerasVal::nshwlid
private

Definition at line 104 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and beginJob().

float ncid::NCNNKerasVal::partptp
private

Definition at line 97 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and beginJob().

float ncid::NCNNKerasVal::shwcalE
private

Definition at line 96 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and beginJob().

float ncid::NCNNKerasVal::shwdirY
private

Definition at line 98 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and beginJob().

float ncid::NCNNKerasVal::shwGap
private

Definition at line 91 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and beginJob().

float ncid::NCNNKerasVal::shwlen
private

Definition at line 99 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and beginJob().

float ncid::NCNNKerasVal::shwnhit
private

Definition at line 92 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and beginJob().

float ncid::NCNNKerasVal::shwnhitx
private

Definition at line 93 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and beginJob().

float ncid::NCNNKerasVal::shwnhity
private

Definition at line 94 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and beginJob().

float ncid::NCNNKerasVal::shwwwidth
private

Definition at line 95 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and beginJob().

float ncid::NCNNKerasVal::shwxminusy
private

Definition at line 100 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and beginJob().

float ncid::NCNNKerasVal::shwxovery
private

Definition at line 102 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and beginJob().

float ncid::NCNNKerasVal::shwxplusy
private

Definition at line 101 of file NCNNKerasVal_module.cc.

Referenced by analyze(), and beginJob().


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