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, kDBnewDMwLTwGJPhase2
}
 

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 
kDBnewDMwLTwGJPhase2 

Definition at line 58 of file PFRecoTauClusterVariables.h.

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

Function Documentation

◆ atECALEntrance()

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

Definition at line 109 of file RecoTauCommonUtilities.cc.

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

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 44 of file PFTauDecayModeTools.cc.

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

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 101 of file PFRecoTauClusterVariables.cc.

101  {
102  float ecal_en_in_signal_cands = tau.ecalEnergy();
103  float hcal_en_in_signal_cands = tau.hcalEnergy();
104  float total = ecal_en_in_signal_cands + hcal_en_in_signal_cands;
105  if (total == 0.) {
106  return -1.;
107  }
108  return ecal_en_in_signal_cands / total;
109  }

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  } else {
87  // TauReco@MiniAOD: individual ECAL and HCAL energies recovered from fractions
88  const pat::PackedCandidate* signal_pcand = dynamic_cast<const pat::PackedCandidate*>(signal_cand.get());
89  assert(signal_pcand); // Taus are built either from reco::PFCandidates or pat::PackedCandidates
90  float calo_en = signal_pcand->caloFraction() * signal_pcand->energy();
91  ecal_en_in_signal_pf_cands += calo_en * (1. - signal_pcand->hcalFraction());
92  hcal_en_in_signal_pf_cands += calo_en * signal_pcand->hcalFraction();
93  }
94  }
95  float total = ecal_en_in_signal_pf_cands + hcal_en_in_signal_pf_cands;
96  if (total == 0.) {
97  return -1.;
98  }
99  return ecal_en_in_signal_pf_cands / total;
100  }

References cms::cuda::assert(), pat::PackedCandidate::caloFraction(), reco::PFCandidate::ecalEnergy(), pat::PackedCandidate::energy(), reco::PFCandidate::hcalEnergy(), pat::PackedCandidate::hcalFraction(), 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 167 of file RecoTauQualityCuts.cc.

167  {
168  edm::ParameterSet puCuts;
169  edm::ParameterSet nonPUCuts;
170 
171  std::vector<std::string> inputNames = input.getParameterNames();
172  for (auto const& cut : inputNames) {
173  if (cut == "minTrackVertexWeight" || cut == "maxDeltaZ" || cut == "maxDeltaZToLeadTrack") {
174  puCuts.copyFrom(input, cut);
175  } else {
176  nonPUCuts.copyFrom(input, cut);
177  }
178  }
179  return std::make_pair(puCuts, nonPUCuts);
180  }

References edm::ParameterSet::copyFrom(), PA_MinBiasSkim_cff::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 188 of file PFRecoTauClusterVariables.cc.

195  {
196  int tauDecayMode = tau.decayMode();
197  const float mTau = 1.77682;
198 
199  if (((mvaOpt == kOldDMwoLT || mvaOpt == kOldDMwLT || mvaOpt == kDBoldDMwLT || mvaOpt == kPWoldDMwLT ||
200  mvaOpt == kDBoldDMwLTwGJ) &&
201  (tauDecayMode == 0 || tauDecayMode == 1 || tauDecayMode == 2 || tauDecayMode == 10)) ||
204  (tauDecayMode == 0 || tauDecayMode == 1 || tauDecayMode == 2 || tauDecayMode == 5 || tauDecayMode == 6 ||
205  tauDecayMode == 10 || tauDecayMode == 11))) {
206  float chargedIsoPtSum = tau.tauID(nameCharged);
207  float neutralIsoPtSum = tau.tauID(nameNeutral);
208  float puCorrPtSum = tau.tauID(namePu);
209  float photonPtSumOutsideSignalCone = tau.tauID(nameOutside);
210  float footprintCorrection = tau.tauID(nameFootprint);
211 
212  float decayDistX = tau.flightLength().x();
213  float decayDistY = tau.flightLength().y();
214  float decayDistZ = tau.flightLength().z();
215  float decayDistMag = std::sqrt(decayDistX * decayDistX + decayDistY * decayDistY + decayDistZ * decayDistZ);
216 
217  // --- The following 5 variables differ slightly between AOD & MiniAOD
218  // because they are recomputed using packedCandidates saved in the tau
219  float nPhoton = reco::tau::n_photons_total(tau);
220  float ptWeightedDetaStrip = reco::tau::pt_weighted_deta_strip(tau, tauDecayMode);
221  float ptWeightedDphiStrip = reco::tau::pt_weighted_dphi_strip(tau, tauDecayMode);
222  float ptWeightedDrSignal = reco::tau::pt_weighted_dr_signal(tau, tauDecayMode);
223  float ptWeightedDrIsolation = reco::tau::pt_weighted_dr_iso(tau, tauDecayMode);
224  // ---
225  float leadingTrackChi2 = tau.leadingTrackNormChi2();
226  float eRatio = reco::tau::eratio(tau);
227 
228  // Difference between measured and maximally allowed Gottfried-Jackson angle
229  float gjAngleDiff = -999;
230  if (tauDecayMode == 10) {
231  double mAOne = tau.p4().M();
232  double pAOneMag = tau.p();
233  double argumentThetaGJmax = (std::pow(mTau, 2) - std::pow(mAOne, 2)) / (2 * mTau * pAOneMag);
234  double argumentThetaGJmeasured =
235  (tau.p4().px() * decayDistX + tau.p4().py() * decayDistY + tau.p4().pz() * decayDistZ) /
236  (pAOneMag * decayDistMag);
237  if (std::abs(argumentThetaGJmax) <= 1. && std::abs(argumentThetaGJmeasured) <= 1.) {
238  double thetaGJmax = std::asin(argumentThetaGJmax);
239  double thetaGJmeasured = std::acos(argumentThetaGJmeasured);
240  gjAngleDiff = thetaGJmeasured - thetaGJmax;
241  }
242  }
243 
244  if (mvaOpt == kDBnewDMwLTwGJPhase2) {
245  mvaInput[0] = tau.pt();
246  mvaInput[1] = std::abs(tau.eta());
247  mvaInput[2] = chargedIsoPtSum; //tauID("chargedIsoPtSum");
248  mvaInput[3] = neutralIsoPtSum; //tauID("neutralIsoPtSum");
249  mvaInput[4] = puCorrPtSum; //tauID("puCorrPtSum");
250  mvaInput[5] = photonPtSumOutsideSignalCone; //tauID("photonPtSumOutsideSignalCone");
251  mvaInput[6] = tauDecayMode; //tau.decayMode();
252  mvaInput[7] = tau.signalGammaCands().size();
253  mvaInput[8] = tau.isolationGammaCands().size();
254 
255  float sigCands_pt = 0.;
256  float sigCands_dr, sigCands_deta, sigCands_dphi;
257  sigCands_dr = sigCands_deta = sigCands_dphi = 0.;
258  for (const auto& j : tau.signalGammaCands()) {
259  const float dr = reco::deltaR(tau, *j);
260  const float deta = std::abs(tau.eta() - j->eta());
261  const float dphi = std::abs(reco::deltaPhi(tau.phi(), j->phi()));
262  const float pt_ = j->pt();
263  sigCands_dr += dr * pt_;
264  sigCands_deta += deta * pt_;
265  sigCands_dphi += dphi * pt_;
266  sigCands_pt += pt_;
267  }
268  if (sigCands_pt > 0.) {
269  sigCands_dr = sigCands_dr / sigCands_pt;
270  sigCands_deta = sigCands_deta / sigCands_pt;
271  sigCands_dphi = sigCands_dphi / sigCands_pt;
272  } else {
273  sigCands_dr = sigCands_deta = sigCands_dphi = -0.1;
274  }
275  float isoCands_pt = 0.;
276  float isoCands_dr, isoCands_deta, isoCands_dphi;
277  isoCands_dr = isoCands_deta = isoCands_dphi = 0.;
278  for (const auto& j : tau.isolationGammaCands()) {
279  const float dr = reco::deltaR(tau, *j);
280  const float deta = std::abs(tau.eta() - j->eta());
281  const float dphi = std::abs(reco::deltaPhi(tau.phi(), j->phi()));
282  const float pt_ = j->pt();
283  isoCands_dr += dr * pt_;
284  isoCands_deta += deta * pt_;
285  isoCands_dphi += dphi * pt_;
286  isoCands_pt += pt_;
287  }
288  if (isoCands_pt > 0.) {
289  isoCands_dr = isoCands_dr / isoCands_pt;
290  isoCands_deta = isoCands_deta / isoCands_pt;
291  isoCands_dphi = isoCands_dphi / isoCands_pt;
292  } else {
293  isoCands_dr = isoCands_deta = isoCands_dphi = -0.1;
294  }
295  mvaInput[9] = isoCands_deta;
296  mvaInput[10] = isoCands_dphi;
297  mvaInput[11] = isoCands_dr;
298  mvaInput[12] = sigCands_deta;
299  mvaInput[13] = sigCands_dphi;
300  mvaInput[14] = sigCands_dr;
301 
302  float e = tau.hcalEnergy() + tau.ecalEnergy();
303  e > 0. ? e = tau.ecalEnergy() / e : e = -1.;
304  mvaInput[15] = e;
305  mvaInput[16] = tau.dxy() >= 0. ? +1 : -1;
306  mvaInput[17] = sqrt(std::abs(tau.dxy()));
307  mvaInput[18] = std::abs(tau.dxy_Sig());
308  mvaInput[19] = tau.ip3d() >= 0. ? +1 : -1;
309  mvaInput[20] = sqrt(std::abs(tau.ip3d()));
310  mvaInput[21] = std::abs(tau.ip3d_Sig());
311  mvaInput[22] = (tau.hasSecondaryVertex()) ? 1. : 0.;
312  mvaInput[23] = decayDistMag; //sqrt(tau.flightLength().Mag2());
313  mvaInput[24] = tau.flightLengthSig();
314  mvaInput[25] = leadingTrackChi2; //tau.leadingTrackNormChi2();
315 
316  float thetaGJmax, thetaGJ;
317  if (decayDistMag > 0. && tau.hasSecondaryVertex()) {
318  const float mAOne = tau.p4().M();
319  const float pAOneMag = tau.p();
320  thetaGJmax = (mTau * mTau - mAOne * mAOne) / (2. * mTau * pAOneMag);
321  thetaGJmax = asin(thetaGJmax);
322  thetaGJ = (tau.px() * tau.flightLength().x() + tau.py() * tau.flightLength().y() +
323  tau.pz() * tau.flightLength().z()) /
324  (pAOneMag * decayDistMag);
325  thetaGJ = acos(thetaGJ);
326  if (std::isnan(thetaGJ))
327  thetaGJ = -16.;
328  if (std::isnan(thetaGJmax))
329  thetaGJmax = -11.;
330  } else {
331  thetaGJ = -15.;
332  thetaGJmax = -10.;
333  }
334  mvaInput[26] = thetaGJ - thetaGJmax;
335 
336  mvaInput[27] = 0;
337  mvaInput[28] = 10.;
338  mvaInput[29] = 10.;
339  if (tau.leadChargedHadrCand().isNonnull()) {
340  if (tau.leadChargedHadrCand()->bestTrack()) {
341  const float trackdxy = tau.leadChargedHadrCand()->bestTrack()->dxy();
342  const float trackdxy_err = tau.leadChargedHadrCand()->bestTrack()->dxyError();
343  mvaInput[27] = trackdxy >= 0. ? +1 : -1;
344  mvaInput[28] = sqrt(std::abs(trackdxy));
345  mvaInput[29] = std::abs(trackdxy / trackdxy_err);
346  }
347  }
348  }
349  if (mvaOpt == kOldDMwoLT || mvaOpt == kNewDMwoLT) {
350  mvaInput[0] = std::log(std::max(1.f, (float)tau.pt()));
351  mvaInput[1] = std::abs((float)tau.eta());
352  mvaInput[2] = std::log(std::max(1.e-2f, chargedIsoPtSum));
353  mvaInput[3] = std::log(std::max(1.e-2f, neutralIsoPtSum - 0.125f * puCorrPtSum));
354  mvaInput[4] = std::log(std::max(1.e-2f, puCorrPtSum));
355  mvaInput[5] = tauDecayMode;
356  } else if (mvaOpt == kOldDMwLT || mvaOpt == kNewDMwLT) {
357  mvaInput[0] = std::log(std::max(1.f, (float)tau.pt()));
358  mvaInput[1] = std::abs((float)tau.eta());
359  mvaInput[2] = std::log(std::max(1.e-2f, chargedIsoPtSum));
360  mvaInput[3] = std::log(std::max(1.e-2f, neutralIsoPtSum - 0.125f * puCorrPtSum));
361  mvaInput[4] = std::log(std::max(1.e-2f, puCorrPtSum));
362  mvaInput[5] = tauDecayMode;
363  mvaInput[6] = std::copysign(+1.f, tau.dxy());
364  mvaInput[7] = std::sqrt(std::min(1.f, std::abs(tau.dxy())));
365  mvaInput[8] = std::min(10.f, std::abs(tau.dxy_Sig()));
366  mvaInput[9] = (tau.hasSecondaryVertex()) ? 1. : 0.;
367  mvaInput[10] = std::sqrt(decayDistMag);
368  mvaInput[11] = std::min(10.f, tau.flightLengthSig());
369  } else if (mvaOpt == kDBoldDMwLT || mvaOpt == kDBnewDMwLT) {
370  mvaInput[0] = std::log(std::max(1.f, (float)tau.pt()));
371  mvaInput[1] = std::abs((float)tau.eta());
372  mvaInput[2] = std::log(std::max(1.e-2f, chargedIsoPtSum));
373  mvaInput[3] = std::log(std::max(1.e-2f, neutralIsoPtSum));
374  mvaInput[4] = std::log(std::max(1.e-2f, puCorrPtSum));
375  mvaInput[5] = std::log(std::max(1.e-2f, photonPtSumOutsideSignalCone));
376  mvaInput[6] = tauDecayMode;
377  mvaInput[7] = std::min(30.f, nPhoton);
378  mvaInput[8] = std::min(0.5f, ptWeightedDetaStrip);
379  mvaInput[9] = std::min(0.5f, ptWeightedDphiStrip);
380  mvaInput[10] = std::min(0.5f, ptWeightedDrSignal);
381  mvaInput[11] = std::min(0.5f, ptWeightedDrIsolation);
382  mvaInput[12] = std::min(100.f, leadingTrackChi2);
383  mvaInput[13] = std::min(1.f, eRatio);
384  mvaInput[14] = std::copysign(+1.f, tau.dxy());
385  mvaInput[15] = std::sqrt(std::min(1.f, std::abs(tau.dxy())));
386  mvaInput[16] = std::min(10.f, std::abs(tau.dxy_Sig()));
387  mvaInput[17] = std::copysign(+1.f, tau.ip3d());
388  mvaInput[18] = std::sqrt(std::min(1.f, std::abs(tau.ip3d())));
389  mvaInput[19] = std::min(10.f, std::abs(tau.ip3d_Sig()));
390  mvaInput[20] = (tau.hasSecondaryVertex()) ? 1. : 0.;
391  mvaInput[21] = std::sqrt(decayDistMag);
392  mvaInput[22] = std::min(10.f, tau.flightLengthSig());
393  } else if (mvaOpt == kPWoldDMwLT || mvaOpt == kPWnewDMwLT) {
394  mvaInput[0] = std::log(std::max(1.f, (float)tau.pt()));
395  mvaInput[1] = std::abs((float)tau.eta());
396  mvaInput[2] = std::log(std::max(1.e-2f, chargedIsoPtSum));
397  mvaInput[3] = std::log(std::max(1.e-2f, neutralIsoPtSum));
398  mvaInput[4] = std::log(std::max(1.e-2f, footprintCorrection));
399  mvaInput[5] = std::log(std::max(1.e-2f, photonPtSumOutsideSignalCone));
400  mvaInput[6] = tauDecayMode;
401  mvaInput[7] = std::min(30.f, nPhoton);
402  mvaInput[8] = std::min(0.5f, ptWeightedDetaStrip);
403  mvaInput[9] = std::min(0.5f, ptWeightedDphiStrip);
404  mvaInput[10] = std::min(0.5f, ptWeightedDrSignal);
405  mvaInput[11] = std::min(0.5f, ptWeightedDrIsolation);
406  mvaInput[12] = std::min(100.f, leadingTrackChi2);
407  mvaInput[13] = std::min(1.f, eRatio);
408  mvaInput[14] = std::copysign(+1.f, tau.dxy());
409  mvaInput[15] = std::sqrt(std::min(1.f, std::abs(tau.dxy())));
410  mvaInput[16] = std::min(10.f, std::abs(tau.dxy_Sig()));
411  mvaInput[17] = std::copysign(+1.f, tau.ip3d());
412  mvaInput[18] = std::sqrt(std::min(1.f, std::abs(tau.ip3d())));
413  mvaInput[19] = std::min(10.f, std::abs(tau.ip3d_Sig()));
414  mvaInput[20] = (tau.hasSecondaryVertex()) ? 1. : 0.;
415  mvaInput[21] = std::sqrt(decayDistMag);
416  mvaInput[22] = std::min(10.f, tau.flightLengthSig());
417  } else if (mvaOpt == kDBoldDMwLTwGJ || mvaOpt == kDBnewDMwLTwGJ) {
418  mvaInput[0] = std::log(std::max(1.f, (float)tau.pt()));
419  mvaInput[1] = std::abs((float)tau.eta());
420  mvaInput[2] = std::log(std::max(1.e-2f, chargedIsoPtSum));
421  mvaInput[3] = std::log(std::max(1.e-2f, neutralIsoPtSum));
422  mvaInput[4] = std::log(std::max(1.e-2f, puCorrPtSum));
423  mvaInput[5] = std::log(std::max(1.e-2f, photonPtSumOutsideSignalCone));
424  mvaInput[6] = tauDecayMode;
425  mvaInput[7] = std::min(30.f, nPhoton);
426  mvaInput[8] = std::min(0.5f, ptWeightedDetaStrip);
427  mvaInput[9] = std::min(0.5f, ptWeightedDphiStrip);
428  mvaInput[10] = std::min(0.5f, ptWeightedDrSignal);
429  mvaInput[11] = std::min(0.5f, ptWeightedDrIsolation);
430  mvaInput[12] = std::min(1.f, eRatio);
431  mvaInput[13] = std::copysign(+1.f, tau.dxy());
432  mvaInput[14] = std::sqrt(std::min(1.f, std::abs(tau.dxy())));
433  mvaInput[15] = std::min(10.f, std::abs(tau.dxy_Sig()));
434  mvaInput[16] = std::copysign(+1.f, tau.ip3d());
435  mvaInput[17] = std::sqrt(std::min(1.f, std::abs(tau.ip3d())));
436  mvaInput[18] = std::min(10.f, std::abs(tau.ip3d_Sig()));
437  mvaInput[19] = (tau.hasSecondaryVertex()) ? 1. : 0.;
438  mvaInput[20] = std::sqrt(decayDistMag);
439  mvaInput[21] = std::min(10.f, tau.flightLengthSig());
440  mvaInput[22] = std::max(-1.f, gjAngleDiff);
441  }
442 
443  return true;
444  }
445  return false;
446  }

References funct::abs(), reco::deltaPhi(), reco::deltaR(), flavorHistoryFilter_cfi::dr, MillePedeFileConverter_cfg::e, eratio(), f, CommonMethods::isnan(), dqmiolumiharvest::j, kDBnewDMwLT, kDBnewDMwLTwGJ, kDBnewDMwLTwGJPhase2, 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(), mps_fire::end, convertSQLitetoXML_cfg::output, EgammaValidation_cff::pdgId, and jetUpdater_cfi::sort.

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 78 of file PFTauDecayModeTools.cc.

78  {
79  if (!genJet)
80  return reco::PFTau::kNull;
82  }

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 HPSPFTauProducerPuppi_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 mps_fire::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 175 of file PFRecoTauClusterVariables.cc.

175  {
176  unsigned int n_photons = 0;
177  for (auto& cand : tau.signalGammaCands()) {
178  if (cand->pt() > 0.5)
179  ++n_photons;
180  }
181  for (auto& cand : tau.isolationGammaCands()) {
182  if (cand->pt() > 0.5)
183  ++n_photons;
184  }
185  return n_photons;
186  }

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 163 of file PFRecoTauClusterVariables.cc.

163  {
164  unsigned int n_photons = 0;
165  for (auto& cand : tau.signalGammaCands()) {
166  if (cand->pt() > 0.5)
167  ++n_photons;
168  }
169  for (auto& cand : tau.isolationGammaCands()) {
170  if (cand->pt() > 0.5)
171  ++n_photons;
172  }
173  return n_photons;
174  }

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  pdgIds.reserve(particleIds.size());
66  for (auto particleId : particleIds)
67  pdgIds.push_back(translateTypeToAbsPdgId(particleId));
69  }

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

◆ 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, pfCandidatesByPdgId(), and jetUpdater_cfi::sort.

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 77 of file RecoTauCommonUtilities.cc.

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

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

◆ 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 71 of file RecoTauCommonUtilities.cc.

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

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

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 94 of file RecoTauCommonUtilities.cc.

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

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

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 49 of file PFTauDecayModeTools.cc.

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

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 159 of file PFRecoTauClusterVariables.cc.

159  {
160  return pt_weighted_dx_T<PATTau_traits>(tau, mode, var, decaymode);
161  }

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 156 of file PFRecoTauClusterVariables.cc.

156  {
157  return pt_weighted_dx_T<PFTau_traits>(tau, mode, var, decaymode);
158  }

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 113 of file PFRecoTauClusterVariables.cc.

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

References funct::abs(), HLT_FULL_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(), HPSPFTauProducerPuppi_cfi::chargedHadron, compChargedHadronP4fromPxPyPz(), getTrackFromChargedHadron(), edm::Ptr< T >::isNonnull(), reco::PFRecoTauChargedHadron::kChargedPFCandidate, reco::PFRecoTauChargedHadron::kPFNeutralHadron, reco::PFRecoTauChargedHadron::kTrack, electrons_cff::ptRatio, and HLT_FULL_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 reco::Candidate::charge(), mps_fire::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 mps_fire::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 mps_fire::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 mps_fire::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 54 of file PFTauDecayModeTools.cc.

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

References reco::PFTau::kNull, reco::PFTau::kOneProngNPiZero, reco::PFTau::kRareDecayMode, HLT_FULL_cff::maxPiZeros, HLT_FULL_cff::nCharged, and HLT_FULL_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 70 of file PFTauDecayModeTools.cc.

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

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 74 of file PFTauDecayModeTools.cc.

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

References boostedTaus_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:444
pat::PackedCandidate::hasTrackDetails
bool hasTrackDetails() const
Return true if a bestTrack can be extracted from this Candidate.
Definition: PackedCandidate.h:788
reco::HitPattern::getHitPattern
uint16_t getHitPattern(HitCategory category, int position) const
Definition: HitPattern.h:531
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:428
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
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:159
BaseParticlePropagator::particle
RawParticle const & particle() const
The particle being propagated.
Definition: BaseParticlePropagator.h:164
HLT_FULL_cff.nCharged
nCharged
Definition: HLT_FULL_cff.py:33268
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
metsig::tau
Definition: SignAlgoResolutions.h:49
muon
Definition: MuonCocktails.h:17
reco::tau::kDBnewDMwLT
Definition: PFRecoTauClusterVariables.h:64
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
reco::HitPattern::muonRPCHitFilter
static bool muonRPCHitFilter(uint16_t pattern)
Definition: HitPattern.h:648
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
pat::PackedCandidate::caloFraction
float caloFraction() const
Set the fraction of ECAL+HCAL energy over candidate energy.
Definition: PackedCandidate.h:929
pos
Definition: PixelAliasList.h:18
electrons_cff.ptRatio
ptRatio
Definition: electrons_cff.py:204
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
reco::HitPattern::muonHitFilter
static bool muonHitFilter(uint16_t pattern)
Definition: HitPattern.h:677
reco::PFCandidate::positionAtECALEntrance
const math::XYZPointF & positionAtECALEntrance() const
Definition: PFCandidate.h:363
HLT_FULL_cff.nPiZeros
nPiZeros
Definition: HLT_FULL_cff.py:33267
cms::cuda::assert
assert(be >=bs)
reco::tau::kOldDMwoLT
Definition: PFRecoTauClusterVariables.h:59
reco::HitPattern::muonCSCHitFilter
static bool muonCSCHitFilter(uint16_t pattern)
Definition: HitPattern.h:639
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::kDBnewDMwLTwGJPhase2
Definition: PFRecoTauClusterVariables.h:69
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::HitPattern::getHitType
static uint32_t getHitType(uint16_t pattern)
Definition: HitPattern.h:741
HPSPFTauProducerPuppi_cfi.chargedHadron
chargedHadron
Definition: HPSPFTauProducerPuppi_cfi.py:7
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
edm::Ref< TrackCollection >
pfDeepBoostedJetPreprocessParams_cfi.pfcand
pfcand
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:8
boostedTaus_cff.decayMode
decayMode
Definition: boostedTaus_cff.py:28
trigObjTnPSource_cfi.var
var
Definition: trigObjTnPSource_cfi.py:21
cms::Iterator
TGeoIterator Iterator
Definition: DDFilteredView.h:54
reco::HitPattern
Definition: HitPattern.h:147
pat::PackedCandidate::energy
double energy() const override
energy
Definition: PackedCandidate.h:469
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:70
reco::tau::kNewDMwoLT
Definition: PFRecoTauClusterVariables.h:61
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:780
reco::tau::kOldDMwLT
Definition: PFRecoTauClusterVariables.h:60
runTauDisplay.decaymode
decaymode
Definition: runTauDisplay.py:327
reco::tau::kNewDMwLT
Definition: PFRecoTauClusterVariables.h:62
ecaldqm::ReturnType
std::map< DetId, double > ReturnType
Definition: DBReaderWorkers.cc:54
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
mps_fire.end
end
Definition: mps_fire.py:242
reco::Track
Definition: Track.h:27
N
#define N
Definition: blowfish.cc:9
CommonMethods.isnan
def isnan(num)
Definition: CommonMethods.py:97
MuonSubdetId::DT
static constexpr int DT
Definition: MuonSubdetId.h:11
b
double b
Definition: hdecay.h:118
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:773
HLT_FULL_cff.cands
cands
Definition: HLT_FULL_cff.py:15161
edm::ParameterSet
Definition: ParameterSet.h:47
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
reco::tau::kPWnewDMwLT
Definition: PFRecoTauClusterVariables.h:66
reco::tau::kDBoldDMwLT
Definition: PFRecoTauClusterVariables.h:63
pat::PackedCandidate
Definition: PackedCandidate.h:22
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
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:163
reco::PFRecoTauChargedHadron::kChargedPFCandidate
Definition: PFRecoTauChargedHadron.h:30
cand
Definition: decayParser.h:32
CosmicGenFilterHelix_cfi.pdgIds
pdgIds
Definition: CosmicGenFilterHelix_cfi.py:5
p4
double p4[4]
Definition: TauolaWrapper.h:92
CandPtrs
std::vector< reco::CandidatePtr > CandPtrs
Definition: RecoTauCommonUtilities.cc:13
symbols.dm
dm
Definition: symbols.py:75
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:117
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:749
reco::tau::kDBnewDMwLTwGJ
Definition: PFRecoTauClusterVariables.h:68
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:593
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:221
reco::HitPattern::TRACK_HITS
Definition: HitPattern.h:155
edm::Ptr< Candidate >
HLT_FULL_cff.maxPiZeros
maxPiZeros
Definition: HLT_FULL_cff.py:33265
reco::tau::kDBoldDMwLTwGJ
Definition: PFRecoTauClusterVariables.h:67
reco::tau::pfCandidatesByPdgId
std::vector< CandidatePtr > pfCandidatesByPdgId(const Jet &jet, int pdgId, bool sort=true)
Definition: RecoTauCommonUtilities.cc:71
reco::HitPattern::numberOfAllHits
int numberOfAllHits(HitCategory category) const
Definition: HitPattern.h:791
pat::PackedCandidate::hcalFraction
float hcalFraction() const
Definition: PackedCandidate.h:934
reco::PFRecoTauChargedHadron::kPFNeutralHadron
Definition: PFRecoTauChargedHadron.h:32
Calorimetry_cff.bField
bField
Definition: Calorimetry_cff.py:284
reco::PFCandidate::hcalEnergy
double hcalEnergy() const
return corrected Hcal energy
Definition: PFCandidate.h:233
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
PA_MinBiasSkim_cff.cut
cut
Definition: PA_MinBiasSkim_cff.py:13
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
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::PFCandidate
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
ztail.d
d
Definition: ztail.py:151
taus_updatedMVAIds_cff.mvaOpt
mvaOpt
Definition: taus_updatedMVAIds_cff.py:19
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
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
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:630
reco::tau::kPWoldDMwLT
Definition: PFRecoTauClusterVariables.h:65
hit
Definition: SiStripHitEffFromCalibTree.cc:88
JetMCTagUtils::genTauDecayMode
std::string genTauDecayMode(const reco::CompositePtrCandidate &c)
Definition: JetMCTag.cc:70
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:117
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
reco::PFRecoTauChargedHadron::kTrack
Definition: PFRecoTauChargedHadron.h:31