CMS 3D CMS Logo

DiMuonVertexMonitor.cc
Go to the documentation of this file.
1 /*
2  * See header file for a description of this class.
3  *
4  */
5 
6 #include <fmt/printf.h>
7 
21 
22 #include "TLorentzVector.h"
23 
24 namespace {
25  constexpr float cmToum = 10e4;
26  constexpr float mumass2 = 0.105658367 * 0.105658367; //mu mass squared (GeV^2/c^4)
27 } // namespace
28 
30  : ttbESToken_(esConsumes(edm::ESInputTag("", "TransientTrackBuilder"))),
31  tracksToken_(consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("muonTracks"))),
32  vertexToken_(consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("vertices"))),
33  motherName_(iConfig.getParameter<std::string>("decayMotherName")),
34  MEFolderName_(iConfig.getParameter<std::string>("FolderName")),
35  useClosestVertex_(iConfig.getParameter<bool>("useClosestVertex")),
36  maxSVdist_(iConfig.getParameter<double>("maxSVdist")),
37  CosPhi3DConfiguration_(iConfig.getParameter<edm::ParameterSet>("CosPhi3DConfig")),
38  SVDistConfiguration_(iConfig.getParameter<edm::ParameterSet>("SVDistConfig")),
39  SVDistSigConfiguration_(iConfig.getParameter<edm::ParameterSet>("SVDistSigConfig")),
40  SVDist3DConfiguration_(iConfig.getParameter<edm::ParameterSet>("SVDist3DConfig")),
41  SVDist3DSigConfiguration_(iConfig.getParameter<edm::ParameterSet>("SVDist3DSigConfig")) {
42  if (motherName_.find('Z') != std::string::npos) {
43  massLimits_ = std::make_pair(50., 120);
44  } else if (motherName_.find("J/#psi") != std::string::npos) {
45  massLimits_ = std::make_pair(2.7, 3.4);
46  } else if (motherName_.find("#Upsilon") != std::string::npos) {
47  massLimits_ = std::make_pair(8.9, 9.9);
48  } else {
49  edm::LogError("DiMuonVertexMonitor") << " unrecognized decay mother particle: " << motherName_
50  << " setting the default for the Z->mm (50.,120.)" << std::endl;
51  massLimits_ = std::make_pair(50., 120);
52  }
53 }
54 
56  iBooker.setCurrentFolder(MEFolderName_ + "/DiMuonVertexMonitor");
57 
58  // clang-format off
59  std::string ts = fmt::sprintf(";%s vertex probability;N(#mu#mu pairs)", motherName_);
60  std::string ps = "N(#mu#mu pairs)";
61  hSVProb_ = iBooker.book1D("VtxProb", ts, 100, 0., 1.);
62 
63  ts = fmt::sprintf("#chi^{2} of the %s vertex; #chi^{2} of the %s vertex; %s", motherName_, motherName_, ps);
64  hSVChi2_ = iBooker.book1D("VtxChi2", ts, 200, 0., 200.);
65 
66  ts = fmt::sprintf("#chi^{2}/ndf of the %s vertex; #chi^{2}/ndf of %s vertex; %s", motherName_, motherName_, ps);
67  hSVNormChi2_ = iBooker.book1D("VtxNormChi2", ts, 100, 0., 20.);
68 
69  std::string histTit = motherName_ + " #rightarrow #mu^{+}#mu^{-}";
70  ts = fmt::sprintf("%s;PV- %sV xy distance [#mum];%s", histTit, motherName_, ps);
71  hSVDist_ = iBooker.book1D("VtxDist", ts, 100, 0., 300.);
72 
73  ts = fmt::sprintf("%s;PV-%sV xy distance error [#mum];%s", histTit, motherName_, ps);
74  hSVDistErr_ = iBooker.book1D("VtxDistErr", ts, 100, 0., 1000.);
75 
76  ts = fmt::sprintf("%s;PV-%sV xy distance signficance;%s", histTit, motherName_, ps);
77  hSVDistSig_ = iBooker.book1D("VtxDistSig", ts, 100, 0., 5.);
78 
79  ts = fmt::sprintf("compatibility of %s vertex; compatibility of %s vertex; %s", motherName_, motherName_, ps);
80  hSVCompatibility_ = iBooker.book1D("VtxCompatibility", ts, 100, 0., 100.);
81 
82  ts = fmt::sprintf("%s;PV-%sV 3D distance [#mum];%s", histTit, motherName_, ps);
83  hSVDist3D_ = iBooker.book1D("VtxDist3D", ts, 100, 0., 300.);
84 
85  ts = fmt::sprintf("%s;PV-%sV 3D distance error [#mum];%s", histTit, motherName_, ps);
86  hSVDist3DErr_ = iBooker.book1D("VtxDist3DErr", ts, 100, 0., 1000.);
87 
88  ts = fmt::sprintf("%s;PV-%sV 3D distance signficance;%s", histTit, motherName_, ps);
89  hSVDist3DSig_ = iBooker.book1D("VtxDist3DSig", ts, 100, 0., 5.);
90 
91  ts = fmt::sprintf("3D compatibility of %s vertex;3D compatibility of %s vertex; %s", motherName_, motherName_, ps);
92  hSVCompatibility3D_ = iBooker.book1D("VtxCompatibility3D", ts, 100, 0., 100.);
93 
94  hInvMass_ = iBooker.book1D("InvMass", fmt::sprintf("%s;M(#mu,#mu) [GeV];%s", histTit, ps), 70., massLimits_.first, massLimits_.second);
95  hCosPhi_ = iBooker.book1D("CosPhi", fmt::sprintf("%s;cos(#phi_{xy});%s", histTit, ps), 50, -1., 1.);
96  hCosPhi3D_ = iBooker.book1D("CosPhi3D", fmt::sprintf("%s;cos(#phi_{3D});%s", histTit, ps), 50, -1., 1.);
97  hCosPhiInv_ = iBooker.book1D("CosPhiInv", fmt::sprintf("%s;inverted cos(#phi_{xy});%s", histTit, ps), 50, -1., 1.);
98  hCosPhiInv3D_ = iBooker.book1D("CosPhiInv3D", fmt::sprintf("%s;inverted cos(#phi_{3D});%s", histTit, ps), 50, -1., 1.);
99  hCosPhiUnbalance_ = iBooker.book1D("CosPhiUnbalance", fmt::sprintf("%s;cos(#phi_{xy}) unbalance;#Delta%s", histTit, ps), 50, -1.,1.);
100  hCosPhi3DUnbalance_ = iBooker.book1D("CosPhi3DUnbalance", fmt::sprintf("%s;cos(#phi_{3D}) unbalance;#Delta%s", histTit, ps), 50, -1., 1.);
101 
102  hdxy_ = iBooker.book1D("dxy", fmt::sprintf("%s;muon track d_{xy}(PV) [#mum];muon tracks", histTit), 150, -300, 300);
103  hdz_ = iBooker.book1D("dz", fmt::sprintf("%s;muon track d_{z}(PV) [#mum];muon tracks", histTit), 150, -300, 300);
104  hdxyErr_ = iBooker.book1D("dxyErr", fmt::sprintf("%s;muon track err_{dxy} [#mum];muon tracks", histTit), 250, 0., 500.);
105  hdzErr_ = iBooker.book1D("dzErr", fmt::sprintf("%s;muon track err_{dz} [#mum];muon tracks", histTit), 250, 0., 500.);
106  hIP2d_ = iBooker.book1D("IP2d", fmt::sprintf("%s;muon track IP_{2D} [#mum];muon tracks", histTit), 150, -300, 300);
107  hIP3d_ = iBooker.book1D("IP3d", fmt::sprintf("%s;muon track IP_{3D} [#mum];muon tracks", histTit), 150, -300, 300);
108  hIP2dsig_ = iBooker.book1D("IP2Dsig", fmt::sprintf("%s;muon track IP_{2D} significance;muon tracks", histTit), 100, 0., 5.);
109  hIP3dsig_ = iBooker.book1D("IP3Dsig", fmt::sprintf("%s;muon track IP_{3D} significance;muon tracks", histTit), 100, 0., 5.);
110  // clang-format on
111 
112  // now book the cosphi3D plots vs kinematics
113  iBooker.setCurrentFolder(MEFolderName_ + "/DiMuonVertexMonitor/CosPhi3DPlots");
115 
116  // now book the PV-SV distance plots vs kinematics
117  iBooker.setCurrentFolder(MEFolderName_ + "/DiMuonVertexMonitor/SVDistPlots");
119 
120  // now book the PV-SV distance significance plots vs kinematics
121  iBooker.setCurrentFolder(MEFolderName_ + "/DiMuonVertexMonitor/SVDistSigPlots");
123 
124  // now book the PV-SV 3D distance plots vs kinematics
125  iBooker.setCurrentFolder(MEFolderName_ + "/DiMuonVertexMonitor/SVDist3DPlots");
127 
128  // now book the PV-SV 3D distance significance plots vs kinematics
129  iBooker.setCurrentFolder(MEFolderName_ + "/DiMuonVertexMonitor/SVDist3DSigPlots");
131 }
132 
134  std::vector<const reco::Track*> myTracks;
135  const auto trackHandle = iEvent.getHandle(tracksToken_);
136  if (!trackHandle.isValid()) {
137  edm::LogError("DiMuonVertexMonitor") << "invalid track collection encountered!";
138  return;
139  }
140 
141  for (const auto& muonTrk : *trackHandle) {
142  myTracks.emplace_back(&muonTrk);
143  }
144 
145 #ifdef EDM_ML_DEBUG
146  for (const auto& track : myTracks) {
147  edm::LogVerbatim("DiMuonVertexMonitor") << __PRETTY_FUNCTION__ << " pT: " << track->pt() << " GeV"
148  << " , pT error: " << track->ptError() << " GeV"
149  << " , eta: " << track->eta() << " , phi: " << track->phi() << std::endl;
150  }
151 #endif
152 
153  const TransientTrackBuilder* theB = &iSetup.getData(ttbESToken_);
154  TransientVertex mumuTransientVtx;
155  std::vector<reco::TransientTrack> tks;
156 
157  if (myTracks.size() != 2) {
158  edm::LogWarning("DiMuonVertexMonitor") << "There are not enough tracks to monitor!";
159  return;
160  }
161 
162  const auto& t1 = myTracks[1]->momentum();
163  const auto& t0 = myTracks[0]->momentum();
164  const auto& ditrack = t1 + t0;
165 
166  const auto& tplus = myTracks[0]->charge() > 0 ? myTracks[0] : myTracks[1];
167  const auto& tminus = myTracks[0]->charge() < 0 ? myTracks[0] : myTracks[1];
168 
169  TLorentzVector p4_tplus(tplus->px(), tplus->py(), tplus->pz(), sqrt((tplus->p() * tplus->p()) + mumass2));
170  TLorentzVector p4_tminus(tminus->px(), tminus->py(), tminus->pz(), sqrt((tminus->p() * tminus->p()) + mumass2));
171 
172 #ifdef EDM_ML_DEBUG
173  // Define a lambda function to convert TLorentzVector to a string
174  auto tLorentzVectorToString = [](const TLorentzVector& vector) {
175  return std::to_string(vector.Px()) + " " + std::to_string(vector.Py()) + " " + std::to_string(vector.Pz()) + " " +
176  std::to_string(vector.E());
177  };
178 
179  edm::LogVerbatim("DiMuonVertexMonitor") << "mu+" << tLorentzVectorToString(p4_tplus) << std::endl;
180  edm::LogVerbatim("DiMuonVertexMonitor") << "mu-" << tLorentzVectorToString(p4_tminus) << std::endl;
181 #endif
182 
183  const auto& Zp4 = p4_tplus + p4_tminus;
184  float track_invMass = Zp4.M();
185  hInvMass_->Fill(track_invMass);
186 
187  // creat the pair of TLorentVectors used to make the plos
188  std::pair<TLorentzVector, TLorentzVector> tktk_p4 = std::make_pair(p4_tplus, p4_tminus);
189 
190  math::XYZPoint ZpT(ditrack.x(), ditrack.y(), 0);
191  math::XYZPoint Zp(ditrack.x(), ditrack.y(), ditrack.z());
192 
193  for (const auto& track : myTracks) {
194  reco::TransientTrack trajectory = theB->build(track);
195  tks.push_back(trajectory);
196  }
197 
198  KalmanVertexFitter kalman(true);
199  mumuTransientVtx = kalman.vertex(tks);
200 
201  double SVProb = TMath::Prob(mumuTransientVtx.totalChiSquared(), (int)mumuTransientVtx.degreesOfFreedom());
202  hSVProb_->Fill(SVProb);
203  hSVChi2_->Fill(mumuTransientVtx.totalChiSquared());
204  hSVNormChi2_->Fill(mumuTransientVtx.totalChiSquared() / (int)mumuTransientVtx.degreesOfFreedom());
205 
206  if (!mumuTransientVtx.isValid())
207  return;
208 
209  const reco::Vertex* theClosestVertex;
210  // get collection of reconstructed vertices from event
211  edm::Handle<reco::VertexCollection> vertexHandle = iEvent.getHandle(vertexToken_);
212  if (vertexHandle.isValid()) {
213  const reco::VertexCollection* vertices = vertexHandle.product();
214  theClosestVertex = this->findClosestVertex(mumuTransientVtx, vertices);
215  } else {
216  edm::LogWarning("DiMuonVertexMonitor") << "invalid vertex collection encountered Skipping event!";
217  return;
218  }
219 
220  reco::Vertex theMainVtx;
221  if (!useClosestVertex_ || theClosestVertex == nullptr) {
222  // if the closest vertex is not available, or explicitly not chosen
223  theMainVtx = vertexHandle.product()->front();
224  } else {
225  theMainVtx = *theClosestVertex;
226  }
227 
228  const math::XYZPoint theMainVtxPos(theMainVtx.position().x(), theMainVtx.position().y(), theMainVtx.position().z());
229  const math::XYZPoint myVertex(
230  mumuTransientVtx.position().x(), mumuTransientVtx.position().y(), mumuTransientVtx.position().z());
231  const math::XYZPoint deltaVtx(
232  theMainVtxPos.x() - myVertex.x(), theMainVtxPos.y() - myVertex.y(), theMainVtxPos.z() - myVertex.z());
233 
234 #ifdef EDM_ML_DEBUG
235  edm::LogVerbatim("DiMuonVertexMonitor") << "mm vertex position:" << mumuTransientVtx.position().x() << ","
236  << mumuTransientVtx.position().y() << "," << mumuTransientVtx.position().z();
237 
238  edm::LogVerbatim("DiMuonVertexMonitor") << "main vertex position:" << theMainVtx.position().x() << ","
239  << theMainVtx.position().y() << "," << theMainVtx.position().z();
240 #endif
241 
242  if (theMainVtx.isValid()) {
243  // fill the impact parameter plots
244  for (const auto& track : myTracks) {
245  hdxy_->Fill(track->dxy(theMainVtxPos) * cmToum);
246  hdz_->Fill(track->dz(theMainVtxPos) * cmToum);
247  hdxyErr_->Fill(track->dxyError() * cmToum);
248  hdzErr_->Fill(track->dzError() * cmToum);
249 
250  const auto& ttrk = theB->build(track);
251  Global3DVector dir(track->px(), track->py(), track->pz());
252  const auto& ip2d = IPTools::signedTransverseImpactParameter(ttrk, dir, theMainVtx);
253  const auto& ip3d = IPTools::signedImpactParameter3D(ttrk, dir, theMainVtx);
254 
255  hIP2d_->Fill(ip2d.second.value() * cmToum);
256  hIP3d_->Fill(ip3d.second.value() * cmToum);
257  hIP2dsig_->Fill(ip2d.second.significance());
258  hIP3dsig_->Fill(ip3d.second.significance());
259  }
260 
261  // Z Vertex distance in the xy plane
262  VertexDistanceXY vertTool;
263  double distance = vertTool.distance(mumuTransientVtx, theMainVtx).value();
264  double dist_err = vertTool.distance(mumuTransientVtx, theMainVtx).error();
265  float compatibility = 0.;
266 
267  try {
268  compatibility = vertTool.compatibility(mumuTransientVtx, theMainVtx);
269  } catch (cms::Exception& er) {
270  LogTrace("DiMuonVertexMonitor") << "caught std::exception " << er.what() << std::endl;
271  }
272 
273  hSVCompatibility_->Fill(compatibility);
275  hSVDistErr_->Fill(dist_err * cmToum);
276  hSVDistSig_->Fill(distance / dist_err);
277 
278  // Z Vertex distance in 3D
279  VertexDistance3D vertTool3D;
280  double distance3D = vertTool3D.distance(mumuTransientVtx, theMainVtx).value();
281  double dist3D_err = vertTool3D.distance(mumuTransientVtx, theMainVtx).error();
282  float compatibility3D = 0.;
283 
284  try {
285  compatibility3D = vertTool3D.compatibility(mumuTransientVtx, theMainVtx);
286  } catch (cms::Exception& er) {
287  LogTrace("DiMuonVertexMonitor") << "caught std::exception " << er.what() << std::endl;
288  }
289 
290  hSVCompatibility3D_->Fill(compatibility3D);
291  hSVDist3D_->Fill(distance3D * cmToum);
292  hSVDist3DErr_->Fill(dist3D_err * cmToum);
293  hSVDist3DSig_->Fill(distance3D / dist3D_err);
294 
295  // creat the pair of TLorentVectors used to make the plos
296  std::pair<TLorentzVector, TLorentzVector> tktk_p4 = std::make_pair(p4_tplus, p4_tminus);
297 
299  SVDistSigPlots_.fillPlots(distance / dist_err, tktk_p4);
300  SVDist3DPlots_.fillPlots(distance3D * cmToum, tktk_p4);
301  SVDist3DSigPlots_.fillPlots(distance3D / dist3D_err, tktk_p4);
302 
303  // cut on the PV - SV distance
304  if (distance * cmToum < maxSVdist_) {
305  double cosphi = (ZpT.x() * deltaVtx.x() + ZpT.y() * deltaVtx.y()) /
306  (sqrt(ZpT.x() * ZpT.x() + ZpT.y() * ZpT.y()) *
307  sqrt(deltaVtx.x() * deltaVtx.x() + deltaVtx.y() * deltaVtx.y()));
308 
309  double cosphi3D = (Zp.x() * deltaVtx.x() + Zp.y() * deltaVtx.y() + Zp.z() * deltaVtx.z()) /
310  (sqrt(Zp.x() * Zp.x() + Zp.y() * Zp.y() + Zp.z() * Zp.z()) *
311  sqrt(deltaVtx.x() * deltaVtx.x() + deltaVtx.y() * deltaVtx.y() + deltaVtx.z() * deltaVtx.z()));
312 
313  hCosPhi_->Fill(cosphi);
314  hCosPhi3D_->Fill(cosphi3D);
315  // inverted
316  hCosPhiInv_->Fill(-cosphi);
317  hCosPhiInv3D_->Fill(-cosphi3D);
318 
319 #ifdef EDM_ML_DEBUG
320  edm::LogVerbatim("DiMuonVertexMonitor")
321  << "distance " << distance * cmToum << " cosphi3D:" << cosphi3D << std::endl;
322 #endif
323 
324  // unbalance
325  hCosPhiUnbalance_->Fill(cosphi, 1.);
326  hCosPhiUnbalance_->Fill(-cosphi, -1.);
327  hCosPhi3DUnbalance_->Fill(cosphi3D, 1.);
328  hCosPhi3DUnbalance_->Fill(-cosphi3D, -1.);
329 
330  // fill the cos(phi3D) plots
331  CosPhi3DPlots_.fillPlots(cosphi3D, tktk_p4);
332  }
333  } else {
334  edm::LogWarning("DiMuonVertexMonitor") << "hardest primary vertex in the event is not valid!";
335  }
336 }
337 
338 // compute the closest vertex to di-lepton ------------------------------------
340  const reco::VertexCollection* vertices) const {
341  reco::Vertex* defaultVtx = nullptr;
342 
343  if (!aTransVtx.isValid())
344  return defaultVtx;
345 
346  // find the closest vertex to the secondary vertex in 3D
347  VertexDistance3D vertTool3D;
348  float minD = 9999.;
349  int closestVtxIndex = 0;
350  int counter = 0;
351  for (const auto& vtx : *vertices) {
352  double dist3D = vertTool3D.distance(aTransVtx, vtx).value();
353  if (dist3D < minD) {
354  minD = dist3D;
355  closestVtxIndex = counter;
356  }
357  counter++;
358  }
359 
360  if ((*vertices).at(closestVtxIndex).isValid()) {
361  return &(vertices->at(closestVtxIndex));
362  } else {
363  return defaultVtx;
364  }
365 }
366 
369  desc.add<edm::InputTag>("muonTracks", edm::InputTag("ALCARECOTkAlDiMuon"));
370  desc.add<edm::InputTag>("vertices", edm::InputTag("offlinePrimaryVertices"));
371  desc.add<std::string>("FolderName", "DiMuonVertexMonitor");
372  desc.add<std::string>("decayMotherName", "Z");
373  desc.add<bool>("useClosestVertex", true);
374  desc.add<double>("maxSVdist", 50.);
375 
376  {
377  edm::ParameterSetDescription psCosPhi3D;
378  psCosPhi3D.add<std::string>("name", "CosPhi3D");
379  psCosPhi3D.add<std::string>("title", "cos(#phi_{3D})");
380  psCosPhi3D.add<std::string>("yUnits", "");
381  psCosPhi3D.add<int>("NxBins", 24);
382  psCosPhi3D.add<int>("NyBins", 50);
383  psCosPhi3D.add<double>("ymin", -1.);
384  psCosPhi3D.add<double>("ymax", 1.);
385  psCosPhi3D.add<double>("maxDeltaEta", 3.7);
386  desc.add<edm::ParameterSetDescription>("CosPhi3DConfig", psCosPhi3D);
387  }
388 
389  {
391  psSVDist.add<std::string>("name", "SVDist");
392  psSVDist.add<std::string>("title", "PV-SV distance");
393  psSVDist.add<std::string>("yUnits", "[#mum]");
394  psSVDist.add<int>("NxBins", 24);
395  psSVDist.add<int>("NyBins", 100);
396  psSVDist.add<double>("ymin", 0.);
397  psSVDist.add<double>("ymax", 300.);
398  psSVDist.add<double>("maxDeltaEta", 3.7);
399  desc.add<edm::ParameterSetDescription>("SVDistConfig", psSVDist);
400  }
401 
402  {
403  edm::ParameterSetDescription psSVDistSig;
404  psSVDistSig.add<std::string>("name", "SVDistSig");
405  psSVDistSig.add<std::string>("title", "PV-SV distance significance");
406  psSVDistSig.add<std::string>("yUnits", "[#mum]");
407  psSVDistSig.add<int>("NxBins", 24);
408  psSVDistSig.add<int>("NyBins", 100);
409  psSVDistSig.add<double>("ymin", 0.);
410  psSVDistSig.add<double>("ymax", 5.);
411  psSVDistSig.add<double>("maxDeltaEta", 3.7);
412  desc.add<edm::ParameterSetDescription>("SVDistSigConfig", psSVDistSig);
413  }
414 
415  {
416  edm::ParameterSetDescription psSVDist3D;
417  psSVDist3D.add<std::string>("name", "SVDist3D");
418  psSVDist3D.add<std::string>("title", "PV-SV 3D distance");
419  psSVDist3D.add<std::string>("yUnits", "[#mum]");
420  psSVDist3D.add<int>("NxBins", 24);
421  psSVDist3D.add<int>("NyBins", 100);
422  psSVDist3D.add<double>("ymin", 0.);
423  psSVDist3D.add<double>("ymax", 300.);
424  psSVDist3D.add<double>("maxDeltaEta", 3.7);
425  desc.add<edm::ParameterSetDescription>("SVDist3DConfig", psSVDist3D);
426  }
427 
428  {
429  edm::ParameterSetDescription psSVDist3DSig;
430  psSVDist3DSig.add<std::string>("name", "SVDist3DSig");
431  psSVDist3DSig.add<std::string>("title", "PV-SV 3D distance significance");
432  psSVDist3DSig.add<std::string>("yUnits", "[#mum]");
433  psSVDist3DSig.add<int>("NxBins", 24);
434  psSVDist3DSig.add<int>("NyBins", 100);
435  psSVDist3DSig.add<double>("ymin", 0.);
436  psSVDist3DSig.add<double>("ymax", 5.);
437  psSVDist3DSig.add<double>("maxDeltaEta", 3.7);
438  desc.add<edm::ParameterSetDescription>("SVDist3DSigConfig", psSVDist3DSig);
439  }
440 
441  descriptions.addWithDefaultLabel(desc);
442 }
443 
MonitorElement * hdxyErr_
const std::string MEFolderName_
Log< level::Info, true > LogVerbatim
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
float totalChiSquared() const
MonitorElement * hIP2d_
MonitorElement * hCosPhiInv_
std::pair< float, float > massLimits_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
GlobalPoint position() const
MonitorElement * hSVDist3DErr_
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
MonitorElement * hIP2dsig_
Measurement1D distance(const GlobalPoint &vtx1Position, const GlobalError &vtx1PositionError, const GlobalPoint &vtx2Position, const GlobalError &vtx2PositionError) const override
MonitorElement * hSVProb_
T z() const
Definition: PV3DBase.h:61
static constexpr float mumass2
const Point & position() const
position
Definition: Vertex.h:128
std::pair< bool, Measurement1D > signedTransverseImpactParameter(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:57
T const * product() const
Definition: Handle.h:70
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
DiLepPlotHelp::PlotsVsKinematics SVDistSigPlots_
std::pair< bool, Measurement1D > signedImpactParameter3D(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:81
DiLepPlotHelp::PlotsVsKinematics SVDistPlots_
MonitorElement * hCosPhi_
MonitorElement * hSVCompatibility_
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
edm::ParameterSet SVDist3DConfiguration_
Log< level::Error, false > LogError
std::vector< Vertex > VertexCollection
Definition: Vertex.h:31
float degreesOfFreedom() const
MonitorElement * hIP3dsig_
const std::string motherName_
MonitorElement * hSVNormChi2_
static std::string to_string(const XMLCh *ch)
DiLepPlotHelp::PlotsVsKinematics SVDist3DPlots_
#define LogTrace(id)
MonitorElement * hCosPhi3DUnbalance_
MonitorElement * hdxy_
MonitorElement * hCosPhiUnbalance_
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const override
MonitorElement * hCosPhiInv3D_
reco::TransientTrack build(const reco::Track *p) const
void Fill(long long x)
MonitorElement * hSVDist3D_
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
MonitorElement * hSVDist3DSig_
DiMuonVertexMonitor(const edm::ParameterSet &)
int iEvent
Definition: GenABIO.cc:224
bool isValid() const
MonitorElement * hSVChi2_
T sqrt(T t)
Definition: SSEVec.h:23
void fillPlots(const float val, const std::pair< TLorentzVector, TLorentzVector > &momenta)
const reco::Vertex * findClosestVertex(const TransientVertex aTransVtx, const reco::VertexCollection *vertices) const
DiLepPlotHelp::PlotsVsKinematics SVDist3DSigPlots_
const edm::EDGetTokenT< reco::TrackCollection > tracksToken_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
MonitorElement * hSVDistSig_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::ParameterSet SVDistSigConfiguration_
edm::ParameterSet CosPhi3DConfiguration_
Measurement1D distance(const GlobalPoint &vtx1Position, const GlobalError &vtx1PositionError, const GlobalPoint &vtx2Position, const GlobalError &vtx2PositionError) const override
void analyze(const edm::Event &, const edm::EventSetup &) override
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
MonitorElement * hSVDist_
bool isValid() const
Definition: HandleBase.h:70
double value() const
Definition: Measurement1D.h:25
MonitorElement * hIP3d_
float compatibility(const GlobalPoint &vtx1Position, const GlobalError &vtx1PositionError, const GlobalPoint &vtx2Position, const GlobalError &vtx2PositionError) const override
MonitorElement * hSVCompatibility3D_
void bookFromPSet(dqm::reco::DQMStore::IBooker &iBooker, const edm::ParameterSet &hpar)
fixed size matrix
HLT enums.
const edm::EDGetTokenT< reco::VertexCollection > vertexToken_
static std::atomic< unsigned int > counter
MonitorElement * hSVDistErr_
edm::ParameterSet SVDistConfiguration_
edm::ParameterSet SVDist3DSigConfiguration_
double error() const
Definition: Measurement1D.h:27
MonitorElement * hCosPhi3D_
MonitorElement * hdzErr_
Log< level::Warning, false > LogWarning
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
char const * what() const noexcept override
Definition: Exception.cc:107
static constexpr float cmToum
DiLepPlotHelp::PlotsVsKinematics CosPhi3DPlots_
bool isValid() const
Tells whether the vertex is valid.
Definition: Vertex.h:73
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > ttbESToken_
Definition: Run.h:45
MonitorElement * hInvMass_
float compatibility(const GlobalPoint &vtx1Position, const GlobalError &vtx1PositionError, const GlobalPoint &vtx2Position, const GlobalError &vtx2PositionError) const override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)