|
|
|
| HGCalHEFileAlgo () |
|
| HGCalHEFileAlgo (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 layer) |
|
|
static constexpr double | tol2_ = 0.00001 |
|
Definition at line 25 of file DDHGCalHEFileAlgo.cc.
◆ HGCalHEFileAlgo() [1/2]
HGCalHEFileAlgo::HGCalHEFileAlgo |
( |
| ) |
|
|
inline |
◆ HGCalHEFileAlgo() [2/2]
Definition at line 27 of file DDHGCalHEFileAlgo.cc.
35 static constexpr
double tol1 = 0.01;
44 materials_ =
args.value<std::vector<std::string>>(
"MaterialNames");
83 edm::LogVerbatim(
"HGCalGeom") <<
"First copy number for layer type " <<
i <<
":" <<
ii <<
" with "
99 namesTop_ =
args.value<std::vector<std::string>>(
"TopVolumeNames");
105 <<
" types of volumes in the top part";
115 namesBot_ =
args.value<std::vector<std::string>>(
"BottomVolumeNames");
122 <<
" types of volumes in the bottom part";
146 <<
" radius for wafer type separation uses " <<
rad100to200_.size()
164 slopeB_ =
args.value<std::vector<double>>(
"SlopeBottom");
165 zFrontB_ =
args.value<std::vector<double>>(
"ZFrontBottom");
167 slopeT_ =
args.value<std::vector<double>>(
"SlopeTop");
168 zFrontT_ =
args.value<std::vector<double>>(
"ZFrontTop");
171 for (
unsigned int i = 0;
i <
slopeB_.size(); ++
i)
174 for (
unsigned int i = 0;
i <
slopeT_.size(); ++
i)
177 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: NameSpace " << ns.name();
191 for (
int ly = laymin; ly < laymax; ++ly) {
202 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: Layer " << ly <<
":" <<
ii <<
" Front " << zi <<
", "
203 << routF <<
" Back " << zo <<
", " << rinB <<
" superlayer thickness "
211 std::vector<double> pgonZ, pgonRin, pgonRout;
216 pgonZ.emplace_back(-hthick);
217 pgonZ.emplace_back(hthick);
218 pgonRin.emplace_back(rinB);
219 pgonRin.emplace_back(rinB);
220 pgonRout.emplace_back(rmax);
221 pgonRout.emplace_back(rmax);
235 for (
unsigned int isec = 0; isec < pgonZ.size(); ++isec) {
237 pgonRout[isec] = pgonRout[isec] *
cosAlpha_ - tol1;
242 ns.addSolidNS(ns.prepend(
name), solid);
244 ns.addVolumeNS(glog);
249 for (
unsigned int k = 0;
k < pgonZ.size(); ++
k)
251 <<
"[" <<
k <<
"] z " << pgonZ[
k] <<
" R " << pgonRin[
k] <<
":" << pgonRout[
k];
258 dd4hep::Solid solid = dd4hep::Tube(rins, routs, hthick, 0.0, 2._pi);
259 ns.addSolidNS(ns.prepend(
name), solid);
261 ns.addVolumeNS(glog);
264 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << solid.name() <<
" Tubs made of " << matter.name()
265 <<
" of dimensions " << rinB <<
":" << rins <<
", " << routF <<
":" << routs
266 <<
", " << hthick <<
", 0.0, 360.0 and positioned in: " << glog.name()
267 <<
" number " <<
copy;
269 positionMix(ctxt,
e, glog,
name,
copy,
thickness_[
ii], matter, rins,
rMixLayer_[
i], routs,
zz);
273 mother.placeVolume(glog,
copy,
r1);
276 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << glog.name() <<
" number " <<
copy <<
" positioned in "
277 << mother.name() <<
" at " <<
r1 <<
" with no rotation";
286 << thickTot <<
": thickness of all its components **** ERROR ****";
289 << thickTot <<
" of the components";
301 edm::LogVerbatim(
"HGCalGeom") <<
"<<== End of DDHGCalHEFileAlgo 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(), HGCalGeometryMode::Polyhedra, PixelTestBeamValidation_cfi::Position, cms::DDNamespace::prepend(), diffTwoXMLs::r1, HGCalGeomTools::radius(), AlCaHLTBitMon_QueryRunRegistry::string, cms::DDNamespace::volume(), HGCalWaferIndex::waferLayer(), HGCalWaferIndex::waferU(), HGCalWaferIndex::waferV(), and geometryCSVtoXML::zz.
◆ positionMix()
void HGCalHEFileAlgo::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 305 of file DDHGCalHEFileAlgo.cc.
327 double hthick = 0.5 * thick;
331 dd4hep::Solid solid = dd4hep::Tube(rmid, rout, hthick, 0.0, 2._pi);
332 ns.addSolidNS(ns.prepend(
name), solid);
334 ns.addVolumeNS(glog1);
336 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << solid.name() <<
" Tubs made of " << matter.name()
337 <<
" of dimensions " << rmid <<
", " << rout <<
", " << hthick <<
", 0.0, 360.0";
339 glog.placeVolume(glog1, 1);
342 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << glog1.name() <<
" number 1 positioned in " << glog.name()
343 <<
" at (0, 0, 0) with no rotation";
345 double thickTot(0), zpos(-hthick);
353 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: Layer " << ly <<
":" <<
ii <<
" R " << rmid <<
":" << rout
358 solid = dd4hep::Tube(rmid, rout, hthickl, 0.0, 2._pi);
359 ns.addSolidNS(ns.prepend(
name), solid);
361 ns.addVolumeNS(glog2);
368 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << solid.name() <<
" Tubs made of " << matter1.name()
369 <<
" of dimensions " << rmid <<
", " << rout <<
", " << hthickl <<
", 0.0, 360.0";
374 glog1.placeVolume(glog2,
copy,
r1);
377 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: Position " << glog2.name() <<
" number " <<
copy <<
" in "
378 << glog1.name() <<
" at " <<
r1 <<
" with no rotation";
384 if (thickTot > thick) {
385 edm::LogError(
"HGCalGeom") <<
"Thickness of the partition " << thick <<
" is smaller than " << thickTot
386 <<
": thickness of all its components in the top part **** ERROR ****";
388 edm::LogWarning(
"HGCalGeom") <<
"Thickness of the partition " << thick <<
" does not match with " << thickTot
389 <<
" of the components in top part";
394 name = nameM +
"Bottom";
396 solid = dd4hep::Tube(rin, rmid, hthick, 0.0, 2._pi);
397 ns.addSolidNS(ns.prepend(
name), solid);
399 ns.addVolumeNS(glog1);
402 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << solid.name() <<
" Tubs made of " << matter.name()
403 <<
" of dimensions " << rin <<
", " << rmid <<
", " << hthick <<
", 0.0, 360.0";
406 glog.placeVolume(glog1, 1);
408 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << glog1.name() <<
" number 1 positioned in " << glog.name()
409 <<
" at (0, 0, 0) with no rotation";
420 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: Layer " << ly <<
":" <<
ii <<
" R " << rin <<
":" << rmid
425 solid = dd4hep::Tube(rin, rmid, hthickl, 0.0, 2._pi);
426 ns.addSolidNS(ns.prepend(
name), solid);
428 ns.addVolumeNS(glog2);
435 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << solid.name() <<
" Tubs made of " << matter1.name()
436 <<
" of dimensions " << rin <<
", " << rmid <<
", " << hthickl <<
", 0.0, 360.0";
441 glog1.placeVolume(glog2,
copy,
r1);
443 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: Position " << glog2.name() <<
" number " <<
copy <<
" in "
444 << glog1.name() <<
" at " <<
r1 <<
" with no rotation";
457 if (thickTot > thick) {
458 edm::LogError(
"HGCalGeom") <<
"Thickness of the partition " << thick <<
" is smaller than " << thickTot
459 <<
": thickness of all its components in the top part **** ERROR ****";
461 edm::LogWarning(
"HGCalGeom") <<
"Thickness of the partition " << thick <<
" does not match with " << thickTot
462 <<
" 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, PixelTestBeamValidation_cfi::Position, cms::DDNamespace::prepend(), diffTwoXMLs::r1, AlCaHLTBitMon_QueryRunRegistry::string, funct::tan(), and geometryCSVtoXML::zz.
◆ positionSensitive()
void HGCalHEFileAlgo::positionSensitive |
( |
cms::DDParsingContext & |
ctxt, |
|
|
xml_h |
e, |
|
|
const dd4hep::Volume & |
glog, |
|
|
double |
rin, |
|
|
double |
rout, |
|
|
double |
zpos, |
|
|
int |
layertype, |
|
|
int |
layer |
|
) |
| |
|
inline |
Definition at line 467 of file DDHGCalHEFileAlgo.cc.
477 static const double sqrt3 =
std::sqrt(3.0);
479 double R = 2.0 *
r / sqrt3;
480 double dy = 0.75 *
R;
481 int N = (
int)(0.5 * rout /
r) + 2;
484 int ium(0), ivm(0), iumAll(0), ivmAll(0), kount(0), ntot(0),
nin(0);
485 std::vector<int> ntype(6, 0);
486 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << glog.name() <<
" rout " << rout <<
" N " <<
N
487 <<
" for maximum u, v Offset; Shift " << xyoff.first <<
":" << xyoff.second
490 for (
int u = -
N; u <=
N; ++u) {
491 for (
int v = -
N;
v <=
N; ++
v) {
498 double xpos = xyoff.first + nc *
r;
499 double ypos = xyoff.second +
nr *
dy;
510 <<
type <<
" layer:u:v:indx " << (layer +
firstLayer_) <<
":" << u <<
":" <<
v
537 <<
" positioned in " << glog.name() <<
" at " << tran <<
" with no rotation";
544 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: Maximum # of u " << ium <<
":" << iumAll <<
" # of v " << ivm
545 <<
":" << ivmAll <<
" and " <<
nin <<
":" << kount <<
":" << ntot <<
" wafers ("
546 << ntype[0] <<
":" << ntype[1] <<
":" << ntype[2] <<
":" << ntype[3] <<
":"
547 << ntype[4] <<
":" << ntype[5] <<
") for " << glog.name() <<
" R " << rin <<
":"
References funct::abs(), filterCSVwithJSON::copy, distTCMET_cfi::corner, PVValHelper::dy, MillePedeFileConverter_cfg::e, HGCalWaferType::getType(), 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(), HGCalGeomTools::waferCorner(), and HGCalWaferIndex::waferIndex().
◆ absorbMode_
int HGCalHEFileAlgo::absorbMode_ |
◆ alpha_
double HGCalHEFileAlgo::alpha_ |
◆ choiceType_
int HGCalHEFileAlgo::choiceType_ |
◆ copies_
std::unordered_set<int> HGCalHEFileAlgo::copies_ |
◆ copyNumber_
std::vector<int> HGCalHEFileAlgo::copyNumber_ |
◆ copyNumberBot_
std::vector<int> HGCalHEFileAlgo::copyNumberBot_ |
◆ copyNumberTop_
std::vector<int> HGCalHEFileAlgo::copyNumberTop_ |
◆ cosAlpha_
double HGCalHEFileAlgo::cosAlpha_ |
◆ firstLayer_
int HGCalHEFileAlgo::firstLayer_ |
◆ fracAreaMin_
double HGCalHEFileAlgo::fracAreaMin_ |
◆ geomTools_
◆ layerCenter_
std::vector<int> HGCalHEFileAlgo::layerCenter_ |
◆ layerNumbers_
std::vector<int> HGCalHEFileAlgo::layerNumbers_ |
◆ layerSense_
std::vector<int> HGCalHEFileAlgo::layerSense_ |
◆ layerSenseBot_
std::vector<int> HGCalHEFileAlgo::layerSenseBot_ |
◆ layerThick_
std::vector<double> HGCalHEFileAlgo::layerThick_ |
◆ layerThickBot_
std::vector<double> HGCalHEFileAlgo::layerThickBot_ |
◆ layerThickTop_
std::vector<double> HGCalHEFileAlgo::layerThickTop_ |
◆ layerType_
std::vector<int> HGCalHEFileAlgo::layerType_ |
◆ layerTypeBot_
std::vector<int> HGCalHEFileAlgo::layerTypeBot_ |
◆ layerTypeTop_
std::vector<int> HGCalHEFileAlgo::layerTypeTop_ |
◆ materials_
std::vector<std::string> HGCalHEFileAlgo::materials_ |
◆ materialsBot_
std::vector<std::string> HGCalHEFileAlgo::materialsBot_ |
◆ materialsTop_
std::vector<std::string> HGCalHEFileAlgo::materialsTop_ |
◆ namesBot_
std::vector<std::string> HGCalHEFileAlgo::namesBot_ |
◆ namesTop_
std::vector<std::string> HGCalHEFileAlgo::namesTop_ |
◆ nCutRadPar_
int HGCalHEFileAlgo::nCutRadPar_ |
◆ rad100to200_
std::vector<double> HGCalHEFileAlgo::rad100to200_ |
◆ rad200to300_
std::vector<double> HGCalHEFileAlgo::rad200to300_ |
◆ rMaxFront_
std::vector<double> HGCalHEFileAlgo::rMaxFront_ |
◆ rMinFront_
std::vector<double> HGCalHEFileAlgo::rMinFront_ |
◆ rMixLayer_
std::vector<double> HGCalHEFileAlgo::rMixLayer_ |
◆ sectors_
int HGCalHEFileAlgo::sectors_ |
◆ sensitiveMode_
int HGCalHEFileAlgo::sensitiveMode_ |
◆ slopeB_
std::vector<double> HGCalHEFileAlgo::slopeB_ |
◆ slopeT_
std::vector<double> HGCalHEFileAlgo::slopeT_ |
◆ thickness_
std::vector<double> HGCalHEFileAlgo::thickness_ |
◆ tol2_
constexpr double HGCalHEFileAlgo::tol2_ = 0.00001 |
|
staticconstexpr |
◆ volumeNames_
std::vector<std::string> HGCalHEFileAlgo::volumeNames_ |
◆ waferIndex_
std::vector<int> HGCalHEFileAlgo::waferIndex_ |
◆ waferNames_
std::vector<std::string> HGCalHEFileAlgo::waferNames_ |
◆ waferSepar_
double HGCalHEFileAlgo::waferSepar_ |
◆ waferSize_
double HGCalHEFileAlgo::waferSize_ |
◆ waferTypes_
std::vector<int> HGCalHEFileAlgo::waferTypes_ |
◆ zFrontB_
std::vector<double> HGCalHEFileAlgo::zFrontB_ |
◆ zFrontT_
std::vector<double> HGCalHEFileAlgo::zFrontT_ |
◆ zMinBlock_
double HGCalHEFileAlgo::zMinBlock_ |
◆ zMinRadPar_
double HGCalHEFileAlgo::zMinRadPar_ |
std::vector< int > waferTypes_
static int32_t waferV(const int32_t index)
std::vector< std::string > materials_
std::vector< double > zFrontT_
std::vector< double > thickness_
std::vector< double > rMaxFront_
std::vector< double > layerThickTop_
constexpr NumType convertRadToDeg(NumType radians)
std::vector< int > layerSense_
std::vector< int > copyNumberTop_
std::vector< std::string > namesTop_
std::vector< double > layerThick_
static constexpr uint32_t k_CornerSize
std::vector< int > copyNumberBot_
Log< level::Warning, false > LogWarning
std::vector< double > zFrontB_
void positionSensitive(cms::DDParsingContext &ctxt, xml_h e, const dd4hep::Volume &glog, double rin, double rout, double zpos, int layertype, int layer)
std::unordered_set< int > copies_
Cos< T >::type cos(const T &t)
std::vector< double > rad100to200_
std::vector< int > layerNumbers_
std::vector< std::string > materialsBot_
std::vector< double > rad200to300_
static constexpr double tol2_
std::vector< int > layerSenseBot_
int getType(double xpos, double ypos, double zpos)
std::vector< double > layerThickBot_
std::vector< int > copyNumber_
std::vector< double > slopeT_
static int32_t waferU(const int32_t index)
static int32_t packTypeUV(int type, int u, int v)
std::vector< int > layerType_
std::vector< double > rMixLayer_
std::vector< int > waferIndex_
std::vector< int > layerTypeBot_
std::vector< double > slopeB_
std::vector< double > rMinFront_
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)
Tan< T >::type tan(const T &t)
Log< level::Error, false > LogError
std::vector< std::pair< float, float > >::iterator itr
std::vector< std::string > volumeNames_
HGCalGeomTools geomTools_
Log< level::Info, true > LogVerbatim
std::vector< std::string > namesBot_
static int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV, bool old=false)
std::vector< int > layerTypeTop_
Abs< T >::type abs(const T &t)
std::vector< std::string > materialsTop_
std::vector< std::string > waferNames_
static int32_t waferLayer(const int32_t index)