51 pCollection(posCollection),
52 nCollection(negCollection),
73 vector<Particle*> pList;
74 vector<Particle*> nList;
80 int nPos = pList.size();
81 int nNeg = nList.size();
84 double mSqMin = massMin * massMin * 0.9;
85 double mSqMax = massMax * massMax * 1.1;
89 for (iPos = 0; iPos < nPos; ++iPos) {
96 for (iNeg = 0; iNeg < nNeg; ++iNeg) {
99 if (fabs(nt->
dz() - pt->
dz()) > 1.0)
105 const float tx = px + nx;
106 const float ty = py + ny;
107 const float tz = pz + nz;
108 const float te = pe + ne;
109 const float m2 = (te * te) - ((tx * tx) + (ty * ty) + (tz * tz));
117 double mass = rc->composite().mass();
128 for (iPos = 0; iPos < nPos; ++iPos)
130 for (iNeg = 0; iNeg < nNeg; ++iNeg)
158 vector<Particle*>& list) {
160 int n = collection->
size();
162 for (i = 0; i <
n; ++
i) {
165 if ((charge > 0) && (q <= 0))
167 if ((charge < 0) && (q >= 0))
180 list.push_back(
new Particle(&cand, tk, px, py, pz,
sqrt((px * px) + (py * py) + (pz * pz) + (
dMass *
dMass))));
std::vector< BPHPlusMinusConstCandPtr > recList
void setEtaMax(double eta)
double getMassMax() const
const reco::Track * track
bool accept(const BPHDecayVertex &cand) const override
select vertex
void addParticle(const BPHRecoBuilder::BPHGenericCollection *collection, int charge, std::vector< Particle * > &list)
BPHDecayToChargedXXbarBuilder(const edm::EventSetup &es, const std::string &dPosName, const std::string &dNegName, double daugMass, double daugSigma, const BPHRecoBuilder::BPHGenericCollection *posCollection, const BPHRecoBuilder::BPHGenericCollection *negCollection)
const reco::Candidate * cand
std::vector< BPHPlusMinusConstCandPtr > build()
build Phi candidates
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
~BPHDecayToChargedXXbarBuilder() override
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
math::XYZTLorentzVector LorentzVector
Lorentz vector.
static type create(Args &&...args)
const BPHRecoBuilder::BPHGenericCollection * nCollection
const edm::EventSetup * evSetup
void setPtMin(double pt)
set cuts
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector