#include <MuonDTDetLayerGeometryBuilder.h>
Public Member Functions | |
MuonDTDetLayerGeometryBuilder () | |
Constructor. | |
virtual | ~MuonDTDetLayerGeometryBuilder () |
Destructor. | |
Static Public Member Functions | |
static std::vector< DetLayer * > | buildLayers (const DTGeometry &geo) |
Operations. |
Build the DT DetLayers.
Definition at line 18 of file MuonDTDetLayerGeometryBuilder.h.
MuonDTDetLayerGeometryBuilder::MuonDTDetLayerGeometryBuilder | ( | ) |
MuonDTDetLayerGeometryBuilder::~MuonDTDetLayerGeometryBuilder | ( | ) | [virtual] |
vector< DetLayer * > MuonDTDetLayerGeometryBuilder::buildLayers | ( | const DTGeometry & | geo | ) | [static] |
Operations.
Definition at line 24 of file MuonDTDetLayerGeometryBuilder.cc.
References DTChamberId, DTGeometry::idToDet(), LogDebug, LogTrace, DTChamberId::maxSectorId, DTChamberId::maxStationId, DTChamberId::maxWheelId, metname, DTChamberId::minSectorId, DTChamberId::minStationId, DTChamberId::minWheelId, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), GeomDet::position(), precomputed_value_sort(), query::result, relativeConstraints::station, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by MuonDetLayerGeometryESProducer::produce().
{ const std::string metname = "Muon|RecoMuon|RecoMuonDetLayers|MuonDTDetLayerGeometryBuilder"; vector<DetLayer*> detlayers; vector<MuRodBarrelLayer*> result; for(int station = DTChamberId::minStationId; station <= DTChamberId::maxStationId; station++) { vector<const DetRod*> muDetRods; for(int sector = DTChamberId::minSectorId; sector <= DTChamberId::maxSectorId; sector++) { vector<const GeomDet*> geomDets; for(int wheel = DTChamberId::minWheelId; wheel <= DTChamberId::maxWheelId; wheel++) { const GeomDet* geomDet = geo.idToDet(DTChamberId(wheel, station, sector)); if (geomDet) { geomDets.push_back(geomDet); LogTrace(metname) << "get DT chamber " << DTChamberId(wheel, station, sector) << " at R=" << geomDet->position().perp() << ", phi=" << geomDet->position().phi() ; } } if (geomDets.size()!=0) { precomputed_value_sort(geomDets.begin(), geomDets.end(), geomsort::DetZ()); muDetRods.push_back(new MuDetRod(geomDets)); LogTrace(metname) << " New MuDetRod with " << geomDets.size() << " chambers at R=" << muDetRods.back()->position().perp() << ", phi=" << muDetRods.back()->position().phi(); } } precomputed_value_sort(muDetRods.begin(), muDetRods.end(), geomsort::ExtractPhi<GeometricSearchDet,float>()); result.push_back(new MuRodBarrelLayer(muDetRods)); LogDebug(metname) << " New MuRodBarrelLayer with " << muDetRods.size() << " rods, at R " << result.back()->specificSurface().radius(); } for(vector<MuRodBarrelLayer*>::const_iterator it = result.begin(); it != result.end(); it++) detlayers.push_back((DetLayer*)(*it)); return detlayers; }