10 #include "art/Framework/Core/EDAnalyzer.h"
11 #include "art/Framework/Core/ModuleMacros.h"
12 #include "art/Framework/Principal/Event.h"
13 #include "art/Framework/Principal/Handle.h"
14 #include "art/Framework/Principal/Run.h"
15 #include "art/Framework/Principal/SubRun.h"
16 #include "canvas/Utilities/InputTag.h"
17 #include "fhiclcpp/ParameterSet.h"
18 #include "messagefacility/MessageLogger/MessageLogger.h"
26 explicit GeoDump(fhicl::ParameterSet
const&
p);
37 void analyze(art::Event
const&
e)
override;
56 auto geop = lar::providerFrom<geo::Geometry>();
58 std::cout << geop->Ncryostats() <<
" cryostats" << std::endl;
60 for(
size_t c=0; c<geop->Ncryostats(); ++c) {
61 auto const& cryostat = geop->Cryostat(c);
62 std::cout<<
"Cryostat " << cryostat.ID() <<
" ... " << cryostat.NTPC() <<
" TPCs and " << cryostat.NOpDet() <<
" opdets" << std::endl;
63 auto const& cryobox = cryostat.Boundaries();
64 std::cout<<
" (" << cryobox.MinX() <<
"," << cryobox.MinY() <<
"," << cryobox.MinZ() <<
")"
66 << cryobox.MaxX() <<
"," << cryobox.MaxY() <<
"," << cryobox.MaxZ() <<
")" << std::endl;
68 for(
size_t t=0; t<geop->NTPC(); ++t) {
70 if(!cryostat.HasTPC(t))
continue;
71 auto const& tpc = cryostat.TPC(t);
72 std::cout<<
" TPC ID=" << t <<
" ... " << tpc.Nplanes() <<
" planes" << std::endl;
73 auto const& tpcbox = tpc.BoundingBox();
74 auto const& tpcabox = tpc.ActiveBoundingBox();
75 std::cout<<
" BB (" << tpcbox.MinX() <<
"," << tpcbox.MinY() <<
"," << tpcbox.MinZ() <<
")"
77 << tpcbox.MaxX() <<
"," << tpcbox.MaxY() <<
"," << tpcbox.MaxZ() <<
")" << std::endl;
78 std::cout<<
" Active BB (" << tpcabox.MinX() <<
"," << tpcabox.MinY() <<
"," << tpcabox.MinZ() <<
")"
80 << tpcabox.MaxX() <<
"," << tpcabox.MaxY() <<
"," << tpcabox.MaxZ() <<
")" << std::endl;
82 for(
size_t p=0;
p<tpc.Nplanes(); ++
p) {
83 auto const& plane = tpc.Plane(
p);
84 std::cout<<
" Plane ID=" <<
p <<
" ... " << plane.Nwires() <<
" wires, thetaZ=" << plane.ThetaZ() << std::endl;
87 for(
size_t o=0; o<cryostat.NOpDet(); ++o) {
88 auto const& opdet = cryostat.OpDet(o);
89 std::cout <<
"OpDet ID="<<o<<
" ... (" << opdet.GetCenter().x() <<
"," << opdet.GetCenter().y() <<
"," << opdet.GetCenter().z() <<
")" << std::endl;
91 for(
size_t opch=0; opch<geop->NOpChannels(); ++opch) {
92 std::cout <<
"OpChannel " << opch <<
" => OpDet " << geop->OpDetFromOpChannel(opch) << std::endl;
GeoDump(fhicl::ParameterSet const &p)
void analyze(art::Event const &e) override
GeoDump & operator=(GeoDump const &)=delete
art framework interface to geometry description
BEGIN_PROLOG could also be cout