CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Types | Private Attributes
reco::PFTauTransverseImpactParameter Class Reference

#include <PFTauTransverseImpactParameter.h>

Public Types

typedef math::Error< dimension >::type CovMatrix
 
typedef math::XYZPoint Point
 
typedef math::XYZVector Vector
 

Public Member Functions

PFTauTransverseImpactParameterclone () const
 
double dxy () const
 
double dxy_error () const
 
const Pointdxy_PCA () const
 
double dxy_Sig () const
 
const VectorflightLength () const
 
CovMatrix flightLengthCov () const
 
double flightLengthSig () const
 
bool hasSecondaryVertex () const
 
double ip3d () const
 
double ip3d_error () const
 
const Pointip3d_PCA () const
 
double ip3d_Sig () const
 
 PFTauTransverseImpactParameter ()
 
 PFTauTransverseImpactParameter (const Point &, double, double, const Point &, double, double, const VertexRef &)
 constructor from values More...
 
 PFTauTransverseImpactParameter (const Point &, double, double, const Point &, double, double, const VertexRef &, const Point &, double, const VertexRef &)
 
const VertexRefprimaryVertex () const
 
CovMatrix primaryVertexCov () const
 
Point primaryVertexPos () const
 
const VertexRefsecondaryVertex () const
 
CovMatrix secondaryVertexCov () const
 
Point secondaryVertexPos () const
 
virtual ~PFTauTransverseImpactParameter ()
 

Private Types

enum  { dimension = 3 }
 
enum  { covarianceSize = dimension * (dimension + 1) / 2 }
 

Private Attributes

double dxy_
 
double dxy_error_
 
Vector FlightLength_
 
double FlightLengthSig_
 
bool hasSV_
 
double ip3d_
 
double ip3d_error_
 
Point pca3d_
 
Point pca_
 
VertexRef PV_
 
VertexRef SV_
 

Detailed Description

Definition at line 25 of file PFTauTransverseImpactParameter.h.

Member Typedef Documentation

◆ CovMatrix

Definition at line 30 of file PFTauTransverseImpactParameter.h.

◆ Point

Definition at line 31 of file PFTauTransverseImpactParameter.h.

◆ Vector

Definition at line 32 of file PFTauTransverseImpactParameter.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
dimension 

Definition at line 26 of file PFTauTransverseImpactParameter.h.

26 { dimension = 3 };

◆ anonymous enum

anonymous enum
private
Enumerator
covarianceSize 

Definition at line 27 of file PFTauTransverseImpactParameter.h.

27 { covarianceSize = dimension * (dimension + 1) / 2 };

Constructor & Destructor Documentation

◆ PFTauTransverseImpactParameter() [1/3]

reco::PFTauTransverseImpactParameter::PFTauTransverseImpactParameter ( )
inline

Definition at line 34 of file PFTauTransverseImpactParameter.h.

34 {}

Referenced by clone().

◆ PFTauTransverseImpactParameter() [2/3]

PFTauTransverseImpactParameter::PFTauTransverseImpactParameter ( const Point pca,
double  thedxy,
double  thedxy_error,
const Point pca3d,
double  theip3d,
double  theip3d_error,
const VertexRef PV 
)

constructor from values

Definition at line 7 of file PFTauTransverseImpactParameter.cc.

14  : pca_(pca),
15  dxy_(thedxy),
16  dxy_error_(thedxy_error),
17  pca3d_(pca3d),
18  ip3d_(theip3d),
19  ip3d_error_(theip3d_error),
20  PV_(PV),
21  hasSV_(false),
22  FlightLengthSig_(0.) {}

◆ PFTauTransverseImpactParameter() [3/3]

PFTauTransverseImpactParameter::PFTauTransverseImpactParameter ( const Point pca,
double  thedxy,
double  thedxy_error,
const Point pca3d,
double  theip3d,
double  theip3d_error,
const VertexRef PV,
const Point theFlightLength,
double  theFlightLengthSig,
const VertexRef SV 
)

Definition at line 24 of file PFTauTransverseImpactParameter.cc.

34  : pca_(pca),
35  dxy_(thedxy),
36  dxy_error_(thedxy_error),
37  pca3d_(pca3d),
38  ip3d_(theip3d),
39  ip3d_error_(theip3d_error),
40  PV_(PV),
41  hasSV_(true),
42  FlightLength_(theFlightLength),
43  FlightLengthSig_(theFlightLengthSig),
44  SV_(SV) {}

◆ ~PFTauTransverseImpactParameter()

virtual reco::PFTauTransverseImpactParameter::~PFTauTransverseImpactParameter ( )
inlinevirtual

Definition at line 48 of file PFTauTransverseImpactParameter.h.

48 {}

Member Function Documentation

◆ clone()

PFTauTransverseImpactParameter * PFTauTransverseImpactParameter::clone ( void  ) const

Definition at line 46 of file PFTauTransverseImpactParameter.cc.

46  {
47  return new PFTauTransverseImpactParameter(*this);
48 }

References PFTauTransverseImpactParameter().

◆ dxy()

double reco::PFTauTransverseImpactParameter::dxy ( ) const
inline

◆ dxy_error()

double reco::PFTauTransverseImpactParameter::dxy_error ( ) const
inline

Definition at line 53 of file PFTauTransverseImpactParameter.h.

53 { return dxy_error_; }

References dxy_error_.

Referenced by pat::PATTauProducer::produce().

◆ dxy_PCA()

const Point& reco::PFTauTransverseImpactParameter::dxy_PCA ( ) const
inline

Definition at line 51 of file PFTauTransverseImpactParameter.h.

51 { return pca_; }

References pca_.

Referenced by pat::PATTauProducer::produce().

◆ dxy_Sig()

double reco::PFTauTransverseImpactParameter::dxy_Sig ( ) const
inline

◆ flightLength()

const PFTauTransverseImpactParameter::Vector & PFTauTransverseImpactParameter::flightLength ( ) const

◆ flightLengthCov()

PFTauTransverseImpactParameter::CovMatrix PFTauTransverseImpactParameter::flightLengthCov ( ) const

Definition at line 101 of file PFTauTransverseImpactParameter.cc.

101  {
102  CovMatrix cov;
103  const CovMatrix& sv = secondaryVertexCov();
104  const CovMatrix& pv = primaryVertexCov();
105  for (int i = 0; i < dimension; ++i) {
106  for (int j = 0; j < dimension; ++j) {
107  cov(i, j) = sv(i, j) + pv(i, j);
108  }
109  }
110  return cov;
111 }

References dimension, mps_fire::i, dqmiolumiharvest::j, primaryVertexCov(), MetAnalyzer::pv(), secondaryVertexCov(), and pfDeepBoostedJetPreprocessParams_cfi::sv.

◆ flightLengthSig()

double PFTauTransverseImpactParameter::flightLengthSig ( ) const

Definition at line 71 of file PFTauTransverseImpactParameter.cc.

71  {
72  if (hasSV_) {
73  //std::cout << "<PFTauTransverseImpactParameter::flightLengthSig>:" << std::endl;
74  //VertexDistance3D vtxdist;
75  //std::cout << "oldValue = " << vtxdist.distance(*PV_, *SV_).significance() << std::endl; // transforms using the jacobian then computes distance/uncertainty
76  //std::cout << "newValue = " << FlightLengthSig_ << std::endl;
77  return FlightLengthSig_;
78  }
79  return -9.9;
80 }

References FlightLengthSig_, and hasSV_.

Referenced by PFRecoTauDiscriminationByIsolationMVA2::discriminate(), reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::discriminate(), and pat::PATTauProducer::produce().

◆ hasSecondaryVertex()

bool reco::PFTauTransverseImpactParameter::hasSecondaryVertex ( ) const
inline

◆ ip3d()

double reco::PFTauTransverseImpactParameter::ip3d ( ) const
inline

◆ ip3d_error()

double reco::PFTauTransverseImpactParameter::ip3d_error ( ) const
inline

Definition at line 57 of file PFTauTransverseImpactParameter.h.

57 { return ip3d_error_; }

References ip3d_error_.

Referenced by pat::PATTauProducer::produce().

◆ ip3d_PCA()

const Point& reco::PFTauTransverseImpactParameter::ip3d_PCA ( ) const
inline

Definition at line 55 of file PFTauTransverseImpactParameter.h.

55 { return pca3d_; }

References pca3d_.

◆ ip3d_Sig()

double reco::PFTauTransverseImpactParameter::ip3d_Sig ( ) const
inline

Definition at line 58 of file PFTauTransverseImpactParameter.h.

58 { return (ip3d_error_ != 0) ? (ip3d_ / ip3d_error_) : 0.; }

References ip3d_, and ip3d_error_.

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

◆ primaryVertex()

const VertexRef& reco::PFTauTransverseImpactParameter::primaryVertex ( ) const
inline

Definition at line 59 of file PFTauTransverseImpactParameter.h.

59 { return PV_; }

References PV_.

◆ primaryVertexCov()

PFTauTransverseImpactParameter::CovMatrix PFTauTransverseImpactParameter::primaryVertexCov ( ) const

Definition at line 57 of file PFTauTransverseImpactParameter.cc.

57  {
58  CovMatrix cov;
59  for (int i = 0; i < dimension; ++i) {
60  for (int j = 0; j < dimension; ++j) {
61  cov(i, j) = PV_->covariance(i, j);
62  }
63  }
64  return cov;
65 }

References dimension, mps_fire::i, dqmiolumiharvest::j, and PV_.

Referenced by flightLengthCov().

◆ primaryVertexPos()

PFTauTransverseImpactParameter::Point PFTauTransverseImpactParameter::primaryVertexPos ( ) const

Definition at line 50 of file PFTauTransverseImpactParameter.cc.

50  {
51  if (PV_.isNonnull())
52  return PV_->position();
53  else
54  return PFTauTransverseImpactParameter::Point(0., 0., 0.);
55 }

References edm::Ref< C, T, F >::isNonnull(), and PV_.

◆ secondaryVertex()

const VertexRef& reco::PFTauTransverseImpactParameter::secondaryVertex ( ) const
inline

Definition at line 66 of file PFTauTransverseImpactParameter.h.

66 { return SV_; }

References SV_.

◆ secondaryVertexCov()

PFTauTransverseImpactParameter::CovMatrix PFTauTransverseImpactParameter::secondaryVertexCov ( ) const

Definition at line 89 of file PFTauTransverseImpactParameter.cc.

89  {
90  CovMatrix cov;
91  if (!hasSV_)
92  return cov;
93  for (int i = 0; i < dimension; ++i) {
94  for (int j = 0; j < dimension; ++j) {
95  cov(i, j) = SV_->covariance(i, j);
96  }
97  }
98  return cov;
99 }

References dimension, hasSV_, mps_fire::i, dqmiolumiharvest::j, and SV_.

Referenced by flightLengthCov().

◆ secondaryVertexPos()

PFTauTransverseImpactParameter::Point PFTauTransverseImpactParameter::secondaryVertexPos ( ) const

Definition at line 82 of file PFTauTransverseImpactParameter.cc.

82  {
83  if (hasSV_)
84  return SV_->position();
85  else
86  return PFTauTransverseImpactParameter::Point(0., 0., 0.);
87 }

References hasSV_, and SV_.

Member Data Documentation

◆ dxy_

double reco::PFTauTransverseImpactParameter::dxy_
private

Definition at line 72 of file PFTauTransverseImpactParameter.h.

Referenced by dxy(), and dxy_Sig().

◆ dxy_error_

double reco::PFTauTransverseImpactParameter::dxy_error_
private

Definition at line 73 of file PFTauTransverseImpactParameter.h.

Referenced by dxy_error(), and dxy_Sig().

◆ FlightLength_

Vector reco::PFTauTransverseImpactParameter::FlightLength_
private

Definition at line 79 of file PFTauTransverseImpactParameter.h.

Referenced by flightLength().

◆ FlightLengthSig_

double reco::PFTauTransverseImpactParameter::FlightLengthSig_
private

Definition at line 80 of file PFTauTransverseImpactParameter.h.

Referenced by flightLengthSig().

◆ hasSV_

bool reco::PFTauTransverseImpactParameter::hasSV_
private

◆ ip3d_

double reco::PFTauTransverseImpactParameter::ip3d_
private

Definition at line 75 of file PFTauTransverseImpactParameter.h.

Referenced by ip3d(), and ip3d_Sig().

◆ ip3d_error_

double reco::PFTauTransverseImpactParameter::ip3d_error_
private

Definition at line 76 of file PFTauTransverseImpactParameter.h.

Referenced by ip3d_error(), and ip3d_Sig().

◆ pca3d_

Point reco::PFTauTransverseImpactParameter::pca3d_
private

Definition at line 74 of file PFTauTransverseImpactParameter.h.

Referenced by ip3d_PCA().

◆ pca_

Point reco::PFTauTransverseImpactParameter::pca_
private

Definition at line 71 of file PFTauTransverseImpactParameter.h.

Referenced by dxy_PCA().

◆ PV_

VertexRef reco::PFTauTransverseImpactParameter::PV_
private

◆ SV_

VertexRef reco::PFTauTransverseImpactParameter::SV_
private
mps_fire.i
i
Definition: mps_fire.py:428
reco::PFTauTransverseImpactParameter::FlightLengthSig_
double FlightLengthSig_
Definition: PFTauTransverseImpactParameter.h:80
reco::PFTauTransverseImpactParameter::hasSV_
bool hasSV_
Definition: PFTauTransverseImpactParameter.h:78
reco::PFTauTransverseImpactParameter::ip3d_error_
double ip3d_error_
Definition: PFTauTransverseImpactParameter.h:76
reco::PFTauTransverseImpactParameter::dxy_error_
double dxy_error_
Definition: PFTauTransverseImpactParameter.h:73
reco::PFTauTransverseImpactParameter::pca_
Point pca_
Definition: PFTauTransverseImpactParameter.h:71
nanoDQM_cfi.PV
PV
Definition: nanoDQM_cfi.py:520
reco::PFTauTransverseImpactParameter::covarianceSize
Definition: PFTauTransverseImpactParameter.h:27
reco::PFTauTransverseImpactParameter::ip3d_
double ip3d_
Definition: PFTauTransverseImpactParameter.h:75
reco::PFTauTransverseImpactParameter::PFTauTransverseImpactParameter
PFTauTransverseImpactParameter()
Definition: PFTauTransverseImpactParameter.h:34
pfDeepBoostedJetPreprocessParams_cfi.sv
sv
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:352
reco::PFTauTransverseImpactParameter::pca3d_
Point pca3d_
Definition: PFTauTransverseImpactParameter.h:74
reco::PFTauTransverseImpactParameter::primaryVertexCov
CovMatrix primaryVertexCov() const
Definition: PFTauTransverseImpactParameter.cc:57
reco::PFTauTransverseImpactParameter::CovMatrix
math::Error< dimension >::type CovMatrix
Definition: PFTauTransverseImpactParameter.h:30
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
nanoDQM_cfi.SV
SV
Definition: nanoDQM_cfi.py:616
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
reco::PFTauTransverseImpactParameter::SV_
VertexRef SV_
Definition: PFTauTransverseImpactParameter.h:81
reco::PFTauTransverseImpactParameter::dxy_
double dxy_
Definition: PFTauTransverseImpactParameter.h:72
reco::PFTauTransverseImpactParameter::dimension
Definition: PFTauTransverseImpactParameter.h:26
reco::PFTauTransverseImpactParameter::Point
math::XYZPoint Point
Definition: PFTauTransverseImpactParameter.h:31
reco::PFTauTransverseImpactParameter::PV_
VertexRef PV_
Definition: PFTauTransverseImpactParameter.h:77
reco::PFTauTransverseImpactParameter::secondaryVertexCov
CovMatrix secondaryVertexCov() const
Definition: PFTauTransverseImpactParameter.cc:89
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
reco::PFTauTransverseImpactParameter::FlightLength_
Vector FlightLength_
Definition: PFTauTransverseImpactParameter.h:79