|
|
|
| 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) |
|
|
static constexpr double | tol1_ = 0.01 |
|
static constexpr double | tol2_ = 0.00001 |
|
Definition at line 26 of file DDHGCalHEAlgo.cc.
◆ HGCalHEAlgo() [1/2]
HGCalHEAlgo::HGCalHEAlgo |
( |
| ) |
|
|
inline |
◆ HGCalHEAlgo() [2/2]
Definition at line 28 of file DDHGCalHEAlgo.cc.
43 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");
111 namesBot_ =
args.value<std::vector<std::string>>(
"BottomVolumeNames");
118 <<
" types of volumes in the bottom part";
149 slopeB_ =
args.value<std::vector<double>>(
"SlopeBottom");
150 zFrontB_ =
args.value<std::vector<double>>(
"ZFrontBottom");
152 slopeT_ =
args.value<std::vector<double>>(
"SlopeTop");
153 zFrontT_ =
args.value<std::vector<double>>(
"ZFrontTop");
156 for (
unsigned int i = 0;
i <
slopeB_.size(); ++
i)
159 for (
unsigned int i = 0;
i <
slopeT_.size(); ++
i)
165 waferType_ = std::make_unique<HGCalWaferType>(
181 for (
int ly = laymin; ly < laymax; ++ly) {
192 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: Layer " << ly <<
":" <<
ii <<
" Front " << zi <<
", " << routF
193 <<
" Back " << zo <<
", " << rinB <<
" superlayer thickness " <<
layerThick_[
i];
200 std::vector<double> pgonZ, pgonRin, pgonRout;
205 pgonZ.emplace_back(-hthick);
206 pgonZ.emplace_back(hthick);
207 pgonRin.emplace_back(rinB);
208 pgonRin.emplace_back(rinB);
209 pgonRout.emplace_back(rmax);
210 pgonRout.emplace_back(rmax);
224 for (
unsigned int isec = 0; isec < pgonZ.size(); ++isec) {
230 dd4hep::Solid solid =
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];
249 ns.addSolidNS(ns.prepend(
name), solid);
251 ns.addVolumeNS(glog);
254 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << solid.name() <<
" Tubs made of " << matter.name()
255 <<
" of dimensions " << rinB <<
":" << rins <<
", " << routF <<
":" << routs
256 <<
", " << hthick <<
", 0.0, 360.0 and positioned in: " << glog.name()
257 <<
" number " <<
copy;
259 positionMix(ctxt,
e, glog,
name,
copy,
thickness_[
ii], matter, rins,
rMixLayer_[
i], routs,
zz);
263 mother.placeVolume(glog,
copy,
r1);
266 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << glog.name() <<
" number " <<
copy <<
" positioned in "
267 << mother.name() <<
" at " <<
r1 <<
" with no rotation";
276 << thickTot <<
": thickness of all its components **** ERROR ****";
279 << thickTot <<
" of the components";
291 edm::LogVerbatim(
"HGCalGeom") <<
"<<== End of DDHGCalHEAlgo construction...";
References funct::abs(), cms::DDNamespace::addSolidNS(), cms::DDNamespace::addVolumeNS(), 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(), AlCaHLTBitMon_QueryRunRegistry::string, 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 295 of file DDHGCalHEAlgo.cc.
317 double hthick = 0.5 * thick;
322 ns.addSolidNS(ns.prepend(
name), solid);
324 ns.addVolumeNS(glog1);
326 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << solid.name() <<
" Tubs made of " << matter.name()
327 <<
" of dimensions " << rmid <<
", " << rout <<
", " << hthick <<
", 0.0, 360.0";
329 glog.placeVolume(glog1, 1);
332 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << glog1.name() <<
" number 1 positioned in " << glog.name()
333 <<
" at (0, 0, 0) with no rotation";
335 double thickTot(0), zpos(-hthick);
343 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: Layer " << ly <<
":" <<
ii <<
" R " << rmid <<
":" << rout
349 ns.addSolidNS(ns.prepend(
name), solid);
351 ns.addVolumeNS(glog2);
358 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << solid.name() <<
" Tubs made of " << matter1.name()
359 <<
" of dimensions " << rmid <<
", " << rout <<
", " << hthickl <<
", 0.0, 360.0";
364 glog1.placeVolume(glog2,
copy,
r1);
367 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: Position " << glog2.name() <<
" number " <<
copy <<
" in "
368 << glog1.name() <<
" at " <<
r1 <<
" with no rotation";
374 if (thickTot > thick) {
375 edm::LogError(
"HGCalGeom") <<
"Thickness of the partition " << thick <<
" is smaller than " << thickTot
376 <<
": thickness of all its components in the top part **** ERROR ****";
378 edm::LogWarning(
"HGCalGeom") <<
"Thickness of the partition " << thick <<
" does not match with " << thickTot
379 <<
" of the components in top part";
384 name = nameM +
"Bottom";
387 ns.addSolidNS(ns.prepend(
name), solid);
389 ns.addVolumeNS(glog1);
392 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << solid.name() <<
" Tubs made of " << matter.name()
393 <<
" of dimensions " << rin <<
", " << rmid <<
", " << hthick <<
", 0.0, 360.0";
396 glog.placeVolume(glog1, 1);
398 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << glog1.name() <<
" number 1 positioned in " << glog.name()
399 <<
" at (0, 0, 0) with no rotation";
410 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: Layer " << ly <<
":" <<
ii <<
" R " << rin <<
":" << rmid
416 ns.addSolidNS(ns.prepend(
name), solid);
418 ns.addVolumeNS(glog2);
425 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << solid.name() <<
" Tubs made of " << matter1.name()
426 <<
" of dimensions " << rin <<
", " << rmid <<
", " << hthickl <<
", 0.0, 360.0";
431 glog1.placeVolume(glog2,
copy,
r1);
433 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: Position " << glog2.name() <<
" number " <<
copy <<
" in "
434 << glog1.name() <<
" at " <<
r1 <<
" with no rotation";
447 if (thickTot > thick) {
448 edm::LogError(
"HGCalGeom") <<
"Thickness of the partition " << thick <<
" is smaller than " << thickTot
449 <<
": thickness of all its components in the top part **** ERROR ****";
451 edm::LogWarning(
"HGCalGeom") <<
"Thickness of the partition " << thick <<
" does not match with " << thickTot
452 <<
" of the components in top part";
References funct::abs(), cms::DDNamespace::addSolidNS(), cms::DDNamespace::addVolumeNS(), filterCSVwithJSON::copy, MillePedeFileConverter_cfg::e, HLT_FULL_cff::eta1, HLT_FULL_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 457 of file DDHGCalHEAlgo.cc.
466 static const double sqrt3 =
std::sqrt(3.0);
468 double R = 2.0 *
r / sqrt3;
469 double dy = 0.75 *
R;
470 int N = (
int)(0.5 * rout /
r) + 2;
473 int ium(0), ivm(0), iumAll(0), ivmAll(0), kount(0), ntot(0),
nin(0);
474 std::vector<int> ntype(6, 0);
475 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << glog.name() <<
" rout " << rout <<
" N " <<
N
476 <<
" for maximum u, v Offset; Shift " << xyoff.first <<
":" << xyoff.second
479 for (
int u = -
N; u <=
N; ++u) {
480 for (
int v = -
N;
v <=
N; ++
v) {
483 double xpos = xyoff.first + nc *
r;
484 double ypos = xyoff.second +
nr *
dy;
519 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << glog.name() <<
" number " <<
copy <<
" positioned in "
520 << glog.name() <<
" at " << tran <<
" with no rotation";
527 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: Maximum # of u " << ium <<
":" << iumAll <<
" # of v " << ivm
528 <<
":" << ivmAll <<
" and " <<
nin <<
":" << kount <<
":" << ntot <<
" wafers ("
529 << ntype[0] <<
":" << ntype[1] <<
":" << ntype[2] <<
":" << ntype[3] <<
":"
530 << 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, HGCalTypes::packTypeUV(), 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_
int HGCalHEAlgo::sectors_ |
◆ sensitiveMode_
int HGCalHEAlgo::sensitiveMode_ |
◆ slopeB_
std::vector<double> HGCalHEAlgo::slopeB_ |
◆ slopeT_
std::vector<double> HGCalHEAlgo::slopeT_ |
◆ thickness_
std::vector<double> HGCalHEAlgo::thickness_ |
◆ tol1_
constexpr double HGCalHEAlgo::tol1_ = 0.01 |
|
staticconstexpr |
◆ tol2_
constexpr double HGCalHEAlgo::tol2_ = 0.00001 |
|
staticconstexpr |
◆ 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 > rMixLayer_
constexpr NumType convertRadToDeg(NumType radians)
std::vector< std::string > waferNames_
std::vector< double > zFrontT_
std::vector< int > layerNumbers_
std::vector< double > layerThickTop_
static constexpr uint32_t k_CornerSize
HGCalGeomTools geomTools_
std::vector< int > copyNumberBot_
std::vector< std::string > materials_
std::unordered_set< int > copies_
Log< level::Warning, false > LogWarning
std::vector< double > rMinFront_
std::vector< int > layerTypeTop_
std::vector< std::string > materialsTop_
std::vector< double > rad200to300_
Cos< T >::type cos(const T &t)
std::vector< int > layerSense_
std::vector< double > layerThickBot_
std::vector< std::string > volumeNames_
std::vector< int > layerCenter_
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)
static int32_t packTypeUV(int type, int u, int v)
void positionSensitive(cms::DDParsingContext &ctxt, xml_h e, const dd4hep::Volume &glog, double rin, double rout, double zpos, int layertype, int layercenter)
std::vector< int > copyNumberTop_
constexpr long double piRadians(M_PIl)
std::vector< std::string > materialsBot_
std::vector< int > layerType_
std::vector< std::string > namesBot_
std::vector< double > slopeB_
Tan< T >::type tan(const T &t)
static constexpr double tol1_
std::vector< double > rad100to200_
Log< level::Error, false > LogError
std::vector< std::pair< float, float > >::iterator itr
std::vector< std::string > namesTop_
std::vector< int > copyNumber_
std::unique_ptr< HGCalWaferType > waferType_
static constexpr double tol2_
Log< level::Info, true > LogVerbatim
std::vector< double > slopeT_
std::vector< int > layerTypeBot_
std::vector< double > layerThick_
Abs< T >::type abs(const T &t)
std::vector< int > layerSenseBot_
std::vector< double > zFrontB_
std::vector< double > rMaxFront_
std::vector< double > thickness_