|
|
#include <HcalSimParametersFromDD.h>
|
bool | buildParameters (const HcalSimulationParameters &) |
|
void | fillNameVector (const cms::DDCompactView &, const std::string &, std::vector< std::string > &) |
|
void | fillNameVector (const DDCompactView *, const std::string &, const std::string &, std::vector< std::string > &) |
|
void | fillPMTs (const std::vector< double > &, bool, HcalSimulationParameters &) |
|
std::vector< double > | getDDDArray (const std::string &str, const DDsvalues_type &sv, int &nmin) |
|
std::vector< std::string > | getNames (cms::DDFilteredView &fv) |
|
std::vector< std::string > | getNames (DDFilteredView &fv) |
|
bool | isItHF (const std::string &, const HcalSimulationParameters &) |
|
Definition at line 13 of file HcalSimParametersFromDD.h.
◆ HcalSimParametersFromDD()
HcalSimParametersFromDD::HcalSimParametersFromDD |
( |
| ) |
|
|
default |
◆ build() [1/2]
Definition at line 103 of file HcalSimParametersFromDD.cc.
106 <<
"Inside HcalSimParametersFromDD::build(const cms::DDCompactView*, HcalSimulationParameters&)";
117 php.
hfLevels_ = fv.get<std::vector<int> >(
"hf",
"Levels");
125 php.
lambdaLimits_ = fv.get<std::vector<int> >(
"hf",
"lambLim");
135 std::vector<double>
neta = fv.get<std::vector<double> >(
"hfpmt",
"indexPMTR");
137 neta = fv.get<std::vector<double> >(
"hfpmt",
"indexPMTL");
150 BenchmarkGrd counter(
"HcalSimParametersFromDD HCal materials OnlyForHcalSimNumbering, HCAL");
152 while (fv.firstChild()) {
153 std::vector<int>
copy = fv.copyNos();
155 int idet = (
copy.size() > 1) ? (
copy[1] / 1000) : 0;
156 if ((idet == 3) || (idet == 4)) {
157 std::string_view matName = dd4hep::dd::noNamespace(fv.materialName());
References HcalSimulationParameters::attenuationLength_, filterCSVwithJSON::copy, cms::DDFilteredView::copyNos(), counter, mps_fire::end, ALCARECOTkAlBeamHalo_cff::filter, spr::find(), cms::DDFilteredView::firstChild(), cms::DDFilteredView::get(), HcalSimulationParameters::hcalMaterialNames_, HcalSimulationParameters::hfFibreConicalNames_, HcalSimulationParameters::hfFibreNames_, HcalSimulationParameters::hfFibreStraightNames_, HcalSimulationParameters::hfLevels_, HcalSimulationParameters::hfNames_, HcalSimulationParameters::hfPMTNames_, HcalSimulationParameters::lambdaLimits_, HcalSimulationParameters::longFiberLength_, cms::DDFilteredView::materialName(), dqmiodumpmetadata::n, neta, and HcalSimulationParameters::shortFiberLength_.
◆ build() [2/2]
Definition at line 18 of file HcalSimParametersFromDD.cc.
29 bool dodet = fv1.firstChild();
53 throw cms::Exception(
"HcalSimParametersFromDD") <<
"Not found " <<
value <<
" for " << attribute <<
" but needed.";
60 if (fv2.firstChild()) {
69 throw cms::Exception(
"HcalSimParametersFromDD") <<
"Not found " <<
value <<
" for " << attribute <<
" but needed.";
79 attribute =
"OnlyForHcalSimNumbering";
82 dodet = fv3.firstChild();
References HcalSimulationParameters::attenuationLength_, dbl_to_int(), Exception, DDFilteredView::firstChild(), MsgTools::getNames(), HcalSimulationParameters::hcalMaterialNames_, HcalSimulationParameters::hfFibreConicalNames_, HcalSimulationParameters::hfFibreNames_, HcalSimulationParameters::hfFibreStraightNames_, HcalSimulationParameters::hfLevels_, HcalSimulationParameters::hfNames_, HcalSimulationParameters::hfPMTNames_, mps_fire::i, HcalSimulationParameters::lambdaLimits_, dqm-mbProfile::log, DDFilteredView::logicalPart(), HcalSimulationParameters::longFiberLength_, DDFilteredView::mergedSpecifics(), neta, DDFilteredView::next(), HcalSimulationParameters::shortFiberLength_, AlCaHLTBitMon_QueryRunRegistry::string, and pfDeepBoostedJetPreprocessParams_cfi::sv.
Referenced by HcalSimParametersESModule::produce().
◆ buildParameters()
Definition at line 169 of file HcalSimParametersFromDD.cc.
171 std::stringstream ss0;
172 for (
unsigned int it = 0; it < php.
hfNames_.size(); it++) {
173 if (it / 10 * 10 == it)
175 ss0 <<
" [" << it <<
"] " << php.
hfNames_[it];
179 std::stringstream ss1;
180 for (
unsigned int it = 0; it < php.
hfLevels_.size(); it++) {
181 if (it / 10 * 10 == it)
183 ss1 <<
" [" << it <<
"] " << php.
hfLevels_[it];
187 std::stringstream ss2;
189 if (it / 10 * 10 == it)
194 <<
" attL(1/cm): " << ss2.str();
196 std::stringstream ss3;
197 for (
unsigned int it = 0; it < php.
lambdaLimits_.size(); it++) {
198 if (it / 10 * 10 == it)
204 std::stringstream ss4;
206 if (it / 10 * 10 == it)
212 std::stringstream ss5;
214 if (it / 10 * 10 == it)
235 <<
" names of HFFibreBundleStraight";
240 <<
" names of FibreBundleConical";
References HcalSimulationParameters::attenuationLength_, geant_units::operators::convertMmToCm(), HcalSimulationParameters::hcalMaterialNames_, HcalSimulationParameters::hfFibreConicalNames_, HcalSimulationParameters::hfFibreNames_, HcalSimulationParameters::hfFibreStraightNames_, HcalSimulationParameters::hfLevels_, HcalSimulationParameters::hfNames_, HcalSimulationParameters::hfPMTNames_, cuy::ii, dqmdumpme::k, HcalSimulationParameters::lambdaLimits_, HcalSimulationParameters::longFiberLength_, HcalSimulationParameters::pmtFiberLeft_, HcalSimulationParameters::pmtFiberRight_, HcalSimulationParameters::pmtLeft_, HcalSimulationParameters::pmtRight_, and HcalSimulationParameters::shortFiberLength_.
◆ fillNameVector() [1/2]
void HcalSimParametersFromDD::fillNameVector |
( |
const cms::DDCompactView & |
cpv, |
|
|
const std::string & |
value, |
|
|
std::vector< std::string > & |
lvnames |
|
) |
| |
|
private |
◆ fillNameVector() [2/2]
void HcalSimParametersFromDD::fillNameVector |
( |
const DDCompactView * |
cpv, |
|
|
const std::string & |
attribute, |
|
|
const std::string & |
value, |
|
|
std::vector< std::string > & |
lvnames |
|
) |
| |
|
private |
◆ fillPMTs()
void HcalSimParametersFromDD::fillPMTs |
( |
const std::vector< double > & |
neta, |
|
|
bool |
lOrR, |
|
|
HcalSimulationParameters & |
php |
|
) |
| |
|
private |
◆ getDDDArray()
std::vector< double > HcalSimParametersFromDD::getDDDArray |
( |
const std::string & |
str, |
|
|
const DDsvalues_type & |
sv, |
|
|
int & |
nmin |
|
) |
| |
|
private |
◆ getNames() [1/2]
◆ getNames() [2/2]
std::vector< std::string > HcalSimParametersFromDD::getNames |
( |
DDFilteredView & |
fv | ) |
|
|
private |
◆ isItHF()
◆ k_ScaleFromDD4Hep
constexpr double HcalSimParametersFromDD::k_ScaleFromDD4Hep = (1.0 / dd4hep::mm) |
|
staticconstexprprivate |
◆ k_ScaleFromDD4HepInv
constexpr double HcalSimParametersFromDD::k_ScaleFromDD4HepInv = dd4hep::mm |
|
staticconstexprprivate |
std::vector< double > longFiberLength_
void fillPMTs(const std::vector< double > &, bool, HcalSimulationParameters &)
std::vector< std::string > getNames(DDFilteredView &fv)
std::vector< std::string > hfPMTNames_
std::vector< double > getDDDArray(const std::string &str, const DDsvalues_type &sv, int &nmin)
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
std::vector< int > hfLevels_
std::vector< int > pmtLeft_
std::vector< int > lambdaLimits_
std::vector< std::string > hfFibreStraightNames_
std::vector< int > pmtFiberRight_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::vector< std::string > hfFibreNames_
std::string_view name() const
bool firstChild()
set the current node to the first child ...
bool next()
set current node to the next node in the filtered tree
static constexpr double k_ScaleFromDD4HepInv
bool firstChild()
set the current node to the first child
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
std::vector< int > pmtFiberLeft_
std::vector< int > pmtRight_
bool isItHF(const std::string &, const HcalSimulationParameters &)
bool buildParameters(const HcalSimulationParameters &)
std::vector< std::string > hfFibreConicalNames_
std::vector< std::string > hcalMaterialNames_
A DDLogicalPart aggregates information concerning material, solid and sensitveness ....
static std::atomic< unsigned int > counter
Log< level::Error, false > LogError
std::vector< double > shortFiberLength_
static constexpr double k_ScaleFromDD4Hep
const HitContainer *__restrict__ const TkSoA *__restrict__ Quality *__restrict__ uint16_t nmin
Log< level::Info, true > LogVerbatim
constexpr NumType convertMmToCm(NumType millimeters)
void fillNameVector(const DDCompactView *, const std::string &, const std::string &, std::vector< std::string > &)
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< std::string > hfNames_
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::vector< double > attenuationLength_