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

Public Member Functions

 CheckAuxDetHit (fhicl::ParameterSet const &p)
 

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}
 

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  :
46  art::EDAnalyzer(p)
47 {}
pdgs p
Definition: selectors.fcl:22

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
process_name hit
Definition: cheaterreco.fcl:51
std::vector< AuxDetHit > AuxDetHitCollection
Definition: AuxDetHit.h:183
void larg4::CheckAuxDetHit::beginJob ( )
overrideprivate

Definition at line 49 of file CheckAuxDetHit_module.cc.

50 {
51  art::ServiceHandle<art::TFileService const> tfs;
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
art::ServiceHandle< art::TFileService > tfs

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: