37 const std::vector<BPHPlusMinusConstCandPtr>& jpsiCollection,
41 pionPosName(
"PionPos"),
42 pionNegName(
"PionNeg"),
44 jCollection(&jpsiCollection),
45 pCollection(posCollection),
46 nCollection(negCollection) {
82 : cand(c),
track(tk), px(x), py(y), pz(z), ePion(p) {}
91 vector<Particle> pList;
92 vector<Particle> nList;
105 for (iPos = 0; iPos < nPos; ++iPos) {
120 double p2 = (px * px) + (py * py) + (pz * pz);
125 for (iNeg = 0; iNeg < nNeg; ++iNeg) {
140 double p2 = (px * px) + (py * py) + (pz * pz);
156 vector<const PionPair*> pionPairs;
157 pionPairs.reserve(nPos * nNeg);
159 for (iPos = 0; iPos < nPos; ++iPos) {
160 Particle& pc = pList[iPos];
165 double pe = pc.ePion;
166 for (iNeg = 0; iNeg < nNeg; ++iNeg) {
167 Particle& nc = nList[iNeg];
169 if (fabs(nt->
dz() - pt->
dz()) > 1.0)
174 double ne = nc.ePion;
175 const float tx = px + nx;
176 const float ty = py + ny;
177 const float tz = pz + nz;
178 const float te = pe + ne;
179 float mass = (te * te) - ((tx * tx) + (ty * ty) + (tz * tz));
182 PionPair*
pp =
new PionPair;
183 pp->posPion = pc.cand;
184 pp->negPion = nc.cand;
185 pionPairs.push_back(pp);
189 vector<BPHPlusMinusConstCandPtr> jPsi;
193 for (iJPsi = 0; iJPsi < nJPsi; ++iJPsi) {
196 jPsi.push_back(jpCand);
200 int nPair = pionPairs.size();
202 for (iPair = 0; iPair < nPair; ++iPair) {
203 const PionPair*
pp = pionPairs[iPair];
204 for (iJPsi = 0; iJPsi < nJPsi; ++iJPsi) {
BPHX3872ToJPsiPiPiBuilder(const edm::EventSetup &es, const std::vector< BPHPlusMinusConstCandPtr > &jpsiCollection, const BPHRecoBuilder::BPHGenericCollection *posCollection, const BPHRecoBuilder::BPHGenericCollection *negCollection)
double getMassMin() const
void setMassMin(double m)
const edm::EventSetup & c
void setMassMax(double m)
void setMassMax(double m)
double getPiEtaMax() const
BPHGenericPtr< BPHRecoCandidate >::type BPHRecoCandidatePtr
double getJPsiMassMin() const
get current cuts
const edm::EventSetup * evSetup
static const double jPsiMWidth
void setPiEtaMax(double eta)
double getMassFitMax() const
void setPiPtMin(double pt)
set cuts
bool accept(const BPHDecayVertex &cand) const override
select vertex
const BPHRecoBuilder::BPHGenericCollection * pCollection
Particle(ParticlePDG *pdg=nullptr)
void setJPsiMassMax(double m)
const std::vector< BPHPlusMinusConstCandPtr > * jCollection
static const double jPsiMass
double getJPsiMassMax() const
const BPHRecoBuilder::BPHGenericCollection * nCollection
bool accept(const BPHDecayMomentum &cand) const override
select particle
double getMassMax() const
BPHGenericPtr< const BPHPlusMinusCandidate >::type BPHPlusMinusConstCandPtr
static const double pionMSigma
static const reco::Track * getTrack(const reco::Candidate &rc, const char *modeList="cfhbpmnigset", char *modeFlag=nullptr)
void setProbMin(double p)
virtual const reco::Candidate & get(int i) const =0
virtual int charge() const =0
electric charge
virtual void add(const std::string &name, const reco::Candidate *daug, double mass=-1.0, double sigma=-1.0)
double getProbMin() const
get current prob min
void setMassFitMin(double m)
virtual ~BPHX3872ToJPsiPiPiBuilder()
static const double pionMass
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...
void setMassFitMax(double m)
void setMassMin(double m)
set mass cuts
double getMassMax() const
std::vector< BPHRecoConstCandPtr > x3872List
double getMassMin() const
get current mass cuts
virtual int size() const =0
double getProbMin() const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
std::vector< BPHRecoConstCandPtr > build()
build X3872 candidates
BPHMassFitSelect * mFitSel
double getMassFitMin() const
void setJPsiMassMin(double m)
set cuts
bool accept(const BPHKinematicFit &cand) const override
select particle
void setConstr(bool flag)
double getPiPtMin() const
get current cuts
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector