230 std::cout <<
"<RecoTauCleanerImpl::produce>:" << std::endl;
234 for (
typename CleanerList::iterator cleaner =
cleaners_.begin();
235 cleaner !=
cleaners_.end(); ++cleaner ) {
236 (*cleaner)->plugin_->setup(evt, es);
244 std::list<PFTauRankType*> rankedTaus;
245 size_t N = inputTaus->size();
248 PFTauRankType* rankedTau =
new PFTauRankType(inputRef);
250 rankedTau->ranks_.reserve(rankedTau->N_);
251 rankedTau->tolerances_.reserve(rankedTau->N_);
252 for (
typename CleanerList::const_iterator cleaner =
cleaners_.begin();
253 cleaner !=
cleaners_.end(); ++cleaner ) {
254 rankedTau->ranks_.push_back((*(*cleaner)->plugin_)(inputRef));
255 rankedTau->tolerances_.push_back((*cleaner)->tolerance_);
258 std::ostringstream os;
259 os <<
"rankedTau #" <<
idx;
260 rankedTau->print(os.str());
262 rankedTaus.push_back(rankedTau);
264 rankedTaus.sort(isHigherRank);
267 typedef std::vector<reco::PFTauRef> PFTauRefs;
268 PFTauRefs dirty(inputTaus->size());
269 size_t idx_sorted = 0;
270 for ( std::list<PFTauRankType*>::const_iterator rankedTau = rankedTaus.begin();
271 rankedTau != rankedTaus.end(); ++rankedTau ) {
272 dirty[idx_sorted] = (*rankedTau)->tauRef_;
274 std::cout <<
"dirty[" << idx_sorted <<
"] = " << dirty[idx_sorted].id() <<
":" << dirty[idx_sorted].key() << std::endl;
281 PFTauRefs cleanTaus = reco::tau::cleanOverlaps<PFTauRefs, RemoveDuplicateJets>(dirty);
284 std::auto_ptr<Prod>
output(
new Prod());
288 for ( PFTauRefs::const_iterator
tau = cleanTaus.begin();
289 tau != cleanTaus.end(); ++
tau ) {
291 bool selected =
true;
296 output->push_back(convert<output_type>(*
tau));
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::auto_ptr< StringCutObjectSelector< reco::PFTau > > outputSelector_
edm::EDGetTokenT< reco::PFTauCollection > tau_token
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...