11 #include "CLHEP/Units/GlobalSystemOfUnits.h" 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.";
52 const int nEtaMax=100;
67 for (
unsigned int i = 1;
i<=nEtaMax; ++
i) {
68 std::stringstream sstm;
69 sstm <<
"layerGroupSimEta" <<
i;
96 throw cms::Exception(
"HcalParametersFromDD") <<
"Not found "<< attribute.c_str() <<
" but needed.";
98 for(
unsigned int i = 0;
i < php.
rTable.size(); ++
i ) {
99 unsigned int k = php.
rTable.size() -
i - 1;
103 attribute =
"OnlyForHcalRecNumbering";
109 int topoMode = getTopologyMode(
"TopologyMode", sv,
true);
110 int trigMode = getTopologyMode(
"TriggerMode", sv,
false);
111 php.
topologyMode = ((trigMode&0xFF)<<8) | (topoMode&0xFF);
114 for (
unsigned int i = 1;
i<=nEtaMax; ++
i) {
115 std::stringstream sstm;
116 sstm <<
"layerGroupRecEta" <<
i;
126 throw cms::Exception(
"HcalParametersFromDD" ) <<
"Not found "<< attribute.c_str() <<
" but needed.";
131 std::cout <<
"HcalParametersFromDD: MaxDepth: ";
134 std::cout <<
"HcalParametersFromDD: ModHB [" << php.
modHB.size() <<
"]: ";
137 std::cout <<
"HcalParametersFromDD: ModHE [" << php.
modHE.size() <<
"]: ";
140 std::cout <<
"HcalParametersFromDD: " << php.
phioff.size() <<
" phioff values";
141 std::vector<double>::const_iterator it;
142 for (it=php.
phioff.begin(), i=0; it!=php.
phioff.end(); ++it)
143 std::cout <<
" [" << ++i <<
"] = " << (*it)/CLHEP::deg;
145 std::cout <<
"HcalParametersFromDD: " << php.
etaTable.size() <<
" entries for etaTable";
147 std::cout <<
" [" << ++i <<
"] = " << (*it);
149 std::cout <<
"HcalParametersFromDD: " << php.
rTable.size() <<
" entries for rTable";
150 for (it=php.
rTable.begin(), i=0; it!=php.
rTable.end(); ++it)
151 std::cout <<
" [" << ++i <<
"] = " << (*it)/CLHEP::cm;
153 std::cout <<
"HcalParametersFromDD: " << php.
phibin.size() <<
" phibin values";
154 for (it=php.
phibin.begin(), i=0; it!=php.
phibin.end(); ++it)
155 std::cout <<
" [" << ++i <<
"] = " << (*it)/CLHEP::deg;
157 std::cout <<
"HcalParametersFromDD: " << php.
phitable.size() <<
" phitable values";
159 std::cout <<
" [" << ++i <<
"] = " << (*it)/CLHEP::deg;
162 std::vector<HcalParameters::LayerItem>::const_iterator jt;
163 std::vector<int>::const_iterator kt;
170 std::cout <<
"HcalParametersFromDD: " << php.
etaMin.size() <<
" etaMin values";
171 for (kt=php.
etaMin.begin(), i=0; kt!=php.
etaMin.end(); ++kt)
172 std::cout <<
" [" << ++i <<
"] = " << (*kt);
174 std::cout <<
"HcalParametersFromDD: " << php.
etaMax.size() <<
" etaMax values";
175 for (kt=php.
etaMax.begin(), i=0; kt!=php.
etaMax.end(); ++kt)
176 std::cout <<
" [" << ++i <<
"] = " << (*kt);
178 std::cout <<
"HcalParametersFromDD: " << php.
etaRange.size() <<
" etaRange values";
180 std::cout <<
" [" << ++i <<
"] = " << (*it);
182 std::cout <<
"HcalParametersFromDD: " << php.
gparHF.size() <<
" gparHF values";
183 for (it=php.
gparHF.begin(), i=0; it!=php.
gparHF.end(); ++it)
184 std::cout <<
" [" << ++i <<
"] = " << (*it)/CLHEP::cm;
186 std::cout <<
"HcalParametersFromDD: " << php.
noff.size() <<
" noff values";
187 for (kt=php.
noff.begin(), i=0; kt!=php.
noff.end(); ++kt)
188 std::cout <<
" [" << ++i <<
"] = " << (*kt);
190 std::cout <<
"HcalParametersFromDD: " << php.
Layer0Wt.size() <<
" Layer0Wt values";
192 std::cout <<
" [" << ++i <<
"] = " << (*it);
194 std::cout <<
"HcalParametersFromDD: " << php.
HBGains.size() <<
" Shift/Gains values for HB";
198 std::cout <<
"HcalParametersFromDD: " << php.
HEGains.size() <<
" Shift/Gains values for HE";
202 std::cout <<
"HcalParametersFromDD: " << php.
HFGains.size() <<
" Shift/Gains values for HF";
206 std::cout <<
"HcalParametersFromDD: " << php.
etagroup.size() <<
" etagroup values";
208 std::cout <<
" [" << ++i <<
"] = " << (*kt);
210 std::cout <<
"HcalParametersFromDD: " << php.
phigroup.size() <<
" phigroup values";
212 std::cout <<
" [" << ++i <<
"] = " << (*kt);
221 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 &)
std::vector< double > etaRange
std::vector< double > HBGains
std::vector< int > getModHalfHBHE(const int type) const
std::vector< int > HEShift
Compact representation of the geometrical detector hierarchy.
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
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
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
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
std::vector< int > etaMin
T parseString(const std::string &value)