CMS 3D CMS Logo

RecoTauConstructor.cc
Go to the documentation of this file.
1 #include <memory>
2 
4 
7 
9 
11 
12 namespace reco::tau {
13 
15  const edm::Handle<edm::View<reco::Candidate> >& pfCands,
16  bool copyGammasFromPiZeros,
22  : signalConeSize_(signalConeSize),
23  minAbsPhotonSumPt_insideSignalCone_(minAbsPhotonSumPt_insideSignalCone),
24  minRelPhotonSumPt_insideSignalCone_(minRelPhotonSumPt_insideSignalCone),
25  minAbsPhotonSumPt_outsideSignalCone_(minAbsPhotonSumPt_outsideSignalCone),
26  minRelPhotonSumPt_outsideSignalCone_(minRelPhotonSumPt_outsideSignalCone),
27  pfCands_(pfCands) {
28  // Initialize tau
29  tau_.reset(new PFTau());
30 
31  copyGammas_ = copyGammasFromPiZeros;
32  // Initialize our Accessors
33  collections_[std::make_pair(kSignal, kChargedHadron)] = &tau_->selectedSignalChargedHadrCands_;
34  collections_[std::make_pair(kSignal, kGamma)] = &tau_->selectedSignalGammaCands_;
35  collections_[std::make_pair(kSignal, kNeutralHadron)] = &tau_->selectedSignalNeutrHadrCands_;
36  collections_[std::make_pair(kSignal, kAll)] = &tau_->selectedSignalCands_;
37 
38  collections_[std::make_pair(kIsolation, kChargedHadron)] = &tau_->selectedIsolationChargedHadrCands_;
39  collections_[std::make_pair(kIsolation, kGamma)] = &tau_->selectedIsolationGammaCands_;
40  collections_[std::make_pair(kIsolation, kNeutralHadron)] = &tau_->selectedIsolationNeutrHadrCands_;
41  collections_[std::make_pair(kIsolation, kAll)] = &tau_->selectedIsolationCands_;
42 
43  // Build our temporary sorted collections, since you can't use stl sorts on
44  // RefVectors
45  for (auto const& colkey : collections_) {
46  // Build an empty list for each collection
47  sortedCollections_[colkey.first] = std::make_shared<SortedListPtr::element_type>();
48  }
49 
50  tau_->setjetRef(jet);
51  }
52 
54  LogDebug("TauConstructorAddPFCand") << " region = " << region << ", type = " << type << ": Pt = " << ptr->pt()
55  << ", eta = " << ptr->eta() << ", phi = " << ptr->phi();
56  if (region == kSignal) {
57  // Keep track of the four vector of the signal vector products added so far.
58  // If a photon add it if we are not using PiZeros to build the gammas
59  if (((type != kGamma) || !copyGammas_) && !skipAddToP4) {
60  LogDebug("TauConstructorAddPFCand") << "--> adding PFCand to tauP4.";
61  p4_ += ptr->p4();
62  }
63  }
64  getSortedCollection(region, type)->push_back(ptr);
65  // Add to global collection
66  getSortedCollection(region, kAll)->push_back(ptr);
67  }
68 
70  getSortedCollection(region, type)->reserve(size);
71  getCollection(region, type)->reserve(size);
72  // Reserve global collection as well
75  }
76 
78  if (region == kSignal) {
79  tau_->signalTauChargedHadronCandidatesRestricted().reserve(size);
80  tau_->selectedSignalChargedHadrCands_.reserve(size);
81  } else {
82  tau_->isolationTauChargedHadronCandidatesRestricted().reserve(size);
83  tau_->selectedIsolationChargedHadrCands_.reserve(size);
84  }
85  }
86 
87  namespace {
88  void checkOverlap(const CandidatePtr& neutral, const std::vector<CandidatePtr>& pfGammas, bool& isUnique) {
89  LogDebug("TauConstructorCheckOverlap") << " pfGammas: #entries = " << pfGammas.size();
90  for (std::vector<CandidatePtr>::const_iterator pfGamma = pfGammas.begin(); pfGamma != pfGammas.end(); ++pfGamma) {
91  LogDebug("TauConstructorCheckOverlap") << "pfGamma = " << pfGamma->id() << ":" << pfGamma->key();
92  if ((*pfGamma).refCore() == neutral.refCore() && (*pfGamma).key() == neutral.key())
93  isUnique = false;
94  }
95  }
96 
97  void checkOverlap(const CandidatePtr& neutral, const std::vector<reco::RecoTauPiZero>& piZeros, bool& isUnique) {
98  LogDebug("TauConstructorCheckOverlap") << " piZeros: #entries = " << piZeros.size();
99  for (std::vector<reco::RecoTauPiZero>::const_iterator piZero = piZeros.begin(); piZero != piZeros.end();
100  ++piZero) {
101  size_t numPFGammas = piZero->numberOfDaughters();
102  for (size_t iPFGamma = 0; iPFGamma < numPFGammas; ++iPFGamma) {
103  reco::CandidatePtr pfGamma = piZero->daughterPtr(iPFGamma);
104  LogDebug("TauConstructorCheckOverlap") << "pfGamma = " << pfGamma.id() << ":" << pfGamma.key();
105  if (pfGamma.id() == neutral.id() && pfGamma.key() == neutral.key())
106  isUnique = false;
107  }
108  }
109  }
110  } // namespace
111 
113  LogDebug("TauConstructorAddChH") << " region = " << region << ": Pt = " << chargedHadron.pt()
114  << ", eta = " << chargedHadron.eta() << ", phi = " << chargedHadron.phi();
115  // CV: need to make sure that PFGammas merged with ChargedHadrons are not part of PiZeros
116  const std::vector<CandidatePtr>& neutrals = chargedHadron.getNeutralPFCandidates();
117  std::vector<CandidatePtr> neutrals_cleaned;
118  for (std::vector<CandidatePtr>::const_iterator neutral = neutrals.begin(); neutral != neutrals.end(); ++neutral) {
119  LogDebug("TauConstructorAddChH") << "neutral = " << neutral->id() << ":" << neutral->key();
120  bool isUnique = true;
121  if (copyGammas_)
122  checkOverlap(*neutral, *getSortedCollection(kSignal, kGamma), isUnique);
123  else
124  checkOverlap(*neutral, tau_->signalPiZeroCandidatesRestricted(), isUnique);
125  if (region == kIsolation) {
126  if (copyGammas_)
127  checkOverlap(*neutral, *getSortedCollection(kIsolation, kGamma), isUnique);
128  else
129  checkOverlap(*neutral, tau_->isolationPiZeroCandidatesRestricted(), isUnique);
130  }
131  LogDebug("TauConstructorAddChH") << "--> isUnique = " << isUnique;
132  if (isUnique)
133  neutrals_cleaned.push_back(*neutral);
134  }
135  PFRecoTauChargedHadron chargedHadron_cleaned = chargedHadron;
136  if (neutrals_cleaned.size() != neutrals.size()) {
137  chargedHadron_cleaned.neutralPFCandidates_ = neutrals_cleaned;
138  setChargedHadronP4(chargedHadron_cleaned);
139  }
140  if (region == kSignal) {
141  tau_->signalTauChargedHadronCandidatesRestricted().push_back(chargedHadron_cleaned);
142  p4_ += chargedHadron_cleaned.p4();
143  if (chargedHadron_cleaned.getChargedPFCandidate().isNonnull()) {
144  addPFCand(kSignal, kChargedHadron, convertToPtr(chargedHadron_cleaned.getChargedPFCandidate()), true);
145  }
146  const std::vector<CandidatePtr>& neutrals = chargedHadron_cleaned.getNeutralPFCandidates();
147  for (std::vector<CandidatePtr>::const_iterator neutral = neutrals.begin(); neutral != neutrals.end(); ++neutral) {
148  if (std::abs((*neutral)->pdgId()) == 22)
149  addPFCand(kSignal, kGamma, convertToPtr(*neutral), true);
150  else if (std::abs((*neutral)->pdgId()) == 130)
151  addPFCand(kSignal, kNeutralHadron, convertToPtr(*neutral), true);
152  };
153  } else {
154  tau_->isolationTauChargedHadronCandidatesRestricted().push_back(chargedHadron_cleaned);
155  if (chargedHadron_cleaned.getChargedPFCandidate().isNonnull()) {
156  if (std::abs(chargedHadron_cleaned.getChargedPFCandidate()->pdgId()) == 211)
158  else if (std::abs(chargedHadron_cleaned.getChargedPFCandidate()->pdgId()) == 130)
160  }
161  const std::vector<CandidatePtr>& neutrals = chargedHadron_cleaned.getNeutralPFCandidates();
162  for (std::vector<CandidatePtr>::const_iterator neutral = neutrals.begin(); neutral != neutrals.end(); ++neutral) {
163  if (std::abs((*neutral)->pdgId()) == 22)
165  else if (std::abs((*neutral)->pdgId()) == 130)
167  };
168  }
169  }
170 
172  if (region == kSignal) {
173  tau_->signalPiZeroCandidatesRestricted().reserve(size);
174  // If we are building the gammas with the pizeros, resize that
175  // vector as well
176  if (copyGammas_)
177  reserve(kSignal, kGamma, 2 * size);
178  } else {
179  tau_->isolationPiZeroCandidatesRestricted().reserve(size);
180  if (copyGammas_)
181  reserve(kIsolation, kGamma, 2 * size);
182  }
183  }
184 
186  LogDebug("TauConstructorAddPi0") << " region = " << region << ": Pt = " << piZero.pt() << ", eta = " << piZero.eta()
187  << ", phi = " << piZero.phi();
188  if (region == kSignal) {
189  tau_->signalPiZeroCandidatesRestricted().push_back(piZero);
190  // Copy the daughter gammas into the gamma collection if desired
191  if (copyGammas_) {
192  // If we are using the pizeros to build the gammas, make sure we update
193  // the four vector correctly.
194  p4_ += piZero.p4();
195  addPFCands(kSignal, kGamma, piZero.daughterPtrVector().begin(), piZero.daughterPtrVector().end());
196  }
197  } else {
198  tau_->isolationPiZeroCandidatesRestricted().push_back(piZero);
199  if (copyGammas_) {
200  addPFCands(kIsolation, kGamma, piZero.daughterPtrVector().begin(), piZero.daughterPtrVector().end());
201  }
202  }
203  }
204 
206  return collections_[std::make_pair(region, type)];
207  }
208 
210  return sortedCollections_[std::make_pair(region, type)];
211  }
212 
213  // Trivial converter needed for polymorphism
214  CandidatePtr RecoTauConstructor::convertToPtr(const CandidatePtr& pfPtr) const { return pfPtr; }
215 
216  namespace {
217  // Make sure the two products come from the same EDM source
218  template <typename T1, typename T2>
219  void checkMatchedProductIds(const T1& t1, const T2& t2) {
220  if (t1.id() != t2.id()) {
221  throw cms::Exception("MismatchedPFCandSrc")
222  << "Error: the input tag"
223  << " for the PF candidate collection provided to the RecoTauBuilder "
224  << " does not match the one that was used to build the source jets."
225  << " Please update the pfCandSrc paramters for the PFTau builders.";
226  }
227  }
228  } // namespace
229 
230  // Convert from a CandidateRef to a Ptr
232  if (candPtr.isNonnull()) {
233  checkMatchedProductIds(candPtr, pfCands_);
234  return CandidatePtr(pfCands_, candPtr.key());
235  } else
236  return PFCandidatePtr();
237  }
238 
239  namespace {
240  template <typename T>
241  bool ptDescending(const T& a, const T& b) {
242  return a.pt() > b.pt();
243  }
244  template <typename T>
245  bool ptDescendingPtr(const T& a, const T& b) {
246  return a->pt() > b->pt();
247  }
248  } // namespace
249 
251  // The charged hadrons and pizeros are a special case, as we can sort them in situ
252  std::sort(tau_->signalTauChargedHadronCandidatesRestricted().begin(),
253  tau_->signalTauChargedHadronCandidatesRestricted().end(),
254  ptDescending<PFRecoTauChargedHadron>);
255  std::sort(tau_->isolationTauChargedHadronCandidatesRestricted().begin(),
256  tau_->isolationTauChargedHadronCandidatesRestricted().end(),
257  ptDescending<PFRecoTauChargedHadron>);
258  std::sort(tau_->signalPiZeroCandidatesRestricted().begin(),
259  tau_->signalPiZeroCandidatesRestricted().end(),
260  ptDescending<RecoTauPiZero>);
261  std::sort(tau_->isolationPiZeroCandidatesRestricted().begin(),
262  tau_->isolationPiZeroCandidatesRestricted().end(),
263  ptDescending<RecoTauPiZero>);
264 
265  // Sort each of our sortable collections, and copy them into the final
266  // tau RefVector.
267  for (auto const& colkey : collections_) {
268  SortedListPtr sortedCollection = sortedCollections_[colkey.first];
269  std::sort(sortedCollection->begin(), sortedCollection->end(), ptDescendingPtr<CandidatePtr>);
270  // Copy into the real tau collection
271  for (std::vector<CandidatePtr>::const_iterator particle = sortedCollection->begin();
272  particle != sortedCollection->end();
273  ++particle) {
274  colkey.second->push_back(*particle);
275  }
276  }
277  }
278 
279  namespace {
280  PFTau::hadronicDecayMode calculateDecayMode(const reco::PFTau& tau,
281  double dRsignalCone,
286  unsigned int nCharged = tau.signalTauChargedHadronCandidates().size();
287  // If no tracks exist, this is definitely not a tau!
288  if (!nCharged)
289  return PFTau::kNull;
290 
291  unsigned int nPiZeros = 0;
292  const std::vector<RecoTauPiZero>& piZeros = tau.signalPiZeroCandidates();
293  for (std::vector<RecoTauPiZero>::const_iterator piZero = piZeros.begin(); piZero != piZeros.end(); ++piZero) {
294  double photonSumPt_insideSignalCone = 0.;
295  double photonSumPt_outsideSignalCone = 0.;
296  int numPhotons = piZero->numberOfDaughters();
297  for (int idxPhoton = 0; idxPhoton < numPhotons; ++idxPhoton) {
298  const reco::Candidate* photon = piZero->daughter(idxPhoton);
299  double dR = deltaR(photon->p4(), tau.p4());
300  if (dR < dRsignalCone) {
301  photonSumPt_insideSignalCone += photon->pt();
302  } else {
303  photonSumPt_outsideSignalCone += photon->pt();
304  }
305  }
306  if (photonSumPt_insideSignalCone > minAbsPhotonSumPt_insideSignalCone ||
307  photonSumPt_insideSignalCone > (minRelPhotonSumPt_insideSignalCone * tau.pt()) ||
308  photonSumPt_outsideSignalCone > minAbsPhotonSumPt_outsideSignalCone ||
309  photonSumPt_outsideSignalCone > (minRelPhotonSumPt_outsideSignalCone * tau.pt()))
310  ++nPiZeros;
311  }
312 
313  // Find the maximum number of PiZeros our parameterization can hold
314  const unsigned int maxPiZeros = PFTau::kOneProngNPiZero;
315 
316  // Determine our track index
317  unsigned int trackIndex = (nCharged - 1) * (maxPiZeros + 1);
318 
319  // Check if we handle the given number of tracks
320  if (trackIndex >= PFTau::kRareDecayMode)
321  return PFTau::kRareDecayMode;
322 
323  if (nPiZeros > maxPiZeros)
325  return static_cast<PFTau::hadronicDecayMode>(trackIndex + nPiZeros);
326  }
327  } // namespace
328 
329  std::unique_ptr<reco::PFTau> RecoTauConstructor::get(bool setupLeadingObjects) {
330  LogDebug("TauConstructorGet") << "Start getting";
331 
332  // Copy the sorted collections into the interal tau refvectors
334 
335  // Setup all the important member variables of the tau
336  // Set charge of tau
337  // tau_->setCharge(
338  // sumPFCandCharge(getCollection(kSignal, kChargedHadron)->begin(),
339  // getCollection(kSignal, kChargedHadron)->end()));
340  // CV: take charge of highest pT charged hadron as charge of tau,
341  // in case tau does not have three reconstructed tracks
342  // (either because tau is reconstructed as 2prong or because PFRecoTauChargedHadron is built from a PFNeutralHadron)
343  unsigned int nCharged = 0;
344  int charge = 0;
345  double leadChargedHadronPt = 0.;
346  int leadChargedHadronCharge = 0;
347  for (std::vector<PFRecoTauChargedHadron>::const_iterator chargedHadron =
348  tau_->signalTauChargedHadronCandidatesRestricted().begin();
349  chargedHadron != tau_->signalTauChargedHadronCandidatesRestricted().end();
350  ++chargedHadron) {
353  ++nCharged;
354  charge += chargedHadron->charge();
355  if (chargedHadron->pt() > leadChargedHadronPt) {
356  leadChargedHadronPt = chargedHadron->pt();
357  leadChargedHadronCharge = chargedHadron->charge();
358  }
359  }
360  }
361  if (nCharged == 3)
362  tau_->setCharge(charge);
363  else
364  tau_->setCharge(leadChargedHadronCharge);
365 
366  // Set PDG id
367  tau_->setPdgId(tau_->charge() < 0 ? 15 : -15);
368 
369  // Set P4
370  tau_->setP4(p4_);
371 
372  // Set Decay Mode
373  double dRsignalCone = (signalConeSize_) ? (*signalConeSize_)(*tau_) : 0.5;
374  tau_->setSignalConeSize(dRsignalCone);
375  PFTau::hadronicDecayMode dm = calculateDecayMode(*tau_,
376  dRsignalCone,
381  tau_->setDecayMode(dm);
382 
383  LogDebug("TauConstructorGet") << "Pt = " << tau_->pt() << ", eta = " << tau_->eta() << ", phi = " << tau_->phi()
384  << ", mass = " << tau_->mass() << ", dm = " << tau_->decayMode();
385 
386  // Set charged isolation quantities
387  tau_->setisolationPFChargedHadrCandsPtSum(sumPFCandPt(getCollection(kIsolation, kChargedHadron)->begin(),
389 
390  // Set gamma isolation quantities
391  tau_->setisolationPFGammaCandsEtSum(
393 
394  // Set em fraction
396  tau_->pt());
397 
398  if (setupLeadingObjects) {
399  typedef std::vector<CandidatePtr>::const_iterator Iter;
400  // Find the highest PT object in the signal cone
401  Iter leadingCand = leadCand(getCollection(kSignal, kAll)->begin(), getCollection(kSignal, kAll)->end());
402 
403  if (leadingCand != getCollection(kSignal, kAll)->end())
404  tau_->setleadCand(*leadingCand);
405 
406  // Hardest charged object in signal cone
407  Iter leadingChargedCand =
409 
410  if (leadingChargedCand != getCollection(kSignal, kChargedHadron)->end())
411  tau_->setleadChargedHadrCand(*leadingChargedCand);
412 
413  // Hardest gamma object in signal cone
414  Iter leadingGammaCand = leadCand(getCollection(kSignal, kGamma)->begin(), getCollection(kSignal, kGamma)->end());
415 
416  if (leadingGammaCand != getCollection(kSignal, kGamma)->end())
417  tau_->setleadNeutralCand(*leadingGammaCand);
418  }
419  return std::move(tau_);
420  }
421 } // end namespace reco::tau
RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
muons2muons_cfi.photon
photon
Definition: muons2muons_cfi.py:28
reco::PFTau::kNull
Definition: PFTau.h:39
reco::tau::RecoTauConstructor::minAbsPhotonSumPt_insideSignalCone_
double minAbsPhotonSumPt_insideSignalCone_
Definition: RecoTauConstructor.h:137
reco::tau::RecoTauConstructor::collections_
CollectionMap collections_
Definition: RecoTauConstructor.h:155
reco::tau::RecoTauConstructor::signalConeSize_
const StringObjectFunction< reco::PFTau > * signalConeSize_
Definition: RecoTauConstructor.h:136
StringObjectFunction< reco::PFTau >
reco::PFCandidatePtr
edm::Ptr< PFCandidate > PFCandidatePtr
persistent Ptr to a PFCandidate
Definition: PFCandidateFwd.h:27
reco::tau::RecoTauConstructor::kAll
Definition: RecoTauConstructor.h:44
metsig::tau
Definition: SignAlgoResolutions.h:49
reco::tau::RecoTauConstructor::kSignal
Definition: RecoTauConstructor.h:42
HLT_2018_cff.maxPiZeros
maxPiZeros
Definition: HLT_2018_cff.py:31797
reco::tau::RecoTauConstructor::addPFCand
void addPFCand(Region region, ParticleType type, const CandidatePtr &ptr, bool skipAddToP4=false)
Append a PFCandidateRef/Ptr to a given collection.
Definition: RecoTauConstructor.cc:53
muons2muons_cfi.chargedHadron
chargedHadron
Definition: muons2muons_cfi.py:26
reco::tau::RecoTauConstructor::reservePiZero
void reservePiZero(Region region, size_t size)
Reserve a set amount of space for the PiZeros.
Definition: RecoTauConstructor.cc:171
edm::Ptr::refCore
RefCore const & refCore() const
Definition: Ptr.h:167
reco::tau::RecoTauConstructor::ParticleType
ParticleType
Definition: RecoTauConstructor.h:44
HLT_2018_cff.nCharged
nCharged
Definition: HLT_2018_cff.py:31800
RecoTauConstructor.h
reco::CompositePtrCandidate::daughterPtrVector
virtual const daughters & daughterPtrVector() const
references to daughtes
Definition: CompositePtrCandidate.h:63
reco::tau::leadCand
InputIterator leadCand(InputIterator begin, InputIterator end)
Definition: RecoTauCommonUtilities.h:138
reco::tau::RecoTauConstructor::copyGammas_
bool copyGammas_
Definition: RecoTauConstructor.h:134
reco::PFTau
Definition: PFTau.h:36
reco::PFRecoTauChargedHadron::getNeutralPFCandidates
const std::vector< CandidatePtr > & getNeutralPFCandidates() const
references to additional neutral PFCandidates
Definition: PFRecoTauChargedHadron.cc:46
reco::tau::RecoTauConstructor::RecoTauConstructor
RecoTauConstructor(const JetBaseRef &jetRef, const edm::Handle< edm::View< reco::Candidate > > &pfCands, bool copyGammasFromPiZeros=false, const StringObjectFunction< reco::PFTau > *signalConeSize=nullptr, double minAbsPhotonSumPt_insideSignalCone=2.5, double minRelPhotonSumPt_insideSignalCone=0., double minAbsPhotonSumPt_outsideSignalCone=1.e+9, double minRelPhotonSumPt_outsideSignalCone=1.e+9)
Constructor with PFCandidate Handle.
Definition: RecoTauConstructor.cc:14
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
HLT_2018_cff.signalConeSize
signalConeSize
Definition: HLT_2018_cff.py:31878
reco::PFTau::kRareDecayMode
Definition: PFTau.h:55
edm::Ptr::key
key_type key() const
Definition: Ptr.h:163
edm::Handle
Definition: AssociativeIterator.h:50
HLT_2018_cff.minRelPhotonSumPt_outsideSignalCone
minRelPhotonSumPt_outsideSignalCone
Definition: HLT_2018_cff.py:31837
reco::tau::RecoTauConstructor::sortedCollections_
SortedCollectionMap sortedCollections_
Definition: RecoTauConstructor.h:158
end
#define end
Definition: vmac.h:39
reco::PFRecoTauChargedHadron
Definition: PFRecoTauChargedHadron.h:23
reco::tau::RecoTauConstructor::addTauChargedHadron
void addTauChargedHadron(Region region, const PFRecoTauChargedHadron &chargedHadron)
Add a ChargedHadron to the given collection.
Definition: RecoTauConstructor.cc:112
deltaR.h
reco::tau::RecoTauConstructor::kGamma
Definition: RecoTauConstructor.h:44
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
reco::tau::setChargedHadronP4
void setChargedHadronP4(reco::PFRecoTauChargedHadron &chargedHadron, double scaleFactor_neutralPFCands=1.0)
Definition: pfRecoTauChargedHadronAuxFunctions.cc:31
HLT_2018_cff.minAbsPhotonSumPt_outsideSignalCone
minAbsPhotonSumPt_outsideSignalCone
Definition: HLT_2018_cff.py:31835
reco::tau::RecoTauConstructor::addPiZero
void addPiZero(Region region, const RecoTauPiZero &piZero)
Add a PiZero to the given collection.
Definition: RecoTauConstructor.cc:185
reco::PFRecoTauChargedHadron::getChargedPFCandidate
const CandidatePtr & getChargedPFCandidate() const
reference to "charged" PFCandidate (either charged PFCandidate or PFNeutralHadron)
Definition: PFRecoTauChargedHadron.cc:40
reco::tau::RecoTauConstructor::get
std::unique_ptr< reco::PFTau > get(bool setupLeadingCandidates=true)
Definition: RecoTauConstructor.cc:329
reco::tau::RecoTauConstructor::p4_
reco::Candidate::LorentzVector p4_
Definition: RecoTauConstructor.h:161
RecoTauCommonUtilities.h
reco::tau::RecoTauConstructor::Region
Region
Definition: RecoTauConstructor.h:42
b
double b
Definition: hdecay.h:118
reco::tau::RecoTauConstructor::addPFCands
void addPFCands(Region region, ParticleType type, const InputIterator &begin, const InputIterator &end)
Definition: RecoTauConstructor.h:88
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
edm::View
Definition: CaloClusterFwd.h:14
reco::tau::pfGammas
std::vector< CandidatePtr > pfGammas(const Jet &jet, bool sort=true)
Extract all pfGammas from a PFJet.
Definition: RecoTauCommonUtilities.cc:91
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
a
double a
Definition: hdecay.h:119
reco::tau::RecoTauConstructor::tau_
std::unique_ptr< reco::PFTau > tau_
Definition: RecoTauConstructor.h:154
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
reco::tau::RecoTauConstructor::minRelPhotonSumPt_insideSignalCone_
double minRelPhotonSumPt_insideSignalCone_
Definition: RecoTauConstructor.h:138
reco::PFRecoTauChargedHadron::kChargedPFCandidate
Definition: PFRecoTauChargedHadron.h:30
reco::tau::RecoTauConstructor::SortedListPtr
std::shared_ptr< std::vector< CandidatePtr > > SortedListPtr
Definition: RecoTauConstructor.h:131
g4TestGeometry_cfi.checkOverlap
def checkOverlap(process)
Definition: g4TestGeometry_cfi.py:3
reco::tau::RecoTauConstructor::kIsolation
Definition: RecoTauConstructor.h:42
RefToPtr.h
reco::LeafCandidate::p4
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:114
reco::tau::RecoTauConstructor::kChargedHadron
Definition: RecoTauConstructor.h:44
symbols.dm
dm
Definition: symbols.py:66
reco::tau::RecoTauConstructor::getCollection
std::vector< CandidatePtr > * getCollection(Region region, ParticleType type)
Definition: RecoTauConstructor.cc:205
reco::tau::RecoTauConstructor::kNeutralHadron
Definition: RecoTauConstructor.h:44
reco::tau::RecoTauConstructor::sortAndCopyIntoTau
void sortAndCopyIntoTau()
Definition: RecoTauConstructor.cc:250
edm::Ptr< Candidate >
reco::Candidate
Definition: Candidate.h:27
reco::PFRecoTauChargedHadron::neutralPFCandidates_
std::vector< CandidatePtr > neutralPFCandidates_
Definition: PFRecoTauChargedHadron.h:88
HLT_2018_cff.nPiZeros
nPiZeros
Definition: HLT_2018_cff.py:31799
reco::tau::RecoTauConstructor::getSortedCollection
SortedListPtr getSortedCollection(Region region, ParticleType type)
Definition: RecoTauConstructor.cc:209
reco::RecoTauPiZero
Definition: RecoTauPiZero.h:7
reco::tau::RecoTauConstructor::reserveTauChargedHadron
void reserveTauChargedHadron(Region region, size_t size)
Reserve a set amount of space for the ChargedHadrons.
Definition: RecoTauConstructor.cc:77
type
type
Definition: HCALResponse.h:21
HLT_2018_cff.minRelPhotonSumPt_insideSignalCone
minRelPhotonSumPt_insideSignalCone
Definition: HLT_2018_cff.py:31301
reco::tau::RecoTauConstructor::convertToPtr
CandidatePtr convertToPtr(const PFCandidatePtr &pfPtr) const
Definition: RecoTauConstructor.cc:231
reco::PFTau::kOneProngNPiZero
Definition: PFTau.h:44
eostools.move
def move(src, dest)
Definition: eostools.py:511
reco::tau::RecoTauConstructor::minRelPhotonSumPt_outsideSignalCone_
double minRelPhotonSumPt_outsideSignalCone_
Definition: RecoTauConstructor.h:140
boostedElectronIsolation_cff.pfGamma
pfGamma
Definition: boostedElectronIsolation_cff.py:91
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition: LeafCandidate.h:148
reco::tau::RecoTauConstructor::minAbsPhotonSumPt_outsideSignalCone_
double minAbsPhotonSumPt_outsideSignalCone_
Definition: RecoTauConstructor.h:139
T
long double T
Definition: Basic3DVectorLD.h:48
metsig::jet
Definition: SignAlgoResolutions.h:47
reco::tau::RecoTauConstructor::reserve
void reserve(Region region, ParticleType type, size_t size)
Reserve a set amount of space for a given RefVector.
Definition: RecoTauConstructor.cc:69
Exception
Definition: hltDiff.cc:246
reco::PFTau::hadronicDecayMode
hadronicDecayMode
Definition: PFTau.h:38
HLT_2018_cff.region
region
Definition: HLT_2018_cff.py:81479
reco::deltaR
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
edm::Ptr::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:146
edm::RefToBase< Jet >
pfRecoTauChargedHadronAuxFunctions.h
reco::tau::RecoTauConstructor::pfCands_
const edm::Handle< edm::View< reco::Candidate > > & pfCands_
Definition: RecoTauConstructor.h:153
RecoPFTauTag_cff.PFTau
PFTau
Definition: RecoPFTauTag_cff.py:123
reco::CandidatePtr
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:25
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HGC3DClusterGenMatchSelector_cfi.dR
dR
Definition: HGC3DClusterGenMatchSelector_cfi.py:7
reco::tau
Definition: PFRecoTauChargedHadron.h:11
begin
#define begin
Definition: vmac.h:32
HLT_2018_cff.minAbsPhotonSumPt_insideSignalCone
minAbsPhotonSumPt_insideSignalCone
Definition: HLT_2018_cff.py:31265
reco::tau::sumPFCandPt
double sumPFCandPt(InputIterator begin, InputIterator end)
Sum the pT of a collection of PFCandidates.
Definition: RecoTauCommonUtilities.h:127
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
reco::PFRecoTauChargedHadron::kTrack
Definition: PFRecoTauChargedHadron.h:31