5 #include "art/Framework/Core/EDAnalyzer.h"
6 #include "art/Framework/Principal/Event.h"
7 #include "art/Framework/Principal/Handle.h"
8 #include "art/Framework/Core/ModuleMacros.h"
9 #include "art_root_io/TFileDirectory.h"
10 #include "art_root_io/TFileService.h"
11 #include "art/Framework/Services/Registry/ServiceHandle.h"
12 #include "art/Framework/Principal/Provenance.h"
13 #include "artg4tk/services/DetectorHolder_service.hh"
20 #include "TDirectory.h"
23 #include "CLHEP/Units/SystemOfUnits.h"
35 void analyze(
const art::Event& event)
override;
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.);
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());
void analyze(const art::Event &event) override
CheckAuxDetHit(fhicl::ParameterSet const &p)
std::vector< AuxDetHit > AuxDetHitCollection
art::ServiceHandle< art::TFileService > tfs