10 if (bField_ ==
nullptr)
12 <<
"B-Field was not set up CandCommonVertexFitter.\n" 13 <<
"the following method must be called before fitting a candidate:\n" 14 <<
" CandCommonVertexFitter:.set( const MagneticField * )" << endl;
15 vector<TransientTrack>
tracks;
17 vector<RecoCandidate::TrackType> trackTypes;
25 vector<TransientTrack>::const_iterator trackIt =
tracks.begin(), tracksEnd =
tracks.end();
26 vector<Candidate *>::const_iterator daughterIt =
daughters.begin();
27 vector<RecoCandidate::TrackType>::const_iterator trackTypeIt = trackTypes.begin();
29 for (; trackIt != tracksEnd; ++trackIt, ++daughterIt, ++trackTypeIt) {
51 c.setChi2AndNdof(chi2_ =
v.chi2(), ndof_ =
v.ndof());
53 c.setCovariance(cov_);
55 c.setChi2AndNdof(chi2_ = -1, ndof_ = 0);
62 vector<RecoCandidate::TrackType> &trackTypes,
64 size_t nDau =
c.numberOfDaughters();
65 for (
unsigned int j = 0;
j < nDau; ++
j) {
68 ostringstream message;
69 message <<
"Can't access in write mode candidate daughters. " 70 <<
"pdgId = " <<
c.pdgId() <<
".\n";
73 message <<
"Null daughter also found in read-only mode\n";
75 message <<
"Daughter found in read-only mode with id: " <<
d1->pdgId() <<
"\n";
78 if (
d->numberOfDaughters() > 0)
86 trackTypes.push_back(
type);
88 cerr <<
">>> warning: candidate of type " <<
d->pdgId() <<
" has no track reference." << endl;
virtual double energy() const =0
energy
virtual void setP4(const LorentzVector &p4)=0
set 4-momentum
virtual double mass() const =0
mass
math::Error< 5 >::type CovarianceMatrix
void fill(std::vector< reco::TransientTrack > &, std::vector< reco::Candidate *> &, std::vector< reco::RecoCandidate::TrackType > &, reco::Candidate &) const
virtual void setVertex(const Point &vertex)=0
set vertex
auto const & tracks
cannot be loose
void set(const MagneticField *bField)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
math::XYZPoint Point
point in the space
static constexpr float d1