diff --git a/Alignment/OfflineValidation/interface/DiLeptonVertexHelpers.h b/Alignment/OfflineValidation/interface/DiLeptonVertexHelpers.h index 51436d1fee44a..d20d8495c475d 100644 --- a/Alignment/OfflineValidation/interface/DiLeptonVertexHelpers.h +++ b/Alignment/OfflineValidation/interface/DiLeptonVertexHelpers.h @@ -72,21 +72,22 @@ namespace DiLeptonHelp { continue; if (((TObject*)histo)->InheritsFrom("TH2")) { - m_h2_map[etaReg] = - fs.make((name + "_" + m_etaRegionNames[etaReg]).c_str(), - (title + m_etaRegionNames[etaReg] + ";" + xTitle + ";" + yTitle + ";" + zTitle).c_str(), + m_h2_map[etaReg] = fs.make( + (name + "_" + m_etaRegionNames[etaReg]).c_str(), + (title + " (" + m_etaRegionNames[etaReg] + ");" + xTitle + ";" + yTitle + ";" + zTitle).c_str(), + histo->GetNbinsX(), + histo->GetXaxis()->GetXmin(), + histo->GetXaxis()->GetXmax(), + histo->GetNbinsY(), + histo->GetYaxis()->GetXmin(), + histo->GetYaxis()->GetXmax()); + } else { + m_h1_map[etaReg] = + fs.make((name + "_" + m_etaRegionNames[etaReg]).c_str(), + (title + " (" + m_etaRegionNames[etaReg] + ");" + xTitle + ";" + yTitle).c_str(), histo->GetNbinsX(), histo->GetXaxis()->GetXmin(), - histo->GetXaxis()->GetXmax(), - histo->GetNbinsY(), - histo->GetYaxis()->GetXmin(), - histo->GetYaxis()->GetXmax()); - } else { - m_h1_map[etaReg] = fs.make((name + "_" + m_etaRegionNames[etaReg]).c_str(), - (title + m_etaRegionNames[etaReg] + ";" + xTitle + ";" + yTitle).c_str(), - histo->GetNbinsX(), - histo->GetXaxis()->GetXmin(), - histo->GetXaxis()->GetXmax()); + histo->GetXaxis()->GetXmax()); } } diff --git a/Alignment/OfflineValidation/plugins/DiMuonValidation.cc b/Alignment/OfflineValidation/plugins/DiMuonValidation.cc index 44ccf9d52ca28..30796f7324d4f 100644 --- a/Alignment/OfflineValidation/plugins/DiMuonValidation.cc +++ b/Alignment/OfflineValidation/plugins/DiMuonValidation.cc @@ -4,6 +4,7 @@ #include // user include files +#include "Alignment/OfflineValidation/interface/DiLeptonVertexHelpers.h" #include "CommonTools/UtilAlgos/interface/TFileService.h" #include "DataFormats/Candidate/interface/Particle.h" #include "DataFormats/TrackReco/interface/Track.h" @@ -71,38 +72,51 @@ class DiMuonValidation : public edm::one::EDAnalyzer usesResource(TFileService::kSharedResource); theTrackCollectionToken_ = consumes(TkTag_); - variables_min_[0] = variable_CosThetaCS_xmin_; - variables_min_[1] = variable_DeltaEta_xmin_; - variables_min_[2] = variable_EtaMinus_xmin_; - variables_min_[3] = variable_EtaPlus_xmin_; - variables_min_[4] = variable_PhiCS_xmin_; - variables_min_[5] = variable_PhiMinus_xmin_; - variables_min_[6] = variable_PhiPlus_xmin_; - variables_min_[7] = variable_PairPt_xmin_; - - variables_max_[0] = variable_CosThetaCS_xmax_; - variables_max_[1] = variable_DeltaEta_xmax_; - variables_max_[2] = variable_EtaMinus_xmax_; - variables_max_[3] = variable_EtaPlus_xmax_; - variables_max_[4] = variable_PhiCS_xmax_; - variables_max_[5] = variable_PhiMinus_xmax_; - variables_max_[6] = variable_PhiPlus_xmax_; - variables_max_[7] = variable_PairPt_xmax_; - - variables_bins_number_[0] = variable_CosThetaCS_nbins_; - variables_bins_number_[1] = variable_DeltaEta_nbins_; - variables_bins_number_[2] = variable_EtaMinus_nbins_; - variables_bins_number_[3] = variable_EtaPlus_nbins_; - variables_bins_number_[4] = variable_PhiCS_nbins_; - variables_bins_number_[5] = variable_PhiMinus_nbins_; - variables_bins_number_[6] = variable_PhiPlus_nbins_; - variables_bins_number_[7] = variable_PairPt_nbins_; + variables_min_[Variable::CosThetaCS] = variable_CosThetaCS_xmin_; + variables_min_[Variable::DeltaEta] = variable_DeltaEta_xmin_; + variables_min_[Variable::EtaMinus] = variable_EtaMinus_xmin_; + variables_min_[Variable::EtaPlus] = variable_EtaPlus_xmin_; + variables_min_[Variable::PhiCS] = variable_PhiCS_xmin_; + variables_min_[Variable::PhiMinus] = variable_PhiMinus_xmin_; + variables_min_[Variable::PhiPlus] = variable_PhiPlus_xmin_; + variables_min_[Variable::Pt] = variable_PairPt_xmin_; + + variables_max_[Variable::CosThetaCS] = variable_CosThetaCS_xmax_; + variables_max_[Variable::DeltaEta] = variable_DeltaEta_xmax_; + variables_max_[Variable::EtaMinus] = variable_EtaMinus_xmax_; + variables_max_[Variable::EtaPlus] = variable_EtaPlus_xmax_; + variables_max_[Variable::PhiCS] = variable_PhiCS_xmax_; + variables_max_[Variable::PhiMinus] = variable_PhiMinus_xmax_; + variables_max_[Variable::PhiPlus] = variable_PhiPlus_xmax_; + variables_max_[Variable::Pt] = variable_PairPt_xmax_; + + variables_bins_number_[Variable::CosThetaCS] = variable_CosThetaCS_nbins_; + variables_bins_number_[Variable::DeltaEta] = variable_DeltaEta_nbins_; + variables_bins_number_[Variable::EtaMinus] = variable_EtaMinus_nbins_; + variables_bins_number_[Variable::EtaPlus] = variable_EtaPlus_nbins_; + variables_bins_number_[Variable::PhiCS] = variable_PhiCS_nbins_; + variables_bins_number_[Variable::PhiMinus] = variable_PhiMinus_nbins_; + variables_bins_number_[Variable::PhiPlus] = variable_PhiPlus_nbins_; + variables_bins_number_[Variable::Pt] = variable_PairPt_nbins_; } ~DiMuonValidation() override = default; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); - static constexpr int varNumber_ = 8; + + // enumeration to contain the variables to plot + enum Variable { + CosThetaCS = 0, + DeltaEta = 1, + EtaMinus = 2, + EtaPlus = 3, + PhiCS = 4, + PhiMinus = 5, + PhiPlus = 6, + Pt = 7, + VarNumber = 8 + }; + static constexpr double mu_mass2_ = 0.105658 * 0.105658; //The invariant mass of muon 105.658MeV private: @@ -157,13 +171,19 @@ class DiMuonValidation : public edm::one::EDAnalyzer edm::EDGetTokenT theTrackCollectionToken_; TH1F* th1f_mass; - TH2D* th2d_mass_variables_[varNumber_]; // actual histograms - std::string variables_name_[varNumber_] = { + TH2D* th2d_mass_variables_[Variable::VarNumber]; // actual histograms + + std::string variables_name_[Variable::VarNumber] = { "CosThetaCS", "DeltaEta", "EtaMinus", "EtaPlus", "PhiCS", "PhiMinus", "PhiPlus", "Pt"}; - int variables_bins_number_[varNumber_]; // = {20, 20, 12, 12, 20, 16, 16, 100}; - double variables_min_[varNumber_]; // = {-1, -4.8, -2.4, -2.4, -M_PI / 2, -M_PI, -M_PI, 0}; - double variables_max_[varNumber_]; // = {+1, +4.8, +2.4, +2.4, +M_PI / 2, +M_PI, +M_PI, 100}; + int variables_bins_number_[Variable::VarNumber]; // = {20, 20, 12, 12, 20, 16, 16, 100}; + double variables_min_[Variable::VarNumber]; // = {-1, -4.8, -2.4, -2.4, -M_PI / 2, -M_PI, -M_PI, 0}; + double variables_max_[Variable::VarNumber]; // = {+1, +4.8, +2.4, +2.4, +M_PI / 2, +M_PI, +M_PI, 100}; + + DiLeptonHelp::PlotsVsDiLeptonRegion InvMassInEtaBins = DiLeptonHelp::PlotsVsDiLeptonRegion(1.5); + DiLeptonHelp::PlotsVsDiLeptonRegion InvMassVsPhiPlusInEtaBins = DiLeptonHelp::PlotsVsDiLeptonRegion(1.5); + DiLeptonHelp::PlotsVsDiLeptonRegion InvMassVsPhiMinusInEtaBins = DiLeptonHelp::PlotsVsDiLeptonRegion(1.5); + DiLeptonHelp::PlotsVsDiLeptonRegion InvMassVsCosThetaCSInEtaBins = DiLeptonHelp::PlotsVsDiLeptonRegion(1.5); }; // @@ -194,7 +214,6 @@ void DiMuonValidation::analyze(const edm::Event& iEvent, const edm::EventSetup& LV_mother = LV_track1 + LV_track2; double mother_mass = LV_mother.M(); th1f_mass->Fill(mother_mass); - double mother_pt = LV_mother.Pt(); int charge1 = track1->charge(); @@ -213,6 +232,16 @@ void DiMuonValidation::analyze(const edm::Event& iEvent, const edm::EventSetup& std::swap(phiMu1, phiMu2); std::swap(ptMu1, ptMu2); } + + const auto& tplus = track1->charge() > 0 ? track1 : track2; + const auto& tminus = track1->charge() < 0 ? track1 : track2; + TLorentzVector p4_tplus(tplus->px(), tplus->py(), tplus->pz(), sqrt((tplus->p() * tplus->p()) + mu_mass2_)); + TLorentzVector p4_tminus(tminus->px(), tminus->py(), tminus->pz(), sqrt((tminus->p() * tminus->p()) + mu_mass2_)); + std::pair tktk_p4 = std::make_pair(p4_tplus, p4_tminus); + InvMassInEtaBins.fillTH1Plots(mother_mass, tktk_p4); + InvMassVsPhiPlusInEtaBins.fillTH2Plots(mother_mass, phiMu1, tktk_p4); + InvMassVsPhiMinusInEtaBins.fillTH2Plots(mother_mass, phiMu2, tktk_p4); + //eta cut if (etaMu1 < pair_etaminpos_ || etaMu1 > pair_etamaxpos_ || etaMu2 < pair_etaminneg_ || etaMu2 > pair_etamaxneg_) { @@ -229,6 +258,8 @@ void DiMuonValidation::analyze(const edm::Event& iEvent, const edm::EventSetup& double costhetaCS = 2.0 / LV_mother.mag() / sqrt(pow(LV_mother.mag(), 2) + pow(LV_mother.Pt(), 2)) * (muplus * mubarminus - muminus * mubarplus); + InvMassVsCosThetaCSInEtaBins.fillTH2Plots(mother_mass, costhetaCS, tktk_p4); + DiMuonValid::LV Pbeam(0., 0., eBeam_, eBeam_); auto R = Pbeam.Vect().Cross(LV_mother.Vect()); auto Runit = R.Unit(); @@ -243,14 +274,14 @@ void DiMuonValidation::analyze(const edm::Event& iEvent, const edm::EventSetup& double phiCS = atan(tanphi); if (mother_mass > pair_mass_min_ && mother_mass < pair_mass_max_) { - th2d_mass_variables_[0]->Fill(mother_mass, costhetaCS, 1); - th2d_mass_variables_[1]->Fill(mother_mass, delta_eta, 1); - th2d_mass_variables_[2]->Fill(mother_mass, etaMu2, 1); - th2d_mass_variables_[3]->Fill(mother_mass, etaMu1, 1); - th2d_mass_variables_[4]->Fill(mother_mass, phiCS, 1); - th2d_mass_variables_[5]->Fill(mother_mass, phiMu2, 1); - th2d_mass_variables_[6]->Fill(mother_mass, phiMu1, 1); - th2d_mass_variables_[7]->Fill(mother_mass, mother_pt, 1); + th2d_mass_variables_[Variable::CosThetaCS]->Fill(mother_mass, costhetaCS, 1); + th2d_mass_variables_[Variable::DeltaEta]->Fill(mother_mass, delta_eta, 1); + th2d_mass_variables_[Variable::EtaMinus]->Fill(mother_mass, etaMu2, 1); + th2d_mass_variables_[Variable::EtaPlus]->Fill(mother_mass, etaMu1, 1); + th2d_mass_variables_[Variable::PhiCS]->Fill(mother_mass, phiCS, 1); + th2d_mass_variables_[Variable::PhiMinus]->Fill(mother_mass, phiMu2, 1); + th2d_mass_variables_[Variable::PhiPlus]->Fill(mother_mass, phiMu1, 1); + th2d_mass_variables_[Variable::Pt]->Fill(mother_mass, mother_pt, 1); } } } @@ -265,7 +296,7 @@ void DiMuonValidation::beginJob() { th1f_mass = fs->make("hMass", "mass;m_{#mu#mu} [GeV];events", 200, 0., 200.); - for (int i = 0; i < varNumber_; i++) { + for (int i = 0; i < Variable::VarNumber; i++) { std::string th2d_name = fmt::sprintf("th2d_mass_%s", variables_name_[i].c_str()); th2d_mass_variables_[i] = fs->make(th2d_name.c_str(), th2d_name.c_str(), @@ -276,6 +307,22 @@ void DiMuonValidation::beginJob() { variables_min_[i], variables_max_[i]); } + + // Z-> mm mass in eta bins + TFileDirectory dirResMassEta = fs->mkdir("TkTkMassInEtaBins"); + InvMassInEtaBins.bookSet(dirResMassEta, th1f_mass); + + // Z->mm mass vs cos phi Collins-Soper in eta bins + TFileDirectory dirResMassVsCosThetaCSInEta = fs->mkdir("TkTkMassVsCosThetaCSInEtaBins"); + InvMassVsCosThetaCSInEtaBins.bookSet(dirResMassVsCosThetaCSInEta, th2d_mass_variables_[Variable::CosThetaCS]); + + // Z->mm mass vs phi minus in eta bins + TFileDirectory dirResMassVsPhiMinusInEta = fs->mkdir("TkTkMassVsPhiMinusInEtaBins"); + InvMassVsPhiMinusInEtaBins.bookSet(dirResMassVsPhiMinusInEta, th2d_mass_variables_[Variable::PhiMinus]); + + // Z->mm mass vs phi plus in eta bins + TFileDirectory dirResMassVsPhiPlusInEta = fs->mkdir("TkTkMassVsPhiPlusInEtaBins"); + InvMassVsPhiPlusInEtaBins.bookSet(dirResMassVsPhiPlusInEta, th2d_mass_variables_[Variable::PhiPlus]); } // ------------ method fills 'descriptions' with the allowed parameters for the module ------------ diff --git a/Alignment/OfflineValidation/plugins/DiMuonVertexValidation.cc b/Alignment/OfflineValidation/plugins/DiMuonVertexValidation.cc index a34d39847384d..f74664ce420ce 100644 --- a/Alignment/OfflineValidation/plugins/DiMuonVertexValidation.cc +++ b/Alignment/OfflineValidation/plugins/DiMuonVertexValidation.cc @@ -50,11 +50,14 @@ #include "CommonTools/UtilAlgos/interface/TFileService.h" #include "FWCore/ServiceRegistry/interface/Service.h" +// IP tools +#include "TrackingTools/IPTools/interface/IPTools.h" + // ROOT #include "TH1F.h" #include "TH2F.h" -//#define LogDebug(X) std::cout << X << +//#define LogDebug(X) std::cout << X // // class declaration @@ -76,8 +79,10 @@ class DiMuonVertexValidation : public edm::one::EDAnalyzer massLimits_; /* for the mass plot x-range */ std::vector pTthresholds_; const float maxSVdist_; @@ -92,23 +97,42 @@ class DiMuonVertexValidation : public edm::one::EDAnalyzer("useReco")), + : motherName_(iConfig.getParameter("decayMotherName")), + useReco_(iConfig.getParameter("useReco")), useClosestVertex_(iConfig.getParameter("useClosestVertex")), pTthresholds_(iConfig.getParameter>("pTThresholds")), maxSVdist_(iConfig.getParameter("maxSVdist")), @@ -182,6 +207,19 @@ DiMuonVertexValidation::DiMuonVertexValidation(const edm::ParameterSet& iConfig) edm::LogInfo("DiMuonVertexValidation") << " Threshold: " << thr << " "; } edm::LogInfo("DiMuonVertexValidation") << "Max SV distance: " << maxSVdist_ << " "; + + // set the limits for the mass plots + if (motherName_.find('Z') != std::string::npos) { + massLimits_ = std::make_pair(50., 120); + } else if (motherName_.find("J/#psi") != std::string::npos) { + massLimits_ = std::make_pair(2.7, 3.4); + } else if (motherName_.find("#Upsilon") != std::string::npos) { + massLimits_ = std::make_pair(8.9, 9.9); + } else { + edm::LogError("DiMuonVertexValidation") << " unrecognized decay mother particle: " << motherName_ + << " setting the default for the Z->mm (50.,120.)" << std::endl; + massLimits_ = std::make_pair(50., 120); + } } DiMuonVertexValidation::~DiMuonVertexValidation() = default; @@ -341,6 +379,12 @@ void DiMuonVertexValidation::analyze(const edm::Event& iEvent, const edm::EventS LogDebug("DiMuonVertexValidation") << " vertex prob: " << SVProb << std::endl; hSVProb_->Fill(SVProb); + hSVChi2_->Fill(aTransientVertex.totalChiSquared()); + hSVNormChi2_->Fill(aTransientVertex.totalChiSquared() / (int)aTransientVertex.degreesOfFreedom()); + + LogDebug("DiMuonVertexValidation") << " vertex norm chi2: " + << (aTransientVertex.totalChiSquared() / (int)aTransientVertex.degreesOfFreedom()) + << std::endl; if (!aTransientVertex.isValid()) return; @@ -386,13 +430,41 @@ void DiMuonVertexValidation::analyze(const edm::Event& iEvent, const edm::EventS #endif if (theMainVertex.isValid()) { - // Z Vertex distance in the xy plane + // fill the impact parameter plots + for (const auto& track : myTracks) { + hdxy_->Fill(track->dxy(mainVtxPos) * cmToum); + hdz_->Fill(track->dz(mainVtxPos) * cmToum); + hdxyErr_->Fill(track->dxyError() * cmToum); + hdzErr_->Fill(track->dzError() * cmToum); + + const auto& ttrk = theB->build(track); + Global3DVector dir(track->px(), track->py(), track->pz()); + const auto& ip2d = IPTools::signedTransverseImpactParameter(ttrk, dir, theMainVertex); + const auto& ip3d = IPTools::signedImpactParameter3D(ttrk, dir, theMainVertex); + + hIP2d_->Fill(ip2d.second.value() * cmToum); + hIP3d_->Fill(ip3d.second.value() * cmToum); + hIP2dsig_->Fill(ip2d.second.significance()); + hIP3dsig_->Fill(ip3d.second.significance()); + } + + LogDebug("DiMuonVertexValidation") << " after filling the IP histograms " << std::endl; + // Z Vertex distance in the xy plane VertexDistanceXY vertTool; double distance = vertTool.distance(aTransientVertex, theMainVertex).value(); double dist_err = vertTool.distance(aTransientVertex, theMainVertex).error(); + float compatibility = 0.; + try { + compatibility = vertTool.compatibility(aTransientVertex, theMainVertex); + } catch (cms::Exception& er) { + LogTrace("DiMuonVertexValidation") << "caught std::exception " << er.what() << std::endl; + } + + hSVCompatibility_->Fill(compatibility); hSVDist_->Fill(distance * cmToum); + hSVDistErr_->Fill(dist_err * cmToum); hSVDistSig_->Fill(distance / dist_err); // fill the VtxDist plots @@ -406,8 +478,17 @@ void DiMuonVertexValidation::analyze(const edm::Event& iEvent, const edm::EventS VertexDistance3D vertTool3D; double distance3D = vertTool3D.distance(aTransientVertex, theMainVertex).value(); double dist3D_err = vertTool3D.distance(aTransientVertex, theMainVertex).error(); + float compatibility3D = 0.; + + try { + compatibility3D = vertTool3D.compatibility(aTransientVertex, theMainVertex); + } catch (cms::Exception& er) { + LogTrace("DiMuonVertexMonitor") << "caught std::exception " << er.what() << std::endl; + } + hSVCompatibility3D_->Fill(compatibility3D); hSVDist3D_->Fill(distance3D * cmToum); + hSVDist3DErr_->Fill(dist3D_err * cmToum); hSVDist3DSig_->Fill(distance3D / dist3D_err); // fill the VtxDist3D plots @@ -439,6 +520,12 @@ void DiMuonVertexValidation::analyze(const edm::Event& iEvent, const edm::EventS << "distance " << distance * cmToum << " cosphi3D:" << cosphi3D << std::endl; #endif + // unbalance + hCosPhiUnbalance_->Fill(cosphi, 1.); + hCosPhiUnbalance_->Fill(-cosphi, -1.); + hCosPhi3DUnbalance_->Fill(cosphi3D, 1.); + hCosPhi3DUnbalance_->Fill(-cosphi3D, -1.); + // fill the cosphi plots CosPhiPlots.fillPlots(cosphi, tktk_p4); @@ -465,10 +552,22 @@ void DiMuonVertexValidation::beginJob() { return {min, max}; }; + std::string ts = fmt::sprintf(";%s vertex probability;N(#mu#mu pairs)", motherName_); + std::string ps = "N(#mu#mu pairs)"; + ts = fmt::sprintf("#chi^{2} of the %s vertex; #chi^{2} of the %s vertex; %s", motherName_, motherName_, ps); + hSVChi2_ = fs->make("VtxChi2", ts.c_str(), 200, 0., 200.); + + ts = fmt::sprintf("#chi^{2}/ndf of the %s vertex; #chi^{2}/ndf of %s vertex; %s", motherName_, motherName_, ps); + hSVNormChi2_ = fs->make("VtxNormChi2", ts.c_str(), 100, 0., 20.); + // take the range from the 2D histograms const auto& svDistRng = extractRangeValues(VtxDistConfiguration_); hSVDist_ = fs->make("VtxDist", ";PV-#mu^{+}#mu^{-} vertex xy distance [#mum];N(#mu#mu pairs)", 100, svDistRng.first, svDistRng.second); + std::string histTit = motherName_ + " #rightarrow #mu^{+}#mu^{-}"; + ts = fmt::sprintf("%s;PV-%sV xy distance error [#mum];%s", histTit, motherName_, ps); + hSVDistErr_ = fs->make("VtxDistErr", ts.c_str(), 100, 0., 1000.); + // take the range from the 2D histograms const auto& svDistSigRng = extractRangeValues(VtxDistSigConfiguration_); hSVDistSig_ = fs->make("VtxDistSig", ";PV-#mu^{+}#mu^{-} vertex xy distance signficance;N(#mu#mu pairs)", 100, svDistSigRng.first, svDistSigRng.second); @@ -477,10 +576,19 @@ void DiMuonVertexValidation::beginJob() { const auto& svDist3DRng = extractRangeValues(VtxDist3DConfiguration_); hSVDist3D_ = fs->make("VtxDist3D", ";PV-#mu^{+}#mu^{-} vertex 3D distance [#mum];N(#mu#mu pairs)", 100, svDist3DRng.first, svDist3DRng.second); + ts = fmt::sprintf("%s;PV-%sV 3D distance error [#mum];%s", histTit, motherName_, ps); + hSVDist3DErr_ = fs->make("VtxDist3DErr", ts.c_str(), 100, 0., 1000.); + // take the range from the 2D histograms const auto& svDist3DSigRng = extractRangeValues(VtxDist3DSigConfiguration_); hSVDist3DSig_ = fs->make("VtxDist3DSig", ";PV-#mu^{+}#mu^{-} vertex 3D distance signficance;N(#mu#mu pairs)", 100, svDist3DSigRng.first, svDist3DSigRng.second); + ts = fmt::sprintf("compatibility of %s vertex; compatibility of %s vertex; %s", motherName_, motherName_, ps); + hSVCompatibility_ = fs->make("VtxCompatibility", ts.c_str(), 100, 0., 100.); + + ts = fmt::sprintf("3D compatibility of %s vertex;3D compatibility of %s vertex; %s", motherName_, motherName_, ps); + hSVCompatibility3D_ = fs->make("VtxCompatibility3D", ts.c_str(), 100, 0., 100.); + // take the range from the 2D histograms const auto& massRng = extractRangeValues(DiMuMassConfiguration_); hInvMass_ = fs->make("InvMass", ";M(#mu#mu) [GeV];N(#mu#mu pairs)", 70., massRng.first, massRng.second); @@ -491,6 +599,18 @@ void DiMuonVertexValidation::beginJob() { hCosPhiInv_ = fs->make("CosPhiInv", ";inverted cos(#phi_{xy});N(#mu#mu pairs)", 50, -1., 1.); hCosPhiInv3D_ = fs->make("CosPhiInv3D", ";inverted cos(#phi_{3D});N(#mu#mu pairs)", 50, -1., 1.); + + hCosPhiUnbalance_ = fs->make("CosPhiUnbalance", fmt::sprintf("%s;cos(#phi_{xy}) unbalance;#Delta%s", histTit, ps).c_str(), 50, -1.,1.); + hCosPhi3DUnbalance_ = fs->make("CosPhi3DUnbalance", fmt::sprintf("%s;cos(#phi_{3D}) unbalance;#Delta%s", histTit, ps).c_str(), 50, -1., 1.); + + hdxy_ = fs->make("dxy", fmt::sprintf("%s;muon track d_{xy}(PV) [#mum];muon tracks", histTit).c_str(), 150, -300, 300); + hdz_ = fs->make("dz", fmt::sprintf("%s;muon track d_{z}(PV) [#mum];muon tracks", histTit).c_str(), 150, -300, 300); + hdxyErr_ = fs->make("dxyErr", fmt::sprintf("%s;muon track err_{dxy} [#mum];muon tracks", histTit).c_str(), 250, 0., 500.); + hdzErr_ = fs->make("dzErr", fmt::sprintf("%s;muon track err_{dz} [#mum];muon tracks", histTit).c_str(), 250, 0., 500.); + hIP2d_ = fs->make("IP2d", fmt::sprintf("%s;muon track IP_{2D} [#mum];muon tracks", histTit).c_str(), 150, -300, 300); + hIP3d_ = fs->make("IP3d", fmt::sprintf("%s;muon track IP_{3D} [#mum];muon tracks", histTit).c_str(), 150, -300, 300); + hIP2dsig_ = fs->make("IP2Dsig", fmt::sprintf("%s;muon track IP_{2D} significance;muon tracks", histTit).c_str(), 100, 0., 5.); + hIP3dsig_ = fs->make("IP3Dsig", fmt::sprintf("%s;muon track IP_{3D} significance;muon tracks", histTit).c_str(), 100, 0., 5.); // clang-format on // 2D Maps @@ -606,6 +726,7 @@ void DiMuonVertexValidation::fillDescriptions(edm::ConfigurationDescriptions& de //desc.add("useReco",true); //desc.add("muons", edm::InputTag("muons")); //desc.add("muonTracks", edm::InputTag("ALCARECOTkAlDiMuon")); + desc.add("decayMotherName", "Z"); desc.add("tracks", edm::InputTag("generalTracks")); desc.add("vertices", edm::InputTag("offlinePrimaryVertices")); desc.add>("pTThresholds", {30., 10.}); diff --git a/Alignment/OfflineValidation/plugins/GeneralPurposeVertexAnalyzer.cc b/Alignment/OfflineValidation/plugins/GeneralPurposeVertexAnalyzer.cc index 0dfe9fa546114..53acc760566d2 100644 --- a/Alignment/OfflineValidation/plugins/GeneralPurposeVertexAnalyzer.cc +++ b/Alignment/OfflineValidation/plugins/GeneralPurposeVertexAnalyzer.cc @@ -70,6 +70,18 @@ class GeneralPurposeVertexAnalyzer : public edm::one::EDAnalyzer fs_; + struct IPMonitoring { + std::string varname_; + float pTcut_; + TH1D *IP_, *IPErr_; + TProfile *IPVsPhi_, *IPVsEta_; + TProfile *IPErrVsPhi_, *IPErrVsEta_; + TProfile2D *IPVsEtaVsPhi_, *IPErrVsEtaVsPhi_; + + void bookIPMonitor(const edm::ParameterSet &, const edm::Service fs); + }; + + const edm::ParameterSet conf_; const int ndof_; bool errorPrinted_; @@ -117,22 +129,134 @@ class GeneralPurposeVertexAnalyzer : public edm::one::EDAnalyzer fs) { + int VarBin = config.getParameter(fmt::format("D{}Bin", varname_)); + double VarMin = config.getParameter(fmt::format("D{}Min", varname_)); + double VarMax = config.getParameter(fmt::format("D{}Max", varname_)); + + int PhiBin = config.getParameter("PhiBin"); + int PhiBin2D = config.getParameter("PhiBin2D"); + double PhiMin = config.getParameter("PhiMin"); + double PhiMax = config.getParameter("PhiMax"); + + int EtaBin = config.getParameter("EtaBin"); + int EtaBin2D = config.getParameter("EtaBin2D"); + double EtaMin = config.getParameter("EtaMin"); + double EtaMax = config.getParameter("EtaMax"); + + IP_ = fs->make(fmt::format("d{}_pt{}", varname_, pTcut_).c_str(), + fmt::format("PV tracks (p_{{T}} > {} GeV) d_{{{}}} (#mum)", pTcut_, varname_).c_str(), + VarBin, + VarMin, + VarMax); + + IPErr_ = fs->make(fmt::format("d{}Err_pt{}", varname_, pTcut_).c_str(), + fmt::format("PV tracks (p_{{T}} > {} GeV) d_{{{}}} error (#mum)", pTcut_, varname_).c_str(), + 100, + 0., + (varname_.find("xy") != std::string::npos) ? 2000. : 10000.); + + IPVsPhi_ = + fs->make(fmt::format("d{}VsPhi_pt{}", varname_, pTcut_).c_str(), + fmt::format("PV tracks (p_{{T}} > {}) d_{{{}}} VS track #phi", pTcut_, varname_).c_str(), + PhiBin, + PhiMin, + PhiMax, + //VarBin, + VarMin, + VarMax); + IPVsPhi_->SetXTitle("PV track (p_{T} > 1 GeV) #phi"); + IPVsPhi_->SetYTitle(fmt::format("PV tracks (p_{{T}} > {} GeV) d_{{{}}} (#mum)", pTcut_, varname_).c_str()); + + IPVsEta_ = + fs->make(fmt::format("d{}VsEta_pt{}", varname_, pTcut_).c_str(), + fmt::format("PV tracks (p_{{T}} > {}) d_{{{}}} VS track #eta", pTcut_, varname_).c_str(), + EtaBin, + EtaMin, + EtaMax, + //VarBin, + VarMin, + VarMax); + IPVsEta_->SetXTitle("PV track (p_{T} > 1 GeV) #eta"); + IPVsEta_->SetYTitle(fmt::format("PV tracks (p_{{T}} > {} GeV) d_{{{}}} (#mum)", pTcut_, varname_).c_str()); + + IPErrVsPhi_ = + fs->make(fmt::format("d{}ErrVsPhi_pt{}", varname_, pTcut_).c_str(), + fmt::format("PV tracks (p_{{T}} > {}) d_{{{}}} error VS track #phi", pTcut_, varname_).c_str(), + PhiBin, + PhiMin, + PhiMax, + //VarBin, + 0., + (varname_.find("xy") != std::string::npos) ? 100. : 200.); + IPErrVsPhi_->SetXTitle("PV track (p_{T} > 1 GeV) #phi"); + IPErrVsPhi_->SetYTitle(fmt::format("PV tracks (p_{{T}} > {} GeV) d_{{{}}} error (#mum)", pTcut_, varname_).c_str()); + + IPErrVsEta_ = + fs->make(fmt::format("d{}ErrVsEta_pt{}", varname_, pTcut_).c_str(), + fmt::format("PV tracks (p_{{T}} > {}) d_{{{}}} error VS track #eta", pTcut_, varname_).c_str(), + EtaBin, + EtaMin, + EtaMax, + //VarBin, + 0., + (varname_.find("xy") != std::string::npos) ? 100. : 200.); + IPErrVsEta_->SetXTitle("PV track (p_{T} > 1 GeV) #eta"); + IPErrVsEta_->SetYTitle(fmt::format("PV tracks (p_{{T}} > {} GeV) d_{{{}}} error (#mum)", pTcut_, varname_).c_str()); + + IPVsEtaVsPhi_ = fs->make( + fmt::format("d{}VsEtaVsPhi_pt{}", varname_, pTcut_).c_str(), + fmt::format("PV tracks (p_{{T}} > {}) d_{{{}}} VS track #eta VS track #phi", pTcut_, varname_).c_str(), + EtaBin2D, + EtaMin, + EtaMax, + PhiBin2D, + PhiMin, + PhiMax, + //VarBin, + VarMin, + VarMax); + IPVsEtaVsPhi_->SetXTitle("PV track (p_{T} > 1 GeV) #eta"); + IPVsEtaVsPhi_->SetYTitle("PV track (p_{T} > 1 GeV) #phi"); + IPVsEtaVsPhi_->SetZTitle(fmt::format("PV tracks (p_{{T}} > {} GeV) d_{{{}}} (#mum)", pTcut_, varname_).c_str()); + + IPErrVsEtaVsPhi_ = fs->make( + fmt::format("d{}ErrVsEtaVsPhi_pt{}", varname_, pTcut_).c_str(), + fmt::format("PV tracks (p_{{T}} > {}) d_{{{}}} error VS track #eta VS track #phi", pTcut_, varname_).c_str(), + EtaBin2D, + EtaMin, + EtaMax, + PhiBin2D, + PhiMin, + PhiMax, + // VarBin, + 0., + (varname_.find("xy") != std::string::npos) ? 100. : 200.); + IPErrVsEtaVsPhi_->SetXTitle("PV track (p_{T} > 1 GeV) #eta"); + IPErrVsEtaVsPhi_->SetYTitle("PV track (p_{T} > 1 GeV) #phi"); + IPErrVsEtaVsPhi_->SetZTitle( + fmt::format("PV tracks (p_{{T}} > {} GeV) d_{{{}}} error (#mum)", pTcut_, varname_).c_str()); +} + // // constructors and destructor // GeneralPurposeVertexAnalyzer::GeneralPurposeVertexAnalyzer(const edm::ParameterSet &iConfig) - : ndof_(iConfig.getParameter("ndof")), + : conf_(iConfig), + ndof_(iConfig.getParameter("ndof")), errorPrinted_(false), vertexInputTag_(iConfig.getParameter("vertexLabel")), beamSpotInputTag_(iConfig.getParameter("beamSpotLabel")), @@ -175,27 +299,11 @@ GeneralPurposeVertexAnalyzer::GeneralPurposeVertexAnalyzer(const edm::ParameterS weight(nullptr), chi2ndf(nullptr), chi2prob(nullptr), - dxy(nullptr), dxy2(nullptr), - dz(nullptr), - dxyErr(nullptr), - dzErr(nullptr), phi_pt1(nullptr), eta_pt1(nullptr), phi_pt10(nullptr), - eta_pt10(nullptr), - dxyVsPhi_pt1(nullptr), - dzVsPhi_pt1(nullptr), - dxyVsEta_pt1(nullptr), - dzVsEta_pt1(nullptr), - dxyVsEtaVsPhi_pt1(nullptr), - dzVsEtaVsPhi_pt1(nullptr), - dxyVsPhi_pt10(nullptr), - dzVsPhi_pt10(nullptr), - dxyVsEta_pt10(nullptr), - dzVsEta_pt10(nullptr), - dxyVsEtaVsPhi_pt10(nullptr), - dzVsEtaVsPhi_pt10(nullptr) { + eta_pt10(nullptr) { usesResource(TFileService::kSharedResource); } @@ -323,29 +431,53 @@ void GeneralPurposeVertexAnalyzer::pvTracksPlots(const reco::Vertex &v) { weight->Fill(w); chi2ndf->Fill(chi2NDF); chi2prob->Fill(chi2Prob); - dxy->Fill(Dxy); dxy2->Fill(Dxy); - dz->Fill(Dz); - dxyErr->Fill(DxyErr); - dzErr->Fill(DzErr); phi_pt1->Fill(phi); eta_pt1->Fill(eta); - dxyVsPhi_pt1->Fill(phi, Dxy); - dzVsPhi_pt1->Fill(phi, Dz); - dxyVsEta_pt1->Fill(eta, Dxy); - dzVsEta_pt1->Fill(eta, Dz); - dxyVsEtaVsPhi_pt1->Fill(eta, phi, Dxy); - dzVsEtaVsPhi_pt1->Fill(eta, phi, Dz); + + dxy_pt1.IP_->Fill(Dxy); + dxy_pt1.IPVsPhi_->Fill(phi, Dxy); + dxy_pt1.IPVsEta_->Fill(eta, Dxy); + dxy_pt1.IPVsEtaVsPhi_->Fill(eta, phi, Dxy); + + dxy_pt1.IPErr_->Fill(DxyErr); + dxy_pt1.IPErrVsPhi_->Fill(phi, DxyErr); + dxy_pt1.IPErrVsEta_->Fill(eta, DxyErr); + dxy_pt1.IPErrVsEtaVsPhi_->Fill(eta, phi, DxyErr); + + dz_pt1.IP_->Fill(Dz); + dz_pt1.IPVsPhi_->Fill(phi, Dz); + dz_pt1.IPVsEta_->Fill(eta, Dz); + dz_pt1.IPVsEtaVsPhi_->Fill(eta, phi, Dz); + + dz_pt1.IPErr_->Fill(DzErr); + dz_pt1.IPErrVsPhi_->Fill(phi, DzErr); + dz_pt1.IPErrVsEta_->Fill(eta, DzErr); + dz_pt1.IPErrVsEtaVsPhi_->Fill(eta, phi, DzErr); if (pt >= 10.f) { phi_pt10->Fill(phi); eta_pt10->Fill(eta); - dxyVsPhi_pt10->Fill(phi, Dxy); - dzVsPhi_pt10->Fill(phi, Dz); - dxyVsEta_pt10->Fill(eta, Dxy); - dzVsEta_pt10->Fill(eta, Dz); - dxyVsEtaVsPhi_pt10->Fill(eta, phi, Dxy); - dzVsEtaVsPhi_pt10->Fill(eta, phi, Dz); + + dxy_pt10.IP_->Fill(Dxy); + dxy_pt10.IPVsPhi_->Fill(phi, Dxy); + dxy_pt10.IPVsEta_->Fill(eta, Dxy); + dxy_pt10.IPVsEtaVsPhi_->Fill(eta, phi, Dxy); + + dxy_pt10.IPErr_->Fill(DxyErr); + dxy_pt10.IPErrVsPhi_->Fill(phi, DxyErr); + dxy_pt10.IPErrVsEta_->Fill(eta, DxyErr); + dxy_pt10.IPErrVsEtaVsPhi_->Fill(eta, phi, DxyErr); + + dz_pt10.IP_->Fill(Dz); + dz_pt10.IPVsPhi_->Fill(phi, Dz); + dz_pt10.IPVsEta_->Fill(eta, Dz); + dz_pt10.IPVsEtaVsPhi_->Fill(eta, phi, Dz); + + dz_pt10.IPErr_->Fill(DzErr); + dz_pt10.IPErrVsPhi_->Fill(phi, DzErr); + dz_pt10.IPErrVsEta_->Fill(eta, DzErr); + dz_pt10.IPErrVsEtaVsPhi_->Fill(eta, phi, DzErr); } } @@ -514,11 +646,8 @@ void GeneralPurposeVertexAnalyzer::beginJob() { sumpt = book("sumpt", fmt::sprintf("#Sum p_{T} of %s", s_1).c_str(), 100, -0.5, 249.5); chi2ndf = book("chi2ndf", fmt::sprintf("%s #chi^{2}/ndof", s_1).c_str(), 100, 0., 20.); chi2prob = book("chi2prob", fmt::sprintf("%s #chi^{2} probability", s_1).c_str(), 100, 0., 1.); - dxy = book("dxy", fmt::sprintf("%s d_{xy} (#mum)", s_1).c_str(), dxyBin_, dxyMin_, dxyMax_); + dxy2 = book("dxyzoom", fmt::sprintf("%s d_{xy} (#mum)", s_1).c_str(), dxyBin_, dxyMin_ / 5., dxyMax_ / 5.); - dxyErr = book("dxyErr", fmt::sprintf("%s d_{xy} error (#mum)", s_1).c_str(), 100, 0., 2000.); - dz = book("dz", fmt::sprintf("%s d_{z} (#mum)", s_1).c_str(), dzBin_, dzMin_, dzMax_); - dzErr = book("dzErr", fmt::sprintf("%s d_{z} error(#mum)", s_1).c_str(), 100, 0., 10000.); phi_pt1 = book("phi_pt1", fmt::sprintf("%s #phi; PV tracks #phi;#tracks", s_1).c_str(), phiBin_, phiMin_, phiMax_); @@ -529,141 +658,22 @@ void GeneralPurposeVertexAnalyzer::beginJob() { eta_pt10 = book("eta_pt10", fmt::sprintf("%s #phi; PV tracks #eta;#tracks", s_10).c_str(), etaBin_, etaMin_, etaMax_); - dxyVsPhi_pt1 = book("dxyVsPhi_pt1", - fmt::sprintf("%s d_{xy} (#mum) VS track #phi", s_1).c_str(), - phiBin_, - phiMin_, - phiMax_, - dxyMin_, - dxyMax_); - dxyVsPhi_pt1->SetXTitle("PV track (p_{T} > 1 GeV) #phi"); - dxyVsPhi_pt1->SetYTitle("PV track (p_{T} > 1 GeV) d_{xy} (#mum)"); - - dzVsPhi_pt1 = book("dzVsPhi_pt1", - fmt::sprintf("%s d_{z} (#mum) VS track #phi", s_1).c_str(), - phiBin_, - phiMin_, - phiMax_, - dzMin_, - dzMax_); - dzVsPhi_pt1->SetXTitle("PV track (p_{T} > 1 GeV) #phi"); - dzVsPhi_pt1->SetYTitle("PV track (p_{T} > 1 GeV) d_{z} (#mum)"); - - dxyVsEta_pt1 = book("dxyVsEta_pt1", - fmt::sprintf("%s d_{xy} (#mum) VS track #eta", s_1).c_str(), - etaBin_, - etaMin_, - etaMax_, - dxyMin_, - dxyMax_); - dxyVsEta_pt1->SetXTitle("PV track (p_{T} > 1 GeV) #eta"); - dxyVsEta_pt1->SetYTitle("PV track (p_{T} > 1 GeV) d_{xy} (#mum)"); - - dzVsEta_pt1 = book("dzVsEta_pt1", - fmt::sprintf("%s d_{z} (#mum) VS track #eta", s_1).c_str(), - etaBin_, - etaMin_, - etaMax_, - dzMin_, - dzMax_); - dzVsEta_pt1->SetXTitle("PV track (p_{T} > 1 GeV) #eta"); - dzVsEta_pt1->SetYTitle("PV track (p_{T} > 1 GeV) d_{z} (#mum)"); - - dxyVsEtaVsPhi_pt1 = book("dxyVsEtaVsPhi_pt1", - fmt::sprintf("%s d_{xy} (#mum) VS track #eta VS track #phi", s_1).c_str(), - etaBin2D_, - etaMin_, - etaMax_, - phiBin2D_, - phiMin_, - phiMax_, - dxyMin_, - dxyMax_); - dxyVsEtaVsPhi_pt1->SetXTitle("PV track (p_{T} > 1 GeV) #eta"); - dxyVsEtaVsPhi_pt1->SetYTitle("PV track (p_{T} > 1 GeV) #phi"); - dxyVsEtaVsPhi_pt1->SetZTitle("PV track (p_{T} > 1 GeV) d_{xy} (#mum)"); - - dzVsEtaVsPhi_pt1 = book("dzVsEtaVsPhi_pt1", - fmt::sprintf("%s d_{z} (#mum) VS track #eta VS track #phi", s_1).c_str(), - etaBin2D_, - etaMin_, - etaMax_, - phiBin2D_, - phiMin_, - phiMax_, - dzMin_, - dzMax_); - dzVsEtaVsPhi_pt1->SetXTitle("PV track (p_{T} > 1 GeV) #eta"); - dzVsEtaVsPhi_pt1->SetYTitle("PV track (p_{T} > 1 GeV) #phi"); - dzVsEtaVsPhi_pt1->SetZTitle("PV track (p_{T} > 1 GeV) d_{z} (#mum)"); - - dxyVsPhi_pt10 = book("dxyVsPhi_pt10", - fmt::sprintf("%s d_{xy} (#mum) VS track #phi", s_10).c_str(), - phiBin_, - phiMin_, - phiMax_, - dxyMin_, - dxyMax_); - dxyVsPhi_pt10->SetXTitle("PV track (p_{T} > 10 GeV) #phi"); - dxyVsPhi_pt10->SetYTitle("PV track (p_{T} > 10 GeV) d_{xy} (#mum)"); - - dzVsPhi_pt10 = book("dzVsPhi_pt10", - fmt::sprintf("%s d_{z} (#mum) VS track #phi", s_10).c_str(), - phiBin_, - phiMin_, - phiMax_, - dzMin_, - dzMax_); - dzVsPhi_pt10->SetXTitle("PV track (p_{T} > 10 GeV) #phi"); - dzVsPhi_pt10->SetYTitle("PV track (p_{T} > 10 GeV) d_{z} (#mum)"); - - dxyVsEta_pt10 = book("dxyVsEta_pt10", - fmt::sprintf("%s d_{xy} (#mum) VS track #eta", s_10).c_str(), - etaBin_, - etaMin_, - etaMax_, - dxyMin_, - dxyMax_); - dxyVsEta_pt10->SetXTitle("PV track (p_{T} > 10 GeV) #eta"); - dxyVsEta_pt10->SetYTitle("PV track (p_{T} > 10 GeV) d_{xy} (#mum)"); - - dzVsEta_pt10 = book("dzVsEta_pt10", - fmt::sprintf("%s d_{z} (#mum) VS track #eta", s_10).c_str(), - etaBin_, - etaMin_, - etaMax_, - dzMin_, - dzMax_); - dzVsEta_pt10->SetXTitle("PV track (p_{T} > 10 GeV) #eta"); - dzVsEta_pt10->SetYTitle("PV track (p_{T} > 10 GeV) d_{z} (#mum)"); - - dxyVsEtaVsPhi_pt10 = book("dxyVsEtaVsPhi_pt10", - fmt::sprintf("%s d_{xy} (#mum) VS track #eta VS track #phi", s_10).c_str(), - etaBin2D_, - etaMin_, - etaMax_, - phiBin2D_, - phiMin_, - phiMax_, - dxyMin_, - dxyMax_); - dxyVsEtaVsPhi_pt10->SetXTitle("PV track (p_{T} > 10 GeV) #eta"); - dxyVsEtaVsPhi_pt10->SetYTitle("PV track (p_{T} > 10 GeV) #phi"); - dxyVsEtaVsPhi_pt10->SetZTitle("PV track (p_{T} > 10 GeV) d_{xy} (#mum)"); - - dzVsEtaVsPhi_pt10 = book("dzVsEtaVsPhi_pt10", - fmt::sprintf("%s d_{z} (#mum) VS track #eta VS track #phi", s_10).c_str(), - etaBin2D_, - etaMin_, - etaMax_, - phiBin2D_, - phiMin_, - phiMax_, - dzMin_, - dzMax_); - dzVsEtaVsPhi_pt10->SetXTitle("PV track (p_{T} > 10 GeV) #eta"); - dzVsEtaVsPhi_pt10->SetYTitle("PV track (p_{T} > 10 GeV) #phi"); - dzVsEtaVsPhi_pt10->SetZTitle("PV track (p_{T} > 10 GeV) d_{z} (#mum)"); + // initialize and book the monitors; + dxy_pt1.varname_ = "xy"; + dxy_pt1.pTcut_ = 1.f; + dxy_pt1.bookIPMonitor(conf_, fs_); + + dxy_pt10.varname_ = "xy"; + dxy_pt10.pTcut_ = 10.f; + dxy_pt10.bookIPMonitor(conf_, fs_); + + dz_pt1.varname_ = "z"; + dz_pt1.pTcut_ = 1.f; + dz_pt1.bookIPMonitor(conf_, fs_); + + dz_pt10.varname_ = "z"; + dz_pt10.pTcut_ = 10.f; + dz_pt10.bookIPMonitor(conf_, fs_); } // ------------ method fills 'descriptions' with the allowed parameters for the module ------------ @@ -678,8 +688,8 @@ void GeneralPurposeVertexAnalyzer::fillDescriptions(edm::ConfigurationDescriptio desc.add("TkSizeMin", 499.5); desc.add("TkSizeMax", -0.5); desc.add("DxyBin", 100); - desc.add("DxyMin", 5000.); - desc.add("DxyMax", -5000.); + desc.add("DxyMin", -2000.); + desc.add("DxyMax", 2000.); desc.add("DzBin", 100); desc.add("DzMin", -2000.0); desc.add("DzMax", 2000.0); diff --git a/Alignment/OfflineValidation/plugins/ShortenedTrackValidation.cc b/Alignment/OfflineValidation/plugins/ShortenedTrackValidation.cc index d606dd6f2704d..34c5f474b0c40 100644 --- a/Alignment/OfflineValidation/plugins/ShortenedTrackValidation.cc +++ b/Alignment/OfflineValidation/plugins/ShortenedTrackValidation.cc @@ -415,9 +415,9 @@ void ShortenedTrackValidation::beginJob() { fmt::sprintf("Short Track p_{T} / Full Track p_{T} - %s layers;p_{T}^{short}/p_{T}^{full};n. tracks", hitsRemain_[i]) .c_str(), - 101, - -0.05, - 2.05)); + 100, + 0.5, + 1.5)); histsPtDiffAll_.push_back(book( ShortTrackResolution, @@ -436,8 +436,8 @@ void ShortenedTrackValidation::beginJob() { hitsRemain_[i]) .c_str(), 100, - -0.01, - 0.01)); + -0.001, + 0.001)); histsPhiDiffAll_.push_back( book(ShortTrackResolution, @@ -446,8 +446,8 @@ void ShortenedTrackValidation::beginJob() { hitsRemain_[i]) .c_str(), 100, - -0.01, - 0.01)); + -0.001, + 0.001)); histsPtRatioVsDeltaRAll_.push_back( book(ShortTrackResolution, @@ -471,16 +471,16 @@ void ShortenedTrackValidation::beginJob() { hitsRemain_[i]) .c_str(), 101, - -10., - 10.)); + -5., + 5.)); histsPtAll_.push_back( book(TrackQuals, fmt::sprintf("trackPt_%s", hitsRemain_[i]).c_str(), fmt::sprintf("Short Track p_{T} - %s layers;p_{T}^{short} [GeV];n. tracks", hitsRemain_[i]).c_str(), - 101, - -0.05, - 200.5)); + 100, + 0., + 100.)); histsNhitsAll_.push_back( book(TrackQuals, @@ -496,7 +496,7 @@ void ShortenedTrackValidation::beginJob() { fmt::sprintf("Short Track / Long Track #DeltaR %s layers;#DeltaR(short,long);n. tracks", hitsRemain_[i]).c_str(), 100, 0., - 0.01)); + 0.005)); currentFolder = fmt::sprintf("%s/Compare_%sHit", folderName_, hitsRemain_[i]); comparators_[i]->book(fs_->mkdir(currentFolder)); diff --git a/Alignment/OfflineValidation/test/testShortenedTrackValidation_cfg.py b/Alignment/OfflineValidation/test/testShortenedTrackValidation_cfg.py index 2901ef5a7fc83..4238cbd9cda3d 100644 --- a/Alignment/OfflineValidation/test/testShortenedTrackValidation_cfg.py +++ b/Alignment/OfflineValidation/test/testShortenedTrackValidation_cfg.py @@ -118,7 +118,7 @@ minTracksPtInput = 15.0, maxTracksPtInput = 99999.9, maxDrInput = 0.01, - tracksInputTag = "SingleLongTrackProducer", + tracksInputTag = "LongTracksRefit", # input original track should be refit tracksRerecoInputTag = ["RefittedShortTracks3", "RefittedShortTracks4", "RefittedShortTracks5",