7 using namespace pat::helper;
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;
70 throw cms::Exception(
"Bad Reference") <<
"One item in the OverlapBySuperClusterSeed input list has a null or dangling superCluster reference\n";
72 if (mySeed == otherSc->seed()) {
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
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.
edm::Handle< edm::View< reco::RecoCandidate > > others_
virtual void readInput(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Read input, apply preselection cut.
bool isNull() const
Checks for null.
PATStringCutObjectSelector presel_
A generic preselection cut that can work on any Candidate, but has access also to methods of PAT spec...
edm::Handle< reco::CandidateView > candidates_
The collection to check overlaps against.
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 getByLabel(InputTag const &tag, Handle< PROD > &result) const
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
double deltaR_
Delta R for the match.
const std::string & name() const
bool checkRecoComponents_
Check the overlapping by RECO components.
bool isNull() const
Checks for null.
StringCutObjectSelector< pat::DiObjectProxy > pairCut_
Cut on the pair of objects together.
virtual reco::SuperClusterRef superCluster() const
reference to a SuperCluster