14 template <
class FilteredView>
17 template <
class FilteredView>
19 bool order = (
a->translation().z() ==
b->translation().z()) ?
a->translation().rho() <
b->translation().rho()
20 :
a->translation().z() <
b->translation().z();
24 template <
class FilteredView>
28 return id1.mtdRR() <
id2.mtdRR();
31 template <
class FilteredView>
45 auto module_number = copyNumbers[copyNumbers.size() - 2];
47 constexpr
char positive[] =
"PositiveZ";
48 constexpr
char negative[] =
"NegativeZ";
51 size_t delim1 =
modname.find(
"BModule");
52 size_t delim2 =
modname.find(
"Layer");
56 edm::LogVerbatim(
"MTDNumbering") <<
"BTLModule = " <<
modname <<
" " << copyNumbers[copyNumbers.size() - 3] <<
" " 60 if (
modname.find(positive) != std::string::npos) {
61 det->setGeographicalID(
BTLDetId(1, copyNumbers[copyNumbers.size() - 3], module_number, 0, 1));
62 }
else if (
modname.find(negative) != std::string::npos) {
63 det->setGeographicalID(
BTLDetId(0, copyNumbers[copyNumbers.size() - 3], module_number, 0, 1));
66 <<
"BTL Module " << module_number <<
" is neither positive nor negative in Z!";
79 auto module_number = copyNumbers[1];
81 constexpr
char positive[] =
"PositiveZ";
82 constexpr
char negative[] =
"NegativeZ";
85 size_t delim1 =
modname.find(
"BModule");
86 size_t delim2 =
modname.find(
"Layer");
94 if (
modname.find(positive) != std::string::npos) {
95 det->setGeographicalID(
BTLDetId(1, copyNumbers[2], module_number, 0, 1));
96 }
else if (
modname.find(negative) != std::string::npos) {
97 det->setGeographicalID(
BTLDetId(0, copyNumbers[2], module_number, 0, 1));
100 <<
"BTL Module " << module_number <<
" is neither positive nor negative in Z!";
122 baseNumber_.setSize(gh.size());
124 for (
uint i = gh.size();
i-- > 0;) {
125 baseNumber_.addLevel(gh[
i].logicalPart().
name().
name(), gh[
i].copyno());
127 edm::LogVerbatim(
"CmsMTDConstruction") << gh[
i].logicalPart().name().name() <<
" " << gh[
i].copyno();
131 det->setGeographicalID(
ETLDetId(etlScheme_.getUnitID(baseNumber_)));
135 auto module_number = copyNumbers[copyNumbers.size() - 2];
137 size_t delim_ring = det->name().find(
"EModule");
138 size_t delim_disc = det->name().find(
"Disc");
142 const uint32_t side = det->translation().z() > 0 ? 1 : 0;
145 det->setGeographicalID(
ETLDetId(side, atoi(ringN.c_str()), module_number, 0));
158 baseNumber_.setSize(fv.
copyNos().size());
162 size_t ipos =
name.rfind(
'_');
163 baseNumber_.addLevel(
name.substr(0, ipos), fv.
copyNos()[
i]);
169 det->setGeographicalID(
ETLDetId(etlScheme_.getUnitID(baseNumber_)));
174 template <
class FilteredView>
177 auto thisDet = theCmsMTDStringToEnum.type(nodeName);
180 if (thisDet == GeometricTimingDet::BTL) {
182 }
else if (thisDet == GeometricTimingDet::ETL) {
183 const uint32_t side = subdet->
translation().z() > 0 ? 1 : 0;
186 throw cms::Exception(
"CmsMTDConstruction") <<
" ERROR - I was expecting a SubDet, I got a " << fv.name();
192 template <
class FilteredView>
195 auto thisDet = theCmsMTDStringToEnum.type(nodeName);
198 if (thisDet != GeometricTimingDet::BTLLayer && thisDet != GeometricTimingDet::ETLDisc) {
199 throw cms::Exception(
"CmsMTDConstruction") <<
" ERROR - I was expecting a SubDet, I got a " << fv.name();
203 if (thisDet == GeometricTimingDet::BTLLayer) {
208 layer->setGeographicalID(nLayer);
209 }
else if (thisDet == GeometricTimingDet::ETLDisc) {
213 nLayer = (fv.name().find(
"Disc1") != std::string::npos) ? 1 : 2;
214 layer->setGeographicalID(nLayer);
220 template <
class FilteredView>
222 return (fv.name() ==
"EModule_Timingactive");
Log< level::Info, true > LogVerbatim
nav_type copyNumbers() const
return the stack of copy numbers
const std::vector< int > copyNos() const
The list of the volume copy numbers.
void buildBTLModule(FilteredView &, GeometricTimingDet *)
GeometricTimingDet * buildSubdet(FilteredView &)
const std::string path() const
The full path to the current node.
const std::vector< const Node * > geoHistory() const
const std::string & name() const
The name of a logical-part of the current node in the filtered-view.
static constexpr size_t kModStrLen
Detector identifier base class for the MIP Timing Layer.
constexpr std::array< uint8_t, layerIndexSize > layer
std::string_view name() const
void addComponent(GeometricTimingDet *)
bool isETLtdr(FilteredView &)
GeometricTimingDet * buildLayer(FilteredView &)
void setGeographicalID(DetId id)
void buildETLModule(FilteredView &, GeometricTimingDet *)
Translation const & translation() const
const DDGeoHistory & geoHistory() const
The list of ancestors up to the root-node of the current node.
static bool mtdOrderZ(const GeometricTimingDet *a, const GeometricTimingDet *b)
constexpr valType make0To2pi(valType angle)
static bool mtdOrderRR(const GeometricTimingDet *a, const GeometricTimingDet *b)
Detector identifier class for the Endcap Timing Layer.
Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0...
auto copyNumbers(Ts &&... ts) const -> decltype(copyNos(std::forward< Ts >(ts)...))
static bool mtdOrderPhi(const GeometricTimingDet *a, const GeometricTimingDet *b)