CMS 3D CMS Logo

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

#include <BTLDetLayerGeometryBuilder.h>

Public Member Functions

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

Static Public Member Functions

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

Detailed Description

Build the BTL DetLayers.

Author
L. Gray - FNAL

Definition at line 16 of file BTLDetLayerGeometryBuilder.h.

Constructor & Destructor Documentation

◆ BTLDetLayerGeometryBuilder()

BTLDetLayerGeometryBuilder::BTLDetLayerGeometryBuilder ( )

Constructor.

Definition at line 17 of file BTLDetLayerGeometryBuilder.cc.

17 {}

◆ ~BTLDetLayerGeometryBuilder()

BTLDetLayerGeometryBuilder::~BTLDetLayerGeometryBuilder ( )
virtual

Destructor.

Definition at line 19 of file BTLDetLayerGeometryBuilder.cc.

19 {}

Member Function Documentation

◆ buildLayers()

vector< DetLayer * > BTLDetLayerGeometryBuilder::buildLayers ( const MTDGeometry geo)
static

Operations.

Definition at line 21 of file BTLDetLayerGeometryBuilder.cc.

21  {
22  const std::string metname = "MTD|RecoMTD|RecoMTDDetLayers|BTLDetLayerGeometryBuilder";
23 
24  vector<DetLayer*> detlayers;
25  vector<MTDTrayBarrelLayer*> result;
26 
27  vector<const DetRod*> btlDetTrays;
28 
29  for (unsigned tray = BTLDetId::MIN_ROD; tray <= BTLDetId::HALF_ROD; ++tray) {
30  vector<const GeomDet*> geomDets;
31  for (unsigned module = 1; module <= BTLDetId::kModulesPerROD; ++module) {
32  for (unsigned side = 0; side <= 1; ++side) {
33  const GeomDet* geomDet = geo.idToDet(BTLDetId(side, tray, module, 0, 1));
34  if (geomDet != nullptr) {
35  geomDets.push_back(geomDet);
36  LogTrace(metname) << "get BTL module " << std::hex << BTLDetId(side, tray, module, 0, 1).rawId() << std::dec
37  << " at R=" << geomDet->position().perp() << ", phi=" << geomDet->position().phi();
38  }
39  }
40  }
41 
42  if (!geomDets.empty()) {
43  precomputed_value_sort(geomDets.begin(), geomDets.end(), geomsort::DetZ());
44  btlDetTrays.push_back(new MTDDetTray(geomDets));
45  LogTrace(metname) << " New BTLDetTray with " << geomDets.size()
46  << " modules at R=" << btlDetTrays.back()->position().perp()
47  << ", phi=" << btlDetTrays.back()->position().phi() << std::endl;
48  }
49  }
50 
51  precomputed_value_sort(btlDetTrays.begin(), btlDetTrays.end(), geomsort::ExtractPhi<GeometricSearchDet, float>());
52  result.push_back(new MTDTrayBarrelLayer(btlDetTrays));
53  LogDebug(metname) << "BTLDetLayerGeometryBuilder: "
54  << " New MTDTrayBarrelLayer with " << btlDetTrays.size() << " rods, at R "
55  << result.back()->specificSurface().radius();
56 
57  for (vector<MTDTrayBarrelLayer*>::const_iterator it = result.begin(); it != result.end(); it++)
58  detlayers.push_back((DetLayer*)(*it));
59 
60  return detlayers;
61 }

References TauDecayModes::dec, BTLDetId::HALF_ROD, MTDGeometry::idToDet(), BTLDetId::kModulesPerROD, LogDebug, LogTrace, metname, BTLDetId::MIN_ROD, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), GeomDet::position(), precomputed_value_sort(), DetId::rawId(), mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by MTDDetLayerGeometryESProducer::produce().

GeomDet::position
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:43
BTLDetId::HALF_ROD
static constexpr int HALF_ROD
Definition: BTLDetId.h:52
GeomDet
Definition: GeomDet.h:27
DetLayer
Definition: DetLayer.h:21
BTLDetId::kModulesPerROD
static constexpr int kModulesPerROD
range constants, need two sets for the time being (one for tiles and one for bars)
Definition: BTLDetId.h:28
MTDGeometry::idToDet
const MTDGeomDet * idToDet(DetId) const override
Definition: MTDGeometry.cc:171
BTLDetId
Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0,...
Definition: BTLDetId.h:18
geomsort::DetZ
ExtractZ< GeomDet, float > DetZ
Definition: DetSorting.h:50
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MTDTrayBarrelLayer
Definition: MTDTrayBarrelLayer.h:17
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
geomsort::ExtractPhi
Definition: GeometricSorting.h:45
BTLDetId::MIN_ROD
static constexpr int MIN_ROD
Definition: BTLDetId.h:50
module
Definition: vlib.h:198
MTDDetTray
Definition: MTDDetTray.h:17
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
mps_fire.result
result
Definition: mps_fire.py:303
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
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
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