Definition at line 31 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, reco::Candidate::energy(), Exception, lumiContext::fill, trackingPlots::fit, reco::RecoCandidate::gsfTrackType, edm::errors::InvalidReference, reco::Candidate::longLived(), PV3DBase< T, PVType, FrameType >::mag(), ResonanceBuilder::mass, AlCaHLTBitMon_ParallelJobs::p, p3, HadronAndPartonSelector_cfi::particles, Scenarios_cff::scale, reco::VertexCompositeCandidate::setChi2AndNdof(), reco::VertexCompositeCandidate::setCovariance(), reco::Candidate::setP4(), reco::LeafCandidate::setP4(), reco::Candidate::setVertex(), reco::LeafCandidate::setVertex(), mathSSE::sqrt(), extraflags_cff::vtx, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
34 <<
"B-Field was not set up CandKinematicVertexFitter.\n" 35 <<
"the following method must be called before fitting a candidate:\n" 36 <<
" CandKinematicVertexFitter:.set( const MagneticField * )" << endl;
37 vector<RefCountedKinematicParticle>
particles;
39 vector<RecoCandidate::TrackType> trackTypes;
41 fill(particles, daughters, trackTypes, c);
42 assert(particles.size() == daughters.size());
47 tree_->movePointerToTheTop();
50 if(vertex->vertexIsValid()) {
53 vector<RefCountedKinematicParticle> treeParticles =
tree_->daughterParticles();
54 vector<RefCountedKinematicParticle>::const_iterator particleIt = treeParticles.begin();
55 vector<Candidate *>::const_iterator daughterIt = daughters.begin(), daughtersEnd = daughters.end();
56 vector<RecoCandidate::TrackType>::const_iterator trackTypeIt = trackTypes.begin();
58 for(; daughterIt != daughtersEnd; ++ particleIt, ++ daughterIt, ++trackTypeIt) {
61 double px = p3.
x(), py = p3.
y(), pz = p3.
z(),
p = p3.
mag();
66 switch(*trackTypeIt) {
67 case RecoCandidate::gsfTrackType :
69 energy = daughter.
energy();
73 double mass = (*particleIt)->currentState().mass();
74 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