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

Constructor.

Definition at line 17 of file BTLDetLayerGeometryBuilder.cc.

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

Destructor.

Definition at line 20 of file BTLDetLayerGeometryBuilder.cc.

20  {
21 }

Member Function Documentation

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

Operations.

Definition at line 24 of file BTLDetLayerGeometryBuilder.cc.

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

24  {
25 
26  const std::string metname = "MTD|RecoMTD|RecoMTDDetLayers|BTLDetLayerGeometryBuilder";
27 
28  vector<DetLayer*> detlayers;
29  vector<MTDTrayBarrelLayer*> result;
30 
31  vector<const DetRod*> btlDetTrays;
32 
33  for(unsigned tray = BTLDetId::MIN_ROD; tray <= BTLDetId::HALF_ROD; ++tray) {
34 
35  vector<const GeomDet*> geomDets;
36  for(unsigned module = 1; module <= BTLDetId::kModulesPerROD; ++module) {
37  for(unsigned side = 0; side <= 1; ++side) {
38  const GeomDet* geomDet = geo.idToDet(BTLDetId(side, tray, module, 0, 1));
39  if (geomDet != nullptr) {
40  geomDets.push_back(geomDet);
41  LogTrace(metname)
42  << "get BTL module "
43  << std::hex << BTLDetId(side, tray, module, 0, 1).rawId() << std::dec
44  << " at R=" << geomDet->position().perp()
45  << ", phi=" << geomDet->position().phi();
46  }
47  }
48  }
49 
50  if (!geomDets.empty()) {
51  precomputed_value_sort(geomDets.begin(), geomDets.end(), geomsort::DetZ());
52  btlDetTrays.push_back(new MTDDetTray(geomDets));
53  LogTrace(metname) << " New BTLDetTray with " << geomDets.size()
54  << " modules at R=" << btlDetTrays.back()->position().perp()
55  << ", phi=" << btlDetTrays.back()->position().phi() << std::endl;
56  }
57  }
58 
59  precomputed_value_sort(btlDetTrays.begin(), btlDetTrays.end(), geomsort::ExtractPhi<GeometricSearchDet,float>());
60  result.push_back(new MTDTrayBarrelLayer(btlDetTrays));
61  LogDebug(metname)
62  << "BTLDetLayerGeometryBuilder: "<< " New MTDTrayBarrelLayer with " << btlDetTrays.size()
63  << " rods, at R " << result.back()->specificSurface().radius();
64 
65  for(vector<MTDTrayBarrelLayer*>::const_iterator it = result.begin(); it != result.end(); it++)
66  detlayers.push_back((DetLayer*)(*it));
67 
68  return detlayers;
69 }
#define LogDebug(id)
T perp() const
Definition: PV3DBase.h:72
const std::string metname
static constexpr int MIN_ROD
Definition: BTLDetId.h:42
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
ExtractZ< GeomDet, float > DetZ
Definition: DetSorting.h:53
const MTDGeomDet * idToDet(DetId) const override
Definition: MTDGeometry.cc:184
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:48
static constexpr int HALF_ROD
Definition: BTLDetId.h:44
#define LogTrace(id)
static constexpr int kModulesPerROD
range constants, need two sets for the time being (one for tiles and one for bars) ...
Definition: BTLDetId.h:30
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr, const Compare &comp)
Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0...
Definition: BTLDetId.h:18
Definition: vlib.h:208