11 #include "CLHEP/Units/GlobalSystemOfUnits.h"
21 const std::vector<std::string> & fvec = val.strings();
22 if( fvec.size() == 0 ) {
23 throw cms::Exception(
"HcalParametersFromDD" ) <<
"Failed to get " << s <<
" tag.";
29 return double( mode );
31 throw cms::Exception(
"HcalParametersFromDD" ) <<
"Failed to get "<< s <<
" tag.";
42 DDValue val1(attribute, value, 0.0);
52 const int nEtaMax=100;
67 for (
unsigned int i = 1;
i<=nEtaMax; ++
i) {
68 std::stringstream sstm;
69 sstm <<
"layerGroupSimEta" <<
i;
95 throw cms::Exception(
"HcalParametersFromDD") <<
"Not found "<< attribute.c_str() <<
" but needed.";
97 for(
unsigned int i = 0;
i < php.
rTable.size(); ++
i ) {
98 unsigned int k = php.
rTable.size() -
i - 1;
102 attribute =
"OnlyForHcalRecNumbering";
103 DDValue val2( attribute, value, 0.0 );
118 for (
unsigned int i = 1;
i<=nEtaMax; ++
i) {
119 std::stringstream sstm;
120 sstm <<
"layerGroupRecEta" <<
i;
130 throw cms::Exception(
"HcalParametersFromDD" ) <<
"Not found "<< attribute.c_str() <<
" but needed.";
135 std::cout <<
"HcalParametersFromDD: MaxDepth: ";
138 std::cout <<
"HcalParametersFromDD: ModHB [" << php.
modHB.size() <<
"]: ";
141 std::cout <<
"HcalParametersFromDD: ModHE [" << php.
modHE.size() <<
"]: ";
144 std::cout <<
"HcalParametersFromDD: " << php.
phioff.size() <<
" phioff values";
145 std::vector<double>::const_iterator it;
146 for (it=php.
phioff.begin(), i=0; it!=php.
phioff.end(); ++it)
147 std::cout <<
" [" << ++i <<
"] = " << (*it)/CLHEP::deg;
149 std::cout <<
"HcalParametersFromDD: " << php.
etaTable.size() <<
" entries for etaTable";
151 std::cout <<
" [" << ++i <<
"] = " << (*it);
153 std::cout <<
"HcalParametersFromDD: " << php.
rTable.size() <<
" entries for rTable";
154 for (it=php.
rTable.begin(), i=0; it!=php.
rTable.end(); ++it)
155 std::cout <<
" [" << ++i <<
"] = " << (*it)/CLHEP::cm;
157 std::cout <<
"HcalParametersFromDD: " << php.
phibin.size() <<
" phibin values";
158 for (it=php.
phibin.begin(), i=0; it!=php.
phibin.end(); ++it)
159 std::cout <<
" [" << ++i <<
"] = " << (*it)/CLHEP::deg;
161 std::cout <<
"HcalParametersFromDD: " << php.
phitable.size() <<
" phitable values";
163 std::cout <<
" [" << ++i <<
"] = " << (*it)/CLHEP::deg;
166 std::vector<HcalParameters::LayerItem>::const_iterator jt;
167 std::vector<int>::const_iterator kt;
174 std::cout <<
"HcalParametersFromDD: " << php.
etaMin.size() <<
" etaMin values";
175 for (kt=php.
etaMin.begin(), i=0; kt!=php.
etaMin.end(); ++kt)
176 std::cout <<
" [" << ++i <<
"] = " << (*kt);
178 std::cout <<
"HcalParametersFromDD: " << php.
etaMax.size() <<
" etaMax values";
179 for (kt=php.
etaMax.begin(), i=0; kt!=php.
etaMax.end(); ++kt)
180 std::cout <<
" [" << ++i <<
"] = " << (*kt);
182 std::cout <<
"HcalParametersFromDD: " << php.
etaRange.size() <<
" etaRange values";
184 std::cout <<
" [" << ++i <<
"] = " << (*it);
186 std::cout <<
"HcalParametersFromDD: " << php.
gparHF.size() <<
" gparHF values";
187 for (it=php.
gparHF.begin(), i=0; it!=php.
gparHF.end(); ++it)
188 std::cout <<
" [" << ++i <<
"] = " << (*it)/CLHEP::cm;
190 std::cout <<
"HcalParametersFromDD: " << php.
noff.size() <<
" noff values";
191 for (kt=php.
noff.begin(), i=0; kt!=php.
noff.end(); ++kt)
192 std::cout <<
" [" << ++i <<
"] = " << (*kt);
194 std::cout <<
"HcalParametersFromDD: " << php.
Layer0Wt.size() <<
" Layer0Wt values";
196 std::cout <<
" [" << ++i <<
"] = " << (*it);
198 std::cout <<
"HcalParametersFromDD: " << php.
HBGains.size() <<
" Shift/Gains values for HB";
202 std::cout <<
"HcalParametersFromDD: " << php.
HEGains.size() <<
" Shift/Gains values for HE";
206 std::cout <<
"HcalParametersFromDD: " << php.
HFGains.size() <<
" Shift/Gains values for HF";
210 std::cout <<
"HcalParametersFromDD: " << php.
etagroup.size() <<
" etagroup values";
212 std::cout <<
" [" << ++i <<
"] = " << (*kt);
214 std::cout <<
"HcalParametersFromDD: " << php.
phigroup.size() <<
" phigroup values";
216 std::cout <<
" [" << ++i <<
"] = " << (*kt);
std::vector< double > etaTable
std::vector< int > etagroup
void loadGeometry(const DDFilteredView &_fv, HcalParameters &php)
bool build(const DDCompactView *, HcalParameters &)
void addFilter(const DDFilter &, DDLogOp op=DDLogOp::AND)
std::vector< double > etaRange
std::vector< double > HBGains
std::vector< int > getModHalfHBHE(const int type) const
std::vector< int > HEShift
type of data representation of DDCompactView
double getConstDzHF() const
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
std::vector< double > etaTableHF
void getConstRHO(std::vector< double > &) const
std::vector< int > etaMax
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
bool check(const std::string &)
std::vector< double > rHO
std::vector< int > layerGroup
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
Tan< T >::type tan(const T &t)
std::vector< int > HFShift
std::vector< double > get(const std::string &)
std::vector< double > HEGains
std::vector< double > phioff
std::vector< double > gparHF
DDsvalues_type mergedSpecifics() const
std::vector< double > Layer0Wt
std::vector< double > rTable
std::vector< double > phitable
std::vector< double > phibin
std::vector< LayerItem > layerGroupEtaRec
bool firstChild()
set the current node to the first child ...
std::vector< double > HFGains
std::vector< int > HBShift
std::vector< int > maxDepth
std::vector< int > phigroup
void setCriteria(const DDValue &nameVal, DDCompOp, DDLogOp l=DDLogOp::AND, bool asString=true, bool merged=true)
std::vector< int > etaMin
T parseString(const std::string &value)
The DDGenericFilter is a runtime-parametrized Filter looking on DDSpecifcs.