41 const std::vector<reco::PFRecoTauChargedHadron>& chargedHadrons,
42 const std::vector<RecoTauPiZero>& piZeros,
43 const std::vector<CandidatePtr>& regionalExtras)
const override;
46 std::unique_ptr<RecoTauQualityCuts>
qcuts_;
80 usePFLeptonsAsChargedHadrons_(
pset.getParameter<
bool>(
"usePFLeptons")),
81 leadObjecPtThreshold_(
pset.getParameter<double>(
"leadObjectPt")),
82 matchingCone_(
pset.getParameter<
std::
string>(
"matchingCone")),
83 signalConeChargedHadrons_(
pset.getParameter<
std::
string>(
"signalConeChargedHadrons")),
84 isoConeChargedHadrons_(
pset.getParameter<
std::
string>(
"isoConeChargedHadrons")),
85 signalConePiZeros_(
pset.getParameter<
std::
string>(
"signalConePiZeros")),
86 signalConeSizeToStore_(
88 isoConePiZeros_(
pset.getParameter<
std::
string>(
"isoConePiZeros")),
89 signalConeNeutralHadrons_(
pset.getParameter<
std::
string>(
"signalConeNeutralHadrons")),
90 isoConeNeutralHadrons_(
pset.getParameter<
std::
string>(
"isoConeNeutralHadrons")),
91 maxSignalConeChargedHadrons_(
pset.getParameter<
int>(
"maxSignalConeChargedHadrons")),
92 minAbsPhotonSumPt_insideSignalCone_(
pset.getParameter<double>(
"minAbsPhotonSumPt_insideSignalCone")),
93 minRelPhotonSumPt_insideSignalCone_(
pset.getParameter<double>(
"minRelPhotonSumPt_insideSignalCone"))
110 const PiZeroList::const_iterator& piZerosEnd) {
111 for (
auto const& ptr :
flattenPiZeros(piZerosBegin, piZerosEnd)) {
143 double photonSumPt_insideSignalCone = 0.;
144 double photonSumPt_outsideSignalCone = 0.;
145 int numPhotons = piZero.numberOfDaughters();
146 for (
int idxPhoton = 0; idxPhoton < numPhotons; ++idxPhoton) {
150 photonSumPt_insideSignalCone +=
photon->pt();
152 photonSumPt_outsideSignalCone +=
photon->pt();
164 unsigned int nCharged = pfChs.size();
181 const std::vector<reco::PFRecoTauChargedHadron>& chargedHadrons,
182 const std::vector<RecoTauPiZero>& piZeros,
183 const std::vector<CandidatePtr>& regionalExtras)
const {
188 using namespace cone;
203 typedef std::vector<CandidatePtr>
CandPtrs;
239 CandPtrs::iterator leadPFCH_iter = std::find_if(pfchs.begin(), pfchs.end(), matchingConeFilter);
241 if (leadPFCH_iter != pfchs.end()) {
242 leadPFCH = *leadPFCH_iter;
244 tau.setleadChargedHadrCand(leadPFCH);
253 CandPtrs::iterator leadPFGamma_iter = std::find_if(
pfGammas.begin(),
pfGammas.end(), matchingConeFilter);
255 if (leadPFGamma_iter !=
pfGammas.end()) {
256 leadPFGamma = *leadPFGamma_iter;
258 tau.setleadNeutralCand(leadPFGamma);
264 leadPFCand = leadPFCH;
267 leadPFCand = leadPFGamma;
270 leadPFCand = leadPFCH;
273 tau.setleadCand(leadPFCand);
303 RegionalJunkConeAndIdFilter pfChargedJunk(pfchCandSelector,
307 RegionalJunkConeAndIdFilter pfGammaJunk(pfgammaCandSelector,
311 RegionalJunkConeAndIdFilter pfNeutralJunk(pfnhCandSelector,
316 CandPtrDRFilterIter signalPFCHCands_begin(signalConePFCHFilter, pfchs.begin(), pfchs.end());
319 int numSignalPFCHs = 0;
321 int numIsolationPFCHs = 0;
322 for (
CandPtrDRFilterIter iter = signalPFCHCands_begin; iter != signalPFCHCands_end; ++iter) {
325 signalPFCHs.push_back(*iter);
330 isolationPFCHs.push_back(*iter);
334 CandPtrs::const_iterator signalPFCHs_begin = signalPFCHs.begin();
335 CandPtrs::const_iterator signalPFCHs_end = signalPFCHs.end();
339 std::vector<reco::RecoTauPiZero> cleanPiZeros = piZeroXCleaner(piZeros);
345 auto isolationPFCHCands_begin(boost::make_filter_iterator(
347 auto isolationPFCHCands_end(boost::make_filter_iterator(
349 for (
auto iter = isolationPFCHCands_begin; iter != isolationPFCHCands_end; ++iter) {
351 isolationPFCHs.push_back(*iter);
354 CandPtrs::const_iterator isolationPFCHs_begin = isolationPFCHs.begin();
355 CandPtrs::const_iterator isolationPFCHs_end = isolationPFCHs.end();
363 boost::make_filter_iterator(
365 boost::make_filter_iterator(
380 boost::make_filter_iterator(pfChargedJunk, regionalJunk.begin(), regionalJunk.end()),
381 boost::make_filter_iterator(pfChargedJunk, regionalJunk.end(), regionalJunk.end()));
386 boost::make_filter_iterator(
388 boost::make_filter_iterator(
394 boost::make_filter_iterator(pfNeutralJunk, regionalJunk.begin(), regionalJunk.end()),
395 boost::make_filter_iterator(pfNeutralJunk, regionalJunk.end(), regionalJunk.end()));
405 boost::make_filter_iterator(pfGammaJunk, regionalJunk.begin(), regionalJunk.end()),
406 boost::make_filter_iterator(pfGammaJunk, regionalJunk.end(), regionalJunk.end()));
411 std::unique_ptr<reco::PFTau> tauPtr =
tau.get(
false);
416 tauPtr->setVertex(primaryVertexRef->position());