60 objectsToken_(consumes<edm::
View<
T> >(iConfig.getParameter<edm::
InputTag>(
"objects"))),
61 objCut_(iConfig.existsAs<std::
string>(
"objectSelection") ? iConfig.getParameter<std::
string>(
"objectSelection") :
"",
true)
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; }
101 auto valMap = std::make_unique<ValueMap<float>>();
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()
objCut_(iConfig.existsAs< std::string >("srcObjectSelection")?iConfig.getParameter< std::string >("srcObjectSelection"):"", true)
DeltaRNearestObjectComputer< reco::Muon > DeltaRNearestMuonComputer
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