23 #include <DD4hep/DD4hepUnits.h>
30 : m_name(computeNameWithNoNamespace(fv.
name())),
33 m_trans(fv.translation()),
37 m_diamondBoxParams(computeDiamondDimensions(m_isABox, m_isDD4hep, m_params)),
38 m_sensorType(computeSensorType(fv.logicalPart().
name().fullname())),
39 m_geographicalID(computeDetID(m_name, fv.copyNumbers(), fv.copyno(),
isRun2)),
40 m_z(fv.translation().
z())
47 : m_name(computeNameWithNoNamespace(fv.
name())),
50 m_trans(fv.translation() /
dd4hep::mm),
52 m_params(computeParameters(fv)),
54 m_diamondBoxParams(computeDiamondDimensions(m_isABox, m_isDD4hep, m_params)),
55 m_sensorType(computeSensorType(fv.
name())),
56 m_geographicalID(computeDetIDFromDD4hep(m_name, fv.copyNos(), fv.copyNum(),
isRun2)),
57 m_z(fv.translation().
z() /
dd4hep::mm)
83 m_params(
item.params_),
84 m_sensorType(
item.sensorType_),
85 m_geographicalID(
item.geographicalID_),
120 edm::LogVerbatim(
"DetGeomDesc::print") <<
"............................." << std::endl;
157 const auto& semiColonPos = nameFromView.find(
':');
158 const std::string name{(semiColonPos != std::string::npos ? nameFromView.substr(semiColonPos + 1) : nameFromView)};
166 auto myShape = fv.
solid();
167 const std::vector<double>&
parameters = myShape.dimensions();
179 const std::vector<double>&
params)
const {
187 boxShapeParameters = {
params.at(0) / dd4hep::mm,
params.at(1) / dd4hep::mm,
params.at(2) / dd4hep::mm};
190 return boxShapeParameters;
198 const std::vector<int>& copyNos,
199 const unsigned int copyNum,
200 const bool isRun2)
const {
206 if (copyNos.size() < 3)
208 <<
"size of copyNumbers for strip sensor is " << copyNos.size() <<
". It must be >= 3.";
211 const unsigned int decRPId = copyNos[copyNos.size() - 3];
214 const unsigned int rp =
decRPId % 10;
215 const unsigned int detector = copyNos[copyNos.size() - 1];
221 unsigned int decRPId = copyNum;
226 const unsigned int armIdx = (
decRPId / 100) % 10;
227 const unsigned int stIdx = (
decRPId / 10) % 10;
228 const unsigned int rpIdx =
decRPId % 10;
231 const unsigned int armIdx = (
decRPId / 100) % 10;
232 const unsigned int stIdx = (
decRPId / 10) % 10;
233 const unsigned int rpIdx =
decRPId % 10;
240 if (copyNos.size() < 4)
242 <<
"size of copyNumbers for TOTEM timing sensor is " << copyNos.size() <<
". It must be >= 4.";
244 const unsigned int decRPId = copyNos[copyNos.size() - 4];
246 const unsigned int plane = copyNos[copyNos.size() - 2], channel = copyNos[copyNos.size() - 1];
251 const unsigned int arm = copyNum / 100,
station = (copyNum % 100) / 10, rp = copyNum % 10;
258 if (copyNos.size() < 4)
260 <<
"size of copyNumbers for pixel sensor is " << copyNos.size() <<
". It must be >= 4.";
263 const unsigned int decRPId = copyNos[copyNos.size() - 4] % 10000;
266 const unsigned int rp =
decRPId % 10;
267 const unsigned int detector = copyNos[copyNos.size() - 2] - 1;
274 if (copyNos.size() < 2)
276 <<
"size of copyNumbers for diamond segments is " << copyNos.size() <<
". It must be >= 2.";
277 const unsigned int decRPId = copyNos[1];
288 const unsigned int id = copyNos[copyNos.size() - 1];
289 const unsigned int plane =
id / 100;
290 const unsigned int channel =
id % 100;
297 if (copyNos.size() < 2)
299 <<
"size of copyNumbers for diamond RP is " << copyNos.size() <<
". It must be >= 2.";
301 const unsigned int decRPId = copyNos[1];
322 const std::vector<int>& copyNos,
323 const unsigned int copyNum,
324 const bool isRun2)
const {
325 std::vector<int> copyNosOldDD = {copyNos.rbegin() + 1, copyNos.rend()};
340 if (foundFromDB != std::string::npos) {
347 if (foundFromXML != std::string::npos) {