CMS 3D CMS Logo

Namespaces | Classes | Typedefs | Enumerations | Functions
reco::tau Namespace Reference

Namespaces

 cone
 
 qcuts
 
 xclean
 

Classes

class  Combinatoric
 
class  CombinatoricGenerator
 
class  CombinatoricIterator
 
class  PATTauDiscriminationByMVAIsolationRun2
 
class  PFRecoTauChargedHadronBuilderPlugin
 
class  PFRecoTauChargedHadronFromGenericTrackPlugin
 
class  PFRecoTauChargedHadronFromPFCandidatePlugin
 
class  PFRecoTauChargedHadronQualityPlugin
 
class  PFRecoTauChargedHadronStringQuality
 
class  PFRecoTauDiscriminationByMVAIsolationRun2
 
class  PFRecoTauEnergyAlgorithmPlugin
 
class  PFRecoTauMassPlugin
 
class  RecoTauBuilderCombinatoricPlugin
 
class  RecoTauBuilderConePlugin
 
class  RecoTauBuilderPlugin
 
class  RecoTauChargeCleanerPlugin
 
class  RecoTauChargedHadronMultiplicityCleanerPlugin
 
class  RecoTauCleanerPlugin
 
class  RecoTauConstructor
 
class  RecoTauDiscriminantCleanerPlugin
 
class  RecoTauElectronRejectionPlugin
 
class  RecoTauEnergyRecoveryPlugin2
 
class  RecoTauEventHolderPlugin
 
class  RecoTauImpactParameterSignificancePlugin
 
class  RecoTauLexicographicalRanking
 
class  RecoTauModifierPlugin
 
class  RecoTauNamedPlugin
 
class  RecoTauPiZeroBuilderPlugin
 
class  RecoTauPiZeroCombinatoricPlugin
 
class  RecoTauPiZeroQualityPlugin
 
class  RecoTauPiZeroStringQuality
 
class  RecoTauPiZeroStripPlugin
 
class  RecoTauPiZeroStripPlugin2
 
class  RecoTauPiZeroStripPlugin3
 
class  RecoTauPiZeroTrivialPlugin
 
class  RecoTauQualityCuts
 
class  RecoTauSoftTwoProngTausCleanerPlugin
 
class  RecoTauStringCleanerPlugin
 
class  RecoTauTagInfoWorkaroundModifer
 
class  RecoTauTwoProngFilter
 
class  RecoTauVertexAssociator
 
class  SortByDescendingPt
 
class  SortPFCandsDescendingPt
 

Typedefs

typedef tau::CombinatoricGenerator< ChargedHadronListChargedHadronCombo
 
typedef std::vector< reco::PFRecoTauChargedHadronChargedHadronList
 
typedef PFRecoTauChargedHadronFromGenericTrackPlugin< pat::PackedCandidatePFRecoTauChargedHadronFromLostTrackPlugin
 
typedef PFRecoTauChargedHadronFromGenericTrackPlugin< reco::TrackPFRecoTauChargedHadronFromTrackPlugin
 
typedef tau::CombinatoricGenerator< PiZeroListPiZeroCombo
 
typedef std::vector< RecoTauPiZeroPiZeroList
 

Enumerations

enum  {
  kOldDMwoLT, kOldDMwLT, kNewDMwoLT, kNewDMwLT,
  kDBoldDMwLT, kDBnewDMwLT, kPWoldDMwLT, kPWnewDMwLT,
  kDBoldDMwLTwGJ, kDBnewDMwLTwGJ
}
 

Functions

math::XYZPointF atECALEntrance (const reco::Candidate *part, double bField)
 
template<typename RefVectorType , typename BaseView >
RefVectorType castView (const edm::Handle< BaseView > &view)
 Convert a BaseView (View<T>) to a TRefVector. More...
 
unsigned int chargedHadronsInDecayMode (PFTau::hadronicDecayMode mode)
 Reverse mapping of decay modes into multiplicities. More...
 
template<typename Container , class OverlapFunction >
Container cleanOverlaps (const Container &dirty)
 
reco::Candidate::LorentzVector compChargedHadronP4fromPThetaPhi (double, double, double)
 
reco::Candidate::LorentzVector compChargedHadronP4fromPxPyPz (double, double, double)
 
void countHits (const reco::Muon &muon, std::vector< int > &numHitsDT, std::vector< int > &numHitsCSC, std::vector< int > &numHitsRPC)
 
void countMatches (const reco::Muon &muon, std::vector< int > &numMatchesDT, std::vector< int > &numMatchesCSC, std::vector< int > &numMatchesRPC)
 
float eratio (const pat::Tau &tau)
 
float eratio (const reco::PFTau &tau)
 return ratio of energy in ECAL over sum of energy in ECAL and HCAL More...
 
std::pair< edm::ParameterSet, edm::ParameterSetfactorizePUQCuts (const edm::ParameterSet &inputSet)
 
bool fillIsoMVARun2Inputs (float *mvaInput, const pat::Tau &tau, int mvaOpt, const std::string &nameCharged, const std::string &nameNeutral, const std::string &namePu, const std::string &nameOutside, const std::string &nameFootprint)
 
template<typename Iterator >
std::vector< CandidatePtrfilterPFCandidates (const Iterator &begin, const Iterator &end, int pdgId, bool sort=true)
 
std::vector< CandidatePtrflattenPiZeros (const std::vector< RecoTauPiZero > &)
 
std::vector< CandidatePtrflattenPiZeros (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. More...
 
std::string format_vint (const std::vector< int > &vi)
 
PFTau::hadronicDecayMode getDecayMode (const reco::GenJet *genJet)
 
const reco::TrackgetTrackFromChargedHadron (const reco::PFRecoTauChargedHadron &chargedHadron)
 
template<class Base >
bool isPtrEqual (const edm::Ptr< Base > &b, const edm::Ptr< Base > &d)
 
template<class Base , class Der >
bool isPtrEqual (const edm::Ptr< Base > &b, const edm::Ptr< Der > &d)
 
float lead_track_chi2 (const reco::PFTau &tau)
 return chi2 of the leading track ==> deprecated? <== More...
 
template<typename InputIterator >
InputIterator leadCand (InputIterator begin, InputIterator end)
 
unsigned int n_photons_total (const pat::Tau &tau)
 
unsigned int n_photons_total (const reco::PFTau &tau)
 return total number of pf photon candidates with pT>500 MeV, which are associated to signal More...
 
std::vector< CandidatePtrpfCandidates (const Jet &jet, const std::vector< int > &particleIds, bool sort=true)
 Extract pfCandidates of a that match a list of particle Ids from a PFJet. More...
 
std::vector< CandidatePtrpfCandidates (const Jet &jet, int particleId, bool sort=true)
 
std::vector< CandidatePtrpfCandidatesByPdgId (const Jet &jet, const std::vector< int > &pdgIds, bool sort=true)
 Extract pfCandidates of a that match a list of PDG Ids from a PFJet. More...
 
std::vector< CandidatePtrpfCandidatesByPdgId (const Jet &jet, int pdgId, bool sort=true)
 
std::vector< CandidatePtrpfChargedCands (const Jet &jet, bool sort=true)
 Extract all non-neutral candidates from a PFJet. More...
 
std::vector< CandidatePtrpfGammas (const Jet &jet, bool sort=true)
 Extract all pfGammas from a PFJet. More...
 
unsigned int piZerosInDecayMode (PFTau::hadronicDecayMode mode)
 
float pt_weighted_deta_strip (const pat::Tau &tau, int dm)
 
float pt_weighted_deta_strip (const reco::PFTau &tau, int dm)
 
float pt_weighted_dphi_strip (const pat::Tau &tau, int dm)
 
float pt_weighted_dphi_strip (const reco::PFTau &tau, int dm)
 
float pt_weighted_dr_iso (const pat::Tau &tau, int dm)
 
float pt_weighted_dr_iso (const reco::PFTau &tau, int dm)
 
float pt_weighted_dr_signal (const pat::Tau &tau, int dm)
 
float pt_weighted_dr_signal (const reco::PFTau &tau, int dm)
 
float pt_weighted_dx (const pat::Tau &tau, int mode=0, int var=0, int decaymode=-1)
 
float pt_weighted_dx (const reco::PFTau &tau, int mode=0, int var=0, int decaymode=-1)
 
template<typename T >
float pt_weighted_dx_T (const typename T::Tau_t &tau, int mode, int var, int decaymode)
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< PATTauDiscriminationByMVAIsolationRun2 > > s_filler__LINE__ ("PATTauDiscriminationByMVAIsolationRun2")
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< PFRecoTauDiscriminationByMVAIsolationRun2 > > s_filler__LINE__ ("PFRecoTauDiscriminationByMVAIsolationRun2")
 
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< PATTauDiscriminationByMVAIsolationRun2 > > s_maker__LINE__ ("PATTauDiscriminationByMVAIsolationRun2")
 
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< PFRecoTauDiscriminationByMVAIsolationRun2 > > s_maker__LINE__ ("PFRecoTauDiscriminationByMVAIsolationRun2")
 
void setChargedHadronP4 (reco::PFRecoTauChargedHadron &chargedHadron, double scaleFactor_neutralPFCands=1.0)
 
template<typename InputIterator >
int sumPFCandCharge (InputIterator begin, InputIterator end)
 Sum the charge of a collection of PFCandidates. More...
 
template<typename InputIterator >
reco::Candidate::LorentzVector sumPFCandP4 (InputIterator begin, InputIterator end)
 
template<typename InputIterator >
double sumPFCandPt (InputIterator begin, InputIterator end)
 Sum the pT of a collection of PFCandidates. More...
 
template<typename InputIterator , typename FunctionPtr , typename ReturnType >
ReturnType sumPFVector (InputIterator begin, InputIterator end, FunctionPtr func, ReturnType init)
 Sum the four vectors in a collection of PFCandidates. More...
 
template<typename InputIterator >
InputIterator takeNElements (const InputIterator &begin, const InputIterator &end, size_t N)
 
PFTau::hadronicDecayMode translateDecayMode (unsigned int nCharged, unsigned int nPiZero)
 
PFTau::hadronicDecayMode translateGenDecayModeToReco (const std::string &genName)
 Convert a genTau decay mode string ('oneProng0Pi0') to the RECO enum. More...
 
std::string translateRecoDecayModeToGen (PFTau::hadronicDecayMode decayMode)
 Convert a RECO enum decay mode to a string ('oneProng0Pi0') More...
 

Typedef Documentation

◆ ChargedHadronCombo

Definition at line 25 of file RecoTauBuilderCombinatoricPlugin.cc.

◆ ChargedHadronList

Definition at line 24 of file RecoTauBuilderCombinatoricPlugin.cc.

◆ PFRecoTauChargedHadronFromLostTrackPlugin

◆ PFRecoTauChargedHadronFromTrackPlugin

◆ PiZeroCombo

Definition at line 27 of file RecoTauBuilderCombinatoricPlugin.cc.

◆ PiZeroList

typedef std::vector< RecoTauPiZero > reco::tau::PiZeroList

Definition at line 26 of file RecoTauBuilderCombinatoricPlugin.cc.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
kOldDMwoLT 
kOldDMwLT 
kNewDMwoLT 
kNewDMwLT 
kDBoldDMwLT 
kDBnewDMwLT 
kPWoldDMwLT 
kPWnewDMwLT 
kDBoldDMwLTwGJ 
kDBnewDMwLTwGJ 

Definition at line 58 of file PFRecoTauClusterVariables.h.

58  {
59  kOldDMwoLT,
60  kOldDMwLT,
61  kNewDMwoLT,
62  kNewDMwLT,
69  };

Function Documentation

◆ atECALEntrance()

math::XYZPointF reco::tau::atECALEntrance ( const reco::Candidate part,
double  bField 
)

Definition at line 108 of file RecoTauCommonUtilities.cc.

108  {
109  const reco::PFCandidate* pfCand = dynamic_cast<const reco::PFCandidate*>(part);
110  if (pfCand)
111  return pfCand->positionAtECALEntrance();
112 
115  RawParticle(math::XYZTLorentzVector(part->px(), part->py(), part->pz(), part->energy()),
116  math::XYZTLorentzVector(part->vertex().x(), part->vertex().y(), part->vertex().z(), 0.)),
117  part->charge(),
118  0.,
119  0.,
120  bField);
121  theParticle.propagateToEcalEntrance(false);
122  if (theParticle.getSuccess() != 0) {
123  pos = math::XYZPointF(theParticle.particle().vertex());
124  }
125  return pos;
126  }

References Calorimetry_cff::bField, RawParticle::charge(), BaseParticlePropagator::getSuccess(), BaseParticlePropagator::particle(), reco::PFCandidate::positionAtECALEntrance(), BaseParticlePropagator::propagateToEcalEntrance(), and RawParticle::vertex().

Referenced by reco::tau::PFRecoTauChargedHadronFromPFCandidatePlugin::operator()(), and reco::tau::PFRecoTauChargedHadronFromGenericTrackPlugin< TrackClass >::operator()().

◆ castView()

template<typename RefVectorType , typename BaseView >
RefVectorType reco::tau::castView ( const edm::Handle< BaseView > &  view)

Convert a BaseView (View<T>) to a TRefVector.

Definition at line 83 of file RecoTauCommonUtilities.h.

83  {
84  typedef typename RefVectorType::value_type OutputRef;
85  // Double check at compile time that the inheritance is okay. It can still
86  // fail at runtime if you pass it the wrong collection.
88  RefVectorType output;
89  size_t nElements = view->size();
90  output.reserve(nElements);
91  // Cast each of our Refs
92  for (size_t i = 0; i < nElements; ++i) {
93  output.push_back(view->refAt(i).template castTo<OutputRef>());
94  }
95  return output;
96  }

References mps_fire::i, convertSQLitetoXML_cfg::output, and relativeConstraints::value.

◆ chargedHadronsInDecayMode()

unsigned int reco::tau::chargedHadronsInDecayMode ( PFTau::hadronicDecayMode  mode)

Reverse mapping of decay modes into multiplicities.

Definition at line 43 of file PFTauDecayModeTools.cc.

43  {
44  int modeAsInt = static_cast<int>(mode);
45  return (modeAsInt / PFTau::kOneProngNPiZero) + 1;
46  }

References reco::PFTau::kOneProngNPiZero, and mode.

◆ cleanOverlaps()

template<typename Container , class OverlapFunction >
Container reco::tau::cleanOverlaps ( const Container &  dirty)

Definition at line 33 of file RecoTauCleaningTools.h.

33  {
34  typedef typename Container::const_iterator Iterator;
35  // Output container of clean objects
37  OverlapFunction overlapChecker;
38  for (Iterator candidate = dirty.begin(); candidate != dirty.end(); ++candidate) {
39  // Check if this overlaps with a pizero already in the clean list
40  bool overlaps = false;
41  for (Iterator cleaned = clean.begin(); cleaned != clean.end() && !overlaps; ++cleaned) {
42  overlaps = overlapChecker(*candidate, *cleaned);
43  }
44  // If it didn't overlap with anything clean, add it to the clean list
45  if (!overlaps)
46  clean.insert(clean.end(), *candidate);
47  }
48  return clean;
49  }

References clean(), and analyzePatCleaning_cfg::overlaps.

◆ compChargedHadronP4fromPThetaPhi()

reco::Candidate::LorentzVector reco::tau::compChargedHadronP4fromPThetaPhi ( double  chargedHadronP,
double  chargedHadronTheta,
double  chargedHadronPhi 
)

Definition at line 91 of file pfRecoTauChargedHadronAuxFunctions.cc.

93  {
94  double chargedHadronPx = chargedHadronP * TMath::Cos(chargedHadronPhi) * TMath::Sin(chargedHadronTheta);
95  double chargedHadronPy = chargedHadronP * TMath::Sin(chargedHadronPhi) * TMath::Sin(chargedHadronTheta);
96  double chargedHadronPz = chargedHadronP * TMath::Cos(chargedHadronTheta);
97  return compChargedHadronP4fromPxPyPz(chargedHadronPx, chargedHadronPy, chargedHadronPz);
98  }

References compChargedHadronP4fromPxPyPz().

◆ compChargedHadronP4fromPxPyPz()

reco::Candidate::LorentzVector reco::tau::compChargedHadronP4fromPxPyPz ( double  chargedHadronPx,
double  chargedHadronPy,
double  chargedHadronPz 
)

Definition at line 80 of file pfRecoTauChargedHadronAuxFunctions.cc.

82  {
83  const double chargedPionMass = 0.13957; // GeV
84  double chargedHadronEn = sqrt(chargedHadronPx * chargedHadronPx + chargedHadronPy * chargedHadronPy +
85  chargedHadronPz * chargedHadronPz + chargedPionMass * chargedPionMass);
86  reco::Candidate::LorentzVector chargedHadronP4(
87  chargedHadronPx, chargedHadronPy, chargedHadronPz, chargedHadronEn);
88  return chargedHadronP4;
89  }

References mathSSE::sqrt().

Referenced by compChargedHadronP4fromPThetaPhi(), reco::tau::PFRecoTauEnergyAlgorithmPlugin::operator()(), and setChargedHadronP4().

◆ countHits()

void reco::tau::countHits ( const reco::Muon muon,
std::vector< int > &  numHitsDT,
std::vector< int > &  numHitsCSC,
std::vector< int > &  numHitsRPC 
)

Definition at line 7 of file RecoTauMuonTools.cc.

10  {
11  if (muon.outerTrack().isNonnull()) {
12  const reco::HitPattern& muonHitPattern = muon.outerTrack()->hitPattern();
13  for (int iHit = 0; iHit < muonHitPattern.numberOfAllHits(reco::HitPattern::TRACK_HITS); ++iHit) {
14  uint32_t hit = muonHitPattern.getHitPattern(reco::HitPattern::TRACK_HITS, iHit);
15  if (hit == 0)
16  break;
17  if (muonHitPattern.muonHitFilter(hit) && (muonHitPattern.getHitType(hit) == TrackingRecHit::valid ||
18  muonHitPattern.getHitType(hit) == TrackingRecHit::bad)) {
19  int muonStation = muonHitPattern.getMuonStation(hit) - 1; // CV: map into range 0..3
20  if (muonStation >= 0 && muonStation < 4) {
21  if (muonHitPattern.muonDTHitFilter(hit))
22  ++numHitsDT[muonStation];
23  else if (muonHitPattern.muonCSCHitFilter(hit))
24  ++numHitsCSC[muonStation];
25  else if (muonHitPattern.muonRPCHitFilter(hit))
26  ++numHitsRPC[muonStation];
27  }
28  }
29  }
30  }
31  }

References TrackingRecHit::bad, reco::HitPattern::getHitPattern(), reco::HitPattern::getHitType(), reco::HitPattern::getMuonStation(), reco::HitPattern::muonCSCHitFilter(), reco::HitPattern::muonDTHitFilter(), reco::HitPattern::muonHitFilter(), reco::HitPattern::muonRPCHitFilter(), reco::HitPattern::numberOfAllHits(), reco::HitPattern::TRACK_HITS, and TrackingRecHit::valid.

◆ countMatches()

void reco::tau::countMatches ( const reco::Muon muon,
std::vector< int > &  numMatchesDT,
std::vector< int > &  numMatchesCSC,
std::vector< int > &  numMatchesRPC 
)

Definition at line 46 of file RecoTauMuonTools.cc.

49  {
50  const std::vector<reco::MuonChamberMatch>& muonSegments = muon.matches();
51  for (std::vector<reco::MuonChamberMatch>::const_iterator muonSegment = muonSegments.begin();
52  muonSegment != muonSegments.end();
53  ++muonSegment) {
54  if (muonSegment->segmentMatches.empty())
55  continue;
56  int muonDetector = muonSegment->detector();
57  int muonStation = muonSegment->station() - 1;
58  assert(muonStation >= 0 && muonStation <= 3);
59  if (muonDetector == MuonSubdetId::DT)
60  ++numMatchesDT[muonStation];
61  else if (muonDetector == MuonSubdetId::CSC)
62  ++numMatchesCSC[muonStation];
63  else if (muonDetector == MuonSubdetId::RPC)
64  ++numMatchesRPC[muonStation];
65  }
66  }

References cms::cuda::assert(), MuonSubdetId::CSC, MuonSubdetId::DT, and MuonSubdetId::RPC.

◆ eratio() [1/2]

float reco::tau::eratio ( const pat::Tau tau)

Definition at line 95 of file PFRecoTauClusterVariables.cc.

95  {
96  float ecal_en_in_signal_cands = tau.ecalEnergy();
97  float hcal_en_in_signal_cands = tau.hcalEnergy();
98  float total = ecal_en_in_signal_cands + hcal_en_in_signal_cands;
99  if (total == 0.) {
100  return -1.;
101  }
102  return ecal_en_in_signal_cands / total;
103  }

References metsig::tau, and dqmMemoryStats::total.

◆ eratio() [2/2]

float reco::tau::eratio ( const reco::PFTau tau)

return ratio of energy in ECAL over sum of energy in ECAL and HCAL

Definition at line 78 of file PFRecoTauClusterVariables.cc.

78  {
79  float ecal_en_in_signal_pf_cands = 0;
80  float hcal_en_in_signal_pf_cands = 0;
81  for (const auto& signal_cand : tau.signalCands()) {
82  const reco::PFCandidate* signal_pfcand = dynamic_cast<const reco::PFCandidate*>(signal_cand.get());
83  if (signal_pfcand != nullptr) {
84  ecal_en_in_signal_pf_cands += signal_pfcand->ecalEnergy();
85  hcal_en_in_signal_pf_cands += signal_pfcand->hcalEnergy();
86  }
87  // TauReco@MiniAOD: recalculate for PackedCandidate if added to MiniAOD event content
88  }
89  float total = ecal_en_in_signal_pf_cands + hcal_en_in_signal_pf_cands;
90  if (total == 0.) {
91  return -1.;
92  }
93  return ecal_en_in_signal_pf_cands / total;
94  }

References reco::PFCandidate::ecalEnergy(), reco::PFCandidate::hcalEnergy(), metsig::tau, and dqmMemoryStats::total.

Referenced by DeepTauId::createInputsV1(), DeepTauId::createTauBlockInputs(), reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::discriminate(), and fillIsoMVARun2Inputs().

◆ factorizePUQCuts()

std::pair< edm::ParameterSet, edm::ParameterSet > reco::tau::factorizePUQCuts ( const edm::ParameterSet inputSet)

Definition at line 384 of file RecoTauQualityCuts.cc.

384  {
385  edm::ParameterSet puCuts;
386  edm::ParameterSet nonPUCuts;
387 
388  std::vector<std::string> inputNames = input.getParameterNames();
389  for (auto const& cut : inputNames) {
390  if (cut == "minTrackVertexWeight" || cut == "maxDeltaZ" || cut == "maxDeltaZToLeadTrack") {
391  puCuts.copyFrom(input, cut);
392  } else {
393  nonPUCuts.copyFrom(input, cut);
394  }
395  }
396  return std::make_pair(puCuts, nonPUCuts);
397  }

References edm::ParameterSet::copyFrom(), TkAlMuonSelectors_cfi::cut, and input.

Referenced by PFRecoTauDiscriminationByIsolation::PFRecoTauDiscriminationByIsolation(), and PFRecoTauDiscriminationByIsolationContainer::PFRecoTauDiscriminationByIsolationContainer().

◆ fillIsoMVARun2Inputs()

bool reco::tau::fillIsoMVARun2Inputs ( float *  mvaInput,
const pat::Tau tau,
int  mvaOpt,
const std::string &  nameCharged,
const std::string &  nameNeutral,
const std::string &  namePu,
const std::string &  nameOutside,
const std::string &  nameFootprint 
)

Definition at line 182 of file PFRecoTauClusterVariables.cc.

189  {
190  int tauDecayMode = tau.decayMode();
191 
192  if (((mvaOpt == kOldDMwoLT || mvaOpt == kOldDMwLT || mvaOpt == kDBoldDMwLT || mvaOpt == kPWoldDMwLT ||
193  mvaOpt == kDBoldDMwLTwGJ) &&
194  (tauDecayMode == 0 || tauDecayMode == 1 || tauDecayMode == 2 || tauDecayMode == 10)) ||
196  mvaOpt == kDBnewDMwLTwGJ) &&
197  (tauDecayMode == 0 || tauDecayMode == 1 || tauDecayMode == 2 || tauDecayMode == 5 || tauDecayMode == 6 ||
198  tauDecayMode == 10 || tauDecayMode == 11))) {
199  float chargedIsoPtSum = tau.tauID(nameCharged);
200  float neutralIsoPtSum = tau.tauID(nameNeutral);
201  float puCorrPtSum = tau.tauID(namePu);
202  float photonPtSumOutsideSignalCone = tau.tauID(nameOutside);
203  float footprintCorrection = tau.tauID(nameFootprint);
204 
205  float decayDistX = tau.flightLength().x();
206  float decayDistY = tau.flightLength().y();
207  float decayDistZ = tau.flightLength().z();
208  float decayDistMag = std::sqrt(decayDistX * decayDistX + decayDistY * decayDistY + decayDistZ * decayDistZ);
209 
210  // --- The following 5 variables differ slightly between AOD & MiniAOD
211  // because they are recomputed using packedCandidates saved in the tau
212  float nPhoton = reco::tau::n_photons_total(tau);
213  float ptWeightedDetaStrip = reco::tau::pt_weighted_deta_strip(tau, tauDecayMode);
214  float ptWeightedDphiStrip = reco::tau::pt_weighted_dphi_strip(tau, tauDecayMode);
215  float ptWeightedDrSignal = reco::tau::pt_weighted_dr_signal(tau, tauDecayMode);
216  float ptWeightedDrIsolation = reco::tau::pt_weighted_dr_iso(tau, tauDecayMode);
217  // ---
218  float leadingTrackChi2 = tau.leadingTrackNormChi2();
219  float eRatio = reco::tau::eratio(tau);
220 
221  // Difference between measured and maximally allowed Gottfried-Jackson angle
222  float gjAngleDiff = -999;
223  if (tauDecayMode == 10) {
224  double mTau = 1.77682;
225  double mAOne = tau.p4().M();
226  double pAOneMag = tau.p();
227  double argumentThetaGJmax = (std::pow(mTau, 2) - std::pow(mAOne, 2)) / (2 * mTau * pAOneMag);
228  double argumentThetaGJmeasured =
229  (tau.p4().px() * decayDistX + tau.p4().py() * decayDistY + tau.p4().pz() * decayDistZ) /
230  (pAOneMag * decayDistMag);
231  if (std::abs(argumentThetaGJmax) <= 1. && std::abs(argumentThetaGJmeasured) <= 1.) {
232  double thetaGJmax = std::asin(argumentThetaGJmax);
233  double thetaGJmeasured = std::acos(argumentThetaGJmeasured);
234  gjAngleDiff = thetaGJmeasured - thetaGJmax;
235  }
236  }
237 
238  if (mvaOpt == kOldDMwoLT || mvaOpt == kNewDMwoLT) {
239  mvaInput[0] = std::log(std::max(1.f, (float)tau.pt()));
240  mvaInput[1] = std::abs((float)tau.eta());
241  mvaInput[2] = std::log(std::max(1.e-2f, chargedIsoPtSum));
242  mvaInput[3] = std::log(std::max(1.e-2f, neutralIsoPtSum - 0.125f * puCorrPtSum));
243  mvaInput[4] = std::log(std::max(1.e-2f, puCorrPtSum));
244  mvaInput[5] = tauDecayMode;
245  } else if (mvaOpt == kOldDMwLT || mvaOpt == kNewDMwLT) {
246  mvaInput[0] = std::log(std::max(1.f, (float)tau.pt()));
247  mvaInput[1] = std::abs((float)tau.eta());
248  mvaInput[2] = std::log(std::max(1.e-2f, chargedIsoPtSum));
249  mvaInput[3] = std::log(std::max(1.e-2f, neutralIsoPtSum - 0.125f * puCorrPtSum));
250  mvaInput[4] = std::log(std::max(1.e-2f, puCorrPtSum));
251  mvaInput[5] = tauDecayMode;
252  mvaInput[6] = std::copysign(+1.f, tau.dxy());
253  mvaInput[7] = std::sqrt(std::min(1.f, std::abs(tau.dxy())));
254  mvaInput[8] = std::min(10.f, std::abs(tau.dxy_Sig()));
255  mvaInput[9] = (tau.hasSecondaryVertex()) ? 1. : 0.;
256  mvaInput[10] = std::sqrt(decayDistMag);
257  mvaInput[11] = std::min(10.f, tau.flightLengthSig());
258  } else if (mvaOpt == kDBoldDMwLT || mvaOpt == kDBnewDMwLT) {
259  mvaInput[0] = std::log(std::max(1.f, (float)tau.pt()));
260  mvaInput[1] = std::abs((float)tau.eta());
261  mvaInput[2] = std::log(std::max(1.e-2f, chargedIsoPtSum));
262  mvaInput[3] = std::log(std::max(1.e-2f, neutralIsoPtSum));
263  mvaInput[4] = std::log(std::max(1.e-2f, puCorrPtSum));
264  mvaInput[5] = std::log(std::max(1.e-2f, photonPtSumOutsideSignalCone));
265  mvaInput[6] = tauDecayMode;
266  mvaInput[7] = std::min(30.f, nPhoton);
267  mvaInput[8] = std::min(0.5f, ptWeightedDetaStrip);
268  mvaInput[9] = std::min(0.5f, ptWeightedDphiStrip);
269  mvaInput[10] = std::min(0.5f, ptWeightedDrSignal);
270  mvaInput[11] = std::min(0.5f, ptWeightedDrIsolation);
271  mvaInput[12] = std::min(100.f, leadingTrackChi2);
272  mvaInput[13] = std::min(1.f, eRatio);
273  mvaInput[14] = std::copysign(+1.f, tau.dxy());
274  mvaInput[15] = std::sqrt(std::min(1.f, std::abs(tau.dxy())));
275  mvaInput[16] = std::min(10.f, std::abs(tau.dxy_Sig()));
276  mvaInput[17] = std::copysign(+1.f, tau.ip3d());
277  mvaInput[18] = std::sqrt(std::min(1.f, std::abs(tau.ip3d())));
278  mvaInput[19] = std::min(10.f, std::abs(tau.ip3d_Sig()));
279  mvaInput[20] = (tau.hasSecondaryVertex()) ? 1. : 0.;
280  mvaInput[21] = std::sqrt(decayDistMag);
281  mvaInput[22] = std::min(10.f, tau.flightLengthSig());
282  } else if (mvaOpt == kPWoldDMwLT || mvaOpt == kPWnewDMwLT) {
283  mvaInput[0] = std::log(std::max(1.f, (float)tau.pt()));
284  mvaInput[1] = std::abs((float)tau.eta());
285  mvaInput[2] = std::log(std::max(1.e-2f, chargedIsoPtSum));
286  mvaInput[3] = std::log(std::max(1.e-2f, neutralIsoPtSum));
287  mvaInput[4] = std::log(std::max(1.e-2f, footprintCorrection));
288  mvaInput[5] = std::log(std::max(1.e-2f, photonPtSumOutsideSignalCone));
289  mvaInput[6] = tauDecayMode;
290  mvaInput[7] = std::min(30.f, nPhoton);
291  mvaInput[8] = std::min(0.5f, ptWeightedDetaStrip);
292  mvaInput[9] = std::min(0.5f, ptWeightedDphiStrip);
293  mvaInput[10] = std::min(0.5f, ptWeightedDrSignal);
294  mvaInput[11] = std::min(0.5f, ptWeightedDrIsolation);
295  mvaInput[12] = std::min(100.f, leadingTrackChi2);
296  mvaInput[13] = std::min(1.f, eRatio);
297  mvaInput[14] = std::copysign(+1.f, tau.dxy());
298  mvaInput[15] = std::sqrt(std::min(1.f, std::abs(tau.dxy())));
299  mvaInput[16] = std::min(10.f, std::abs(tau.dxy_Sig()));
300  mvaInput[17] = std::copysign(+1.f, tau.ip3d());
301  mvaInput[18] = std::sqrt(std::min(1.f, std::abs(tau.ip3d())));
302  mvaInput[19] = std::min(10.f, std::abs(tau.ip3d_Sig()));
303  mvaInput[20] = (tau.hasSecondaryVertex()) ? 1. : 0.;
304  mvaInput[21] = std::sqrt(decayDistMag);
305  mvaInput[22] = std::min(10.f, tau.flightLengthSig());
306  } else if (mvaOpt == kDBoldDMwLTwGJ || mvaOpt == kDBnewDMwLTwGJ) {
307  mvaInput[0] = std::log(std::max(1.f, (float)tau.pt()));
308  mvaInput[1] = std::abs((float)tau.eta());
309  mvaInput[2] = std::log(std::max(1.e-2f, chargedIsoPtSum));
310  mvaInput[3] = std::log(std::max(1.e-2f, neutralIsoPtSum));
311  mvaInput[4] = std::log(std::max(1.e-2f, puCorrPtSum));
312  mvaInput[5] = std::log(std::max(1.e-2f, photonPtSumOutsideSignalCone));
313  mvaInput[6] = tauDecayMode;
314  mvaInput[7] = std::min(30.f, nPhoton);
315  mvaInput[8] = std::min(0.5f, ptWeightedDetaStrip);
316  mvaInput[9] = std::min(0.5f, ptWeightedDphiStrip);
317  mvaInput[10] = std::min(0.5f, ptWeightedDrSignal);
318  mvaInput[11] = std::min(0.5f, ptWeightedDrIsolation);
319  mvaInput[12] = std::min(1.f, eRatio);
320  mvaInput[13] = std::copysign(+1.f, tau.dxy());
321  mvaInput[14] = std::sqrt(std::min(1.f, std::abs(tau.dxy())));
322  mvaInput[15] = std::min(10.f, std::abs(tau.dxy_Sig()));
323  mvaInput[16] = std::copysign(+1.f, tau.ip3d());
324  mvaInput[17] = std::sqrt(std::min(1.f, std::abs(tau.ip3d())));
325  mvaInput[18] = std::min(10.f, std::abs(tau.ip3d_Sig()));
326  mvaInput[19] = (tau.hasSecondaryVertex()) ? 1. : 0.;
327  mvaInput[20] = std::sqrt(decayDistMag);
328  mvaInput[21] = std::min(10.f, tau.flightLengthSig());
329  mvaInput[22] = std::max(-1.f, gjAngleDiff);
330  }
331 
332  return true;
333  }
334  return false;
335  }

References funct::abs(), MillePedeFileConverter_cfg::e, eratio(), f, kDBnewDMwLT, kDBnewDMwLTwGJ, kDBoldDMwLT, kDBoldDMwLTwGJ, kNewDMwLT, kNewDMwoLT, kOldDMwLT, kOldDMwoLT, kPWnewDMwLT, kPWoldDMwLT, dqm-mbProfile::log, SiStripPI::max, min(), taus_updatedMVAIds_cff::mvaOpt, n_photons_total(), funct::pow(), pt_weighted_deta_strip(), pt_weighted_dphi_strip(), pt_weighted_dr_iso(), pt_weighted_dr_signal(), mathSSE::sqrt(), and metsig::tau.

Referenced by reco::tau::PATTauDiscriminationByMVAIsolationRun2::discriminate().

◆ filterPFCandidates()

template<typename Iterator >
std::vector<CandidatePtr> reco::tau::filterPFCandidates ( const Iterator begin,
const Iterator end,
int  pdgId,
bool  sort = true 
)

Filter a collection of objects that are convertible to CandidatePtrs by PFCandidate ID

Definition at line 41 of file RecoTauCommonUtilities.h.

44  {
45  std::vector<CandidatePtr> output;
46  for (Iterator iter = begin; iter != end; ++iter) {
47  reco::CandidatePtr ptr(*iter);
48  if (std::abs(ptr->pdgId()) == pdgId)
49  output.push_back(ptr);
50  }
51  if (sort)
52  std::sort(output.begin(), output.end(), SortPFCandsDescendingPt());
53  return output;
54  }

References funct::abs(), begin, end, convertSQLitetoXML_cfg::output, and EgammaValidation_cff::pdgId.

Referenced by pfCandidatesByPdgId(), and pfChargedCands().

◆ flattenPiZeros() [1/2]

std::vector<CandidatePtr> reco::tau::flattenPiZeros ( const std::vector< RecoTauPiZero > &  piZeros)

Definition at line 55 of file RecoTauCommonUtilities.cc.

55  {
56  return flattenPiZeros(piZeros.begin(), piZeros.end());
57  }

References flattenPiZeros().

◆ flattenPiZeros() [2/2]

std::vector<CandidatePtr> reco::tau::flattenPiZeros ( const std::vector< RecoTauPiZero >::const_iterator &  piZerosBegin,
const std::vector< RecoTauPiZero >::const_iterator &  piZerosEnd 
)

Flatten a list of pi zeros into a list of there constituent PFCandidates.

Definition at line 43 of file RecoTauCommonUtilities.cc.

44  {
45  std::vector<CandidatePtr> output;
46 
47  for (std::vector<RecoTauPiZero>::const_iterator piZero = piZerosBegin; piZero != piZerosEnd; ++piZero) {
48  for (size_t iDaughter = 0; iDaughter < piZero->numberOfDaughters(); ++iDaughter) {
49  output.push_back(CandidatePtr(piZero->daughterPtr(iDaughter)));
50  }
51  }
52  return output;
53  }

References convertSQLitetoXML_cfg::output.

Referenced by flattenPiZeros(), and reco::tau::xclean::CrossCleanPtrs< PtrIter >::initialize().

◆ format_vint()

std::string reco::tau::format_vint ( const std::vector< int > &  vi)

Definition at line 33 of file RecoTauMuonTools.cc.

33  {
34  std::ostringstream os;
35  os << "{ ";
36  unsigned numEntries = vi.size();
37  for (unsigned iEntry = 0; iEntry < numEntries; ++iEntry) {
38  os << vi[iEntry];
39  if (iEntry < (numEntries - 1))
40  os << ", ";
41  }
42  os << " }";
43  return os.str();
44  }

References edm::numEntries().

◆ getDecayMode()

PFTau::hadronicDecayMode reco::tau::getDecayMode ( const reco::GenJet genJet)

Definition at line 77 of file PFTauDecayModeTools.cc.

77  {
78  if (!genJet)
79  return reco::PFTau::kNull;
81  }

References JetMCTagUtils::genTauDecayMode(), reco::PFTau::kNull, and translateGenDecayModeToReco().

◆ getTrackFromChargedHadron()

const reco::Track * reco::tau::getTrackFromChargedHadron ( const reco::PFRecoTauChargedHadron chargedHadron)

Definition at line 12 of file pfRecoTauChargedHadronAuxFunctions.cc.

12  {
13  // Charged hadron made from track (reco::Track) - RECO/AOD only
14  if (chargedHadron.getTrack().isNonnull()) {
15  return chargedHadron.getTrack().get();
16  }
17  // In MiniAOD, even isolated tracks are saved as candidates, so the track Ptr doesn't exist
18  const pat::PackedCandidate* chargedPFPCand =
19  dynamic_cast<const pat::PackedCandidate*>(chargedHadron.getChargedPFCandidate().get());
20  if (chargedPFPCand != nullptr) {
21  return chargedPFPCand->bestTrack();
22  }
23  const pat::PackedCandidate* lostTrackCand =
24  dynamic_cast<const pat::PackedCandidate*>(chargedHadron.getLostTrackCandidate().get());
25  if (lostTrackCand != nullptr) {
26  return lostTrackCand->bestTrack();
27  }
28  return nullptr;
29  }

References pat::PackedCandidate::bestTrack(), and muons2muons_cfi::chargedHadron.

Referenced by reco::tau::RecoTauSoftTwoProngTausCleanerPlugin::operator()(), reco::tau::PFRecoTauEnergyAlgorithmPlugin::operator()(), and setChargedHadronP4().

◆ isPtrEqual() [1/2]

template<class Base >
bool reco::tau::isPtrEqual ( const edm::Ptr< Base > &  b,
const edm::Ptr< Base > &  d 
)

Definition at line 99 of file PFRecoTauEnergyAlgorithmPlugin.cc.

99  {
100  return b == d;
101  }

References b, and ztail::d.

◆ isPtrEqual() [2/2]

template<class Base , class Der >
bool reco::tau::isPtrEqual ( const edm::Ptr< Base > &  b,
const edm::Ptr< Der > &  d 
)

Definition at line 94 of file PFRecoTauEnergyAlgorithmPlugin.cc.

94  {
95  return edm::Ptr<Der>(b) == d;
96  }

References b, and ztail::d.

Referenced by reco::tau::PFRecoTauEnergyAlgorithmPlugin::operator()().

◆ lead_track_chi2()

float reco::tau::lead_track_chi2 ( const reco::PFTau tau)

return chi2 of the leading track ==> deprecated? <==

Definition at line 58 of file PFRecoTauClusterVariables.cc.

58  {
59  float LeadingTracknormalizedChi2 = 0;
60  const reco::CandidatePtr& leadingCharged = tau.leadChargedHadrCand();
61  if (leadingCharged.isNonnull()) {
62  const reco::PFCandidate* pfcand = dynamic_cast<const reco::PFCandidate*>(leadingCharged.get());
63  if (pfcand != nullptr) {
64  reco::TrackRef tref = pfcand->trackRef();
65  if (tref.isNonnull()) {
66  LeadingTracknormalizedChi2 = tref->normalizedChi2();
67  }
68  } else {
69  const pat::PackedCandidate* patcand = dynamic_cast<const pat::PackedCandidate*>(leadingCharged.get());
70  if (patcand != nullptr && patcand->hasTrackDetails()) {
71  LeadingTracknormalizedChi2 = patcand->pseudoTrack().normalizedChi2();
72  }
73  }
74  }
75  return LeadingTracknormalizedChi2;
76  }

References edm::Ptr< T >::get(), pat::PackedCandidate::hasTrackDetails(), edm::Ptr< T >::isNonnull(), edm::Ref< C, T, F >::isNonnull(), reco::TrackBase::normalizedChi2(), pfDeepBoostedJetPreprocessParams_cfi::pfcand, pat::PackedCandidate::pseudoTrack(), and metsig::tau.

Referenced by reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::discriminate().

◆ leadCand()

template<typename InputIterator >
InputIterator reco::tau::leadCand ( InputIterator  begin,
InputIterator  end 
)

Definition at line 138 of file RecoTauCommonUtilities.h.

138  {
139  double max_pt = 0;
140  InputIterator max_cand = begin;
141  for (InputIterator cand = begin; cand != end; ++cand) {
142  if ((*cand)->pt() > max_pt) {
143  max_pt = (*cand)->pt();
144  max_cand = cand;
145  }
146  }
147  return max_cand;
148  }

References begin, and end.

Referenced by reco::tau::RecoTauConstructor::get(), reco::tau::RecoTauVertexAssociator::getLeadCand(), reco::tau::RecoTauVertexAssociator::getLeadTrack(), reco::tau::RecoTauVertexAssociator::getLeadTrackRef(), and reco::tau::RecoTauQualityCuts::setLeadTrack().

◆ n_photons_total() [1/2]

unsigned int reco::tau::n_photons_total ( const pat::Tau tau)

Definition at line 169 of file PFRecoTauClusterVariables.cc.

169  {
170  unsigned int n_photons = 0;
171  for (auto& cand : tau.signalGammaCands()) {
172  if (cand->pt() > 0.5)
173  ++n_photons;
174  }
175  for (auto& cand : tau.isolationGammaCands()) {
176  if (cand->pt() > 0.5)
177  ++n_photons;
178  }
179  return n_photons;
180  }

References metsig::tau.

◆ n_photons_total() [2/2]

unsigned int reco::tau::n_photons_total ( const reco::PFTau tau)

return total number of pf photon candidates with pT>500 MeV, which are associated to signal

Definition at line 157 of file PFRecoTauClusterVariables.cc.

157  {
158  unsigned int n_photons = 0;
159  for (auto& cand : tau.signalGammaCands()) {
160  if (cand->pt() > 0.5)
161  ++n_photons;
162  }
163  for (auto& cand : tau.isolationGammaCands()) {
164  if (cand->pt() > 0.5)
165  ++n_photons;
166  }
167  return n_photons;
168  }

References metsig::tau.

Referenced by DeepTauId::createInputsV1(), DeepTauId::createTauBlockInputs(), reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::discriminate(), and fillIsoMVARun2Inputs().

◆ pfCandidates() [1/2]

std::vector<CandidatePtr> reco::tau::pfCandidates ( const Jet jet,
const std::vector< int > &  particleIds,
bool  sort = true 
)

Extract pfCandidates of a that match a list of particle Ids from a PFJet.

Definition at line 63 of file RecoTauCommonUtilities.cc.

63  {
64  std::vector<int> pdgIds;
65  for (auto particleId : particleIds)
66  pdgIds.push_back(translateTypeToAbsPdgId(particleId));
67  return pfCandidatesByPdgId(jet, pdgIds, sort);
68  }

References metsig::jet, CosmicGenFilterHelix_cfi::pdgIds, and pfCandidatesByPdgId().

◆ pfCandidates() [2/2]

std::vector< reco::CandidatePtr > reco::tau::pfCandidates ( const Jet jet,
int  particleId,
bool  sort = true 
)

Extract pfCandidates of a given particle Id from a PFJet. If sort is true, candidates will be sorted by descending PT. Internally translates to pdgId

Definition at line 59 of file RecoTauCommonUtilities.cc.

59  {
60  return pfCandidatesByPdgId(jet, translateTypeToAbsPdgId(particleId), sort);
61  }

References metsig::jet, and pfCandidatesByPdgId().

Referenced by reco::tau::PFRecoTauChargedHadronFromPFCandidatePlugin::operator()(), reco::tau::RecoTauPiZeroStripPlugin::operator()(), reco::tau::RecoTauPiZeroStripPlugin2::operator()(), reco::tau::RecoTauPiZeroStripPlugin3::operator()(), and pfGammas().

◆ pfCandidatesByPdgId() [1/2]

std::vector<CandidatePtr> reco::tau::pfCandidatesByPdgId ( const Jet jet,
const std::vector< int > &  pdgIds,
bool  sort = true 
)

Extract pfCandidates of a that match a list of PDG Ids from a PFJet.

Definition at line 76 of file RecoTauCommonUtilities.cc.

78  {
79  const CandPtrs& pfCands = jet.daughterPtrVector();
81  // Get each desired candidate type, unsorted for now
82  for (std::vector<int>::const_iterator pdgId = pdgIds.begin(); pdgId != pdgIds.end(); ++pdgId) {
83  CandPtrs&& selectedPFCands = filterPFCandidates(pfCands.begin(), pfCands.end(), *pdgId, false);
84  output.insert(output.end(), selectedPFCands.begin(), selectedPFCands.end());
85  }
86  if (sort)
87  std::sort(output.begin(), output.end(), SortPFCandsDescendingPt());
88  return output;
89  }

References filterPFCandidates(), metsig::jet, convertSQLitetoXML_cfg::output, EgammaValidation_cff::pdgId, and CosmicGenFilterHelix_cfi::pdgIds.

◆ pfCandidatesByPdgId() [2/2]

std::vector< reco::CandidatePtr > reco::tau::pfCandidatesByPdgId ( const Jet jet,
int  pdgId,
bool  sort = true 
)

Extract pfCandidates of a given PDG Id from a PFJet. If sort is true, candidates will be sorted by descending PT

Definition at line 70 of file RecoTauCommonUtilities.cc.

70  {
71  CandPtrs pfCands = jet.daughterPtrVector();
72  CandPtrs selectedPFCands = filterPFCandidates(pfCands.begin(), pfCands.end(), pdgId, sort);
73  return selectedPFCands;
74  }

References filterPFCandidates(), metsig::jet, and EgammaValidation_cff::pdgId.

Referenced by reco::tau::RecoTauBuilderCombinatoricPlugin::operator()(), reco::tau::RecoTauBuilderConePlugin::operator()(), and pfCandidates().

◆ pfChargedCands()

std::vector< reco::CandidatePtr > reco::tau::pfChargedCands ( const Jet jet,
bool  sort = true 
)

Extract all non-neutral candidates from a PFJet.

Definition at line 93 of file RecoTauCommonUtilities.cc.

93  {
94  const CandPtrs& pfCands = jet.daughterPtrVector();
96  CandPtrs&& mus = filterPFCandidates(pfCands.begin(), pfCands.end(), 13, false);
97  CandPtrs&& es = filterPFCandidates(pfCands.begin(), pfCands.end(), 11, false);
98  CandPtrs&& chs = filterPFCandidates(pfCands.begin(), pfCands.end(), 211, false);
99  output.reserve(mus.size() + es.size() + chs.size());
100  output.insert(output.end(), mus.begin(), mus.end());
101  output.insert(output.end(), es.begin(), es.end());
102  output.insert(output.end(), chs.begin(), chs.end());
103  if (sort)
104  std::sort(output.begin(), output.end(), SortPFCandsDescendingPt());
105  return output;
106  }

References filterPFCandidates(), metsig::jet, and convertSQLitetoXML_cfg::output.

Referenced by reco::tau::RecoTauVertexAssociator::getLeadCand(), reco::tau::RecoTauBuilderCombinatoricPlugin::operator()(), and reco::tau::RecoTauBuilderConePlugin::operator()().

◆ pfGammas()

std::vector< reco::CandidatePtr > reco::tau::pfGammas ( const Jet jet,
bool  sort = true 
)

◆ piZerosInDecayMode()

unsigned int reco::tau::piZerosInDecayMode ( PFTau::hadronicDecayMode  mode)

Definition at line 48 of file PFTauDecayModeTools.cc.

48  {
49  int modeAsInt = static_cast<int>(mode);
50  return (modeAsInt % PFTau::kOneProngNPiZero);
51  }

References reco::PFTau::kOneProngNPiZero, and mode.

◆ pt_weighted_deta_strip() [1/2]

float reco::tau::pt_weighted_deta_strip ( const pat::Tau tau,
int  dm 
)
inline

Definition at line 39 of file PFRecoTauClusterVariables.h.

39  {
40  return pt_weighted_dx(tau, dm == 10 ? 2 : 1, 1, dm);
41  }

References symbols::dm, pt_weighted_dx(), and metsig::tau.

◆ pt_weighted_deta_strip() [2/2]

float reco::tau::pt_weighted_deta_strip ( const reco::PFTau tau,
int  dm 
)
inline

return sum of pt weighted values of deta relative to tau candidate for all pf photon candidates, which are associated to signal

Definition at line 36 of file PFRecoTauClusterVariables.h.

36  {
37  return pt_weighted_dx(tau, dm == 10 ? 2 : 1, 1, dm);
38  }

References symbols::dm, pt_weighted_dx(), and metsig::tau.

Referenced by DeepTauId::createInputsV1(), DeepTauId::createTauBlockInputs(), reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::discriminate(), and fillIsoMVARun2Inputs().

◆ pt_weighted_dphi_strip() [1/2]

float reco::tau::pt_weighted_dphi_strip ( const pat::Tau tau,
int  dm 
)
inline

Definition at line 47 of file PFRecoTauClusterVariables.h.

47  {
48  return pt_weighted_dx(tau, dm == 10 ? 2 : 1, 2, dm);
49  }

References symbols::dm, pt_weighted_dx(), and metsig::tau.

◆ pt_weighted_dphi_strip() [2/2]

float reco::tau::pt_weighted_dphi_strip ( const reco::PFTau tau,
int  dm 
)
inline

return sum of pt weighted values of dphi relative to tau candidate for all pf photon candidates, which are associated to signal

Definition at line 44 of file PFRecoTauClusterVariables.h.

44  {
45  return pt_weighted_dx(tau, dm == 10 ? 2 : 1, 2, dm);
46  }

References symbols::dm, pt_weighted_dx(), and metsig::tau.

Referenced by DeepTauId::createInputsV1(), DeepTauId::createTauBlockInputs(), reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::discriminate(), and fillIsoMVARun2Inputs().

◆ pt_weighted_dr_iso() [1/2]

float reco::tau::pt_weighted_dr_iso ( const pat::Tau tau,
int  dm 
)
inline

Definition at line 53 of file PFRecoTauClusterVariables.h.

53 { return pt_weighted_dx(tau, 2, 0, dm); }

References symbols::dm, pt_weighted_dx(), and metsig::tau.

◆ pt_weighted_dr_iso() [2/2]

float reco::tau::pt_weighted_dr_iso ( const reco::PFTau tau,
int  dm 
)
inline

return sum of pt weighted values of dr relative to tau candidate for all pf photon candidates, which are inside an isolation conde but not associated to signal

Definition at line 52 of file PFRecoTauClusterVariables.h.

52 { return pt_weighted_dx(tau, 2, 0, dm); }

References symbols::dm, pt_weighted_dx(), and metsig::tau.

Referenced by DeepTauId::createInputsV1(), DeepTauId::createTauBlockInputs(), reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::discriminate(), and fillIsoMVARun2Inputs().

◆ pt_weighted_dr_signal() [1/2]

float reco::tau::pt_weighted_dr_signal ( const pat::Tau tau,
int  dm 
)
inline

Definition at line 33 of file PFRecoTauClusterVariables.h.

33 { return pt_weighted_dx(tau, 0, 0, dm); }

References symbols::dm, pt_weighted_dx(), and metsig::tau.

◆ pt_weighted_dr_signal() [2/2]

float reco::tau::pt_weighted_dr_signal ( const reco::PFTau tau,
int  dm 
)
inline

return sum of pt weighted values of dr relative to tau candidate for all pf photon candidates, which are associated to signal

Definition at line 32 of file PFRecoTauClusterVariables.h.

32 { return pt_weighted_dx(tau, 0, 0, dm); }

References symbols::dm, pt_weighted_dx(), and metsig::tau.

Referenced by DeepTauId::createInputsV1(), DeepTauId::createTauBlockInputs(), reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::discriminate(), and fillIsoMVARun2Inputs().

◆ pt_weighted_dx() [1/2]

float reco::tau::pt_weighted_dx ( const pat::Tau tau,
int  mode = 0,
int  var = 0,
int  decaymode = -1 
)

Definition at line 153 of file PFRecoTauClusterVariables.cc.

153  {
154  return pt_weighted_dx_T<PATTau_traits>(tau, mode, var, decaymode);
155  }

References runTauDisplay::decaymode, ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, metsig::tau, and trigObjTnPSource_cfi::var.

◆ pt_weighted_dx() [2/2]

float reco::tau::pt_weighted_dx ( const reco::PFTau tau,
int  mode = 0,
int  var = 0,
int  decaymode = -1 
)

return sum of pt weighted values of distance to tau candidate for all pf photon candidates, which are associated to signal; depending on var the distance is in 0=:dr, 1=:deta, 2=:dphi

Definition at line 150 of file PFRecoTauClusterVariables.cc.

150  {
151  return pt_weighted_dx_T<PFTau_traits>(tau, mode, var, decaymode);
152  }

References runTauDisplay::decaymode, ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, metsig::tau, and trigObjTnPSource_cfi::var.

Referenced by pt_weighted_deta_strip(), pt_weighted_dphi_strip(), pt_weighted_dr_iso(), and pt_weighted_dr_signal().

◆ pt_weighted_dx_T()

template<typename T >
float reco::tau::pt_weighted_dx_T ( const typename T::Tau_t &  tau,
int  mode,
int  var,
int  decaymode 
)

return sum of pt weighted values of distance to tau candidate for all pf photon candidates, which are associated to signal; depending on var the distance is in 0=:dr, 1=:deta, 2=:dphi

Definition at line 107 of file PFRecoTauClusterVariables.cc.

107  {
108  float sum_pt = 0.;
109  float sum_dx_pt = 0.;
110  float signalrad = std::max(0.05, std::min(0.1, 3. / std::max(1., tau.pt())));
111  int is3prong = (decaymode == 10);
112  const auto& cands = getGammas_T<T>(tau, mode < 2);
113  for (const auto& cand : cands) {
114  // only look at electrons/photons with pT > 0.5
115  if (cand->pt() < 0.5) {
116  continue;
117  }
118  float dr = reco::deltaR(cand->eta(), cand->phi(), tau.eta(), tau.phi());
119  float deta = std::abs(cand->eta() - tau.eta());
120  float dphi = std::abs(reco::deltaPhi(cand->phi(), tau.phi()));
121  float pt = cand->pt();
122  bool flag = isInside(pt, deta, dphi);
123  if (is3prong == 0) {
124  if (mode == 2 || (mode == 0 && dr < signalrad) || (mode == 1 && dr > signalrad)) {
125  sum_pt += pt;
126  if (var == 0)
127  sum_dx_pt += pt * dr;
128  else if (var == 1)
129  sum_dx_pt += pt * deta;
130  else if (var == 2)
131  sum_dx_pt += pt * dphi;
132  }
133  } else if (is3prong == 1) {
134  if ((mode == 2 && flag == false) || (mode == 1 && flag == true) || mode == 0) {
135  sum_pt += pt;
136  if (var == 0)
137  sum_dx_pt += pt * dr;
138  else if (var == 1)
139  sum_dx_pt += pt * deta;
140  else if (var == 2)
141  sum_dx_pt += pt * dphi;
142  }
143  }
144  }
145  if (sum_pt > 0.) {
146  return sum_dx_pt / sum_pt;
147  }
148  return 0.;
149  }

References funct::abs(), HLT_2018_cff::cands, runTauDisplay::decaymode, reco::deltaPhi(), reco::deltaR(), flavorHistoryFilter_cfi::dr, RemoveAddSevLevel::flag, SiStripPI::max, min(), ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, DiDispStaMuonMonitor_cfi::pt, metsig::tau, and trigObjTnPSource_cfi::var.

◆ s_filler__LINE__() [1/2]

static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< PATTauDiscriminationByMVAIsolationRun2 > > reco::tau::s_filler__LINE__ ( "PATTauDiscriminationByMVAIsolationRun2"  )
static

◆ s_filler__LINE__() [2/2]

static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< PFRecoTauDiscriminationByMVAIsolationRun2 > > reco::tau::s_filler__LINE__ ( "PFRecoTauDiscriminationByMVAIsolationRun2"  )
static

◆ s_maker__LINE__() [1/2]

static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< PATTauDiscriminationByMVAIsolationRun2 > > reco::tau::s_maker__LINE__ ( "PATTauDiscriminationByMVAIsolationRun2"  )
static

◆ s_maker__LINE__() [2/2]

static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< PFRecoTauDiscriminationByMVAIsolationRun2 > > reco::tau::s_maker__LINE__ ( "PFRecoTauDiscriminationByMVAIsolationRun2"  )
static

◆ setChargedHadronP4()

void reco::tau::setChargedHadronP4 ( reco::PFRecoTauChargedHadron chargedHadron,
double  scaleFactor_neutralPFCands = 1.0 
)

Definition at line 31 of file pfRecoTauChargedHadronAuxFunctions.cc.

31  {
32  double chargedHadronP = 0.;
33  double chargedHadronPx = 0.;
34  double chargedHadronPy = 0.;
35  double chargedHadronPz = 0.;
36  double SumNeutrals = 0.;
39  const reco::CandidatePtr& chargedPFCand = chargedHadron.getChargedPFCandidate();
40  assert(chargedPFCand.isNonnull());
41  chargedHadronP += chargedPFCand->p();
42  chargedHadronPx = chargedPFCand->px();
43  chargedHadronPy = chargedPFCand->py();
44  chargedHadronPz = chargedPFCand->pz();
47  if (track != nullptr) {
48  chargedHadronP += track->p();
49  chargedHadronPx = track->px();
50  chargedHadronPy = track->py();
51  chargedHadronPz = track->pz();
52  } else { // lost tracks from MiniAOD that don't have track information saved
53  const reco::CandidatePtr& lostTrack = chargedHadron.getLostTrackCandidate();
54  assert(lostTrack.isNonnull());
55  chargedHadronP += lostTrack->p();
56  chargedHadronPx = lostTrack->px();
57  chargedHadronPy = lostTrack->py();
58  chargedHadronPz = lostTrack->pz();
59  }
60  } else
61  assert(0);
62  const std::vector<reco::CandidatePtr>& neutralPFCands = chargedHadron.getNeutralPFCandidates();
63  for (std::vector<reco::CandidatePtr>::const_iterator neutralPFCand = neutralPFCands.begin();
64  neutralPFCand != neutralPFCands.end();
65  ++neutralPFCand) {
66  SumNeutrals += (*neutralPFCand)->p();
67  }
68  double noNeutrals = chargedHadronP;
69  chargedHadronP += scaleFactor_neutralPFCands * SumNeutrals;
70  double ptRatio = chargedHadronP / noNeutrals;
71  chargedHadronPx *= ptRatio;
72  chargedHadronPy *= ptRatio;
73  chargedHadronPz *= ptRatio;
74 
75  reco::Candidate::LorentzVector chargedHadronP4 =
76  compChargedHadronP4fromPxPyPz(chargedHadronPx, chargedHadronPy, chargedHadronPz);
77  chargedHadron.setP4(chargedHadronP4);
78  }

References cms::cuda::assert(), muons2muons_cfi::chargedHadron, compChargedHadronP4fromPxPyPz(), getTrackFromChargedHadron(), edm::Ptr< T >::isNonnull(), reco::PFRecoTauChargedHadron::kChargedPFCandidate, reco::PFRecoTauChargedHadron::kPFNeutralHadron, reco::PFRecoTauChargedHadron::kTrack, electrons_cff::ptRatio, and HLT_2018_cff::track.

Referenced by reco::tau::RecoTauConstructor::addTauChargedHadron(), reco::tau::PFRecoTauEnergyAlgorithmPlugin::operator()(), reco::tau::PFRecoTauChargedHadronFromPFCandidatePlugin::operator()(), reco::tau::PFRecoTauChargedHadronFromGenericTrackPlugin< TrackClass >::operator()(), and PFRecoTauChargedHadronProducer::produce().

◆ sumPFCandCharge()

template<typename InputIterator >
int reco::tau::sumPFCandCharge ( InputIterator  begin,
InputIterator  end 
)

Sum the charge of a collection of PFCandidates.

Definition at line 133 of file RecoTauCommonUtilities.h.

133  {
134  return sumPFVector(begin, end, &Candidate::charge, 0);
135  }

References begin, reco::Candidate::charge(), end, and sumPFVector().

◆ sumPFCandP4()

template<typename InputIterator >
reco::Candidate::LorentzVector reco::tau::sumPFCandP4 ( InputIterator  begin,
InputIterator  end 
)

Definition at line 121 of file RecoTauCommonUtilities.h.

121  {
123  }

References begin, end, reco::Candidate::p4(), and sumPFVector().

◆ sumPFCandPt()

template<typename InputIterator >
double reco::tau::sumPFCandPt ( InputIterator  begin,
InputIterator  end 
)

Sum the pT of a collection of PFCandidates.

Definition at line 127 of file RecoTauCommonUtilities.h.

127  {
128  return sumPFVector(begin, end, &Candidate::pt, 0.0);
129  }

References begin, end, reco::Candidate::pt(), and sumPFVector().

Referenced by reco::tau::RecoTauConstructor::get().

◆ sumPFVector()

template<typename InputIterator , typename FunctionPtr , typename ReturnType >
ReturnType reco::tau::sumPFVector ( InputIterator  begin,
InputIterator  end,
FunctionPtr  func,
ReturnType  init 
)

Sum the four vectors in a collection of PFCandidates.

Definition at line 111 of file RecoTauCommonUtilities.h.

111  {
113  for (InputIterator cand = begin; cand != end; ++cand) {
114  //#define CALL_MEMBER_FN(object,ptrToMember) ((object).*(ptrToMember))
115  output += ((**cand).*(func))();
116  }
117  return output;
118  }

References begin, end, TrackCollections2monitor_cff::func, init, and convertSQLitetoXML_cfg::output.

Referenced by sumPFCandCharge(), sumPFCandP4(), and sumPFCandPt().

◆ takeNElements()

template<typename InputIterator >
InputIterator reco::tau::takeNElements ( const InputIterator &  begin,
const InputIterator &  end,
size_t  N 
)

◆ translateDecayMode()

PFTau::hadronicDecayMode reco::tau::translateDecayMode ( unsigned int  nCharged,
unsigned int  nPiZero 
)

Definition at line 53 of file PFTauDecayModeTools.cc.

53  {
54  // If no tracks exist, this is definitely not a tau!
55  if (!nCharged)
56  return PFTau::kNull;
57  // Find the maximum number of PiZeros our parameterization can hold
58  const unsigned int maxPiZeros = PFTau::kOneProngNPiZero;
59  // Determine our track index
60  unsigned int trackIndex = (nCharged - 1) * (maxPiZeros + 1);
61  // Check if we handle the given number of tracks
62  if (trackIndex >= PFTau::kRareDecayMode)
63  return PFTau::kRareDecayMode;
64 
66  return static_cast<PFTau::hadronicDecayMode>(trackIndex + nPiZeros);
67  }

References reco::PFTau::kNull, reco::PFTau::kOneProngNPiZero, reco::PFTau::kRareDecayMode, HLT_2018_cff::maxPiZeros, HLT_2018_cff::nCharged, and HLT_2018_cff::nPiZeros.

◆ translateGenDecayModeToReco()

PFTau::hadronicDecayMode reco::tau::translateGenDecayModeToReco ( const std::string &  genName)

Convert a genTau decay mode string ('oneProng0Pi0') to the RECO enum.

Definition at line 69 of file PFTauDecayModeTools.cc.

69  {
70  return decayModeStringToId(name.c_str(), dmTranslatorMap);
71  }

References Skims_PA_cff::name.

Referenced by getDecayMode().

◆ translateRecoDecayModeToGen()

std::string reco::tau::translateRecoDecayModeToGen ( PFTau::hadronicDecayMode  decayMode)

Convert a RECO enum decay mode to a string ('oneProng0Pi0')

Definition at line 73 of file PFTauDecayModeTools.cc.

73  {
74  return decayModeIdToString(decayMode, dmTranslatorMap);
75  }

References taus_cff::decayMode.

reco::tau::pt_weighted_deta_strip
float pt_weighted_deta_strip(const reco::PFTau &tau, int dm)
Definition: PFRecoTauClusterVariables.h:36
edm::ParameterSet::copyFrom
void copyFrom(ParameterSet const &from, std::string const &name)
Definition: ParameterSet.cc:437
pat::PackedCandidate::hasTrackDetails
bool hasTrackDetails() const
Return true if a bestTrack can be extracted from this Candidate.
Definition: PackedCandidate.h:787
reco::HitPattern::getHitPattern
uint16_t getHitPattern(HitCategory category, int position) const
Definition: HitPattern.h:530
reco::PFTau::kNull
Definition: PFTau.h:39
MuonSubdetId::CSC
static constexpr int CSC
Definition: MuonSubdetId.h:12
zmumugammaAnalyzer_cfi.pfCandidates
pfCandidates
Definition: zmumugammaAnalyzer_cfi.py:11
init
int init
Definition: HydjetWrapper.h:64
RawParticle
Definition: RawParticle.h:37
mps_fire.i
i
Definition: mps_fire.py:355
reco::tau::kOldDMwLT
Definition: PFRecoTauClusterVariables.h:60
input
static const std::string input
Definition: EdmProvDump.cc:48
BaseParticlePropagator::propagateToEcalEntrance
bool propagateToEcalEntrance(bool first=true)
Definition: BaseParticlePropagator.cc:450
reco::tau::pt_weighted_dx
float pt_weighted_dx(const pat::Tau &tau, int mode=0, int var=0, int decaymode=-1)
Definition: PFRecoTauClusterVariables.cc:153
BaseParticlePropagator::particle
RawParticle const & particle() const
The particle being propagated.
Definition: BaseParticlePropagator.h:164
TkAlMuonSelectors_cfi.cut
cut
Definition: TkAlMuonSelectors_cfi.py:5
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
metsig::tau
Definition: SignAlgoResolutions.h:49
muon
Definition: MuonCocktails.h:17
HLT_2018_cff.maxPiZeros
maxPiZeros
Definition: HLT_2018_cff.py:31797
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:32
muons2muons_cfi.chargedHadron
chargedHadron
Definition: muons2muons_cfi.py:26
reco::HitPattern::muonRPCHitFilter
static bool muonRPCHitFilter(uint16_t pattern)
Definition: HitPattern.h:640
kNull
const unsigned int kNull
Definition: HLTHiggsPlotter.h:42
min
T min(T a, T b)
Definition: MathUtil.h:58
reco::deltaPhi
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
RawParticle::vertex
const XYZTLorentzVector & vertex() const
the vertex fourvector
Definition: RawParticle.h:320
reco::tau::eratio
float eratio(const reco::PFTau &tau)
return ratio of energy in ECAL over sum of energy in ECAL and HCAL
Definition: PFRecoTauClusterVariables.cc:78
pos
Definition: PixelAliasList.h:18
HLT_2018_cff.nCharged
nCharged
Definition: HLT_2018_cff.py:31800
electrons_cff.ptRatio
ptRatio
Definition: electrons_cff.py:203
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
reco::HitPattern::muonHitFilter
static bool muonHitFilter(uint16_t pattern)
Definition: HitPattern.h:667
reco::PFCandidate::positionAtECALEntrance
const math::XYZPointF & positionAtECALEntrance() const
Definition: PFCandidate.h:362
cms::cuda::assert
assert(be >=bs)
reco::HitPattern::muonCSCHitFilter
static bool muonCSCHitFilter(uint16_t pattern)
Definition: HitPattern.h:632
reco::tau::getTrackFromChargedHadron
const reco::Track * getTrackFromChargedHadron(const reco::PFRecoTauChargedHadron &chargedHadron)
Definition: pfRecoTauChargedHadronAuxFunctions.cc:12
BaseParticlePropagator::getSuccess
int getSuccess() const
Has propagation been performed and was barrel or endcap reached ?
Definition: BaseParticlePropagator.h:296
edm::Ptr::get
T const * get() const
Returns C++ pointer to the item.
Definition: Ptr.h:139
reco::tau::kDBoldDMwLT
Definition: PFRecoTauClusterVariables.h:63
Iterator
Definition: DQMStoreStats.h:94
RawParticle::charge
double charge() const
get the MEASURED charge
Definition: RawParticle.h:294
reco::tau::flattenPiZeros
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.
Definition: RecoTauCommonUtilities.cc:43
reco::tau::kNewDMwLT
Definition: PFRecoTauClusterVariables.h:62
reco::HitPattern::getHitType
static uint32_t getHitType(uint16_t pattern)
Definition: HitPattern.h:725
reco::JetExtendedAssociation::Container
edm::AssociationVector< reco::JetRefBaseProd, Values > Container
Definition: JetExtendedAssociation.h:29
mode
reco::PFTau::hadronicDecayMode mode
Definition: PFTauDecayModeTools.cc:12
BaseParticlePropagator
Definition: BaseParticlePropagator.h:82
end
#define end
Definition: vmac.h:39
edm::Ref< TrackCollection >
pfDeepBoostedJetPreprocessParams_cfi.pfcand
pfcand
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:8
reco::tau::kNewDMwoLT
Definition: PFRecoTauClusterVariables.h:61
trigObjTnPSource_cfi.var
var
Definition: trigObjTnPSource_cfi.py:21
cms::Iterator
TGeoIterator Iterator
Definition: DDFilteredView.h:49
reco::HitPattern
Definition: HitPattern.h:147
part
part
Definition: HCALResponse.h:20
reco::tau::translateGenDecayModeToReco
PFTau::hadronicDecayMode translateGenDecayModeToReco(const std::string &genName)
Convert a genTau decay mode string ('oneProng0Pi0') to the RECO enum.
Definition: PFTauDecayModeTools.cc:69
reco::tau::pt_weighted_dphi_strip
float pt_weighted_dphi_strip(const reco::PFTau &tau, int dm)
Definition: PFRecoTauClusterVariables.h:44
pat::PackedCandidate::bestTrack
const reco::Track * bestTrack() const override
return a pointer to the track if present. otherwise, return a null pointer
Definition: PackedCandidate.h:779
runTauDisplay.decaymode
decaymode
Definition: runTauDisplay.py:327
ecaldqm::ReturnType
std::map< DetId, double > ReturnType
Definition: DBReaderWorkers.cc:54
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
reco::Track
Definition: Track.h:27
N
#define N
Definition: blowfish.cc:9
MuonSubdetId::DT
static constexpr int DT
Definition: MuonSubdetId.h:11
b
double b
Definition: hdecay.h:118
taus_cff.decayMode
decayMode
Definition: taus_cff.py:60
edm::numEntries
Long64_t numEntries(TFile *hdl, std::string const &trname)
Definition: CollUtil.cc:50
TrackingRecHit::bad
Definition: TrackingRecHit.h:49
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
analyzePatCleaning_cfg.overlaps
overlaps
Definition: analyzePatCleaning_cfg.py:9
pat::PackedCandidate::pseudoTrack
virtual const reco::Track & pseudoTrack() const
Definition: PackedCandidate.h:772
edm::ParameterSet
Definition: ParameterSet.h:36
reco::tau::compChargedHadronP4fromPxPyPz
reco::Candidate::LorentzVector compChargedHadronP4fromPxPyPz(double, double, double)
Definition: pfRecoTauChargedHadronAuxFunctions.cc:80
reco::tau::sumPFVector
ReturnType sumPFVector(InputIterator begin, InputIterator end, FunctionPtr func, ReturnType init)
Sum the four vectors in a collection of PFCandidates.
Definition: RecoTauCommonUtilities.h:111
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
pat::PackedCandidate
Definition: PackedCandidate.h:22
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
reco::tau::n_photons_total
unsigned int n_photons_total(const reco::PFTau &tau)
return total number of pf photon candidates with pT>500 MeV, which are associated to signal
Definition: PFRecoTauClusterVariables.cc:157
reco::PFRecoTauChargedHadron::kChargedPFCandidate
Definition: PFRecoTauChargedHadron.h:30
cand
Definition: decayParser.h:34
CosmicGenFilterHelix_cfi.pdgIds
pdgIds
Definition: CosmicGenFilterHelix_cfi.py:5
reco::tau::kOldDMwoLT
Definition: PFRecoTauClusterVariables.h:59
p4
double p4[4]
Definition: TauolaWrapper.h:92
reco::tau::kPWnewDMwLT
Definition: PFRecoTauClusterVariables.h:66
CandPtrs
std::vector< reco::CandidatePtr > CandPtrs
Definition: RecoTauCommonUtilities.cc:13
symbols.dm
dm
Definition: symbols.py:66
reco::tau::filterPFCandidates
std::vector< CandidatePtr > filterPFCandidates(const Iterator &begin, const Iterator &end, int pdgId, bool sort=true)
Definition: RecoTauCommonUtilities.h:41
EgammaValidation_cff.pdgId
pdgId
Definition: EgammaValidation_cff.py:118
reco::HitPattern::getMuonStation
static uint16_t getMuonStation(uint16_t pattern)
Muon station (1-4). Only valid for muon patterns, of course. only for patterns from muon,...
Definition: HitPattern.h:732
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
reco::TrackBase::normalizedChi2
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
Definition: TrackBase.h:578
TrackCollections2monitor_cff.func
func
Definition: TrackCollections2monitor_cff.py:359
TrackingRecHit::valid
Definition: TrackingRecHit.h:46
reco::PFCandidate::ecalEnergy
double ecalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:220
reco::tau::kDBnewDMwLTwGJ
Definition: PFRecoTauClusterVariables.h:68
reco::HitPattern::TRACK_HITS
Definition: HitPattern.h:155
edm::Ptr< Candidate >
HLT_2018_cff.nPiZeros
nPiZeros
Definition: HLT_2018_cff.py:31799
reco::tau::pfCandidatesByPdgId
std::vector< CandidatePtr > pfCandidatesByPdgId(const Jet &jet, int pdgId, bool sort=true)
Definition: RecoTauCommonUtilities.cc:70
reco::HitPattern::numberOfAllHits
int numberOfAllHits(HitCategory category) const
Definition: HitPattern.h:773
reco::tau::kDBoldDMwLTwGJ
Definition: PFRecoTauClusterVariables.h:67
reco::PFRecoTauChargedHadron::kPFNeutralHadron
Definition: PFRecoTauChargedHadron.h:32
Calorimetry_cff.bField
bField
Definition: Calorimetry_cff.py:292
reco::PFCandidate::hcalEnergy
double hcalEnergy() const
return corrected Hcal energy
Definition: PFCandidate.h:232
MuonSubdetId::RPC
static constexpr int RPC
Definition: MuonSubdetId.h:13
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
metsig::jet
Definition: SignAlgoResolutions.h:47
relativeConstraints.value
value
Definition: relativeConstraints.py:53
clean
static void clean(char *s)
Definition: ConnectionManager.cc:13
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
reco::tau::pt_weighted_dr_signal
float pt_weighted_dr_signal(const reco::PFTau &tau, int dm)
Definition: PFRecoTauClusterVariables.h:32
HLT_2018_cff.cands
cands
Definition: HLT_2018_cff.py:13762
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
reco::tau::pt_weighted_dr_iso
float pt_weighted_dr_iso(const reco::PFTau &tau, int dm)
Definition: PFRecoTauClusterVariables.h:52
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
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
dqmMemoryStats.total
total
Definition: dqmMemoryStats.py:152
reco::tau::kPWoldDMwLT
Definition: PFRecoTauClusterVariables.h:65
reco::PFCandidate
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:40
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
ztail.d
d
Definition: ztail.py:151
taus_updatedMVAIds_cff.mvaOpt
mvaOpt
Definition: taus_updatedMVAIds_cff.py:18
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
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
math::XYZPointF
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
Definition: Point3D.h:10
reco::HitPattern::muonDTHitFilter
static bool muonDTHitFilter(uint16_t pattern)
Definition: HitPattern.h:624
reco::tau::kDBnewDMwLT
Definition: PFRecoTauClusterVariables.h:64
begin
#define begin
Definition: vmac.h:32
hit
Definition: SiStripHitEffFromCalibTree.cc:88
JetMCTagUtils::genTauDecayMode
std::string genTauDecayMode(const reco::CompositePtrCandidate &c)
Definition: JetMCTag.cc:70
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
reco::PFRecoTauChargedHadron::kTrack
Definition: PFRecoTauChargedHadron.h:31