|
|
Go to the documentation of this file.
56 map<const reco::Candidate*, const reco::Candidate*> iMap;
57 const vector<const reco::Candidate*>& daug =
daughters();
61 for (
i = 0;
i <
n; ++
i) {
65 for (
i = 0;
i <
n; ++
i) {
69 const vector<BPHRecoConstCandPtr>& dComp =
daughComp();
72 for (
j = 0;
j <
m; ++
j) {
74 const map<const reco::Candidate*, double>&
dMap = rc->
dMSig;
75 const map<const BPHRecoCandidate*, FlyingParticle>&
cMap = rc->
cKinP;
106 if (
pos != string::npos) {
107 edm::LogPrint(
"WrongRequest") <<
"BPHKinematicFit::setIndependentFit: "
108 <<
"cascade decay specification not admitted " <<
name;
112 if (
comp ==
nullptr) {
113 edm::LogPrint(
"ParticleNotFound") <<
"BPHKinematicFit::setIndependentFit: " <<
name <<
" daughter not found";
134 vector<RefCountedKinematicParticle> plist;
138 set<RefCountedKinematicParticle>
pset;
142 for (
i = 0;
i <
n; ++
i) {
151 if (
pos != string::npos)
179 vector<RefCountedKinematicParticle> kPart;
181 if (ptr ==
nullptr) {
182 edm::LogPrint(
"ParticleNotFound") <<
"BPHKinematicFit::kinematicTree: " <<
name <<
" daughter not found";
203 vector<RefCountedKinematicParticle> kComp;
204 vector<RefCountedKinematicParticle> kTail;
206 if (ptr ==
nullptr) {
207 edm::LogPrint(
"ParticleNotFound") <<
"BPHKinematicFit::kinematicTree: " <<
name <<
" daughter not found";
213 if (compTree->isEmpty())
217 compTree = kinFitter.
fit(kc, compTree);
218 if (compTree->isEmpty())
221 compTree->movePointerToTheTop();
222 if (!kTail.empty()) {
224 if (!compPart->currentState().isValid())
226 kTail.push_back(compPart);
232 edm::LogPrint(
"FitFailed") <<
"BPHKinematicFit::kinematicTree: "
241 vector<RefCountedKinematicParticle> kPart;
243 edm::LogPrint(
"ParticleNotFound") <<
"BPHKinematicFit::kinematicTree: " <<
name <<
" daughter not found";
265 if (kPart.get() ==
nullptr)
267 return kPart->currentState().isValid();
274 return kinTree->currentParticle();
280 return kinTree->currentDecayVertex();
293 kinTree->movePointerToTheTop();
294 return kinTree->currentDecayVertex();
299 if (kPart.get() ==
nullptr)
316 map<const reco::Candidate*, double>::const_iterator iter =
dMSig.find(
cand);
317 return (iter !=
dMSig.end() ? iter->second : -1);
323 map<const BPHRecoCandidate*, FlyingParticle>::const_iterator iter =
cKinP.find(
comp);
324 return (iter !=
cKinP.end() ? iter->second.flag :
false);
345 const map<const reco::Candidate*, double>&
dMap =
comp->dMSig;
346 const map<const BPHRecoCandidate*, FlyingParticle>&
cMap =
comp->cKinP;
372 map<const reco::Candidate*, RefCountedKinematicParticle>& km,
373 map<const BPHRecoCandidate*, RefCountedKinematicParticle>& cm)
const {
374 const vector<const reco::Candidate*>& daug =
daughters();
397 double sigma =
fp.sigma;
398 if ((
mass > 0.0) && (sigma > 0.0))
415 vector<RefCountedKinematicParticle>& kl,
416 set<RefCountedKinematicParticle>& ks)
const {
418 if (cptr !=
nullptr) {
419 if (
cKinP.at(cptr).flag) {
424 list.push_back(daug);
426 const vector<string>& dNames = cptr->
daugNames();
427 const vector<string>& cNames = cptr->
compNames();
428 list.insert(
list.end(), dNames.begin(), dNames.end());
429 list.insert(
list.end(), cNames.begin(), cNames.end());
436 if (dptr !=
nullptr) {
440 edm::LogPrint(
"ParticleNotFound") <<
"BPHKinematicFit::getParticles: " << moth <<
" not found";
445 const vector<string>& daug,
446 vector<RefCountedKinematicParticle>& kl,
447 set<RefCountedKinematicParticle>& ks)
const {
450 for (
i = 0;
i <
n; ++
i) {
451 const string&
name = daug[
i];
453 if (
pos != string::npos)
464 unsigned int n =
cand->daughters().size();
465 const vector<string>& cnames =
cand->compNames();
466 int i = cnames.size();
478 vector<RefCountedKinematicParticle>& kl,
479 set<RefCountedKinematicParticle>& ks) {
480 if (ks.find(
kp) != ks.end())
488 vector<RefCountedKinematicParticle>* kComp,
489 vector<RefCountedKinematicParticle>* kTail)
const {
496 if (kTail ==
nullptr)
506 if (
comp !=
nullptr) {
509 edm::LogPrint(
"ParticleNotFound") <<
"BPHKinematicFit::splitKP: " <<
name <<
" daughter not found";
513 vector<string> nfull(2);
516 vector<RefCountedKinematicParticle> kPart =
kinParticles(nfull);
517 vector<RefCountedKinematicParticle>::const_iterator iter = kPart.begin();
518 vector<RefCountedKinematicParticle>::const_iterator imid = iter + ns;
519 vector<RefCountedKinematicParticle>::const_iterator iend = kPart.end();
520 kComp->insert(kComp->end(), iter, imid);
521 kTail->insert(kTail->end(), imid, iend);
531 edm::LogPrint(
"FitFailed") <<
"BPHKinematicFit::kinematicTree: "
545 double m = ks.
mass();
549 edm::LogPrint(
"FitNotFound") <<
"BPHKinematicFit::fitMomentum: "
550 <<
"simple momentum sum computed";
552 const vector<const reco::Candidate*>& daug =
daughters();
virtual const RefCountedKinematicVertex currentDecayVertex() const
virtual const std::vector< BPHRecoConstCandPtr > & daughComp() const
virtual bool isEmpty() const
get fit status
double getMassSigma(const reco::Candidate *cand) const
retrieve particle mass sigma
std::map< const reco::Candidate *, double > dMSig
virtual void addV(const std::string &name, const reco::Candidate *daug, const std::string &searchList, double mass)
virtual unsigned int numParticles(const BPHKinematicFit *cand=nullptr) const
std::map< std::string, BPHRecoConstCandPtr > cMap
reco::TransientTrack * getTransientTrack(const reco::Candidate *cand) const
get TransientTrack for a daughter
GlobalVector globalMomentum() const
ReferenceCountingPointer< KinematicParticle > RefCountedKinematicParticle
virtual void buildParticles() const
std::vector< RefCountedKinematicParticle > allParticles
virtual const reco::Candidate * getDaug(const std::string &name) const
virtual const RefCountedKinematicParticle currentParticle() const
get current particle
double constrMass() const
retrieve the constraint
RefCountedKinematicTree fit(const std::vector< RefCountedKinematicParticle > &part)
const std::string names[nVars_]
virtual void getParticles(const std::string &moth, const std::string &daug, std::vector< RefCountedKinematicParticle > &kl, std::set< RefCountedKinematicParticle > &ks) const
virtual void addParticles(std::vector< RefCountedKinematicParticle > &kl, std::map< const reco::Candidate *, RefCountedKinematicParticle > &km, std::map< const BPHRecoCandidate *, RefCountedKinematicParticle > &cm) const
virtual bool isValidFit() const
void setNotUpdated() const override
RefCountedKinematicParticle particle(const reco::TransientTrack &initialTrack, const ParticleMass &massGuess, float chiSquared, float degreesOfFr, float &m_sigma) const
RefCountedKinematicTree fit(const std::vector< RefCountedKinematicParticle > &particles) const
virtual const math::XYZTLorentzVector & p4() const
compute total momentum after the fit
math::XYZTLorentzVector totalMomentum
~BPHKinematicFit() override
virtual const RefCountedKinematicVertex topDecayVertex() const
virtual const RefCountedKinematicParticle topParticle() const
get top particle
static void insertParticle(RefCountedKinematicParticle &kp, std::vector< RefCountedKinematicParticle > &kl, std::set< RefCountedKinematicParticle > &ks)
std::map< const reco::Candidate *, RefCountedKinematicParticle > kinMap
std::map< const BPHRecoCandidate *, RefCountedKinematicParticle > kCDMap
double constrSigma() const
virtual BPHRecoConstCandPtr getComp(const std::string &name) const
virtual ParticleMass mass() const
std::vector< BPHRecoConstCandPtr > tmpList
virtual const RefCountedKinematicTree & kinematicTree() const
perform the kinematic fit and get the result
void setConstraint(double mass, double sigma)
apply a mass constraint
ParticleMass mass() const
std::vector< RefCountedKinematicTree > fit(KinematicConstraint *cs, const std::vector< RefCountedKinematicTree > &trees) const
virtual const std::vector< std::string > & compNames() const
virtual const reco::Candidate * originalReco(const reco::Candidate *daug) const
get the original particle from the clone
virtual void addK(const std::string &name, const reco::Candidate *daug, double mass=-1.0, double sigma=-1.0)
void setNotUpdated() const override
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
virtual const std::vector< const reco::Candidate * > & daughFull() const
virtual void fitMomentum() const
ReferenceCountingPointer< KinematicVertex > RefCountedKinematicVertex
virtual void resetKinematicFit() const
reset the kinematic fit
virtual BPHRecoCandidate * clone(int level=-1) const
virtual const std::vector< const reco::Candidate * > & daughters() const
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*", "!HLTx*" if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL. It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of "!*" before the partial wildcard feature was incorporated). Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
virtual const std::vector< std::string > & daugNames() const
ReferenceCountingPointer< KinematicTree > RefCountedKinematicTree
std::map< const BPHRecoCandidate *, FlyingParticle > cKinP
bool getIndependentFit(const std::string &name) const
retrieve independent fit flag
const std::vector< Component > & componentList() const
RefCountedKinematicTree kinTree
std::map< std::string, const reco::Candidate * > dMap
virtual const BPHKinematicFit * splitKP(const std::string &name, std::vector< RefCountedKinematicParticle > *kComp, std::vector< RefCountedKinematicParticle > *kTail=nullptr) const
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
BPHGenericPtr< const BPHRecoCandidate >::type BPHRecoConstCandPtr
virtual const std::vector< RefCountedKinematicParticle > & kinParticles() const
get kinematic particles