63 produces<edm::ValueMap<float> >();
89 for (probe = probes->begin(); probe != endprobes; ++probe) {
90 double dr2min = 10000;
91 for (
unsigned int iObj=0; iObj<objects->size(); iObj++) {
92 const T&
obj = objects->at(iObj);
94 double dr2 =
deltaR2(*probe, obj);
95 if (dr2 < dr2min) { dr2min = dr2; }
97 values.push_back(
sqrt(dr2min));
101 auto valMap = std::make_unique<ValueMap<float>>();
103 filler.insert(probes, values.begin(), values.end());
DeltaRNearestObjectComputer< reco::GsfElectron > DeltaRNearestGsfElectronComputer
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
StringCutObjectSelector< T, true > objCut_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
virtual ~DeltaRNearestObjectComputer()
DeltaRNearestObjectComputer< reco::Muon > DeltaRNearestMuonComputer
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< edm::View< T > > objectsToken_
DeltaRNearestObjectComputer< reco::Candidate > DeltaRNearestCandidateComputer
DeltaRNearestObjectComputer< reco::Electron > DeltaRNearestElectronComputer
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
DeltaRNearestObjectComputer< reco::Jet > DeltaRNearestJetComputer
DeltaRNearestObjectComputer(const edm::ParameterSet &iConfig)
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
edm::EDGetTokenT< edm::View< reco::Candidate > > probesToken_
DeltaRNearestObjectComputer< reco::Photon > DeltaRNearestPhotonComputer