|
|
|
| HGCalHEAlgo () |
|
| HGCalHEAlgo (cms::DDParsingContext &ctxt, xml_h e) |
|
void | positionMix (cms::DDParsingContext &ctxt, xml_h e, const dd4hep::Volume &glog, const std::string &nameM, int copyM, double thick, const dd4hep::Material &matter, double rin, double rmid, double rout, double zz) |
|
void | positionSensitive (cms::DDParsingContext &ctxt, xml_h e, const dd4hep::Volume &glog, double rin, double rout, double zpos, int layertype, int layercenter) |
|
Definition at line 25 of file DDHGCalHEAlgo.cc.
◆ HGCalHEAlgo() [1/2]
HGCalHEAlgo::HGCalHEAlgo |
( |
| ) |
|
|
inline |
◆ HGCalHEAlgo() [2/2]
Definition at line 27 of file DDHGCalHEAlgo.cc.
42 materials =
args.value<std::vector<std::string>>(
"MaterialNames");
82 edm::LogVerbatim(
"HGCalGeom") <<
"First copy number for layer type " <<
i <<
":" <<
ii <<
" with "
96 namesTop =
args.value<std::vector<std::string>>(
"TopVolumeNames");
112 namesBot =
args.value<std::vector<std::string>>(
"BottomVolumeNames");
150 slopeB =
args.value<std::vector<double>>(
"SlopeBottom");
151 zFrontB =
args.value<std::vector<double>>(
"ZFrontBottom");
153 slopeT =
args.value<std::vector<double>>(
"SlopeTop");
154 zFrontT =
args.value<std::vector<double>>(
"ZFrontTop");
157 for (
unsigned int i = 0;
i <
slopeB.size(); ++
i)
160 for (
unsigned int i = 0;
i <
slopeT.size(); ++
i)
166 waferType = std::make_unique<HGCalWaferType>(
176 const double tol(0.01);
183 for (
int ly = laymin; ly < laymax; ++ly) {
194 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: Layer " << ly <<
":" <<
ii <<
" Front " << zi <<
", " << routF
195 <<
" Back " << zo <<
", " << rinB <<
" superlayer thickness " <<
layerThick[
i];
202 std::vector<double> pgonZ, pgonRin, pgonRout;
206 pgonZ.emplace_back(-hthick);
207 pgonZ.emplace_back(hthick);
208 pgonRin.emplace_back(rinB);
209 pgonRin.emplace_back(rinB);
210 pgonRout.emplace_back(rmax);
211 pgonRout.emplace_back(rmax);
225 for (
unsigned int isec = 0; isec < pgonZ.size(); ++isec) {
227 pgonRout[isec] = pgonRout[isec] *
cosAlpha - tol;
232 ns.addSolidNS(ns.prepend(
name), solid);
234 ns.addVolumeNS(glog);
239 for (
unsigned int k = 0;
k < pgonZ.size(); ++
k)
241 <<
"[" <<
k <<
"] z " << pgonZ[
k] <<
" R " << pgonRin[
k] <<
":" << pgonRout[
k];
245 ns.addSolidNS(ns.prepend(
name), solid);
247 ns.addVolumeNS(glog);
250 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << solid.name() <<
" Tubs made of " << matter.name()
251 <<
" of dimensions " << rinB <<
", " << routF <<
", " << hthick
252 <<
", 0.0, 360.0 and positioned in: " << glog.name() <<
" number " <<
copy;
254 positionMix(ctxt,
e, glog,
name,
copy,
thickness[
ii], matter, rinB,
rMixLayer[
i], routF,
zz);
258 mother.placeVolume(glog,
copy,
r1);
261 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << glog.name() <<
" number " <<
copy <<
" positioned in "
262 << mother.name() <<
" at " <<
r1 <<
" with no rotation";
271 <<
": thickness of all its "
272 <<
"components **** ERROR ****";
275 << thickTot <<
" of the components";
286 edm::LogVerbatim(
"HGCalGeom") <<
"<<== End of DDHGCalHEAlgo construction...";
References funct::abs(), cms::DDNamespace::addSolidNS(), cms::DDNamespace::addVolumeNS(), zMuMuMuonUserData::alpha, writedatasetfile::args, angle_units::operators::convertRadToDeg(), filterCSVwithJSON::copy, funct::cos(), MillePedeFileConverter_cfg::e, mps_fire::i, cuy::ii, dqmdumpme::k, cms::DDNamespace::material(), g4SimHits_cfi::Material, min(), Skims_PA_cff::name, cms::DDNamespace::name(), angle_units::piRadians(), HGCalGeometryMode::Polyhedra, PixelTestBeamValidation_cfi::Position, cms::DDNamespace::prepend(), diffTwoXMLs::r1, HGCalGeomTools::radius(), volumeBasedMagneticField_160812_cfi::sectors, AlCaHLTBitMon_QueryRunRegistry::string, Calorimetry_cff::thickness, cms::DDNamespace::volume(), and geometryCSVtoXML::zz.
◆ positionMix()
void HGCalHEAlgo::positionMix |
( |
cms::DDParsingContext & |
ctxt, |
|
|
xml_h |
e, |
|
|
const dd4hep::Volume & |
glog, |
|
|
const std::string & |
nameM, |
|
|
int |
copyM, |
|
|
double |
thick, |
|
|
const dd4hep::Material & |
matter, |
|
|
double |
rin, |
|
|
double |
rmid, |
|
|
double |
rout, |
|
|
double |
zz |
|
) |
| |
|
inline |
Definition at line 290 of file DDHGCalHEAlgo.cc.
304 for (
unsigned int ly = 0; ly <
layerTypeTop.size(); ++ly) {
308 for (
unsigned int ly = 0; ly <
layerTypeBot.size(); ++ly) {
312 double hthick = 0.5 * thick;
317 ns.addSolidNS(ns.prepend(
name), solid);
319 ns.addVolumeNS(glog1);
321 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << solid.name() <<
" Tubs made of " << matter.name()
322 <<
" of dimensions " << rmid <<
", " << rout <<
", " << hthick <<
", 0.0, 360.0";
324 glog.placeVolume(glog1, 1);
327 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << glog1.name() <<
" number 1 positioned in " << glog.name()
328 <<
" at (0, 0, 0) with no rotation";
330 double thickTot(0), zpos(-hthick);
331 for (
unsigned int ly = 0; ly <
layerTypeTop.size(); ++ly) {
338 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: Layer " << ly <<
":" <<
ii <<
" R " << rmid <<
":" << rout
344 ns.addSolidNS(ns.prepend(
name), solid);
346 ns.addVolumeNS(glog2);
353 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << solid.name() <<
" Tubs made of " << matter1.name()
354 <<
" of dimensions " << rmid <<
", " << rout <<
", " << hthickl <<
", 0.0, 360.0";
359 glog1.placeVolume(glog2,
copy,
r1);
362 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: Position " << glog2.name() <<
" number " <<
copy <<
" in "
363 << glog1.name() <<
" at " <<
r1 <<
" with no rotation";
368 if (
std::abs(thickTot - thick) < 0.00001) {
369 }
else if (thickTot > thick) {
370 edm::LogError(
"HGCalGeom") <<
"Thickness of the partition " << thick <<
" is smaller than " << thickTot
371 <<
": thickness of all its components in "
372 <<
"the top part **** ERROR ****";
373 }
else if (thickTot < thick) {
374 edm::LogWarning(
"HGCalGeom") <<
"Thickness of the partition " << thick <<
" does not match with " << thickTot
375 <<
" of the components in top part";
379 name = nameM +
"Bottom";
382 ns.addSolidNS(ns.prepend(
name), solid);
384 ns.addVolumeNS(glog1);
387 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << solid.name() <<
" Tubs made of " << matter.name()
388 <<
" of dimensions " << rin <<
", " << rmid <<
", " << hthick <<
", 0.0, 360.0";
391 glog.placeVolume(glog1, 1);
393 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << glog1.name() <<
" number 1 positioned in " << glog.name()
394 <<
" at (0, 0, 0) with no rotation";
398 for (
unsigned int ly = 0; ly <
layerTypeBot.size(); ++ly) {
405 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: Layer " << ly <<
":" <<
ii <<
" R " << rin <<
":" << rmid
411 ns.addSolidNS(ns.prepend(
name), solid);
413 ns.addVolumeNS(glog2);
420 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << solid.name() <<
" Tubs made of " << matter1.name()
421 <<
" of dimensions " << rin <<
", " << rmid <<
", " << hthickl <<
", 0.0, 360.0";
426 glog1.placeVolume(glog2,
copy,
r1);
428 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: Position " << glog2.name() <<
" number " <<
copy <<
" in "
429 << glog1.name() <<
" at " <<
r1 <<
" with no rotation";
441 if (
std::abs(thickTot - thick) < 0.00001) {
442 }
else if (thickTot > thick) {
443 edm::LogError(
"HGCalGeom") <<
"Thickness of the partition " << thick <<
" is smaller than " << thickTot
444 <<
": thickness of all its components in "
445 <<
"the top part **** ERROR ****";
446 }
else if (thickTot < thick) {
447 edm::LogWarning(
"HGCalGeom") <<
"Thickness of the partition " << thick <<
" does not match with " << thickTot
448 <<
" of the components in top part";
References funct::abs(), cms::DDNamespace::addSolidNS(), cms::DDNamespace::addVolumeNS(), filterCSVwithJSON::copy, MillePedeFileConverter_cfg::e, HLT_2018_cff::eta1, HLT_2018_cff::eta2, cuy::ii, dqm-mbProfile::log, cms::DDNamespace::material(), g4SimHits_cfi::Material, Skims_PA_cff::name, angle_units::piRadians(), PixelTestBeamValidation_cfi::Position, cms::DDNamespace::prepend(), diffTwoXMLs::r1, AlCaHLTBitMon_QueryRunRegistry::string, funct::tan(), and geometryCSVtoXML::zz.
◆ positionSensitive()
void HGCalHEAlgo::positionSensitive |
( |
cms::DDParsingContext & |
ctxt, |
|
|
xml_h |
e, |
|
|
const dd4hep::Volume & |
glog, |
|
|
double |
rin, |
|
|
double |
rout, |
|
|
double |
zpos, |
|
|
int |
layertype, |
|
|
int |
layercenter |
|
) |
| |
|
inline |
Definition at line 452 of file DDHGCalHEAlgo.cc.
461 static const double sqrt3 =
std::sqrt(3.0);
463 double R = 2.0 *
r / sqrt3;
464 double dy = 0.75 *
R;
465 int N = (
int)(0.5 * rout /
r) + 2;
468 int ium(0), ivm(0), iumAll(0), ivmAll(0), kount(0), ntot(0),
nin(0);
469 std::vector<int> ntype(6, 0);
470 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << glog.name() <<
" rout " << rout <<
" N " <<
N
471 <<
" for maximum u, v Offset; Shift " << xyoff.first <<
":" << xyoff.second
474 for (
int u = -
N; u <=
N; ++u) {
476 for (
int v = -
N;
v <=
N; ++
v) {
480 double xpos = xyoff.first + nc *
r;
481 double ypos = xyoff.second +
nr *
dy;
488 int copy =
type * 1000000 + iv * 100 + iu;
518 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << glog.name() <<
" number " <<
copy <<
" positioned in "
519 << glog.name() <<
" at " << tran <<
" with no rotation";
526 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: Maximum # of u " << ium <<
":" << iumAll <<
" # of v " << ivm
527 <<
":" << ivmAll <<
" and " <<
nin <<
":" << kount <<
":" << ntot <<
" wafers ("
528 << ntype[0] <<
":" << ntype[1] <<
":" << ntype[2] <<
":" << ntype[3] <<
":"
529 << ntype[4] <<
":" << ntype[5] <<
") for " << glog.name() <<
" R " << rin <<
":"
References funct::abs(), filterCSVwithJSON::copy, distTCMET_cfi::corner, PVValHelper::dy, MillePedeFileConverter_cfg::e, createfilelist::int, HGCalParameters::k_CornerSize, N, nin, EgHLTOffHistBins_cfi::nr, PixelTestBeamValidation_cfi::Position, dttmaxenums::R, alignCSCRings::r, mathSSE::sqrt(), findQualityFiles::v, cms::DDNamespace::volume(), and HGCalGeomTools::waferCorner().
◆ absorbMode
int HGCalHEAlgo::absorbMode |
◆ alpha
double HGCalHEAlgo::alpha |
◆ choiceType
int HGCalHEAlgo::choiceType |
◆ copies
std::unordered_set<int> HGCalHEAlgo::copies |
◆ copyNumber
std::vector<int> HGCalHEAlgo::copyNumber |
◆ copyNumberBot
std::vector<int> HGCalHEAlgo::copyNumberBot |
◆ copyNumberTop
std::vector<int> HGCalHEAlgo::copyNumberTop |
◆ cosAlpha
double HGCalHEAlgo::cosAlpha |
◆ firstLayer
int HGCalHEAlgo::firstLayer |
◆ fracAreaMin
double HGCalHEAlgo::fracAreaMin |
◆ geomTools
◆ layerCenter
std::vector<int> HGCalHEAlgo::layerCenter |
◆ layerNumbers
std::vector<int> HGCalHEAlgo::layerNumbers |
◆ layerSense
std::vector<int> HGCalHEAlgo::layerSense |
◆ layerSenseBot
std::vector<int> HGCalHEAlgo::layerSenseBot |
◆ layerThick
std::vector<double> HGCalHEAlgo::layerThick |
◆ layerThickBot
std::vector<double> HGCalHEAlgo::layerThickBot |
◆ layerThickTop
std::vector<double> HGCalHEAlgo::layerThickTop |
◆ layerType
std::vector<int> HGCalHEAlgo::layerType |
◆ layerTypeBot
std::vector<int> HGCalHEAlgo::layerTypeBot |
◆ layerTypeTop
std::vector<int> HGCalHEAlgo::layerTypeTop |
◆ materials
std::vector<std::string> HGCalHEAlgo::materials |
◆ materialsBot
std::vector<std::string> HGCalHEAlgo::materialsBot |
◆ materialsTop
std::vector<std::string> HGCalHEAlgo::materialsTop |
◆ namesBot
std::vector<std::string> HGCalHEAlgo::namesBot |
◆ namesTop
std::vector<std::string> HGCalHEAlgo::namesTop |
◆ nCutRadPar
int HGCalHEAlgo::nCutRadPar |
◆ rad100to200
std::vector<double> HGCalHEAlgo::rad100to200 |
◆ rad200to300
std::vector<double> HGCalHEAlgo::rad200to300 |
◆ rMaxFront
std::vector<double> HGCalHEAlgo::rMaxFront |
◆ rMinFront
std::vector<double> HGCalHEAlgo::rMinFront |
◆ rMixLayer
std::vector<double> HGCalHEAlgo::rMixLayer |
◆ sectors
◆ slopeB
std::vector<double> HGCalHEAlgo::slopeB |
◆ slopeT
std::vector<double> HGCalHEAlgo::slopeT |
◆ thickness
std::vector<double> HGCalHEAlgo::thickness |
◆ volumeNames
std::vector<std::string> HGCalHEAlgo::volumeNames |
◆ waferNames
std::vector<std::string> HGCalHEAlgo::waferNames |
◆ waferSepar
double HGCalHEAlgo::waferSepar |
◆ waferSize
double HGCalHEAlgo::waferSize |
◆ waferType
◆ zFrontB
std::vector<double> HGCalHEAlgo::zFrontB |
◆ zFrontT
std::vector<double> HGCalHEAlgo::zFrontT |
◆ zMinBlock
double HGCalHEAlgo::zMinBlock |
◆ zMinRadPar
double HGCalHEAlgo::zMinRadPar |
std::vector< double > slopeB
std::vector< std::string > volumeNames
std::vector< double > rad100to200
std::unordered_set< int > copies
constexpr NumType convertRadToDeg(NumType radians)
static constexpr uint32_t k_CornerSize
std::vector< int > copyNumberTop
std::vector< std::string > materials
std::vector< int > layerNumbers
std::vector< std::string > materialsBot
std::vector< int > layerSenseBot
std::vector< double > layerThickBot
Cos< T >::type cos(const T &t)
std::vector< std::string > materialsTop
std::vector< double > zFrontT
std::vector< int > layerTypeBot
std::vector< double > zFrontB
std::vector< std::string > namesBot
void positionMix(cms::DDParsingContext &ctxt, xml_h e, const dd4hep::Volume &glog, const std::string &nameM, int copyM, double thick, const dd4hep::Material &matter, double rin, double rmid, double rout, double zz)
std::unique_ptr< HGCalWaferType > waferType
std::vector< int > layerCenter
std::vector< double > slopeT
std::vector< int > layerTypeTop
void positionSensitive(cms::DDParsingContext &ctxt, xml_h e, const dd4hep::Volume &glog, double rin, double rout, double zpos, int layertype, int layercenter)
constexpr long double piRadians(M_PIl)
std::vector< int > layerSense
std::vector< int > layerType
Tan< T >::type tan(const T &t)
std::vector< double > rad200to300
std::vector< double > rMinFront
std::vector< std::pair< float, float > >::iterator itr
std::vector< int > copyNumber
std::vector< double > layerThick
std::vector< double > rMixLayer
std::vector< std::string > waferNames
std::vector< int > copyNumberBot
std::vector< double > layerThickTop
std::vector< std::string > namesTop
Abs< T >::type abs(const T &t)
std::vector< double > rMaxFront
std::vector< double > thickness