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

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 FeatureVertexFinderAna (fhicl::ParameterSet const &pset)
 
virtual ~FeatureVertexFinderAna ()
 
void analyze (const art::Event &evt)
 
void beginJob ()
 
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< 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 fLArG4ModuleLabel
 
std::string fGenieModuleLabel
 
std::string fVertexModuleLabel
 
std::string fEndPoint2dModuleLabel
 
TH1F * fRun
 
TH1F * fEvt
 
TH1F * fTruthVtxXPos
 
TH1F * fTruthVtxYPos
 
TH1F * fTruthVtxZPos
 
TH1F * fTruthWireNumberPlane0
 
TH1F * fTruthTimeTickPlane0
 
TH1F * fTruthWireNumberPlane1
 
TH1F * fTruthTimeTickPlane1
 
TH1F * fTruthWireNumberPlane2
 
TH1F * fTruthTimeTickPlane2
 
TH1F * fTruthWireInCmPlane0
 
TH1F * fTruthTimeInCmPlane0
 
TH1F * fTruthWireInCmPlane1
 
TH1F * fTruthTimeInCmPlane1
 
TH1F * fTruthWireInCmPlane2
 
TH1F * fTruthTimeInCmPlane2
 
TH1F * fTwoDNVtxPlane0
 
TH1F * fTwoDNVtxPlane1
 
TH1F * fTwoDNVtxPlane2
 
TH1F * fTwoDWireNumberPlane0
 
TH1F * fTwoDTimeTickPlane0
 
TH1F * fTwoDWireNumberPlane1
 
TH1F * fTwoDTimeTickPlane1
 
TH1F * fTwoDWireNumberPlane2
 
TH1F * fTwoDTimeTickPlane2
 
TH1F * fTwoDWireInCmPlane0
 
TH1F * fTwoDTimeInCmPlane0
 
TH1F * fTwoDWireInCmPlane1
 
TH1F * fTwoDTimeInCmPlane1
 
TH1F * fTwoDWireInCmPlane2
 
TH1F * fTwoDTimeInCmPlane2
 
TH1F * fTwoDStrengthPlane0
 
TH1F * fTwoDStrengthPlane1
 
TH1F * fTwoDStrengthPlane2
 
TH1F * fRecoCheck2dWireNumPlane0
 
TH1F * fRecoCheck2dTimeTickPlane0
 
TH1F * fRecoCheck2dWireInCmPlane0
 
TH1F * fRecoCheck2dTimeInCmPlane0
 
TH1F * fRecoCheck2dWireNumPlane1
 
TH1F * fRecoCheck2dTimeTickPlane1
 
TH1F * fRecoCheck2dWireInCmPlane1
 
TH1F * fRecoCheck2dTimeInCmPlane1
 
TH1F * fRecoCheck2dWireNumPlane2
 
TH1F * fRecoCheck2dTimeTickPlane2
 
TH1F * fRecoCheck2dWireInCmPlane2
 
TH1F * fRecoCheck2dTimeInCmPlane2
 
TH1F * fRecoVtxN3d
 
TH1F * fRecoVtxXPos
 
TH1F * fRecoVtxYPos
 
TH1F * fRecoVtxZPos
 
TH1F * fRecoCheck3dVtxX
 
TH1F * fRecoCheck3dVtxY
 
TH1F * fRecoCheck3dVtxZ
 
TH2D * fRecoCheck3dVtxXvsX
 
TH2D * fRecoCheck3dVtxYvsY
 
TH2D * fRecoCheck3dVtxZvsZ
 

Detailed Description

Definition at line 80 of file FeatureVertexFinderAna_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

vertex::FeatureVertexFinderAna::FeatureVertexFinderAna ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 174 of file FeatureVertexFinderAna_module.cc.

References reconfigure().

175  : EDAnalyzer(pset)
176 {
177  this->reconfigure(pset);
178 }
void reconfigure(fhicl::ParameterSet const &p)
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
vertex::FeatureVertexFinderAna::~FeatureVertexFinderAna ( )
virtual

Definition at line 181 of file FeatureVertexFinderAna_module.cc.

182 {
183 }

Member Function Documentation

void vertex::FeatureVertexFinderAna::analyze ( const art::Event evt)

Definition at line 278 of file FeatureVertexFinderAna_module.cc.

References detinfo::DetectorProperties::ConvertXToTicks(), DEFINE_ART_MODULE, detinfo::DetectorProperties::DriftVelocity(), detinfo::DetectorProperties::Efield(), art::EventID::event(), fEndPoint2dModuleLabel, fEvt, fGenieModuleLabel, fLArG4ModuleLabel, fRecoCheck2dTimeInCmPlane0, fRecoCheck2dTimeInCmPlane1, fRecoCheck2dTimeInCmPlane2, fRecoCheck2dTimeTickPlane0, fRecoCheck2dTimeTickPlane1, fRecoCheck2dTimeTickPlane2, fRecoCheck2dWireInCmPlane0, fRecoCheck2dWireInCmPlane1, fRecoCheck2dWireInCmPlane2, fRecoCheck2dWireNumPlane0, fRecoCheck2dWireNumPlane1, fRecoCheck2dWireNumPlane2, fRecoCheck3dVtxX, fRecoCheck3dVtxXvsX, fRecoCheck3dVtxY, fRecoCheck3dVtxYvsY, fRecoCheck3dVtxZ, fRecoCheck3dVtxZvsZ, fRecoVtxN3d, fRecoVtxXPos, fRecoVtxYPos, fRecoVtxZPos, fRun, fTruthTimeInCmPlane0, fTruthTimeInCmPlane1, fTruthTimeInCmPlane2, fTruthTimeTickPlane0, fTruthTimeTickPlane1, fTruthTimeTickPlane2, fTruthVtxXPos, fTruthVtxYPos, fTruthVtxZPos, fTruthWireInCmPlane0, fTruthWireInCmPlane1, fTruthWireInCmPlane2, fTruthWireNumberPlane0, fTruthWireNumberPlane1, fTruthWireNumberPlane2, fTwoDNVtxPlane0, fTwoDNVtxPlane1, fTwoDNVtxPlane2, fTwoDStrengthPlane0, fTwoDStrengthPlane1, fTwoDStrengthPlane2, fTwoDTimeInCmPlane0, fTwoDTimeInCmPlane1, fTwoDTimeInCmPlane2, fTwoDTimeTickPlane0, fTwoDTimeTickPlane1, fTwoDTimeTickPlane2, fTwoDWireInCmPlane0, fTwoDWireInCmPlane1, fTwoDWireInCmPlane2, fTwoDWireNumberPlane0, fTwoDWireNumberPlane1, fTwoDWireNumberPlane2, fVertexModuleLabel, art::DataViewImpl::getByLabel(), simb::MCTruth::GetParticle(), detinfo::DetectorProperties::GetXTicksOffset(), art::Event::id(), geo::GeometryCore::IteratePlaneIDs(), geo::GeometryCore::NearestWire(), art::PtrVector< T >::push_back(), art::Event::run(), detinfo::DetectorProperties::SamplingRate(), art::PtrVector< T >::size(), detinfo::DetectorProperties::Temperature(), geo::GeometryCore::Views(), simb::MCParticle::Vx(), and geo::GeometryCore::WirePitch().

279 {
280 
281  // ###############################
282  // ### Filling Run/Event Histo ###
283  // ###############################
284  fRun->Fill( evt.run() );
285  fEvt->Fill( evt.id().event() );
286 
287  // ##############################################
288  // ### Getting the Geant Information Directly ###
289  // ##############################################
291  evt.getByLabel(fLArG4ModuleLabel, mcParticleHandle);
292 
293  // #######################################
294  // ### Getting MC Truth Info from simb ###
295  // #######################################
296  art::Handle< std::vector<simb::MCTruth> > mctruthListHandle;
297  evt.getByLabel(fGenieModuleLabel,mctruthListHandle);
298 
299  // ############################################
300  // ### Getting information from BackTrackerService ###
301  // ############################################
303 
304  // ####################################
305  // ### Getting Geometry Information ###
306  // ####################################
308 
309  // ###################################
310  // ### Getting Detector Properties ###
311  // ###################################
312  const detinfo::DetectorProperties* detp = lar::providerFrom<detinfo::DetectorPropertiesService>();
313 
314  // ######################################################
315  // ### Getting 2d Vertex information (vertex2dHandle) ###
316  // ######################################################
318  evt.getByLabel(fEndPoint2dModuleLabel,vertex2dHandle);
319 
320  // ##################################################
321  // ### Getting the 3d Vertex (vertex3dListHandle) ###
322  // ##################################################
323  art::Handle< std::vector<recob::Vertex> > vertex3dListHandle;
324  evt.getByLabel(fVertexModuleLabel,vertex3dListHandle);
325 
326 
327 
328  // ==========================================================
329  // === Detector numbers that are useful (to be set later) ===
330  // ==========================================================
331  //size_t nplanes = 0;
332  std::vector<double> WirePitch_CurrentPlane(geom->Views().size(), 0.); //<---Setting the Wire pitch for each plane
333  // Right now assuming only 3 planes
334  // ##############################
335  // ### get the wire pitch for each view ###
336  // ##############################
337  size_t vn = 0;
338  for(auto v : geom->Views() ){
339  WirePitch_CurrentPlane[vn] = geom->WirePitch(v);
340  ++vn;
341  }
342 
343  // ##################################################
344  // ### Calculating the Timetick to CM conversion ###
345  // ##################################################
346  float TimeTick = detp->SamplingRate()/1000.; //<---To get units of microsecond...not nanosec
347  float DriftVelocity = detp->DriftVelocity(detp->Efield(),detp->Temperature());
348 
349  float TimetoCm = TimeTick*DriftVelocity;
350 
351 
352 
353 
354 // ===========================================================================================================
355 // ==================================== Looping over MC information ==========================================
356 // ===========================================================================================================
357 
358 
359  // ##################################
360  // ### Getting MC Truth simb Info ###
361  // ##################################
363  for (unsigned int ii = 0; ii < mctruthListHandle->size(); ++ii)
364  {
365  art::Ptr<simb::MCTruth> mctparticle(mctruthListHandle,ii);
366  mclist.push_back(mctparticle);
367  }
368 
369  // ##############################################
370  // ### Variables for truth vertex information ###
371  // ##############################################
372  float truth_vertex[5] = {0.}; //<---Truth x,y,z information
373 
374  uint32_t VtxWireNum[3] = {0}; //<---Wire number in each plane ( WireNum[plane#] )
375  double VtxTimeTick[3] = {0.}; //<---Time tick in each plane ( TimeTick[plane#] )
376 
377  double VtxWireNum_InCM[3] = {0.}; //<---Wire number in each plane in CM ( WireNum[plane#] )
378  double VtxTimeTick_InCM[3] = {0.}; //<---Time tick in each plane in CM ( TimeTick[plane#] )
379 
380 
381  // ###################################
382  // ### Finding the MC truth vertex ###
383  // ###################################
384  for( unsigned int i = 0; i < mclist.size(); ++i )
385  {
386  art::Ptr<simb::MCTruth> mc(mclist[i]);
387  simb::MCParticle neut(mc->GetParticle(i));
388 
389  // ############################################
390  // ### Filling the vertex x,y,z information ###
391  // ############################################
392  truth_vertex[0] =neut.Vx();
393  truth_vertex[1] =neut.Vy();
394  truth_vertex[2] =neut.Vz();
395 
396  }// end i loop
397 
398  // ### Filling Histograms ###
399  fTruthVtxXPos->Fill( truth_vertex[0] );
400  fTruthVtxYPos->Fill( truth_vertex[1] );
401  fTruthVtxZPos->Fill( truth_vertex[2] );
402 
403  // ##############################
404  // ### Looping over geo::PlaneIDs ###
405  // ##############################
406  for(auto const& pid : geom->IteratePlaneIDs()){
407  // ############################################################################
408  // ### Calculating the nearest wire the vertex corresponds to in each plane ###
409  // ############################################################################
410 
411  try{
412  // geom->NearestWire(worldLoc[3], Plane#, TPC#, Cyrostat#)
413  VtxWireNum[pid.Plane] = geom->NearestWire(truth_vertex,pid.Plane,pid.TPC,pid.Cryostat);
414  }
415  catch(...){
416  mf::LogWarning("FeatureVertexFinderAna") << "Can't find nearest wire";
417  continue;
418  }
419  // detp->ConvertXToTicks(xpos, plane#, TPC#, Cyrostat#)
420  VtxTimeTick[pid.Plane] = (detp->ConvertXToTicks(truth_vertex[0],pid.Plane, pid.TPC, pid.Cryostat)
421  + detp->GetXTicksOffset(pid.Plane, pid.TPC, pid.Cryostat));
422 
423  // ======================== Translating each of these in cm =====================
424  VtxWireNum_InCM[pid.Plane] = VtxWireNum[pid.Plane] * WirePitch_CurrentPlane[pid.Plane];
425  VtxTimeTick_InCM[pid.Plane] = VtxTimeTick[pid.Plane] * TimetoCm;
426  }//<---End pid loop
427 
428  // ### Filling Histograms ###
429  fTruthWireNumberPlane0->Fill( VtxWireNum[0] );
430  fTruthTimeTickPlane0->Fill( VtxTimeTick[0] );
431  fTruthWireNumberPlane1->Fill( VtxWireNum[1] );
432  fTruthTimeTickPlane1->Fill( VtxTimeTick[1] );
433  fTruthWireNumberPlane2->Fill( VtxWireNum[2] );
434  fTruthTimeTickPlane2->Fill( VtxTimeTick[2] );
435 
436  fTruthWireInCmPlane0->Fill( VtxWireNum_InCM[0] );
437  fTruthTimeInCmPlane0->Fill( VtxTimeTick_InCM[0] );
438  fTruthWireInCmPlane1->Fill( VtxWireNum_InCM[1] );
439  fTruthTimeInCmPlane1->Fill( VtxTimeTick_InCM[1] );
440  fTruthWireInCmPlane2->Fill( VtxWireNum_InCM[2] );
441  fTruthTimeInCmPlane2->Fill( VtxTimeTick_InCM[2] );
442 
443 
444 // ===================================================================================================================
445 // ==================================== Looping over EndPoint2d information ==========================================
446 // ===================================================================================================================
447 
449 
450  // Variables for Vertex2d
451 
452  double Vertex2d_TimeTick[10000] = {0.}; //<---Vertex2d Time Tick for the current plane ( TimeTick[#2d] )
453  double Vertex2d_Wire[10000] = {0.}; //<---Veretx2d Wire # ( Wire[#2d] )
454 
455  double Vertex2d_TimeTick_InCM[10000] = {0.}; //<---Vertex 2d Time tick in CM ( TimeTick[#2d] )
456  double Vertex2d_Wire_InCM[10000] = {0.}; //<---Veretx2d Wire in CM ( Wire[#2d] )
457  int n2dVtx = 0;
458 
459  int n2dVtxPlane0 = 0, n2dVtxPlane1 = 0, n2dVtxPlane2 = 0;
460 
461  bool vertexWstrengthplane0 = false , vertexWstrengthplane1 = false;//, vertexWstrengthplane2 = false; //commented out, Wes, 12.4.13
462 
463  // ######################################
464  // ### Loop over the EndPoint2d List ###
465  // ######################################
466  for(size_t ii = 0; ii < vertex2dHandle->size(); ++ii){
467  art::Ptr<recob::EndPoint2D> vertex(vertex2dHandle, ii);
468  vert2d.push_back(vertex);
469  }
470 
471  // ############################################
472  // ### If we have 2d vertex, loop over them ###
473  // ############################################
474  if(vert2d.size() > 0)
475  {
476 
477  // ##############################
478  // ### Looping over geo::PlaneIDs ###
479  // ##############################
480  for(auto const& pid : geom->IteratePlaneIDs() ){
481  for(size_t ww = 0; ww<vert2d.size(); ++ww){
482  //std::cout<<"plane = "<<plane<<std::endl;
483  //std::cout<<"vert2d[ww]->WireID().Plane = "<<vert2d[ww]->WireID().Plane<<std::endl;
484  // Only look at this 2d vertex if it is in the current plane
485  if (vert2d[ww]->WireID().planeID() != pid){continue;}
486 
487  Vertex2d_TimeTick[n2dVtx] = vert2d[ww]->DriftTime();
488  Vertex2d_Wire[n2dVtx] = vert2d[ww]->WireID().Wire;
489 
490  // ======================== Translating each of these in cm =====================
491  Vertex2d_Wire_InCM[n2dVtx] = Vertex2d_Wire[n2dVtx] * WirePitch_CurrentPlane[pid.Plane];
492  //std::cout<<"Vertex2d_Wire[n2dVtx] = "<<Vertex2d_Wire[n2dVtx]<<" , WirePitch_CurrentPlane[plane] = "<<WirePitch_CurrentPlane[plane]<<std::endl;
493  //std::cout<<"Vertex2d_Wire_InCM[n2dVtx] = "<<Vertex2d_Wire_InCM[n2dVtx]<<std::endl;
494  Vertex2d_TimeTick_InCM[n2dVtx] = Vertex2d_TimeTick[n2dVtx] * TimetoCm;
495 
496  // ###########################################################################
497  // ### Checking how well we did in reconstructing the vertex (Reco - True) ###
498  // ###########################################################################
499 
500  float RecoCheck_TimeTick = Vertex2d_TimeTick[n2dVtx] - VtxTimeTick[pid.Plane];
501  float RecoCheck_WireNum = Vertex2d_Wire[n2dVtx] - VtxWireNum[pid.Plane];
502 
503  float RecoCheck_TimeInCm = Vertex2d_TimeTick_InCM[n2dVtx] - VtxTimeTick_InCM[pid.Plane];
504  float RecoCheck_WireInCm = Vertex2d_Wire_InCM[n2dVtx] - VtxWireNum_InCM[pid.Plane];
505 
506 
507 
508  if( vert2d[ww]->Strength() > -1)
509  {
510  if(pid.Plane == 0)
511  {
512  vertexWstrengthplane0 = true;
513  //std::cout<<"Filling Plane 0 "<<std::endl;
514  //std::cout<<"Vertex2d_Wire[n2dVtx] = "<<Vertex2d_Wire[n2dVtx]<<std::endl;
515 
516  fTwoDWireNumberPlane0->Fill( Vertex2d_Wire[n2dVtx] );
517  fTwoDTimeTickPlane0->Fill( Vertex2d_TimeTick[n2dVtx] );
518  fTwoDWireInCmPlane0->Fill( Vertex2d_Wire_InCM[n2dVtx] );
519  fTwoDTimeInCmPlane0->Fill( Vertex2d_TimeTick_InCM[n2dVtx] );
520 
521  fTwoDStrengthPlane0->Fill( vert2d[ww]->Strength() );
522 
523  fRecoCheck2dWireNumPlane0->Fill( RecoCheck_WireNum );
524  fRecoCheck2dTimeTickPlane0->Fill( RecoCheck_TimeTick );
525  fRecoCheck2dWireInCmPlane0->Fill( RecoCheck_WireInCm );
526  fRecoCheck2dTimeInCmPlane0->Fill( RecoCheck_TimeInCm );
527 
528  n2dVtxPlane0++;
529 
530  }//<---End Plane 0
531 
532  if(pid.Plane == 1)
533  {
534  vertexWstrengthplane1 = true;
535  fTwoDWireNumberPlane1->Fill( Vertex2d_Wire[n2dVtx] );
536  fTwoDTimeTickPlane1->Fill( Vertex2d_TimeTick[n2dVtx] );
537  fTwoDWireInCmPlane1->Fill( Vertex2d_Wire_InCM[n2dVtx] );
538  fTwoDTimeInCmPlane1->Fill( Vertex2d_TimeTick_InCM[n2dVtx] );
539 
540  fTwoDStrengthPlane1->Fill( vert2d[ww]->Strength() );
541 
542  fRecoCheck2dWireNumPlane1->Fill( RecoCheck_WireNum );
543  fRecoCheck2dTimeTickPlane1->Fill( RecoCheck_TimeTick );
544  fRecoCheck2dWireInCmPlane1->Fill( RecoCheck_WireInCm );
545  fRecoCheck2dTimeInCmPlane1->Fill( RecoCheck_TimeInCm );
546 
547  n2dVtxPlane1++;
548 
549  }//<---End Plane 1
550 
551  if(pid.Plane == 2)
552  {
553  //vertexWstrengthplane2 = true;
554  fTwoDWireNumberPlane2->Fill( Vertex2d_Wire[n2dVtx] );
555  fTwoDTimeTickPlane2->Fill( Vertex2d_TimeTick[n2dVtx] );
556  fTwoDWireInCmPlane2->Fill( Vertex2d_Wire_InCM[n2dVtx] );
557  fTwoDTimeInCmPlane2->Fill( Vertex2d_TimeTick_InCM[n2dVtx] );
558 
559  fTwoDStrengthPlane2->Fill( vert2d[ww]->Strength() );
560 
561  fRecoCheck2dWireNumPlane2->Fill( RecoCheck_WireNum );
562  fRecoCheck2dTimeTickPlane2->Fill( RecoCheck_TimeTick );
563  fRecoCheck2dWireInCmPlane2->Fill( RecoCheck_WireInCm );
564  fRecoCheck2dTimeInCmPlane2->Fill( RecoCheck_TimeInCm );
565 
566  n2dVtxPlane2++;
567 
568 
569  }//<---End Plane 2
570  }
571 
572 
573  ++n2dVtx;
574  }//<--end ww loop
575 
576 
577  }//<---End plane ID
578 
579  }//<--End checking if we have 2d end points
580 
581  fTwoDNVtxPlane0->Fill( n2dVtxPlane0 );
582  fTwoDNVtxPlane1->Fill( n2dVtxPlane1 );
583  fTwoDNVtxPlane2->Fill( n2dVtxPlane2 );
584 
585  // =================================================================================================================
586 // ==================================== Looping over 3dVertex information ==========================================
587 // =================================================================================================================
589 
590  double xyz[3] = {0.};
591 
592  for(unsigned int ii = 0; ii < vertex3dListHandle->size(); ++ii)
593  {
594  art::Ptr<recob::Vertex> vertex3d(vertex3dListHandle, ii);
595  Vertexlist.push_back(vertex3d); // class member
596 
597  }//<---End ii loop
598 
599  if(Vertexlist.size() > 0 && vertexWstrengthplane0 && vertexWstrengthplane1)
600  {
601 
602  fRecoVtxN3d->Fill(Vertexlist.size());
603  for(unsigned int ww = 0; ww<Vertexlist.size(); ww++)
604  {
605  Vertexlist[ww]->XYZ(xyz);
606 
607  // ###########################################################################
608  // ### Checking how well we did in reconstructing the vertex (Reco - True) ###
609  // ###########################################################################
610 
611  // === Finding the Delta X, Y, Z between Reco vtx and truth ===
612 
613  double DeltaX = xyz[0] - truth_vertex[0] ;
614  double DeltaY = xyz[1] - truth_vertex[1] ;
615  double DeltaZ = xyz[2] - truth_vertex[2] ;
616 
617  double DeltaXoverTrueX = DeltaX / truth_vertex[0];
618  double DeltaYoverTrueY = DeltaY / truth_vertex[0];
619  double DeltaZoverTrueZ = DeltaZ / truth_vertex[0];
620 
621  fRecoVtxXPos->Fill( xyz[0] );
622  fRecoVtxYPos->Fill( xyz[1] );
623  fRecoVtxZPos->Fill( xyz[2] );
624 
625  fRecoCheck3dVtxX->Fill( DeltaX );
626  fRecoCheck3dVtxY->Fill( DeltaY );
627  fRecoCheck3dVtxZ->Fill( DeltaZ );
628 
629  fRecoCheck3dVtxXvsX->Fill( xyz[0], DeltaXoverTrueX );
630  fRecoCheck3dVtxYvsY->Fill( xyz[1], DeltaYoverTrueY );
631  fRecoCheck3dVtxZvsZ->Fill( xyz[2], DeltaZoverTrueZ );
632 
633 
634 
635 
636  }
637  }
638 
639 return;
640 }//<---End access the event
std::set< geo::View_t > const & Views() const
Returns a list of possible views in the detector.
virtual double SamplingRate() const =0
Returns the period of the TPC readout electronics clock.
geo::Length_t WirePitch(geo::PlaneID const &planeid) const
Returns the distance between two consecutive wires.
virtual double ConvertXToTicks(double X, int p, int t, int c) const =0
IteratorBox< plane_id_iterator,&GeometryCore::begin_plane_id,&GeometryCore::end_plane_id > IteratePlaneIDs() const
Enables ranged-for loops on all plane IDs of the detector.
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:441
virtual double Temperature() const =0
geo::WireID::WireID_t NearestWire(geo::Point_t const &point, geo::PlaneID const &planeid) const
Returns the index of wire closest to position in the specified TPC.
size_type size() const
Definition: PtrVector.h:308
double Vx(const int i=0) const
Definition: MCParticle.h:225
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
virtual double DriftVelocity(double efield=0., double temperature=0.) const =0
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
EventNumber_t event() const
Definition: EventID.h:117
virtual double Efield(unsigned int planegap=0) const =0
Returns the nominal electric field in the specified volume.
RunNumber_t run() const
Definition: Event.h:77
EventID id() const
Definition: Event.h:56
virtual double GetXTicksOffset(int p, int t, int c) const =0
vertex reconstruction
void vertex::FeatureVertexFinderAna::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 197 of file FeatureVertexFinderAna_module.cc.

References fEvt, fRecoCheck2dTimeInCmPlane0, fRecoCheck2dTimeInCmPlane1, fRecoCheck2dTimeInCmPlane2, fRecoCheck2dTimeTickPlane0, fRecoCheck2dTimeTickPlane1, fRecoCheck2dTimeTickPlane2, fRecoCheck2dWireInCmPlane0, fRecoCheck2dWireInCmPlane1, fRecoCheck2dWireInCmPlane2, fRecoCheck2dWireNumPlane0, fRecoCheck2dWireNumPlane1, fRecoCheck2dWireNumPlane2, fRecoCheck3dVtxX, fRecoCheck3dVtxXvsX, fRecoCheck3dVtxY, fRecoCheck3dVtxYvsY, fRecoCheck3dVtxZ, fRecoCheck3dVtxZvsZ, fRecoVtxN3d, fRecoVtxXPos, fRecoVtxYPos, fRecoVtxZPos, fRun, fTruthTimeInCmPlane0, fTruthTimeInCmPlane1, fTruthTimeInCmPlane2, fTruthTimeTickPlane0, fTruthTimeTickPlane1, fTruthTimeTickPlane2, fTruthVtxXPos, fTruthVtxYPos, fTruthVtxZPos, fTruthWireInCmPlane0, fTruthWireInCmPlane1, fTruthWireInCmPlane2, fTruthWireNumberPlane0, fTruthWireNumberPlane1, fTruthWireNumberPlane2, fTwoDNVtxPlane0, fTwoDNVtxPlane1, fTwoDNVtxPlane2, fTwoDStrengthPlane0, fTwoDStrengthPlane1, fTwoDStrengthPlane2, fTwoDTimeInCmPlane0, fTwoDTimeInCmPlane1, fTwoDTimeInCmPlane2, fTwoDTimeTickPlane0, fTwoDTimeTickPlane1, fTwoDTimeTickPlane2, fTwoDWireInCmPlane0, fTwoDWireInCmPlane1, fTwoDWireInCmPlane2, fTwoDWireNumberPlane0, fTwoDWireNumberPlane1, fTwoDWireNumberPlane2, and art::TFileDirectory::make().

198 {
199  // get access to the TFile service
201  // ====================================
202  // ==== Outputting TH1F Histograms ====
203  // ====================================
204  fRun = tfs->make<TH1F>("fRun", "Run Number", 1000, 0, 1000);
205  fEvt = tfs->make<TH1F>("fEvt", "Event Number", 1000, 0, 1000);
206  fTruthVtxXPos = tfs->make<TH1F>("fTruthVtxXPos", "Truth Vertex X Position", 400, 0, 200);
207  fTruthVtxYPos = tfs->make<TH1F>("fTruthVtxYPos", "Truth Vertex Y Position", 400, -100, 100);
208  fTruthVtxZPos = tfs->make<TH1F>("fTruthVtxZPos", "Truth Vertex Z Position", 2000, 0, 1000);
209  fTruthWireNumberPlane0 = tfs->make<TH1F>("fTruthWireNumberPlane0", "Truth Wire Number Plane 0", 3000, 0, 3000);
210  fTruthTimeTickPlane0 = tfs->make<TH1F>("fTruthTimeTickPlane0", "Truth Time Tick Plane 0", 3200, 0, 3200);
211  fTruthWireNumberPlane1 = tfs->make<TH1F>("fTruthWireNumberPlane1", "Truth Wire Number Plane 1", 3000, 0, 3000);
212  fTruthTimeTickPlane1 = tfs->make<TH1F>("fTruthTimeTickPlane1", "Truth Time Tick Plane 1", 3200, 0, 3200);
213  fTruthWireNumberPlane2 = tfs->make<TH1F>("fTruthWireNumberPlane2", "Truth Wire Number Plane 2", 3000, 0, 3000);
214  fTruthTimeTickPlane2 = tfs->make<TH1F>("fTruthTimeTickPlane2", "Truth Time Tick Plane 2", 3200, 0, 3200);
215  fTruthWireInCmPlane0 = tfs->make<TH1F>("fTruthWireInCmPlane0", "Truth Wire In CM Plane 0", 2000, 0, 1000);
216  fTruthTimeInCmPlane0 = tfs->make<TH1F>("fTruthTimeInCmPlane0", "Truth Time In Cm Plane 0", 2000, 0, 1000);
217  fTruthWireInCmPlane1 = tfs->make<TH1F>("fTruthWireInCmPlane1", "Truth Wire In CM Plane 1", 2000, 0, 1000);
218  fTruthTimeInCmPlane1 = tfs->make<TH1F>("fTruthTimeInCmPlane1", "Truth Time In Cm Plane 1", 2000, 0, 1000);
219  fTruthWireInCmPlane2 = tfs->make<TH1F>("fTruthWireInCmPlane2", "Truth Wire In CM Plane 2", 2000, 0, 1000);
220  fTruthTimeInCmPlane2 = tfs->make<TH1F>("fTruthTimeInCmPlane2", "Truth Time In Cm Plane 2", 2000, 0, 1000);
221 
222  fTwoDNVtxPlane0 = tfs->make<TH1F>("fTwoDNVtxPlane0", "TwoD Number of Verticies Found in Plane 0", 400, 0, 200);
223  fTwoDNVtxPlane1 = tfs->make<TH1F>("fTwoDNVtxPlane1", "TwoD Number of Verticies Found in Plane 1", 400, 0, 200);
224  fTwoDNVtxPlane2 = tfs->make<TH1F>("fTwoDNVtxPlane2", "TwoD Number of Verticies Found in Plane 2", 400, 0, 200);
225 
226  fTwoDWireNumberPlane0 = tfs->make<TH1F>("fTwoDWireNumberPlane0", "TwoD Wire Number Plane 0", 3000, 0, 3000);
227  fTwoDTimeTickPlane0 = tfs->make<TH1F>("fTwoDTimeTickPlane0", "TwoD Time Tick Plane 0", 3200, 0, 3200);
228  fTwoDWireNumberPlane1 = tfs->make<TH1F>("fTwoDWireNumberPlane1", "TwoD Wire Number Plane 1", 3000, 0, 3000);
229  fTwoDTimeTickPlane1 = tfs->make<TH1F>("fTwoDTimeTickPlane1", "TwoD Time Tick Plane 1", 3200, 0, 3200);
230  fTwoDWireNumberPlane2 = tfs->make<TH1F>("fTwoDWireNumberPlane2", "TwoD Wire Number Plane 2", 3000, 0, 3000);
231  fTwoDTimeTickPlane2 = tfs->make<TH1F>("fTwoDTimeTickPlane2", "TwoD Time Tick Plane 2", 3200, 0, 3200);
232  fTwoDWireInCmPlane0 = tfs->make<TH1F>("fTwoDWireInCmPlane0", "TwoD Wire In CM Plane 0", 2000, 0, 1000);
233  fTwoDTimeInCmPlane0 = tfs->make<TH1F>("fTwoDTimeInCmPlane0", "TwoD Time In Cm Plane 0", 2000, 0, 1000);
234  fTwoDWireInCmPlane1 = tfs->make<TH1F>("fTwoDWireInCmPlane1", "TwoD Wire In CM Plane 1", 2000, 0, 1000);
235  fTwoDTimeInCmPlane1 = tfs->make<TH1F>("fTwoDTimeInCmPlane1", "TwoD Time In Cm Plane 1", 2000, 0, 1000);
236  fTwoDWireInCmPlane2 = tfs->make<TH1F>("fTwoDWireInCmPlane2", "TwoD Wire In CM Plane 2", 2000, 0, 1000);
237  fTwoDTimeInCmPlane2 = tfs->make<TH1F>("fTwoDTimeInCmPlane2", "TwoD Time In Cm Plane 2", 2000, 0, 1000);
238 
239  fTwoDStrengthPlane0 = tfs->make<TH1F>("fTwoDStrengthPlane0", "TwoD Strength Plane 0", 1000, 0, 500);
240  fTwoDStrengthPlane1 = tfs->make<TH1F>("fTwoDStrengthPlane1", "TwoD Strength Plane 1", 1000, 0, 500);
241  fTwoDStrengthPlane2 = tfs->make<TH1F>("fTwoDStrengthPlane2", "TwoD Strength Plane 2", 1000, 0, 500);
242 
243  fRecoCheck2dWireNumPlane0 = tfs->make<TH1F>("fRecoCheck2dWireNumPlane0", "Reco Wire Number - True Wire Number Plane 0", 400, -200, 200);
244  fRecoCheck2dTimeTickPlane0 = tfs->make<TH1F>("fRecoCheck2dTimeTickPlane0", "Reco Time Tick - True Time Tick Plane 0", 1000, -500, 500);
245  fRecoCheck2dWireInCmPlane0 = tfs->make<TH1F>("fRecoCheck2dWireInCmPlane0", "Reco Wire in CM - True Wire in CM Plane 0", 200, -50, 50);
246  fRecoCheck2dTimeInCmPlane0 = tfs->make<TH1F>("fRecoCheck2dTimeInCmPlane0", "Reco Time in CM - True Time in CM Plane 0", 200, -50, 50);
247 
248  fRecoCheck2dWireNumPlane1 = tfs->make<TH1F>("fRecoCheck2dWireNumPlane1", "Reco Wire Number - True Wire Number Plane 1", 400, -200, 200);
249  fRecoCheck2dTimeTickPlane1 = tfs->make<TH1F>("fRecoCheck2dTimeTickPlane1", "Reco Time Tick - True Time Tick Plane 1", 1000, -500, 500);
250  fRecoCheck2dWireInCmPlane1 = tfs->make<TH1F>("fRecoCheck2dWireInCmPlane1", "Reco Wire in CM - True Wire in CM Plane 1", 200, -50, 50);
251  fRecoCheck2dTimeInCmPlane1 = tfs->make<TH1F>("fRecoCheck2dTimeInCmPlane1", "Reco Time in CM - True Time in CM Plane 1", 200, -50, 50);
252 
253  fRecoCheck2dWireNumPlane2 = tfs->make<TH1F>("fRecoCheck2dWireNumPlane2", "Reco Wire Number - True Wire Number Plane 2", 400, -200, 200);
254  fRecoCheck2dTimeTickPlane2 = tfs->make<TH1F>("fRecoCheck2dTimeTickPlane2", "Reco Time Tick - True Time Tick Plane 2", 1000, -500, 500);
255  fRecoCheck2dWireInCmPlane2 = tfs->make<TH1F>("fRecoCheck2dWireInCmPlane2", "Reco Wire in CM - True Wire in CM Plane 2", 200, -50, 50);
256  fRecoCheck2dTimeInCmPlane2 = tfs->make<TH1F>("fRecoCheck2dTimeInCmPlane2", "Reco Time in CM - True Time in CM Plane 2", 200, -50, 50);
257 
258  fRecoVtxN3d = tfs->make<TH1F>("fRecoVtxN3d", "Number of 3d-Reco Verticies", 400, 0, 200);
259  fRecoVtxXPos = tfs->make<TH1F>("fRecoVtxXPos", "Reco Vertex X Position", 400, -10, 200);
260  fRecoVtxYPos = tfs->make<TH1F>("fRecoVtxYPos", "Reco Vertex Y Position", 400, -100, 100);
261  fRecoVtxZPos = tfs->make<TH1F>("fRecoVtxZPos", "Reco Vertex Z Position", 2000, -10, 1000);
262 
263  fRecoCheck3dVtxX = tfs->make<TH1F>("fRecoCheck3dVtxX", "Reco X Position - True X Postion", 800, -100, 100);
264  fRecoCheck3dVtxY = tfs->make<TH1F>("fRecoCheck3dVtxY", "Reco Y Position - True Y Postion", 800, -100, 100);
265  fRecoCheck3dVtxZ = tfs->make<TH1F>("fRecoCheck3dVtxZ", "Reco Z Position - True Z Postion", 800, -100, 100);
266 
267  fRecoCheck3dVtxXvsX = tfs->make <TH2D>("fRecoCheck3dVtxXvsX", "(Reco X - True X)/True X vs True X", 400, -10, 200, 120, -20, 20);
268  fRecoCheck3dVtxYvsY = tfs->make <TH2D>("fRecoCheck3dVtxYvsY", "(Reco Y - True Y)/True Y vs True Y", 400, -100, 100, 120, -20, 20);
269  fRecoCheck3dVtxZvsZ = tfs->make <TH2D>("fRecoCheck3dVtxZvsZ", "(Reco Z - True Z)/True Z vs True Z", 1000, -10, 1000, 120, -20, 20);
270 
271 
272  return;
273 }
T * make(ARGS...args) const
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
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
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
std::string const& art::EventObserverBase::processName ( ) const
inlineinherited
void vertex::FeatureVertexFinderAna::reconfigure ( fhicl::ParameterSet const &  p)

Definition at line 187 of file FeatureVertexFinderAna_module.cc.

References fEndPoint2dModuleLabel, fGenieModuleLabel, fLArG4ModuleLabel, fVertexModuleLabel, and fhicl::ParameterSet::get().

Referenced by FeatureVertexFinderAna().

188 {
189  fLArG4ModuleLabel = p.get< std::string >("LArGeantModuleLabel");
190  fGenieModuleLabel = p.get< std::string >("GenieModuleLabel");
191  fVertexModuleLabel = p.get< std::string >("VertexModuleLabel");
192  fEndPoint2dModuleLabel = p.get< std::string >("EndPoint2dModuleLabel");
193  return;
194 }
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
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

std::string vertex::FeatureVertexFinderAna::fEndPoint2dModuleLabel
private

Definition at line 96 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and reconfigure().

TH1F* vertex::FeatureVertexFinderAna::fEvt
private

Definition at line 102 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

std::string vertex::FeatureVertexFinderAna::fGenieModuleLabel
private

Definition at line 94 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and reconfigure().

std::string vertex::FeatureVertexFinderAna::fLArG4ModuleLabel
private

Definition at line 93 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and reconfigure().

TH1F* vertex::FeatureVertexFinderAna::fRecoCheck2dTimeInCmPlane0
private

Definition at line 143 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fRecoCheck2dTimeInCmPlane1
private

Definition at line 148 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fRecoCheck2dTimeInCmPlane2
private

Definition at line 153 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fRecoCheck2dTimeTickPlane0
private

Definition at line 141 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fRecoCheck2dTimeTickPlane1
private

Definition at line 146 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fRecoCheck2dTimeTickPlane2
private

Definition at line 151 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fRecoCheck2dWireInCmPlane0
private

Definition at line 142 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fRecoCheck2dWireInCmPlane1
private

Definition at line 147 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fRecoCheck2dWireInCmPlane2
private

Definition at line 152 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fRecoCheck2dWireNumPlane0
private

Definition at line 140 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fRecoCheck2dWireNumPlane1
private

Definition at line 145 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fRecoCheck2dWireNumPlane2
private

Definition at line 150 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fRecoCheck3dVtxX
private

Definition at line 160 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH2D* vertex::FeatureVertexFinderAna::fRecoCheck3dVtxXvsX
private

Definition at line 164 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fRecoCheck3dVtxY
private

Definition at line 161 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH2D* vertex::FeatureVertexFinderAna::fRecoCheck3dVtxYvsY
private

Definition at line 165 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fRecoCheck3dVtxZ
private

Definition at line 162 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH2D* vertex::FeatureVertexFinderAna::fRecoCheck3dVtxZvsZ
private

Definition at line 166 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fRecoVtxN3d
private

Definition at line 155 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fRecoVtxXPos
private

Definition at line 156 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fRecoVtxYPos
private

Definition at line 157 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fRecoVtxZPos
private

Definition at line 158 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fRun
private

Definition at line 101 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTruthTimeInCmPlane0
private

Definition at line 113 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTruthTimeInCmPlane1
private

Definition at line 115 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTruthTimeInCmPlane2
private

Definition at line 117 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTruthTimeTickPlane0
private

Definition at line 107 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTruthTimeTickPlane1
private

Definition at line 109 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTruthTimeTickPlane2
private

Definition at line 111 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTruthVtxXPos
private

Definition at line 103 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTruthVtxYPos
private

Definition at line 104 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTruthVtxZPos
private

Definition at line 105 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTruthWireInCmPlane0
private

Definition at line 112 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTruthWireInCmPlane1
private

Definition at line 114 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTruthWireInCmPlane2
private

Definition at line 116 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTruthWireNumberPlane0
private

Definition at line 106 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTruthWireNumberPlane1
private

Definition at line 108 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTruthWireNumberPlane2
private

Definition at line 110 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTwoDNVtxPlane0
private

Definition at line 119 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTwoDNVtxPlane1
private

Definition at line 120 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTwoDNVtxPlane2
private

Definition at line 121 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTwoDStrengthPlane0
private

Definition at line 136 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTwoDStrengthPlane1
private

Definition at line 137 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTwoDStrengthPlane2
private

Definition at line 138 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTwoDTimeInCmPlane0
private

Definition at line 130 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTwoDTimeInCmPlane1
private

Definition at line 132 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTwoDTimeInCmPlane2
private

Definition at line 134 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTwoDTimeTickPlane0
private

Definition at line 124 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTwoDTimeTickPlane1
private

Definition at line 126 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTwoDTimeTickPlane2
private

Definition at line 128 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTwoDWireInCmPlane0
private

Definition at line 129 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTwoDWireInCmPlane1
private

Definition at line 131 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTwoDWireInCmPlane2
private

Definition at line 133 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTwoDWireNumberPlane0
private

Definition at line 123 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTwoDWireNumberPlane1
private

Definition at line 125 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

TH1F* vertex::FeatureVertexFinderAna::fTwoDWireNumberPlane2
private

Definition at line 127 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and beginJob().

std::string vertex::FeatureVertexFinderAna::fVertexModuleLabel
private

Definition at line 95 of file FeatureVertexFinderAna_module.cc.

Referenced by analyze(), and reconfigure().


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