36 const std::vector<float> &
values,
76 <<
"ElectronIDValueMapProducer runs in \"RECO\" or \"PAT\" mode!";
103 if(
test.isNull() || !
test.isAvailable() ) {
105 <<
"DataFormat set to \"PAT\" but cannot cast to pat::Electron!";
110 std::vector<float> eleFull5x5SigmaIEtaIEta, eleFull5x5SigmaIEtaIPhi;
111 std::vector<float> eleFull5x5R9, eleFull5x5Circularity;
112 std::vector<float> eleFull5x5E1x5,eleFull5x5E2x5,eleFull5x5E5x5;
115 for (
const auto& iEle :
src->ptrVector()){
117 const auto& theseed = *(iEle->superCluster()->seed());
120 const float see = (
isnan(vCov[0]) ? 0. :
sqrt(vCov[0]));
121 const float sep = vCov[1];
122 eleFull5x5SigmaIEtaIEta.push_back(see);
123 eleFull5x5SigmaIEtaIPhi.push_back(sep);
124 eleFull5x5R9.push_back(
lazyToolnoZS->
e3x3( theseed ) / iEle->superCluster()->rawEnergy() );
129 const float circularity = (e5x5 != 0.) ? 1.-e1x5/e5x5 : -1;
131 eleFull5x5E1x5.push_back(e1x5);
132 eleFull5x5E2x5.push_back(e2x5);
133 eleFull5x5E5x5.push_back(e5x5);
134 eleFull5x5Circularity.push_back(circularity);
150 const std::vector<float> &
values,
159 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_[]
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_
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
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static constexpr char eleFull5x5Circularity_[]