1 #ifndef HeavyFlavorAnalysis_RecoDecay_BPHKinematicFit_h 2 #define HeavyFlavorAnalysis_RecoDecay_BPHKinematicFit_h 63 virtual const std::vector<RefCountedKinematicParticle>&
kinParticles()
const;
64 virtual std::vector<RefCountedKinematicParticle>
kinParticles(
const std::vector<std::string>&
names)
const;
116 double sigma = -1.0);
129 std::map<const reco::Candidate*, double>
dMSig;
137 std::map<const BPHRecoCandidate*, FlyingParticle>
cKinP;
140 mutable std::vector<BPHRecoConstCandPtr>
tmpList;
146 mutable std::map<const reco::Candidate*, RefCountedKinematicParticle>
kinMap;
147 mutable std::map<const BPHRecoCandidate*, RefCountedKinematicParticle>
kCDMap;
154 virtual void addParticles(std::vector<RefCountedKinematicParticle>& kl,
155 std::map<const reco::Candidate*, RefCountedKinematicParticle>& km,
156 std::map<const BPHRecoCandidate*, RefCountedKinematicParticle>& cm)
const;
159 std::vector<RefCountedKinematicParticle>& kl,
160 std::set<RefCountedKinematicParticle>& ks,
163 const std::vector<std::string>& daug,
164 std::vector<RefCountedKinematicParticle>& kl,
165 std::set<RefCountedKinematicParticle>& ks,
169 std::vector<RefCountedKinematicParticle>& kl,
170 std::set<RefCountedKinematicParticle>& ks);
172 std::vector<RefCountedKinematicParticle>* kComp,
173 std::vector<RefCountedKinematicParticle>* kTail =
nullptr)
const;
virtual const RefCountedKinematicParticle topParticle() const
get top particle
virtual const RefCountedKinematicTree & kinematicTree() const
perform the kinematic fit and get the result
virtual const BPHKinematicFit * splitKP(const std::string &name, std::vector< RefCountedKinematicParticle > *kComp, std::vector< RefCountedKinematicParticle > *kTail=nullptr) const
virtual void fitMomentum() const
virtual void addK(const std::string &name, const reco::Candidate *daug, double mass=-1.0, double sigma=-1.0)
BPHGenericPtr< const BPHRecoCandidate >::type BPHRecoConstCandPtr
std::map< const BPHRecoCandidate *, RefCountedKinematicParticle > kCDMap
virtual unsigned int numParticles(const BPHKinematicFit *cand=nullptr) const
bool getIndependentFit(const std::string &name, double &mass, double &sigma) const
retrieve independent fit flag
virtual void addParticles(std::vector< RefCountedKinematicParticle > &kl, std::map< const reco::Candidate *, RefCountedKinematicParticle > &km, std::map< const BPHRecoCandidate *, RefCountedKinematicParticle > &cm) const
virtual const RefCountedKinematicVertex topDecayVertex() const
~BPHKinematicFit() override=default
virtual const std::vector< RefCountedKinematicParticle > & kinParticles() const
get kinematic particles
const std::string names[nVars_]
BPHKinematicFit(const BPHKinematicFit &x)=delete
std::vector< BPHRecoConstCandPtr > tmpList
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
std::map< const reco::Candidate *, RefCountedKinematicParticle > kinMap
void setNotUpdated() const override
void setIndependentFit(const std::string &name, bool flag=true, double mass=-1.0, double sigma=-1.0)
set a decaying daughter as an unique particle fitted independently
std::map< const reco::Candidate *, double > dMSig
virtual const RefCountedKinematicVertex currentDecayVertex() const
BPHKinematicFit & operator=(const BPHKinematicFit &x)=delete
static void insertParticle(RefCountedKinematicParticle &kp, std::vector< RefCountedKinematicParticle > &kl, std::set< RefCountedKinematicParticle > &ks)
virtual void resetKinematicFit() const
reset the kinematic fit
virtual bool isValidFit() const
std::vector< RefCountedKinematicParticle > allParticles
RefCountedKinematicTree kinTree
std::map< const BPHRecoCandidate *, FlyingParticle > cKinP
virtual const RefCountedKinematicParticle currentParticle() const
get current particle
virtual bool isEmpty() const
get fit status
double constrMass() const
retrieve the constraint
virtual const math::XYZTLorentzVector & p4() const
compute total momentum after the fit
virtual void buildParticles() const
void setConstraint(double mass, double sigma)
apply a mass constraint
math::XYZTLorentzVector totalMomentum
double getMassSigma(const reco::Candidate *cand) const
retrieve particle mass sigma
virtual ParticleMass mass() const
virtual void getParticles(const std::string &moth, const std::string &daug, std::vector< RefCountedKinematicParticle > &kl, std::set< RefCountedKinematicParticle > &ks, const BPHKinematicFit *curr) const
double constrSigma() const