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;
131 if (w_ring[
i] != 0.) {
132 theWeights.push_back(std::pair<int, float>(
i, w_ring[
i]));
133 std::cout <<
" ring " <<
i <<
" - energy sum " << w_ring[
i] << std::endl;
140 std::cout <<
"CalibType not yet implemented" << std::endl;
const EcalRecHitCollection * theEEHits_
Sin< T >::type sin(const T &t)
const EcalRecHitCollection * theHits_
std::vector< std::pair< int, float > > getCalibModulesWeights(TString calibtype)
iterator find(key_type k)
const reco::GsfElectron * theElectron_
SuperClusterRef superCluster() const override
reference to a SuperCluster
double eta() const final
momentum pseudorapidity