|
![CMS Logo](/cmsdoxygen/common/rightImage.jpg) |
Go to the documentation of this file.
21 const std::vector<std::string>& fvec =
val.strings();
23 throw cms::Exception(
"HcalParametersFromDD") <<
"Failed to get " <<
s <<
" tag.";
38 throw cms::Exception(
"HcalParametersFromDD") <<
"Failed to get " <<
s <<
" tag.";
59 edm::LogVerbatim(
"HCalGeom") <<
"HcalParametersFromDD::build(const DDCompactView*, HcalParameters&) is called";
67 const int nEtaMax = 100;
70 std::unique_ptr<HcalGeomParameters>
geom = std::make_unique<HcalGeomParameters>();
71 geom->loadGeometry(fv1, php);
83 for (
unsigned int i = 1;
i <= nEtaMax; ++
i) {
84 std::stringstream sstm;
85 sstm <<
"layerGroupSimEta" <<
i;
109 throw cms::Exception(
"HcalParametersFromDD") <<
"Not found " << attribute.c_str() <<
" but needed.";
112 attribute =
"OnlyForHcalRecNumbering";
118 int topoMode = getTopologyMode(
"TopologyMode",
sv,
true);
119 int trigMode = getTopologyMode(
"TriggerMode",
sv,
false);
120 php.
topologyMode = ((trigMode & 0xFF) << 8) | (topoMode & 0xFF);
123 for (
unsigned int i = 1;
i <= nEtaMax; ++
i) {
124 std::stringstream sstm;
125 sstm <<
"layerGroupRecEta" <<
i;
135 throw cms::Exception(
"HcalParametersFromDD") <<
"Not found " << attribute.c_str() <<
" but needed.";
143 edm::LogVerbatim(
"HCalGeom") <<
"HcalParametersFromDD::build(const cms::DDCompactView*, HcalParameters&) is called";
145 const int nEtaMax = 100;
147 std::unique_ptr<HcalGeomParameters>
geom = std::make_unique<HcalGeomParameters>();
148 geom->loadGeometry(cpv, php);
175 for (
unsigned int i = 1;
i <= nEtaMax; ++
i) {
188 std::vector<std::string> tempS = fv.
get<std::vector<std::string> >(
"hcal",
"TopologyMode");
189 std::string sv = (!tempS.empty()) ? tempS[0] :
"HcalTopologyMode::SLHC";
190 int topoMode = getTopologyMode(
sv,
true);
191 tempS = fv.
get<std::vector<std::string> >(
"hcal",
"TriggerMode");
192 sv = (!tempS.empty()) ? tempS[0] :
"HcalTopologyMode::TriggerMode_2021";
193 int trigMode = getTopologyMode(
sv,
false);
194 php.
topologyMode = ((trigMode & 0xFF) << 8) | (topoMode & 0xFF);
199 for (
unsigned int i = 1;
i <= nEtaMax; ++
i) {
217 for (
unsigned int i = 0;
i < php.
rTable.size(); ++
i) {
218 unsigned int k = php.
rTable.size() -
i - 1;
224 std::stringstream ss0;
225 ss0 <<
"HcalParametersFromDD: MaxDepth[" << php.
maxDepth.size() <<
"]: ";
229 std::stringstream ss1;
230 ss1 <<
"HcalParametersFromDD: ModHB [" << php.
modHB.size() <<
"]: ";
231 for (
const auto& it : php.
modHB)
234 std::stringstream ss2;
235 ss2 <<
"HcalParametersFromDD: ModHE [" << php.
modHE.size() <<
"]: ";
236 for (
const auto& it : php.
modHE)
239 std::stringstream ss3;
240 ss3 <<
"HcalParametersFromDD: " << php.
phioff.size() <<
" phioff values:";
241 std::vector<double>::const_iterator it;
242 for (it = php.
phioff.begin(),
i = 0; it != php.
phioff.end(); ++it)
245 std::stringstream ss4;
246 ss4 <<
"HcalParametersFromDD: " << php.
etaTable.size() <<
" entries for etaTable:";
248 ss4 <<
" [" << ++
i <<
"] = " << (*it);
250 std::stringstream ss5;
251 ss5 <<
"HcalParametersFromDD: " << php.
rTable.size() <<
" entries for rTable:";
252 for (it = php.
rTable.begin(),
i = 0; it != php.
rTable.end(); ++it)
255 std::stringstream ss6;
256 ss6 <<
"HcalParametersFromDD: " << php.
phibin.size() <<
" phibin values:";
257 for (it = php.
phibin.begin(),
i = 0; it != php.
phibin.end(); ++it)
260 std::stringstream ss7;
261 ss7 <<
"HcalParametersFromDD: " << php.
phitable.size() <<
" phitable values:";
267 std::vector<int>::const_iterator kt;
269 std::stringstream ss8;
272 ss8 <<
" " << ++
i <<
":" << (*kt);
275 std::stringstream ss8;
276 ss8 <<
"HcalParametersFromDD: " << php.
etaMin.size() <<
" etaMin values:";
277 for (kt = php.
etaMin.begin(),
i = 0; kt != php.
etaMin.end(); ++kt)
278 ss8 <<
" [" << ++
i <<
"] = " << (*kt);
280 std::stringstream ss9;
281 ss9 <<
"HcalParametersFromDD: " << php.
etaMax.size() <<
" etaMax values:";
282 for (kt = php.
etaMax.begin(),
i = 0; kt != php.
etaMax.end(); ++kt)
283 ss9 <<
" [" << ++
i <<
"] = " << (*kt);
285 std::stringstream ss10;
286 ss10 <<
"HcalParametersFromDD: " << php.
etaRange.size() <<
" etaRange values:";
288 ss10 <<
" [" << ++
i <<
"] = " << (*it);
290 std::stringstream ss11;
291 ss11 <<
"HcalParametersFromDD: " << php.
gparHF.size() <<
" gparHF values:";
292 for (it = php.
gparHF.begin(),
i = 0; it != php.
gparHF.end(); ++it)
295 std::stringstream ss12;
296 ss12 <<
"HcalParametersFromDD: " << php.
noff.size() <<
" noff values:";
297 for (kt = php.
noff.begin(),
i = 0; kt != php.
noff.end(); ++kt)
298 ss12 <<
" [" << ++
i <<
"] = " << (*kt);
300 std::stringstream ss13;
301 ss13 <<
"HcalParametersFromDD: " << php.
Layer0Wt.size() <<
" Layer0Wt values:";
303 ss13 <<
" [" << ++
i <<
"] = " << (*it);
305 std::stringstream ss14;
306 ss14 <<
"HcalParametersFromDD: " << php.
HBGains.size() <<
" Shift/Gains values for HB:";
307 for (
unsigned k = 0;
k < php.
HBGains.size(); ++
k)
310 std::stringstream ss15;
311 ss15 <<
"HcalParametersFromDD: " << php.
HEGains.size() <<
" Shift/Gains values for HE:";
312 for (
unsigned k = 0;
k < php.
HEGains.size(); ++
k)
315 std::stringstream ss16;
316 ss16 <<
"HcalParametersFromDD: " << php.
HFGains.size() <<
" Shift/Gains values for HF:";
317 for (
unsigned k = 0;
k < php.
HFGains.size(); ++
k)
320 std::stringstream ss17;
321 ss17 <<
"HcalParametersFromDD: " << php.
etagroup.size() <<
" etagroup values:";
323 ss17 <<
" [" << ++
i <<
"] = " << (*kt);
325 std::stringstream ss18;
326 ss18 <<
"HcalParametersFromDD: " << php.
phigroup.size() <<
" phigroup values:";
328 ss18 <<
" [" << ++
i <<
"] = " << (*kt);
332 std::stringstream ss19;
335 ss19 <<
" " << ++
i <<
":" << (*kt);
346 std::for_each(
v.begin(),
v.end(), [
s](
double&
n) {
n *=
s; });
std::vector< double > HFGains
std::vector< int > maxDepth
std::vector< int > etagroup
std::vector< double > etaTable
constexpr NumType convertRadToDeg(NumType radians)
DDsvalues_type mergedSpecifics() const
std::vector< double > HBGains
std::vector< double > etaTableHF
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< LayerItem > layerGroupEtaSim
std::vector< double > get(const std::string &)
std::vector< int > etaMax
bool firstChild()
set the current node to the first child ...
bool build(const DDCompactView *, HcalParameters &)
std::vector< double > rHO
T get(const std::string &) const
extract attribute value
std::vector< int > layerGroup
Compact representation of the geometrical detector hierarchy.
std::vector< double > phitable
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
std::vector< LayerItem > layerGroupEtaRec
std::vector< double > etaRange
std::vector< double > rTable
void rescale(std::vector< double > &, const double s)
bool check(const std::string &)
static constexpr double k_ScaleFromDDDToG4
static constexpr double k_ScaleFromDD4HepToG4
Tan< T >::type tan(const T &t)
T parseString(const std::string &value)
std::vector< double > phioff
std::vector< int > phigroup
std::vector< T > getVector(const std::string &) const
std::vector< int > HFShift
std::vector< double > Layer0Wt
std::vector< int > HBShift
constexpr NumType convertMmToCm(NumType millimeters)
std::vector< int > HEShift
std::vector< double > phibin
std::vector< double > HEGains
std::vector< int > etaMin
std::vector< double > gparHF
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type