|
|
|
| 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 * dd4hep::mm |
|
Definition at line 27 of file DDHGCalHEFileAlgo.cc.
◆ HGCalHEFileAlgo() [1/2]
HGCalHEFileAlgo::HGCalHEFileAlgo |
( |
| ) |
|
|
inline |
◆ HGCalHEFileAlgo() [2/2]
Definition at line 29 of file DDHGCalHEFileAlgo.cc.
37 static constexpr
double tol1 = 0.01 * dd4hep::mm;
46 materials_ =
args.value<std::vector<std::string>>(
"MaterialNames");
87 edm::LogVerbatim(
"HGCalGeom") <<
"First copy number for layer type " <<
i <<
":" <<
ii <<
" with "
103 namesTop_ =
args.value<std::vector<std::string>>(
"TopVolumeNames");
109 <<
" types of volumes in the top part";
119 namesBot_ =
args.value<std::vector<std::string>>(
"BottomVolumeNames");
126 <<
" types of volumes in the bottom part";
160 slopeB_ =
args.value<std::vector<double>>(
"SlopeBottom");
161 zFrontB_ =
args.value<std::vector<double>>(
"ZFrontBottom");
163 slopeT_ =
args.value<std::vector<double>>(
"SlopeTop");
164 zFrontT_ =
args.value<std::vector<double>>(
"ZFrontTop");
167 for (
unsigned int i = 0;
i <
slopeB_.size(); ++
i)
170 for (
unsigned int i = 0;
i <
slopeT_.size(); ++
i)
173 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: NameSpace " << ns.name();
187 for (
int ly = laymin; ly < laymax; ++ly) {
198 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: Layer " << ly <<
":" <<
ii <<
" Front "
208 std::vector<double> pgonZ, pgonRin, pgonRout;
223 for (
unsigned int isec = 0; isec < pgonZ.size(); ++isec) {
226 pgonRout[isec] = rmax;
228 pgonRout[isec] = pgonRout[isec] *
cosAlpha_ - tol1;
232 ns.addSolidNS(ns.prepend(
name), solid);
234 ns.addVolumeNS(glog);
239 for (
unsigned int k = 0;
k < pgonZ.size(); ++
k)
248 dd4hep::Solid solid = dd4hep::Tube(rins, routs, hthick, 0.0, 2._pi);
249 ns.addSolidNS(ns.prepend(
name), solid);
251 ns.addVolumeNS(glog);
254 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << solid.name() <<
" Tubs made of " << matter.name()
257 <<
cms::convert2mm(hthick) <<
", 0.0, 360.0 and positioned in: " << glog.name()
258 <<
" number " <<
copy;
260 positionMix(ctxt,
e, glog,
name,
copy,
thickness_[
ii], matter, rins,
rMixLayer_[
i], routs,
zz);
264 mother.placeVolume(glog,
copy,
r1);
267 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << glog.name() <<
" number " <<
copy <<
" positioned in "
278 <<
": thickness of all its components **** ERROR ****";
281 <<
" does not match with " <<
cms::convert2mm(thickTot) <<
" of the components";
289 for (std::unordered_set<int>::const_iterator itr =
copies_.begin(); itr !=
copies_.end(); ++itr, ++
k) {
293 edm::LogVerbatim(
"HGCalGeom") <<
"<<== End of DDHGCalHEFileAlgo 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(), HGCalWaferIndex::waferLayer(), HGCalProperty::waferOrient(), HGCalProperty::waferPartial(), HGCalProperty::waferThick(), 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 297 of file DDHGCalHEFileAlgo.cc.
319 double hthick = 0.5 * thick;
323 dd4hep::Solid solid = dd4hep::Tube(rmid, rout, hthick, 0.0, 2._pi);
324 ns.addSolidNS(ns.prepend(
name), solid);
326 ns.addVolumeNS(glog1);
328 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << solid.name() <<
" Tubs made of " << matter.name()
332 glog.placeVolume(glog1, 1);
335 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << glog1.name() <<
" number 1 positioned in " << glog.name()
336 <<
" at (0,0,0) with no rotation";
338 double thickTot(0), zpos(-hthick);
351 solid = dd4hep::Tube(rmid, rout, hthickl, 0.0, 2._pi);
352 ns.addSolidNS(ns.prepend(
name), solid);
354 ns.addVolumeNS(glog2);
361 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << solid.name() <<
" Tubs made of " << matter1.name()
368 glog1.placeVolume(glog2,
copy,
r1);
371 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: Position " << glog2.name() <<
" number " <<
copy <<
" in "
372 << glog1.name() <<
" at (0,0," <<
cms::convert2mm(zpos) <<
") with no rotation";
378 if (thickTot > thick) {
381 <<
": thickness of all its components in the top part **** ERROR ****";
385 <<
" of the components in top part";
390 name = nameM +
"Bottom";
392 solid = dd4hep::Tube(rin, rmid, hthick, 0.0, 2._pi);
393 ns.addSolidNS(ns.prepend(
name), solid);
395 ns.addVolumeNS(glog1);
398 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << solid.name() <<
" Tubs made of " << matter.name()
403 glog.placeVolume(glog1, 1);
405 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << glog1.name() <<
" number 1 positioned in " << glog.name()
406 <<
" at (0,0,0) with no rotation";
422 solid = dd4hep::Tube(rin, rmid, hthickl, 0.0, 2._pi);
423 ns.addSolidNS(ns.prepend(
name), solid);
425 ns.addVolumeNS(glog2);
432 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << solid.name() <<
" Tubs made of " << matter1.name()
439 glog1.placeVolume(glog2,
copy,
r1);
441 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: Position " << glog2.name() <<
" number " <<
copy <<
" in "
442 << glog1.name() <<
" at (0,0," <<
cms::convert2mm(zpos) <<
") with no rotation";
455 if (thickTot > thick) {
458 <<
": thickness of all its components in the top part **** ERROR ****";
462 <<
" 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 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);
488 <<
" for maximum u, v Offset; Shift " <<
cms::convert2mm(xyoff.first) <<
":"
492 for (
int u = -
N; u <=
N; ++u) {
493 for (
int v = -
N;
v <=
N; ++
v) {
500 double xpos = xyoff.first + nc *
r;
501 double ypos = xyoff.second +
nr *
dy;
537 <<
"DDHGCalHEFileAlgo: " <<
waferNames_[
type] <<
" number " <<
copy <<
" type " << layertype <<
":"
546 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: Maximum # of u " << ium <<
":" << iumAll <<
" # of v " << ivm
547 <<
":" << ivmAll <<
" and " <<
nin <<
":" << kount <<
":" <<
ntot <<
" wafers ("
548 << ntype[0] <<
":" << ntype[1] <<
":" << ntype[2] <<
":" << ntype[3] <<
":"
549 << ntype[4] <<
":" << ntype[5] <<
") for " << glog.name() <<
" R "
References funct::abs(), cms::convert2mm(), filterCSVwithJSON::copy, TCMET_cfi::corner, PVValHelper::dy, MillePedeFileConverter_cfg::e, HGCalWaferType::getType(), createfilelist::int, gpuVertexFinder::iv, HGCalParameters::k_CornerSize, phase1PixelTopology::layer, N, nin, EgHLTOffHistBins_cfi::nr, gpuPixelDoublets::ntot, 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_ |
◆ 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_ |
◆ 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_ |
◆ 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 * dd4hep::mm |
|
staticconstexpr |
◆ volumeNames_
std::vector<std::string> HGCalHEFileAlgo::volumeNames_ |
◆ waferIndex_
std::vector<int> HGCalHEFileAlgo::waferIndex_ |
◆ waferNames_
std::vector<std::string> HGCalHEFileAlgo::waferNames_ |
◆ waferProperty_
std::vector<int> HGCalHEFileAlgo::waferProperty_ |
◆ waferSepar_
double HGCalHEFileAlgo::waferSepar_ |
◆ waferSize_
double HGCalHEFileAlgo::waferSize_ |
◆ zFrontB_
std::vector<double> HGCalHEFileAlgo::zFrontB_ |
◆ zFrontT_
std::vector<double> HGCalHEFileAlgo::zFrontT_ |
◆ zMinBlock_
double HGCalHEFileAlgo::zMinBlock_ |
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
int32_t waferU(const int32_t index)
int32_t waferOrient(const int32_t property)
int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV, bool old=false)
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< int > layerNumbers_
std::vector< std::string > materialsBot_
int32_t waferV(const int32_t index)
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 packTypeUV(int type, int u, int v)
constexpr std::array< uint8_t, layerIndexSize > layer
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)
int32_t waferThick(const int32_t property)
constexpr NumType convert2mm(NumType length)
Log< level::Error, false > LogError
int32_t waferPartial(const int32_t property)
std::vector< std::string > volumeNames_
HGCalGeomTools geomTools_
int32_t waferLayer(const int32_t index)
std::vector< int > waferProperty_
Log< level::Info, true > LogVerbatim
std::vector< std::string > namesBot_
std::vector< int > layerTypeTop_
Abs< T >::type abs(const T &t)
std::vector< std::string > materialsTop_
std::vector< std::string > waferNames_