|
|
Definition at line 25 of file DDHGCalEEFileAlgo.cc.
◆ HGCalEEFileAlgo() [1/2]
HGCalEEFileAlgo::HGCalEEFileAlgo |
( |
| ) |
|
|
inline |
◆ HGCalEEFileAlgo() [2/2]
Definition at line 27 of file DDHGCalEEFileAlgo.cc.
34 static constexpr
double tol1 = 0.01;
35 static constexpr
double tol2 = 0.00001;
38 wafers_ =
args.value<std::vector<std::string>>(
"WaferNames");
41 for (
unsigned int i = 0;
i <
wafers_.size(); ++
i)
44 materials_ =
args.value<std::vector<std::string>>(
"MaterialNames");
45 names_ =
args.value<std::vector<std::string>>(
"VolumeNames");
46 thick_ =
args.value<std::vector<double>>(
"Thickness");
50 for (
unsigned int i = 0;
i <
names_.size(); ++
i)
58 for (
unsigned int i = 0;
i <
layers_.size(); ++
i)
82 edm::LogVerbatim(
"HGCalGeom") <<
"First copy number for layer type " <<
i <<
":" <<
ii <<
" with "
128 slopeB_ =
args.value<std::vector<double>>(
"SlopeBottom");
129 zFrontB_ =
args.value<std::vector<double>>(
"ZFrontBottom");
131 slopeT_ =
args.value<std::vector<double>>(
"SlopeTop");
132 zFrontT_ =
args.value<std::vector<double>>(
"ZFrontTop");
135 for (
unsigned int i = 0;
i <
slopeB_.size(); ++
i)
138 for (
unsigned int i = 0;
i <
slopeT_.size(); ++
i)
141 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalEEFileAlgo: NameSpace " << ns.name();
151 for (
unsigned int i = 0;
i <
layers_.size(); ++
i) {
157 for (
int ly = laymin; ly < laymax; ++ly) {
167 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalEEFileAlgo: Layer " << ly <<
":" <<
ii <<
" Front " << zi <<
", "
168 << routF <<
" Back " << zo <<
", " << rinB <<
" superlayer thickness "
176 std::vector<double> pgonZ, pgonRin, pgonRout;
179 pgonZ.emplace_back(-hthick);
180 pgonZ.emplace_back(hthick);
181 pgonRin.emplace_back(rinB);
182 pgonRin.emplace_back(rinB);
183 pgonRout.emplace_back(rmax);
184 pgonRout.emplace_back(rmax);
199 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalEEFileAlgo: z " << (
zz - hthick) <<
":" << (
zz + hthick)
200 <<
" with " << pgonZ.size() <<
" palnes";
201 for (
unsigned int isec = 0; isec < pgonZ.size(); ++isec)
203 <<
"[" << isec <<
"] z " << pgonZ[isec] <<
" R " << pgonRin[isec] <<
":" << pgonRout[isec];
205 for (
unsigned int isec = 0; isec < pgonZ.size(); ++isec) {
207 pgonRout[isec] = pgonRout[isec] *
cosAlpha_ - tol1;
211 ns.addSolidNS(ns.prepend(
name), solid);
213 ns.addVolumeNS(glog);
218 <<
" sections and filled with " << matter.name();
219 for (
unsigned int k = 0;
k < pgonZ.size(); ++
k)
221 <<
"[" <<
k <<
"] z " << pgonZ[
k] <<
" R " << pgonRin[
k] <<
":" << pgonRout[
k];
228 dd4hep::Solid solid = dd4hep::Tube(rins, routs, hthick, 0.0, 2._pi);
229 ns.addSolidNS(ns.prepend(
name), solid);
231 ns.addVolumeNS(glog);
234 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalEEFileAlgo: " << solid.name() <<
" Tubs made of " << matter.name()
235 <<
" of dimensions " << rinB <<
":" << rins <<
", " << routF <<
":" << routs
236 <<
", " << hthick <<
", 0.0, 360.0 and position " << glog.name() <<
" number "
243 mother.placeVolume(glog,
copy,
r1);
246 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalEEFileAlgo: " << glog.name() <<
" number " <<
copy <<
" positioned in "
247 << mother.name() <<
" at " <<
r1 <<
" with no rotation";
257 << thickTot <<
": thickness of all its components **** ERROR ****";
260 << thickTot <<
" of the components";
272 edm::LogVerbatim(
"HGCalGeom") <<
"<<== End of DDHGCalEEFileAlgo 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, 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.
◆ positionSensitive()
void HGCalEEFileAlgo::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 276 of file DDHGCalEEFileAlgo.cc.
285 static const double sqrt3 =
std::sqrt(3.0);
288 double R = 2.0 *
r / sqrt3;
289 double dy = 0.75 *
R;
290 int N = (
int)(0.5 * rout /
r) + 2;
293 int ium(0), ivm(0), iumAll(0), ivmAll(0), kount(0), ntot(0),
nin(0);
294 std::vector<int> ntype(6, 0);
295 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalEEFileAlgo: " << glog.name() <<
" rin:rout " << rin <<
":" << rout
296 <<
" zpos " << zpos <<
" N " <<
N <<
" for maximum u, v; r " <<
r <<
" R " <<
R
297 <<
" dy " <<
dy <<
" Shift " << xyoff.first <<
":" << xyoff.second <<
" WaferSize "
300 for (
int u = -
N; u <=
N; ++u) {
301 for (
int v = -
N;
v <=
N; ++
v) {
308 double xpos = xyoff.first + nc *
r;
309 double ypos = xyoff.second +
nr *
dy;
314 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalEEFileAlgo: " << glog.name() <<
" R " << rin <<
":" << rout
315 <<
"\n Z " << zpos <<
" LayerType " << layertype <<
" u " << u <<
" v " <<
v
316 <<
" with " <<
corner.first <<
" corners";
325 <<
type <<
" layer:u:v:indx " << (layer +
firstLayer_) <<
":" << u <<
":" <<
v
350 <<
" DDHGCalEEFileAlgo: " <<
wafers_[
type] <<
" number " <<
copy <<
" type " << layertype <<
":" <<
type
351 <<
" positioned in " << glog.name() <<
" at " << tran <<
" with no rotation";
359 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalEEFileAlgo: Maximum # of u " << ium <<
":" << iumAll <<
" # of v " << ivm
360 <<
":" << ivmAll <<
" and " <<
nin <<
":" << kount <<
":" << ntot <<
" wafers ("
361 << ntype[0] <<
":" << ntype[1] <<
":" << ntype[2] <<
":" << ntype[3] <<
":"
362 << 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 HGCalEEFileAlgo::absorbMode_ |
◆ alpha_
double HGCalEEFileAlgo::alpha_ |
◆ choiceType_
int HGCalEEFileAlgo::choiceType_ |
◆ copies_
std::unordered_set<int> HGCalEEFileAlgo::copies_ |
◆ copyNumber_
std::vector<int> HGCalEEFileAlgo::copyNumber_ |
◆ cosAlpha_
double HGCalEEFileAlgo::cosAlpha_ |
◆ firstLayer_
int HGCalEEFileAlgo::firstLayer_ |
◆ fracAreaMin_
double HGCalEEFileAlgo::fracAreaMin_ |
◆ geomTools_
◆ layerCenter_
std::vector<int> HGCalEEFileAlgo::layerCenter_ |
◆ layers_
std::vector<int> HGCalEEFileAlgo::layers_ |
◆ layerSense_
std::vector<int> HGCalEEFileAlgo::layerSense_ |
◆ layerThick_
std::vector<double> HGCalEEFileAlgo::layerThick_ |
◆ layerType_
std::vector<int> HGCalEEFileAlgo::layerType_ |
◆ materials_
std::vector<std::string> HGCalEEFileAlgo::materials_ |
◆ names_
std::vector<std::string> HGCalEEFileAlgo::names_ |
◆ nCutRadPar_
int HGCalEEFileAlgo::nCutRadPar_ |
◆ rad100to200_
std::vector<double> HGCalEEFileAlgo::rad100to200_ |
◆ rad200to300_
std::vector<double> HGCalEEFileAlgo::rad200to300_ |
◆ rMaxFront_
std::vector<double> HGCalEEFileAlgo::rMaxFront_ |
◆ rMinFront_
std::vector<double> HGCalEEFileAlgo::rMinFront_ |
◆ sectors_
int HGCalEEFileAlgo::sectors_ |
◆ sensitiveMode_
int HGCalEEFileAlgo::sensitiveMode_ |
◆ slopeB_
std::vector<double> HGCalEEFileAlgo::slopeB_ |
◆ slopeT_
std::vector<double> HGCalEEFileAlgo::slopeT_ |
◆ thick_
std::vector<double> HGCalEEFileAlgo::thick_ |
◆ waferIndex_
std::vector<int> HGCalEEFileAlgo::waferIndex_ |
◆ wafers_
std::vector<std::string> HGCalEEFileAlgo::wafers_ |
◆ waferSepar_
double HGCalEEFileAlgo::waferSepar_ |
◆ waferSize_
double HGCalEEFileAlgo::waferSize_ |
◆ waferTypes_
std::vector<int> HGCalEEFileAlgo::waferTypes_ |
◆ zFrontB_
std::vector<double> HGCalEEFileAlgo::zFrontB_ |
◆ zFrontT_
std::vector<double> HGCalEEFileAlgo::zFrontT_ |
◆ zMinBlock_
double HGCalEEFileAlgo::zMinBlock_ |
◆ zMinRadPar_
double HGCalEEFileAlgo::zMinRadPar_ |
static int32_t waferV(const int32_t index)
HGCalGeomTools geomTools_
std::vector< double > rMaxFront_
std::vector< double > zFrontB_
constexpr NumType convertRadToDeg(NumType radians)
std::vector< int > waferIndex_
static constexpr uint32_t k_CornerSize
std::vector< double > thick_
std::vector< double > layerThick_
std::vector< int > layerCenter_
Log< level::Warning, false > LogWarning
Cos< T >::type cos(const T &t)
std::vector< double > slopeT_
void positionSensitive(cms::DDParsingContext &ctxt, xml_h e, const dd4hep::Volume &glog, double rin, double rout, double zpos, int layertype, int layer)
int getType(double xpos, double ypos, double zpos)
std::vector< int > waferTypes_
std::vector< double > slopeB_
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 > rad200to300_
std::vector< int > layerSense_
std::vector< std::string > names_
std::unordered_set< int > copies_
Log< level::Error, false > LogError
std::vector< std::pair< float, float > >::iterator itr
std::vector< double > rad100to200_
std::vector< std::string > wafers_
Log< level::Info, true > LogVerbatim
static int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV, bool old=false)
std::vector< int > layers_
std::vector< int > copyNumber_
Abs< T >::type abs(const T &t)
std::vector< double > zFrontT_
static int32_t waferLayer(const int32_t index)
std::vector< double > rMinFront_
std::vector< std::string > materials_