CMS 3D CMS Logo

VertexCompositeCandidate.h
Go to the documentation of this file.
1 #ifndef DataFormats_Candidate_VertexCompositeCandidate_H
2 #define DataFormats_Candidate_VertexCompositeCandidate_H
3 
14 
15 namespace reco {
17  public:
21  Charge q, const LorentzVector &p4, const Point &vtx, int pdgId = 0, int status = 0, bool integerCharge = true)
22  : CompositeCandidate(q, p4, vtx, pdgId, status, integerCharge), chi2_(0), ndof_(0) {}
25  const LorentzVector &p4,
26  const Point &vtx,
27  const CovarianceMatrix &err,
28  double chi2,
29  double ndof,
30  int pdgId = 0,
31  int status = 0,
32  bool integerCharge = true);
38  ~VertexCompositeCandidate() override;
40  VertexCompositeCandidate *clone() const override;
42  double vertexChi2() const override { return chi2_; }
49  double vertexNdof() const override { return ndof_; }
51  double vertexNormalizedChi2() const override { return chi2_ / ndof_; }
53  double vertexCovariance(int i, int j) const override { return covariance_[idx(i, j)]; }
54  using reco::LeafCandidate::vertexCovariance; // avoid hiding the
56  void fillVertexCovariance(CovarianceMatrix &v) const override;
58  void setChi2AndNdof(double chi2, double ndof) {
59  chi2_ = chi2;
60  ndof_ = ndof;
61  }
63  void setCovariance(const CovarianceMatrix &m);
64 
65  private:
67  Double32_t chi2_;
69  Double32_t ndof_;
71  Double32_t covariance_[size];
73  index idx(index i, index j) const {
74  int a = (i <= j ? i : j), b = (i <= j ? j : i);
75  return b * (b + 1) / 2 + a;
76  }
77  };
78 
79 } // namespace reco
80 
81 #endif
reco::Candidate::size
Definition: Candidate.h:48
mps_fire.i
i
Definition: mps_fire.py:428
reco::LeafCandidate::vertexCovariance
CovarianceMatrix vertexCovariance() const final
return SMatrix
Definition: LeafCandidate.h:211
CompositeCandidate.h
reco::LeafCandidate::status
int status() const final
status word
Definition: LeafCandidate.h:180
reco::Candidate::Charge
int Charge
electric charge type
Definition: Candidate.h:34
reco::VertexCompositeCandidate::clone
VertexCompositeCandidate * clone() const override
returns a clone of the candidate
Definition: VertexCompositeCandidate.cc:20
CovarianceMatrix
Definition: CovarianceMatrix.h:28
reco::VertexCompositeCandidate
Definition: VertexCompositeCandidate.h:16
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
findQualityFiles.v
v
Definition: findQualityFiles.py:179
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
ndof
Definition: HIMultiTrackSelector.h:49
reco::VertexCompositeCandidate::~VertexCompositeCandidate
~VertexCompositeCandidate() override
destructor
Definition: VertexCompositeCandidate.cc:18
reco::VertexCompositeCandidate::chi2_
Double32_t chi2_
chi-sqared
Definition: VertexCompositeCandidate.h:67
reco::VertexCompositeCandidate::covariance_
Double32_t covariance_[size]
covariance matrix (3x3) as vector
Definition: VertexCompositeCandidate.h:71
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
reco::VertexCompositeCandidate::VertexCompositeCandidate
VertexCompositeCandidate(const Candidate &p)
constructor from values
Definition: VertexCompositeCandidate.h:34
reco::VertexCompositeCandidate::idx
index idx(index i, index j) const
position index
Definition: VertexCompositeCandidate.h:73
b
double b
Definition: hdecay.h:118
reco::LeafCandidate::Charge
int Charge
electric charge type
Definition: LeafCandidate.h:21
Point
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
reco::VertexCompositeCandidate::vertexNormalizedChi2
double vertexNormalizedChi2() const override
chi-squared divided by n.d.o.f.
Definition: VertexCompositeCandidate.h:51
a
double a
Definition: hdecay.h:119
reco::VertexCompositeCandidate::setChi2AndNdof
void setChi2AndNdof(double chi2, double ndof)
set chi2 and ndof
Definition: VertexCompositeCandidate.h:58
reco::VertexCompositeCandidate::vertexCovariance
double vertexCovariance(int i, int j) const override
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: VertexCompositeCandidate.h:53
reco::LeafCandidate::pdgId
int pdgId() const final
PDG identifier.
Definition: LeafCandidate.h:176
reco::VertexCompositeCandidate::ndof_
Double32_t ndof_
number of degrees of freedom
Definition: VertexCompositeCandidate.h:69
reco::LeafCandidate::p4
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:114
submitPVResolutionJobs.q
q
Definition: submitPVResolutionJobs.py:84
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
reco::Candidate
Definition: Candidate.h:27
reco::VertexCompositeCandidate::VertexCompositeCandidate
VertexCompositeCandidate()
Definition: VertexCompositeCandidate.h:18
extraflags_cff.vtx
vtx
Definition: extraflags_cff.py:18
reco::VertexCompositeCandidate::vertexChi2
double vertexChi2() const override
chi-squares
Definition: VertexCompositeCandidate.h:42
LorentzVector
math::XYZTLorentzVector LorentzVector
Definition: HLTMuonMatchAndPlot.h:49
reco::VertexCompositeCandidate::fillVertexCovariance
void fillVertexCovariance(CovarianceMatrix &v) const override
fill SMatrix
Definition: VertexCompositeCandidate.cc:22
reco::LeafCandidate::p
double p() const final
magnitude of momentum vector
Definition: LeafCandidate.h:123
reco::VertexCompositeCandidate::VertexCompositeCandidate
VertexCompositeCandidate(Charge q, const LorentzVector &p4, const Point &vtx, int pdgId=0, int status=0, bool integerCharge=true)
constructor from values
Definition: VertexCompositeCandidate.h:20
reco::Candidate::index
unsigned int index
index type
Definition: Candidate.h:50
reco::VertexCompositeCandidate::vertexNdof
double vertexNdof() const override
Definition: VertexCompositeCandidate.h:49
reco::VertexCompositeCandidate::setCovariance
void setCovariance(const CovarianceMatrix &m)
set covariance matrix
Definition: VertexCompositeCandidate.cc:29
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
VertexCompositeCandidateFwd.h
reco::VertexCompositeCandidate::VertexCompositeCandidate
VertexCompositeCandidate(const CompositeCandidate &p)
constructor from values
Definition: VertexCompositeCandidate.h:36
reco::CompositeCandidate
Definition: CompositeCandidate.h:21