template<typename Prod>
class RecoTauCleanerImpl< Prod >
Definition at line 38 of file RecoTauCleaner.cc.
Implements edm::EDProducer.
Definition at line 110 of file RecoTauCleaner.cc.
References cl, reco::tau::cleanOverlaps(), edm::Event::getByLabel(), i, getHLTprescales::index, LaserDQM_cfg::input, j, N, convertSQLitetoXML_cfg::output, edm::Event::put(), findQualityFiles::rr, edm::RefVector< C, T, F >::size(), python.multivaluedict::sort(), and metsig::tau.
113 for (CleanerList::iterator cleaner =
cleaners_.begin();
115 cleaner->setup(evt, es);
124 reco::tau::castView<reco::PFTauRefVector>(
input);
127 typedef std::vector<reco::PFTauRef> PFTauRefs;
129 PFTauRefs dirty(inputRefs.
size());
132 auto N = inputRefs.
size();
135 for (decltype(N)
i=0;
i!=
N; ++
i) index[
i]=
i;
140 for (decltype(N) ir=0; ir!=N; ++ir)
141 for(decltype(N)
cl=0;cl!=CN;++cl)
142 ranks[ii++]=
cleaners_[cl](inputRefs[ir]);
145 std::
sort(index,index+N,[
rr,CN](
int i,
int j) {
return std::lexicographical_compare(rr+i*CN,rr+i*CN+CN,rr+j*CN,rr+j*CN+CN);});
146 for (decltype(N) ir=0; ir!=
N; ++ir)
147 dirty[ir]=inputRefs[index[ir]];
151 RemoveDuplicateJets>(dirty);
154 std::auto_ptr<Prod>
output(
new Prod());
158 for (PFTauRefs::const_iterator
tau = cleanTaus.begin();
159 tau != cleanTaus.end(); ++
tau) {
161 bool selected =
true;
166 output->push_back(convert<output_type>(*
tau));
std::auto_ptr< StringCutObjectSelector< reco::PFTau > > outputSelector_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
size_type size() const
Size of the RefVector.
Container cleanOverlaps(const Container &dirty)