59 probesToken_(consumes<edm::
View<
reco::
Candidate> >(iConfig.getParameter<edm::InputTag>(
"probes"))),
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; }
DeltaRNearestObjectComputer< reco::GsfElectron > DeltaRNearestGsfElectronComputer
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
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_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
double deltaR2(const T1 &t1, const T2 &t2)
DeltaRNearestObjectComputer< reco::Candidate > DeltaRNearestCandidateComputer
DeltaRNearestObjectComputer< reco::Electron > DeltaRNearestElectronComputer
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