/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
RecoLocalMuon/RPCRecHit/plugins/DTObjectMap.cc
46 строк
2 KB
Shahzad Malik Muzaffar
[RECONSTRUCTION] Drop Geometry/CommonDetUnit package
28 май 2026, 12:57
28 май 2026, 12:57
685f036
Код
Авторство
О чём код?
#include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/Framework/interface/ESHandle.h" #include "Geometry/Records/interface/MuonGeometryRecord.h" #include "Geometry/CommonTopologies/interface/TrackingGeometry.h" #include "Geometry/RPCGeometry/interface/RPCGeometry.h" #include "Geometry/RPCGeometry/interface/RPCGeomServ.h" #include "Geometry/RPCGeometry/interface/RPCChamber.h" #include "Geometry/RPCGeometry/interface/RPCRoll.h" #include "DTObjectMap.h" #include "DTStationIndex.h" DTObjectMap::DTObjectMap(RPCGeometry const& rpcGeo) { for (TrackingGeometry::DetContainer::const_iterator it = rpcGeo.dets().begin(); it < rpcGeo.dets().end(); it++) { if (dynamic_cast<const RPCChamber*>(*it) != nullptr) { auto ch = dynamic_cast<const RPCChamber*>(*it); std::vector<const RPCRoll*> roles = (ch->rolls()); for (std::vector<const RPCRoll*>::const_iterator r = roles.begin(); r != roles.end(); ++r) { RPCDetId rpcId = (*r)->id(); int region = rpcId.region(); if (region == 0) { int wheel = rpcId.ring(); int sector = rpcId.sector(); int station = rpcId.station(); DTStationIndex ind(region, wheel, sector, station); std::set<RPCDetId> myrolls; if (rollstore.find(ind) != rollstore.end()) myrolls = rollstore[ind]; myrolls.insert(rpcId); rollstore[ind] = myrolls; } } } } } std::set<RPCDetId> const& DTObjectMap::getRolls(DTStationIndex index) const { // FIXME // the present inplementation allows for NOT finding the given index in the map; // a muon expert should check that this is the intended behaviour. static const std::set<RPCDetId> empty; return (rollstore.find(index) == rollstore.end()) ? empty : rollstore.at(index); } // register the class with the typelookup system used by the EventSetup #include "FWCore/Utilities/interface/typelookup.h" TYPELOOKUP_DATA_REG(DTObjectMap);