37 const std::vector<BPHPlusMinusConstCandPtr>& jpsiCollection,
41 pionPosName(
"PionPos"),
42 pionNegName(
"PionNeg"),
44 jCollection(&jpsiCollection),
45 pCollection(posCollection),
46 nCollection(negCollection) {
91 vector<Particle> pList;
92 vector<Particle> nList;
105 for (iPos = 0; iPos < nPos; ++iPos) {
107 if (
cand.charge() != +1)
120 double p2 = (
px *
px) + (
py *
py) + (pz * pz);
125 for (iNeg = 0; iNeg < nNeg; ++iNeg) {
127 if (
cand.charge() != -1)
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) {
165 double pe = pc.ePion;
166 for (iNeg = 0; iNeg < nNeg; ++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) {
double getProbMin() const
get current prob min
double getProbMin() const
double getMassMin() const
double getMassMin() const
get current mass cuts
BPHX3872ToJPsiPiPiBuilder(const edm::EventSetup &es, const std::vector< BPHPlusMinusConstCandPtr > &jpsiCollection, const BPHRecoBuilder::BPHGenericCollection *posCollection, const BPHRecoBuilder::BPHGenericCollection *negCollection)
void setMassMin(double m)
void setMassMax(double m)
void setMassMax(double m)
BPHGenericPtr< BPHRecoCandidate >::type BPHRecoCandidatePtr
const edm::EventSetup * evSetup
static const double jPsiMWidth
double getPiEtaMax() const
void setPiEtaMax(double eta)
void setPiPtMin(double pt)
set cuts
bool accept(const BPHDecayVertex &cand) const override
select vertex
const BPHRecoBuilder::BPHGenericCollection * pCollection
void setJPsiMassMax(double m)
const std::vector< BPHPlusMinusConstCandPtr > * jCollection
static const double jPsiMass
const BPHRecoBuilder::BPHGenericCollection * nCollection
bool accept(const BPHDecayMomentum &cand) const override
select particle
BPHGenericPtr< const BPHPlusMinusCandidate >::type BPHPlusMinusConstCandPtr
double getPiPtMin() const
get current cuts
static const double pionMSigma
double getMassFitMax() const
static const reco::Track * getTrack(const reco::Candidate &rc, const char *modeList="cfhbpmnigset", char *modeFlag=nullptr)
void setProbMin(double p)
double getJPsiMassMax() const
virtual const reco::Candidate & get(int i) const =0
virtual void add(const std::string &name, const reco::Candidate *daug, double mass=-1.0, double sigma=-1.0)
double getMassMax() const
void setMassFitMin(double m)
virtual ~BPHX3872ToJPsiPiPiBuilder()
static const double pionMass
void setMassFitMax(double m)
void setMassMin(double m)
set mass cuts
std::vector< BPHRecoConstCandPtr > x3872List
double getJPsiMassMin() const
get current cuts
virtual int size() const =0
double getMassMax() const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
std::vector< BPHRecoConstCandPtr > build()
build X3872 candidates
BPHMassFitSelect * mFitSel
void setJPsiMassMin(double m)
set cuts
bool accept(const BPHKinematicFit &cand) const override
select particle
void setConstr(bool flag)
double getMassFitMin() const