Public Member Functions | |
ListGroups (const edm::ParameterSet &) | |
virtual | ~ListGroups () |
Private Member Functions | |
void | analyze (const edm::Event &, const edm::EventSetup &) |
void | beginJob (const edm::EventSetup &) |
void | endJob () |
Definition at line 65 of file ListGroups.cc.
ListGroups::ListGroups | ( | const edm::ParameterSet & | ) |
ListGroups::~ListGroups | ( | ) | [virtual] |
void ListGroups::analyze | ( | const edm::Event & | , | |
const edm::EventSetup & | ||||
) | [private, virtual] |
void ListGroups::beginJob | ( | const edm::EventSetup & | setup | ) | [private, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 84 of file ListGroups.cc.
References DDFilteredView::addFilter(), GenMuonPlsPt100GeV_cfg::cout, dddGetString(), lat::endl(), filter, DDFilteredView::geoHistory(), edm::EventSetup::get(), h, DDFilteredView::next(), DDSpecificsFilter::not_equals, DDSpecificsFilter::setCriteria(), and DDFilteredView::translation().
00084 { 00085 edm::ESHandle<DDCompactView> hDdd; 00086 setup.get<IdealGeometryRecord>().get( hDdd ); 00087 DDFilteredView fv(*hDdd); 00088 00089 DDSpecificsFilter filter; 00090 filter.setCriteria(DDValue("TrackingMaterialGroup", ""), DDSpecificsFilter::not_equals); 00091 fv.addFilter(filter); 00092 00093 while (fv.next()) { 00094 // print the group name and full hierarchy of all items 00095 std::cout << dddGetString("TrackingMaterialGroup", fv) << '\t'; 00096 00097 // start from 2 to skip the leading /OCMS[0]/CMSE[1] part 00098 const DDGeoHistory & history = fv.geoHistory(); 00099 std::cout << '/'; 00100 for (unsigned int h = 2; h < history.size(); ++h) 00101 std::cout << '/' << history[h].logicalPart().name().name() << '[' << history[h].copyno() << ']'; 00102 00103 // DD3Vector and DDTranslation are the same type as math::XYZVector 00104 math::XYZVector position = fv.translation() / 10.; // mm -> cm 00105 std::cout << "\t" << position << std::endl; 00106 }; 00107 std::cout << std::endl; 00108 }