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.";
38 throw cms::Exception(
"HcalParametersFromDD" ) <<
"Failed to get "<< s <<
" tag.";
49 DDValue val1(attribute, value, 0.0);
59 const int nEtaMax=100;
74 for (
unsigned int i = 1;
i<=nEtaMax; ++
i) {
75 std::stringstream sstm;
76 sstm <<
"layerGroupSimEta" <<
i;
102 throw cms::Exception(
"HcalParametersFromDD") <<
"Not found "<< attribute.c_str() <<
" but needed.";
104 for(
unsigned int i = 0;
i < php.
rTable.size(); ++
i ) {
105 unsigned int k = php.
rTable.size() -
i - 1;
109 attribute =
"OnlyForHcalRecNumbering";
110 DDValue val2( attribute, value, 0.0 );
122 int topoMode = getTopologyMode(
"TopologyMode", sv,
true);
123 int trigMode = getTopologyMode(
"TriggerMode", sv,
false);
124 php.
topologyMode = ((trigMode&0xFF)<<8) | (topoMode&0xFF);
127 for (
unsigned int i = 1;
i<=nEtaMax; ++
i) {
128 std::stringstream sstm;
129 sstm <<
"layerGroupRecEta" <<
i;
139 throw cms::Exception(
"HcalParametersFromDD" ) <<
"Not found "<< attribute.c_str() <<
" but needed.";
144 std::cout <<
"HcalParametersFromDD: MaxDepth: ";
147 std::cout <<
"HcalParametersFromDD: ModHB [" << php.
modHB.size() <<
"]: ";
150 std::cout <<
"HcalParametersFromDD: ModHE [" << php.
modHE.size() <<
"]: ";
153 std::cout <<
"HcalParametersFromDD: " << php.
phioff.size() <<
" phioff values";
154 std::vector<double>::const_iterator it;
155 for (it=php.
phioff.begin(), i=0; it!=php.
phioff.end(); ++it)
156 std::cout <<
" [" << ++i <<
"] = " << (*it)/CLHEP::deg;
158 std::cout <<
"HcalParametersFromDD: " << php.
etaTable.size() <<
" entries for etaTable";
160 std::cout <<
" [" << ++i <<
"] = " << (*it);
162 std::cout <<
"HcalParametersFromDD: " << php.
rTable.size() <<
" entries for rTable";
163 for (it=php.
rTable.begin(), i=0; it!=php.
rTable.end(); ++it)
164 std::cout <<
" [" << ++i <<
"] = " << (*it)/CLHEP::cm;
166 std::cout <<
"HcalParametersFromDD: " << php.
phibin.size() <<
" phibin values";
167 for (it=php.
phibin.begin(), i=0; it!=php.
phibin.end(); ++it)
168 std::cout <<
" [" << ++i <<
"] = " << (*it)/CLHEP::deg;
170 std::cout <<
"HcalParametersFromDD: " << php.
phitable.size() <<
" phitable values";
172 std::cout <<
" [" << ++i <<
"] = " << (*it)/CLHEP::deg;
175 std::vector<HcalParameters::LayerItem>::const_iterator jt;
176 std::vector<int>::const_iterator kt;
183 std::cout <<
"HcalParametersFromDD: " << php.
etaMin.size() <<
" etaMin values";
184 for (kt=php.
etaMin.begin(), i=0; kt!=php.
etaMin.end(); ++kt)
185 std::cout <<
" [" << ++i <<
"] = " << (*kt);
187 std::cout <<
"HcalParametersFromDD: " << php.
etaMax.size() <<
" etaMax values";
188 for (kt=php.
etaMax.begin(), i=0; kt!=php.
etaMax.end(); ++kt)
189 std::cout <<
" [" << ++i <<
"] = " << (*kt);
191 std::cout <<
"HcalParametersFromDD: " << php.
etaRange.size() <<
" etaRange values";
193 std::cout <<
" [" << ++i <<
"] = " << (*it);
195 std::cout <<
"HcalParametersFromDD: " << php.
gparHF.size() <<
" gparHF values";
196 for (it=php.
gparHF.begin(), i=0; it!=php.
gparHF.end(); ++it)
197 std::cout <<
" [" << ++i <<
"] = " << (*it)/CLHEP::cm;
199 std::cout <<
"HcalParametersFromDD: " << php.
noff.size() <<
" noff values";
200 for (kt=php.
noff.begin(), i=0; kt!=php.
noff.end(); ++kt)
201 std::cout <<
" [" << ++i <<
"] = " << (*kt);
203 std::cout <<
"HcalParametersFromDD: " << php.
Layer0Wt.size() <<
" Layer0Wt values";
205 std::cout <<
" [" << ++i <<
"] = " << (*it);
207 std::cout <<
"HcalParametersFromDD: " << php.
HBGains.size() <<
" Shift/Gains values for HB";
211 std::cout <<
"HcalParametersFromDD: " << php.
HEGains.size() <<
" Shift/Gains values for HE";
215 std::cout <<
"HcalParametersFromDD: " << php.
HFGains.size() <<
" Shift/Gains values for HF";
219 std::cout <<
"HcalParametersFromDD: " << php.
etagroup.size() <<
" etagroup values";
221 std::cout <<
" [" << ++i <<
"] = " << (*kt);
223 std::cout <<
"HcalParametersFromDD: " << php.
phigroup.size() <<
" phigroup values";
225 std::cout <<
" [" << ++i <<
"] = " << (*kt);
234 std::cout <<
"HcalParametersFromDD: (topology|trigger)Mode " << std::hex
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.