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.

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, nano_mu_digi_cff::sector, relativeConstraints::station, AlCaHLTBitMon_QueryRunRegistry::string, and makeMuonMisalignmentScenario::wheel.

Referenced by MuonDetLayerGeometryESProducer::produce().

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;
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 }
static const int minSectorId
lowest sector id. 0 indicates all sectors (a station)
Definition: DTChamberId.h:56
T perp() const
Definition: PV3DBase.h:69
const std::string metname
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
static const int minStationId
lowest station id
Definition: DTChamberId.h:52
#define LogTrace(id)
ExtractZ< GeomDet, float > DetZ
Definition: DetSorting.h:50
const GeomDet * idToDet(DetId) const override
Definition: DTGeometry.cc:77
static const int maxStationId
highest station id
Definition: DTChamberId.h:54
static const int minWheelId
lowest wheel number
Definition: DTChamberId.h:60
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr, const Compare &comp)
static const int maxWheelId
highest wheel number
Definition: DTChamberId.h:62
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:43
static const int maxSectorId
highest sector id.
Definition: DTChamberId.h:58
#define LogDebug(id)