36 const std::vector<float> &
values,
76 (
"ebReducedRecHitCollection"));
78 (
"ebReducedRecHitCollectionMiniAOD"));
81 (
"eeReducedRecHitCollection"));
83 (
"eeReducedRecHitCollectionMiniAOD"));
86 (
"esReducedRecHitCollection"));
88 (
"esReducedRecHitCollectionMiniAOD"));
118 if( !
src.isValid() ){
135 std::vector<float> eleFull5x5SigmaIEtaIEta, eleFull5x5SigmaIEtaIPhi;
136 std::vector<float> eleFull5x5R9, eleFull5x5Circularity;
137 std::vector<float> eleFull5x5E1x5,eleFull5x5E2x5,eleFull5x5E5x5;
140 for (
size_t i = 0;
i <
src->size(); ++
i){
141 auto iEle =
src->ptrAt(
i);
142 const auto& theseed = *(iEle->superCluster()->seed());
145 const float see = (
isnan(vCov[0]) ? 0. :
sqrt(vCov[0]));
146 const float sep = vCov[1];
147 eleFull5x5SigmaIEtaIEta.push_back(see);
148 eleFull5x5SigmaIEtaIPhi.push_back(sep);
149 eleFull5x5R9.push_back(
lazyToolnoZS->
e3x3( theseed ) / iEle->superCluster()->rawEnergy() );
154 const float circularity = (e5x5 != 0.) ? 1.-e1x5/e5x5 : -1;
156 eleFull5x5E1x5.push_back(e1x5);
157 eleFull5x5E2x5.push_back(e2x5);
158 eleFull5x5E5x5.push_back(e5x5);
159 eleFull5x5Circularity.push_back(circularity);
175 const std::vector<float> &
values,
180 auto valMap = std::make_unique<ValueMap<float>>();
182 filler.insert(
handle, values.begin(), values.end());
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< EcalRecHitCollection > ebReducedRecHitCollection_
static char eleFull5x5E1x5_[]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
static char eleFull5x5SigmaIEtaIEta_[]
~ElectronIDValueMapProducer()
EcalClusterLazyToolsT< noZS::EcalClusterTools > EcalClusterLazyTools
static char eleFull5x5E2x5_[]
void addDefault(ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< EcalRecHitCollection > ebReducedRecHitCollectionMiniAOD_
static char eleFull5x5E5x5_[]
virtual void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< EcalRecHitCollection > eeReducedRecHitCollectionMiniAOD_
static char eleFull5x5R9_[]
edm::EDGetToken srcMiniAOD_
ElectronIDValueMapProducer(const edm::ParameterSet &)
edm::EDGetTokenT< EcalRecHitCollection > esReducedRecHitCollectionMiniAOD_
edm::EDGetTokenT< EcalRecHitCollection > eeReducedRecHitCollection_
edm::EDGetTokenT< EcalRecHitCollection > esReducedRecHitCollection_
noZS::EcalClusterLazyTools * lazyToolnoZS
void writeValueMap(edm::Event &iEvent, const edm::Handle< edm::View< reco::GsfElectron > > &handle, const std::vector< float > &values, const std::string &label) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static char eleFull5x5Circularity_[]
static char eleFull5x5SigmaIEtaIPhi_[]