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

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

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 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, 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 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, 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 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, 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_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(), muons2muons_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 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_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 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:444
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:428
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11776
input
static const std::string input
Definition: EdmProvDump.cc:48
BaseParticlePropagator::propagateToEcalEntrance
bool propagateToEcalEntrance(bool first=true)
Definition: BaseParticlePropagator.cc:450
reco::tau::kOldDMwoLT
Definition: PFRecoTauClusterVariables.h:59
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
HLT_FULL_cff.nCharged
nCharged
Definition: HLT_FULL_cff.py:33315
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
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
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
reco::tau::kDBoldDMwLT
Definition: PFRecoTauClusterVariables.h:63
pos
Definition: PixelAliasList.h:18
electrons_cff.ptRatio
ptRatio
Definition: electrons_cff.py:214
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:363
HLT_FULL_cff.nPiZeros
nPiZeros
Definition: HLT_FULL_cff.py:33314
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
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: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
edm::Ref< TrackCollection >
pfDeepBoostedJetPreprocessParams_cfi.pfcand
pfcand
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:8
trigObjTnPSource_cfi.var
var
Definition: trigObjTnPSource_cfi.py:21
cms::Iterator
TGeoIterator Iterator
Definition: DDFilteredView.h:54
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::kNewDMwLT
Definition: PFRecoTauClusterVariables.h:62
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::tau::kDBnewDMwLTwGJPhase2
Definition: PFRecoTauClusterVariables.h:69
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:98
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:58
reco::tau::kDBnewDMwLTwGJ
Definition: PFRecoTauClusterVariables.h:68
edm::numEntries
Long64_t numEntries(TFile *hdl, std::string const &trname)
Definition: CollUtil.cc:50
TrackingRecHit::bad
Definition: TrackingRecHit.h:49
reco::tau::kPWoldDMwLT
Definition: PFRecoTauClusterVariables.h:65
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
HLT_FULL_cff.cands
cands
Definition: HLT_FULL_cff.py:15205
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
pat::PackedCandidate
Definition: PackedCandidate.h:22
reco::tau::kDBnewDMwLT
Definition: PFRecoTauClusterVariables.h:64
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: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:66
reco::tau::kDBoldDMwLTwGJ
Definition: PFRecoTauClusterVariables.h:67
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: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:33312
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:773
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: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
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
reco::tau::kNewDMwoLT
Definition: PFRecoTauClusterVariables.h:61
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
reco::tau::kOldDMwLT
Definition: PFRecoTauClusterVariables.h:60
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
reco::tau::kPWnewDMwLT
Definition: PFRecoTauClusterVariables.h:66
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:624
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