CMS 3D CMS Logo

PFTauTransverseImpactParameter.cc
Go to the documentation of this file.
2 #include "TMatrixT.h"
3 #include "TMatrixTSym.h"
4 #include "TVectorT.h"
5 using namespace reco;
6 
8  double thedxy,
9  double thedxy_error,
10  const Point& pca3d,
11  double theip3d,
12  double theip3d_error,
13  const VertexRef& PV)
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.) {}
23 
25  double thedxy,
26  double thedxy_error,
27  const Point& pca3d,
28  double theip3d,
29  double theip3d_error,
30  const VertexRef& PV,
31  const Point& theFlightLength,
32  double theFlightLengthSig,
33  const VertexRef& SV)
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) {}
45 
47  return new PFTauTransverseImpactParameter(*this);
48 }
49 
51  if (PV_.isNonnull())
52  return PV_->position();
53  else
54  return PFTauTransverseImpactParameter::Point(0., 0., 0.);
55 }
56 
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 }
66 
68  return FlightLength_;
69 }
70 
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 }
81 
83  if (hasSV_)
84  return SV_->position();
85  else
86  return PFTauTransverseImpactParameter::Point(0., 0., 0.);
87 }
88 
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 }
100 
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 }
reco::PFTauTransverseImpactParameter::flightLengthCov
CovMatrix flightLengthCov() const
Definition: PFTauTransverseImpactParameter.cc:101
mps_fire.i
i
Definition: mps_fire.py:355
reco::PFTauTransverseImpactParameter::FlightLengthSig_
double FlightLengthSig_
Definition: PFTauTransverseImpactParameter.h:80
funct::false
false
Definition: Factorize.h:34
reco::PFTauTransverseImpactParameter::hasSV_
bool hasSV_
Definition: PFTauTransverseImpactParameter.h:78
reco::PFTauTransverseImpactParameter::Vector
math::XYZVector Vector
Definition: PFTauTransverseImpactParameter.h:32
reco::PFTauTransverseImpactParameter::dimension
Definition: PFTauTransverseImpactParameter.h:26
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
nanoDQM_cfi.PV
PV
Definition: nanoDQM_cfi.py:440
reco::PFTauTransverseImpactParameter::primaryVertexPos
Point primaryVertexPos() const
Definition: PFTauTransverseImpactParameter.cc:50
edm::Ref< VertexCollection >
reco::PFTauTransverseImpactParameter::secondaryVertexPos
Point secondaryVertexPos() const
Definition: PFTauTransverseImpactParameter.cc:82
reco::PFTauTransverseImpactParameter::flightLengthSig
double flightLengthSig() const
Definition: PFTauTransverseImpactParameter.cc:71
reco::PFTauTransverseImpactParameter::PFTauTransverseImpactParameter
PFTauTransverseImpactParameter()
Definition: PFTauTransverseImpactParameter.h:34
pfDeepBoostedJetPreprocessParams_cfi.sv
sv
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:226
reco::PFTauTransverseImpactParameter::clone
PFTauTransverseImpactParameter * clone() const
Definition: PFTauTransverseImpactParameter.cc:46
reco::PFTauTransverseImpactParameter
Definition: PFTauTransverseImpactParameter.h:25
reco::PFTauTransverseImpactParameter::primaryVertexCov
CovMatrix primaryVertexCov() const
Definition: PFTauTransverseImpactParameter.cc:57
PFTauTransverseImpactParameter.h
funct::true
true
Definition: Factorize.h:173
reco::PFTauTransverseImpactParameter::CovMatrix
math::Error< dimension >::type CovMatrix
Definition: PFTauTransverseImpactParameter.h:30
Point
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
nanoDQM_cfi.SV
SV
Definition: nanoDQM_cfi.py:528
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
reco::PFTauTransverseImpactParameter::SV_
VertexRef SV_
Definition: PFTauTransverseImpactParameter.h:81
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
reco::PFTauTransverseImpactParameter::flightLength
const Vector & flightLength() const
Definition: PFTauTransverseImpactParameter.cc:67