CMS 3D CMS Logo

RecoTauBuilderCombinatoricPlugin.cc
Go to the documentation of this file.
1 #include <vector>
2 
5 
9 
11 
18 
19 #include <algorithm>
20 
21 namespace reco {
22  namespace tau {
23 
24  typedef std::vector<reco::PFRecoTauChargedHadron> ChargedHadronList;
26  typedef std::vector<RecoTauPiZero> PiZeroList;
28 
30  public:
33 
35  const std::vector<reco::PFRecoTauChargedHadron>&,
36  const std::vector<RecoTauPiZero>&,
37  const std::vector<CandidatePtr>&) const override;
38 
39  private:
40  std::unique_ptr<RecoTauQualityCuts> qcuts_;
41 
43 
44  struct decayModeInfo {
45  uint32_t maxPiZeros_;
46  uint32_t maxPFCHs_;
47  uint32_t nCharged_;
48  uint32_t nPiZeros_;
49  };
50  std::vector<decayModeInfo> decayModesToBuild_;
51 
57 
59  };
60 
64  qcuts_(std::make_unique<RecoTauQualityCuts>(
65  pset.getParameterSet("qualityCuts").getParameterSet("signalQualityCuts"))),
66  isolationConeSize_(pset.getParameter<double>("isolationConeSize")),
67  signalConeSize_(pset.getParameter<std::string>("signalConeSize")),
68  minAbsPhotonSumPt_insideSignalCone_(pset.getParameter<double>("minAbsPhotonSumPt_insideSignalCone")),
69  minRelPhotonSumPt_insideSignalCone_(pset.getParameter<double>("minRelPhotonSumPt_insideSignalCone")),
70  minAbsPhotonSumPt_outsideSignalCone_(pset.getParameter<double>("minAbsPhotonSumPt_outsideSignalCone")),
71  minRelPhotonSumPt_outsideSignalCone_(pset.getParameter<double>("minRelPhotonSumPt_outsideSignalCone")) {
72  typedef std::vector<edm::ParameterSet> VPSet;
73  const VPSet& decayModes = pset.getParameter<VPSet>("decayModes");
74  for (VPSet::const_iterator decayMode = decayModes.begin(); decayMode != decayModes.end(); ++decayMode) {
76  info.nCharged_ = decayMode->getParameter<uint32_t>("nCharged");
77  info.nPiZeros_ = decayMode->getParameter<uint32_t>("nPiZeros");
78  info.maxPFCHs_ = decayMode->getParameter<uint32_t>("maxTracks");
79  info.maxPiZeros_ = decayMode->getParameter<uint32_t>("maxPiZeros");
80  decayModesToBuild_.push_back(info);
81  }
82 
83  verbosity_ = pset.getParameter<int>("verbosity");
84  }
85 
86  // define template specialization for cross-cleaning
87  namespace xclean {
88  template <>
90  const ChargedHadronCombo::combo_iterator& chargedHadronsBegin,
91  const ChargedHadronCombo::combo_iterator& chargedHadronsEnd) {
92  // Get the list of objects we need to clean
93  for (ChargedHadronCombo::combo_iterator chargedHadron = chargedHadronsBegin; chargedHadron != chargedHadronsEnd;
94  ++chargedHadron) {
95  // CV: Remove PFGammas that are merged into TauChargedHadrons from isolation PiZeros, but not from signal PiZeros.
96  // The overlap between PFGammas contained in signal PiZeros and merged into TauChargedHadrons
97  // is resolved by RecoTauConstructor::addTauChargedHadron,
98  // which gives preference to PFGammas that are within PiZeros and removes those PFGammas from TauChargedHadrons.
99  if (mode_ == kRemoveChargedDaughterOverlaps) {
100  if (chargedHadron->getChargedPFCandidate().isNonnull())
101  toRemove_.insert(reco::CandidatePtr(chargedHadron->getChargedPFCandidate()));
102  } else if (mode_ == kRemoveChargedAndNeutralDaughterOverlaps) {
103  const reco::CompositePtrCandidate::daughters& daughters = chargedHadron->daughterPtrVector();
104  for (reco::CompositePtrCandidate::daughters::const_iterator daughter = daughters.begin();
105  daughter != daughters.end();
106  ++daughter) {
107  toRemove_.insert(reco::CandidatePtr(*daughter));
108  }
109  } else
110  assert(0);
111  }
112  }
113 
114  template <>
115  inline void CrossCleanPtrs<PiZeroList::const_iterator>::initialize(const PiZeroList::const_iterator& piZerosBegin,
116  const PiZeroList::const_iterator& piZerosEnd) {
117  for (auto const& ptr : flattenPiZeros(piZerosBegin, piZerosEnd)) {
118  toRemove_.insert(CandidatePtr(ptr));
119  }
120  }
121 
122  template <>
124  const ChargedHadronCombo::combo_iterator& chargedHadronsBegin,
125  const ChargedHadronCombo::combo_iterator& chargedHadronsEnd) {
126  //std::cout << "<CrossCleanPtrs<ChargedHadronCombo>::initialize>:" << std::endl;
127  for (ChargedHadronCombo::combo_iterator chargedHadron = chargedHadronsBegin; chargedHadron != chargedHadronsEnd;
128  ++chargedHadron) {
129  const reco::CompositePtrCandidate::daughters& daughters = chargedHadron->daughterPtrVector();
130  for (reco::CompositePtrCandidate::daughters::const_iterator daughter = daughters.begin();
131  daughter != daughters.end();
132  ++daughter) {
133  //std::cout << " adding PFCandidate = " << daughter->id() << ":" << daughter->key() << std::endl;
134  toRemove_.insert(reco::CandidatePtr(*daughter));
135  }
136  }
137  }
138 
139  template <>
141  const ChargedHadronList::const_iterator& chargedHadronsBegin,
142  const ChargedHadronList::const_iterator& chargedHadronsEnd) {
143  //std::cout << "<CrossCleanPtrs<ChargedHadronList>::initialize>:" << std::endl;
144  for (ChargedHadronList::const_iterator chargedHadron = chargedHadronsBegin; chargedHadron != chargedHadronsEnd;
145  ++chargedHadron) {
146  const reco::CompositePtrCandidate::daughters& daughters = chargedHadron->daughterPtrVector();
147  for (reco::CompositePtrCandidate::daughters::const_iterator daughter = daughters.begin();
148  daughter != daughters.end();
149  ++daughter) {
150  //std::cout << " adding PFCandidate = " << daughter->id() << ":" << daughter->key() << std::endl;
151  toRemove_.insert(reco::CandidatePtr(*daughter));
152  }
153  }
154  }
155  } // namespace xclean
156 
157  namespace {
158  // auxiliary class for sorting pizeros by descending transverse momentum
159  class SortPi0sDescendingPt {
160  public:
161  bool operator()(const RecoTauPiZero& a, const RecoTauPiZero& b) const { return a.pt() > b.pt(); }
162  };
163 
164  double square(double x) { return x * x; }
165  } // namespace
166 
168  const reco::JetBaseRef& jet,
169  const std::vector<reco::PFRecoTauChargedHadron>& chargedHadrons,
170  const std::vector<RecoTauPiZero>& piZeros,
171  const std::vector<CandidatePtr>& regionalExtras) const {
172  if (verbosity_) {
173  std::cout << "<RecoTauBuilderCombinatoricPlugin::operator()>:" << std::endl;
174  std::cout << " processing jet: Pt = " << jet->pt() << ", eta = " << jet->eta() << ", phi = " << jet->eta()
175  << ","
176  << " mass = " << jet->mass() << ", area = " << jet->jetArea() << std::endl;
177  }
178 
179  // Define output.
181 
182  // Update the primary vertex used by the quality cuts. The PV is supplied by
183  // the base class.
184  qcuts_->setPV(primaryVertex(jet));
185 
186  typedef std::vector<CandidatePtr> CandPtrs;
187 
188  if (verbosity_) {
189  std::cout << "#chargedHadrons = " << chargedHadrons.size() << std::endl;
190  int idx = 0;
191  for (ChargedHadronList::const_iterator chargedHadron = chargedHadrons.begin();
192  chargedHadron != chargedHadrons.end();
193  ++chargedHadron) {
194  std::cout << "chargedHadron #" << idx << ":" << std::endl;
195  chargedHadron->print(std::cout);
196  ++idx;
197  }
198  std::cout << "#piZeros = " << piZeros.size() << std::endl;
199  idx = 0;
200  for (PiZeroList::const_iterator piZero = piZeros.begin(); piZero != piZeros.end(); ++piZero) {
201  std::cout << "piZero #" << idx << ":" << std::endl;
202  piZero->print(std::cout);
203  ++idx;
204  }
205  }
206 
207  CandPtrs pfchs = qcuts_->filterCandRefs(pfChargedCands(*jet));
208  CandPtrs pfnhs = qcuts_->filterCandRefs(pfCandidatesByPdgId(*jet, 130));
209  CandPtrs pfgammas = qcuts_->filterCandRefs(pfCandidatesByPdgId(*jet, 22));
210 
213  CandPtrs regionalJunk = qcuts_->filterCandRefs(regionalExtras);
214 
215  // Loop over the decay modes we want to build
216  for (std::vector<decayModeInfo>::const_iterator decayMode = decayModesToBuild_.begin();
217  decayMode != decayModesToBuild_.end();
218  ++decayMode) {
219  // Find how many piZeros are in this decay mode
220  size_t piZerosToBuild = decayMode->nPiZeros_;
221  // Find how many tracks are in this decay mode
222  size_t tracksToBuild = decayMode->nCharged_;
223  if (verbosity_) {
224  std::cout << "piZerosToBuild = " << piZerosToBuild << std::endl;
225  std::cout << "#piZeros = " << piZeros.size() << std::endl;
226  std::cout << "tracksToBuild = " << tracksToBuild << std::endl;
227  std::cout << "#chargedHadrons = " << chargedHadrons.size() << std::endl;
228  }
229 
230  // Skip decay mode if jet doesn't have the multiplicity to support it
231  if (chargedHadrons.size() < tracksToBuild)
232  continue;
233 
234  // Find the start and end of potential signal tracks
235  ChargedHadronList::const_iterator chargedHadron_begin = chargedHadrons.begin();
236  ChargedHadronList::const_iterator chargedHadron_end = chargedHadrons.end();
237  chargedHadron_end = takeNElements(chargedHadron_begin, chargedHadron_end, decayMode->maxPFCHs_);
238 
239  // Build our track combo generator
240  ChargedHadronCombo trackCombos(chargedHadron_begin, chargedHadron_end, tracksToBuild);
241 
242  CandPtrs::iterator pfch_end = pfchs.end();
243  pfch_end = takeNElements(pfchs.begin(), pfch_end, decayMode->maxPFCHs_);
244 
245  //-------------------------------------------------------
246  // Begin combinatoric loop for this decay mode
247  //-------------------------------------------------------
248 
249  // Loop over the different combinations of tracks
250  for (ChargedHadronCombo::iterator trackCombo = trackCombos.begin(); trackCombo != trackCombos.end();
251  ++trackCombo) {
253  trackCombo->combo_begin(),
254  trackCombo->combo_end(),
256 
257  PiZeroList cleanSignalPiZeros = signalPiZeroXCleaner(piZeros);
258 
259  // CV: sort collection of cross-cleaned pi0s by descending Pt
260  std::sort(cleanSignalPiZeros.begin(), cleanSignalPiZeros.end(), SortPi0sDescendingPt());
261 
262  // Skip decay mode if we don't have enough remaining clean pizeros to
263  // build it.
264  if (cleanSignalPiZeros.size() < piZerosToBuild)
265  continue;
266 
267  // Find the start and end of potential signal tracks
268  PiZeroList::iterator signalPiZero_begin = cleanSignalPiZeros.begin();
269  PiZeroList::iterator signalPiZero_end = cleanSignalPiZeros.end();
270  signalPiZero_end = takeNElements(signalPiZero_begin, signalPiZero_end, decayMode->maxPiZeros_);
271 
272  // Build our piZero combo generator
273  PiZeroCombo piZeroCombos(signalPiZero_begin, signalPiZero_end, piZerosToBuild);
274  // Loop over the different combinations of PiZeros
275  for (PiZeroCombo::iterator piZeroCombo = piZeroCombos.begin(); piZeroCombo != piZeroCombos.end();
276  ++piZeroCombo) {
277  // Output tau
279  getPFCands(),
280  true,
286  // Reserve space in our collections
288  tau.reserve(RecoTauConstructor::kSignal, RecoTauConstructor::kGamma, 2 * piZerosToBuild); // k-factor = 2
289  tau.reservePiZero(RecoTauConstructor::kSignal, piZerosToBuild);
290 
292  trackCombo->combo_begin(),
293  trackCombo->combo_end(),
295 
296  PiZeroList precleanedIsolationPiZeros = isolationPiZeroXCleaner(piZeros);
297  std::set<reco::CandidatePtr> toRemove;
298  for (PiZeroCombo::combo_iterator signalPiZero = piZeroCombo->combo_begin();
299  signalPiZero != piZeroCombo->combo_end();
300  ++signalPiZero) {
301  toRemove.insert(signalPiZero->daughterPtrVector().begin(), signalPiZero->daughterPtrVector().end());
302  }
303  PiZeroList cleanIsolationPiZeros;
304  for (auto const& precleanedPiZero : precleanedIsolationPiZeros) {
305  std::set<reco::CandidatePtr> toCheck(precleanedPiZero.daughterPtrVector().begin(),
306  precleanedPiZero.daughterPtrVector().end());
307  std::vector<reco::CandidatePtr> cleanDaughters;
309  toCheck.begin(), toCheck.end(), toRemove.begin(), toRemove.end(), std::back_inserter(cleanDaughters));
310  // CV: piZero is signal piZero if at least one daughter overlaps
311  if (cleanDaughters.size() == precleanedPiZero.daughterPtrVector().size()) {
312  cleanIsolationPiZeros.push_back(precleanedPiZero);
313  }
314  }
315  if (verbosity_) {
316  std::cout << "#cleanIsolationPiZeros = " << cleanIsolationPiZeros.size() << std::endl;
317  int idx = 0;
318  for (PiZeroList::const_iterator piZero = cleanIsolationPiZeros.begin();
319  piZero != cleanIsolationPiZeros.end();
320  ++piZero) {
321  std::cout << "piZero #" << idx << ":" << std::endl;
322  piZero->print(std::cout);
323  ++idx;
324  }
325  }
326 
327  // FIXME - are all these reserves okay? will they get propagated to the
328  // dataformat size if they are wrong?
331  chargedHadrons.size() - tracksToBuild);
332  tau.reserve(
333  RecoTauConstructor::kIsolation, RecoTauConstructor::kGamma, (piZeros.size() - piZerosToBuild) * 2);
334  tau.reservePiZero(RecoTauConstructor::kIsolation, (piZeros.size() - piZerosToBuild));
335 
336  // Get signal PiZero constituents and add them to the tau.
337  // The sub-gammas are automatically added.
338  tau.addPiZeros(RecoTauConstructor::kSignal, piZeroCombo->combo_begin(), piZeroCombo->combo_end());
339 
340  // Set signal and isolation components for charged hadrons, after
341  // converting them to a PFCandidateRefVector
342  //
343  // NOTE: signal ChargedHadrons need to be added **after** signal PiZeros
344  // to avoid double-counting PFGammas as part of PiZero and merged with ChargedHadron
345  //
346  tau.addTauChargedHadrons(RecoTauConstructor::kSignal, trackCombo->combo_begin(), trackCombo->combo_end());
347 
348  // Now build isolation collections
349  // Load our isolation tools
350  using namespace reco::tau::cone;
351  CandPtrDRFilter isolationConeFilter(tau.p4(), -0.1, isolationConeSize_);
352 
353  // Cross cleaning predicate: Remove any PFCandidatePtrs that are contained within existing ChargedHadrons or PiZeros.
354  // The predicate will return false for any object that overlaps with chargedHadrons or cleanPiZeros.
355  // 1.) to select charged PFCandidates within jet that are not signalPFChargedHadrons
356  typedef xclean::CrossCleanPtrs<ChargedHadronCombo::combo_iterator> pfChargedHadronXCleanerType;
357  pfChargedHadronXCleanerType pfChargedHadronXCleaner_comboChargedHadrons(trackCombo->combo_begin(),
358  trackCombo->combo_end());
359  // And this cleaning filter predicate with our Iso cone filter
361  isolationConeFilter, pfChargedHadronXCleaner_comboChargedHadrons);
362  // 2.) to select neutral PFCandidates within jet
363  xclean::CrossCleanPtrs<ChargedHadronList::const_iterator> pfChargedHadronXCleaner_allChargedHadrons(
364  chargedHadrons.begin(), chargedHadrons.end());
365  xclean::CrossCleanPtrs<PiZeroList::const_iterator> piZeroXCleaner(piZeros.begin(), piZeros.end());
368  pfCandXCleanerType;
369  pfCandXCleanerType pfCandXCleaner_allChargedHadrons(pfChargedHadronXCleaner_allChargedHadrons,
370  piZeroXCleaner);
371  // And this cleaning filter predicate with our Iso cone filter
372  xclean::PredicateAND<CandPtrDRFilter, pfCandXCleanerType> pfCandFilter_allChargedHadrons(
373  isolationConeFilter, pfCandXCleaner_allChargedHadrons);
374 
375  ChargedHadronDRFilter isolationConeFilterChargedHadron(tau.p4(), -0.1, isolationConeSize_);
376  PiZeroDRFilter isolationConeFilterPiZero(tau.p4(), -0.1, isolationConeSize_);
377 
378  // Additionally make predicates to select the different PF object types
379  // of the regional junk objects to add
381 
382  xclean::FilterCandByAbsPdgId pfchCandSelector(211);
383  xclean::FilterCandByAbsPdgId pfgammaCandSelector(22);
384  xclean::FilterCandByAbsPdgId pfnhCandSelector(130);
385 
386  RegionalJunkConeAndIdFilter pfChargedJunk(pfchCandSelector, // select charged stuff from junk
387  isolationConeFilter); // only take those in iso cone
388 
389  RegionalJunkConeAndIdFilter pfGammaJunk(pfgammaCandSelector, // select gammas from junk
390  isolationConeFilter); // only take those in iso cone
391 
392  RegionalJunkConeAndIdFilter pfNeutralJunk(pfnhCandSelector, // select neutral stuff from junk
393  isolationConeFilter); // select stuff in iso cone
394 
396  boost::make_filter_iterator(
397  isolationConeFilterPiZero, cleanIsolationPiZeros.begin(), cleanIsolationPiZeros.end()),
398  boost::make_filter_iterator(
399  isolationConeFilterPiZero, cleanIsolationPiZeros.end(), cleanIsolationPiZeros.end()));
400 
401  // Filter the isolation candidates in a DR cone
402  //
403  // NOTE: isolation ChargedHadrons need to be added **after** signal and isolation PiZeros
404  // to avoid double-counting PFGammas as part of PiZero and merged with ChargedHadron
405  //
406  if (verbosity_ >= 2) {
407  std::cout << "adding isolation PFChargedHadrons from trackCombo:" << std::endl;
408  }
409  tau.addTauChargedHadrons(
411  boost::make_filter_iterator(
412  isolationConeFilterChargedHadron, trackCombo->remainder_begin(), trackCombo->remainder_end()),
413  boost::make_filter_iterator(
414  isolationConeFilterChargedHadron, trackCombo->remainder_end(), trackCombo->remainder_end()));
415 
416  // Add all the candidates that weren't included in the combinatoric
417  // generation
418  if (verbosity_ >= 2) {
419  std::cout << "adding isolation PFChargedHadrons not considered in trackCombo:" << std::endl;
420  }
423  boost::make_filter_iterator(pfCandFilter_comboChargedHadrons, pfch_end, pfchs.end()),
424  boost::make_filter_iterator(pfCandFilter_comboChargedHadrons, pfchs.end(), pfchs.end()));
425  // Add all charged candidates that are in the iso cone but weren't in the
426  // original PFJet
427  if (verbosity_ >= 2) {
428  std::cout << "adding isolation PFChargedHadrons from 'regional junk':" << std::endl;
429  }
432  boost::make_filter_iterator(pfChargedJunk, regionalJunk.begin(), regionalJunk.end()),
433  boost::make_filter_iterator(pfChargedJunk, regionalJunk.end(), regionalJunk.end()));
434 
435  // Add all PFGamma constituents of the jet that are not part of a PiZero
436  if (verbosity_ >= 2) {
437  std::cout << "adding isolation PFGammas not considered in PiZeros:" << std::endl;
438  }
439  tau.addPFCands(
442  boost::make_filter_iterator(pfCandFilter_allChargedHadrons, pfgammas.begin(), pfgammas.end()),
443  boost::make_filter_iterator(pfCandFilter_allChargedHadrons, pfgammas.end(), pfgammas.end()));
444  // Add all gammas that are in the iso cone but weren't in the
445  // orginal PFJet
448  boost::make_filter_iterator(pfGammaJunk, regionalJunk.begin(), regionalJunk.end()),
449  boost::make_filter_iterator(pfGammaJunk, regionalJunk.end(), regionalJunk.end()));
450 
451  // Add all the neutral hadron candidates to the isolation collection
454  boost::make_filter_iterator(pfCandFilter_allChargedHadrons, pfnhs.begin(), pfnhs.end()),
455  boost::make_filter_iterator(pfCandFilter_allChargedHadrons, pfnhs.end(), pfnhs.end()));
456  // Add all the neutral hadrons from the region collection that are in
457  // the iso cone to the tau
460  boost::make_filter_iterator(pfNeutralJunk, regionalJunk.begin(), regionalJunk.end()),
461  boost::make_filter_iterator(pfNeutralJunk, regionalJunk.end(), regionalJunk.end()));
462 
463  std::unique_ptr<reco::PFTau> tauPtr = tau.get(true);
464 
465  // Set event vertex position for tau
466  reco::VertexRef primaryVertexRef = primaryVertex(*tauPtr);
467  if (primaryVertexRef.isNonnull()) {
468  tauPtr->setVertex(primaryVertexRef->position());
469  }
470 
471  double tauEn = tauPtr->energy();
472  double tauPz = tauPtr->pz();
473  const double chargedPionMass = 0.13957; // GeV
474  double tauMass = std::max(tauPtr->mass(), chargedPionMass);
475  double bendCorrMass2 = 0.;
476  const std::vector<RecoTauPiZero>& piZeros = tauPtr->signalPiZeroCandidates();
477  for (auto const& piZero : piZeros) {
478  double piZeroEn = piZero.energy();
479  double piZeroPx = piZero.px();
480  double piZeroPy = piZero.py();
481  double piZeroPz = piZero.pz();
482  double tau_wo_piZeroPx = tauPtr->px() - piZeroPx;
483  double tau_wo_piZeroPy = tauPtr->py() - piZeroPy;
484  // CV: Compute effect of varying strip four-vector by eta and phi correction on tau mass
485  // (derrivative of tau mass by strip eta, phi has been computed using Mathematica)
486  bendCorrMass2 += square(((piZeroPz * tauEn - piZeroEn * tauPz) / tauMass) * piZero.bendCorrEta());
487  bendCorrMass2 +=
488  square(((piZeroPy * tau_wo_piZeroPx - piZeroPx * tau_wo_piZeroPy) / tauMass) * piZero.bendCorrPhi());
489  }
490  //edm::LogPrint("RecoTauBuilderCombinatoricPlugin") << "bendCorrMass2 = " << sqrt(bendCorrMass2) << std::endl;
491  tauPtr->setBendCorrMass(sqrt(bendCorrMass2));
492 
493  output.push_back(std::move(tauPtr));
494  }
495  }
496  }
497 
498  return output;
499  }
500 
501  } // namespace tau
502 } // namespace reco
503 
507  "RecoTauBuilderCombinatoricPlugin");
std::vector< CandidatePtr > pfCandidatesByPdgId(const Jet &jet, int pdgId, bool sort=true)
InputIterator takeNElements(const InputIterator &begin, const InputIterator &end, size_t N)
static const TGPicture * info(bool iBackgroundIsBlack)
std::vector< std::unique_ptr< reco::PFTau > > output_type
CombinatoricIterator< T > end()
std::vector< reco::PFRecoTauChargedHadron > ChargedHadronList
const edm::Handle< edm::View< reco::Candidate > > & getPFCands() const
Hack to be able to convert Ptrs to Refs.
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
RecoTauBuilderCombinatoricPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
assert(be >=bs)
std::vector< CandidatePtr > pfChargedCands(const Jet &jet, bool sort=true)
Extract all non-neutral candidates from a PFJet.
tau::CombinatoricGenerator< PiZeroList > PiZeroCombo
std::vector< CandidatePtr > flattenPiZeros(const std::vector< RecoTauPiZero >::const_iterator &, const std::vector< RecoTauPiZero >::const_iterator &)
Flatten a list of pi zeros into a list of there constituent PFCandidates.
reco::VertexRef primaryVertex(const reco::JetBaseRef &jet) const
Get primary vertex associated to this jet.
return_type operator()(const reco::JetBaseRef &, const std::vector< reco::PFRecoTauChargedHadron > &, const std::vector< RecoTauPiZero > &, const std::vector< CandidatePtr > &) const override
std::vector< reco::CandidatePtr > CandPtrs
T sqrt(T t)
Definition: SSEVec.h:19
void initialize(const PtrIter &chargedHadronsBegin, const PtrIter &chargedHadronsEnd)
tau::CombinatoricGenerator< ChargedHadronList > ChargedHadronCombo
std::vector< CandidatePtr > daughters
collection of references to daughters
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:25
double b
Definition: hdecay.h:120
static double square(double x)
ParameterSet const & getParameterSet(ParameterSetID const &id)
fixed size matrix
double a
Definition: hdecay.h:121
float x
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition: output.py:1
void initialize(const PtrIter &particlesBegin, const PtrIter &particlesEnd)
std::vector< std::string > set_difference(std::vector< std::string > const &v1, std::vector< std::string > const &v2)
std::vector< RecoTauPiZero > PiZeroList
def move(src, dest)
Definition: eostools.py:511
iterator::value_type::ValueIter combo_iterator
Transform a pizero to remove given candidates.
CombinatoricIterator< T > begin()