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 ( )

Constructor.

Definition at line 17 of file MuonDTDetLayerGeometryBuilder.cc.

17  {
18 }
MuonDTDetLayerGeometryBuilder::~MuonDTDetLayerGeometryBuilder ( )
virtual

Destructor.

Definition at line 20 of file MuonDTDetLayerGeometryBuilder.cc.

20  {
21 }

Member Function Documentation

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

Operations.

Definition at line 24 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, relativeConstraints::station, AlCaHLTBitMon_QueryRunRegistry::string, and makeMuonMisalignmentScenario::wheel.

Referenced by MuonDetLayerGeometryESProducer::produce().

24  {
25 
26  const std::string metname = "Muon|RecoMuon|RecoMuonDetLayers|MuonDTDetLayerGeometryBuilder";
27 
28  vector<DetLayer*> detlayers;
29  vector<MuRodBarrelLayer*> result;
30 
32 
33  vector<const DetRod*> muDetRods;
34  for(int sector = DTChamberId::minSectorId; sector <= DTChamberId::maxSectorId; sector++) {
35 
36  vector<const GeomDet*> geomDets;
38  const GeomDet* geomDet = geo.idToDet(DTChamberId(wheel, station, sector));
39  if (geomDet) {
40  geomDets.push_back(geomDet);
41  LogTrace(metname) << "get DT chamber " << DTChamberId(wheel, station, sector)
42  << " at R=" << geomDet->position().perp()
43  << ", phi=" << geomDet->position().phi() ;
44  }
45  }
46 
47  if (!geomDets.empty()) {
48  precomputed_value_sort(geomDets.begin(), geomDets.end(), geomsort::DetZ());
49  muDetRods.push_back(new MuDetRod(geomDets));
50  LogTrace(metname) << " New MuDetRod with " << geomDets.size()
51  << " chambers at R=" << muDetRods.back()->position().perp()
52  << ", phi=" << muDetRods.back()->position().phi();
53  }
54  }
55  precomputed_value_sort(muDetRods.begin(), muDetRods.end(), geomsort::ExtractPhi<GeometricSearchDet,float>());
56  result.push_back(new MuRodBarrelLayer(muDetRods));
57  LogDebug(metname) << " New MuRodBarrelLayer with " << muDetRods.size()
58  << " rods, at R " << result.back()->specificSurface().radius();
59  }
60 
61  for(vector<MuRodBarrelLayer*>::const_iterator it = result.begin(); it != result.end(); it++)
62  detlayers.push_back((DetLayer*)(*it));
63 
64  return detlayers;
65 }
#define LogDebug(id)
static const int minSectorId
lowest sector id. 0 indicates all sectors (a station)
Definition: DTChamberId.h:71
T perp() const
Definition: PV3DBase.h:72
const std::string metname
static const int minStationId
lowest station id
Definition: DTChamberId.h:67
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
ExtractZ< GeomDet, float > DetZ
Definition: DetSorting.h:53
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:48
static const int maxStationId
highest station id
Definition: DTChamberId.h:69
#define LogTrace(id)
static const int minWheelId
lowest wheel number
Definition: DTChamberId.h:75
static const int maxWheelId
highest wheel number
Definition: DTChamberId.h:77
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)
const GeomDet * idToDet(DetId) const override
Definition: DTGeometry.cc:75
static const int maxSectorId
highest sector id.
Definition: DTChamberId.h:73