59 pCollection(posCollection),
60 nCollection(negCollection),
83 vector<Particle*> pList;
84 vector<Particle*> nList;
90 int nPos = pList.size();
91 int nNeg = nList.size();
94 double mSqMin = massMin * massMin * 0.9;
95 double mSqMax = massMax * massMax * 1.1;
99 for (iPos = 0; iPos < nPos; ++iPos) {
107 for (iNeg = 0; iNeg < nNeg; ++iNeg) {
117 const float tx = px + nx;
118 const float ty = py + ny;
119 const float tz = pz + nz;
120 const float ta = ((p1 > 0.0) && (n2 > 0.0) ? p1 + n2 : -1.0);
121 const float tb = ((p2 > 0.0) && (n1 > 0.0) ? p2 + n1 : -1.0);
122 float ma = (ta > 0 ? (ta * ta) - ((tx * tx) + (ty * ty) + (tz * tz)) : -1.0);
123 float mb = (tb > 0 ? (tb * tb) - ((tx * tx) + (ty * ty) + (tz * tz)) : -1.0);
128 if (((ma < mSqMin) || (ma > mSqMax)) && ((mb < mSqMin) || (mb > mSqMax)))
136 rcMass = rc->composite().mass();
144 rbMass = rb->composite().mass();
148 if ((rc.get() !=
nullptr) && ((rb.get() ==
nullptr) || (fabs(rcMass -
eMass) < fabs(rbMass -
eMass)))) {
166 for (iPos = 0; iPos < nPos; ++iPos)
168 for (iNeg = 0; iNeg < nNeg; ++iNeg)
208 vector<Particle*>& list) {
210 int n = collection->
size();
212 for (i = 0; i <
n; ++
i) {
215 if ((charge > 0) && (q <= 0))
217 if ((charge < 0) && (q >= 0))
226 double p2 = (px * px) + (py * py) + (pz * pz);
229 if ((e1 > 0.0) || (e2 > 0.0))
230 list.push_back(
new Particle(&cand, tk, px, py, pz, e1, e2));
void addParticle(const BPHRecoBuilder::BPHGenericCollection *collection, int charge, std::vector< Particle * > &list)
double getMassMax() const
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 reco::Track * track
const BPHRecoBuilder::BPHGenericCollection * nCollection
~BPHDecayToTkpTknSymChargeBuilder() override
std::vector< BPHPlusMinusConstCandPtr > recList
BPHDecayToTkpTknSymChargeBuilder(const edm::EventSetup &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)
BPHGenericPtr< BPHPlusMinusCandidate >::type BPHPlusMinusCandidatePtr
static const reco::Track * getTrack(const reco::Candidate &rc, const char *modeList="cfhbpmnigset", char *modeFlag=nullptr)
virtual const reco::Candidate & get(int i) const =0
const BPHRecoBuilder::BPHGenericCollection * pCollection
virtual int charge() const =0
electric charge
double getMassMin() const
get current cuts
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
virtual int size() const =0
void setTrk2PtMin(double pt)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
const reco::Candidate * cand
void setTrk2EtaMax(double eta)
static type create(Args &&...args)
std::vector< BPHPlusMinusConstCandPtr > build()
build candidates
const edm::EventSetup * evSetup
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector