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;
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";
108 int topoMode = getTopologyMode(
"TopologyMode", sv,
true);
109 int trigMode = getTopologyMode(
"TriggerMode", sv,
false);
110 php.
topologyMode = ((trigMode&0xFF)<<8) | (topoMode&0xFF);
113 for (
unsigned int i = 1;
i<=nEtaMax; ++
i) {
114 std::stringstream sstm;
115 sstm <<
"layerGroupRecEta" <<
i;
125 throw cms::Exception(
"HcalParametersFromDD" ) <<
"Not found "<< attribute.c_str() <<
" but needed.";
130 std::cout <<
"HcalParametersFromDD: MaxDepth: ";
133 std::cout <<
"HcalParametersFromDD: ModHB [" << php.
modHB.size() <<
"]: ";
136 std::cout <<
"HcalParametersFromDD: ModHE [" << php.
modHE.size() <<
"]: ";
139 std::cout <<
"HcalParametersFromDD: " << php.
phioff.size() <<
" phioff values";
140 std::vector<double>::const_iterator it;
141 for (it=php.
phioff.begin(), i=0; it!=php.
phioff.end(); ++it)
142 std::cout <<
" [" << ++i <<
"] = " << (*it)/CLHEP::deg;
144 std::cout <<
"HcalParametersFromDD: " << php.
etaTable.size() <<
" entries for etaTable";
146 std::cout <<
" [" << ++i <<
"] = " << (*it);
148 std::cout <<
"HcalParametersFromDD: " << php.
rTable.size() <<
" entries for rTable";
149 for (it=php.
rTable.begin(), i=0; it!=php.
rTable.end(); ++it)
150 std::cout <<
" [" << ++i <<
"] = " << (*it)/CLHEP::cm;
152 std::cout <<
"HcalParametersFromDD: " << php.
phibin.size() <<
" phibin values";
153 for (it=php.
phibin.begin(), i=0; it!=php.
phibin.end(); ++it)
154 std::cout <<
" [" << ++i <<
"] = " << (*it)/CLHEP::deg;
156 std::cout <<
"HcalParametersFromDD: " << php.
phitable.size() <<
" phitable values";
158 std::cout <<
" [" << ++i <<
"] = " << (*it)/CLHEP::deg;
161 std::vector<HcalParameters::LayerItem>::const_iterator jt;
162 std::vector<int>::const_iterator kt;
169 std::cout <<
"HcalParametersFromDD: " << php.
etaMin.size() <<
" etaMin values";
170 for (kt=php.
etaMin.begin(), i=0; kt!=php.
etaMin.end(); ++kt)
171 std::cout <<
" [" << ++i <<
"] = " << (*kt);
173 std::cout <<
"HcalParametersFromDD: " << php.
etaMax.size() <<
" etaMax values";
174 for (kt=php.
etaMax.begin(), i=0; kt!=php.
etaMax.end(); ++kt)
175 std::cout <<
" [" << ++i <<
"] = " << (*kt);
177 std::cout <<
"HcalParametersFromDD: " << php.
etaRange.size() <<
" etaRange values";
179 std::cout <<
" [" << ++i <<
"] = " << (*it);
181 std::cout <<
"HcalParametersFromDD: " << php.
gparHF.size() <<
" gparHF values";
182 for (it=php.
gparHF.begin(), i=0; it!=php.
gparHF.end(); ++it)
183 std::cout <<
" [" << ++i <<
"] = " << (*it)/CLHEP::cm;
185 std::cout <<
"HcalParametersFromDD: " << php.
noff.size() <<
" noff values";
186 for (kt=php.
noff.begin(), i=0; kt!=php.
noff.end(); ++kt)
187 std::cout <<
" [" << ++i <<
"] = " << (*kt);
189 std::cout <<
"HcalParametersFromDD: " << php.
Layer0Wt.size() <<
" Layer0Wt values";
191 std::cout <<
" [" << ++i <<
"] = " << (*it);
193 std::cout <<
"HcalParametersFromDD: " << php.
HBGains.size() <<
" Shift/Gains values for HB";
197 std::cout <<
"HcalParametersFromDD: " << php.
HEGains.size() <<
" Shift/Gains values for HE";
201 std::cout <<
"HcalParametersFromDD: " << php.
HFGains.size() <<
" Shift/Gains values for HF";
205 std::cout <<
"HcalParametersFromDD: " << php.
etagroup.size() <<
" etagroup values";
207 std::cout <<
" [" << ++i <<
"] = " << (*kt);
209 std::cout <<
"HcalParametersFromDD: " << php.
phigroup.size() <<
" phigroup values";
211 std::cout <<
" [" << ++i <<
"] = " << (*kt);
220 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
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
std::vector< int > etaMin
T parseString(const std::string &value)