CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions
MuonDTDetLayerGeometryBuilder Class Reference

#include <MuonDTDetLayerGeometryBuilder.h>

Public Member Functions

 MuonDTDetLayerGeometryBuilder ()
 Constructor. More...
 
virtual ~MuonDTDetLayerGeometryBuilder ()
 Destructor. More...
 

Static Public Member Functions

static std::vector< DetLayer * > buildLayers (const DTGeometry &geo)
 Operations. More...
 

Detailed Description

Build the DT DetLayers.

Author
N. Amapane - CERN

Definition at line 16 of file MuonDTDetLayerGeometryBuilder.h.

Constructor & Destructor Documentation

◆ MuonDTDetLayerGeometryBuilder()

MuonDTDetLayerGeometryBuilder::MuonDTDetLayerGeometryBuilder ( )

Constructor.

Definition at line 17 of file MuonDTDetLayerGeometryBuilder.cc.

17 {}

◆ ~MuonDTDetLayerGeometryBuilder()

MuonDTDetLayerGeometryBuilder::~MuonDTDetLayerGeometryBuilder ( )
virtual

Destructor.

Definition at line 19 of file MuonDTDetLayerGeometryBuilder.cc.

19 {}

Member Function Documentation

◆ buildLayers()

vector< DetLayer * > MuonDTDetLayerGeometryBuilder::buildLayers ( const DTGeometry geo)
static

Operations.

Definition at line 21 of file MuonDTDetLayerGeometryBuilder.cc.

21  {
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 }

References 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(), mps_fire::result, relativeConstraints::station, AlCaHLTBitMon_QueryRunRegistry::string, and makeMuonMisalignmentScenario::wheel.

Referenced by MuonDetLayerGeometryESProducer::produce().

GeomDet::position
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:43
GeomDet
Definition: GeomDet.h:27
DetLayer
Definition: DetLayer.h:21
relativeConstraints.station
station
Definition: relativeConstraints.py:67
DTChamberId::minSectorId
static const int minSectorId
lowest sector id. 0 indicates all sectors (a station)
Definition: DTChamberId.h:56
DTChamberId::minStationId
static const int minStationId
lowest station id
Definition: DTChamberId.h:52
geomsort::DetZ
ExtractZ< GeomDet, float > DetZ
Definition: DetSorting.h:50
MuRodBarrelLayer
Definition: MuRodBarrelLayer.h:17
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
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
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
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:311
DTChamberId
Definition: DTChamberId.h:14
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
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:40