Definition at line 32 of file CandKinematicVertexFitter.cc.
References GlobalErrorBase< T, ErrorWeightType >::cxx(), GlobalErrorBase< T, ErrorWeightType >::cyx(), GlobalErrorBase< T, ErrorWeightType >::cyy(), GlobalErrorBase< T, ErrorWeightType >::czx(), GlobalErrorBase< T, ErrorWeightType >::czy(), GlobalErrorBase< T, ErrorWeightType >::czz(), BPhysicsValidation_cfi::daughters, HCALHighEnergyHPDFilter_cfi::energy, reco::Candidate::energy(), runTheMatrix::err, Exception, ntuplemaker::fill, trackingPlots::fit, reco::RecoCandidate::gsfTrackType, edm::errors::InvalidReference, reco::Candidate::longLived(), PV3DBase< T, PVType, FrameType >::mag(), EgHLTOffHistBins_cfi::mass, AlCaHLTBitMon_ParallelJobs::p, p3, ecalTrigSettings_cff::particles, multPhiCorr_741_25nsDY_cfi::px, multPhiCorr_741_25nsDY_cfi::py, Scenarios_cff::scale, reco::VertexCompositeCandidate::setChi2AndNdof(), reco::VertexCompositeCandidate::setCovariance(), reco::Candidate::setP4(), reco::LeafCandidate::setP4(), reco::Candidate::setVertex(), reco::LeafCandidate::setVertex(), mathSSE::sqrt(), bphysicsOniaDQM_cfi::vertex, badGlobalMuonTaggersAOD_cff::vtx, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
35 <<
"B-Field was not set up CandKinematicVertexFitter.\n" 36 <<
"the following method must be called before fitting a candidate:\n" 37 <<
" CandKinematicVertexFitter:.set( const MagneticField * )" << endl;
38 vector<RefCountedKinematicParticle>
particles;
40 vector<RecoCandidate::TrackType> trackTypes;
42 fill(particles, daughters, trackTypes, c);
43 assert(particles.size() == daughters.size());
48 tree_->movePointerToTheTop();
51 if (vertex->vertexIsValid()) {
54 vector<RefCountedKinematicParticle> treeParticles =
tree_->daughterParticles();
55 vector<RefCountedKinematicParticle>::const_iterator particleIt = treeParticles.begin();
56 vector<Candidate *>::const_iterator daughterIt = daughters.begin(), daughtersEnd = daughters.end();
57 vector<RecoCandidate::TrackType>::const_iterator trackTypeIt = trackTypes.begin();
59 for (; daughterIt != daughtersEnd; ++particleIt, ++daughterIt, ++trackTypeIt) {
62 double px = p3.
x(),
py = p3.
y(), pz = p3.
z(),
p = p3.
mag();
68 switch (*trackTypeIt) {
69 case RecoCandidate::gsfTrackType:
71 energy = daughter.
energy();
78 double mass = (*particleIt)->currentState().mass();
79 energy =
sqrt(
p *
p + mass * mass);
RefCountedKinematicTree tree_
fit tree
virtual void setP4(const LorentzVector &p4)=0
set 4-momentum
double ndof_
number of degrees of freedom
virtual bool longLived() const =0
is long lived?
void setVertex(const Point &vertex) override
set vertex
bool fit(const std::vector< RefCountedKinematicParticle > &tracks) const
void setChi2AndNdof(double chi2, double ndof)
set chi2 and ndof
virtual double energy() const =0
energy
virtual void setVertex(const Point &vertex)=0
set vertex
void setCovariance(const CovarianceMatrix &m)
set covariance matrix
reco::Vertex::CovarianceMatrix CovarianceMatrix
CovarianceMatrix cov_
covariance matrix (3x3)
const MagneticField * bField_
math::XYZTLorentzVector LorentzVector
Lorentz vector.
void fill(std::vector< RefCountedKinematicParticle > &, std::vector< reco::Candidate * > &, std::vector< reco::RecoCandidate::TrackType > &, reco::Candidate &) const
math::XYZPoint Point
point in the space
void setP4(const LorentzVector &p4) final
set 4-momentum