38 LogWarning(
"MTDDetLayers") <<
"No MTD topology is available.";
41 LogWarning(
"MTDDetLayers") <<
"No MTD geometry is available.";
46 for (
auto const it : etllayers.first) {
47 etlLayers_fw.push_back(it);
48 allForward.push_back(it);
50 detLayersMap[makeDetLayerId(it)] = it;
53 for (
auto const it : etllayers.second) {
54 etlLayers_bk.push_back(it);
55 allBackward.push_back(it);
57 detLayersMap[makeDetLayerId(it)] = it;
62 for (
auto const it : dtlayers) {
63 btlLayers.push_back(it);
64 allBarrel.push_back(it);
66 detLayersMap[makeDetLayerId(it)] = it;
73 return ETLDetId(
id.mtdSide(), 0, 0, 0);
76 return BTLDetId(
id.mtdSide(), 0, 0, 0, 0);
103 idout =
ETLDetId(etlId.mtdSide(), 0, 0, 0);
106 idout =
BTLDetId(btlId.mtdSide(), 0, 0, 0, 0);
110 std::map<DetId, const DetLayer*>::const_iterator
layer = detLayersMap.find(idout);
111 if (
layer == detLayersMap.end())
113 return layer->second;
147 etlLayers_all.reserve(etlLayers_bk.size() + etlLayers_fw.size());
148 std::copy(etlLayers_bk.begin(), etlLayers_bk.end(), back_inserter(etlLayers_all));
149 std::reverse(etlLayers_all.begin(), etlLayers_all.end());
150 std::copy(etlLayers_fw.begin(), etlLayers_fw.end(), back_inserter(etlLayers_all));
153 allEndcap.reserve(allBackward.size() + allForward.size());
154 std::copy(allBackward.begin(), allBackward.end(), back_inserter(allEndcap));
156 std::copy(allForward.begin(), allForward.end(), back_inserter(allEndcap));
159 allDetLayers.reserve(allBackward.size() + allBarrel.size() + allForward.size());
160 std::copy(allBackward.begin(), allBackward.end(), back_inserter(allDetLayers));
162 std::copy(allBarrel.begin(), allBarrel.end(), back_inserter(allDetLayers));
163 std::copy(allForward.begin(), allForward.end(), back_inserter(allDetLayers));
167 for (
auto l : allDetLayers)
168 (*
const_cast<DetLayer*
>(
l)).setSeqNum(sq++);
static std::vector< DetLayer * > buildLayers(const MTDGeometry &geo)
Operations.
MTDDetLayerGeometry()
Constructor.
void addBTLLayers(const std::vector< DetLayer *> &btllayers)
const std::vector< const DetLayer * > & allBackwardLayers() const
return all endcap layers
~MTDDetLayerGeometry() override
Destructor.
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
int mtdSubDetector() const
Detector identifier base class for the MIP Timing Layer.
constexpr std::array< uint8_t, layerIndexSize > layer
const std::vector< const DetLayer * > & allLayers() const
return all DetLayers (barrel + endcap), -Z to +Z
const std::vector< const DetLayer * > & allBarrelLayers() const
return all barrel layers
const DetLayer * idToLayer(const DetId &detId) const override
return the DetLayer which correspond to a certain DetId
void buildLayers(const MTDGeometry *geo, const MTDTopology *mtopo)
const std::vector< const DetLayer * > & allEndcapLayers() const
return all endcap layers
const std::vector< const DetLayer * > & allForwardLayers() const
return all endcap layers
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
const std::vector< const DetLayer * > & allBTLLayers() const
return the BTL DetLayers (barrel), inside-out
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr, const Compare &comp)
constexpr uint32_t rawId() const
get the raw id
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
virtual const std::vector< const GeomDet * > & basicComponents() const =0
DetId makeDetLayerId(const DetLayer *detLayer) const
void addETLLayers(const std::pair< std::vector< DetLayer *>, std::vector< DetLayer *> > &etllayers)
Detector identifier class for the Endcap Timing Layer.
Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0...
static std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > buildLayers(const MTDGeometry &geo, const MTDTopology &topo)
Log< level::Warning, false > LogWarning
const std::vector< const DetLayer * > & allETLLayers() const
return the ETL DetLayers (endcap), -Z to +Z