CMS 3D CMS Logo

TkAlV0sAnalyzer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Alignment/OfflineValidation
4 // Class: TkAlV0sAnalyzer
5 //
6 /*
7  *\class TkAlV0sAnalyzer TkAlV0sAnalyzer.cc Alignment/TkAlV0sAnalyzer/plugins/TkAlV0sAnalyzer.cc
8 
9  Description: [one line class summary]
10 
11  Implementation:
12  [Notes on implementation]
13 */
14 //
15 // Original Author: Marco Musich
16 // Created: Thu, 14 Dec 2023 15:10:34 GMT
17 //
18 //
19 
20 // system include files
21 #include <memory>
22 
23 // user include files
26 
29 
45 
46 #include "TH1F.h"
47 #include "TH2F.h"
48 #include "TProfile.h"
49 #include "TLorentzVector.h"
50 
51 //
52 // class declaration
53 //
54 
56 
57 struct MEbinning {
58  int nbins;
59  double xmin;
60  double xmax;
61 };
62 
63 class TkAlV0sAnalyzer : public edm::one::EDAnalyzer<edm::one::SharedResources> {
64 public:
65  explicit TkAlV0sAnalyzer(const edm::ParameterSet&);
66  ~TkAlV0sAnalyzer() override = default;
67 
68  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
69 
70 private:
71  template <typename T, typename... Args>
72  T* book(const Args&... args) const;
73  void beginJob() override;
74  void analyze(const edm::Event&, const edm::EventSetup&) override;
75 
77 
82  MEbinning xbinning,
83  MEbinning ybinning);
84 
85  TProfile* bookProfile(std::string name,
89  MEbinning xbinning,
90  MEbinning ybinning);
91 
92  void getHistoPSet(edm::ParameterSet pset, MEbinning& mebinning);
93 
95 
96  // ----------member data ---------------------------
97  const edm::EDGetTokenT<TrackCollection> tracksToken_; //used to select what tracks to read from configuration file
99 
104  const bool forceSCAL_;
105  const int pvNDOF_;
106 
107  // histograms
109 
111  TH1F* h_V0Mass;
112 
113  TH1F* v0_N_;
114  TH1F* v0_mass_;
115  TH1F* v0_pt_;
116  TH1F* v0_eta_;
117  TH1F* v0_phi_;
118  TH1F* v0_Lxy_;
122 
123  TProfile* v0_mass_vs_p_;
124  TProfile* v0_mass_vs_pt_;
125  TProfile* v0_mass_vs_eta_;
126 
129 
131  TProfile* v0_Lxy_vs_pt_;
132  TProfile* v0_Lxy_vs_eta_;
133 
134  TH1F* n_vs_BX_;
135  TProfile* v0_N_vs_BX_;
136  TProfile* v0_mass_vs_BX_;
137  TProfile* v0_Lxy_vs_BX_;
139 
140  TH1F* n_vs_lumi_;
141  TProfile* v0_N_vs_lumi_;
142  TProfile* v0_mass_vs_lumi_;
143  TProfile* v0_Lxy_vs_lumi_;
145 
146  TH1F* n_vs_PU_;
147  TProfile* v0_N_vs_PU_;
148  TProfile* v0_mass_vs_PU_;
149  TProfile* v0_Lxy_vs_PU_;
151 
152  TH1F* n_vs_LS_;
153  TProfile* v0_N_vs_LS_;
154 
163 };
164 
165 static constexpr double piMass2 = 0.13957018 * 0.13957018;
166 
167 //
168 // constructors and destructor
169 //
171  : tracksToken_(consumes<TrackCollection>(iConfig.getParameter<edm::InputTag>("tracks"))),
172  vccToken_(consumes<reco::VertexCompositeCandidateCollection>(
173  iConfig.getParameter<edm::InputTag>("vertexCompositeCandidates"))),
174  bsToken_(consumes<reco::BeamSpot>(iConfig.getParameter<edm::InputTag>("beamSpot"))),
175  pvToken_(consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("primaryVertex"))),
176  lumiscalersToken_(consumes<LumiScalersCollection>(iConfig.getParameter<edm::InputTag>("lumiScalers"))),
177  metaDataToken_(consumes<OnlineLuminosityRecord>(iConfig.getParameter<edm::InputTag>("metadata"))),
178  forceSCAL_(iConfig.getParameter<bool>("forceSCAL")),
179  pvNDOF_(iConfig.getParameter<int>("pvNDOF")) {
180  usesResource(TFileService::kSharedResource);
181 
182  v0_N_ = nullptr;
183  v0_mass_ = nullptr;
184  v0_pt_ = nullptr;
185  v0_eta_ = nullptr;
186  v0_phi_ = nullptr;
187  v0_Lxy_ = nullptr;
188  v0_Lxy_wrtBS_ = nullptr;
189  v0_chi2oNDF_ = nullptr;
190  v0_mass_vs_p_ = nullptr;
191  v0_mass_vs_pt_ = nullptr;
192  v0_mass_vs_eta_ = nullptr;
193  v0_deltaMass_ = nullptr;
194  v0_deltaMass_vs_pt_ = nullptr;
195  v0_deltaMass_vs_eta_ = nullptr;
196 
197  v0_Lxy_vs_deltaMass_ = nullptr;
198  v0_Lxy_vs_pt_ = nullptr;
199  v0_Lxy_vs_eta_ = nullptr;
200 
201  n_vs_BX_ = nullptr;
202  v0_N_vs_BX_ = nullptr;
203  v0_mass_vs_BX_ = nullptr;
204  v0_Lxy_vs_BX_ = nullptr;
205  v0_deltaMass_vs_BX_ = nullptr;
206 
207  n_vs_lumi_ = nullptr;
208  v0_N_vs_lumi_ = nullptr;
209  v0_mass_vs_lumi_ = nullptr;
210  v0_Lxy_vs_lumi_ = nullptr;
211  v0_deltaMass_vs_lumi_ = nullptr;
212 
213  n_vs_PU_ = nullptr;
214  v0_N_vs_PU_ = nullptr;
215  v0_mass_vs_PU_ = nullptr;
216  v0_Lxy_vs_PU_ = nullptr;
217  v0_deltaMass_vs_PU_ = nullptr;
218 
219  n_vs_LS_ = nullptr;
220  v0_N_vs_LS_ = nullptr;
221 
223  getHistoPSet(histoPSet.getParameter<edm::ParameterSet>("massPSet"), mass_binning_);
224  getHistoPSet(histoPSet.getParameter<edm::ParameterSet>("ptPSet"), pt_binning_);
225  getHistoPSet(histoPSet.getParameter<edm::ParameterSet>("etaPSet"), eta_binning_);
226  getHistoPSet(histoPSet.getParameter<edm::ParameterSet>("LxyPSet"), Lxy_binning_);
227  getHistoPSet(histoPSet.getParameter<edm::ParameterSet>("chi2oNDFPSet"), chi2oNDF_binning_);
228  getHistoPSet(histoPSet.getParameter<edm::ParameterSet>("lumiPSet"), lumi_binning_);
229  getHistoPSet(histoPSet.getParameter<edm::ParameterSet>("puPSet"), pu_binning_);
230  getHistoPSet(histoPSet.getParameter<edm::ParameterSet>("lsPSet"), ls_binning_);
231 }
232 
233 template <typename T, typename... Args>
234 T* TkAlV0sAnalyzer::book(const Args&... args) const {
235  T* t = fs_->make<T>(args...);
236  return t;
237 }
238 
240  mebinning.nbins = pset.getParameter<int32_t>("nbins");
241  mebinning.xmin = pset.getParameter<double>("xmin");
242  mebinning.xmax = pset.getParameter<double>("xmax");
243 }
244 
247  std::string title_w_axes = title + ";" + xaxis + ";" + yaxis;
248  return book<TH1F>(name.c_str(), title_w_axes.c_str(), binning.nbins, binning.xmin, binning.xmax);
249 }
250 
253  std::string title_w_axes = title + ";" + xaxis + ";" + yaxis;
254  return book<TH2F>(name.c_str(),
255  title_w_axes.c_str(),
256  xbinning.nbins,
257  xbinning.xmin,
258  xbinning.xmax,
259  ybinning.nbins,
260  ybinning.xmin,
261  ybinning.xmax);
262 }
263 
266  std::string title_w_axes = title + ";" + xaxis + ";" + yaxis;
267  return book<TProfile>(
268  name.c_str(), title_w_axes.c_str(), xbinning.nbins, xbinning.xmin, xbinning.xmax, ybinning.xmin, ybinning.xmax);
269 }
270 
271 //
272 // member functions
273 //
274 // ------------ method called for each event ------------
276  using namespace edm;
277 
278  std::vector<const reco::Track*> myTracks;
279 
281  iEvent.getByToken(vccToken_, vccHandle);
282 
283  if (vccHandle->empty())
284  return;
285 
287 
288  for (const auto& track : iEvent.get(tracksToken_)) {
289  myTracks.emplace_back(&track);
290  }
291 
292  // exclude multiple candidates
293  if (myTracks.size() != 2)
294  return;
295 
296  for (const auto& v0 : v0s) {
297  float mass = v0.mass();
298  h_V0Mass->Fill(mass);
299 
300  for (size_t i = 0; i < v0.numberOfDaughters(); ++i) {
301  //LogPrint("AlignmentTrackFromVertexCompositeCandidateSelector") << "daughter: " << i << std::endl;
302  const reco::Candidate* daughter = v0.daughter(i);
303  const reco::RecoChargedCandidate* chargedDaughter = dynamic_cast<const reco::RecoChargedCandidate*>(daughter);
304  if (chargedDaughter) {
305  //LogPrint("AlignmentTrackFromVertexCompositeCandidateSelector") << "charged daughter: " << i << std::endl;
306  const reco::TrackRef trackRef = chargedDaughter->track();
307  if (trackRef.isNonnull()) {
308  // LogPrint("AlignmentTrackFromVertexCompositeCandidateSelector")
309  // << "charged daughter has non-null trackref: " << i << std::endl;
310  }
311  }
312  }
313  }
314 
315  const auto& tplus = myTracks[0]->charge() > 0 ? myTracks[0] : myTracks[1];
316  const auto& tminus = myTracks[0]->charge() < 0 ? myTracks[0] : myTracks[1];
317 
318  TLorentzVector p4_tplus(tplus->px(), tplus->py(), tplus->pz(), sqrt((tplus->p() * tplus->p()) + piMass2));
319  TLorentzVector p4_tminus(tminus->px(), tminus->py(), tminus->pz(), sqrt((tminus->p() * tminus->p()) + piMass2));
320 
321  const auto& V0p4 = p4_tplus + p4_tminus;
322  float track_invMass = V0p4.M();
323  h_diTrackMass->Fill(track_invMass);
324 
326 }
327 
329  size_t bx = iEvent.bunchCrossing();
330  n_vs_BX_->Fill(bx);
331 
332  float lumi = -1.;
333  if (forceSCAL_) {
335  if (lumiScalers.isValid() && !lumiScalers->empty()) {
336  LumiScalersCollection::const_iterator scalit = lumiScalers->begin();
337  lumi = scalit->instantLumi();
338  }
339  } else {
341  if (metaData.isValid())
342  lumi = metaData->instLumi();
343  }
344 
345  n_vs_lumi_->Fill(lumi);
346 
347  edm::Handle<reco::BeamSpot> beamspotHandle = iEvent.getHandle(bsToken_);
348  reco::BeamSpot const* bs = nullptr;
349  if (beamspotHandle.isValid())
350  bs = &(*beamspotHandle);
351 
353  reco::Vertex const* pv = nullptr;
354  size_t nPV = 0;
355  if (pvHandle.isValid()) {
356  pv = &pvHandle->front();
357  //--- pv fake (the pv collection should have size==1 and the pv==beam spot)
358  if (pv->isFake() ||
359  pv->tracksSize() == 0
360  // definition of goodOfflinePrimaryVertex
361  || pv->ndof() < pvNDOF_ || pv->z() > 24.)
362  pv = nullptr;
363 
364  for (const auto& v : *pvHandle) {
365  if (v.isFake())
366  continue;
367  if (v.ndof() < pvNDOF_)
368  continue;
369  if (v.z() > 24.)
370  continue;
371  ++nPV;
372  }
373  }
374  n_vs_PU_->Fill(nPV);
375 
376  float nLS = static_cast<float>(iEvent.id().luminosityBlock());
377  n_vs_LS_->Fill(nLS);
378 
380  int n = (v0Handle.isValid() ? v0Handle->size() : -1);
381  v0_N_->Fill(n);
382  v0_N_vs_BX_->Fill(bx, n);
383  v0_N_vs_lumi_->Fill(lumi, n);
384  v0_N_vs_PU_->Fill(nPV, n);
385  v0_N_vs_LS_->Fill(nLS, n);
386 
387  if (!v0Handle.isValid() or n == 0)
388  return;
389 
391  for (const auto& v0 : v0s) {
392  float mass = v0.mass();
393  float pt = v0.pt();
394  float p = v0.p();
395  float eta = v0.eta();
396  float phi = v0.phi();
397  int pdgID = v0.pdgId();
398  float chi2oNDF = v0.vertexNormalizedChi2();
399  GlobalPoint displacementFromPV =
400  (pv == nullptr ? GlobalPoint(-9., -9., 0) : GlobalPoint((pv->x() - v0.vx()), (pv->y() - v0.vy()), 0.));
401  GlobalPoint displacementFromBS =
402  (bs == nullptr
403  ? GlobalPoint(-9., -9., 0.)
404  : GlobalPoint(-1 * ((bs->position().x() - v0.vx()) + (v0.vz() - bs->position().z()) * bs->dxdz()),
405  -1 * ((bs->position().y() - v0.vy()) + (v0.vz() - bs->position().z()) * bs->dydz()),
406  0));
407  float lxy = (pv == nullptr ? -9. : displacementFromPV.perp());
408  float lxyWRTbs = (bs == nullptr ? -9. : displacementFromBS.perp());
409 
410  v0_mass_->Fill(mass);
411  v0_pt_->Fill(pt);
412  v0_eta_->Fill(eta);
413  v0_phi_->Fill(phi);
414  v0_Lxy_->Fill(lxy);
415  v0_Lxy_wrtBS_->Fill(lxyWRTbs);
416  v0_chi2oNDF_->Fill(chi2oNDF);
417 
418  v0_mass_vs_p_->Fill(p, mass);
419  v0_mass_vs_pt_->Fill(pt, mass);
420  v0_mass_vs_eta_->Fill(eta, mass);
421  v0_mass_vs_BX_->Fill(bx, mass);
422  v0_mass_vs_lumi_->Fill(lumi, mass);
423  v0_mass_vs_PU_->Fill(nPV, mass);
424 
425  v0_Lxy_vs_BX_->Fill(bx, lxy);
426  v0_Lxy_vs_lumi_->Fill(lumi, lxy);
427  v0_Lxy_vs_PU_->Fill(nPV, lxy);
428 
429  float PDGmass = -9999.;
430  switch (pdgID) {
431  case 130: // K_s
432  case 310: // K_L
433  PDGmass = 0.497614; // GeV
434  break;
435  case 3122: // Lambda
436  case -3122: // Lambda
437  PDGmass = 1.115683; // GeV
438  break;
439  case 4122: // Lambda_c
440  case -4122: // Lambda_c
441  case 5122: // Lambda_b
442  case -5122: // Lambda_b
443  default:
444  break;
445  }
446  float delta = (PDGmass > 0. ? (mass - PDGmass) / PDGmass : -9.);
447  v0_deltaMass_->Fill(delta);
448  v0_deltaMass_vs_pt_->Fill(pt, delta);
450  v0_deltaMass_vs_BX_->Fill(bx, delta);
452  v0_deltaMass_vs_PU_->Fill(nPV, delta);
453 
454  v0_Lxy_vs_deltaMass_->Fill(delta, lxy);
455  v0_Lxy_vs_pt_->Fill(pt, lxy);
456  v0_Lxy_vs_eta_->Fill(eta, lxy);
457  }
458 }
459 
461  h_diTrackMass = book<TH1F>(
462  "diTrackMass", "V0 mass from tracks in Event", mass_binning_.nbins, mass_binning_.xmin, mass_binning_.xmax);
463  h_V0Mass = book<TH1F>(
464  "V0kMass", "Reconstructed V0 mass in Event", mass_binning_.nbins, mass_binning_.xmin, mass_binning_.xmax);
465 
466  MEbinning N_binning;
467  N_binning.nbins = 15;
468  N_binning.xmin = -0.5;
469  N_binning.xmax = 14.5;
470  v0_N_ = bookHisto1D("v0_N", "# v0", "# v0", "events", N_binning);
471  v0_mass_ = bookHisto1D("v0_mass", "mass", "mass [GeV]", "events", mass_binning_);
472  v0_pt_ = bookHisto1D("v0_pt", "pt", "p_{T} [GeV]", "events", pt_binning_);
473  v0_eta_ = bookHisto1D("v0_eta", "eta", "#eta", "events", eta_binning_);
474  MEbinning phi_binning;
475  phi_binning.nbins = 34;
476  phi_binning.xmin = -3.2;
477  phi_binning.xmax = 3.2;
478  v0_phi_ = bookHisto1D("v0_phi", "phi", "#phi [rad]", "events", phi_binning);
479  v0_Lxy_ = bookHisto1D("v0_Lxy", "Lxy", "L_{xy} w.r.t. PV [cm]", "events", Lxy_binning_);
480  v0_Lxy_wrtBS_ = bookHisto1D("v0_Lxy_wrtBS", "Lxy", "L_{xy} w.r.t. BS [cm]", "events", Lxy_binning_);
481  v0_chi2oNDF_ = bookHisto1D("v0_chi2oNDF", "chi2oNDF", "vertex normalized #chi^{2}", "events", chi2oNDF_binning_);
482 
483  v0_mass_vs_p_ = bookProfile("v0_mass_vs_p", "mass vs p", "p [GeV]", "mass [GeV]", pt_binning_, mass_binning_);
484  v0_mass_vs_pt_ = bookProfile("v0_mass_vs_pt", "mass vs pt", "p_{T} [GeV]", "mass [GeV]", pt_binning_, mass_binning_);
485  v0_mass_vs_eta_ = bookProfile("v0_mass_vs_eta", "mass vs eta", "#eta", "mass [GeV]", eta_binning_, mass_binning_);
486 
487  MEbinning delta_binning;
488  delta_binning.nbins = 150;
489  delta_binning.xmin = -0.15;
490  delta_binning.xmax = 0.15;
491  v0_deltaMass_ = bookHisto1D("v0_deltaMass", "deltaMass", "m-m_{PDG}/m_{DPG}", "events", delta_binning);
493  "v0_deltaMass_vs_pt", "deltaMass vs pt", "p_{T} [GeV]", "m-m_{PDG}/m_{DPG}", pt_binning_, delta_binning);
495  bookProfile("v0_deltaMass_vs_eta", "deltaMass vs eta", "#eta", "m-m_{PDG}/m_{DPG}", eta_binning_, delta_binning);
496 
498  "v0_Lxy_vs_deltaMass", "L_{xy} vs deltaMass", "m-m_{PDG}/m_{DPG}", "L_{xy} [cm]", delta_binning, Lxy_binning_);
499  v0_Lxy_vs_pt_ =
500  bookProfile("v0_Lxy_vs_pt", "L_{xy} vs p_{T}", "p_{T} [GeV]", "L_{xy} [cm]", pt_binning_, Lxy_binning_);
501  v0_Lxy_vs_eta_ = bookProfile("v0_Lxy_vs_eta", "L_{xy} vs #eta", "#eta", "L_{xy} [cm]", eta_binning_, Lxy_binning_);
502 
503  MEbinning bx_binning;
504  bx_binning.nbins = 3564;
505  bx_binning.xmin = 0.5;
506  bx_binning.xmax = 3564.5;
507  n_vs_BX_ = bookHisto1D("n_vs_BX", "# events vs BX", "BX", "# events", bx_binning);
508  v0_N_vs_BX_ = bookProfile("v0_N_vs_BX", "# v0 vs BX", "BX", "# v0", bx_binning, N_binning);
509  v0_mass_vs_BX_ = bookProfile("v0_mass_vs_BX", "mass vs BX", "BX", "mass [GeV]", bx_binning, mass_binning_);
510  v0_Lxy_vs_BX_ = bookProfile("v0_Lxy_vs_BX", "L_{xy} vs BX", "BX", "L_{xy} [cm]", bx_binning, Lxy_binning_);
512  bookProfile("v0_deltaMass_vs_BX", "deltaMass vs BX", "BX", "m-m_{PDG}/m_{DPG}", bx_binning, delta_binning);
513 
514  n_vs_lumi_ =
515  bookHisto1D("n_vs_lumi", "# events vs lumi", "inst. lumi x10^{30} [Hz cm^{-2}]", "# events", lumi_binning_);
516 
517  v0_N_vs_lumi_ =
518  bookProfile("v0_N_vs_lumi", "# v0 vs lumi", "inst. lumi x10^{30} [Hz cm^{-2}]", "# v0", lumi_binning_, N_binning);
519 
521  "v0_mass_vs_lumi", "mass vs lumi", "inst. lumi x10^{30} [Hz cm^{-2}]", "mass [GeV]", lumi_binning_, mass_binning_);
522 
523  v0_Lxy_vs_lumi_ = bookProfile("v0_Lxy_vs_lumi",
524  "L_{xy} vs lumi",
525  "inst. lumi x10^{30} [Hz cm^{-2}]",
526  "L_{xy} [cm]",
528  Lxy_binning_);
529 
530  v0_deltaMass_vs_lumi_ = bookProfile("v0_deltaMass_vs_lumi",
531  "deltaMass vs lumi",
532  "inst. lumi x10^{30} [Hz cm^{-2}]",
533  "m-m_{PDG}/m_{DPG}",
535  delta_binning);
536 
537  n_vs_PU_ = bookHisto1D("n_vs_PU", "# events vs PU", "# good PV", "# events", pu_binning_);
538  v0_N_vs_PU_ = bookProfile("v0_N_vs_PU", "# v0 vs PU", "# good PV", "# v0", pu_binning_, N_binning);
539  v0_mass_vs_PU_ = bookProfile("v0_mass_vs_PU", "mass vs PU", "# good PV", "mass [GeV]", pu_binning_, mass_binning_);
540  v0_Lxy_vs_PU_ = bookProfile("v0_Lxy_vs_PU", "L_{xy} vs PU", "# good PV", "L_{xy} [cm]", pu_binning_, Lxy_binning_);
542  "v0_deltaMass_vs_PU", "deltaMass vs PU", "# good PV", "m-m_{PDG}/m_{DPG}", pu_binning_, delta_binning);
543 
544  n_vs_LS_ = bookHisto1D("n_vs_LS", "# events vs LS", "LS", "# events", ls_binning_);
545  v0_N_vs_LS_ = bookProfile("v0_N_vs_LS", "# v0 vs LS", "LS", "# v0", ls_binning_, N_binning);
546 }
547 
548 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
551  desc.add<edm::InputTag>("vertexCompositeCandidates", edm::InputTag("generalV0Candidates:Kshort"));
552  desc.add<edm::InputTag>("tracks", edm::InputTag("ALCARECOTkAlKShortTracks"));
553  desc.add<edm::InputTag>("beamSpot", edm::InputTag("offlineBeamSpot"));
554  desc.add<edm::InputTag>("primaryVertex", edm::InputTag("offlinePrimaryVertices"));
555  desc.add<edm::InputTag>("lumiScalers", edm::InputTag("scalersRawToDigi"));
556  desc.add<edm::InputTag>("metadata", edm::InputTag("onlineMetaDataDigis"));
557  desc.add<bool>("forceSCAL", false);
558  desc.add<int>("pvNDOF", 4);
559 
560  {
562  {
564  psd1.add<int>("nbins", 3700);
565  psd1.add<double>("xmin", 0.);
566  psd1.add<double>("xmax", 14000.);
567  psd0.add<edm::ParameterSetDescription>("lumiPSet", psd1);
568  }
569  {
571  psd2.add<int>("nbins", 100);
572  psd2.add<double>("xmin", 0.400);
573  psd2.add<double>("xmax", 0.600);
574  psd0.add<edm::ParameterSetDescription>("massPSet", psd2);
575  }
576  {
578  psd3.add<int>("nbins", 100);
579  psd3.add<double>("xmin", 0.);
580  psd3.add<double>("xmax", 50.);
581  psd0.add<edm::ParameterSetDescription>("ptPSet", psd3);
582  }
583  {
585  psd4.add<int>("nbins", 60);
586  psd4.add<double>("xmin", -3.);
587  psd4.add<double>("xmax", 3.);
588  psd0.add<edm::ParameterSetDescription>("etaPSet", psd4);
589  }
590  {
592  psd5.add<int>("nbins", 350);
593  psd5.add<double>("xmin", 0.);
594  psd5.add<double>("xmax", 70.);
595  psd0.add<edm::ParameterSetDescription>("LxyPSet", psd5);
596  }
597  {
599  psd6.add<int>("nbins", 100);
600  psd6.add<double>("xmin", 0.);
601  psd6.add<double>("xmax", 30.);
602  psd0.add<edm::ParameterSetDescription>("chi2oNDFPSet", psd6);
603  }
604  {
606  psd7.add<int>("nbins", 100);
607  psd7.add<double>("xmin", -0.5);
608  psd7.add<double>("xmax", 99.5);
609  psd0.add<edm::ParameterSetDescription>("puPSet", psd7);
610  }
611  {
613  psd8.add<int>("nbins", 2000);
614  psd8.add<double>("xmin", 0.);
615  psd8.add<double>("xmax", 2000.);
616  psd0.add<edm::ParameterSetDescription>("lsPSet", psd8);
617  }
618  desc.add<edm::ParameterSetDescription>("histoPSet", psd0);
619  }
620  descriptions.addWithDefaultLabel(desc);
621 }
622 
623 //define this as a plug-in
void getHistoPSet(edm::ParameterSet pset, MEbinning &mebinning)
static const std::string kSharedResource
Definition: TFileService.h:76
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
TProfile * v0_mass_vs_lumi_
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
T perp() const
Definition: PV3DBase.h:69
std::vector< VertexCompositeCandidate > VertexCompositeCandidateCollection
collection of Candidate objects
MEbinning Lxy_binning_
TProfile * v0_mass_vs_p_
T const * product() const
Definition: Handle.h:70
Class to contain the online luminosity from soft FED 1022.
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
TProfile * v0_Lxy_vs_eta_
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
TProfile * v0_N_vs_lumi_
TProfile * v0_deltaMass_vs_pt_
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:232
TProfile * v0_deltaMass_vs_eta_
TProfile * v0_mass_vs_BX_
const edm::EDGetTokenT< reco::VertexCollection > pvToken_
TProfile * v0_Lxy_vs_pt_
float instLumi() const
Return the luminosity for the current nibble.
TProfile * v0_N_vs_BX_
std::vector< Vertex > VertexCollection
Definition: Vertex.h:31
const edm::EDGetTokenT< TrackCollection > tracksToken_
const bool forceSCAL_
TProfile * bookProfile(std::string name, std::string title, std::string xaxis, std::string yaxis, MEbinning xbinning, MEbinning ybinning)
const edm::EDGetTokenT< reco::BeamSpot > bsToken_
TProfile * v0_Lxy_vs_lumi_
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::Service< TFileService > fs_
int iEvent
Definition: GenABIO.cc:224
const edm::EDGetTokenT< reco::VertexCompositeCandidateCollection > vccToken_
T * book(const Args &... args) const
MEbinning chi2oNDF_binning_
T sqrt(T t)
Definition: SSEVec.h:23
TProfile * v0_mass_vs_eta_
reco::TrackRef track() const override
reference to a track
TH1F * bookHisto1D(std::string name, std::string title, std::string xaxis, std::string yaxis, MEbinning binning)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
TProfile * v0_mass_vs_pt_
TProfile * v0_N_vs_PU_
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
~TkAlV0sAnalyzer() override=default
ParameterDescriptionBase * add(U const &iLabel, T const &value)
TH2F * bookHisto2D(std::string name, std::string title, std::string xaxis, std::string yaxis, MEbinning xbinning, MEbinning ybinning)
TProfile * v0_deltaMass_vs_lumi_
TProfile * v0_mass_vs_PU_
TProfile * v0_N_vs_LS_
static constexpr double piMass2
MEbinning lumi_binning_
MEbinning eta_binning_
bool isValid() const
Definition: HandleBase.h:70
TProfile * v0_deltaMass_vs_BX_
fixed size matrix
const edm::EDGetTokenT< OnlineLuminosityRecord > metaDataToken_
HLT enums.
TProfile * v0_Lxy_vs_deltaMass_
MEbinning mass_binning_
TkAlV0sAnalyzer(const edm::ParameterSet &)
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
std::vector< LumiScalers > LumiScalersCollection
Definition: LumiScalers.h:144
void fillMonitoringHistos(const edm::Event &iEvent)
TProfile * v0_Lxy_vs_PU_
void beginJob() override
TProfile * v0_Lxy_vs_BX_
long double T
TProfile * v0_deltaMass_vs_PU_
const edm::EDGetTokenT< LumiScalersCollection > lumiscalersToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)