25 #include "art_root_io/TFileService.h" 26 #include "artg4tk/pluginDetectors/gdml/CalorimeterHit.hh" 28 #include "CLHEP/Units/SystemOfUnits.h" 35 class CheckCalorimeterHits;
54 , _DumpGDML(p.
get<bool>(
"DumpGDML"))
65 _hnHits = tfs->make<TH1F>(
"hnHits",
"Number of CaloArtHits", 300, 0, 0);
66 _hEdep = tfs->make<TH1F>(
"hEdep",
"total Energy deposition in CaloArtHits", 2000, 0, 0);
67 _haEdep = tfs->make<TH1F>(
"haEdep",
"z of Energy deposition in CaloArtHits", 200, -500., 500.);
69 "ntuple",
"Demo ntuple",
"Event:ID:Edep:em_Edep:nonem_Edep:xpos:ypos:zpos:time");
75 typedef std::vector<art::Handle<CalorimeterHitCollection>> HandleVector;
76 auto allSims =
event.getMany<CalorimeterHitCollection>();
79 const CalorimeterHitCollection& sims(**i);
83 const CalorimeterHit&
hit = *j;
84 sumE = sumE + hit.GetEdep();
85 _haEdep->Fill(hit.GetZpos(), hit.GetEdep());
96 _hEdep->Fill(sumE / CLHEP::GeV);
CheckCalorimeterHits(fhicl::ParameterSet const &p)
void analyze(const art::Event &event) override
#define DEFINE_ART_MODULE(klass)
EventNumber_t event() const
Detector simulation of raw signals on wires.
decltype(auto) get(T &&obj)
ADL-aware version of std::to_string.
Event finding and building.