|
|
|
void | constructLayers (const DDLogicalPart &, DDCompactView &cpv) |
|
void | positionMix (const DDLogicalPart &glog, const std::string &name, int copy, double thick, const DDMaterial &matter, double rin, double rmid, double routF, double zz, DDCompactView &cpv) |
|
void | positionSensitive (const DDLogicalPart &glog, double rin, double rout, double zpos, int layertype, int layer, DDCompactView &cpv) |
|
|
static constexpr double | tol1_ = 0.01 |
|
static constexpr double | tol2_ = 0.00001 |
|
Definition at line 33 of file DDHGCalHEFileAlgo.cc.
◆ DDHGCalHEFileAlgo()
DDHGCalHEFileAlgo::DDHGCalHEFileAlgo |
( |
| ) |
|
◆ constructLayers()
Definition at line 289 of file DDHGCalHEFileAlgo.cc.
295 for (
unsigned int i = 0;
i <
layers_.size();
i++) {
301 for (
int ly = laymin; ly < laymax; ++ly) {
311 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: Layer " << ly <<
":" <<
ii <<
" Front " << zi <<
", "
312 << routF <<
" Back " << zo <<
", " << rinB <<
" superlayer thickness "
319 std::vector<double> pgonZ, pgonRin, pgonRout;
323 pgonZ.emplace_back(-hthick);
324 pgonZ.emplace_back(hthick);
325 pgonRin.emplace_back(rinB);
326 pgonRin.emplace_back(rinB);
327 pgonRout.emplace_back(rmax);
328 pgonRout.emplace_back(rmax);
342 for (
unsigned int isec = 0; isec < pgonZ.size(); ++isec) {
354 for (
unsigned int k = 0;
k < pgonZ.size(); ++
k)
355 edm::LogVerbatim(
"HGCalGeom") <<
"[" <<
k <<
"] z " << pgonZ[
k] <<
" R " << pgonRin[
k] <<
":" << pgonRout[
k];
364 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << solid.
name() <<
" Tubs made of " << matName
365 <<
" of dimensions " << rinB <<
":" << rins <<
", " << routF <<
":" << routs
366 <<
", " << hthick <<
", 0.0, 360.0 and positioned in: " << glog.
name()
367 <<
" number " <<
copy;
377 << module.
name() <<
" at " <<
r1 <<
" with " <<
rot;
387 <<
": thickness of all its components **** ERROR ****";
390 << thickTot <<
" of the components";
References funct::abs(), angle_units::operators::convertRadToDeg(), filterCSVwithJSON::copy, DDBase< N, C >::ddname(), DDSplit(), dqmdumpme::first, mps_fire::i, cuy::ii, dqmdumpme::k, min(), Skims_PA_cff::name, DDBase< N, C >::name(), DDSolidFactory::polyhedra(), DDCompactView::position(), diffTwoXMLs::r1, HGCalGeomTools::radius(), makeMuonMisalignmentScenario::rot, edm::second(), AlCaHLTBitMon_QueryRunRegistry::string, DDSolidFactory::tubs(), and geometryCSVtoXML::zz.
◆ execute()
◆ initialize()
Definition at line 120 of file DDHGCalHEFileAlgo.cc.
125 wafers_ = vsArgs[
"WaferNames"];
128 for (
unsigned int i = 0;
i <
wafers_.size(); ++
i)
132 names_ = vsArgs[
"VolumeNames"];
133 thick_ = vArgs[
"Thickness"];
137 for (
unsigned int i = 0;
i <
names_.size(); ++
i)
146 for (
unsigned int i = 0;
i <
layers_.size(); ++
i)
148 <<
" with " <<
layers_[
i] <<
" layers";
170 edm::LogVerbatim(
"HGCalGeom") <<
"First copy number for layer type " <<
i <<
":" <<
ii <<
" with "
207 <<
" types of volumes in the bottom part";
230 <<
" radius for wafer type separation uses " <<
rad100to200_.size()
248 slopeB_ = vArgs[
"SlopeBottom"];
255 for (
unsigned int i = 0;
i <
slopeB_.size(); ++
i)
258 for (
unsigned int i = 0;
i <
slopeT_.size(); ++
i)
References angle_units::operators::convertRadToDeg(), funct::cos(), dbl_to_int(), mps_fire::i, cuy::ii, createfilelist::int, dqmdumpme::k, DDCurrentNamespace::ns(), HGCalWaferIndex::waferLayer(), HGCalWaferIndex::waferU(), and HGCalWaferIndex::waferV().
◆ positionMix()
void DDHGCalHEFileAlgo::positionMix |
( |
const DDLogicalPart & |
glog, |
|
|
const std::string & |
name, |
|
|
int |
copy, |
|
|
double |
thick, |
|
|
const DDMaterial & |
matter, |
|
|
double |
rin, |
|
|
double |
rmid, |
|
|
double |
routF, |
|
|
double |
zz, |
|
|
DDCompactView & |
cpv |
|
) |
| |
|
protected |
Definition at line 396 of file DDHGCalHEFileAlgo.cc.
417 double hthick = 0.5 * thick;
424 <<
" of dimensions " << rmid <<
", " << rout <<
", " << hthick <<
", 0.0, 360.0";
429 <<
" at " << tran <<
" with " <<
rot;
431 double thickTot(0), zpos(-hthick);
439 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: Layer " << ly <<
":" <<
ii <<
" R " << rmid <<
":" << rout
451 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << solid.
name() <<
" Tubs made of " << matName
452 <<
" of dimensions " << rmid <<
", " << rout <<
", " << hthickl <<
", 0.0, 360.0";
459 << glog1.
name() <<
" at " <<
r1 <<
" with " <<
rot;
465 if (thickTot > thick) {
466 edm::LogError(
"HGCalGeom") <<
"Thickness of the partition " << thick <<
" is smaller than " << thickTot
467 <<
": thickness of all its components in the top part **** ERROR ****";
469 edm::LogWarning(
"HGCalGeom") <<
"Thickness of the partition " << thick <<
" does not match with " << thickTot
470 <<
" of the components in top part";
475 name = nameM +
"Bottom";
480 <<
" of dimensions " << rin <<
", " << rmid <<
", " << hthick <<
", 0.0, 360.0";
485 <<
" at " << tran <<
" with " <<
rot;
496 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: Layer " << ly <<
":" <<
ii <<
" R " << rin <<
":" << rmid
508 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << solid.
name() <<
" Tubs made of " << matName
509 <<
" of dimensions " << rin <<
", " << rmid <<
", " << hthickl <<
", 0.0, 360.0";
516 << glog1.
name() <<
" at " <<
r1 <<
" with " <<
rot;
529 if (thickTot > thick) {
530 edm::LogError(
"HGCalGeom") <<
"Thickness of the partition " << thick <<
" is smaller than " << thickTot
531 <<
": thickness of all its components in the top part **** ERROR ****";
533 edm::LogWarning(
"HGCalGeom") <<
"Thickness of the partition " << thick <<
" does not match with " << thickTot
534 <<
" of the components in top part";
References funct::abs(), filterCSVwithJSON::copy, DDBase< N, C >::ddname(), DDSplit(), HLT_FULL_cff::eta1, HLT_FULL_cff::eta2, dqmdumpme::first, cuy::ii, dqm-mbProfile::log, Skims_PA_cff::name, DDBase< N, C >::name(), DDCompactView::position(), diffTwoXMLs::r1, makeMuonMisalignmentScenario::rot, edm::second(), AlCaHLTBitMon_QueryRunRegistry::string, funct::tan(), DDSolidFactory::tubs(), and geometryCSVtoXML::zz.
◆ positionSensitive()
void DDHGCalHEFileAlgo::positionSensitive |
( |
const DDLogicalPart & |
glog, |
|
|
double |
rin, |
|
|
double |
rout, |
|
|
double |
zpos, |
|
|
int |
layertype, |
|
|
int |
layer, |
|
|
DDCompactView & |
cpv |
|
) |
| |
|
protected |
Definition at line 539 of file DDHGCalHEFileAlgo.cc.
541 static const double sqrt3 =
std::sqrt(3.0);
544 double R = 2.0 *
r / sqrt3;
545 double dy = 0.75 *
R;
546 int N = (
int)(0.5 * rout /
r) + 2;
549 int ium(0), ivm(0), iumAll(0), ivmAll(0), kount(0), ntot(0),
nin(0);
550 std::vector<int> ntype(6, 0);
551 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: " << glog.
ddname() <<
" rin:rout " << rin <<
":" << rout
552 <<
" zpos " << zpos <<
" N " <<
N <<
" for maximum u, v Offset; Shift " << xyoff.first
555 for (
int u = -
N; u <=
N; ++u) {
556 for (
int v = -
N;
v <=
N; ++
v) {
563 double xpos = xyoff.first + nc *
r;
564 double ypos = xyoff.second +
nr *
dy;
575 <<
type <<
" layer:u:v:indx " << (layer +
firstLayer_) <<
":" << u <<
":" <<
v
602 <<
":" <<
type <<
" positioned in " << glog.
ddname() <<
" at " << tran
610 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalHEFileAlgo: Maximum # of u " << ium <<
":" << iumAll <<
" # of v " << ivm
611 <<
":" << ivmAll <<
" and " <<
nin <<
":" << kount <<
":" << ntot <<
" wafers ("
612 << ntype[0] <<
":" << ntype[1] <<
":" << ntype[2] <<
":" << ntype[3] <<
":" << ntype[4]
613 <<
":" << ntype[5] <<
") for " << glog.
ddname() <<
" R " << rin <<
":" << rout;
References funct::abs(), filterCSVwithJSON::copy, distTCMET_cfi::corner, DDBase< N, C >::ddname(), DDSplit(), PVValHelper::dy, dqmdumpme::first, HGCalWaferType::getType(), createfilelist::int, HGCalParameters::k_CornerSize, N, Skims_PA_cff::name, nin, EgHLTOffHistBins_cfi::nr, HGCalTypes::packTypeUV(), DDCompactView::position(), dttmaxenums::R, alignCSCRings::r, idealTransformation::rotation, edm::second(), mathSSE::sqrt(), findQualityFiles::v, HGCalGeomTools::waferCorner(), and HGCalWaferIndex::waferIndex().
◆ absorbMode_
int DDHGCalHEFileAlgo::absorbMode_ |
|
private |
◆ alpha_
double DDHGCalHEFileAlgo::alpha_ |
|
private |
◆ choiceType_
int DDHGCalHEFileAlgo::choiceType_ |
|
private |
◆ copies_
std::unordered_set<int> DDHGCalHEFileAlgo::copies_ |
|
private |
◆ copyNumber_
std::vector<int> DDHGCalHEFileAlgo::copyNumber_ |
|
private |
◆ copyNumberBot_
std::vector<int> DDHGCalHEFileAlgo::copyNumberBot_ |
|
private |
◆ copyNumberTop_
std::vector<int> DDHGCalHEFileAlgo::copyNumberTop_ |
|
private |
◆ cosAlpha_
double DDHGCalHEFileAlgo::cosAlpha_ |
|
private |
◆ firstLayer_
int DDHGCalHEFileAlgo::firstLayer_ |
|
private |
◆ fracAreaMin_
double DDHGCalHEFileAlgo::fracAreaMin_ |
|
private |
◆ geomTools_
◆ layerCenter_
std::vector<int> DDHGCalHEFileAlgo::layerCenter_ |
|
private |
◆ layers_
std::vector<int> DDHGCalHEFileAlgo::layers_ |
|
private |
◆ layerSense_
std::vector<int> DDHGCalHEFileAlgo::layerSense_ |
|
private |
◆ layerSenseBot_
std::vector<int> DDHGCalHEFileAlgo::layerSenseBot_ |
|
private |
◆ layerThick_
std::vector<double> DDHGCalHEFileAlgo::layerThick_ |
|
private |
◆ layerThickBot_
std::vector<double> DDHGCalHEFileAlgo::layerThickBot_ |
|
private |
◆ layerThickTop_
std::vector<double> DDHGCalHEFileAlgo::layerThickTop_ |
|
private |
◆ layerType_
std::vector<int> DDHGCalHEFileAlgo::layerType_ |
|
private |
◆ layerTypeBot_
std::vector<int> DDHGCalHEFileAlgo::layerTypeBot_ |
|
private |
◆ layerTypeTop_
std::vector<int> DDHGCalHEFileAlgo::layerTypeTop_ |
|
private |
◆ materials_
std::vector<std::string> DDHGCalHEFileAlgo::materials_ |
|
private |
◆ materialsBot_
std::vector<std::string> DDHGCalHEFileAlgo::materialsBot_ |
|
private |
◆ materialsTop_
std::vector<std::string> DDHGCalHEFileAlgo::materialsTop_ |
|
private |
◆ names_
std::vector<std::string> DDHGCalHEFileAlgo::names_ |
|
private |
◆ namesBot_
std::vector<std::string> DDHGCalHEFileAlgo::namesBot_ |
|
private |
◆ nameSpace_
std::string DDHGCalHEFileAlgo::nameSpace_ |
|
private |
◆ namesTop_
std::vector<std::string> DDHGCalHEFileAlgo::namesTop_ |
|
private |
◆ nCutRadPar_
int DDHGCalHEFileAlgo::nCutRadPar_ |
|
private |
◆ rad100to200_
std::vector<double> DDHGCalHEFileAlgo::rad100to200_ |
|
private |
◆ rad200to300_
std::vector<double> DDHGCalHEFileAlgo::rad200to300_ |
|
private |
◆ rMaxFront_
std::vector<double> DDHGCalHEFileAlgo::rMaxFront_ |
|
private |
◆ rMinFront_
std::vector<double> DDHGCalHEFileAlgo::rMinFront_ |
|
private |
◆ rMixLayer_
std::vector<double> DDHGCalHEFileAlgo::rMixLayer_ |
|
private |
◆ sectors_
int DDHGCalHEFileAlgo::sectors_ |
|
private |
◆ sensitiveMode_
int DDHGCalHEFileAlgo::sensitiveMode_ |
|
private |
◆ slopeB_
std::vector<double> DDHGCalHEFileAlgo::slopeB_ |
|
private |
◆ slopeT_
std::vector<double> DDHGCalHEFileAlgo::slopeT_ |
|
private |
◆ thick_
std::vector<double> DDHGCalHEFileAlgo::thick_ |
|
private |
◆ tol1_
constexpr double DDHGCalHEFileAlgo::tol1_ = 0.01 |
|
staticconstexprprivate |
◆ tol2_
constexpr double DDHGCalHEFileAlgo::tol2_ = 0.00001 |
|
staticconstexprprivate |
◆ waferIndex_
std::vector<int> DDHGCalHEFileAlgo::waferIndex_ |
|
private |
◆ wafers_
std::vector<std::string> DDHGCalHEFileAlgo::wafers_ |
|
private |
◆ waferSepar_
double DDHGCalHEFileAlgo::waferSepar_ |
|
private |
◆ waferSize_
double DDHGCalHEFileAlgo::waferSize_ |
|
private |
◆ waferTypes_
std::vector<int> DDHGCalHEFileAlgo::waferTypes_ |
|
private |
◆ zFrontB_
std::vector<double> DDHGCalHEFileAlgo::zFrontB_ |
|
private |
◆ zFrontT_
std::vector<double> DDHGCalHEFileAlgo::zFrontT_ |
|
private |
◆ zMinBlock_
double DDHGCalHEFileAlgo::zMinBlock_ |
|
private |
◆ zMinRadPar_
double DDHGCalHEFileAlgo::zMinRadPar_ |
|
private |
static int32_t waferV(const int32_t index)
void positionMix(const DDLogicalPart &glog, const std::string &name, int copy, double thick, const DDMaterial &matter, double rin, double rmid, double routF, double zz, DDCompactView &cpv)
std::vector< std::string > namesBot_
std::vector< int > layerTypeTop_
std::vector< int > copyNumber_
std::vector< int > waferTypes_
std::vector< double > rMaxFront_
DDName is used to identify DDD entities uniquely.
constexpr NumType convertRadToDeg(NumType radians)
std::vector< int > layers_
static constexpr uint32_t k_CornerSize
U second(std::pair< T, U > const &p)
HGCalGeomTools geomTools_
std::vector< double > slopeT_
std::vector< double > rad100to200_
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
std::vector< double > zFrontB_
std::vector< std::string > wafers_
Log< level::Warning, false > LogWarning
std::vector< double > rad200to300_
DDMaterial is used to define and access material information.
Cos< T >::type cos(const T &t)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
static DDSolid polyhedra(const DDName &name, int sides, double startPhi, double deltaPhi, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Creates a polyhedra (refere to Geant3 or Geant4 documentation)
std::vector< std::string > materialsTop_
std::vector< int > layerType_
static DDSolid tubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
int getType(double xpos, double ypos, double zpos)
static int32_t waferU(const int32_t index)
std::vector< double > rMinFront_
static int32_t packTypeUV(int type, int u, int v)
std::vector< int > copyNumberTop_
std::vector< std::string > namesTop_
std::vector< double > thick_
std::vector< int > layerTypeBot_
A DDLogicalPart aggregates information concerning material, solid and sensitveness ....
Tan< T >::type tan(const T &t)
void constructLayers(const DDLogicalPart &, DDCompactView &cpv)
std::vector< double > layerThickTop_
Log< level::Error, false > LogError
std::unordered_set< int > copies_
std::vector< std::pair< float, float > >::iterator itr
std::vector< int > waferIndex_
std::vector< std::string > names_
std::vector< double > layerThickBot_
Log< level::Info, true > LogVerbatim
std::vector< double > zFrontT_
std::vector< std::string > materialsBot_
static std::string & ns()
std::vector< std::string > materials_
static constexpr double tol2_
static constexpr double tol1_
static int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV, bool old=false)
A DDSolid represents the shape of a part.
std::vector< int > layerSenseBot_
Represents a uniquely identifyable rotation matrix.
std::vector< double > rMixLayer_
std::vector< double > layerThick_
void positionSensitive(const DDLogicalPart &glog, double rin, double rout, double zpos, int layertype, int layer, DDCompactView &cpv)
std::vector< int > layerSense_
Abs< T >::type abs(const T &t)
std::vector< int > copyNumberBot_
std::vector< int > layerCenter_
std::vector< double > slopeB_
static int32_t waferLayer(const int32_t index)
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)