CMS 3D CMS Logo

MuonDTDetLayerGeometryBuilder.cc
Go to the documentation of this file.
2 
7 
10 
12 
13 #include <iostream>
14 
15 using namespace std;
16 
18 
20 
22  const std::string metname = "Muon|RecoMuon|RecoMuonDetLayers|MuonDTDetLayerGeometryBuilder";
23 
24  vector<DetLayer*> detlayers;
25  vector<MuRodBarrelLayer*> result;
26 
28  vector<const DetRod*> muDetRods;
29  for (int sector = DTChamberId::minSectorId; sector <= DTChamberId::maxSectorId; sector++) {
30  vector<const GeomDet*> geomDets;
32  const GeomDet* geomDet = geo.idToDet(DTChamberId(wheel, station, sector));
33  if (geomDet) {
34  geomDets.push_back(geomDet);
35  LogTrace(metname) << "get DT chamber " << DTChamberId(wheel, station, sector)
36  << " at R=" << geomDet->position().perp() << ", phi=" << geomDet->position().phi();
37  }
38  }
39 
40  if (!geomDets.empty()) {
41  precomputed_value_sort(geomDets.begin(), geomDets.end(), geomsort::DetZ());
42  muDetRods.push_back(new MuDetRod(geomDets));
43  LogTrace(metname) << " New MuDetRod with " << geomDets.size()
44  << " chambers at R=" << muDetRods.back()->position().perp()
45  << ", phi=" << muDetRods.back()->position().phi();
46  }
47  }
48  precomputed_value_sort(muDetRods.begin(), muDetRods.end(), geomsort::ExtractPhi<GeometricSearchDet, float>());
49  result.push_back(new MuRodBarrelLayer(muDetRods));
50  LogDebug(metname) << " New MuRodBarrelLayer with " << muDetRods.size() << " rods, at R "
51  << result.back()->specificSurface().radius();
52  }
53 
54  for (vector<MuRodBarrelLayer*>::const_iterator it = result.begin(); it != result.end(); it++)
55  detlayers.push_back((DetLayer*)(*it));
56 
57  return detlayers;
58 }
GeomDet::position
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:43
DTGeometry
Definition: DTGeometry.h:28
MessageLogger.h
GeomDet
Definition: GeomDet.h:27
MuonDTDetLayerGeometryBuilder.h
DetLayer
Definition: DetLayer.h:21
relativeConstraints.station
station
Definition: relativeConstraints.py:67
MuonDTDetLayerGeometryBuilder::~MuonDTDetLayerGeometryBuilder
virtual ~MuonDTDetLayerGeometryBuilder()
Destructor.
Definition: MuonDTDetLayerGeometryBuilder.cc:19
DTChamberId::minSectorId
static const int minSectorId
lowest sector id. 0 indicates all sectors (a station)
Definition: DTChamberId.h:56
precomputed_value_sort.h
DTChamberId::minStationId
static const int minStationId
lowest station id
Definition: DTChamberId.h:52
DetSorting.h
geomsort::DetZ
ExtractZ< GeomDet, float > DetZ
Definition: DetSorting.h:50
MuRodBarrelLayer
Definition: MuRodBarrelLayer.h:17
MuonDTDetLayerGeometryBuilder::MuonDTDetLayerGeometryBuilder
MuonDTDetLayerGeometryBuilder()
Constructor.
Definition: MuonDTDetLayerGeometryBuilder.cc:17
DTChamberId.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
DTChamberId::maxWheelId
static const int maxWheelId
highest wheel number
Definition: DTChamberId.h:62
DTChamberId::minWheelId
static const int minWheelId
lowest wheel number
Definition: DTChamberId.h:60
MuonDTDetLayerGeometryBuilder::buildLayers
static std::vector< DetLayer * > buildLayers(const DTGeometry &geo)
Operations.
Definition: MuonDTDetLayerGeometryBuilder.cc:21
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
geomsort::ExtractPhi
Definition: GeometricSorting.h:45
DTChamberId::maxStationId
static const int maxStationId
highest station id
Definition: DTChamberId.h:54
GeomDet.h
std
Definition: JetResolutionObject.h:76
MuRodBarrelLayer.h
MuDetRod
Definition: MuDetRod.h:17
DTChamberId::maxSectorId
static const int maxSectorId
highest sector id.
Definition: DTChamberId.h:58
mps_fire.result
result
Definition: mps_fire.py:303
DTChamberId
Definition: DTChamberId.h:14
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
precomputed_value_sort
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr, const Compare &comp)
Definition: precomputed_value_sort.h:17
DTGeometry::idToDet
const GeomDet * idToDet(DetId) const override
Definition: DTGeometry.cc:77
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:43
MuDetRod.h