CMS 3D CMS Logo

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