36 const std::vector<float> &
values,
83 <<
"ElectronIDValueMapProducer runs in \"RECO\" or \"PAT\" mode!";
110 if(
test.isNull() || !
test.isAvailable() ) {
112 <<
"DataFormat set to \"PAT\" but cannot cast to pat::Electron!";
117 std::vector<float> eleFull5x5SigmaIEtaIEta, eleFull5x5SigmaIEtaIPhi;
118 std::vector<float> eleFull5x5R9, eleFull5x5Circularity;
119 std::vector<float> eleFull5x5E1x5,eleFull5x5E2x5,eleFull5x5E5x5;
122 for (
const auto& iEle :
src->ptrVector()){
124 const auto& theseed = *(iEle->superCluster()->seed());
127 const float see = (
isnan(vCov[0]) ? 0. :
sqrt(vCov[0]));
128 const float sep = vCov[1];
129 eleFull5x5SigmaIEtaIEta.push_back(see);
130 eleFull5x5SigmaIEtaIPhi.push_back(sep);
131 eleFull5x5R9.push_back(
lazyToolnoZS->
e3x3( theseed ) / iEle->superCluster()->rawEnergy() );
136 const float circularity = (e5x5 != 0.) ? 1.-e1x5/e5x5 : -1;
138 eleFull5x5E1x5.push_back(e1x5);
139 eleFull5x5E2x5.push_back(e2x5);
140 eleFull5x5E5x5.push_back(e5x5);
141 eleFull5x5Circularity.push_back(circularity);
157 const std::vector<float> &
values,
166 iEvent.
put(valMap, label);
T getParameter(std::string const &) const
edm::EDGetTokenT< EcalRecHitCollection > ebReducedRecHitCollection_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
void insert(const H &h, I begin, I end)
~ElectronIDValueMapProducer()
EcalClusterLazyToolsT< noZS::EcalClusterTools > EcalClusterLazyTools
static constexpr char eleFull5x5SigmaIEtaIEta_[]
static constexpr char eleFull5x5E1x5_[]
edm::InputTag ebReducedRecHitTag_
void addDefault(ParameterSetDescription const &psetDescription)
static constexpr char eleFull5x5R9_[]
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
static constexpr char eleFull5x5E2x5_[]
virtual void produce(edm::Event &, const edm::EventSetup &) override
static constexpr char eleFull5x5SigmaIEtaIPhi_[]
ElectronIDValueMapProducer(const edm::ParameterSet &)
edm::EDGetTokenT< EcalRecHitCollection > eeReducedRecHitCollection_
edm::EDGetTokenT< EcalRecHitCollection > esReducedRecHitCollection_
edm::InputTag eeReducedRecHitTag_
noZS::EcalClusterLazyTools * lazyToolnoZS
static constexpr char eleFull5x5E5x5_[]
void writeValueMap(edm::Event &iEvent, const edm::Handle< edm::View< reco::GsfElectron > > &handle, const std::vector< float > &values, const std::string &label) const
edm::InputTag esReducedRecHitTag_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static constexpr char eleFull5x5Circularity_[]