Go to the source code of this file.
static long algorithm |
( |
dd4hep::Detector & |
, |
|
|
cms::DDParsingContext & |
ctxt, |
|
|
xml_h |
e, |
|
|
dd4hep::SensitiveDetector & |
|
|
) |
| |
|
static |
Definition at line 9 of file DDHGCalWaferAlgo.cc.
References particleFlowDisplacedVertex_cfi::angles, writedatasetfile::args, angle_units::operators::convertDegToRad(), filterCSVwithJSON::copy, PVValHelper::dx, PVValHelper::dy, versionedElectronIDProducer_cfi::idName, dqmdumpme::k, cms::makeRotation3D(), Skims_PA_cff::name, cms::DDNamespace::name(), NAMESPACE_SEP, cms::DDAlgoArguments::parentName(), idealTransformation::rotation, AlCaHLTBitMon_QueryRunRegistry::string, funct::tan(), cms::DDAlgoArguments::value(), and cms::DDNamespace::volume().
17 const auto& cellSize =
args.value<
double>(
"CellSize");
18 const auto& cellType =
args.value<
int>(
"CellType");
19 const auto& childNames =
args.value<std::vector<std::string> >(
"ChildNames");
20 const auto& positionX =
args.value<std::vector<int> >(
"PositionX");
21 const auto& positionY =
args.value<std::vector<int> >(
"PositionY");
22 const auto&
angles =
args.value<std::vector<double> >(
"Angles");
23 const auto& detectorType =
args.value<std::vector<int> >(
"DetectorType");
25 edm::LogVerbatim(
"HGCalGeom") << childNames.size() <<
" children: " << childNames[0] <<
"; " << childNames[1]
26 <<
" positioned " << positionX.size() <<
" times with cell size " << cellSize;
27 for (
unsigned int k = 0;
k < positionX.size(); ++
k)
28 edm::LogVerbatim(
"HGCalGeom") <<
"[" <<
k <<
"] x " << positionX[
k] <<
" y " << positionY[
k] <<
" angle " 29 << angles[
k] <<
" detector " << detectorType[
k];
33 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferAlgo debug: Parent " << idName <<
" NameSpace " << idNameSpace;
37 double dx = 0.5 * cellSize;
38 double dy = 0.5 * dx *
tan(30._deg);
40 for (
unsigned int k = 0;
k < positionX.size(); ++
k) {
48 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferAlgo: Creating new rotation \t90, " << angles[
k] <<
", 90, " 49 << (angles[
k] + 90) <<
", 0, 0";
53 double xpos = dx * positionX[
k];
54 double ypos = dy * positionY[
k];
55 dd4hep::Position tran(xpos, ypos, 0);
56 int copy = cellType * 1000 +
k;
57 mother.placeVolume(ns.volume(
name),
copy, dd4hep::Transform3D(rotation, tran));
59 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferAlgo: " <<
name <<
" number " << copy <<
" positioned in " << idName
60 <<
" at " << tran <<
" with " <<
rotation;
constexpr long double convertDegToRad(NumType degrees)
dd4hep::Rotation3D makeRotation3D(double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ)
Tan< T >::type tan(const T &t)
DD4HEP_OPEN_PLUGIN |
( |
dd4hep |
, |
|
|
ddcms_det_element_DDCMS_hgcal_DDHGCalWaferAlgo |
|
|
) |
| |