59 probes_(iConfig.getParameter<edm::InputTag>(
"probes")),
60 objects_(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);
93 if (!objCut_(obj))
continue;
94 double dr2 =
deltaR2(*probe, obj);
95 if (dr2 < dr2min) { dr2min = dr2; }
DeltaRNearestObjectComputer< reco::GsfElectron > DeltaRNearestGsfElectronComputer
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
StringCutObjectSelector< T, true > objCut_
#define DEFINE_FWK_MODULE(type)
virtual ~DeltaRNearestObjectComputer()
DeltaRNearestObjectComputer< reco::Muon > DeltaRNearestMuonComputer
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double deltaR2(const Vector1 &v1, const Vector2 &v2)
DeltaRNearestObjectComputer< reco::Candidate > DeltaRNearestCandidateComputer
DeltaRNearestObjectComputer< reco::Electron > DeltaRNearestElectronComputer
DeltaRNearestObjectComputer< reco::Jet > DeltaRNearestJetComputer
DeltaRNearestObjectComputer(const edm::ParameterSet &iConfig)
DeltaRNearestObjectComputer< reco::Photon > DeltaRNearestPhotonComputer
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)