Go to the source code of this file.
◆ algorithm()
Definition at line 14 of file DDTECCoolAlgo.cc.
References writedatasetfile::args, angle_units::operators::convertRadToDeg(), funct::cos(), MillePedeFileConverter_cfg::e, mps_fire::i, createfilelist::int, cms::DDNamespace::name(), PixelTestBeamValidation_cfi::Position, cms::DDNamespace::realName(), funct::sin(), and cms::DDNamespace::volume().
17 int startCopyNo =
args.find(
"StartCopyNo") ?
args.value<
int>(
"StartCopyNo") : 1;
18 double rPosition =
args.value<
double>(
"RPosition");
19 vector<double> phiPosition =
args.value<vector<double> >(
"PhiPosition");
20 vector<string> coolInsert =
args.value<vector<string> >(
"CoolInsert");
23 edm::LogVerbatim(
"TECGeom") <<
"DDTECCoolAlgo debug: Parent " << mother.name() <<
" NameSpace " << ns.name()
24 <<
" at radial Position " << rPosition;
25 if (phiPosition.size() == coolInsert.size()) {
26 for (
int i = 0;
i < (
int)(phiPosition.size());
i++) {
27 edm::LogVerbatim(
"TECGeom") <<
"DDTECCoolAlgo debug: Insert[" <<
i <<
"]: " << coolInsert.at(
i) <<
" at Phi " 31 edm::LogVerbatim(
"TECGeom") <<
"DDTECCoolAlgo ERROR: Number of inserts does not match the numer of PhiPositions!";
34 int copyNo = startCopyNo;
36 for (
int i = 0;
i < (
int)(coolInsert.size());
i++) {
39 double xpos = rPosition *
cos(phiPosition.at(
i));
40 double ypos = -rPosition *
sin(phiPosition.at(
i));
43 mother.placeVolume(
child, copyNo, tran);
44 edm::LogVerbatim(
"TECGeom") <<
"DDTECCoolAlgo test " <<
child.name() <<
"[" << copyNo <<
"] positioned in " 45 << mother.name() <<
" at " << tran <<
" phi " <<
convertRadToDeg(phiPosition.at(
i))
46 <<
" r " << rPosition;
Log< level::Info, true > LogVerbatim
constexpr NumType convertRadToDeg(NumType radians)
Sin< T >::type sin(const T &t)
Cos< T >::type cos(const T &t)
◆ DD4HEP_OPEN_PLUGIN()
DD4HEP_OPEN_PLUGIN |
( |
dd4hep |
, |
|
|
ddcms_det_element_DDCMS_track_DDTECCoolAlgo |
|
|
) |
| |