42 const string& daug1Name,
45 const string& daug2Name,
59 pCollection(posCollection),
60 nCollection(negCollection),
73 vector<Particle*> pList;
74 vector<Particle*> nList;
80 int nPos = pList.size();
81 int nNeg = nList.size();
89 for (iPos = 0; iPos < nPos; ++iPos) {
97 for (iNeg = 0; iNeg < nNeg; ++iNeg) {
107 const float tx =
px + nx;
108 const float ty =
py + ny;
109 const float tz = pz + nz;
110 const float ta = ((
p1 > 0.0) && (n2 > 0.0) ?
p1 + n2 : -1.0);
111 const float tb = ((
p2 > 0.0) && (n1 > 0.0) ?
p2 + n1 : -1.0);
112 float ma = (ta > 0 ? (ta * ta) - ((tx * tx) + (ty * ty) + (tz * tz)) : -1.0);
113 float mb = (tb > 0 ? (tb * tb) - ((tx * tx) + (ty * ty) + (tz * tz)) : -1.0);
114 if (((ma < mSqMin) || (ma > mSqMax)) && ((mb < mSqMin) || (mb > mSqMax)))
122 rcMass = rc->composite().mass();
130 rbMass = rb->composite().mass();
134 if ((rc.get() !=
nullptr) && ((rb.get() ==
nullptr) || (fabs(rcMass -
eMass) < fabs(rbMass -
eMass)))) {
152 for (iPos = 0; iPos < nPos; ++iPos)
154 for (iNeg = 0; iNeg < nNeg; ++iNeg)
193 vector<Particle*>& list) {
197 for (
i = 0;
i <
n; ++
i) {
199 int q =
cand.charge();
211 double p2 = (
px *
px) + (
py *
py) + (pz * pz);
214 if ((
e1 > 0.0) || (e2 > 0.0))
void setTrk1PtMin(double pt)
set cuts
void setTrk1EtaMax(double eta)
bool accept(const BPHDecayVertex &cand) const override
select vertex
static double constexpr eMass
Electron mass[GeV].
const BPHEventSetupWrapper * evSetup
const reco::Track * track
const BPHRecoBuilder::BPHGenericCollection * nCollection
double getMassMin() const
get current cuts
BPHGenericPtr< BPHPlusMinusCandidate >::type BPHPlusMinusCandidatePtr
static const reco::Track * getTrack(const reco::Candidate &rc, const char *modeList="cfhbpmnigset", char *modeFlag=nullptr)
const BPHRecoBuilder::BPHGenericCollection * pCollection
BPHDecayToTkpTknSymChargeBuilder(const BPHEventSetupWrapper &es, const std::string &daug1Name, double daug1Mass, double daug1Sigma, const std::string &daug2Name, double daug2Mass, double daug2Sigma, const BPHRecoBuilder::BPHGenericCollection *posCollection, const BPHRecoBuilder::BPHGenericCollection *negCollection, double expectedMass)
static type create(Args &&... args)
void addParticle(const BPHRecoBuilder::BPHGenericCollection *collection, int charge, std::vector< Particle *> &list)
void setTrk2PtMin(double pt)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
const reco::Candidate * cand
common object to interface with edm collections
void setTrk2EtaMax(double eta)
std::vector< prod_ptr > recList
double getMassMax() const
void fillRecList() override
build candidates