CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Typedefs | Functions
reco::tau::disc Namespace Reference

Typedefs

typedef const PFTauTau
 
typedef std::vector< double > VDouble
 

Functions

double AbsEta (Tau tau)
 
double AbsJetEta (Tau tau)
 
VDouble ChargedOutlierAngle (Tau)
 
VDouble ChargedOutlierPt (Tau)
 
double ChargedOutlierSumPt (Tau)
 
VDouble Dalitz (Tau)
 
VDouble Dalitz2 (Tau tau)
 
double DecayMode (Tau tau)
 
double EMFraction (Tau tau)
 
double Eta (Tau tau)
 
VDouble FilteredObjectPt (Tau)
 
VDouble GammaOccupancy (Tau)
 
VDouble GammaPt (Tau)
 
double ImpactParameterSignificance (Tau tau)
 
VDouble InvariantMass (Tau)
 
double InvariantMassOfSignal (Tau tau)
 
VDouble InvariantMassOfSignalWithFiltered (Tau)
 
double IsolationChargedAveragePtFraction (Tau tau)
 
double IsolationChargedPtFraction (Tau tau)
 
double IsolationChargedSumHard (Tau tau)
 
double IsolationChargedSumHardRelative (Tau tau)
 
double IsolationChargedSumSoft (Tau tau)
 
double IsolationChargedSumSoftRelative (Tau tau)
 
double IsolationECALPtFraction (Tau tau)
 
double IsolationECALSumHard (Tau tau)
 
double IsolationECALSumHardRelative (Tau tau)
 
double IsolationECALSumSoft (Tau tau)
 
double IsolationECALSumSoftRelative (Tau tau)
 
double IsolationNeutralHadronPtFraction (Tau tau)
 
double JetEta (Tau tau)
 
double JetPt (Tau tau)
 
double JetTauDR (Tau tau)
 
double JetWidth (Tau tau)
 
PFCandidateRef mainTrack (const PFTau &tau)
 
PFCandidateRef mainTrack (Tau tau)
 
double MainTrackAngle (Tau)
 
double MainTrackEta (Tau)
 
double MainTrackPt (Tau)
 
double MainTrackPtFraction (Tau tau)
 
double Mass (Tau tau)
 
VDouble NeutralOutlierAngle (Tau)
 
VDouble NeutralOutlierPt (Tau)
 
double NeutralOutlierSumPt (Tau)
 
PFCandidateRefVector notMainTrack (Tau tau)
 
double OpeningAngle3D (Tau tau)
 
double OpeningDeltaR (Tau tau)
 
VDouble OutlierAngle (Tau)
 
VDouble OutlierMass (Tau)
 
double OutlierN (Tau)
 
double OutlierNCharged (Tau)
 
VDouble OutlierPt (Tau)
 
double OutlierSumPt (Tau)
 
VDouble PiZeroAngle (Tau)
 
VDouble PiZeroEta (Tau)
 
VDouble PiZeroPt (Tau)
 
double Pt (Tau tau)
 
double ScaledEtaJetCollimation (Tau tau)
 
double ScaledOpeningDeltaR (Tau tau)
 
double ScaledPhiJetCollimation (Tau tau)
 
double SignalPtFraction (Tau tau)
 
VDouble TrackAngle (Tau)
 
VDouble TrackEta (Tau)
 
VDouble TrackPt (Tau)
 

Typedef Documentation

typedef const PFTau& reco::tau::disc::Tau

Definition at line 25 of file RecoTauDiscriminantFunctions.h.

typedef std::vector<double> reco::tau::disc::VDouble

Definition at line 26 of file RecoTauDiscriminantFunctions.h.

Function Documentation

double reco::tau::disc::AbsEta ( Tau  tau)

Definition at line 73 of file RecoTauDiscriminantFunctions.cc.

References abs, and reco::LeafCandidate::eta().

73 { return std::abs(tau.eta()); }
#define abs(x)
Definition: mlp_lapack.h:159
double reco::tau::disc::AbsJetEta ( Tau  tau)

Definition at line 90 of file RecoTauDiscriminantFunctions.cc.

References abs, and reco::PFTau::jetRef().

90  {
91  return std::abs(tau.jetRef()->eta());
92 }
#define abs(x)
Definition: mlp_lapack.h:159
VDouble reco::tau::disc::ChargedOutlierAngle ( Tau  tau)

Definition at line 372 of file RecoTauDiscriminantFunctions.cc.

References extract(), reco::PFTau::isolationPFChargedHadrCands(), and reco::LeafCandidate::p4().

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

372  {
373  return extract(tau.isolationPFChargedHadrCands(), DeltaRToAxis(tau.p4()));
374 }
int extract(std::vector< int > *output, const std::string &dati)
VDouble reco::tau::disc::ChargedOutlierPt ( Tau  tau)

Definition at line 367 of file RecoTauDiscriminantFunctions.cc.

References extract(), reco::PFTau::isolationPFChargedHadrCands(), and reco::LeafCandidate::pt().

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

367  {
368  return extract(tau.isolationPFChargedHadrCands(),
369  std::mem_fun_ref(&PFCandidate::pt));
370 }
int extract(std::vector< int > *output, const std::string &dati)
double reco::tau::disc::ChargedOutlierSumPt ( Tau  tau)

Definition at line 324 of file RecoTauDiscriminantFunctions.cc.

References reco::PFTau::isolationPFChargedHadrCandsPtSum().

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

324  {
325  return tau.isolationPFChargedHadrCandsPtSum();
326 }
VDouble reco::tau::disc::Dalitz ( Tau  tau)

Definition at line 386 of file RecoTauDiscriminantFunctions.cc.

References Dalitz2().

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

386  {
387  return Dalitz2(tau);
388 }
VDouble reco::tau::disc::Dalitz2 ( Tau  tau)

Definition at line 187 of file RecoTauDiscriminantFunctions.cc.

References mainTrack(), notMainTrack(), convertSQLitetoXML_cfg::output, p4, reco::LeafCandidate::p4(), reco::PFTau::signalPiZeroCandidates(), and edm::RefVector< C, T, F >::size().

Referenced by Dalitz().

187  {
188  PFCandidateRef theMainTrack = mainTrack(tau);
189  PFCandidateRefVector otherSignalTracks = notMainTrack(tau);
190  const std::vector<RecoTauPiZero> &pizeros = tau.signalPiZeroCandidates();
191  VDouble output;
192  output.reserve(otherSignalTracks.size() + pizeros.size());
193  // Add combos with tracks
194  BOOST_FOREACH(PFCandidateRef trk, otherSignalTracks) {
195  reco::Candidate::LorentzVector p4 = theMainTrack->p4() + trk->p4();
196  output.push_back(p4.mass());
197  }
198  // Add combos with pizeros
199  BOOST_FOREACH(const RecoTauPiZero &pizero, pizeros) {
200  reco::Candidate::LorentzVector p4 = theMainTrack->p4() + pizero.p4();
201  output.push_back(p4.mass());
202  }
203  return output;
204 }
std::vector< double > VDouble
PFCandidateRef mainTrack(const PFTau &tau)
PFCandidateRefVector notMainTrack(Tau tau)
double p4[4]
Definition: TauolaWrapper.h:92
edm::Ref< PFCandidateCollection > PFCandidateRef
persistent reference to a PFCandidate
edm::RefVector< PFCandidateCollection > PFCandidateRefVector
vector of reference to GenParticleCandidate in the same collection
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:38
double reco::tau::disc::DecayMode ( Tau  tau)

Definition at line 75 of file RecoTauDiscriminantFunctions.cc.

References reco::PFTau::decayMode().

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

75 { return tau.decayMode(); }
double reco::tau::disc::EMFraction ( Tau  tau)

Definition at line 267 of file RecoTauDiscriminantFunctions.cc.

References gather_cfg::cout, reco::PFTau::dump(), edm::Ref< C, T, F >::key(), reco::LeafCandidate::pt(), query::result, reco::PFTau::signalPFChargedHadrCands(), and reco::PFTau::signalPFGammaCands().

267  {
268  //double result = tau.emFraction();
270  BOOST_FOREACH(const reco::PFCandidateRef& gamma, tau.signalPFGammaCands()) {
271  gammaP4 += gamma->p4();
272  }
273  double result = gammaP4.pt()/tau.pt();
274 
275  if (result > 0.99) {
276  std::cout << "EM fraction = " << result
277  << tau << std::endl;
278  tau.dump(std::cout);
279  std::cout << "charged" << std::endl;
280  BOOST_FOREACH(const reco::PFCandidateRef cand, tau.signalPFChargedHadrCands()) {
281  std::cout << " pt: " << cand->pt() << " type: " << cand->particleId() << " key: " << cand.key() << std::endl;
282  }
283  std::cout << "gammas" << std::endl;
284  BOOST_FOREACH(const reco::PFCandidateRef cand, tau.signalPFGammaCands()) {
285  std::cout << " pt: " << cand->pt() << " type: " << cand->particleId() << " key: " << cand.key() << std::endl;
286  }
287  }
288  return result;
289 }
tuple result
Definition: query.py:137
key_type key() const
Accessor for product key.
Definition: Ref.h:266
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:38
tuple cout
Definition: gather_cfg.py:121
double reco::tau::disc::Eta ( Tau  tau)

Definition at line 72 of file RecoTauDiscriminantFunctions.cc.

References reco::LeafCandidate::eta().

Referenced by DeDxDiscriminatorLearner::algoBeginJob(), DeDxDiscriminatorLearnerFromCalibTree::algoBeginJob(), SiStripGainFromData::algoBeginJob(), HcalDetDiagNoiseMonitor::analyze(), ResolutionAnalyzer::analyze(), ggPFClusters::BasicClusterPFCandLink(), FFTJetProducer::beginJob(), HLTJetMETDQMSource::beginRun(), DeDxDiscriminatorProducer::beginRun(), JetMETHLTOfflineSource::beginRun(), AlphaTVarProducer::CalcAlphaT(), AlphaTVarProducer::CalcHT(), L1TauAnalyzer::calcL1MCPFTauMatching(), L1TauAnalyzer::calcL1MCTauMatching(), AlphaTVarProducer::CalcMHT(), reco::PFRecHit::calculatePositionREP(), PFTauDiscriminants::DiscriminantList::DiscriminantList(), L1TauAnalyzer::evalL1extraDecisions(), L1TauAnalyzer::fillGenHistograms(), L1TauAnalyzer::fillL1Histograms(), L1TauAnalyzer::fillPFTauHistograms(), PythiaFilterGammaGamma::filter(), PFJetAlgorithm::FindJets(), DTMuonMillepede::getbqcMatrix(), DTMuonMillepede::getCqcMatrix(), CovarianceMatrix::getEtaDependentScaleFactor(), EcalClusterLocalContCorrection::getValue(), EcalBasicClusterLocalContCorrection::getValue(), EcalClusterCrackCorrection::getValue(), HLTElectronEtFilter::hltFilter(), HLTElectronGenericFilter::hltFilter(), likelihood(), HcalDetDiagPedestalMonitor::LoadDataset(), HcalDetDiagLaserMonitor::LoadDataset(), HcalDetDiagLEDMonitor::LoadReference(), HcalDetDiagPedestalMonitor::LoadReference(), HcalDetDiagLaserMonitor::LoadReference(), EcalClusterLocal::localCoordsEB(), ggPFClusters::localCoordsEB(), EcalClusterLocal::localCoordsEE(), ggPFClusters::localCoordsEE(), reco::PFRecHit::PFRecHit(), ggPFPhotons::PhotonPFCandMatch(), PFTauElecRejectionBenchmark::process(), HcalDetDiagLEDMonitor::SaveReference(), HcalDetDiagPedestalMonitor::SaveReference(), HcalDetDiagLaserMonitor::SaveReference(), KDTreeLinkerTrackHcal::searchLinks(), KDTreeLinkerTrackEcal::searchLinks(), reco::PFRecHit::setCorner(), FastL1BitInfo::setEta(), HLTJetMETDQMSource::PathInfo::setHistos(), BTagHLTOfflineSource::PathInfo::setHistos(), JetMETHLTOfflineSource::PathInfo::setHistos(), LinkByRecHit::testTrackAndClusterByRecHit(), TEcnaHistos::TowerCrystalNumbering(), and PFJetAlgorithm::Update().

72 { return tau.eta(); }
VDouble reco::tau::disc::FilteredObjectPt ( Tau  tau)

Definition at line 392 of file RecoTauDiscriminantFunctions.cc.

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

392 { return VDouble(); }
std::vector< double > VDouble
VDouble reco::tau::disc::GammaOccupancy ( Tau  tau)

Definition at line 393 of file RecoTauDiscriminantFunctions.cc.

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

393 { return VDouble(); }
std::vector< double > VDouble
VDouble reco::tau::disc::GammaPt ( Tau  tau)

Definition at line 394 of file RecoTauDiscriminantFunctions.cc.

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

394 { return VDouble(); }
std::vector< double > VDouble
double reco::tau::disc::ImpactParameterSignificance ( Tau  tau)

Definition at line 291 of file RecoTauDiscriminantFunctions.cc.

References abs, and reco::PFTau::leadPFChargedHadrCandsignedSipt().

291  {
292  return std::abs(tau.leadPFChargedHadrCandsignedSipt());
293 }
#define abs(x)
Definition: mlp_lapack.h:159
VDouble reco::tau::disc::InvariantMass ( Tau  tau)
double reco::tau::disc::InvariantMassOfSignal ( Tau  tau)
VDouble reco::tau::disc::InvariantMassOfSignalWithFiltered ( Tau  tau)

Definition at line 395 of file RecoTauDiscriminantFunctions.cc.

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

395 { return VDouble(); }
std::vector< double > VDouble
double reco::tau::disc::IsolationChargedAveragePtFraction ( Tau  tau)

Definition at line 176 of file RecoTauDiscriminantFunctions.cc.

References reco::PFTau::isolationPFChargedHadrCands(), reco::PFTau::isolationPFChargedHadrCandsPtSum(), reco::PFTau::leadPFChargedHadrCand(), and edm::RefVector< C, T, F >::size().

176  {
177  size_t nIsoCharged = tau.isolationPFChargedHadrCands().size();
178  double averagePt = (nIsoCharged) ?
179  tau.isolationPFChargedHadrCandsPtSum()/nIsoCharged : 0;
180  return averagePt/tau.leadPFChargedHadrCand()->pt();
181 }
double reco::tau::disc::IsolationChargedPtFraction ( Tau  tau)

Definition at line 108 of file RecoTauDiscriminantFunctions.cc.

References reco::PFTau::isolationPFChargedHadrCandsPtSum(), and reco::PFTau::jetRef().

108  {
109  return tau.isolationPFChargedHadrCandsPtSum()/tau.jetRef()->pt();
110 }
double reco::tau::disc::IsolationChargedSumHard ( Tau  tau)

Definition at line 206 of file RecoTauDiscriminantFunctions.cc.

References extract(), reco::PFTau::isolationPFChargedHadrCands(), convertSQLitetoXML_cfg::output, and reco::LeafCandidate::pt().

Referenced by IsolationChargedSumHardRelative().

206  {
207  VDouble isocands = extract(tau.isolationPFChargedHadrCands(),
208  std::mem_fun_ref(&PFCandidate::pt));
209  double output = 0.0;
210  BOOST_FOREACH(double pt, isocands) {
211  if (pt > 1.0)
212  output += pt;
213  }
214  return output;
215 }
std::vector< double > VDouble
int extract(std::vector< int > *output, const std::string &dati)
double reco::tau::disc::IsolationChargedSumHardRelative ( Tau  tau)

Definition at line 229 of file RecoTauDiscriminantFunctions.cc.

References IsolationChargedSumHard(), and reco::PFTau::jetRef().

229  {
230  return IsolationChargedSumHard(tau)/tau.jetRef()->pt();
231 }
double IsolationChargedSumHard(Tau tau)
double reco::tau::disc::IsolationChargedSumSoft ( Tau  tau)

Definition at line 217 of file RecoTauDiscriminantFunctions.cc.

References extract(), reco::PFTau::isolationPFChargedHadrCands(), convertSQLitetoXML_cfg::output, and reco::LeafCandidate::pt().

Referenced by IsolationChargedSumSoftRelative().

217  {
218  VDouble isocands = extract(tau.isolationPFChargedHadrCands(),
219  std::mem_fun_ref(&PFCandidate::pt));
220  double output = 0.0;
221  BOOST_FOREACH(double pt, isocands) {
222  if (pt < 1.0)
223  output += pt;
224  }
225  return output;
226 }
std::vector< double > VDouble
int extract(std::vector< int > *output, const std::string &dati)
double reco::tau::disc::IsolationChargedSumSoftRelative ( Tau  tau)

Definition at line 233 of file RecoTauDiscriminantFunctions.cc.

References IsolationChargedSumSoft(), and reco::PFTau::jetRef().

233  {
234  return IsolationChargedSumSoft(tau)/tau.jetRef()->pt();
235 }
double IsolationChargedSumSoft(Tau tau)
double reco::tau::disc::IsolationECALPtFraction ( Tau  tau)

Definition at line 112 of file RecoTauDiscriminantFunctions.cc.

References reco::PFTau::isolationPFGammaCandsEtSum(), and reco::PFTau::jetRef().

112  {
113  return tau.isolationPFGammaCandsEtSum()/tau.jetRef()->pt();
114 }
double reco::tau::disc::IsolationECALSumHard ( Tau  tau)

Definition at line 237 of file RecoTauDiscriminantFunctions.cc.

References extract(), reco::PFTau::isolationPFGammaCands(), convertSQLitetoXML_cfg::output, and reco::LeafCandidate::pt().

Referenced by IsolationECALSumHardRelative().

237  {
238  VDouble isocands = extract(tau.isolationPFGammaCands(),
239  std::mem_fun_ref(&PFCandidate::pt));
240  double output = 0.0;
241  BOOST_FOREACH(double pt, isocands) {
242  if (pt > 1.5)
243  output += pt;
244  }
245  return output;
246 }
std::vector< double > VDouble
int extract(std::vector< int > *output, const std::string &dati)
double reco::tau::disc::IsolationECALSumHardRelative ( Tau  tau)

Definition at line 260 of file RecoTauDiscriminantFunctions.cc.

References IsolationECALSumHard(), and reco::PFTau::jetRef().

260  {
261  return IsolationECALSumHard(tau)/tau.jetRef()->pt();
262 }
double IsolationECALSumHard(Tau tau)
double reco::tau::disc::IsolationECALSumSoft ( Tau  tau)

Definition at line 248 of file RecoTauDiscriminantFunctions.cc.

References extract(), reco::PFTau::isolationPFGammaCands(), convertSQLitetoXML_cfg::output, and reco::LeafCandidate::pt().

Referenced by IsolationECALSumSoftRelative().

248  {
249  VDouble isocands = extract(tau.isolationPFGammaCands(),
250  std::mem_fun_ref(&PFCandidate::pt));
251  double output = 0.0;
252  BOOST_FOREACH(double pt, isocands) {
253  if (pt < 1.5)
254  output += pt;
255  }
256  return output;
257 }
std::vector< double > VDouble
int extract(std::vector< int > *output, const std::string &dati)
double reco::tau::disc::IsolationECALSumSoftRelative ( Tau  tau)

Definition at line 263 of file RecoTauDiscriminantFunctions.cc.

References IsolationECALSumSoft(), and reco::PFTau::jetRef().

263  {
264  return IsolationECALSumSoft(tau)/tau.jetRef()->pt();
265 }
double IsolationECALSumSoft(Tau tau)
double reco::tau::disc::IsolationNeutralHadronPtFraction ( Tau  tau)

Definition at line 116 of file RecoTauDiscriminantFunctions.cc.

References reco::PFTau::isolationPFNeutrHadrCands(), and reco::PFTau::jetRef().

116  {
117  double sum = 0.0;
118  BOOST_FOREACH(PFCandidateRef cand, tau.isolationPFNeutrHadrCands()) {
119  sum += cand->pt();
120  }
121  return sum/tau.jetRef()->pt();
122 }
edm::Ref< PFCandidateCollection > PFCandidateRef
persistent reference to a PFCandidate
double reco::tau::disc::JetEta ( Tau  tau)

Definition at line 86 of file RecoTauDiscriminantFunctions.cc.

References reco::PFTau::jetRef().

86  {
87  return tau.jetRef()->eta();
88 }
double reco::tau::disc::JetPt ( Tau  tau)
double reco::tau::disc::JetTauDR ( Tau  tau)

Definition at line 100 of file RecoTauDiscriminantFunctions.cc.

References reco::deltaR(), reco::PFTau::jetRef(), and reco::LeafCandidate::p4().

100  {
101  return reco::deltaR(tau.p4(), tau.jetRef()->p4());
102 }
double deltaR(double eta1, double phi1, double eta2, double phi2)
Definition: deltaR.h:19
double reco::tau::disc::JetWidth ( Tau  tau)

Definition at line 94 of file RecoTauDiscriminantFunctions.cc.

References abs, reco::PFTau::jetRef(), and mathSSE::sqrt().

94  {
95  return std::sqrt(
96  std::abs(tau.jetRef()->etaetaMoment()) +
97  std::abs(tau.jetRef()->phiphiMoment()));
98 }
#define abs(x)
Definition: mlp_lapack.h:159
T sqrt(T t)
Definition: SSEVec.h:46
PFCandidateRef reco::tau::disc::mainTrack ( const PFTau &  tau)

For three prong events, take the track that has charge opposite to the composite charge.

Referenced by Dalitz2(), MainTrackAngle(), MainTrackEta(), MainTrackPt(), MainTrackPtFraction(), and notMainTrack().

PFCandidateRef reco::tau::disc::mainTrack ( Tau  tau)

Definition at line 49 of file RecoTauDiscriminantFunctions.cc.

References reco::LeafCandidate::charge(), reco::PFTau::leadPFChargedHadrCand(), reco::PFTau::signalPFChargedHadrCands(), and edm::RefVector< C, T, F >::size().

49  {
50  if (tau.signalPFChargedHadrCands().size() == 3) {
51  for (size_t itrk = 0; itrk < 3; ++itrk) {
52  if (tau.signalPFChargedHadrCands()[itrk]->charge() * tau.charge() < 0)
53  return tau.signalPFChargedHadrCands()[itrk];
54  }
55  }
56  return tau.leadPFChargedHadrCand();
57 }
double reco::tau::disc::MainTrackAngle ( Tau  tau)

Definition at line 314 of file RecoTauDiscriminantFunctions.cc.

References reco::deltaR(), mainTrack(), and reco::LeafCandidate::p4().

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

314  {
316  return (!trk) ? 0.0 : deltaR(trk->p4(), tau.p4());
317 }
PFCandidateRef mainTrack(const PFTau &tau)
edm::Ref< PFCandidateCollection > PFCandidateRef
persistent reference to a PFCandidate
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
double reco::tau::disc::MainTrackEta ( Tau  tau)

Definition at line 309 of file RecoTauDiscriminantFunctions.cc.

References mainTrack().

309  {
311  return (!trk) ? 0.0 : trk->eta();
312 }
PFCandidateRef mainTrack(const PFTau &tau)
edm::Ref< PFCandidateCollection > PFCandidateRef
persistent reference to a PFCandidate
double reco::tau::disc::MainTrackPt ( Tau  tau)

Definition at line 304 of file RecoTauDiscriminantFunctions.cc.

References mainTrack().

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

304  {
306  return (!trk) ? 0.0 : trk->pt();
307 }
PFCandidateRef mainTrack(const PFTau &tau)
edm::Ref< PFCandidateCollection > PFCandidateRef
persistent reference to a PFCandidate
double reco::tau::disc::MainTrackPtFraction ( Tau  tau)

Definition at line 183 of file RecoTauDiscriminantFunctions.cc.

References reco::PFTau::jetRef(), and mainTrack().

183  {
184  return mainTrack(tau)->pt()/tau.jetRef()->pt();
185 }
PFCandidateRef mainTrack(const PFTau &tau)
double reco::tau::disc::Mass ( Tau  tau)
VDouble reco::tau::disc::NeutralOutlierAngle ( Tau  tau)

Definition at line 381 of file RecoTauDiscriminantFunctions.cc.

References extract(), reco::PFTau::isolationPFGammaCands(), and reco::LeafCandidate::p4().

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

381  {
382  return extract(tau.isolationPFGammaCands(), DeltaRToAxis(tau.p4()));
383 }
int extract(std::vector< int > *output, const std::string &dati)
VDouble reco::tau::disc::NeutralOutlierPt ( Tau  tau)

Definition at line 376 of file RecoTauDiscriminantFunctions.cc.

References extract(), reco::PFTau::isolationPFGammaCands(), and reco::LeafCandidate::pt().

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

376  {
377  return extract(tau.isolationPFGammaCands(),
378  std::mem_fun_ref(&PFCandidate::pt));
379 }
int extract(std::vector< int > *output, const std::string &dati)
double reco::tau::disc::NeutralOutlierSumPt ( Tau  tau)

Definition at line 328 of file RecoTauDiscriminantFunctions.cc.

References reco::PFTau::isolationPFGammaCandsEtSum().

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

328  {
329  return tau.isolationPFGammaCandsEtSum();
330 }
PFCandidateRefVector reco::tau::disc::notMainTrack ( Tau  tau)

Definition at line 59 of file RecoTauDiscriminantFunctions.cc.

References mainTrack(), convertSQLitetoXML_cfg::output, edm::RefVector< C, T, F >::push_back(), edm::RefVector< C, T, F >::reserve(), reco::PFTau::signalPFChargedHadrCands(), and edm::RefVector< C, T, F >::size().

Referenced by Dalitz2(), TrackAngle(), TrackEta(), and TrackPt().

60 {
61  const PFCandidateRef& mainTrackRef = mainTrack(tau);
63  output.reserve(tau.signalPFChargedHadrCands().size() - 1);
64  BOOST_FOREACH(const PFCandidateRef& ref, tau.signalPFChargedHadrCands()) {
65  if (ref != mainTrackRef)
66  output.push_back(ref);
67  }
68  return output;
69 }
PFCandidateRef mainTrack(const PFTau &tau)
edm::Ref< PFCandidateCollection > PFCandidateRef
persistent reference to a PFCandidate
edm::RefVector< PFCandidateCollection > PFCandidateRefVector
vector of reference to GenParticleCandidate in the same collection
double reco::tau::disc::OpeningAngle3D ( Tau  tau)

Definition at line 141 of file RecoTauDiscriminantFunctions.cc.

References angle(), reco::LeafCandidate::p4(), and reco::PFTau::signalPFCands().

141  {
142  double sumE = 0;
143  double weightedAngle = 0;
144  BOOST_FOREACH(const reco::PFCandidateRef& cand, tau.signalPFCands()) {
145  double candE = cand->energy();
146  double candAngle = angle(cand->p4(), tau.p4());
147  sumE += candE;
148  weightedAngle += candAngle*candE;
149  }
150  return (sumE > 0) ? weightedAngle/sumE : 0.0;
151 }
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
double reco::tau::disc::OpeningDeltaR ( Tau  tau)

Definition at line 129 of file RecoTauDiscriminantFunctions.cc.

References reco::deltaR(), reco::LeafCandidate::p4(), and reco::PFTau::signalPFCands().

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

129  {
130  double sumEt = 0;
131  double weightedDeltaR = 0;
132  BOOST_FOREACH(const reco::PFCandidateRef& cand, tau.signalPFCands()) {
133  double candEt = cand->et();
134  double candDeltaR = reco::deltaR(cand->p4(), tau.p4());
135  sumEt += candEt;
136  weightedDeltaR += candDeltaR*candEt;
137  }
138  return (sumEt > 0) ? weightedDeltaR/sumEt : 0.0;
139 }
double deltaR(double eta1, double phi1, double eta2, double phi2)
Definition: deltaR.h:19
VDouble reco::tau::disc::OutlierAngle ( Tau  tau)

Definition at line 363 of file RecoTauDiscriminantFunctions.cc.

References extract(), reco::PFTau::isolationPFCands(), and reco::LeafCandidate::p4().

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

363  {
364  return extract(tau.isolationPFCands(), DeltaRToAxis(tau.p4()));
365 }
int extract(std::vector< int > *output, const std::string &dati)
VDouble reco::tau::disc::OutlierMass ( Tau  tau)

Definition at line 397 of file RecoTauDiscriminantFunctions.cc.

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

397 { return VDouble(); }
std::vector< double > VDouble
double reco::tau::disc::OutlierN ( Tau  tau)

Definition at line 295 of file RecoTauDiscriminantFunctions.cc.

References reco::PFTau::isolationPFChargedHadrCands(), reco::PFTau::isolationPFGammaCands(), and edm::RefVector< C, T, F >::size().

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

295  {
296  return tau.isolationPFChargedHadrCands().size() +
297  tau.isolationPFGammaCands().size();
298 }
double reco::tau::disc::OutlierNCharged ( Tau  tau)

Definition at line 300 of file RecoTauDiscriminantFunctions.cc.

References reco::PFTau::isolationPFChargedHadrCands(), and edm::RefVector< C, T, F >::size().

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

300  {
301  return tau.isolationPFChargedHadrCands().size();
302 }
VDouble reco::tau::disc::OutlierPt ( Tau  tau)

Definition at line 359 of file RecoTauDiscriminantFunctions.cc.

References extract(), reco::PFTau::isolationPFCands(), and reco::LeafCandidate::pt().

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

359  {
360  return extract(tau.isolationPFCands(), std::mem_fun_ref(&PFCandidate::pt));
361 }
int extract(std::vector< int > *output, const std::string &dati)
double reco::tau::disc::OutlierSumPt ( Tau  tau)

Definition at line 319 of file RecoTauDiscriminantFunctions.cc.

References reco::PFTau::isolationPFChargedHadrCandsPtSum(), and reco::PFTau::isolationPFGammaCandsEtSum().

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

319  {
320  return tau.isolationPFChargedHadrCandsPtSum() +
321  tau.isolationPFGammaCandsEtSum();
322 }
VDouble reco::tau::disc::PiZeroAngle ( Tau  tau)

Definition at line 354 of file RecoTauDiscriminantFunctions.cc.

References extract(), reco::LeafCandidate::p4(), and reco::PFTau::signalPiZeroCandidates().

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

354  {
355  return extract(tau.signalPiZeroCandidates(), DeltaRToAxis(tau.p4()));
356 }
int extract(std::vector< int > *output, const std::string &dati)
VDouble reco::tau::disc::PiZeroEta ( Tau  tau)

Definition at line 350 of file RecoTauDiscriminantFunctions.cc.

References reco::LeafCandidate::eta(), extract(), and reco::PFTau::signalPiZeroCandidates().

350  {
351  return extract(tau.signalPiZeroCandidates(), std::mem_fun_ref(&RecoTauPiZero::eta));
352 }
T eta() const
int extract(std::vector< int > *output, const std::string &dati)
VDouble reco::tau::disc::PiZeroPt ( Tau  tau)

Definition at line 346 of file RecoTauDiscriminantFunctions.cc.

References extract(), reco::LeafCandidate::pt(), and reco::PFTau::signalPiZeroCandidates().

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

346  {
347  return extract(tau.signalPiZeroCandidates(), std::mem_fun_ref(&RecoTauPiZero::pt));
348 }
int extract(std::vector< int > *output, const std::string &dati)
double reco::tau::disc::Pt ( Tau  tau)

Definition at line 71 of file RecoTauDiscriminantFunctions.cc.

References reco::LeafCandidate::pt().

Referenced by AlphaT::AlphaT(), CaloTowerAnalyzer::analyze(), HCALRecHitAnalyzer::analyze(), DijetMass< Jet >::analyze(), VVVValidation::analyze(), ResolutionAnalyzer::analyze(), GlobalTrackerMuonAlignment::analyzeTrackTrack(), GlobalTrackerMuonAlignment::analyzeTrackTrajectory(), JetMETHLTOfflineSource::beginRun(), L1TauAnalyzer::calcL1MCPFTauMatching(), L1TauAnalyzer::calcL1MCTauMatching(), PFTauDiscriminants::DiscriminantList::DiscriminantList(), L1TauAnalyzer::evalL1extraDecisions(), PythiaFilterGammaGamma::filter(), PFBlockAlgo::goodPtResolution(), GlobalTrackerMuonAlignment::gradientGlobal(), GlobalTrackerMuonAlignment::gradientLocal(), BaseParticlePropagator::helixRadius(), HLTElectronEtFilter::hltFilter(), HLTElectronGenericFilter::hltFilter(), HLTDoublet< T1, T2 >::hltFilter(), HLTJetSortedVBFFilter< T >::hltFilter(), alpha_T::operator()(), BaseParticlePropagator::propagate(), BaseParticlePropagator::propagateToBeamCylinder(), BaseParticlePropagator::propagateToClosestApproach(), CSCTFPtMethods::Pt2Stn(), CSCTFPtMethods::Pt2Stn2010(), CSCTFPtMethods::Pt2Stn2011(), CSCTFPtMethods::Pt2Stn2012(), CSCTFPtMethods::Pt2Stn2012_DT(), CSCTFPtMethods::Pt3Stn(), CSCTFPtMethods::Pt3Stn2010(), CSCTFPtMethods::Pt3Stn2011(), CSCTFPtMethods::Pt3Stn2012(), CSCTFPtMethods::Pt3Stn2012_DT(), MuScleFit::selectMuons(), BTagHLTOfflineSource::PathInfo::setHistos(), JetMETHLTOfflineSource::PathInfo::setHistos(), ECALRecHitAnalyzer::WriteECALRecHits(), and BaseParticlePropagator::xyImpactParameter().

71 { return tau.pt(); }
double reco::tau::disc::ScaledEtaJetCollimation ( Tau  tau)

Definition at line 124 of file RecoTauDiscriminantFunctions.cc.

References abs, reco::PFTau::jetRef(), and mathSSE::sqrt().

124  {
125  return tau.jetRef()->pt()*sqrt(std::abs(
126  tau.jetRef()->etaetaMoment()));
127 }
#define abs(x)
Definition: mlp_lapack.h:159
T sqrt(T t)
Definition: SSEVec.h:46
double reco::tau::disc::ScaledOpeningDeltaR ( Tau  tau)

Definition at line 153 of file RecoTauDiscriminantFunctions.cc.

References reco::deltaR(), i, j, max(), p4, reco::LeafCandidate::pt(), reco::PFTau::signalPFCands(), and edm::RefVector< C, T, F >::size().

153  {
154  double max = 0.0;
155  const PFCandidateRefVector& cands = tau.signalPFCands();
156  for (size_t i = 0; i < cands.size()-1; ++i) {
157  for (size_t j = i+1; j < cands.size(); ++j) {
158  double deltaRVal = deltaR(cands[i]->p4(), cands[j]->p4());
159  if (deltaRVal > max) {
160  max = deltaRVal;
161  }
162  }
163  }
164  // Correct for resolution
165  if ( max < 0.05 )
166  max = 0.05;
167  // Make invariant of PT
168  return max*tau.pt();;
169 }
int i
Definition: DBlmapReader.cc:9
const T & max(const T &a, const T &b)
double p4[4]
Definition: TauolaWrapper.h:92
int j
Definition: DBlmapReader.cc:9
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
edm::RefVector< PFCandidateCollection > PFCandidateRefVector
vector of reference to GenParticleCandidate in the same collection
double reco::tau::disc::ScaledPhiJetCollimation ( Tau  tau)

Definition at line 171 of file RecoTauDiscriminantFunctions.cc.

References abs, reco::PFTau::jetRef(), and mathSSE::sqrt().

171  {
172  return tau.jetRef()->pt()*sqrt(std::abs(
173  tau.jetRef()->phiphiMoment()));
174 }
#define abs(x)
Definition: mlp_lapack.h:159
T sqrt(T t)
Definition: SSEVec.h:46
double reco::tau::disc::SignalPtFraction ( Tau  tau)

Definition at line 104 of file RecoTauDiscriminantFunctions.cc.

References reco::PFTau::jetRef(), and reco::LeafCandidate::pt().

104  {
105  return tau.pt()/tau.jetRef()->pt();
106 }
VDouble reco::tau::disc::TrackAngle ( Tau  tau)

Definition at line 341 of file RecoTauDiscriminantFunctions.cc.

References extract(), notMainTrack(), and reco::LeafCandidate::p4().

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList(), and DTLocalTriggerEfficiencyTest::runClientDiagnostic().

341  {
342  return extract(notMainTrack(tau), DeltaRToAxis(tau.p4()));
343 }
PFCandidateRefVector notMainTrack(Tau tau)
int extract(std::vector< int > *output, const std::string &dati)
VDouble reco::tau::disc::TrackEta ( Tau  tau)

Definition at line 337 of file RecoTauDiscriminantFunctions.cc.

References reco::LeafCandidate::eta(), extract(), and notMainTrack().

337  {
338  return extract(notMainTrack(tau), std::mem_fun_ref(&PFCandidate::eta));
339 }
T eta() const
PFCandidateRefVector notMainTrack(Tau tau)
int extract(std::vector< int > *output, const std::string &dati)
VDouble reco::tau::disc::TrackPt ( Tau  tau)

Definition at line 333 of file RecoTauDiscriminantFunctions.cc.

References extract(), notMainTrack(), and reco::LeafCandidate::pt().

Referenced by PFTauDiscriminants::DiscriminantList::DiscriminantList().

333  {
334  return extract(notMainTrack(tau), std::mem_fun_ref(&PFCandidate::pt));
335 }
PFCandidateRefVector notMainTrack(Tau tau)
int extract(std::vector< int > *output, const std::string &dati)