19 #include "CLHEP/Units/GlobalSystemOfUnits.h" 73 DDValue numbOfStrips(
"nStrips");
77 for (
auto& spec :
specs) {
78 if (
DDfetch(spec, numbOfStrips)) {
91 <<
"detid: " << detid <<
" name: " <<
name <<
" number of Strips: " <<
nStrips;
93 const std::vector<std::string> strpars = {
name};
98 rota.GetComponents(
x,
y,
z);
99 std::vector<double> pars;
100 if (dpar.size() == 3) {
101 const double width = dpar[0];
102 const double length = dpar[1];
105 <<
" (2) dpar.size() == 3, width: " <<
width <<
" length: " << length <<
" thickness: " <<
thickness;
108 const double dpar4 = dpar[4];
109 const double dpar8 = dpar[8];
110 const double dpar0 = dpar[0];
111 pars = {dpar4, dpar8, dpar0, 0.4, numbOfStrips.
doubles()[0]};
113 <<
" (3), else, dpar[4]: " << dpar4 <<
" dpar[8]: " << dpar8 <<
" dpar[0]: " << dpar0;
116 const std::vector<double> vtra = {tran.x(), tran.y(), tran.z()};
119 <<
" (4), tran.x() " << tran.x() <<
" tran.y(): " << tran.y() <<
" tran.z(): " << tran.z();
121 const std::vector<double> vrot = {
x.X(),
x.Y(),
x.Z(),
y.X(),
y.Y(),
y.Z(),
z.X(),
z.Y(),
z.Z()};
123 <<
" (5), x.X(), x.Y(), x.Z(), y.X(), y.Y(), y.Z(), z.X(), z.Y(), z.Z() " <<
x.X() <<
", " <<
x.Y() <<
", " 124 <<
x.Z() <<
", " <<
y.X() <<
", " <<
y.Y() <<
", " <<
y.Z() <<
", " <<
z.X() <<
", " <<
z.Y() <<
", " <<
z.Z();
125 rgeo.
insert(rpcid.
rawId(), vtra, vrot, pars, strpars);
142 std::vector<double> dpar = fview.
parameters();
144 std::string_view
name = fview.
name();
151 std::vector<double> tran(3);
152 tran[0] =
static_cast<double>(fview.
translation().X()) / dd4hep::mm;
153 tran[1] =
static_cast<double>(fview.
translation().Y()) / dd4hep::mm;
154 tran[2] =
static_cast<double>(fview.
translation().Z()) / dd4hep::mm;
159 rota.GetComponents(
x,
y,
z);
160 const std::vector<double>
rot = {
x.X(),
x.Y(),
x.Z(),
y.X(),
y.Y(),
y.Z(),
z.X(),
z.Y(),
z.Z()};
162 if (dd4hep::isA<dd4hep::Box>(fview.
solid())) {
163 const std::vector<double> pars = {
164 dpar[0] / dd4hep::mm, dpar[1] / dd4hep::mm, dpar[2] / dd4hep::mm, double(
nStrips)};
166 <<
" (2), dd4hep::Box, width: " << dpar[0] / dd4hep::mm <<
" length: " << dpar[1] / dd4hep::mm
167 <<
" thickness: " << dpar[2] / dd4hep::mm;
168 rgeo.
insert(rpcid, tran,
rot, pars, strpars);
170 const double ti = 0.4;
171 const std::vector<double> pars = {
172 dpar[0] / dd4hep::mm, dpar[1] / dd4hep::mm, dpar[3] / dd4hep::mm, ti, double(
nStrips)};
173 edm::LogVerbatim(
"RPCGeometryParsFromDD") <<
" (3), else, dpar[0] (i.e. dpar[4] for DD): " << dpar[0] / dd4hep::mm
174 <<
" dpar[1] (i.e. dpar[8] for DD): " << dpar[1] / dd4hep::mm
175 <<
" dpar[3] (i.e. dpar[0] for DD): " << dpar[3] / dd4hep::mm;
176 rgeo.
insert(rpcid, tran,
rot, pars, strpars);
179 <<
" (4), tran.x(): " << tran[0] <<
" tran.y(): " << tran[1] <<
" tran.z(): " << tran[2];
181 <<
" (5), x.X(), x.Y(), x.Z(), y.X(), y.Y(), y.Z(), z.X(), z.Y(), z.Z(): " <<
x.X() <<
", " <<
x.Y() <<
", " 182 <<
x.Z() <<
", " <<
y.X() <<
", " <<
y.Y() <<
", " <<
y.Z() <<
", " <<
z.X() <<
", " <<
z.Y() <<
", " <<
z.Z();
Log< level::Info, true > LogVerbatim
const std::vector< double > & doubles() const
a reference to the double-valued values stored in the given instance of DDValue
bool nextSibling()
set the current node to the next sibling ...
int baseNumberToUnitNumber(const MuonBaseNumber &) const override
bool insert(DetId id, const std::vector< double > &trans, const std::vector< double > &rot, const std::vector< double > &pars)
const Double_t * rot() const
The absolute rotation of the current node.
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
Compact representation of the geometrical detector hierarchy.
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
void build(const DDCompactView *cview, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rgeo)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
std::string_view name() const
void buildGeometry(DDFilteredView &fview, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rgeo)
const std::string & name() const
Returns the name.
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
const ExpandedNodes & history()
The numbering history of the current node.
bool firstChild()
set the current node to the first child
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
T get(const std::string &)
extract attribute value
std::vector< const DDsvalues_type * > specifics() const
constexpr uint32_t rawId() const
get the raw id
const DDGeoHistory & geoHistory() const
The list of ancestors up to the root-node of the current node.
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
dd4hep::Solid solid() const
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
bool firstChild()
set the current node to the first child ...
const DDTranslation & translation() const
The absolute translation of the current node.
const std::vector< double > parameters() const
extract shape parameters
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
MuonBaseNumber geoHistoryToBaseNumber(const DDGeoHistory &history) const
const Translation translation() const