29 for(
auto const it : etllayers.first) {
30 etlLayers_fw.push_back(it);
31 allForward.push_back(it);
33 detLayersMap[ makeDetLayerId(it) ] = it;
36 for(
auto const it: etllayers.second) {
37 etlLayers_bk.push_back(it);
38 allBackward.push_back(it);
40 detLayersMap[ makeDetLayerId(it) ] = it;
46 for(
auto const it : dtlayers) {
47 btlLayers.push_back(it);
48 allBarrel.push_back(it);
50 detLayersMap[ makeDetLayerId(it) ] = it;
62 return BTLDetId(
id.mtdSide(),0,0,0,0);
67 const vector<const DetLayer*>&
72 const vector<const DetLayer*>&
77 const vector<const DetLayer*>&
82 const vector<const DetLayer*>&
87 const vector<const DetLayer*>&
92 const vector<const DetLayer*>&
97 const vector<const DetLayer*>&
112 idout =
ETLDetId(etlId.mtdSide(),0,0,0);
116 idout =
BTLDetId(btlId.mtdSide(),0,0,0,0);
120 std::map<DetId,const DetLayer*>::const_iterator layer = detLayersMap.find(idout);
121 if (layer == detLayersMap.end())
return nullptr;
122 return layer->second;
156 etlLayers_all.reserve(etlLayers_bk.size()+etlLayers_fw.size());
157 std::copy(etlLayers_bk.begin(),etlLayers_bk.end(),back_inserter(etlLayers_all));
158 std::reverse(etlLayers_all.begin(),etlLayers_all.end());
159 std::copy(etlLayers_fw.begin(),etlLayers_fw.end(),back_inserter(etlLayers_all));
162 allEndcap.reserve(allBackward.size()+allForward.size());
163 std::copy(allBackward.begin(),allBackward.end(),back_inserter(allEndcap));
165 std::copy(allForward.begin(),allForward.end(),back_inserter(allEndcap));
168 allDetLayers.reserve(allBackward.size()+allBarrel.size()+allForward.size());
169 std::copy(allBackward.begin(),allBackward.end(),back_inserter(allDetLayers));
171 std::copy(allBarrel.begin(),allBarrel.end(),back_inserter(allDetLayers));
172 std::copy(allForward.begin(),allForward.end(),back_inserter(allDetLayers));
176 for (
auto l : allDetLayers)
177 (*
const_cast<DetLayer*
>(
l)).setSeqNum(sq++);
const std::vector< const DetLayer * > & allLayers() const
return all DetLayers (barrel + endcap), -Z to +Z
MTDDetLayerGeometry()
Constructor.
DetId makeDetLayerId(const DetLayer *detLayer) const
const std::vector< const DetLayer * > & allEndcapLayers() const
return all endcap layers
void addBTLLayers(const std::vector< DetLayer * > &btllayers)
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
virtual const std::vector< const GeomDet * > & basicComponents() const =0
~MTDDetLayerGeometry() override
Destructor.
constexpr uint32_t rawId() const
get the raw id
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
const std::vector< const DetLayer * > & allBTLLayers() const
return the BTL DetLayers (barrel), inside-out
Detector identifier base class for the MIP Timing Layer.
const std::vector< const DetLayer * > & allBackwardLayers() const
return all endcap layers
void addETLLayers(const std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > &etllayers)
const std::vector< const DetLayer * > & allETLLayers() const
return the ETL DetLayers (endcap), -Z to +Z
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr, const Compare &comp)
const DetLayer * idToLayer(const DetId &detId) const override
return the DetLayer which correspond to a certain DetId
const std::vector< const DetLayer * > & allForwardLayers() const
return all endcap layers
Detector identifier class for the Endcap Timing Layer.
const std::vector< const DetLayer * > & allBarrelLayers() const
return all barrel layers
Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0...
int mtdSubDetector() const