26 std::vector<std::pair<float,size_t> >
matches;
36 matches.push_back(std::make_pair(dr, idx));
40 if (matches.empty())
return false;
43 std::sort(matches.begin(), matches.end());
45 for (std::vector<std::pair<float,size_t> >::const_iterator it = matches.begin(); it != matches.end(); ++it) {
55 if (input == 0)
throw cms::Exception(
"Type Error") <<
"Input to OverlapBySuperClusterSeed is not a RecoCandidate. " 56 <<
"It's a " <<
typeid(item).
name() <<
"\n";
59 throw cms::Exception(
"Bad Reference") <<
"Input to OverlapBySuperClusterSeed has a null or dangling superCluster reference\n";
63 throw cms::Exception(
"Bad Reference") <<
"Input to OverlapBySuperClusterSeed has a null superCluster seed reference\n";
65 bool hasOverlaps =
false;
72 throw cms::Exception(
"Bad Reference") <<
"One item in the OverlapBySuperClusterSeed input list has a null or dangling superCluster reference\n";
74 if (mySeed == otherSc->seed()) {
75 overlapsToFill.
push_back(others_->ptrAt(idx));
edm::EDGetTokenT< reco::CandidateView > srcToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Ptr< value_type > ptrAt(size_type i) const
void push_back(Ptr< T > const &iPtr)
virtual bool fillOverlapsForItem(const reco::Candidate &item, reco::CandidatePtrVector &overlapsToFill) const
Check for overlaps.
virtual bool fillOverlapsForItem(const reco::Candidate &item, reco::CandidatePtrVector &overlapsToFill) const
Check for overlaps.
static std::string const input
virtual void readInput(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Read input, apply preselection cut.
PATStringCutObjectSelector presel_
A generic preselection cut that can work on any Candidate, but has access also to methods of PAT spec...
const_iterator begin() const
edm::Handle< reco::CandidateView > candidates_
The collection to check overlaps against.
bool isNull() const
Checks for null.
std::vector< bool > isPreselected_
Flag saying if each element has passed the preselection or not.
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
bool isNull() const
Checks for null.
double deltaR_
Delta R for the match.
const std::string & name() const
bool checkRecoComponents_
Check the overlapping by RECO components.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
const_iterator end() const
StringCutObjectSelector< pat::DiObjectProxy > pairCut_
Cut on the pair of objects together.
virtual reco::SuperClusterRef superCluster() const
reference to a SuperCluster