CMS 3D CMS Logo

BPHWriteSpecificDecay.cc
Go to the documentation of this file.
35 
36 #include <set>
37 #include <string>
38 
39 using namespace std;
40 
41 #define SET_PAR(TYPE, NAME, PSET) (NAME = PSET.getParameter<TYPE>(#NAME))
42 // SET_PAR(string,xyz,ps);
43 // is equivalent to
44 // ( xyz = ps.getParameter< string >( "xyx" ) )
45 
47  usePV = (!SET_PAR(string, pVertexLabel, ps).empty());
48  usePM = (!SET_PAR(string, patMuonLabel, ps).empty());
49  useCC = (!SET_PAR(string, ccCandsLabel, ps).empty());
50  usePF = (!SET_PAR(string, pfCandsLabel, ps).empty());
51  usePC = (!SET_PAR(string, pcCandsLabel, ps).empty());
52  useGP = (!SET_PAR(string, gpCandsLabel, ps).empty());
53  useK0 = (!SET_PAR(string, k0CandsLabel, ps).empty());
54  useL0 = (!SET_PAR(string, l0CandsLabel, ps).empty());
55  useKS = (!SET_PAR(string, kSCandsLabel, ps).empty());
56  useLS = (!SET_PAR(string, lSCandsLabel, ps).empty());
57  SET_PAR(string, oniaName, ps);
58  SET_PAR(string, sdName, ps);
59  SET_PAR(string, ssName, ps);
60  SET_PAR(string, buName, ps);
61  SET_PAR(string, bdName, ps);
62  SET_PAR(string, bsName, ps);
63  SET_PAR(string, k0Name, ps);
64  SET_PAR(string, l0Name, ps);
65  SET_PAR(string, b0Name, ps);
66  SET_PAR(string, lbName, ps);
67  SET_PAR(string, bcName, ps);
68  SET_PAR(string, x3872Name, ps);
69 
70  SET_PAR(bool, writeMomentum, ps);
71  SET_PAR(bool, writeVertex, ps);
72 
73  rMap["Onia"] = Onia;
74  rMap["PHiMuMu"] = Pmm;
75  rMap["Psi1"] = Psi1;
76  rMap["Psi2"] = Psi2;
77  rMap["Ups"] = Ups;
78  rMap["Ups1"] = Ups1;
79  rMap["Ups2"] = Ups2;
80  rMap["Ups3"] = Ups3;
81  rMap["Kx0"] = Kx0;
82  rMap["PhiKK"] = Pkk;
83  rMap["Bu"] = Bu;
84  rMap["Bd"] = Bd;
85  rMap["Bs"] = Bs;
86  rMap["K0s"] = K0s;
87  rMap["Lambda0"] = Lambda0;
88  rMap["B0"] = B0;
89  rMap["Lambdab"] = Lambdab;
90  rMap["Bc"] = Bc;
91  rMap["X3872"] = X3872;
92 
93  pMap["ptMin"] = ptMin;
94  pMap["etaMax"] = etaMax;
95  pMap["mJPsiMin"] = mPsiMin;
96  pMap["mJPsiMax"] = mPsiMax;
97  pMap["mKx0Min"] = mKx0Min;
98  pMap["mKx0Max"] = mKx0Max;
99  pMap["mPhiMin"] = mPhiMin;
100  pMap["mPhiMax"] = mPhiMax;
101  pMap["mK0sMin"] = mK0sMin;
102  pMap["mK0sMax"] = mK0sMax;
103  pMap["mLambda0Min"] = mLambda0Min;
104  pMap["mLambda0Max"] = mLambda0Max;
105  pMap["massMin"] = massMin;
106  pMap["massMax"] = massMax;
107  pMap["probMin"] = probMin;
108  pMap["massFitMin"] = mFitMin;
109  pMap["massFitMax"] = mFitMax;
110  pMap["constrMass"] = constrMass;
111  pMap["constrSigma"] = constrSigma;
112 
113  fMap["constrMJPsi"] = constrMJPsi;
114  fMap["writeCandidate"] = writeCandidate;
115 
118  writeBc = recoX3872 = writeX3872 = false;
119 
120  writeOnia = true;
121  const vector<edm::ParameterSet> recoSelect = ps.getParameter<vector<edm::ParameterSet>>("recoSelect");
122  int iSel;
123  int nSel = recoSelect.size();
124  for (iSel = 0; iSel < nSel; ++iSel)
126  if (!recoOnia)
127  writeOnia = false;
128 
129  if (recoBu)
130  recoOnia = true;
131  if (recoBd)
132  recoOnia = recoKx0 = true;
133  if (recoBs)
134  recoOnia = recoPkk = true;
135  if (recoB0)
136  recoOnia = recoK0s = true;
137  if (recoLambdab)
138  recoOnia = recoLambda0 = true;
139  if (recoBc)
140  recoOnia = true;
141  if (recoX3872)
142  recoOnia = true;
143  if (writeBu)
144  writeOnia = true;
145  if (writeBd)
146  writeOnia = writeKx0 = true;
147  if (writeBs)
148  writeOnia = writePkk = true;
149  if (writeB0)
150  writeOnia = writeK0s = true;
151  if (writeLambdab)
152  writeOnia = writeLambda0 = true;
153  if (writeBc)
154  writeOnia = true;
155  if (writeX3872)
156  writeOnia = true;
157 
158  if (usePV)
159  consume<vector<reco::Vertex>>(pVertexToken, pVertexLabel);
160  if (usePM)
161  consume<pat::MuonCollection>(patMuonToken, patMuonLabel);
162  if (useCC)
163  consume<vector<pat::CompositeCandidate>>(ccCandsToken, ccCandsLabel);
164  if (usePF)
165  consume<vector<reco::PFCandidate>>(pfCandsToken, pfCandsLabel);
166  if (usePC)
167  consume<vector<BPHTrackReference::candidate>>(pcCandsToken, pcCandsLabel);
168  if (useGP)
169  consume<vector<pat::GenericParticle>>(gpCandsToken, gpCandsLabel);
170  if (useK0)
171  consume<vector<reco::VertexCompositeCandidate>>(k0CandsToken, k0CandsLabel);
172  if (useL0)
173  consume<vector<reco::VertexCompositeCandidate>>(l0CandsToken, l0CandsLabel);
174  if (useKS)
175  consume<vector<reco::VertexCompositePtrCandidate>>(kSCandsToken, kSCandsLabel);
176  if (useLS)
177  consume<vector<reco::VertexCompositePtrCandidate>>(lSCandsToken, lSCandsLabel);
178 
179  if (writeOnia)
180  produces<pat::CompositeCandidateCollection>(oniaName);
181  if (writeKx0)
182  produces<pat::CompositeCandidateCollection>(sdName);
183  if (writePkk)
184  produces<pat::CompositeCandidateCollection>(ssName);
185  if (writeBu)
186  produces<pat::CompositeCandidateCollection>(buName);
187  if (writeBd)
188  produces<pat::CompositeCandidateCollection>(bdName);
189  if (writeBs)
190  produces<pat::CompositeCandidateCollection>(bsName);
191  if (writeK0s)
192  produces<pat::CompositeCandidateCollection>(k0Name);
193  if (writeLambda0)
194  produces<pat::CompositeCandidateCollection>(l0Name);
195  if (writeB0)
196  produces<pat::CompositeCandidateCollection>(b0Name);
197  if (writeLambdab)
198  produces<pat::CompositeCandidateCollection>(lbName);
199  if (writeBc)
200  produces<pat::CompositeCandidateCollection>(bcName);
201  if (writeX3872)
202  produces<pat::CompositeCandidateCollection>(x3872Name);
203 }
204 
207  desc.add<string>("pVertexLabel", "");
208  desc.add<string>("patMuonLabel", "");
209  desc.add<string>("ccCandsLabel", "");
210  desc.add<string>("pfCandsLabel", "");
211  desc.add<string>("pcCandsLabel", "");
212  desc.add<string>("gpCandsLabel", "");
213  desc.add<string>("k0CandsLabel", "");
214  desc.add<string>("l0CandsLabel", "");
215  desc.add<string>("kSCandsLabel", "");
216  desc.add<string>("lSCandsLabel", "");
217  desc.add<string>("oniaName", "oniaCand");
218  desc.add<string>("sdName", "kx0Cand");
219  desc.add<string>("ssName", "phiCand");
220  desc.add<string>("buName", "buFitted");
221  desc.add<string>("bdName", "bdFitted");
222  desc.add<string>("bsName", "bsFitted");
223  desc.add<string>("k0Name", "k0Fitted");
224  desc.add<string>("l0Name", "l0Fitted");
225  desc.add<string>("b0Name", "b0Fitted");
226  desc.add<string>("lbName", "lbFitted");
227  desc.add<string>("bcName", "bcFitted");
228  desc.add<string>("x3872Name", "x3872Fitted");
229  desc.add<bool>("writeVertex", true);
230  desc.add<bool>("writeMomentum", true);
232  dpar.add<string>("name");
233  dpar.add<double>("ptMin", -2.0e35);
234  dpar.add<double>("etaMax", -2.0e35);
235  dpar.add<double>("mJPsiMin", -2.0e35);
236  dpar.add<double>("mJPsiMax", -2.0e35);
237  dpar.add<double>("mKx0Min", -2.0e35);
238  dpar.add<double>("mKx0Max", -2.0e35);
239  dpar.add<double>("mPhiMin", -2.0e35);
240  dpar.add<double>("mPhiMax", -2.0e35);
241  dpar.add<double>("mK0sMin", -2.0e35);
242  dpar.add<double>("mK0sMax", -2.0e35);
243  dpar.add<double>("mLambda0Min", -2.0e35);
244  dpar.add<double>("mLambda0Max", -2.0e35);
245  dpar.add<double>("massMin", -2.0e35);
246  dpar.add<double>("massMax", -2.0e35);
247  dpar.add<double>("probMin", -2.0e35);
248  dpar.add<double>("massFitMin", -2.0e35);
249  dpar.add<double>("massFitMax", -2.0e35);
250  dpar.add<double>("constrMass", -2.0e35);
251  dpar.add<double>("constrSigma", -2.0e35);
252  dpar.add<bool>("constrMJPsi", true);
253  dpar.add<bool>("writeCandidate", true);
254  vector<edm::ParameterSet> rpar;
255  desc.addVPSet("recoSelect", dpar, rpar);
256  descriptions.add("bphWriteSpecificDecay", desc);
257  return;
258 }
259 
261 
263  fill(ev, es);
264  if (writeOnia)
265  write(ev, lFull, oniaName);
266  if (writeKx0)
267  write(ev, lSd, sdName);
268  if (writePkk)
269  write(ev, lSs, ssName);
270  if (writeBu)
271  write(ev, lBu, buName);
272  if (writeBd)
273  write(ev, lBd, bdName);
274  if (writeBs)
275  write(ev, lBs, bsName);
276  if (writeK0s)
277  write(ev, lK0, k0Name);
278  if (writeLambda0)
279  write(ev, lL0, l0Name);
280  if (writeB0)
281  write(ev, lB0, b0Name);
282  if (writeLambdab)
283  write(ev, lLb, lbName);
284  if (writeBc)
285  write(ev, lBc, bcName);
286  if (writeX3872)
288  return;
289 }
290 
292  lFull.clear();
293  lJPsi.clear();
294  lSd.clear();
295  lSs.clear();
296  lBu.clear();
297  lBd.clear();
298  lBs.clear();
299  lK0.clear();
300  lL0.clear();
301  lB0.clear();
302  lLb.clear();
303  lBc.clear();
304  lX3872.clear();
305  jPsiOMap.clear();
306  daughMap.clear();
307  pvRefMap.clear();
308  ccRefMap.clear();
309 
310  // get magnetic field
312 
313  // get object collections
314  // collections are got through "BPHTokenWrapper" interface to allow
315  // uniform access in different CMSSW versions
316 
318  pVertexToken.get(ev, pVertices);
319  int npv = pVertices->size();
320 
321  int nrc = 0;
322 
323  // get reco::PFCandidate collection (in full AOD )
325  if (usePF) {
326  pfCandsToken.get(ev, pfCands);
327  nrc = pfCands->size();
328  }
329 
330  // get pat::PackedCandidate collection (in MiniAOD)
331  // pat::PackedCandidate is not defined in CMSSW_5XY, so a
332  // typedef (BPHTrackReference::candidate) is used, actually referring
333  // to pat::PackedCandidate only for CMSSW versions where it's defined
335  if (usePC) {
336  pcCandsToken.get(ev, pcCands);
337  nrc = pcCands->size();
338  }
339 
340  // get pat::GenericParticle collection (in skimmed data)
342  if (useGP) {
343  gpCandsToken.get(ev, gpCands);
344  nrc = gpCands->size();
345  }
346 
347  // get pat::Muon collection (in full AOD and MiniAOD)
349  if (usePM) {
350  patMuonToken.get(ev, patMuon);
351  }
352 
353  // get K0 reco::VertexCompositeCandidate collection (in full AOD)
355  if (useK0) {
356  k0CandsToken.get(ev, k0Cand);
357  }
358 
359  // get Lambda0 reco::VertexCompositeCandidate collection (in full AOD)
361  if (useL0) {
362  l0CandsToken.get(ev, l0Cand);
363  }
364 
365  // get K0 reco::VertexCompositePtrCandidate collection (in MiniAOD)
367  if (useKS) {
368  kSCandsToken.get(ev, kSCand);
369  }
370 
371  // get Lambda0 reco::VertexCompositePtrCandidate collection (in MiniAOD)
373  if (useLS) {
374  lSCandsToken.get(ev, lSCand);
375  }
376 
377  // get muons from pat::CompositeCandidate objects describing onia;
378  // muons from all composite objects are copied to an unique std::vector
379  vector<const reco::Candidate*> muDaugs;
380  set<const pat::Muon*> muonSet;
381  typedef multimap<const reco::Candidate*, const pat::CompositeCandidate*> mu_cc_map;
382  mu_cc_map muCCMap;
383  if (useCC) {
385  ccCandsToken.get(ev, ccCands);
386  int n = ccCands->size();
387  muDaugs.clear();
388  muDaugs.reserve(n);
389  muonSet.clear();
390  set<const pat::Muon*>::const_iterator iter;
391  set<const pat::Muon*>::const_iterator iend;
392  int i;
393  for (i = 0; i < n; ++i) {
394  const pat::CompositeCandidate& cc = ccCands->at(i);
395  int j;
396  int m = cc.numberOfDaughters();
397  for (j = 0; j < m; ++j) {
398  const reco::Candidate* dp = cc.daughter(j);
399  const pat::Muon* mp = dynamic_cast<const pat::Muon*>(dp);
400  iter = muonSet.begin();
401  iend = muonSet.end();
402  bool add = (mp != nullptr) && (muonSet.find(mp) == iend);
403  while (add && (iter != iend)) {
404  if (BPHRecoBuilder::sameTrack(mp, *iter++, 1.0e-5))
405  add = false;
406  }
407  if (add)
408  muonSet.insert(mp);
409  // associate muon to the CompositeCandidate containing it
410  muCCMap.insert(pair<const reco::Candidate*, const pat::CompositeCandidate*>(dp, &cc));
411  }
412  }
413  iter = muonSet.begin();
414  iend = muonSet.end();
415  while (iter != iend)
416  muDaugs.push_back(*iter++);
417  }
418 
419  map<recoType, map<parType, double>>::const_iterator rIter = parMap.begin();
420  map<recoType, map<parType, double>>::const_iterator rIend = parMap.end();
421 
422  // reconstruct quarkonia
423 
424  BPHOniaToMuMuBuilder* onia = nullptr;
425  if (recoOnia) {
426  if (usePM)
427  onia = new BPHOniaToMuMuBuilder(
428  es, BPHRecoBuilder::createCollection(patMuon, "ingmcf"), BPHRecoBuilder::createCollection(patMuon, "ingmcf"));
429  else if (useCC)
430  onia = new BPHOniaToMuMuBuilder(
431  es, BPHRecoBuilder::createCollection(muDaugs, "ingmcf"), BPHRecoBuilder::createCollection(muDaugs, "ingmcf"));
432  }
433 
434  if (onia != nullptr) {
435  while (rIter != rIend) {
436  const map<recoType, map<parType, double>>::value_type& rEntry = *rIter++;
437  recoType rType = rEntry.first;
438  const map<parType, double>& pMap = rEntry.second;
440  switch (rType) {
441  case Pmm:
443  break;
444  case Psi1:
446  break;
447  case Psi2:
449  break;
450  case Ups:
452  break;
453  case Ups1:
455  break;
456  case Ups2:
458  break;
459  case Ups3:
461  break;
462  default:
463  continue;
464  }
465  map<parType, double>::const_iterator pIter = pMap.begin();
466  map<parType, double>::const_iterator pIend = pMap.end();
467  while (pIter != pIend) {
468  const map<parType, double>::value_type& pEntry = *pIter++;
469  parType id = pEntry.first;
470  double pv = pEntry.second;
471  switch (id) {
472  case ptMin:
473  onia->setPtMin(type, pv);
474  break;
475  case etaMax:
476  onia->setEtaMax(type, pv);
477  break;
478  case massMin:
479  onia->setMassMin(type, pv);
480  break;
481  case massMax:
482  onia->setMassMax(type, pv);
483  break;
484  case probMin:
485  onia->setProbMin(type, pv);
486  break;
487  case constrMass:
488  onia->setConstr(type, pv, onia->getConstrSigma(type));
489  break;
490  case constrSigma:
491  onia->setConstr(type, onia->getConstrMass(type), pv);
492  break;
493  default:
494  break;
495  }
496  }
497  }
498  lFull = onia->build();
499  }
500 
501  // associate onia to primary vertex
502 
503  int iFull;
504  int nFull = lFull.size();
505  map<const BPHRecoCandidate*, const reco::Vertex*> oniaVtxMap;
506 
507  typedef mu_cc_map::const_iterator mu_cc_iter;
508  for (iFull = 0; iFull < nFull; ++iFull) {
509  const reco::Vertex* pVtx = nullptr;
510  int pvId = 0;
511  const BPHPlusMinusCandidate* ptr = lFull[iFull].get();
512  const std::vector<const reco::Candidate*>& daugs = ptr->daughters();
513 
514  // try to recover primary vertex association in skim data:
515  // get the CompositeCandidate containing both muons
516  pair<mu_cc_iter, mu_cc_iter> cc0 = muCCMap.equal_range(ptr->originalReco(daugs[0]));
517  pair<mu_cc_iter, mu_cc_iter> cc1 = muCCMap.equal_range(ptr->originalReco(daugs[1]));
518  mu_cc_iter iter0 = cc0.first;
519  mu_cc_iter iend0 = cc0.second;
520  mu_cc_iter iter1 = cc1.first;
521  mu_cc_iter iend1 = cc1.second;
522  while ((iter0 != iend0) && (pVtx == nullptr)) {
523  const pat::CompositeCandidate* ccp = iter0++->second;
524  while (iter1 != iend1) {
525  if (ccp != iter1++->second)
526  continue;
527  pVtx = ccp->userData<reco::Vertex>("PVwithmuons");
528  const reco::Vertex* sVtx = nullptr;
529  const reco::Vertex::Point& pPos = pVtx->position();
530  float dMin = 999999.;
531  int ipv;
532  for (ipv = 0; ipv < npv; ++ipv) {
533  const reco::Vertex* tVtx = &pVertices->at(ipv);
534  const reco::Vertex::Point& tPos = tVtx->position();
535  float dist = pow(pPos.x() - tPos.x(), 2) + pow(pPos.y() - tPos.y(), 2) + pow(pPos.z() - tPos.z(), 2);
536  if (dist < dMin) {
537  dMin = dist;
538  sVtx = tVtx;
539  pvId = ipv;
540  }
541  }
542  pVtx = sVtx;
543  break;
544  }
545  }
546 
547  // if not found, as for other type of input data,
548  // try to get the nearest primary vertex in z direction
549  if (pVtx == nullptr) {
550  const reco::Vertex::Point& sVtp = ptr->vertex().position();
551  GlobalPoint cPos(sVtp.x(), sVtp.y(), sVtp.z());
552  const pat::CompositeCandidate& sCC = ptr->composite();
553  GlobalVector cDir(sCC.px(), sCC.py(), sCC.pz());
554  GlobalPoint bPos(0.0, 0.0, 0.0);
555  GlobalVector bDir(0.0, 0.0, 1.0);
557  bool state = ttmd.calculate(GlobalTrajectoryParameters(cPos, cDir, TrackCharge(0), &(*magneticField)),
559  float minDz = 999999.;
560  float extrapZ = (state ? ttmd.points().first.z() : -9e20);
561  int ipv;
562  for (ipv = 0; ipv < npv; ++ipv) {
563  const reco::Vertex& tVtx = pVertices->at(ipv);
564  float deltaZ = fabs(extrapZ - tVtx.position().z());
565  if (deltaZ < minDz) {
566  minDz = deltaZ;
567  pVtx = &tVtx;
568  pvId = ipv;
569  }
570  }
571  }
572 
573  oniaVtxMap[ptr] = pVtx;
574  pvRefMap[ptr] = vertex_ref(pVertices, pvId);
575  }
576  pVertexToken.get(ev, pVertices);
577 
578  // get JPsi subsample and associate JPsi candidate to original
579  // generic onia candidate
580  if (nFull)
582 
583  int nJPsi = lJPsi.size();
584  delete onia;
585 
586  if (!nJPsi)
587  return;
588  if (!nrc)
589  return;
590 
591  int ij;
592  int io;
593  int nj = lJPsi.size();
594  int no = lFull.size();
595  for (ij = 0; ij < nj; ++ij) {
596  const BPHRecoCandidate* jp = lJPsi[ij].get();
597  for (io = 0; io < no; ++io) {
598  const BPHRecoCandidate* oc = lFull[io].get();
599  if ((jp->originalReco(jp->getDaug("MuPos")) == oc->originalReco(oc->getDaug("MuPos"))) &&
600  (jp->originalReco(jp->getDaug("MuNeg")) == oc->originalReco(oc->getDaug("MuNeg")))) {
601  jPsiOMap[jp] = oc;
602  break;
603  }
604  }
605  }
606 
607  // build and dump Bu
608 
609  BPHBuToJPsiKBuilder* bu = nullptr;
610  if (recoBu) {
611  if (usePF)
613  else if (usePC)
615  else if (useGP)
617  }
618 
619  if (bu != nullptr) {
620  rIter = parMap.find(Bu);
621  if (rIter != rIend) {
622  const map<parType, double>& pMap = rIter->second;
623  map<parType, double>::const_iterator pIter = pMap.begin();
624  map<parType, double>::const_iterator pIend = pMap.end();
625  while (pIter != pIend) {
626  const map<parType, double>::value_type& pEntry = *pIter++;
627  parType id = pEntry.first;
628  double pv = pEntry.second;
629  switch (id) {
630  case ptMin:
631  bu->setKPtMin(pv);
632  break;
633  case etaMax:
634  bu->setKEtaMax(pv);
635  break;
636  case mPsiMin:
637  bu->setJPsiMassMin(pv);
638  break;
639  case mPsiMax:
640  bu->setJPsiMassMax(pv);
641  break;
642  case massMin:
643  bu->setMassMin(pv);
644  break;
645  case massMax:
646  bu->setMassMax(pv);
647  break;
648  case probMin:
649  bu->setProbMin(pv);
650  break;
651  case mFitMin:
652  bu->setMassFitMin(pv);
653  break;
654  case mFitMax:
655  bu->setMassFitMax(pv);
656  break;
657  case constrMJPsi:
658  bu->setConstr(pv > 0);
659  break;
660  case writeCandidate:
661  writeBu = (pv > 0);
662  break;
663  default:
664  break;
665  }
666  }
667  }
668  lBu = bu->build();
669  delete bu;
670  }
671 
672  // build and dump Kx0
673 
674  vector<BPHPlusMinusConstCandPtr> lKx0;
675  BPHKx0ToKPiBuilder* kx0 = nullptr;
676  if (recoKx0) {
677  if (usePF)
678  kx0 = new BPHKx0ToKPiBuilder(
680  else if (usePC)
681  kx0 = new BPHKx0ToKPiBuilder(
683  else if (useGP)
684  kx0 = new BPHKx0ToKPiBuilder(
686  }
687 
688  if (kx0 != nullptr) {
689  rIter = parMap.find(Kx0);
690  if (rIter != rIend) {
691  const map<parType, double>& pMap = rIter->second;
692  map<parType, double>::const_iterator pIter = pMap.begin();
693  map<parType, double>::const_iterator pIend = pMap.end();
694  while (pIter != pIend) {
695  const map<parType, double>::value_type& pEntry = *pIter++;
696  parType id = pEntry.first;
697  double pv = pEntry.second;
698  switch (id) {
699  case ptMin:
700  kx0->setPtMin(pv);
701  break;
702  case etaMax:
703  kx0->setEtaMax(pv);
704  break;
705  case massMin:
706  kx0->setMassMin(pv);
707  break;
708  case massMax:
709  kx0->setMassMax(pv);
710  break;
711  case probMin:
712  kx0->setProbMin(pv);
713  break;
714  case writeCandidate:
715  writeKx0 = (pv > 0);
716  break;
717  default:
718  break;
719  }
720  }
721  }
722  lKx0 = kx0->build();
723  delete kx0;
724  }
725 
726  int nKx0 = lKx0.size();
727 
728  // build and dump Bd -> JPsi Kx0
729 
730  if (recoBd && nKx0) {
732  rIter = parMap.find(Bd);
733  if (rIter != rIend) {
734  const map<parType, double>& pMap = rIter->second;
735  map<parType, double>::const_iterator pIter = pMap.begin();
736  map<parType, double>::const_iterator pIend = pMap.end();
737  while (pIter != pIend) {
738  const map<parType, double>::value_type& pEntry = *pIter++;
739  parType id = pEntry.first;
740  double pv = pEntry.second;
741  switch (id) {
742  case mPsiMin:
743  bd->setJPsiMassMin(pv);
744  break;
745  case mPsiMax:
746  bd->setJPsiMassMax(pv);
747  break;
748  case mKx0Min:
749  bd->setKxMassMin(pv);
750  break;
751  case mKx0Max:
752  bd->setKxMassMax(pv);
753  break;
754  case massMin:
755  bd->setMassMin(pv);
756  break;
757  case massMax:
758  bd->setMassMax(pv);
759  break;
760  case probMin:
761  bd->setProbMin(pv);
762  break;
763  case mFitMin:
764  bd->setMassFitMin(pv);
765  break;
766  case mFitMax:
767  bd->setMassFitMax(pv);
768  break;
769  case constrMJPsi:
770  bd->setConstr(pv > 0);
771  break;
772  case writeCandidate:
773  writeBd = (pv > 0);
774  break;
775  default:
776  break;
777  }
778  }
779  }
780 
781  lBd = bd->build();
782  delete bd;
783 
784  set<BPHRecoConstCandPtr> sKx0;
785  int iBd;
786  int nBd = lBd.size();
787  for (iBd = 0; iBd < nBd; ++iBd)
788  sKx0.insert(lBd[iBd]->getComp("Kx0"));
789  set<BPHRecoConstCandPtr>::const_iterator iter = sKx0.begin();
790  set<BPHRecoConstCandPtr>::const_iterator iend = sKx0.end();
791  while (iter != iend)
792  lSd.push_back(*iter++);
793  }
794 
795  // build and dump Phi
796 
797  vector<BPHPlusMinusConstCandPtr> lPhi;
798  BPHPhiToKKBuilder* phi = nullptr;
799  if (recoPkk) {
800  if (usePF)
801  phi = new BPHPhiToKKBuilder(
803  else if (usePC)
804  phi = new BPHPhiToKKBuilder(
806  else if (useGP)
807  phi = new BPHPhiToKKBuilder(
809  }
810 
811  if (phi != nullptr) {
812  rIter = parMap.find(Pkk);
813  if (rIter != rIend) {
814  const map<parType, double>& pMap = rIter->second;
815  map<parType, double>::const_iterator pIter = pMap.begin();
816  map<parType, double>::const_iterator pIend = pMap.end();
817  while (pIter != pIend) {
818  const map<parType, double>::value_type& pEntry = *pIter++;
819  parType id = pEntry.first;
820  double pv = pEntry.second;
821  switch (id) {
822  case ptMin:
823  phi->setPtMin(pv);
824  break;
825  case etaMax:
826  phi->setEtaMax(pv);
827  break;
828  case massMin:
829  phi->setMassMin(pv);
830  break;
831  case massMax:
832  phi->setMassMax(pv);
833  break;
834  case probMin:
835  phi->setProbMin(pv);
836  break;
837  case writeCandidate:
838  writePkk = (pv > 0);
839  break;
840  default:
841  break;
842  }
843  }
844  }
845  lPhi = phi->build();
846  delete phi;
847  }
848 
849  int nPhi = lPhi.size();
850 
851  // build and dump Bs
852 
853  if (recoBs && nPhi) {
855  rIter = parMap.find(Bs);
856  if (rIter != rIend) {
857  const map<parType, double>& pMap = rIter->second;
858  map<parType, double>::const_iterator pIter = pMap.begin();
859  map<parType, double>::const_iterator pIend = pMap.end();
860  while (pIter != pIend) {
861  const map<parType, double>::value_type& pEntry = *pIter++;
862  parType id = pEntry.first;
863  double pv = pEntry.second;
864  switch (id) {
865  case mPsiMin:
866  bs->setJPsiMassMin(pv);
867  break;
868  case mPsiMax:
869  bs->setJPsiMassMax(pv);
870  break;
871  case mPhiMin:
872  bs->setPhiMassMin(pv);
873  break;
874  case mPhiMax:
875  bs->setPhiMassMax(pv);
876  break;
877  case massMin:
878  bs->setMassMin(pv);
879  break;
880  case massMax:
881  bs->setMassMax(pv);
882  break;
883  case probMin:
884  bs->setProbMin(pv);
885  break;
886  case mFitMin:
887  bs->setMassFitMin(pv);
888  break;
889  case mFitMax:
890  bs->setMassFitMax(pv);
891  break;
892  case constrMJPsi:
893  bs->setConstr(pv > 0);
894  break;
895  case writeCandidate:
896  writeBs = (pv > 0);
897  break;
898  default:
899  break;
900  }
901  }
902  }
903 
904  lBs = bs->build();
905  delete bs;
906 
907  set<BPHRecoConstCandPtr> sPhi;
908  int iBs;
909  int nBs = lBs.size();
910  for (iBs = 0; iBs < nBs; ++iBs)
911  sPhi.insert(lBs[iBs]->getComp("Phi"));
912  set<BPHRecoConstCandPtr>::const_iterator iter = sPhi.begin();
913  set<BPHRecoConstCandPtr>::const_iterator iend = sPhi.end();
914  while (iter != iend)
915  lSs.push_back(*iter++);
916  }
917 
918  // build K0
919 
920  BPHK0sToPiPiBuilder* k0s = nullptr;
921  if (recoK0s) {
922  if (useK0)
923  k0s = new BPHK0sToPiPiBuilder(es, k0Cand.product(), "cfp");
924  else if (useKS)
925  k0s = new BPHK0sToPiPiBuilder(es, kSCand.product(), "cfp");
926  }
927  if (k0s != nullptr) {
928  rIter = parMap.find(K0s);
929  if (rIter != rIend) {
930  const map<parType, double>& pMap = rIter->second;
931  map<parType, double>::const_iterator pIter = pMap.begin();
932  map<parType, double>::const_iterator pIend = pMap.end();
933  while (pIter != pIend) {
934  const map<parType, double>::value_type& pEntry = *pIter++;
935  parType id = pEntry.first;
936  double pv = pEntry.second;
937  switch (id) {
938  case ptMin:
939  k0s->setPtMin(pv);
940  break;
941  case etaMax:
942  k0s->setEtaMax(pv);
943  break;
944  case massMin:
945  k0s->setMassMin(pv);
946  break;
947  case massMax:
948  k0s->setMassMax(pv);
949  break;
950  case probMin:
951  k0s->setProbMin(pv);
952  break;
953  case writeCandidate:
954  writeK0s = (pv > 0);
955  break;
956  default:
957  break;
958  }
959  }
960  }
961  lK0 = k0s->build();
962  delete k0s;
963  }
964 
965  int nK0 = lK0.size();
966 
967  // build Lambda0
968 
969  BPHLambda0ToPPiBuilder* l0s = nullptr;
970  if (recoLambda0) {
971  if (useL0)
972  l0s = new BPHLambda0ToPPiBuilder(es, l0Cand.product(), "cfp");
973  else if (useLS)
974  l0s = new BPHLambda0ToPPiBuilder(es, lSCand.product(), "cfp");
975  }
976  if (l0s != nullptr) {
977  rIter = parMap.find(Lambda0);
978  if (rIter != rIend) {
979  const map<parType, double>& pMap = rIter->second;
980  map<parType, double>::const_iterator pIter = pMap.begin();
981  map<parType, double>::const_iterator pIend = pMap.end();
982  while (pIter != pIend) {
983  const map<parType, double>::value_type& pEntry = *pIter++;
984  parType id = pEntry.first;
985  double pv = pEntry.second;
986  switch (id) {
987  case ptMin:
988  l0s->setPtMin(pv);
989  break;
990  case etaMax:
991  l0s->setEtaMax(pv);
992  break;
993  case massMin:
994  l0s->setMassMin(pv);
995  break;
996  case massMax:
997  l0s->setMassMax(pv);
998  break;
999  case probMin:
1000  l0s->setProbMin(pv);
1001  break;
1002  case writeCandidate:
1003  writeLambda0 = (pv > 0);
1004  break;
1005  default:
1006  break;
1007  }
1008  }
1009  }
1010  lL0 = l0s->build();
1011  delete l0s;
1012  }
1013 
1014  int nL0 = lL0.size();
1015 
1016  // build and dump Bd -> JPsi K0s
1017 
1018  if (recoB0 && nK0) {
1020  rIter = parMap.find(B0);
1021  if (rIter != rIend) {
1022  const map<parType, double>& pMap = rIter->second;
1023  map<parType, double>::const_iterator pIter = pMap.begin();
1024  map<parType, double>::const_iterator pIend = pMap.end();
1025  while (pIter != pIend) {
1026  const map<parType, double>::value_type& pEntry = *pIter++;
1027  parType id = pEntry.first;
1028  double pv = pEntry.second;
1029  switch (id) {
1030  case mPsiMin:
1031  b0->setJPsiMassMin(pv);
1032  break;
1033  case mPsiMax:
1034  b0->setJPsiMassMax(pv);
1035  break;
1036  case mK0sMin:
1037  b0->setK0MassMin(pv);
1038  break;
1039  case mK0sMax:
1040  b0->setK0MassMax(pv);
1041  break;
1042  case massMin:
1043  b0->setMassMin(pv);
1044  break;
1045  case massMax:
1046  b0->setMassMax(pv);
1047  break;
1048  case probMin:
1049  b0->setProbMin(pv);
1050  break;
1051  case mFitMin:
1052  b0->setMassFitMin(pv);
1053  break;
1054  case mFitMax:
1055  b0->setMassFitMax(pv);
1056  break;
1057  case constrMJPsi:
1058  b0->setConstr(pv > 0);
1059  break;
1060  case writeCandidate:
1061  writeB0 = (pv > 0);
1062  break;
1063  default:
1064  break;
1065  }
1066  }
1067  }
1068 
1069  lB0 = b0->build();
1070  const map<const BPHRecoCandidate*, const BPHRecoCandidate*>& b0Map = b0->daughMap();
1071  daughMap.insert(b0Map.begin(), b0Map.end());
1072  delete b0;
1073  }
1074 
1075  // build and dump Lambdab -> JPsi Lambda0
1076 
1077  if (recoLambdab && nL0) {
1079  rIter = parMap.find(Lambdab);
1080  if (rIter != rIend) {
1081  const map<parType, double>& pMap = rIter->second;
1082  map<parType, double>::const_iterator pIter = pMap.begin();
1083  map<parType, double>::const_iterator pIend = pMap.end();
1084  while (pIter != pIend) {
1085  const map<parType, double>::value_type& pEntry = *pIter++;
1086  parType id = pEntry.first;
1087  double pv = pEntry.second;
1088  switch (id) {
1089  case mPsiMin:
1090  lb->setJPsiMassMin(pv);
1091  break;
1092  case mPsiMax:
1093  lb->setJPsiMassMax(pv);
1094  break;
1095  case mLambda0Min:
1096  lb->setLambda0MassMin(pv);
1097  break;
1098  case mLambda0Max:
1099  lb->setLambda0MassMax(pv);
1100  break;
1101  case massMin:
1102  lb->setMassMin(pv);
1103  break;
1104  case massMax:
1105  lb->setMassMax(pv);
1106  break;
1107  case probMin:
1108  lb->setProbMin(pv);
1109  break;
1110  case mFitMin:
1111  lb->setMassFitMin(pv);
1112  break;
1113  case mFitMax:
1114  lb->setMassFitMax(pv);
1115  break;
1116  case constrMJPsi:
1117  lb->setConstr(pv > 0);
1118  break;
1119  case writeCandidate:
1120  writeLambdab = (pv > 0);
1121  break;
1122  default:
1123  break;
1124  }
1125  }
1126  }
1127 
1128  lLb = lb->build();
1129  const map<const BPHRecoCandidate*, const BPHRecoCandidate*>& ldMap = lb->daughMap();
1130  daughMap.insert(ldMap.begin(), ldMap.end());
1131  delete lb;
1132  }
1133 
1134  // build and dump Bc
1135 
1136  BPHBcToJPsiPiBuilder* bc = nullptr;
1137  if (recoBc) {
1138  if (usePF)
1140  else if (usePC)
1142  else if (useGP)
1144  }
1145 
1146  if (bc != nullptr) {
1147  rIter = parMap.find(Bc);
1148  if (rIter != rIend) {
1149  const map<parType, double>& pMap = rIter->second;
1150  map<parType, double>::const_iterator pIter = pMap.begin();
1151  map<parType, double>::const_iterator pIend = pMap.end();
1152  while (pIter != pIend) {
1153  const map<parType, double>::value_type& pEntry = *pIter++;
1154  parType id = pEntry.first;
1155  double pv = pEntry.second;
1156  switch (id) {
1157  case ptMin:
1158  bc->setPiPtMin(pv);
1159  break;
1160  case etaMax:
1161  bc->setPiEtaMax(pv);
1162  break;
1163  case mPsiMin:
1164  bc->setJPsiMassMin(pv);
1165  break;
1166  case mPsiMax:
1167  bc->setJPsiMassMax(pv);
1168  break;
1169  case massMin:
1170  bc->setMassMin(pv);
1171  break;
1172  case massMax:
1173  bc->setMassMax(pv);
1174  break;
1175  case probMin:
1176  bc->setProbMin(pv);
1177  break;
1178  case mFitMin:
1179  bc->setMassFitMin(pv);
1180  break;
1181  case mFitMax:
1182  bc->setMassFitMax(pv);
1183  break;
1184  case constrMJPsi:
1185  bc->setConstr(pv > 0);
1186  break;
1187  case writeCandidate:
1188  writeBc = (pv > 0);
1189  break;
1190  default:
1191  break;
1192  }
1193  }
1194  }
1195  lBc = bc->build();
1196  delete bc;
1197  }
1198 
1199  // build and dump X3872
1200 
1201  BPHX3872ToJPsiPiPiBuilder* x3872 = nullptr;
1202  if (recoX3872) {
1203  if (usePF)
1204  x3872 = new BPHX3872ToJPsiPiPiBuilder(
1206  else if (usePC)
1207  x3872 = new BPHX3872ToJPsiPiPiBuilder(
1209  else if (useGP)
1210  x3872 = new BPHX3872ToJPsiPiPiBuilder(
1212  }
1213 
1214  if (x3872 != nullptr) {
1215  rIter = parMap.find(X3872);
1216  if (rIter != rIend) {
1217  const map<parType, double>& pMap = rIter->second;
1218  map<parType, double>::const_iterator pIter = pMap.begin();
1219  map<parType, double>::const_iterator pIend = pMap.end();
1220  while (pIter != pIend) {
1221  const map<parType, double>::value_type& pEntry = *pIter++;
1222  parType id = pEntry.first;
1223  double pv = pEntry.second;
1224  switch (id) {
1225  case ptMin:
1226  x3872->setPiPtMin(pv);
1227  break;
1228  case etaMax:
1229  x3872->setPiEtaMax(pv);
1230  break;
1231  case mPsiMin:
1232  x3872->setJPsiMassMin(pv);
1233  break;
1234  case mPsiMax:
1235  x3872->setJPsiMassMax(pv);
1236  break;
1237  case massMin:
1238  x3872->setMassMin(pv);
1239  break;
1240  case massMax:
1241  x3872->setMassMax(pv);
1242  break;
1243  case probMin:
1244  x3872->setProbMin(pv);
1245  break;
1246  case mFitMin:
1247  x3872->setMassFitMin(pv);
1248  break;
1249  case mFitMax:
1250  x3872->setMassFitMax(pv);
1251  break;
1252  case constrMJPsi:
1253  x3872->setConstr(pv > 0);
1254  break;
1255  case writeCandidate:
1256  writeX3872 = (pv > 0);
1257  break;
1258  default:
1259  break;
1260  }
1261  }
1262  }
1263  lX3872 = x3872->build();
1264  delete x3872;
1265  }
1266 
1267  return;
1268 }
1269 
1271 
1273  const string& name = ps.getParameter<string>("name");
1274  bool writeCandidate = ps.getParameter<bool>("writeCandidate");
1275  switch (rMap[name]) {
1276  case Onia:
1277  recoOnia = true;
1279  break;
1280  case Pmm:
1281  case Psi1:
1282  case Psi2:
1283  case Ups:
1284  case Ups1:
1285  case Ups2:
1286  case Ups3:
1287  recoOnia = true;
1288  break;
1289  case Kx0:
1290  recoKx0 = true;
1292  break;
1293  case Pkk:
1294  recoPkk = true;
1296  break;
1297  case Bu:
1298  recoBu = true;
1300  break;
1301  case Bd:
1302  recoBd = true;
1304  break;
1305  case Bs:
1306  recoBs = true;
1308  break;
1309  case K0s:
1310  recoK0s = true;
1312  break;
1313  case Lambda0:
1314  recoLambda0 = true;
1316  break;
1317  case B0:
1318  recoB0 = true;
1320  break;
1321  case Lambdab:
1322  recoLambdab = true;
1324  break;
1325  case Bc:
1326  recoBc = true;
1328  break;
1329  case X3872:
1330  recoX3872 = true;
1332  break;
1333  }
1334 
1335  map<string, parType>::const_iterator pIter = pMap.begin();
1336  map<string, parType>::const_iterator pIend = pMap.end();
1337  while (pIter != pIend) {
1338  const map<string, parType>::value_type& entry = *pIter++;
1339  const string& pn = entry.first;
1340  parType id = entry.second;
1341  double pv = ps.getParameter<double>(pn);
1342  if (pv > -1.0e35)
1343  edm::LogVerbatim("Configuration") << "BPHWriteSpecificDecay::setRecoParameters: set " << pn << " for " << name
1344  << " : " << (parMap[rMap[name]][id] = pv);
1345  }
1346 
1347  map<string, parType>::const_iterator fIter = fMap.begin();
1348  map<string, parType>::const_iterator fIend = fMap.end();
1349  while (fIter != fIend) {
1350  const map<string, parType>::value_type& entry = *fIter++;
1351  const string& fn = entry.first;
1352  parType id = entry.second;
1353  edm::LogVerbatim("Configuration") << "BPHWriteSpecificDecay::setRecoParameters: set " << fn << " for " << name
1354  << " : " << (parMap[rMap[name]][id] = (ps.getParameter<bool>(fn) ? 1 : -1));
1355  }
1356 }
1357 
1359 
BPHTokenWrapper< std::vector< reco::VertexCompositeCandidate > > l0CandsToken
const std::map< const BPHRecoCandidate *, const BPHRecoCandidate * > & daughMap() const
get original daughters map
virtual const reco::Candidate * originalReco(const reco::Candidate *daug) const
get the original particle from the clone
Analysis-level particle class.
Log< level::Info, true > LogVerbatim
static bool sameTrack(const reco::Candidate *lCand, const reco::Candidate *rCand, double minPDifference)
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
BPHTokenWrapper< std::vector< reco::Vertex > > pVertexToken
std::vector< BPHRecoConstCandPtr > build()
build candidates
std::vector< BPHPlusMinusConstCandPtr > lJPsi
BPHTokenWrapper< std::vector< reco::VertexCompositePtrCandidate > > kSCandsToken
std::vector< BPHPlusMinusConstCandPtr > lK0
std::vector< BPHPlusMinusConstCandPtr > build()
build candidates
edm::Ref< std::vector< reco::Vertex > > vertex_ref
void setMassMax(oniaType type, double m)
std::map< const BPHRecoCandidate *, compcc_ref > ccRefMap
std::vector< BPHPlusMinusConstCandPtr > lFull
std::map< std::string, recoType > rMap
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
const Point & position() const
position
Definition: Vertex.h:127
void setJPsiMassMin(double m)
T const * product() const
Definition: Handle.h:70
void setKPtMin(double pt)
set cuts
void setPiPtMin(double pt)
set cuts
std::vector< BPHRecoConstCandPtr > lBs
bool get(const edm::Event &ev, edm::Handle< Obj > &obj)
BPHTokenWrapper< std::vector< BPHTrackReference::candidate > > pcCandsToken
void setKEtaMax(double eta)
void setPtMin(double pt)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define SET_PAR(TYPE, NAME, PSET)
const pat::CompositeCandidate & composite() const override
get a composite by the simple sum of simple particles
virtual void fill(edm::Event &ev, const edm::EventSetup &es)
void setLambda0MassMin(double m)
void setJPsiMassMax(double m)
std::map< const BPHRecoCandidate *, const BPHRecoCandidate * > daughMap
void setProbMin(oniaType type, double p)
bool calculate(const TrajectoryStateOnSurface &sta, const TrajectoryStateOnSurface &stb) override
std::map< std::string, parType > pMap
static BPHGenericCollection * createCollection(const edm::Handle< T > &collection, const std::string &list="cfhpmig")
std::vector< BPHRecoConstCandPtr > lSs
std::vector< BPHRecoConstCandPtr > build()
build candidates
U second(std::pair< T, U > const &p)
deep_tau::DeepTauBase::BasicDiscriminator bd
Definition: DeepTauId.cc:808
double getConstrSigma(oniaType type) const
int TrackCharge
Definition: TrackCharge.h:4
virtual const reco::Candidate * getDaug(const std::string &name) const
BPHTokenWrapper< std::vector< reco::VertexCompositeCandidate > > k0CandsToken
BPHWriteSpecificDecay(const edm::ParameterSet &ps)
void setEtaMax(double eta)
std::vector< BPHPlusMinusConstCandPtr > getList(oniaType type, BPHRecoSelect *dSel=nullptr, BPHMomentumSelect *mSel=nullptr, BPHVertexSelect *vSel=nullptr, BPHFitSelect *kSel=nullptr)
BPHTokenWrapper< pat::MuonCollection > patMuonToken
void setEtaMax(double eta)
BPHTokenWrapper< std::vector< reco::PFCandidate > > pfCandsToken
def pv(vc)
Definition: MetAnalyzer.py:7
void setJPsiMassMin(double m)
set cuts
BPHTokenWrapper< std::vector< reco::VertexCompositePtrCandidate > > lSCandsToken
void setMassMin(double m)
set cuts
math::XYZPoint Point
point in the space
Definition: Vertex.h:40
BPHTokenWrapper< std::vector< pat::CompositeCandidate > > ccCandsToken
bool getData(T &iHolder) const
Definition: EventSetup.h:122
std::pair< GlobalPoint, GlobalPoint > points() const override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< BPHRecoConstCandPtr > lSd
double getConstrMass(oniaType type) const
const T * userData(const std::string &key) const
Returns user-defined data. Returns NULL if the data is not present, or not of type T...
Definition: PATObject.h:322
virtual const reco::Vertex & vertex(VertexFitter< 5 > *fitter=nullptr, const reco::BeamSpot *bs=nullptr, const GlobalPoint *priorPos=nullptr, const GlobalError *priorError=nullptr) const
get reconstructed vertex
void setLambda0MassMax(double m)
BPHTokenWrapper< std::vector< pat::GenericParticle > > gpCandsToken
edm::OrphanHandle< pat::CompositeCandidateCollection > write(edm::Event &ev, const std::vector< T > &list, const std::string &name)
size_type numberOfDaughters() const override
number of daughters
void setPiEtaMax(double eta)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::map< const BPHRecoCandidate *, vertex_ref > pvRefMap
std::vector< BPHPlusMinusConstCandPtr > lL0
std::vector< BPHRecoConstCandPtr > build()
build X3872 candidates
std::vector< BPHRecoConstCandPtr > lBu
std::vector< BPHRecoConstCandPtr > lLb
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > bFieldToken
void add(std::map< std::string, TH1 *> &h, TH1 *hist)
std::vector< BPHPlusMinusConstCandPtr > build()
build resonance candidates
void setJPsiMassMin(double m)
void setConstr(oniaType type, double mass, double sigma)
void setEtaMax(oniaType type, double eta)
void setPtMin(double pt)
set cuts
std::map< recoType, std::map< parType, double > > parMap
virtual const std::vector< const reco::Candidate * > & daughters() const
std::map< const BPHRecoCandidate *, const BPHRecoCandidate * > jPsiOMap
static constexpr float b0
void setJPsiMassMin(double m)
set cuts
std::vector< BPHRecoConstCandPtr > lB0
void setMassMin(oniaType type, double m)
std::vector< BPHRecoConstCandPtr > lBc
std::vector< BPHRecoConstCandPtr > lX3872
void produce(edm::Event &ev, const edm::EventSetup &es) override
std::vector< BPHPlusMinusConstCandPtr > build()
build candidates
std::vector< BPHRecoConstCandPtr > lBd
Analysis-level muon class.
Definition: Muon.h:51
void setJPsiMassMax(double m)
void setRecoParameters(const edm::ParameterSet &ps)
std::map< std::string, parType > fMap
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
void setPtMin(oniaType type, double pt)
set cuts
void setJPsiMassMax(double m)
const_iterator begin() const
first daughter const_iterator
Definition: Candidate.h:143
void setPiPtMin(double pt)
set cuts