|
|
|
| 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 * dd4hep::mm |
|
static constexpr double | tol2_ = 0.00001 * dd4hep::mm |
|
Definition at line 27 of file DDHGCalHEAlgo.cc.
◆ HGCalHEAlgo() [1/2]
HGCalHEAlgo::HGCalHEAlgo |
( |
| ) |
|
|
inline |
◆ HGCalHEAlgo() [2/2]
Definition at line 29 of file DDHGCalHEAlgo.cc.
44 materials_ =
args.value<std::vector<std::string>>(
"MaterialNames");
85 edm::LogVerbatim(
"HGCalGeom") <<
"First copy number for layer type " <<
i <<
":" <<
ii <<
" with "
99 namesTop_ =
args.value<std::vector<std::string>>(
"TopVolumeNames");
114 namesBot_ =
args.value<std::vector<std::string>>(
"BottomVolumeNames");
121 <<
" types of volumes in the bottom part";
145 <<
" radius for wafer type separation uses " <<
rad100to200_.size()
153 slopeB_ =
args.value<std::vector<double>>(
"SlopeBottom");
154 zFrontB_ =
args.value<std::vector<double>>(
"ZFrontBottom");
156 slopeT_ =
args.value<std::vector<double>>(
"SlopeTop");
157 zFrontT_ =
args.value<std::vector<double>>(
"ZFrontTop");
160 for (
unsigned int i = 0;
i <
slopeB_.size(); ++
i)
163 for (
unsigned int i = 0;
i <
slopeT_.size(); ++
i)
190 for (
int ly = laymin; ly < laymax; ++ly) {
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) {
242 ns.addSolidNS(ns.prepend(
name), solid);
244 ns.addVolumeNS(glog);
249 for (
unsigned int k = 0;
k < pgonZ.size(); ++
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") <<
"DDHGCalHEAlgo: " << solid.name() <<
" Tubs made of " << matter.name()
267 <<
cms::convert2mm(hthick) <<
", 0.0, 360.0 and positioned in: " << glog.name()
268 <<
" number " <<
copy;
270 positionMix(ctxt,
e, glog,
name,
copy,
thickness_[
ii], matter, rins,
rMixLayer_[
i], routs,
zz);
274 mother.placeVolume(glog,
copy,
r1);
277 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << glog.name() <<
" number " <<
copy <<
" positioned in "
288 <<
": thickness of all its components **** ERROR ****";
291 <<
" does not match with " <<
cms::convert2mm(thickTot) <<
" of the components";
299 for (std::unordered_set<int>::const_iterator itr =
copies_.begin(); itr !=
copies_.end(); ++itr, ++
k) {
303 edm::LogVerbatim(
"HGCalGeom") <<
"<<== End of DDHGCalHEAlgo construction...";
References funct::abs(), cms::DDNamespace::addSolidNS(), cms::DDNamespace::addVolumeNS(), writedatasetfile::args, cms::convert2mm(), 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(), 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 307 of file DDHGCalHEAlgo.cc.
329 double hthick = 0.5 * thick;
333 dd4hep::Solid solid = dd4hep::Tube(rmid, rout, hthick, 0.0, 2._pi);
334 ns.addSolidNS(ns.prepend(
name), solid);
336 ns.addVolumeNS(glog1);
338 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << solid.name() <<
" Tubs made of " << matter.name()
342 glog.placeVolume(glog1, 1);
345 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << glog1.name() <<
" number 1 positioned in " << glog.name()
346 <<
" at (0,0,0) with no rotation";
348 double thickTot(0), zpos(-hthick);
361 solid = dd4hep::Tube(rmid, rout, hthickl, 0.0, 2._pi);
362 ns.addSolidNS(ns.prepend(
name), solid);
364 ns.addVolumeNS(glog2);
371 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << solid.name() <<
" Tubs made of " << matter1.name()
378 glog1.placeVolume(glog2,
copy,
r1);
381 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: Position " << glog2.name() <<
" number " <<
copy <<
" in "
382 << glog1.name() <<
" at (0,0," <<
cms::convert2mm(zpos) <<
") with no rotation";
388 if (thickTot > thick) {
391 <<
": thickness of all its components in the top part **** ERROR ****";
395 <<
" of the components in top part";
400 name = nameM +
"Bottom";
402 solid = dd4hep::Tube(rin, rmid, hthick, 0.0, 2._pi);
403 ns.addSolidNS(ns.prepend(
name), solid);
405 ns.addVolumeNS(glog1);
408 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << solid.name() <<
" Tubs made of " << matter.name()
413 glog.placeVolume(glog1, 1);
415 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << glog1.name() <<
" number 1 positioned in " << glog.name()
416 <<
" at (0,0,0) with no rotation";
432 solid = dd4hep::Tube(rin, rmid, hthickl, 0.0, 2._pi);
433 ns.addSolidNS(ns.prepend(
name), solid);
435 ns.addVolumeNS(glog2);
442 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: " << solid.name() <<
" Tubs made of " << matter1.name()
449 glog1.placeVolume(glog2,
copy,
r1);
451 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: Position " << glog2.name() <<
" number " <<
copy <<
" in "
452 << glog1.name() <<
" at (0,0," <<
cms::convert2mm(zpos) <<
") with no rotation";
465 if (thickTot > thick) {
468 <<
": thickness of all its components in the top part **** ERROR ****";
472 <<
" of the components in top part";
References funct::abs(), cms::DDNamespace::addSolidNS(), cms::DDNamespace::addVolumeNS(), cms::convert2mm(), 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 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 477 of file DDHGCalHEAlgo.cc.
486 static const double sqrt3 =
std::sqrt(3.0);
488 double R = 2.0 *
r / sqrt3;
489 double dy = 0.75 *
R;
490 int N = (
int)(0.5 * rout /
r) + 2;
493 int ium(0), ivm(0), iumAll(0), ivmAll(0), kount(0),
ntot(0),
nin(0);
494 std::vector<int> ntype(6, 0);
496 <<
" for maximum u, v Offset; Shift " <<
cms::convert2mm(xyoff.first) <<
":"
500 for (
int u = -
N; u <=
N; ++u) {
501 for (
int v = -
N;
v <=
N; ++
v) {
504 double xpos = xyoff.first + nc *
r;
505 double ypos = xyoff.second +
nr *
dy;
513 int type =
waferType_->getType((xpos / dd4hep::mm), (ypos / dd4hep::mm), (zpos / dd4hep::mm));
541 <<
"DDHGCalHEAlgo: " << glog.name() <<
" number " <<
copy <<
" positioned in " << glog.name() <<
" at ("
549 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEAlgo: Maximum # of u " << ium <<
":" << iumAll <<
" # of v " << ivm
550 <<
":" << ivmAll <<
" and " <<
nin <<
":" << kount <<
":" <<
ntot <<
" wafers ("
551 << ntype[0] <<
":" << ntype[1] <<
":" << ntype[2] <<
":" << ntype[3] <<
":"
552 << ntype[4] <<
":" << ntype[5] <<
") for " << glog.name() <<
" R "
References funct::abs(), cms::convert2mm(), filterCSVwithJSON::copy, TCMET_cfi::corner, PVValHelper::dy, MillePedeFileConverter_cfg::e, createfilelist::int, gpuVertexFinder::iv, HGCalParameters::k_CornerSize, N, nin, EgHLTOffHistBins_cfi::nr, gpuPixelDoublets::ntot, 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 * dd4hep::mm |
|
staticconstexpr |
◆ tol2_
constexpr double HGCalHEAlgo::tol2_ = 0.00001 * dd4hep::mm |
|
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_
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_
constexpr NumType convert2mm(NumType length)
std::vector< double > rad100to200_
Log< level::Error, false > LogError
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_