21 #include "DD4hep/Detector.h"
22 #include "DD4hep/DD4hepRootPersistency.h"
24 #include "TGeoManager.h"
54 desc.
add<
bool>(
"fromDD4hep",
false);
55 descriptions.
add(
"printGeomSolids", desc);
64 TGeoIterator
next(geom.GetTopVolume());
67 std::vector<std::string>
names;
68 while ((node =
next())) {
71 if (
std::find(names.begin(), names.end(),
name) == names.end()) {
73 <<
static_cast<std::string>(node->GetVolume()->GetShape()->GetTitle());
74 names.emplace_back(name);
81 const auto& gra = cpv->
graph();
89 edm::LogVerbatim(
"PrintGeom") <<
"\n\nPrintGeomSolids finds " << solids <<
" solids";
Log< level::Info, true > LogVerbatim
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvTokenDDD_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
dd4hep::Detector const * description() const
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Compact representation of the geometrical detector hierarchy.
const std::string names[nVars_]
A DDSolid represents the shape of a part.
void analyze(edm::Event const &iEvent, edm::EventSetup const &) override
bool getData(T &iHolder) const
static const char *const name(DDSolidShape s)
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > cpvTokenDD4hep_
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
DDSolidShape shape(void) const
The type of the solid.
PrintGeomSolids(const edm::ParameterSet &)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const Graph & graph() const
Provides read-only access to the data structure of the compact-view.
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
~PrintGeomSolids() override
adj_list::const_iterator const_adj_iterator
const cms::DDDetector * detector() const