26 #include "art_root_io/TFileService.h" 29 #include "artg4tk/pluginDetectors/gdml/TrackerHit.hh" 35 #include "CLHEP/Units/SystemOfUnits.h" 42 class CheckTrackerHits;
49 void beginRun(
const art::Run& Run)
override;
60 :
art::EDAnalyzer(p), _hnHits(0), _hEdep(0), _hrEdep(), _hzEdep(0)
66 std::cout <<
"******************************Run: " << thisRun.
id() << std::endl;
73 _hnHits = tfs->make<TH1F>(
"hnHits",
"Number of TrackerArtHits", 200, 0., 10000.);
74 _hEdep = tfs->make<TH1F>(
"hEdep",
"total Energy deposition in TrackerArtHits", 200, 0., 1.2);
76 tfs->make<TH1F>(
"hrEdep",
"radius of total Energy deposition in TrackerArtHits", 300, 0., 300.);
77 _hzEdep = tfs->make<TH1F>(
"hzEdep",
"total Energy deposition in TrackerArtHits", 600, 0., 600.);
83 typedef std::vector<art::Handle<TrackerHitCollection>> HandleVector;
84 auto allSims =
event.getMany<TrackerHitCollection>();
87 const TrackerHitCollection& sims(**i);
91 const TrackerHit&
hit = *j;
92 double radius = 0.1 * sqrt(hit.xpos * hit.xpos + hit.ypos * hit.ypos);
94 _hzEdep->Fill(0.1 * hit.zpos + 300., hit.Edep);
95 sumE = sumE + hit.Edep;
97 _hEdep->Fill(sumE / CLHEP::GeV);
void beginRun(const art::Run &Run) override
void analyze(const art::Event &event) override
#define DEFINE_ART_MODULE(klass)
Detector simulation of raw signals on wires.
CheckTrackerHits(fhicl::ParameterSet const &p)
Event finding and building.