11 using namespace calib;
17 std::vector<std::pair<int, float> > theWeights;
19 if (calibtype ==
"RING") {
27 for (std::vector<std::pair<DetId, float> >::const_iterator idIt = scDetIds.begin(); idIt != scDetIds.end();
32 else if ((*idIt).first.subdetId() ==
EcalEndcap)
35 std::cout <<
"CalibElectron::BIG ERROR::RecHit NOT FOUND" << std::endl;
41 theWeights.push_back(std::pair<int, float>(
i, w_ring[
i]));
45 else if (calibtype ==
"MODULE") {
53 for (std::vector<std::pair<DetId, float> >::const_iterator idIt = scDetIds.begin(); idIt != scDetIds.end();
58 else if ((*idIt).first.subdetId() ==
EcalEndcap)
61 std::cout <<
"CalibElectron::BIG ERROR::RecHit NOT FOUND" << std::endl;
67 theWeights.push_back(std::pair<int, float>(
i, w_ring[
i]));
72 else if (calibtype ==
"ABS_SCALE") {
73 std::cout <<
"ENTERING CalibElectron, ABS SCALE mode" << std::endl;
79 for (std::vector<std::pair<DetId, float> >::const_iterator idIt = scDetIds.begin(); idIt != scDetIds.end();
84 else if ((*idIt).first.subdetId() ==
EcalEndcap)
87 std::cout <<
"CalibElectron::BIG ERROR::RecHit NOT FOUND" << std::endl;
93 theWeights.push_back(std::pair<int, float>(0, w_ring));
94 std::cout <<
" ABS SCALE - energy sum " << w_ring << std::endl;
98 else if (calibtype ==
"ETA_ET_MODE") {
106 for (std::vector<std::pair<DetId, float> >::const_iterator idIt = scDetIds.begin(); idIt != scDetIds.end();
111 else if ((*idIt).first.subdetId() ==
EcalEndcap)
114 std::cout <<
"CalibElectron::BIG ERROR::RecHit NOT FOUND" << std::endl;
130 if (w_ring[
i] != 0.) {
131 theWeights.push_back(std::pair<int, float>(
i, w_ring[
i]));
132 std::cout <<
" ring " <<
i <<
" - energy sum " << w_ring[
i] << std::endl;
139 std::cout <<
"CalibType not yet implemented" << std::endl;