Public Member Functions | Private Member Functions | Private Attributes | List of all members
larg4::CheckAuxDetHit Class Reference
Inheritance diagram for larg4::CheckAuxDetHit:
art::EDAnalyzer art::detail::Analyzer art::detail::LegacyModule art::Observer art::ModuleBase

Public Member Functions

 CheckAuxDetHit (fhicl::ParameterSet const &p)
 
- Public Member Functions inherited from art::EDAnalyzer
 EDAnalyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDAnalyzer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Analyzer
virtual ~Analyzer () noexcept
 
 Analyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 Analyzer (Table< Config > const &config)
 
void doBeginJob (SharedResources const &resources)
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
- Public Member Functions inherited from art::Observer
 ~Observer () noexcept
 
 Observer (Observer const &)=delete
 
 Observer (Observer &&)=delete
 
Observeroperator= (Observer const &)=delete
 
Observeroperator= (Observer &&)=delete
 
void registerProducts (ProductDescriptions &, ModuleDescription const &)
 
void fillDescriptions (ModuleDescription const &)
 
fhicl::ParameterSetID selectorConfig () const
 
- Public Member Functions inherited from art::ModuleBase
virtual ~ModuleBase () noexcept
 
 ModuleBase ()
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Private Member Functions

void beginJob () override
 
void analyze (const art::Event &event) override
 

Private Attributes

TH1F * _hnHits {nullptr}
 
TH1F * _hEdep {nullptr}
 
TH1F * _hID {nullptr}
 
TH1F * _hexit {nullptr}
 
TH1F * _hentry {nullptr}
 

Additional Inherited Members

- Public Types inherited from art::EDAnalyzer
using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 
- Protected Member Functions inherited from art::Observer
std::string const & processName () const
 
bool wantAllEvents () const noexcept
 
bool wantEvent (ScheduleID id, Event const &e) const
 
Handle< TriggerResultsgetTriggerResults (Event const &e) const
 
 Observer (fhicl::ParameterSet const &config)
 
 Observer (std::vector< std::string > const &select_paths, std::vector< std::string > const &reject_paths, fhicl::ParameterSet const &config)
 
- Protected Member Functions inherited from art::ModuleBase
ConsumesCollectorconsumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Detailed Description

Definition at line 29 of file CheckAuxDetHit_module.cc.

Constructor & Destructor Documentation

larg4::CheckAuxDetHit::CheckAuxDetHit ( fhicl::ParameterSet const &  p)
explicit

Definition at line 45 of file CheckAuxDetHit_module.cc.

45  :
47 {}
p
Definition: test.py:223

Member Function Documentation

void larg4::CheckAuxDetHit::analyze ( const art::Event event)
overrideprivate

Definition at line 61 of file CheckAuxDetHit_module.cc.

62 {
63  //std::vector<art::Handle<sim::AuxDetHitCollection>> allSims;
64  //event.getManyByType(allSims);
65  auto allSims = event.getMany<sim::AuxDetHitCollection>();
66  for (auto const& sims : allSims) {
67  _hnHits->Fill(sims->size());
68  for (auto const& hit : *sims) {
69  _hEdep->Fill(hit.GetEnergyDeposited());
70  _hexit->Fill(hit.GetExitZ());
71  _hentry->Fill(hit.GetEntryZ());
72  _hID->Fill(hit.GetID());
73  }
74  }
75 } // end analyze
Detector simulation of raw signals on wires.
std::vector< AuxDetHit > AuxDetHitCollection
Definition: AuxDetHit.h:183
void larg4::CheckAuxDetHit::beginJob ( )
overrideprivatevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 49 of file CheckAuxDetHit_module.cc.

50 {
52  _hnHits = tfs->make<TH1F>("hnHits", "Number of AuxDetHits", 30, 0,30 );
53  _hEdep = tfs->make<TH1F>("hEdep", "Energy deposition in AuxDetHits", 100,0.,4.);
54  _hID = tfs->make<TH1F>("hID", "Id of hit AuxDet", 100,0.,5.);
55  _hexit = tfs->make<TH1F>("hexit", "exit points in z", 100,-100.,100.);
56  _hentry = tfs->make<TH1F>("hentry", "entry points in z", 100,-100.,100.);
57  // _ntuple = tfs->make<TNtuple>("ntuple","Demo ntuple",
58  // "Event:Edep:em_Edep:nonem_Edep:xpos:ypos:zpos:time");
59 } // end beginJob

Member Data Documentation

TH1F* larg4::CheckAuxDetHit::_hEdep {nullptr}
private

Definition at line 38 of file CheckAuxDetHit_module.cc.

TH1F* larg4::CheckAuxDetHit::_hentry {nullptr}
private

Definition at line 41 of file CheckAuxDetHit_module.cc.

TH1F* larg4::CheckAuxDetHit::_hexit {nullptr}
private

Definition at line 40 of file CheckAuxDetHit_module.cc.

TH1F* larg4::CheckAuxDetHit::_hID {nullptr}
private

Definition at line 39 of file CheckAuxDetHit_module.cc.

TH1F* larg4::CheckAuxDetHit::_hnHits {nullptr}
private

Definition at line 37 of file CheckAuxDetHit_module.cc.


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