From 47647baa44fe717fc92e06a1e23416b6be9e2fea Mon Sep 17 00:00:00 2001 From: Sam Harper Date: Wed, 1 Feb 2023 15:02:15 +0000 Subject: [PATCH 001/233] initial version of L1Nano --- .../interface/SimpleFlatTableProducer.h | 52 ++++++++ .../plugins/SimpleFlatTableProducerPlugins.cc | 20 +++ PhysicsTools/NanoAOD/python/l1trig_cff.py | 119 ++++++++++++++++++ PhysicsTools/NanoAOD/python/nano_cff.py | 5 + 4 files changed, 196 insertions(+) create mode 100644 PhysicsTools/NanoAOD/python/l1trig_cff.py diff --git a/PhysicsTools/NanoAOD/interface/SimpleFlatTableProducer.h b/PhysicsTools/NanoAOD/interface/SimpleFlatTableProducer.h index 41184463cc12a..26657e489eb87 100644 --- a/PhysicsTools/NanoAOD/interface/SimpleFlatTableProducer.h +++ b/PhysicsTools/NanoAOD/interface/SimpleFlatTableProducer.h @@ -10,6 +10,7 @@ #include "DataFormats/Common/interface/ValueMap.h" #include "DataFormats/NanoAOD/interface/FlatTable.h" #include "Utilities/General/interface/ClassName.h" +#include "DataFormats/L1Trigger/interface/BXVector.h" #include "CommonTools/Utils/interface/StringCutObjectSelector.h" #include "CommonTools/Utils/interface/StringObjectFunction.h" @@ -349,6 +350,57 @@ class SimpleFlatTableProducer : public SimpleFlatTableProducerBase>> extvars_; }; +template +class BXVectorSimpleFlatTableProducer : public SimpleFlatTableProducerBase> { +public: + BXVectorSimpleFlatTableProducer(edm::ParameterSet const ¶ms) + : SimpleFlatTableProducerBase>(params), + maxLen_(params.existsAs("maxLen") ? params.getParameter("maxLen") + : std::numeric_limits::max()), + cut_(params.getParameter("cut"), true), + minBX_(params.getParameter("minBX")), + maxBX_(params.getParameter("maxBX")), + bxVarName_("bx") { + edm::ParameterSet const &varsPSet = params.getParameter("variables"); + auto varNames = varsPSet.getParameterNamesForType(); + if (std::find(varNames.begin(), varNames.end(), bxVarName_) != varNames.end()) { + throw cms::Exception("Configuration", + "BXVectorSimpleFlatTableProducer already defines the " + bxVarName_ + + "internally and thus you should not specify it yourself"); + } + } + std::unique_ptr fillTable(const edm::Event &iEvent, + const edm::Handle> &prod) const override { + std::vector selObjs; + std::vector selObjBXs; + if (prod.isValid() || !(this->skipNonExistingSrc_)) { + for (int bx = minBX_; bx <= maxBX_; bx++) { + for (size_t objNr = 0, nrObjs = prod->size(bx); objNr < nrObjs; ++objNr) { + const auto &obj = prod->at(bx, objNr); + if (cut_(obj)) { + selObjs.push_back(&obj); + selObjBXs.push_back(bx); + } + if (selObjs.size() >= maxLen_) + break; + } + } + } + auto out = std::make_unique(selObjs.size(), this->name_, false, this->extension_); + for (const auto &var : this->vars_) + var->fill(selObjs, *out); + out->template addColumn(bxVarName_, selObjBXs, "BX of the L1 candidate"); + return out; + } + +protected: + const unsigned int maxLen_; + const StringCutObjectSelector cut_; + const int minBX_; + const int maxBX_; + const std::string bxVarName_; +}; + template class EventSingletonSimpleFlatTableProducer : public SimpleFlatTableProducerBase { public: diff --git a/PhysicsTools/NanoAOD/plugins/SimpleFlatTableProducerPlugins.cc b/PhysicsTools/NanoAOD/plugins/SimpleFlatTableProducerPlugins.cc index cf30e060c442b..412f38d8eb129 100644 --- a/PhysicsTools/NanoAOD/plugins/SimpleFlatTableProducerPlugins.cc +++ b/PhysicsTools/NanoAOD/plugins/SimpleFlatTableProducerPlugins.cc @@ -24,6 +24,21 @@ typedef EventSingletonSimpleFlatTableProducer SimpleXYZPointFla #include "DataFormats/BeamSpot/interface/BeamSpot.h" typedef EventSingletonSimpleFlatTableProducer SimpleBeamspotFlatTableProducer; +#include "DataFormats/L1Trigger/interface/EGamma.h" +typedef BXVectorSimpleFlatTableProducer SimpleTriggerL1EGFlatTableProducer; + +#include "DataFormats/L1Trigger/interface/Jet.h" +typedef BXVectorSimpleFlatTableProducer SimpleTriggerL1JetFlatTableProducer; + +#include "DataFormats/L1Trigger/interface/Tau.h" +typedef BXVectorSimpleFlatTableProducer SimpleTriggerL1TauFlatTableProducer; + +#include "DataFormats/L1Trigger/interface/Muon.h" +typedef BXVectorSimpleFlatTableProducer SimpleTriggerL1MuonFlatTableProducer; + +#include "DataFormats/L1Trigger/interface/EtSum.h" +typedef BXVectorSimpleFlatTableProducer SimpleTriggerL1EtSumFlatTableProducer; + #include "FWCore/Framework/interface/MakerMacros.h" DEFINE_FWK_MODULE(SimpleCandidateFlatTableProducer); DEFINE_FWK_MODULE(SimpleGenEventFlatTableProducer); @@ -33,3 +48,8 @@ DEFINE_FWK_MODULE(SimpleProtonTrackFlatTableProducer); DEFINE_FWK_MODULE(SimpleLocalTrackFlatTableProducer); DEFINE_FWK_MODULE(SimpleXYZPointFlatTableProducer); DEFINE_FWK_MODULE(SimpleBeamspotFlatTableProducer); +DEFINE_FWK_MODULE(SimpleTriggerL1EGFlatTableProducer); +DEFINE_FWK_MODULE(SimpleTriggerL1JetFlatTableProducer); +DEFINE_FWK_MODULE(SimpleTriggerL1MuonFlatTableProducer); +DEFINE_FWK_MODULE(SimpleTriggerL1TauFlatTableProducer); +DEFINE_FWK_MODULE(SimpleTriggerL1EtSumFlatTableProducer); diff --git a/PhysicsTools/NanoAOD/python/l1trig_cff.py b/PhysicsTools/NanoAOD/python/l1trig_cff.py new file mode 100644 index 0000000000000..0dcbd9183fbbd --- /dev/null +++ b/PhysicsTools/NanoAOD/python/l1trig_cff.py @@ -0,0 +1,119 @@ +import FWCore.ParameterSet.Config as cms +from PhysicsTools.NanoAOD.nano_eras_cff import * +from PhysicsTools.NanoAOD.common_cff import * + +l1ObjVars = cms.PSet( + P3Vars, + hwPt = Var("hwPt()",int,doc="hardware pt"), + hwEta = Var("hwEta()",int,doc="hardware eta"), + hwPhi = Var("hwPhi()",int,doc="hardware phi"), + hwQual = Var("hwQual()",int,doc="hardware qual"), + hwIso = Var("hwIso()",int,doc="hardware iso") +) + + +l1MuTable = cms.EDProducer("SimpleTriggerL1MuonFlatTableProducer", + src = cms.InputTag("gmtStage2Digis","Muon"), + minBX = cms.int32(-2), + maxBX = cms.int32(2), + cut = cms.string(""), + name= cms.string("L1Mu"), + doc = cms.string(""), + extension = cms.bool(False), # this is the main table for L1 EGs + variables = cms.PSet(l1ObjVars, + hwCharge = Var("hwCharge()",int,doc=""), + hwChargeValid = Var("hwChargeValid()",int,doc=""), + tfMuonIndex = Var("tfMuonIndex()",int,doc=""), + hwTag = Var("hwTag()",int,doc=""), + hwEtaAtVtx = Var("hwEtaAtVtx()",int,doc=""), + hwPhiAtVtx = Var("hwPhiAtVtx()",int,doc=""), + etaAtVtx = Var("etaAtVtx()",float,doc=""), + phiAtVtx = Var("phiAtVtx()",float,doc=""), + hwIsoSum = Var("hwIsoSum()",int,doc=""), + hwDPhiExtra = Var("hwDPhiExtra()",int,doc=""), + hwDEtaExtra = Var("hwDEtaExtra()",int,doc=""), + hwRank = Var("hwRank()",int,doc=""), + hwPtUnconstrained = Var("hwPtUnconstrained()",int,doc=""), + ptUnconstrained = Var("ptUnconstrained()",float,doc=""), + hwDXY = Var("hwDXY()",int,doc=""), + ) +) + + +l1JetTable = cms.EDProducer("SimpleTriggerL1JetFlatTableProducer", + src = cms.InputTag("caloStage2Digis","Jet"), + minBX = cms.int32(-2), + maxBX = cms.int32(2), + cut = cms.string(""), + name= cms.string("L1Jet"), + doc = cms.string(""), + extension = cms.bool(False), # this is the main table for L1 EGs + variables = cms.PSet(l1ObjVars, + towerIEta = Var("towerIEta()",int,doc=""), + towerIPhi = Var("towerIPhi()",int,doc=""), + rawEt = Var("rawEt()",int,doc=""), + seedEt = Var("seedEt()",int,doc=""), + puEt = Var("puEt()",int,doc=""), + puDonutEt0 = Var("puDonutEt(0)",int,doc=""), + puDonutEt1 = Var("puDonutEt(1)",int,doc=""), + puDonutEt2 = Var("puDonutEt(2)",int,doc=""), + puDonutEt3 = Var("puDonutEt(3)",int,doc=""), + ) +) + +l1TauTable = cms.EDProducer("SimpleTriggerL1TauFlatTableProducer", + src = cms.InputTag("caloStage2Digis","Tau"), + minBX = cms.int32(-2), + maxBX = cms.int32(2), + cut = cms.string(""), + name= cms.string("L1Tau"), + doc = cms.string(""), + extension = cms.bool(False), # this is the main table for L1 EGs + variables = cms.PSet(l1ObjVars, + towerIEta = Var("towerIEta()",int,doc=""), + towerIPhi = Var("towerIPhi()",int,doc=""), + rawEt = Var("rawEt()",int,doc=""), + isoEt = Var("isoEt()",int,doc=""), + nTT = Var("nTT()",int,doc=""), + hasEM = Var("hasEM()",int,doc=""), + isMerged = Var("isMerged()",int,doc=""), + + ) +) + +l1EtSumTable = cms.EDProducer("SimpleTriggerL1EtSumFlatTableProducer", + src = cms.InputTag("caloStage2Digis","EtSum"), + minBX = cms.int32(-2), + maxBX = cms.int32(2), + cut = cms.string(""), + name= cms.string("L1EtSum"), + doc = cms.string(""), + extension = cms.bool(False), # this is the main table for L1 EGs + variables = cms.PSet(PTVars, + hwPt = Var("hwPt()",int,doc="hardware pt"), + hwPhi = Var("hwPhi()",int,doc="hardware phi"), + etSumType = Var("getType()",int,doc=""), + ) +) + +l1EGTable = cms.EDProducer("SimpleTriggerL1EGFlatTableProducer", + src = cms.InputTag("caloStage2Digis","EGamma"), + minBX = cms.int32(-2), + maxBX = cms.int32(2), + cut = cms.string(""), + name= cms.string("L1EG"), + doc = cms.string(""), + extension = cms.bool(False), # this is the main table for L1 EGs + variables = cms.PSet(l1ObjVars, + towerIEta = Var("towerIEta()",int,doc="tower ieta"), + towerIPhi = Var("towerIPhi()",int,doc="tower iphi"), + rawEt = Var("rawEt()",int,doc="raw et"), + isoEt = Var("isoEt()",int,doc="iso et"), + footprintEt = Var("footprintEt()",int,doc=" footprint et"), + nTT = Var("nTT()",int,doc="nr trig towers"), + shape = Var("shape()",int,doc="shape"), + towerHoE = Var("towerHoE()",int,doc="tower H/E"), + ) +) + +l1TablesTask = cms.Task(l1EGTable,l1EtSumTable,l1TauTable,l1JetTable,l1MuTable) diff --git a/PhysicsTools/NanoAOD/python/nano_cff.py b/PhysicsTools/NanoAOD/python/nano_cff.py index 4e9965a19b938..4cabc8c788a42 100644 --- a/PhysicsTools/NanoAOD/python/nano_cff.py +++ b/PhysicsTools/NanoAOD/python/nano_cff.py @@ -27,6 +27,7 @@ from PhysicsTools.NanoAOD.NanoAODEDMEventContent_cff import * from PhysicsTools.NanoAOD.fsrPhotons_cff import * from PhysicsTools.NanoAOD.softActivity_cff import * +from PhysicsTools.NanoAOD.l1trig_cff import * nanoMetadata = cms.EDProducer("UniqueStringProducer", strings = cms.PSet( @@ -210,3 +211,7 @@ def nanoWmassGenCustomize(process): etaPrecision="{} ? {} : {}".format(pdgSelection, CandVars.eta.precision.value(), genParticleTable.variables.eta.precision.value()) process.genParticleTable.variables.eta.precision=cms.string(etaPrecision) return process + +def nanoL1TrigObjCustomize(process): + process.nanoTableTaskCommon.add(process.l1TablesTask) + return process From 5a81f6ea6ef70ab220dc37c838abbfcb18a9f7d0 Mon Sep 17 00:00:00 2001 From: Sam Harper Date: Thu, 9 Feb 2023 13:16:11 +0100 Subject: [PATCH 002/233] adding more customisation options for nano --- PhysicsTools/NanoAOD/python/l1trig_cff.py | 45 ++++++++++++++++++++++- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/PhysicsTools/NanoAOD/python/l1trig_cff.py b/PhysicsTools/NanoAOD/python/l1trig_cff.py index 0dcbd9183fbbd..d9f005d41aed6 100644 --- a/PhysicsTools/NanoAOD/python/l1trig_cff.py +++ b/PhysicsTools/NanoAOD/python/l1trig_cff.py @@ -2,8 +2,17 @@ from PhysicsTools.NanoAOD.nano_eras_cff import * from PhysicsTools.NanoAOD.common_cff import * +l1PtVars = cms.PSet( + pt = Var("pt", float, precision=5), + phi = Var("phi", float, precision=5), +) +l1P3Vars = cms.PSet( + l1PtVars, + eta = Var("eta", float, precision=5), +) + l1ObjVars = cms.PSet( - P3Vars, + l1P3Vars, hwPt = Var("hwPt()",int,doc="hardware pt"), hwEta = Var("hwEta()",int,doc="hardware eta"), hwPhi = Var("hwPhi()",int,doc="hardware phi"), @@ -89,7 +98,7 @@ name= cms.string("L1EtSum"), doc = cms.string(""), extension = cms.bool(False), # this is the main table for L1 EGs - variables = cms.PSet(PTVars, + variables = cms.PSet(l1PtVars, hwPt = Var("hwPt()",int,doc="hardware pt"), hwPhi = Var("hwPhi()",int,doc="hardware phi"), etSumType = Var("getType()",int,doc=""), @@ -117,3 +126,35 @@ ) l1TablesTask = cms.Task(l1EGTable,l1EtSumTable,l1TauTable,l1JetTable,l1MuTable) + +def setL1NanoToReduced(process): + """ + sets the L1 objects only have reduced information which is necessary + for central nano + """ + #reduce the variables to the core variables + #note et sum variables are already reduced + process.l1EGTable.variables = cms.PSet(l1ObjVars) + process.l1MuTable.variables = cms.PSet(l1ObjVars) + process.l1JetTable.variables = cms.PSet(l1ObjVars) + process.l1TauTable.variables = cms.PSet(l1ObjVars) + + #restrict bx + process.l1EGTable.minBX = 0 + process.l1EGTable.maxBX = 0 + process.l1MuTable.minBX = 0 + process.l1MuTable.maxBX = 0 + process.l1JetTable.minBX = 0 + process.l1JetTable.maxBX = 0 + process.l1TauTable.minBX = 0 + process.l1TauTable.maxBX = 0 + process.l1EtSumTable.minBX = 0 + process.l1EtSumTable.maxBX = 0 + + #apply cuts + process.l1EGTable.cut="hwPt>=10" + process.l1TauTable.cut="hwPt>=50" + process.l1JetTable.cut="hwPt>=100" + + + return process From 8b713053f870c68101ee1a2f53531851fc8bdea8 Mon Sep 17 00:00:00 2001 From: Sam Harper Date: Thu, 9 Feb 2023 13:18:26 +0100 Subject: [PATCH 003/233] adding fill desc and reduced L1Nano option --- .../NanoAOD/interface/SimpleFlatTableProducer.h | 17 ++++++++++++++++- PhysicsTools/NanoAOD/python/nano_cff.py | 5 +++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/PhysicsTools/NanoAOD/interface/SimpleFlatTableProducer.h b/PhysicsTools/NanoAOD/interface/SimpleFlatTableProducer.h index 26657e489eb87..b6540c4233986 100644 --- a/PhysicsTools/NanoAOD/interface/SimpleFlatTableProducer.h +++ b/PhysicsTools/NanoAOD/interface/SimpleFlatTableProducer.h @@ -369,12 +369,27 @@ class BXVectorSimpleFlatTableProducer : public SimpleFlatTableProducerBase>::baseDescriptions(); + desc.add("cut", "")->setComment("selection on the main input collection (but selection can not be bx based)"); + desc.addOptional("maxLen")->setComment( + "define the maximum length of the input collection to put in the branch"); + desc.add("minBX",-2)->setComment("min bx (inclusive) to include"); + desc.add("maxBX",2)->setComment("max bx (inclusive) to include"); + descriptions.addWithDefaultLabel(desc); + } + std::unique_ptr fillTable(const edm::Event &iEvent, const edm::Handle> &prod) const override { + std::vector selObjs; std::vector selObjBXs; + if (prod.isValid() || !(this->skipNonExistingSrc_)) { - for (int bx = minBX_; bx <= maxBX_; bx++) { + const int minBX = std::max(minBX_,prod->getFirstBX()); + const int maxBX = std::min(maxBX_,prod->getLastBX()); + for (int bx = minBX; bx <= maxBX; bx++) { for (size_t objNr = 0, nrObjs = prod->size(bx); objNr < nrObjs; ++objNr) { const auto &obj = prod->at(bx, objNr); if (cut_(obj)) { diff --git a/PhysicsTools/NanoAOD/python/nano_cff.py b/PhysicsTools/NanoAOD/python/nano_cff.py index 4cabc8c788a42..8eff7f79ed17f 100644 --- a/PhysicsTools/NanoAOD/python/nano_cff.py +++ b/PhysicsTools/NanoAOD/python/nano_cff.py @@ -213,5 +213,10 @@ def nanoWmassGenCustomize(process): return process def nanoL1TrigObjCustomize(process): + process.nanoTableTaskCommon.add(process.l1TablesTask) + process = setL1NanoToReduced(process) + return process + +def nanoL1TrigObjCustomizeFull(process): process.nanoTableTaskCommon.add(process.l1TablesTask) return process From 17471e84c6b53ca2d2bdb4288dafd88601ec360b Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Fri, 10 Feb 2023 10:27:36 +0100 Subject: [PATCH 004/233] add ParticleNetFromMiniAOD --- .../plugins/ParticleNetFeatureEvaluator.cc | 712 ++++++++++++++++++ .../python/pfParticleNetFromMiniAODAK4_cff.py | 82 ++ .../python/pfParticleNetFromMiniAOD_cff.py | 31 + 3 files changed, 825 insertions(+) create mode 100644 RecoBTag/FeatureTools/plugins/ParticleNetFeatureEvaluator.cc create mode 100644 RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4_cff.py create mode 100644 RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAOD_cff.py diff --git a/RecoBTag/FeatureTools/plugins/ParticleNetFeatureEvaluator.cc b/RecoBTag/FeatureTools/plugins/ParticleNetFeatureEvaluator.cc new file mode 100644 index 0000000000000..c4217bf3ff0aa --- /dev/null +++ b/RecoBTag/FeatureTools/plugins/ParticleNetFeatureEvaluator.cc @@ -0,0 +1,712 @@ +#include +#include + +#include "CommonTools/UtilAlgos/interface/TFileService.h" + +#include "FWCore/ServiceRegistry/interface/Service.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/stream/EDProducer.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/StreamID.h" +#include "FWCore/Utilities/interface/ESGetToken.h" + +#include "DataFormats/Candidate/interface/Candidate.h" +#include "DataFormats/PatCandidates/interface/Jet.h" +#include "DataFormats/PatCandidates/interface/Muon.h" +#include "DataFormats/PatCandidates/interface/Electron.h" +#include "DataFormats/PatCandidates/interface/Photon.h" +#include "DataFormats/PatCandidates/interface/Tau.h" +#include "DataFormats/PatCandidates/interface/PackedCandidate.h" + +#include "RecoBTag/FeatureTools/interface/TrackInfoBuilder.h" +#include "RecoBTag/FeatureTools/interface/deep_helpers.h" +#include "RecoBTag/FeatureTools/interface/sorting_modules.h" +#include "TrackingTools/Records/interface/TransientTrackRecord.h" + +#include "DataFormats/Candidate/interface/VertexCompositePtrCandidate.h" +#include "DataFormats/VertexReco/interface/VertexFwd.h" +#include "DataFormats/BTauReco/interface/DeepBoostedJetTagInfo.h" + +using namespace btagbtvdeep; + +class ParticleNetFeatureEvaluator : public edm::stream::EDProducer<> { +public: + explicit ParticleNetFeatureEvaluator(const edm::ParameterSet &); + ~ParticleNetFeatureEvaluator() override; + + static void fillDescriptions(edm::ConfigurationDescriptions &descriptions); + +private: + + void beginStream(edm::StreamID) override {} + void produce(edm::Event &, const edm::EventSetup &) override; + void endStream() override {} + void fillParticleFeatures(DeepBoostedJetFeatures & fts, + const reco::Jet & jet, + const std::vector & tau_pfcandidates, + const pat::MuonCollection & muons, + const pat::ElectronCollection & electrons, + const pat::PhotonCollection & photons + ); + void fillSVFeatures(DeepBoostedJetFeatures & fts, + const reco::Jet & jet); + void fillLostTrackFeatures(DeepBoostedJetFeatures & fts, + const reco::Jet & jet); + bool useTrackProperties(const pat::PackedCandidate* cand); + + const double jet_radius_; + const double min_jet_pt_; + const double max_jet_eta_; + const double min_jet_eta_; + const double min_pt_for_track_properties_; + const double min_pt_for_pfcandidates_; + const double min_pt_for_losttrack_; + const double max_dr_for_losttrack_; + const double min_pt_for_taus_; + const double max_eta_for_taus_; + const bool use_puppiP4_; + const double min_puppi_wgt_; + const bool include_neutrals_; + + edm::EDGetTokenT muon_token_; + edm::EDGetTokenT electron_token_; + edm::EDGetTokenT photon_token_; + edm::EDGetTokenT tau_token_; + edm::EDGetTokenT > jet_token_; + edm::EDGetTokenT losttrack_token_; + edm::EDGetTokenT vtx_token_; + edm::EDGetTokenT sv_token_; + edm::EDGetTokenT > pfcand_token_; + edm::ESGetToken track_builder_token_; + + edm::Handle vtxs_; + edm::Handle svs_; + edm::Handle > pfcands_; + edm::Handle losttracks_; + edm::ESHandle track_builder_; + + const static std::vector particle_features_; + const static std::vector sv_features_; + const static std::vector losttrack_features_; + const reco::Vertex *pv_ = nullptr; + + TTree* tree; + unsigned int event; + float jet_pt; + float jet_pt_raw; + float jet_eta; + float jet_phi; + float jet_mass; + unsigned int ijet; + std::vector jet_pfcand_pt_log; + std::vector jet_pfcand_energy_log; + std::vector jet_pfcand_deta; + std::vector jet_pfcand_dphi; + std::vector jet_pfcand_eta ; + std::vector jet_pfcand_charge; + std::vector jet_pfcand_frompv; + std::vector jet_pfcand_nlostinnerhits; + std::vector jet_pfcand_track_chi2; + std::vector jet_pfcand_track_qual; + std::vector jet_pfcand_dz; + std::vector jet_pfcand_dzsig; + std::vector jet_pfcand_dxy; + std::vector jet_pfcand_dxysig; + std::vector jet_pfcand_etarel; + std::vector jet_pfcand_pperp_ratio; + std::vector jet_pfcand_ppara_ratio; + std::vector jet_pfcand_trackjet_d3d; + std::vector jet_pfcand_trackjet_d3dsig; + std::vector jet_pfcand_trackjet_dist; + std::vector jet_pfcand_npixhits; + std::vector jet_pfcand_nstriphits; + std::vector jet_pfcand_trackjet_decayL; + std::vector jet_pfcand_id; + std::vector jet_pfcand_calofraction; + std::vector jet_pfcand_hcalfraction; + std::vector jet_pfcand_puppiw; + std::vector jet_pfcand_muon_id; + std::vector jet_pfcand_muon_isglobal; + std::vector jet_pfcand_muon_chi2; + std::vector jet_pfcand_muon_segcomp; + std::vector jet_pfcand_muon_nvalidhit; + std::vector jet_pfcand_muon_nstation; + std::vector jet_pfcand_electron_detaIn; + std::vector jet_pfcand_electron_dphiIn; + std::vector jet_pfcand_electron_sigIetaIeta; + std::vector jet_pfcand_electron_sigIphiIphi; + std::vector jet_pfcand_electron_r9; + std::vector jet_pfcand_electron_convProb; + std::vector jet_pfcand_photon_sigIetaIeta; + std::vector jet_pfcand_photon_r9; + std::vector jet_pfcand_photon_eVeto; + std::vector jet_pfcand_tau_signal; + std::vector jet_sv_pt_log; + std::vector jet_sv_mass; + std::vector jet_sv_deta; + std::vector jet_sv_dphi; + std::vector jet_sv_eta; + std::vector jet_sv_ntrack; + std::vector jet_sv_chi2; + std::vector jet_sv_dxy; + std::vector jet_sv_dxysig; + std::vector jet_sv_d3d; + std::vector jet_sv_d3dsig; + std::vector jet_losttrack_pt_log; + std::vector jet_losttrack_eta; + std::vector jet_losttrack_deta; + std::vector jet_losttrack_dphi; + std::vector jet_losttrack_charge; + std::vector jet_losttrack_frompv; + std::vector jet_losttrack_track_chi2; + std::vector jet_losttrack_track_qual; + std::vector jet_losttrack_dz; + std::vector jet_losttrack_dxy; + std::vector jet_losttrack_dzsig; + std::vector jet_losttrack_dxysig; + std::vector jet_losttrack_etarel; + std::vector jet_losttrack_trackjet_d3d; + std::vector jet_losttrack_trackjet_d3dsig; + std::vector jet_losttrack_trackjet_dist; + std::vector jet_losttrack_trackjet_decayL; + std::vector jet_losttrack_npixhits; + std::vector jet_losttrack_nstriphits; + +}; + +const std::vector ParticleNetFeatureEvaluator::particle_features_{ "jet_pfcand_pt_log", "jet_pfcand_energy_log", "jet_pfcand_deta", "jet_pfcand_dphi", "jet_pfcand_eta", "jet_pfcand_charge", "jet_pfcand_frompv", "jet_pfcand_nlostinnerhits", "jet_pfcand_track_chi2", "jet_pfcand_track_qual", "jet_pfcand_dz", "jet_pfcand_dzsig", "jet_pfcand_dxy", "jet_pfcand_dxysig", "jet_pfcand_etarel", "jet_pfcand_pperp_ratio", "jet_pfcand_ppara_ratio", "jet_pfcand_trackjet_d3d", "jet_pfcand_trackjet_d3dsig", "jet_pfcand_trackjet_dist", "jet_pfcand_nhits", "jet_pfcand_npixhits", "jet_pfcand_nstriphits", "jet_pfcand_trackjet_decayL", "jet_pfcand_id", "jet_pfcand_calofraction", "jet_pfcand_hcalfraction", "jet_pfcand_puppiw", "jet_pfcand_muon_id", "jet_pfcand_muon_isglobal", "jet_pfcand_muon_segcomp", "jet_pfcand_muon_chi2", "jet_pfcand_muon_nvalidhit", "jet_pfcand_muon_nstation", "jet_pfcand_electron_detaIn", "jet_pfcand_electron_dphiIn", "jet_pfcand_electron_sigIetaIeta", "jet_pfcand_electron_sigIphiIphi", "jet_pfcand_electron_r9", "jet_pfcand_electron_convProb", "jet_pfcand_photon_sigIetaIeta", "jet_pfcand_photon_r9", "jet_pfcand_photon_eVeto", "jet_pfcand_tau_signal", "pfcand_mask"}; + +const std::vector ParticleNetFeatureEvaluator::sv_features_{"jet_sv_pt_log","jet_sv_mass","jet_sv_deta","jet_sv_dphi", "jet_sv_eta", "jet_sv_ntrack", "jet_sv_chi2", "jet_sv_dxy", "jet_sv_dxysig", "jet_sv_d3d", "jet_sv_d3dsig", "sv_mask"}; + +const std::vector ParticleNetFeatureEvaluator::losttrack_features_{"jet_losttrack_pt_log","jet_losttrack_eta","jet_losttrack_deta","jet_losttrack_dphi","jet_losttrack_charge","jet_losttrack_frompv","jet_losttrack_track_chi2","jet_losttrack_track_qual","jet_losttrack_dz","jet_losttrack_dxy","jet_losttrack_dzsig","jet_losttrack_dxysig","jet_losttrack_etarel","jet_losttrack_trackjet_d3d","jet_losttrack_trackjet_d3dsig","jet_losttrack_trackjet_dist","jet_losttrack_trackjet_decayL","jet_losttrack_npixhits","jet_losttrack_nstriphits","lt_mask"}; + +ParticleNetFeatureEvaluator::ParticleNetFeatureEvaluator(const edm::ParameterSet &iConfig): + jet_radius_(iConfig.getParameter("jet_radius")), + min_jet_pt_(iConfig.getParameter("min_jet_pt")), + max_jet_eta_(iConfig.getParameter("max_jet_eta")), + min_jet_eta_(iConfig.getParameter("min_jet_eta")), + min_pt_for_track_properties_(iConfig.getParameter("min_pt_for_track_properties")), + min_pt_for_pfcandidates_(iConfig.getParameter("min_pt_for_pfcandidates")), + min_pt_for_losttrack_(iConfig.getParameter("min_pt_for_losttrack")), + max_dr_for_losttrack_(iConfig.getParameter("max_dr_for_losttrack")), + min_pt_for_taus_(iConfig.getParameter("min_pt_for_taus")), + max_eta_for_taus_(iConfig.getParameter("max_eta_for_taus")), + use_puppiP4_(iConfig.getParameter("use_puppiP4")), + min_puppi_wgt_(iConfig.getParameter("min_puppi_wgt")), + include_neutrals_(iConfig.getParameter("include_neutrals")), + muon_token_(consumes(iConfig.getParameter("muons"))), + electron_token_(consumes(iConfig.getParameter("electrons"))), + photon_token_(consumes(iConfig.getParameter("photons"))), + tau_token_(consumes(iConfig.getParameter("taus"))), + jet_token_(consumes >(iConfig.getParameter("jets"))), + losttrack_token_(consumes(iConfig.getParameter("losttracks"))), + vtx_token_(consumes(iConfig.getParameter("vertices"))), + sv_token_(consumes(iConfig.getParameter("secondary_vertices"))), + pfcand_token_(consumes >(iConfig.getParameter("pf_candidates"))), + track_builder_token_(esConsumes(edm::ESInputTag("", "TransientTrackBuilder"))) { + + produces>(); + +} + +ParticleNetFeatureEvaluator::~ParticleNetFeatureEvaluator() {} + +void ParticleNetFeatureEvaluator::fillDescriptions(edm::ConfigurationDescriptions &descriptions) { + // pfDeepBoostedJetTagInfos + edm::ParameterSetDescription desc; + desc.add("jet_radius", 0.8); + desc.add("min_jet_pt", 150); + desc.add("max_jet_eta", 99); + desc.add("min_jet_eta", 0.0); + desc.add("min_pt_for_track_properties", -1); + desc.add("min_pt_for_pfcandidates", -1); + desc.add("min_pt_for_losttrack", 1); + desc.add("max_dr_for_losttrack", 0.4); + desc.add("min_pt_for_taus",20.); + desc.add("max_eta_for_taus",2.5); + desc.add("use_puppiP4", false); + desc.add("include_neutrals", true); + desc.add("min_puppi_wgt", -1.); + desc.add("vertices", edm::InputTag("offlineSlimmedPrimaryVertices")); + desc.add("secondary_vertices", edm::InputTag("slimmedSecondaryVertices")); + desc.add("pf_candidates", edm::InputTag("packedPFCandidates")); + desc.add("losttracks", edm::InputTag("lostTracks")); + desc.add("jets", edm::InputTag("slimmedJetsAK8")); + desc.add("muons", edm::InputTag("slimmedMuons")); + desc.add("taus", edm::InputTag("slimmedTaus")); + desc.add("electrons", edm::InputTag("slimmedElectrons")); + desc.add("photons", edm::InputTag("slimmedPhotons")); + descriptions.add("ParticleNetFeatureEvaluator", desc); +} + +void ParticleNetFeatureEvaluator::produce(edm::Event &iEvent, const edm::EventSetup &iSetup) { + + // output collection + auto output_tag_infos = std::make_unique>(); + // Input jets + auto jets = iEvent.getHandle(jet_token_); + // Input muons + auto muons = iEvent.getHandle(muon_token_); + // Input taus + auto taus = iEvent.getHandle(tau_token_); + // Input electrons + auto electrons = iEvent.getHandle(electron_token_); + // Input photons + auto photons = iEvent.getHandle(photon_token_); + // Input lost tracks + iEvent.getByToken(losttrack_token_, losttracks_); + // Primary vertexes + iEvent.getByToken(vtx_token_, vtxs_); + if (vtxs_->empty()) { + // produce empty TagInfos in case no primary vertex + iEvent.put(std::move(output_tag_infos)); + return; // exit event + } + // Leading vertex + pv_ = &vtxs_->at(0); + // Secondary vertexs + iEvent.getByToken(sv_token_, svs_); + // PF candidates + iEvent.getByToken(pfcand_token_, pfcands_); + // Track builder + track_builder_ = iSetup.getHandle(track_builder_token_); + + // tau signal candidates + std::vector tau_pfcandidates; + for (size_t itau = 0; itau < taus->size(); itau++) { + if(taus->at(itau).pt() < min_pt_for_taus_) continue; + if(fabs(taus->at(itau).eta()) > max_eta_for_taus_) continue; + for(unsigned ipart = 0; ipart < taus->at(itau).signalCands().size(); ipart++){ + const pat::PackedCandidate* pfcand = dynamic_cast (taus->at(itau).signalCands()[ipart].get()); + tau_pfcandidates.push_back(pfcand->p4()); + } + } + + // Loop over jet + for (std::size_t jet_n = 0; jet_n < jets->size(); jet_n++) { + + const auto & jet = (*jets)[jet_n]; + edm::RefToBase jet_ref(jets, jet_n); + + // create jet features + DeepBoostedJetFeatures features; + for (const auto &name : particle_features_) + features.add(name); + for (const auto &name : sv_features_) + features.add(name); + + // fill values only if above pt threshold and has daughters, otherwise left + bool fill_vars = true; + if ((jet.pt() < min_jet_pt_ and dynamic_cast(&jet)->correctedJet("Uncorrected").pt() < min_jet_pt_) or + std::abs(jet.eta()) > max_jet_eta_ or + std::abs(jet.eta()) < min_jet_eta_ ) + fill_vars = false; + if (jet.numberOfDaughters() == 0) + fill_vars = false; + + // fill features + if (fill_vars) { + fillParticleFeatures(features, jet, tau_pfcandidates, *muons, *electrons, *photons); + fillSVFeatures(features, jet); + fillLostTrackFeatures(features, jet); + features.check_consistency(particle_features_); + features.check_consistency(sv_features_); + features.check_consistency(losttrack_features_); + } + + // this should always be done even if features are not filled + output_tag_infos->emplace_back(features, jet_ref); + + } + // move output collection + iEvent.put(std::move(output_tag_infos)); +} + +bool ParticleNetFeatureEvaluator::useTrackProperties(const pat::PackedCandidate* cand) { + const auto *track = cand->bestTrack(); + return track != nullptr and track->pt() > min_pt_for_track_properties_; +}; + +void ParticleNetFeatureEvaluator::fillParticleFeatures(DeepBoostedJetFeatures & fts, + const reco::Jet & jet, + const std::vector & tau_pfcandidates, + const pat::MuonCollection & muons, + const pat::ElectronCollection & electrons, + const pat::PhotonCollection & photons + ) { + // some jet properties + math::XYZVector jet_dir = jet.momentum().Unit(); + TVector3 jet_direction (jet.momentum().Unit().x(), jet.momentum().Unit().y(), jet.momentum().Unit().z()); + GlobalVector jet_ref_track_dir (jet.px(), jet.py(), jet.pz()); + // vertexes + reco::VertexRefProd PVRefProd(vtxs_); + // track builder + TrackInfoBuilder trackinfo (track_builder_); + + // make list of pf-candidates to be considered + std::vector daughters; + for (const auto &dau : jet.daughterPtrVector()) { + // remove particles w/ extremely low puppi weights + const pat::PackedCandidate* cand = dynamic_cast(&(*dau)); + if(not cand) + throw edm::Exception(edm::errors::InvalidReference) + << "Cannot convert to either pat::PackedCandidate"; + if(cand->puppiWeight() < min_puppi_wgt_) continue; + // base requirements on PF candidates + if (cand->pt() < min_pt_for_pfcandidates_) continue; + // charged candidate selection (for Higgs Interaction Net) + if (!include_neutrals_ and (cand->charge() == 0 or cand->pt() < min_pt_for_track_properties_)) continue; + // filling daughters + daughters.push_back(cand); + } + + // sort by Puppi-weighted pt + if (use_puppiP4_) + std::sort(daughters.begin(), daughters.end(), [&](const pat::PackedCandidate* a, const pat::PackedCandidate* b) { + return a->puppiWeight() * a->pt() > b->puppiWeight() * b->pt(); + }); + // sort by original pt (not Puppi-weighted) + else + std::sort(daughters.begin(), daughters.end(), [](const auto &a, const auto &b) { return a->pt() > b->pt();}); + + // reserve space + for (const auto &name : particle_features_) + fts.reserve(name, daughters.size()); + + // Build observables + for (const auto &cand : daughters) { + + if (!include_neutrals_ and !useTrackProperties(cand)) continue; + + // input particle is a packed PF candidate + auto candP4 = use_puppiP4_ ? cand->puppiWeight() * cand->p4() : cand->p4(); + auto candP3 = use_puppiP4_ ? cand->puppiWeight() * cand->momentum() : cand->momentum(); + + // candidate track + const reco::Track *track = nullptr; + if(useTrackProperties(cand)) + track = cand->bestTrack(); + + // reco-vertex association + reco::VertexRef pv_ass = reco::VertexRef(vtxs_, 0); + math::XYZPoint pv_ass_pos = pv_ass->position(); + + TVector3 cand_direction(candP3.x(), candP3.y(), candP3.z()); + + fts.fill("jet_pfcand_pt_log", std::isnan(std::log(candP4.pt())) ? 0 : std::log(candP4.pt())); + fts.fill("jet_pfcand_energy_log", std::isnan(std::log(candP4.energy())) ? 0 : std::log(candP4.energy())); + fts.fill("jet_pfcand_eta", candP4.eta()); + fts.fill("jet_pfcand_deta", jet_direction.Eta() - cand_direction.Eta()); + fts.fill("jet_pfcand_dphi", jet_direction.DeltaPhi(cand_direction)); + fts.fill("jet_pfcand_charge", cand->charge()); + fts.fill("jet_pfcand_etarel", std::isnan(reco::btau::etaRel(jet_dir, candP3)) ? 0 : reco::btau::etaRel(jet_dir, candP3)); + fts.fill("jet_pfcand_pperp_ratio", std::isnan(jet_direction.Perp(cand_direction) / cand_direction.Mag()) ? 0 : jet_direction.Perp(cand_direction) / cand_direction.Mag()); + fts.fill("jet_pfcand_ppara_ratio", std::isnan(jet_direction.Dot(cand_direction) / cand_direction.Mag()) ? 0 : jet_direction.Dot(cand_direction) / cand_direction.Mag()); + fts.fill("jet_pfcand_frompv", cand->fromPV()); + fts.fill("jet_pfcand_dz", std::isnan(cand->dz(pv_ass_pos)) ? 0 : cand->dz(pv_ass_pos)); + fts.fill("jet_pfcand_dxy", std::isnan(cand->dxy(pv_ass_pos)) ? 0 : cand->dxy(pv_ass_pos)); + fts.fill("jet_pfcand_puppiw", cand->puppiWeight()); + fts.fill("jet_pfcand_nlostinnerhits", cand->lostInnerHits()); + fts.fill("jet_pfcand_nhits", cand->numberOfHits()); + fts.fill("jet_pfcand_npixhits", cand->numberOfPixelHits()); + fts.fill("jet_pfcand_nstriphits", cand->stripLayersWithMeasurement()); + + if(abs(cand->pdgId()) == 11 and cand->charge() != 0) + fts.fill("jet_pfcand_id",0); + else if(abs(cand->pdgId()) == 13 and cand->charge() != 0) + fts.fill("jet_pfcand_id",1); + else if(abs(cand->pdgId()) == 22 and cand->charge() == 0) + fts.fill("jet_pfcand_id",2); + else if(abs(cand->pdgId()) != 22 and cand->charge() == 0 and abs(cand->pdgId()) != 1 and abs(cand->pdgId()) != 2) + fts.fill("jet_pfcand_id",3); + else if(abs(cand->pdgId()) != 11 and abs(cand->pdgId()) != 13 and cand->charge() != 0) + fts.fill("jet_pfcand_id",4); + else if(cand->charge() == 0 and abs(cand->pdgId()) == 1) + fts.fill("jet_pfcand_id",5); + else if(cand->charge() == 0 and abs(cand->pdgId()) == 2) + fts.fill("jet_pfcand_id",6); + else + fts.fill("jet_pfcand_id",-1); + + fts.fill("jet_pfcand_hcalfraction",std::isnan(cand->hcalFraction()) ? 0 : cand->hcalFraction()); + fts.fill("jet_pfcand_calofraction",std::isnan(cand->caloFraction()) ? 0 : cand->caloFraction()); + fts.fill("pfcand_mask", 1); + + if (track) { + fts.fill("jet_pfcand_dzsig", std::isnan(fabs(cand->dz(pv_ass_pos)) / cand->dzError()) ? 0 : fabs(cand->dz(pv_ass_pos)) / cand->dzError()); + fts.fill("jet_pfcand_dxysig", std::isnan(fabs(cand->dxy(pv_ass_pos)) / cand->dxyError()) ? 0 : fabs(cand->dxy(pv_ass_pos)) / cand->dxyError()); + fts.fill("jet_pfcand_track_chi2", track->normalizedChi2()); + fts.fill("jet_pfcand_track_qual", track->qualityMask()); + + reco::TransientTrack transientTrack = track_builder_->build(*track); + Measurement1D meas_ip2d = IPTools::signedTransverseImpactParameter(transientTrack, jet_ref_track_dir, *pv_).second; + Measurement1D meas_ip3d = IPTools::signedImpactParameter3D(transientTrack, jet_ref_track_dir, *pv_).second; + Measurement1D meas_jetdist = IPTools::jetTrackDistance(transientTrack, jet_ref_track_dir, *pv_).second; + Measurement1D meas_decayl = IPTools::signedDecayLength3D(transientTrack, jet_ref_track_dir, *pv_).second; + + fts.fill("jet_pfcand_trackjet_d3d", std::isnan(meas_ip3d.value()) ? 0 : meas_ip3d.value()); + fts.fill("jet_pfcand_trackjet_d3dsig", std::isnan(fabs(meas_ip3d.significance())) ? 0 : fabs(meas_ip3d.significance())); + fts.fill("jet_pfcand_trackjet_dist", std::isnan(-meas_jetdist.value()) ? 0 : -meas_jetdist.value()); + fts.fill("jet_pfcand_trackjet_decayL", std::isnan(meas_decayl.value()) ? 0 : meas_decayl.value()); + } + else { + fts.fill("jet_pfcand_dzsig", 0); + fts.fill("jet_pfcand_dxysig", 0); + fts.fill("jet_pfcand_track_chi2", 0); + fts.fill("jet_pfcand_track_qual", 0); + fts.fill("jet_pfcand_trackjet_d3d", 0); + fts.fill("jet_pfcand_trackjet_d3dsig", 0); + fts.fill("jet_pfcand_trackjet_dist", 0); + fts.fill("jet_pfcand_trackjet_decayL", 0); + } + + // muons specific + if(abs(cand->pdgId()) == 13){ + std::vector muonsToSkip; + int ipos = -1; + float minDR = 1000; + for (size_t i = 0; i < muons.size(); i++) { + if(not muons[i].isPFMuon()) continue; + if(std::find(muonsToSkip.begin(),muonsToSkip.end(),i) != muonsToSkip.end()) continue; + float dR = reco::deltaR(muons[i].p4(),candP4); + if(dR < jet_radius_ and dR < minDR){ + minDR = dR; + ipos = i; + muonsToSkip.push_back(i); + } + } + if(ipos >= 0){ + int muonId = 0; + if(muons[ipos].passed(reco::Muon::CutBasedIdLoose)) muonId++; + if(muons[ipos].passed(reco::Muon::CutBasedIdMedium)) muonId++; + if(muons[ipos].passed(reco::Muon::CutBasedIdTight)) muonId++; + if(muons[ipos].passed(reco::Muon::CutBasedIdGlobalHighPt)) muonId++; + if(muons[ipos].passed(reco::Muon::CutBasedIdTrkHighPt)) muonId++; + fts.fill("jet_pfcand_muon_id",muonId); + fts.fill("jet_pfcand_muon_isglobal",muons[ipos].isGlobalMuon()); + fts.fill("jet_pfcand_muon_chi2",(muons[ipos].isGlobalMuon()) ? muons[ipos].globalTrack()->normalizedChi2(): 0); + fts.fill("jet_pfcand_muon_nvalidhit",(muons[ipos].isGlobalMuon()) ? muons[ipos].globalTrack()->hitPattern().numberOfValidMuonHits() : 0); + fts.fill("jet_pfcand_muon_nstation",muons[ipos].numberOfMatchedStations()); + fts.fill("jet_pfcand_muon_segcomp",muon::segmentCompatibility(muons[ipos])); + } + else{ + fts.fill("jet_pfcand_muon_id",0); + fts.fill("jet_pfcand_muon_isglobal",0); + fts.fill("jet_pfcand_muon_chi2",0); + fts.fill("jet_pfcand_muon_nvalidhit",0); + fts.fill("jet_pfcand_muon_nstation",0); + fts.fill("jet_pfcand_muon_segcomp",0); + } + } + else{ + fts.fill("jet_pfcand_muon_id",0); + fts.fill("jet_pfcand_muon_isglobal",0); + fts.fill("jet_pfcand_muon_chi2",0); + fts.fill("jet_pfcand_muon_nvalidhit",0); + fts.fill("jet_pfcand_muon_nstation",0); + fts.fill("jet_pfcand_muon_segcomp",0); + } + + // electrons specific + if(abs(cand->pdgId()) == 11){ + int ipos = -1; + for (size_t i = 0; i < electrons.size(); i++) { + if(electrons[i].isPF()){ + for(const auto & element : electrons[i].associatedPackedPFCandidates()){ + if(abs(element->pdgId()) == 11 and element->p4() == candP4) + ipos = i; + } + } + } + if(ipos >= 0){ + fts.fill("jet_pfcand_electron_detaIn",std::isnan(electrons[ipos].deltaEtaSuperClusterTrackAtVtx()) ? 0 : electrons[ipos].deltaEtaSuperClusterTrackAtVtx()); + fts.fill("jet_pfcand_electron_dphiIn",std::isnan(electrons[ipos].deltaPhiSuperClusterTrackAtVtx()) ? 0 : electrons[ipos].deltaPhiSuperClusterTrackAtVtx()); + fts.fill("jet_pfcand_electron_sigIetaIeta",std::isnan(electrons[ipos].full5x5_sigmaIetaIeta()) ? 0 : electrons[ipos].full5x5_sigmaIetaIeta()); + fts.fill("jet_pfcand_electron_sigIphiIphi",std::isnan(electrons[ipos].full5x5_sigmaIphiIphi()) ? 0 : electrons[ipos].full5x5_sigmaIphiIphi()); + fts.fill("jet_pfcand_electron_r9",std::isnan(electrons[ipos].full5x5_r9()) ? 0 : electrons[ipos].full5x5_r9()); + fts.fill("jet_pfcand_electron_convProb",std::isnan(electrons[ipos].convVtxFitProb()) ? 0 : electrons[ipos].convVtxFitProb()); + } + else{ + fts.fill("jet_pfcand_electron_detaIn",0); + fts.fill("jet_pfcand_electron_dphiIn",0); + fts.fill("jet_pfcand_electron_sigIetaIeta",0); + fts.fill("jet_pfcand_electron_sigIphiIphi",0); + fts.fill("jet_pfcand_electron_r9",0); + fts.fill("jet_pfcand_electron_convProb",0); + } + } + else{ + fts.fill("jet_pfcand_electron_detaIn",0); + fts.fill("jet_pfcand_electron_dphiIn",0); + fts.fill("jet_pfcand_electron_sigIetaIeta",0); + fts.fill("jet_pfcand_electron_sigIphiIphi",0); + fts.fill("jet_pfcand_electron_r9",0); + fts.fill("jet_pfcand_electron_convProb",0); + } + + // photons specific + if(abs(cand->pdgId()) == 22){ + int ipos = -1; + for (size_t i = 0; i < photons.size(); i++) { + for(const auto & element : photons[i].associatedPackedPFCandidates()){ + if(abs(element->pdgId()) == 22 and element->p4() == candP4) + ipos = i; + } + } + if(ipos >= 0){ + fts.fill("jet_pfcand_photon_sigIetaIeta",std::isnan(photons[ipos].full5x5_sigmaIetaIeta()) ? 0 : photons[ipos].full5x5_sigmaIetaIeta()); + fts.fill("jet_pfcand_photon_r9",std::isnan(photons[ipos].full5x5_r9()) ? 0 : photons[ipos].full5x5_r9()); + fts.fill("jet_pfcand_photon_eVeto",photons[ipos].passElectronVeto()); + } + else{ + fts.fill("jet_pfcand_photon_sigIetaIeta",0); + fts.fill("jet_pfcand_photon_r9",0); + fts.fill("jet_pfcand_photon_eVeto",0); + } + } + else{ + fts.fill("jet_pfcand_photon_sigIetaIeta",0); + fts.fill("jet_pfcand_photon_r9",0); + fts.fill("jet_pfcand_photon_eVeto",0); + } + + // tau specific prior to any puppi weight application + if(std::find(tau_pfcandidates.begin(),tau_pfcandidates.end(),cand->p4()) != tau_pfcandidates.end()) + fts.fill("jet_pfcand_tau_signal",1); + else + fts.fill("jet_pfcand_tau_signal",0); + + } +} + +void ParticleNetFeatureEvaluator::fillSVFeatures(DeepBoostedJetFeatures &fts, + const reco::Jet & jet) { + + // secondary vertexes matching jet + std::vector jetSVs; + for (const auto &sv : *svs_) { + if (reco::deltaR2(sv, jet) < jet_radius_ * jet_radius_) { + jetSVs.push_back(&sv); + } + } + + // sort by dxy significance + std::sort(jetSVs.begin(), + jetSVs.end(), + [&](const reco::VertexCompositePtrCandidate *sva, + const reco::VertexCompositePtrCandidate *svb) { + return sv_vertex_comparator(*sva, *svb, *pv_); + }); + + // reserve space + for (const auto &name : sv_features_) + fts.reserve(name, jetSVs.size()); + + GlobalVector jet_global_vec(jet.px(), jet.py(), jet.pz()); + + for (const auto *sv : jetSVs) { + fts.fill("sv_mask", 1); + fts.fill("jet_sv_pt_log", std::isnan(std::log(sv->pt())) ? 0 : std::log(sv->pt())); + fts.fill("jet_sv_eta", sv->eta()); + fts.fill("jet_sv_mass", sv->mass()); + fts.fill("jet_sv_deta", sv->eta() - jet.eta()); + fts.fill("jet_sv_dphi", sv->phi() - jet.phi()); + fts.fill("jet_sv_ntrack", sv->numberOfDaughters()); + fts.fill("jet_sv_chi2", sv->vertexNormalizedChi2()); + + reco::Vertex::CovarianceMatrix csv; + sv->fillVertexCovariance(csv); + reco::Vertex svtx(sv->vertex(), csv); + + VertexDistanceXY dxy; + auto valxy = dxy.signedDistance(svtx, *pv_, jet_global_vec); + fts.fill("jet_sv_dxy", std::isnan(valxy.value()) ? 0 : valxy.value()); + fts.fill("jet_sv_dxysig", std::isnan(fabs(valxy.significance())) ? 0 : fabs(valxy.significance())); + + VertexDistance3D d3d; + auto val3d = d3d.signedDistance(svtx, *pv_, jet_global_vec); + fts.fill("jet_sv_d3d", std::isnan(val3d.value()) ? 0 : val3d.value()); + fts.fill("jet_sv_d3dsig", std::isnan(fabs(val3d.significance())) ? 0 : fabs(val3d.significance())); + + } +} + +void ParticleNetFeatureEvaluator::fillLostTrackFeatures(DeepBoostedJetFeatures &fts, + const reco::Jet & jet + ) { + + // some jet properties + TVector3 jet_direction (jet.momentum().Unit().x(), jet.momentum().Unit().y(), jet.momentum().Unit().z()); + GlobalVector jet_ref_track_dir (jet.px(), jet.py(), jet.pz()); + math::XYZVector jet_dir = jet.momentum().Unit(); + + std::vector jet_lost_tracks; + for(size_t itrk = 0; itrk < losttracks_->size(); itrk++){ + if(reco::deltaR(losttracks_->at(itrk).p4(),jet.p4()) < max_dr_for_losttrack_ and + losttracks_->at(itrk).pt() > min_pt_for_losttrack_ ){ + jet_lost_tracks.push_back(losttracks_->at(itrk)); + } + } + std::sort(jet_lost_tracks.begin(), jet_lost_tracks.end(), [](const auto &a, const auto &b) { return a.pt() > b.pt();}); + + // reserve space + for (const auto &name : losttrack_features_) + fts.reserve(name, jet_lost_tracks.size()); + + reco::VertexRef pv_ass = reco::VertexRef(vtxs_, 0); + math::XYZPoint pv_ass_pos = pv_ass->position(); + + for(auto const & ltrack : jet_lost_tracks){ + + fts.fill("jet_losttrack_pt_log",std::isnan(std::log(ltrack.pt())) ? 0 : std::log(ltrack.pt())); + fts.fill("jet_losttrack_eta",ltrack.eta()); + fts.fill("jet_losttrack_charge",ltrack.charge()); + fts.fill("jet_losttrack_frompv",ltrack.fromPV()); + fts.fill("jet_losttrack_dz",std::isnan(ltrack.dz(pv_ass_pos)) ? 0 : ltrack.dz(pv_ass_pos)); + fts.fill("jet_losttrack_dxy",std::isnan(ltrack.dxy(pv_ass_pos)) ? 0 : ltrack.dxy(pv_ass_pos)); + fts.fill("jet_losttrack_npixhits",ltrack.numberOfPixelHits()); + fts.fill("jet_losttrack_nstriphits",ltrack.stripLayersWithMeasurement()); + + TVector3 ltrack_momentum (ltrack.momentum().x(),ltrack.momentum().y(),ltrack.momentum().z()); + fts.fill("jet_losttrack_deta",jet_direction.Eta()-ltrack_momentum.Eta()); + fts.fill("jet_losttrack_dphi",jet_direction.DeltaPhi(ltrack_momentum)); + fts.fill("jet_losttrack_etarel",std::isnan(reco::btau::etaRel(jet_dir,ltrack.momentum())) ? 0 : reco::btau::etaRel(jet_dir,ltrack.momentum())); + + const reco::Track* track = ltrack.bestTrack(); + if(track){ + fts.fill("jet_losttrack_track_chi2",track->normalizedChi2()); + fts.fill("jet_losttrack_track_qual",track->qualityMask()); + fts.fill("jet_losttrack_dxysig",std::isnan(fabs(ltrack.dxy(pv_ass_pos))/ltrack.dxyError()) ? 0 : fabs(ltrack.dxy(pv_ass_pos))/ltrack.dxyError()); + fts.fill("jet_losttrack_dzsig",std::isnan(fabs(ltrack.dz(pv_ass_pos))/ltrack.dzError()) ? 0 : fabs(ltrack.dz(pv_ass_pos))/ltrack.dzError()); + + reco::TransientTrack transientTrack = track_builder_->build(*track); + Measurement1D meas_ip3d = IPTools::signedImpactParameter3D(transientTrack, jet_ref_track_dir, *pv_).second; + Measurement1D meas_jetdist = IPTools::jetTrackDistance(transientTrack, jet_ref_track_dir, *pv_).second; + Measurement1D meas_decayl = IPTools::signedDecayLength3D(transientTrack, jet_ref_track_dir, *pv_).second; + + fts.fill("jet_losttrack_trackjet_d3d", std::isnan(meas_ip3d.value()) ? 0 : meas_ip3d.value()); + fts.fill("jet_losttrack_trackjet_d3dsig", std::isnan(fabs(meas_ip3d.significance())) ? 0 : fabs(meas_ip3d.significance())); + fts.fill("jet_losttrack_trackjet_dist", std::isnan(-meas_jetdist.value()) ? 0 : -meas_jetdist.value()); + fts.fill("jet_losttrack_trackjet_decayL", std::isnan(meas_decayl.value()) ? 0 : meas_decayl.value()); + } + else{ + fts.fill("jet_losttrack_track_chi2",0); + fts.fill("jet_losttrack_track_qual",0); + fts.fill("jet_losttrack_dxysig",0); + fts.fill("jet_losttrack_dzsig",0); + fts.fill("jet_losttrack_trackjet_d3d", 0); + fts.fill("jet_losttrack_trackjet_d3dsig", 0); + fts.fill("jet_losttrack_trackjet_dist", 0); + fts.fill("jet_losttrack_trackjet_decayL", 0); + } + + fts.fill("lt_mask",1); + + } +} + +// define this as a plug-in +DEFINE_FWK_MODULE(ParticleNetFeatureEvaluator); + diff --git a/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4_cff.py b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4_cff.py new file mode 100644 index 0000000000000..f185d5846b648 --- /dev/null +++ b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4_cff.py @@ -0,0 +1,82 @@ +import FWCore.ParameterSet.Config as cms + +from RecoBTag.FeatureTools.pfDeepBoostedJetTagInfos_cfi import pfDeepBoostedJetTagInfos +from RecoBTag.ONNXRuntime.boostedJetONNXJetTagsProducer_cfi import boostedJetONNXJetTagsProducer +#from RecoBTag.ONNXRuntime.pfParticleNetAK4DiscriminatorsJetTags_cfi import pfParticleNetAK4DiscriminatorsJetTags +from RecoBTag.FeatureTools.ParticleNetFeatureEvaluator_cfi import ParticleNetFeatureEvaluator + +pfParticleNetFromMiniAODAK4CHSCentralTagInfos = ParticleNetFeatureEvaluator.clone( + jets = "slimmedJets", + jet_radius = 0.4, + min_jet_pt = 15, + min_jet_eta = 0., + max_jet_eta = 2.5, +) + +pfParticleNetFromMiniAODAK4CHSForwardTagInfos = ParticleNetFeatureEvaluator.clone( + jets = "slimmedJets", + jet_radius = 0.4, + min_jet_pt = 15, + min_jet_eta = 2.5, + max_jet_eta = 4.7, +) + +pfParticleNetFromMiniAODAK4PuppiCentralTagInfos = ParticleNetFeatureEvaluator.clone( + jets = "slimmedJetsPuppi", + jet_radius = 0.4, + min_jet_pt = 15, + min_jet_eta = 0., + max_jet_eta = 2.5, +) + +pfParticleNetFromMiniAODAK4PuppiForwardTagInfos = ParticleNetFeatureEvaluator.clone( + jets = "slimmedJetsPuppi", + jet_radius = 0.4, + min_jet_pt = 15, + min_jet_eta = 2.5, + max_jet_eta = 4.7, +) + + +pfParticleNetFromMiniAODAK4CHSCentralJetTags = boostedJetONNXJetTagsProducer.clone( + src = 'pfParticleNetFromMiniAODAK4CHSCentralTagInfos', + preprocess_json = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/CHS/Central/preprocess.json', + model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/CHS/Central/modelfile/model.onnx', + flav_names = ['probmu','probele','probtaup1h0p','probtaup1h1p','probtaup1h2p','probtaup3h0p','probtaup3h1p','probtaum1h0p','probtaum1h1p','probtaum1h2p','probtaum3h0p','probtaum3h1p','probb','probc','probuds','probg','ptcorr','ptreshigh','ptreslow','ptnu'], +) + +pfParticleNetFromMiniAODAK4CHSForwardJetTags = boostedJetONNXJetTagsProducer.clone( + src = 'pfParticleNetFromMiniAODAK4CHSForwardTagInfos', + preprocess_json = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/CHS/Forward/preprocess.json', + model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/CHS/Forward/modelfile/model.onnx', + flav_names = ['probq','probg','ptcorr','ptreshigh','ptreslow','ptnu'], +) + +pfParticleNetFromMiniAODAK4PuppiCentralJetTags = boostedJetONNXJetTagsProducer.clone( + src = 'pfParticleNetFromMiniAODAK4PuppiCentralTagInfos', + preprocess_json = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/PUPPI/Central/preprocess.json', + model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/PUPPI/Central/modelfile/model.onnx', + flav_names = ['probmu','probele','probtaup1h0p','probtaup1h1p','probtaup1h2p','probtaup3h0p','probtaup3h1p','probtaum1h0p','probtaum1h1p','probtaum1h2p','probtaum3h0p','probtaum3h1p','probb','probc','probuds','probg','ptcorr','ptreshigh','ptreslow','ptnu'], +) + +pfParticleNetFromMiniAODAK4PuppiForwardJetTags = boostedJetONNXJetTagsProducer.clone( + src = 'pfParticleNetFromMiniAODAK4PuppiForwardTagInfos', + preprocess_json = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/PUPPI/Forward/preprocess.json', + model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/PUPPI/Forward/modelfile/model.onnx', + flav_names = ['probq','probg','ptcorr','ptreshigh','ptreslow','ptnu'], +) + +pfParticleNetFromMiniAODAK4CHSTask = cms.Task( pfParticleNetFromMiniAODAK4CHSCentralTagInfos, pfParticleNetFromMiniAODAK4CHSForwardTagInfos, pfParticleNetFromMiniAODAK4CHSCentralJetTags, pfParticleNetFromMiniAODAK4CHSForwardJetTags) +pfParticleNetFromMiniAODAK4PuppiTask = cms.Task( pfParticleNetFromMiniAODAK4PuppiCentralTagInfos, pfParticleNetFromMiniAODAK4PuppiForwardTagInfos, pfParticleNetFromMiniAODAK4PuppiCentralJetTags, pfParticleNetFromMiniAODAK4PuppiForwardJetTags) + +# declare all the discriminators +# probs +_pfParticleNetFromMiniAODAK4CHSCentralJetTagsProbs = ['pfParticleNetFromMiniAODAK4CHSCentralJetTags:' + flav_name + for flav_name in pfParticleNetFromMiniAODAK4CHSCentralJetTags.flav_names] +_pfParticleNetFromMiniAODAK4CHSForwardJetTagsProbs = ['pfParticleNetFromMiniAODAK4CHSForwardJetTags:' + flav_name + for flav_name in pfParticleNetFromMiniAODAK4CHSForwardJetTags.flav_names] +_pfParticleNetFromMiniAODAK4PuppiCentralJetTagsProbs = ['pfParticleNetFromMiniAODAK4PuppiCentralJetTags:' + flav_name + for flav_name in pfParticleNetFromMiniAODAK4PuppiCentralJetTags.flav_names] +_pfParticleNetFromMiniAODAK4PuppiForwardJetTagsProbs = ['pfParticleNetFromMiniAODAK4PuppiForwardJetTags:' + flav_name + for flav_name in pfParticleNetFromMiniAODAK4PuppiForwardJetTags.flav_names] + diff --git a/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAOD_cff.py b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAOD_cff.py new file mode 100644 index 0000000000000..b16b438370b4d --- /dev/null +++ b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAOD_cff.py @@ -0,0 +1,31 @@ +import FWCore.ParameterSet.Config as cms + +from RecoBTag.FeatureTools.pfDeepBoostedJetTagInfos_cfi import pfDeepBoostedJetTagInfos +from RecoBTag.ONNXRuntime.boostedJetONNXJetTagsProducer_cfi import boostedJetONNXJetTagsProducer +#from RecoBTag.ONNXRuntime.pfParticleNetAK4DiscriminatorsJetTags_cfi import pfParticleNetAK4DiscriminatorsJetTags +from RecoBTag.FeatureTools.ParticleNetFeatureEvaluator_cfi import ParticleNetFeatureEvaluator + +pfParticleNetFromMiniAODAK8TagInfos = ParticleNetFeatureEvaluator.clone( + jets = "slimmedJetsAK8", + jet_radius = 0.8, + min_jet_pt = 200, + min_jet_eta = 0., + max_jet_eta = 2.5, + min_pt_for_track_properties = 0.95, +) + + +pfParticleNetFromMiniAODAK8JetTags = boostedJetONNXJetTagsProducer.clone( + src = 'pfParticleNetFromMiniAODAK8TagInfos', + preprocess_json = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK8/preprocess.json', + model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK8/modelfile/model.onnx', + flav_names = ['probHtt','probHtm','probHte','probHbb', 'probHcc', 'probHqq', 'probHgg','probQCD2hf','probQCD1hf','probQCD0hf','masscorr'], +) + + +pfParticleNetFromMiniAODAK8Task = cms.Task( pfParticleNetFromMiniAODAK8TagInfos, pfParticleNetFromMiniAODAK8JetTags) + +# declare all the discriminators +# probs +_pfParticleNetFromMiniAODAK8JetTagsProbs = ['pfParticleNetFromMiniAODAK8JetTags:' + flav_name + for flav_name in pfParticleNetFromMiniAODAK8JetTags.flav_names] From 30c3043f16335d562493946d1f04316988e39a0e Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Fri, 10 Feb 2023 14:40:25 +0100 Subject: [PATCH 005/233] a few fixes after runtime testing --- .../ONNXRuntime/python/pfParticleNetFromMiniAODAK4_cff.py | 8 ++++---- ...mMiniAOD_cff.py => pfParticleNetFromMiniAODAK8_cff.py} | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) rename RecoBTag/ONNXRuntime/python/{pfParticleNetFromMiniAOD_cff.py => pfParticleNetFromMiniAODAK8_cff.py} (94%) diff --git a/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4_cff.py b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4_cff.py index f185d5846b648..20eb27475db6b 100644 --- a/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4_cff.py +++ b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4_cff.py @@ -41,28 +41,28 @@ pfParticleNetFromMiniAODAK4CHSCentralJetTags = boostedJetONNXJetTagsProducer.clone( src = 'pfParticleNetFromMiniAODAK4CHSCentralTagInfos', preprocess_json = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/CHS/Central/preprocess.json', - model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/CHS/Central/modelfile/model.onnx', + model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/CHS/Central/particle-net.onnx', flav_names = ['probmu','probele','probtaup1h0p','probtaup1h1p','probtaup1h2p','probtaup3h0p','probtaup3h1p','probtaum1h0p','probtaum1h1p','probtaum1h2p','probtaum3h0p','probtaum3h1p','probb','probc','probuds','probg','ptcorr','ptreshigh','ptreslow','ptnu'], ) pfParticleNetFromMiniAODAK4CHSForwardJetTags = boostedJetONNXJetTagsProducer.clone( src = 'pfParticleNetFromMiniAODAK4CHSForwardTagInfos', preprocess_json = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/CHS/Forward/preprocess.json', - model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/CHS/Forward/modelfile/model.onnx', + model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/CHS/Forward/particle-net.onnx', flav_names = ['probq','probg','ptcorr','ptreshigh','ptreslow','ptnu'], ) pfParticleNetFromMiniAODAK4PuppiCentralJetTags = boostedJetONNXJetTagsProducer.clone( src = 'pfParticleNetFromMiniAODAK4PuppiCentralTagInfos', preprocess_json = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/PUPPI/Central/preprocess.json', - model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/PUPPI/Central/modelfile/model.onnx', + model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/PUPPI/Central/particle-net.onnx', flav_names = ['probmu','probele','probtaup1h0p','probtaup1h1p','probtaup1h2p','probtaup3h0p','probtaup3h1p','probtaum1h0p','probtaum1h1p','probtaum1h2p','probtaum3h0p','probtaum3h1p','probb','probc','probuds','probg','ptcorr','ptreshigh','ptreslow','ptnu'], ) pfParticleNetFromMiniAODAK4PuppiForwardJetTags = boostedJetONNXJetTagsProducer.clone( src = 'pfParticleNetFromMiniAODAK4PuppiForwardTagInfos', preprocess_json = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/PUPPI/Forward/preprocess.json', - model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/PUPPI/Forward/modelfile/model.onnx', + model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/PUPPI/Forward/particle-net.onnx', flav_names = ['probq','probg','ptcorr','ptreshigh','ptreslow','ptnu'], ) diff --git a/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAOD_cff.py b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK8_cff.py similarity index 94% rename from RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAOD_cff.py rename to RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK8_cff.py index b16b438370b4d..2a7708eccc615 100644 --- a/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAOD_cff.py +++ b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK8_cff.py @@ -8,17 +8,16 @@ pfParticleNetFromMiniAODAK8TagInfos = ParticleNetFeatureEvaluator.clone( jets = "slimmedJetsAK8", jet_radius = 0.8, - min_jet_pt = 200, + min_jet_pt = 180, min_jet_eta = 0., max_jet_eta = 2.5, - min_pt_for_track_properties = 0.95, ) pfParticleNetFromMiniAODAK8JetTags = boostedJetONNXJetTagsProducer.clone( src = 'pfParticleNetFromMiniAODAK8TagInfos', preprocess_json = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK8/preprocess.json', - model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK8/modelfile/model.onnx', + model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK8/particle-net.onnx', flav_names = ['probHtt','probHtm','probHte','probHbb', 'probHcc', 'probHqq', 'probHgg','probQCD2hf','probQCD1hf','probQCD0hf','masscorr'], ) From 419dc21225a9ee70db9f8363b53152cf1e0b8282 Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Fri, 10 Feb 2023 14:42:21 +0100 Subject: [PATCH 006/233] remove commented line --- RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4_cff.py | 1 - RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK8_cff.py | 1 - 2 files changed, 2 deletions(-) diff --git a/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4_cff.py b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4_cff.py index 20eb27475db6b..b3ea9b90caff9 100644 --- a/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4_cff.py +++ b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4_cff.py @@ -2,7 +2,6 @@ from RecoBTag.FeatureTools.pfDeepBoostedJetTagInfos_cfi import pfDeepBoostedJetTagInfos from RecoBTag.ONNXRuntime.boostedJetONNXJetTagsProducer_cfi import boostedJetONNXJetTagsProducer -#from RecoBTag.ONNXRuntime.pfParticleNetAK4DiscriminatorsJetTags_cfi import pfParticleNetAK4DiscriminatorsJetTags from RecoBTag.FeatureTools.ParticleNetFeatureEvaluator_cfi import ParticleNetFeatureEvaluator pfParticleNetFromMiniAODAK4CHSCentralTagInfos = ParticleNetFeatureEvaluator.clone( diff --git a/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK8_cff.py b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK8_cff.py index 2a7708eccc615..045c6962c5534 100644 --- a/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK8_cff.py +++ b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK8_cff.py @@ -2,7 +2,6 @@ from RecoBTag.FeatureTools.pfDeepBoostedJetTagInfos_cfi import pfDeepBoostedJetTagInfos from RecoBTag.ONNXRuntime.boostedJetONNXJetTagsProducer_cfi import boostedJetONNXJetTagsProducer -#from RecoBTag.ONNXRuntime.pfParticleNetAK4DiscriminatorsJetTags_cfi import pfParticleNetAK4DiscriminatorsJetTags from RecoBTag.FeatureTools.ParticleNetFeatureEvaluator_cfi import ParticleNetFeatureEvaluator pfParticleNetFromMiniAODAK8TagInfos = ParticleNetFeatureEvaluator.clone( From 9d1f43912757bd8560bf043788165d62a0bab794 Mon Sep 17 00:00:00 2001 From: Nurfikri Norjoharuddeen Date: Mon, 6 Feb 2023 13:25:05 +0100 Subject: [PATCH 007/233] Retrieve puppi weights from ValueMap even with MiniAOD input --- .../interface/ChargedCandidateConverter.h | 1 + .../interface/NeutralCandidateConverter.h | 1 + .../plugins/DeepDoubleXTagInfoProducer.cc | 56 ++++++++++++++++++- .../plugins/DeepFlavourTagInfoProducer.cc | 33 ++++++++--- .../src/ChargedCandidateConverter.cc | 3 +- .../src/NeutralCandidateConverter.cc | 3 +- 6 files changed, 85 insertions(+), 12 deletions(-) diff --git a/RecoBTag/FeatureTools/interface/ChargedCandidateConverter.h b/RecoBTag/FeatureTools/interface/ChargedCandidateConverter.h index 6ea872004da65..efcd49d4d9111 100644 --- a/RecoBTag/FeatureTools/interface/ChargedCandidateConverter.h +++ b/RecoBTag/FeatureTools/interface/ChargedCandidateConverter.h @@ -61,6 +61,7 @@ namespace btagbtvdeep { const TrackInfoBuilder& track_info, const float drminpfcandsv, const float jetR, + const float puppiw, ChargedCandidateFeatures& c_pf_features, const bool flip = false); diff --git a/RecoBTag/FeatureTools/interface/NeutralCandidateConverter.h b/RecoBTag/FeatureTools/interface/NeutralCandidateConverter.h index 6af3e44fc7de3..c23d992e25df1 100644 --- a/RecoBTag/FeatureTools/interface/NeutralCandidateConverter.h +++ b/RecoBTag/FeatureTools/interface/NeutralCandidateConverter.h @@ -15,6 +15,7 @@ namespace btagbtvdeep { const pat::Jet& jet, const float drminpfcandsv, const float jetR, + const float puppiw, NeutralCandidateFeatures& n_pf_features); void recoCandidateToFeatures(const reco::PFCandidate* n_pf, diff --git a/RecoBTag/FeatureTools/plugins/DeepDoubleXTagInfoProducer.cc b/RecoBTag/FeatureTools/plugins/DeepDoubleXTagInfoProducer.cc index afe0819c10857..7f2cbc2e9ea28 100644 --- a/RecoBTag/FeatureTools/plugins/DeepDoubleXTagInfoProducer.cc +++ b/RecoBTag/FeatureTools/plugins/DeepDoubleXTagInfoProducer.cc @@ -61,7 +61,11 @@ class DeepDoubleXTagInfoProducer : public edm::stream::EDProducer<> { edm::EDGetTokenT vtx_token_; edm::EDGetTokenT sv_token_; edm::EDGetTokenT shallow_tag_info_token_; + edm::EDGetTokenT> puppi_value_map_token_; edm::ESGetToken track_builder_token_; + + bool use_puppi_value_map_; + bool fallback_puppi_weight_; }; DeepDoubleXTagInfoProducer::DeepDoubleXTagInfoProducer(const edm::ParameterSet& iConfig) @@ -74,8 +78,17 @@ DeepDoubleXTagInfoProducer::DeepDoubleXTagInfoProducer(const edm::ParameterSet& shallow_tag_info_token_( consumes(iConfig.getParameter("shallow_tag_infos"))), track_builder_token_( - esConsumes(edm::ESInputTag("", "TransientTrackBuilder"))) { + esConsumes(edm::ESInputTag("", "TransientTrackBuilder"))), + use_puppi_value_map_(false), + fallback_puppi_weight_(iConfig.getParameter("fallback_puppi_weight")) + { produces(); + + const auto& puppi_value_map_tag = iConfig.getParameter("puppi_value_map"); + if (!puppi_value_map_tag.label().empty()) { + puppi_value_map_token_ = consumes>(puppi_value_map_tag); + use_puppi_value_map_ = true; + } } DeepDoubleXTagInfoProducer::~DeepDoubleXTagInfoProducer() {} @@ -88,8 +101,10 @@ void DeepDoubleXTagInfoProducer::fillDescriptions(edm::ConfigurationDescriptions desc.add("min_jet_pt", 150); desc.add("min_candidate_pt", 0.95); desc.add("vertices", edm::InputTag("offlinePrimaryVertices")); + desc.add("puppi_value_map", edm::InputTag("puppi")); desc.add("secondary_vertices", edm::InputTag("inclusiveCandidateSecondaryVertices")); desc.add("jets", edm::InputTag("ak8PFJetsPuppi")); + desc.add("fallback_puppi_weight", false); descriptions.add("pfDeepDoubleXTagInfos", desc); } @@ -115,6 +130,11 @@ void DeepDoubleXTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSet edm::Handle shallow_tag_infos; iEvent.getByToken(shallow_tag_info_token_, shallow_tag_infos); + edm::Handle> puppi_value_map; + if (use_puppi_value_map_) { + iEvent.getByToken(puppi_value_map_token_, puppi_value_map); + } + edm::ESHandle track_builder = iSetup.getHandle(track_builder_token_); for (std::size_t jet_n = 0; jet_n < jets->size(); jet_n++) { @@ -123,6 +143,7 @@ void DeepDoubleXTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSet // reco jet reference (use as much as possible) const auto& jet = jets->at(jet_n); + const auto* pf_jet = dynamic_cast(&jet); const auto* pat_jet = dynamic_cast(&jet); if (!pat_jet) throw edm::Exception(edm::errors::InvalidReference) << "Input is not a pat::Jet."; @@ -262,7 +283,36 @@ void DeepDoubleXTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSet auto packed_cand = dynamic_cast(cand); auto reco_cand = dynamic_cast(cand); + reco::PFCandidatePtr reco_ptr; + if (pf_jet) { + reco_ptr = pf_jet->getPFConstituent(i); + } + + reco::CandidatePtr cand_ptr; + if (pat_jet){ + cand_ptr = pat_jet->sourceCandidatePtr(i); + } + float puppiw = 1.0; // fallback value + if (reco_cand) { + puppiw = 1.0; // fallback value for reco_cand + if (use_puppi_value_map_) + puppiw = (*puppi_value_map)[reco_ptr]; + else if (!fallback_puppi_weight_) { + throw edm::Exception(edm::errors::InvalidReference, "PUPPI value map missing") + << "use fallback_puppi_weight option to use " << puppiw << " for reco_cand as default"; + } + } + else if(packed_cand){ + puppiw = packed_cand->puppiWeight(); // fallback value for packed_cand + if (use_puppi_value_map_) + puppiw = (*puppi_value_map)[cand_ptr]; + else if (!fallback_puppi_weight_) { + throw edm::Exception(edm::errors::InvalidReference, "PUPPI value map missing") + << "use fallback_puppi_weight option to use puppiWeight() for packed_cand as default"; + } + } + float drminpfcandsv = btagbtvdeep::mindrsvpfcand(svs_unsorted, cand, jet_radius_); if (cand->charge() != 0) { @@ -274,7 +324,7 @@ void DeepDoubleXTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSet auto& c_pf_features = features.c_pf_features.at(entry); if (packed_cand) { btagbtvdeep::packedCandidateToFeatures( - packed_cand, *pat_jet, trackinfo, drminpfcandsv, static_cast(jet_radius_), c_pf_features); + packed_cand, *pat_jet, trackinfo, drminpfcandsv, static_cast(jet_radius_), puppiw, c_pf_features); } else if (reco_cand) { // get vertex association quality int pv_ass_quality = 0; // fallback value @@ -309,7 +359,7 @@ void DeepDoubleXTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSet // // fill feature structure if (packed_cand) { btagbtvdeep::packedCandidateToFeatures( - packed_cand, *pat_jet, drminpfcandsv, static_cast(jet_radius_), n_pf_features); + packed_cand, *pat_jet, drminpfcandsv, static_cast(jet_radius_), puppiw, n_pf_features); } else if (reco_cand) { btagbtvdeep::recoCandidateToFeatures( reco_cand, jet, drminpfcandsv, static_cast(jet_radius_), puppiw, n_pf_features); diff --git a/RecoBTag/FeatureTools/plugins/DeepFlavourTagInfoProducer.cc b/RecoBTag/FeatureTools/plugins/DeepFlavourTagInfoProducer.cc index 08a53fa3fbee1..c0a5a2f1f4f6d 100644 --- a/RecoBTag/FeatureTools/plugins/DeepFlavourTagInfoProducer.cc +++ b/RecoBTag/FeatureTools/plugins/DeepFlavourTagInfoProducer.cc @@ -363,13 +363,32 @@ void DeepFlavourTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSet } else if (pat_jet && reco_cand) { reco_ptr = pat_jet->getPFConstituent(i); } + + reco::CandidatePtr cand_ptr; + if (pat_jet){ + cand_ptr = pat_jet->sourceCandidatePtr(i); + } + // get PUPPI weight from value map float puppiw = 1.0; // fallback value - if (reco_cand && use_puppi_value_map_) { - puppiw = (*puppi_value_map)[reco_ptr]; - } else if (reco_cand && !fallback_puppi_weight_) { - throw edm::Exception(edm::errors::InvalidReference, "PUPPI value map missing") - << "use fallback_puppi_weight option to use " << puppiw << "as default"; + + if (reco_cand) { + puppiw = 1.0; // fallback value for reco_cand + if (use_puppi_value_map_) + puppiw = (*puppi_value_map)[reco_ptr]; + else if (!fallback_puppi_weight_) { + throw edm::Exception(edm::errors::InvalidReference, "PUPPI value map missing") + << "use fallback_puppi_weight option to use " << puppiw << " for reco_cand as default"; + } + } + else if(packed_cand){ + puppiw = packed_cand->puppiWeight(); // fallback value for packed_cand + if (use_puppi_value_map_) + puppiw = (*puppi_value_map)[cand_ptr]; + else if (!fallback_puppi_weight_) { + throw edm::Exception(edm::errors::InvalidReference, "PUPPI value map missing") + << "use fallback_puppi_weight option to use puppiWeight() for packed_cand as default"; + } } float drminpfcandsv = btagbtvdeep::mindrsvpfcand(svs_unsorted, cand); @@ -387,7 +406,7 @@ void DeepFlavourTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSet // fill feature structure if (packed_cand) { btagbtvdeep::packedCandidateToFeatures( - packed_cand, jet, trackinfo, drminpfcandsv, static_cast(jet_radius_), c_pf_features, flip_); + packed_cand, jet, trackinfo, drminpfcandsv, static_cast(jet_radius_), puppiw, c_pf_features, flip_); } else if (reco_cand) { // get vertex association quality int pv_ass_quality = 0; // fallback value @@ -435,7 +454,7 @@ void DeepFlavourTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSet // fill feature structure if (packed_cand) { btagbtvdeep::packedCandidateToFeatures( - packed_cand, jet, drminpfcandsv, static_cast(jet_radius_), n_pf_features); + packed_cand, jet, drminpfcandsv, static_cast(jet_radius_), puppiw, n_pf_features); } else if (reco_cand) { btagbtvdeep::recoCandidateToFeatures( reco_cand, jet, drminpfcandsv, static_cast(jet_radius_), puppiw, n_pf_features); diff --git a/RecoBTag/FeatureTools/src/ChargedCandidateConverter.cc b/RecoBTag/FeatureTools/src/ChargedCandidateConverter.cc index c05455d398c08..0e55bd62d6e0d 100644 --- a/RecoBTag/FeatureTools/src/ChargedCandidateConverter.cc +++ b/RecoBTag/FeatureTools/src/ChargedCandidateConverter.cc @@ -7,13 +7,14 @@ namespace btagbtvdeep { const TrackInfoBuilder& track_info, const float drminpfcandsv, const float jetR, + const float puppiw, ChargedCandidateFeatures& c_pf_features, const bool flip) { commonCandidateToFeatures(c_pf, jet, track_info, drminpfcandsv, jetR, c_pf_features, flip); c_pf_features.vtx_ass = c_pf->pvAssociationQuality(); - c_pf_features.puppiw = c_pf->puppiWeight(); + c_pf_features.puppiw = puppiw; // if PackedCandidate does not have TrackDetails this gives an Exception // because unpackCovariance might be called for pseudoTrack/bestTrack diff --git a/RecoBTag/FeatureTools/src/NeutralCandidateConverter.cc b/RecoBTag/FeatureTools/src/NeutralCandidateConverter.cc index ce95dd1735c83..a75e3be087e2a 100644 --- a/RecoBTag/FeatureTools/src/NeutralCandidateConverter.cc +++ b/RecoBTag/FeatureTools/src/NeutralCandidateConverter.cc @@ -6,11 +6,12 @@ namespace btagbtvdeep { const pat::Jet& jet, const float drminpfcandsv, const float jetR, + const float puppiw, NeutralCandidateFeatures& n_pf_features) { commonCandidateToFeatures(n_pf, jet, drminpfcandsv, jetR, n_pf_features); n_pf_features.hadFrac = n_pf->hcalFraction(); - n_pf_features.puppiw = n_pf->puppiWeight(); + n_pf_features.puppiw = puppiw; } void recoCandidateToFeatures(const reco::PFCandidate* n_pf, From c46da0164f371df946013aa2366424560902f714 Mon Sep 17 00:00:00 2001 From: Nurfikri Norjoharuddeen Date: Mon, 6 Feb 2023 19:36:16 +0100 Subject: [PATCH 008/233] Apply puppi weight to constituent's energy and pT. Add optionflag for weighted jets (e.g puppi jets) --- .../interface/ChargedCandidateConverter.h | 15 ++++++++++++--- .../interface/NeutralCandidateConverter.h | 15 ++++++++++++--- .../plugins/DeepDoubleXTagInfoProducer.cc | 12 ++++++++---- .../plugins/DeepFlavourTagInfoProducer.cc | 11 ++++++++--- .../FeatureTools/src/ChargedCandidateConverter.cc | 6 ++++-- .../FeatureTools/src/NeutralCandidateConverter.cc | 6 ++++-- 6 files changed, 48 insertions(+), 17 deletions(-) diff --git a/RecoBTag/FeatureTools/interface/ChargedCandidateConverter.h b/RecoBTag/FeatureTools/interface/ChargedCandidateConverter.h index efcd49d4d9111..c621d5cd22f09 100644 --- a/RecoBTag/FeatureTools/interface/ChargedCandidateConverter.h +++ b/RecoBTag/FeatureTools/interface/ChargedCandidateConverter.h @@ -15,8 +15,10 @@ namespace btagbtvdeep { void commonCandidateToFeatures(const CandidateType* c_pf, const reco::Jet& jet, const TrackInfoBuilder& track_info, + const bool& isWeightedJet, const float& drminpfcandsv, const float& jetR, + const float& puppiw, ChargedCandidateFeatures& c_pf_features, const bool flip = false) { float trackSip2dVal = track_info.getTrackSip2dVal(); @@ -31,9 +33,14 @@ namespace btagbtvdeep { } c_pf_features.deltaR = reco::deltaR(*c_pf, jet); - c_pf_features.ptrel = catch_infs_and_bound(c_pf->pt() / jet.pt(), 0, -1, 0, -1); - c_pf_features.ptrel_noclip = c_pf->pt() / jet.pt(); - c_pf_features.erel = c_pf->energy() / jet.energy(); + + float constituentWeight = 1.; + if (isWeightedJet) constituentWeight = puppiw; + + c_pf_features.ptrel = catch_infs_and_bound((c_pf->pt() * constituentWeight) / jet.pt(), 0, -1, 0, -1); + c_pf_features.ptrel_noclip = (c_pf->pt() * constituentWeight) / jet.pt(); + c_pf_features.erel = (c_pf->energy() * constituentWeight) / jet.energy(); + const float etasign = jet.eta() > 0 ? 1 : -1; c_pf_features.etarel = etasign * (c_pf->eta() - jet.eta()); @@ -59,6 +66,7 @@ namespace btagbtvdeep { void packedCandidateToFeatures(const pat::PackedCandidate* c_pf, const pat::Jet& jet, const TrackInfoBuilder& track_info, + const bool isWeightedJet, const float drminpfcandsv, const float jetR, const float puppiw, @@ -68,6 +76,7 @@ namespace btagbtvdeep { void recoCandidateToFeatures(const reco::PFCandidate* c_pf, const reco::Jet& jet, const TrackInfoBuilder& track_info, + const bool isWeightedJet, const float drminpfcandsv, const float jetR, const float puppiw, diff --git a/RecoBTag/FeatureTools/interface/NeutralCandidateConverter.h b/RecoBTag/FeatureTools/interface/NeutralCandidateConverter.h index c23d992e25df1..b54234180308e 100644 --- a/RecoBTag/FeatureTools/interface/NeutralCandidateConverter.h +++ b/RecoBTag/FeatureTools/interface/NeutralCandidateConverter.h @@ -13,6 +13,7 @@ namespace btagbtvdeep { void packedCandidateToFeatures(const pat::PackedCandidate* n_pf, const pat::Jet& jet, + const bool isWeightedJet, const float drminpfcandsv, const float jetR, const float puppiw, @@ -20,6 +21,7 @@ namespace btagbtvdeep { void recoCandidateToFeatures(const reco::PFCandidate* n_pf, const reco::Jet& jet, + const bool isWeightedJet, const float drminpfcandsv, const float jetR, const float puppiw, @@ -28,19 +30,26 @@ namespace btagbtvdeep { template static void commonCandidateToFeatures(const CandidateType* n_pf, const reco::Jet& jet, + const bool& isWeightedJet, const float& drminpfcandsv, const float& jetR, + const float& puppiw, NeutralCandidateFeatures& n_pf_features) { std::pair drSubjetFeatures = getDRSubjetFeatures(jet, n_pf); n_pf_features.drsubjet1 = drSubjetFeatures.first; n_pf_features.drsubjet2 = drSubjetFeatures.second; + float constituentWeight = 1.; + if (isWeightedJet) constituentWeight = puppiw; + // Jet relative vars - n_pf_features.ptrel = catch_infs_and_bound(n_pf->pt() / jet.pt(), 0, -1, 0, -1); - n_pf_features.ptrel_noclip = n_pf->pt() / jet.pt(); + n_pf_features.ptrel = catch_infs_and_bound((n_pf->pt() * constituentWeight) / jet.pt(), 0, -1, 0, -1); + n_pf_features.ptrel_noclip = (n_pf->pt() * constituentWeight) / jet.pt(); + n_pf_features.erel = (n_pf->energy() * constituentWeight) / jet.energy(); + n_pf_features.deltaR = catch_infs_and_bound(reco::deltaR(*n_pf, jet), 0, -0.6, 0, -0.6); n_pf_features.deltaR_noclip = reco::deltaR(*n_pf, jet); - n_pf_features.erel = n_pf->energy() / jet.energy(); + n_pf_features.isGamma = 0; if (std::abs(n_pf->pdgId()) == 22) n_pf_features.isGamma = 1; diff --git a/RecoBTag/FeatureTools/plugins/DeepDoubleXTagInfoProducer.cc b/RecoBTag/FeatureTools/plugins/DeepDoubleXTagInfoProducer.cc index 7f2cbc2e9ea28..8d408f94a534f 100644 --- a/RecoBTag/FeatureTools/plugins/DeepDoubleXTagInfoProducer.cc +++ b/RecoBTag/FeatureTools/plugins/DeepDoubleXTagInfoProducer.cc @@ -66,6 +66,7 @@ class DeepDoubleXTagInfoProducer : public edm::stream::EDProducer<> { bool use_puppi_value_map_; bool fallback_puppi_weight_; + bool is_weighted_jet_; }; DeepDoubleXTagInfoProducer::DeepDoubleXTagInfoProducer(const edm::ParameterSet& iConfig) @@ -80,7 +81,8 @@ DeepDoubleXTagInfoProducer::DeepDoubleXTagInfoProducer(const edm::ParameterSet& track_builder_token_( esConsumes(edm::ESInputTag("", "TransientTrackBuilder"))), use_puppi_value_map_(false), - fallback_puppi_weight_(iConfig.getParameter("fallback_puppi_weight")) + fallback_puppi_weight_(iConfig.getParameter("fallback_puppi_weight")), + is_weighted_jet_(iConfig.getParameter("is_weighted_jet")) { produces(); @@ -105,6 +107,7 @@ void DeepDoubleXTagInfoProducer::fillDescriptions(edm::ConfigurationDescriptions desc.add("secondary_vertices", edm::InputTag("inclusiveCandidateSecondaryVertices")); desc.add("jets", edm::InputTag("ak8PFJetsPuppi")); desc.add("fallback_puppi_weight", false); + desc.add("is_weighted_jet", true); descriptions.add("pfDeepDoubleXTagInfos", desc); } @@ -324,7 +327,7 @@ void DeepDoubleXTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSet auto& c_pf_features = features.c_pf_features.at(entry); if (packed_cand) { btagbtvdeep::packedCandidateToFeatures( - packed_cand, *pat_jet, trackinfo, drminpfcandsv, static_cast(jet_radius_), puppiw, c_pf_features); + packed_cand, *pat_jet, trackinfo, is_weighted_jet_, drminpfcandsv, static_cast(jet_radius_), puppiw, c_pf_features); } else if (reco_cand) { // get vertex association quality int pv_ass_quality = 0; // fallback value @@ -344,6 +347,7 @@ void DeepDoubleXTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSet btagbtvdeep::recoCandidateToFeatures(reco_cand, jet, trackinfo, + is_weighted_jet_, drminpfcandsv, static_cast(jet_radius_), puppiw, @@ -359,10 +363,10 @@ void DeepDoubleXTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSet // // fill feature structure if (packed_cand) { btagbtvdeep::packedCandidateToFeatures( - packed_cand, *pat_jet, drminpfcandsv, static_cast(jet_radius_), puppiw, n_pf_features); + packed_cand, *pat_jet, is_weighted_jet_, drminpfcandsv, static_cast(jet_radius_), puppiw, n_pf_features); } else if (reco_cand) { btagbtvdeep::recoCandidateToFeatures( - reco_cand, jet, drminpfcandsv, static_cast(jet_radius_), puppiw, n_pf_features); + reco_cand, jet, is_weighted_jet_, drminpfcandsv, static_cast(jet_radius_), puppiw, n_pf_features); } } } diff --git a/RecoBTag/FeatureTools/plugins/DeepFlavourTagInfoProducer.cc b/RecoBTag/FeatureTools/plugins/DeepFlavourTagInfoProducer.cc index c0a5a2f1f4f6d..681c5ca0ee5e6 100644 --- a/RecoBTag/FeatureTools/plugins/DeepFlavourTagInfoProducer.cc +++ b/RecoBTag/FeatureTools/plugins/DeepFlavourTagInfoProducer.cc @@ -99,6 +99,8 @@ class DeepFlavourTagInfoProducer : public edm::stream::EDProducer<> { bool run_deepVertex_; + bool is_weighted_jet_; + //TrackProbability void checkEventSetup(const edm::EventSetup& iSetup); std::unique_ptr probabilityEstimator_; @@ -127,6 +129,7 @@ DeepFlavourTagInfoProducer::DeepFlavourTagInfoProducer(const edm::ParameterSet& fallback_puppi_weight_(iConfig.getParameter("fallback_puppi_weight")), fallback_vertex_association_(iConfig.getParameter("fallback_vertex_association")), run_deepVertex_(iConfig.getParameter("run_deepVertex")), + is_weighted_jet_(iConfig.getParameter("is_weighted_jet")), compute_probabilities_(iConfig.getParameter("compute_probabilities")), min_jet_pt_(iConfig.getParameter("min_jet_pt")), max_jet_eta_(iConfig.getParameter("max_jet_eta")) { @@ -168,6 +171,7 @@ void DeepFlavourTagInfoProducer::fillDescriptions(edm::ConfigurationDescriptions desc.add("fallback_puppi_weight", false); desc.add("fallback_vertex_association", false); desc.add("run_deepVertex", false); + desc.add("is_weighted_jet", false); desc.add("compute_probabilities", false); desc.add("min_jet_pt", 15.0); desc.add("max_jet_eta", 2.5); @@ -406,7 +410,7 @@ void DeepFlavourTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSet // fill feature structure if (packed_cand) { btagbtvdeep::packedCandidateToFeatures( - packed_cand, jet, trackinfo, drminpfcandsv, static_cast(jet_radius_), puppiw, c_pf_features, flip_); + packed_cand, jet, trackinfo, is_weighted_jet_, drminpfcandsv, static_cast(jet_radius_), puppiw, c_pf_features, flip_); } else if (reco_cand) { // get vertex association quality int pv_ass_quality = 0; // fallback value @@ -438,6 +442,7 @@ void DeepFlavourTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSet btagbtvdeep::recoCandidateToFeatures(reco_cand, jet, trackinfo, + is_weighted_jet_, drminpfcandsv, static_cast(jet_radius_), puppiw, @@ -454,10 +459,10 @@ void DeepFlavourTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSet // fill feature structure if (packed_cand) { btagbtvdeep::packedCandidateToFeatures( - packed_cand, jet, drminpfcandsv, static_cast(jet_radius_), puppiw, n_pf_features); + packed_cand, jet, is_weighted_jet_, drminpfcandsv, static_cast(jet_radius_), puppiw, n_pf_features); } else if (reco_cand) { btagbtvdeep::recoCandidateToFeatures( - reco_cand, jet, drminpfcandsv, static_cast(jet_radius_), puppiw, n_pf_features); + reco_cand, jet, is_weighted_jet_, drminpfcandsv, static_cast(jet_radius_), puppiw, n_pf_features); } } } diff --git a/RecoBTag/FeatureTools/src/ChargedCandidateConverter.cc b/RecoBTag/FeatureTools/src/ChargedCandidateConverter.cc index 0e55bd62d6e0d..4ef8c31b7597c 100644 --- a/RecoBTag/FeatureTools/src/ChargedCandidateConverter.cc +++ b/RecoBTag/FeatureTools/src/ChargedCandidateConverter.cc @@ -5,12 +5,13 @@ namespace btagbtvdeep { void packedCandidateToFeatures(const pat::PackedCandidate* c_pf, const pat::Jet& jet, const TrackInfoBuilder& track_info, + const bool isWeightedJet, const float drminpfcandsv, const float jetR, const float puppiw, ChargedCandidateFeatures& c_pf_features, const bool flip) { - commonCandidateToFeatures(c_pf, jet, track_info, drminpfcandsv, jetR, c_pf_features, flip); + commonCandidateToFeatures(c_pf, jet, track_info, isWeightedJet, drminpfcandsv, jetR, puppiw, c_pf_features, flip); c_pf_features.vtx_ass = c_pf->pvAssociationQuality(); @@ -38,6 +39,7 @@ namespace btagbtvdeep { void recoCandidateToFeatures(const reco::PFCandidate* c_pf, const reco::Jet& jet, const TrackInfoBuilder& track_info, + const bool isWeightedJet, const float drminpfcandsv, const float jetR, const float puppiw, @@ -45,7 +47,7 @@ namespace btagbtvdeep { const reco::VertexRef& pv, ChargedCandidateFeatures& c_pf_features, const bool flip) { - commonCandidateToFeatures(c_pf, jet, track_info, drminpfcandsv, jetR, c_pf_features, flip); + commonCandidateToFeatures(c_pf, jet, track_info, isWeightedJet, drminpfcandsv, jetR, puppiw, c_pf_features, flip); c_pf_features.vtx_ass = vtx_ass_from_pfcand(*c_pf, pv_ass_quality, pv); c_pf_features.puppiw = puppiw; diff --git a/RecoBTag/FeatureTools/src/NeutralCandidateConverter.cc b/RecoBTag/FeatureTools/src/NeutralCandidateConverter.cc index a75e3be087e2a..62135055589c3 100644 --- a/RecoBTag/FeatureTools/src/NeutralCandidateConverter.cc +++ b/RecoBTag/FeatureTools/src/NeutralCandidateConverter.cc @@ -4,11 +4,12 @@ namespace btagbtvdeep { void packedCandidateToFeatures(const pat::PackedCandidate* n_pf, const pat::Jet& jet, + const bool isWeightedJet, const float drminpfcandsv, const float jetR, const float puppiw, NeutralCandidateFeatures& n_pf_features) { - commonCandidateToFeatures(n_pf, jet, drminpfcandsv, jetR, n_pf_features); + commonCandidateToFeatures(n_pf, jet, isWeightedJet, drminpfcandsv, jetR, puppiw, n_pf_features); n_pf_features.hadFrac = n_pf->hcalFraction(); n_pf_features.puppiw = puppiw; @@ -16,11 +17,12 @@ namespace btagbtvdeep { void recoCandidateToFeatures(const reco::PFCandidate* n_pf, const reco::Jet& jet, + const bool isWeightedJet, const float drminpfcandsv, const float jetR, const float puppiw, NeutralCandidateFeatures& n_pf_features) { - commonCandidateToFeatures(n_pf, jet, drminpfcandsv, jetR, n_pf_features); + commonCandidateToFeatures(n_pf, jet, isWeightedJet, drminpfcandsv, jetR, puppiw, n_pf_features); n_pf_features.puppiw = puppiw; // need to get a value map and more stuff to do properly From 7f8e0f164b85d66e5537897eb1d58daa10744a14 Mon Sep 17 00:00:00 2001 From: Nurfikri Norjoharuddeen Date: Mon, 6 Feb 2023 20:13:13 +0100 Subject: [PATCH 009/233] Specify puppi_value_map source and is_weighted_jet flag for DeepTag b-tagging setup --- .../PatAlgos/python/tools/jetTools.py | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/PhysicsTools/PatAlgos/python/tools/jetTools.py b/PhysicsTools/PatAlgos/python/tools/jetTools.py index c217ce6eb9b3c..fb6931c961963 100644 --- a/PhysicsTools/PatAlgos/python/tools/jetTools.py +++ b/PhysicsTools/PatAlgos/python/tools/jetTools.py @@ -604,16 +604,20 @@ def setupBTagging(process, jetSource, pfCandidates, explicitJTA, pvSource, svSou btag.pixelClusterTagInfos.clone(jets = jetSource, vertices=pvSource), process, task) - if 'pfBoostedDouble' in btagInfo or 'SecondaryVertex' in btagInfo: - _btagInfo = getattr(process, btagPrefix+btagInfo+labelName+postfix) - if pfCandidates.value() == 'packedPFCandidates': - _btagInfo.weights = cms.InputTag("packedpuppi") + + def setupPuppiForBTagging(process): if not hasattr(process,"packedpuppi"): - from CommonTools.PileupAlgos.Puppi_cff import puppi - addToProcessAndTask('packedpuppi', puppi.clone( + from CommonTools.PileupAlgos.Puppi_cff import puppi + addToProcessAndTask('packedpuppi', puppi.clone( useExistingWeights = True, candName = 'packedPFCandidates', vertexName = 'offlineSlimmedPrimaryVertices') , process, task) + + if 'pfBoostedDouble' in btagInfo or 'SecondaryVertex' in btagInfo: + _btagInfo = getattr(process, btagPrefix+btagInfo+labelName+postfix) + if pfCandidates.value() == 'packedPFCandidates': + _btagInfo.weights = cms.InputTag("packedpuppi") + setupPuppiForBTagging(process) else: _btagInfo.weights = cms.InputTag("puppi") @@ -632,8 +636,14 @@ def setupBTagging(process, jetSource, pfCandidates, explicitJTA, pvSource, svSou puppi_value_map = cms.InputTag("puppi") vertex_associator = cms.InputTag("primaryVertexAssociation","original") else: - puppi_value_map = cms.InputTag("") + puppi_value_map = cms.InputTag("packedpuppi") + setupPuppiForBTagging(process) vertex_associator = cms.InputTag("") + # If this jet is a puppi jet, then set is_weighted_jet to true. + # + is_weighted_jet = False + if ('puppi' in jetSource.value().lower()): + is_weighted_jet = True addToProcessAndTask(btagPrefix+btagInfo+labelName+postfix, btag.pfDeepFlavourTagInfos.clone( jets = jetSource, @@ -642,6 +652,7 @@ def setupBTagging(process, jetSource, pfCandidates, explicitJTA, pvSource, svSou shallow_tag_infos = cms.InputTag(btagPrefix+deep_csv_tag_infos+labelName+postfix), puppi_value_map = puppi_value_map, vertex_associator = vertex_associator, + is_weighted_jet = is_weighted_jet, flip = flip), process, task) @@ -649,12 +660,19 @@ def setupBTagging(process, jetSource, pfCandidates, explicitJTA, pvSource, svSou # can only run on PAT jets, so the updater needs to be used if 'updated' not in jetSource.value().lower(): raise ValueError("Invalid jet collection: %s. pfDeepDoubleXTagInfos only supports running via updateJetCollection." % jetSource.value()) + is_weighted_jet = False + if ('puppi' in jetSource.value().lower()): + is_weighted_jet = True + puppi_value_map = cms.InputTag("packedpuppi") + setupPuppiForBTagging(process) addToProcessAndTask(btagPrefix+btagInfo+labelName+postfix, btag.pfDeepDoubleXTagInfos.clone( jets = jetSource, vertices=pvSource, secondary_vertices=svSource, shallow_tag_infos = cms.InputTag(btagPrefix+'pfBoostedDoubleSVAK8TagInfos'+labelName+postfix), + puppi_value_map = puppi_value_map, + is_weighted_jet = is_weighted_jet ), process, task) From 78a1bf062e813510eb7cb5587fe2acb9d68f34df Mon Sep 17 00:00:00 2001 From: Nurfikri Norjoharuddeen Date: Fri, 10 Feb 2023 09:23:45 +0100 Subject: [PATCH 010/233] Use puppi weights from ValueMap for pack_cand. Fallback to puppiWeight() function if ValueMap not specified and explicitly asked to use fallback value. --- .../plugins/DeepBoostedJetTagInfoProducer.cc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/RecoBTag/FeatureTools/plugins/DeepBoostedJetTagInfoProducer.cc b/RecoBTag/FeatureTools/plugins/DeepBoostedJetTagInfoProducer.cc index f04ce9e473caa..102ccb37bc3d8 100644 --- a/RecoBTag/FeatureTools/plugins/DeepBoostedJetTagInfoProducer.cc +++ b/RecoBTag/FeatureTools/plugins/DeepBoostedJetTagInfoProducer.cc @@ -73,6 +73,7 @@ class DeepBoostedJetTagInfoProducer : public edm::stream::EDProducer<> { bool use_puppi_value_map_; bool use_pvasq_value_map_; bool is_packed_pf_candidate_collection_; + bool fallback_puppi_weight; edm::EDGetTokenT> puppi_value_map_token_; edm::EDGetTokenT> pvasq_value_map_token_; @@ -194,6 +195,7 @@ DeepBoostedJetTagInfoProducer::DeepBoostedJetTagInfoProducer(const edm::Paramete pfcand_token_(consumes(iConfig.getParameter("pf_candidates"))), use_puppi_value_map_(false), use_pvasq_value_map_(false), + fallback_puppi_weight_(iConfig.getParameter("fallback_puppi_weight")), track_builder_token_( esConsumes(edm::ESInputTag("", "TransientTrackBuilder"))) { const auto &puppi_value_map_tag = iConfig.getParameter("puppi_value_map"); @@ -229,6 +231,7 @@ void DeepBoostedJetTagInfoProducer::fillDescriptions(edm::ConfigurationDescripti desc.add("flip_ip_sign", false); desc.add("sip3dSigMax", -1); desc.add("use_hlt_features", false); + desc.add("fallback_puppi_weight", false); desc.add("vertices", edm::InputTag("offlinePrimaryVertices")); desc.add("secondary_vertices", edm::InputTag("inclusiveCandidateSecondaryVertices")); desc.add("pf_candidates", edm::InputTag("particleFlow")); @@ -324,11 +327,23 @@ float DeepBoostedJetTagInfoProducer::puppiWgt(const reco::CandidatePtr &cand) { const auto *pack_cand = dynamic_cast(&(*cand)); const auto *reco_cand = dynamic_cast(&(*cand)); float wgt = 1.; - if (pack_cand) + if (pack_cand){ + //fallback value wgt = pack_cand->puppiWeight(); + if (use_puppi_value_map_) + wgt = (*puppi_value_map_)[cand]; + else if (!fallback_puppi_weight_) { + throw edm::Exception(edm::errors::InvalidReference, "PUPPI value map missing") + << "use fallback_puppi_weight option to use puppiWeight() for pack_cand as default"; + } + } else if (reco_cand) { if (use_puppi_value_map_) wgt = (*puppi_value_map_)[cand]; + else if (!fallback_puppi_weight_) { + throw edm::Exception(edm::errors::InvalidReference, "PUPPI value map missing") + << "use fallback_puppi_weight option to use " << wgt << " for reco_cand as default"; + } } else throw edm::Exception(edm::errors::InvalidReference) << "Cannot convert to either pat::PackedCandidate or reco::PFCandidate"; From 5a998af6fcc28aae9748dd85dfe88c48523ff7f7 Mon Sep 17 00:00:00 2001 From: Nurfikri Norjoharuddeen Date: Fri, 10 Feb 2023 10:18:12 +0100 Subject: [PATCH 011/233] Fix typo --- RecoBTag/FeatureTools/plugins/DeepBoostedJetTagInfoProducer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RecoBTag/FeatureTools/plugins/DeepBoostedJetTagInfoProducer.cc b/RecoBTag/FeatureTools/plugins/DeepBoostedJetTagInfoProducer.cc index 102ccb37bc3d8..e339edda15860 100644 --- a/RecoBTag/FeatureTools/plugins/DeepBoostedJetTagInfoProducer.cc +++ b/RecoBTag/FeatureTools/plugins/DeepBoostedJetTagInfoProducer.cc @@ -73,7 +73,7 @@ class DeepBoostedJetTagInfoProducer : public edm::stream::EDProducer<> { bool use_puppi_value_map_; bool use_pvasq_value_map_; bool is_packed_pf_candidate_collection_; - bool fallback_puppi_weight; + bool fallback_puppi_weight_; edm::EDGetTokenT> puppi_value_map_token_; edm::EDGetTokenT> pvasq_value_map_token_; From 59f674be66305b7ce0d6677b95dacfdf7e4f39be Mon Sep 17 00:00:00 2001 From: Nurfikri Norjoharuddeen Date: Sat, 11 Feb 2023 05:54:34 +0100 Subject: [PATCH 012/233] Remove fallback_puppi_weight_ option --- .../plugins/DeepBoostedJetTagInfoProducer.cc | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/RecoBTag/FeatureTools/plugins/DeepBoostedJetTagInfoProducer.cc b/RecoBTag/FeatureTools/plugins/DeepBoostedJetTagInfoProducer.cc index e339edda15860..d4fd8427af5bb 100644 --- a/RecoBTag/FeatureTools/plugins/DeepBoostedJetTagInfoProducer.cc +++ b/RecoBTag/FeatureTools/plugins/DeepBoostedJetTagInfoProducer.cc @@ -73,7 +73,6 @@ class DeepBoostedJetTagInfoProducer : public edm::stream::EDProducer<> { bool use_puppi_value_map_; bool use_pvasq_value_map_; bool is_packed_pf_candidate_collection_; - bool fallback_puppi_weight_; edm::EDGetTokenT> puppi_value_map_token_; edm::EDGetTokenT> pvasq_value_map_token_; @@ -195,7 +194,6 @@ DeepBoostedJetTagInfoProducer::DeepBoostedJetTagInfoProducer(const edm::Paramete pfcand_token_(consumes(iConfig.getParameter("pf_candidates"))), use_puppi_value_map_(false), use_pvasq_value_map_(false), - fallback_puppi_weight_(iConfig.getParameter("fallback_puppi_weight")), track_builder_token_( esConsumes(edm::ESInputTag("", "TransientTrackBuilder"))) { const auto &puppi_value_map_tag = iConfig.getParameter("puppi_value_map"); @@ -231,7 +229,6 @@ void DeepBoostedJetTagInfoProducer::fillDescriptions(edm::ConfigurationDescripti desc.add("flip_ip_sign", false); desc.add("sip3dSigMax", -1); desc.add("use_hlt_features", false); - desc.add("fallback_puppi_weight", false); desc.add("vertices", edm::InputTag("offlinePrimaryVertices")); desc.add("secondary_vertices", edm::InputTag("inclusiveCandidateSecondaryVertices")); desc.add("pf_candidates", edm::InputTag("particleFlow")); @@ -332,18 +329,10 @@ float DeepBoostedJetTagInfoProducer::puppiWgt(const reco::CandidatePtr &cand) { wgt = pack_cand->puppiWeight(); if (use_puppi_value_map_) wgt = (*puppi_value_map_)[cand]; - else if (!fallback_puppi_weight_) { - throw edm::Exception(edm::errors::InvalidReference, "PUPPI value map missing") - << "use fallback_puppi_weight option to use puppiWeight() for pack_cand as default"; - } } else if (reco_cand) { if (use_puppi_value_map_) wgt = (*puppi_value_map_)[cand]; - else if (!fallback_puppi_weight_) { - throw edm::Exception(edm::errors::InvalidReference, "PUPPI value map missing") - << "use fallback_puppi_weight option to use " << wgt << " for reco_cand as default"; - } } else throw edm::Exception(edm::errors::InvalidReference) << "Cannot convert to either pat::PackedCandidate or reco::PFCandidate"; From e07e0331221e932e7fe6ef565412511413e1b8bf Mon Sep 17 00:00:00 2001 From: Nurfikri Norjoharuddeen Date: Sun, 12 Feb 2023 07:16:12 +0100 Subject: [PATCH 013/233] Provide packedpuppi. Simplify setup. --- .../PatAlgos/python/tools/jetTools.py | 59 +++++++++++-------- 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/PhysicsTools/PatAlgos/python/tools/jetTools.py b/PhysicsTools/PatAlgos/python/tools/jetTools.py index fb6931c961963..5d7c13cbca01a 100644 --- a/PhysicsTools/PatAlgos/python/tools/jetTools.py +++ b/PhysicsTools/PatAlgos/python/tools/jetTools.py @@ -234,6 +234,16 @@ def setupSVClustering(btagInfo, svClustering, algo, rParam, fatJets=cms.InputTag if groomedFatJets != cms.InputTag(''): btagInfo.groomedFatJets = groomedFatJets +def setupPackedPuppi(process): + task = getPatAlgosToolsTask(process) + packedPuppiName = "packedpuppi" + if not hasattr(process,packedPuppiName): + from CommonTools.PileupAlgos.Puppi_cff import puppi + addToProcessAndTask(packedPuppiName, puppi.clone( + useExistingWeights = True, + candName = 'packedPFCandidates', + vertexName = 'offlineSlimmedPrimaryVertices') , process, task) + return packedPuppiName def setupBTagging(process, jetSource, pfCandidates, explicitJTA, pvSource, svSource, elSource, muSource, runIVF, tightBTagNTkHits, loadStdRecoBTag, svClustering, fatJets, groomedFatJets, algo, rParam, btagDiscriminators, btagInfos, patJets, labelName, btagPrefix, postfix): @@ -605,19 +615,12 @@ def setupBTagging(process, jetSource, pfCandidates, explicitJTA, pvSource, svSou process, task) - def setupPuppiForBTagging(process): - if not hasattr(process,"packedpuppi"): - from CommonTools.PileupAlgos.Puppi_cff import puppi - addToProcessAndTask('packedpuppi', puppi.clone( - useExistingWeights = True, - candName = 'packedPFCandidates', - vertexName = 'offlineSlimmedPrimaryVertices') , process, task) if 'pfBoostedDouble' in btagInfo or 'SecondaryVertex' in btagInfo: _btagInfo = getattr(process, btagPrefix+btagInfo+labelName+postfix) if pfCandidates.value() == 'packedPFCandidates': - _btagInfo.weights = cms.InputTag("packedpuppi") - setupPuppiForBTagging(process) + packedPuppiName = setupPackedPuppi(process) + _btagInfo.weights = cms.InputTag(packedPuppiName) else: _btagInfo.weights = cms.InputTag("puppi") @@ -630,17 +633,17 @@ def setupPuppiForBTagging(process): else: deep_csv_tag_infos = 'pfDeepCSVTagInfos' flip = False + # use right input tags when running with RECO PF candidates, which actually - # depens of wether jets were slimmed or not (check for s/S-limmed in name) - if not ('limmed' in jetSource.value()): - puppi_value_map = cms.InputTag("puppi") - vertex_associator = cms.InputTag("primaryVertexAssociation","original") + # depens of wether jets use "particleFlow" + if pfCandidates.value() == 'packedPFCandidates': + puppi_value_map = setupPackedPuppi(process) + vertex_associator = cms.InputTag("") else: - puppi_value_map = cms.InputTag("packedpuppi") - setupPuppiForBTagging(process) - vertex_associator = cms.InputTag("") + puppi_value_map = cms.InputTag("puppi") + vertex_associator = cms.InputTag("primaryVertexAssociation","original") + # If this jet is a puppi jet, then set is_weighted_jet to true. - # is_weighted_jet = False if ('puppi' in jetSource.value().lower()): is_weighted_jet = True @@ -660,11 +663,8 @@ def setupPuppiForBTagging(process): # can only run on PAT jets, so the updater needs to be used if 'updated' not in jetSource.value().lower(): raise ValueError("Invalid jet collection: %s. pfDeepDoubleXTagInfos only supports running via updateJetCollection." % jetSource.value()) - is_weighted_jet = False - if ('puppi' in jetSource.value().lower()): - is_weighted_jet = True - puppi_value_map = cms.InputTag("packedpuppi") - setupPuppiForBTagging(process) + packedPuppiName = setupPackedPuppi(process) + puppi_value_map = cms.InputTag(packedPuppiName) addToProcessAndTask(btagPrefix+btagInfo+labelName+postfix, btag.pfDeepDoubleXTagInfos.clone( jets = jetSource, @@ -672,17 +672,19 @@ def setupPuppiForBTagging(process): secondary_vertices=svSource, shallow_tag_infos = cms.InputTag(btagPrefix+'pfBoostedDoubleSVAK8TagInfos'+labelName+postfix), puppi_value_map = puppi_value_map, - is_weighted_jet = is_weighted_jet ), process, task) if btagInfo == 'pfHiggsInteractionNetTagInfos': + packedPuppiName = setupPackedPuppi(process) + puppi_value_map = cms.InputTag(packedPuppiName) addToProcessAndTask(btagPrefix+btagInfo+labelName+postfix, btag.pfHiggsInteractionNetTagInfos.clone( jets = jetSource, vertices = pvSource, secondary_vertices = svSource, pf_candidates = pfCandidates, + puppi_value_map = puppi_value_map ), process, task) @@ -691,7 +693,7 @@ def setupPuppiForBTagging(process): # case 1: running over jets whose daughters are PackedCandidates (only via updateJetCollection for now) if 'updated' not in jetSource.value().lower(): raise ValueError("Invalid jet collection: %s. pfDeepBoostedJetTagInfos only supports running via updateJetCollection." % jetSource.value()) - puppi_value_map = "" + puppi_value_map = setupPackedPuppi(process) vertex_associator = "" elif pfCandidates.value() == 'particleFlow': raise ValueError("Running pfDeepBoostedJetTagInfos with reco::PFCandidates is currently not supported.") @@ -716,7 +718,7 @@ def setupPuppiForBTagging(process): if btagInfo == 'pfParticleNetTagInfos': if pfCandidates.value() == 'packedPFCandidates': # case 1: running over jets whose daughters are PackedCandidates (only via updateJetCollection for now) - puppi_value_map = "" + puppi_value_map = setupPackedPuppi(process) vertex_associator = "" elif pfCandidates.value() == 'particleFlow': raise ValueError("Running pfDeepBoostedJetTagInfos with reco::PFCandidates is currently not supported.") @@ -748,7 +750,7 @@ def setupPuppiForBTagging(process): sip3dSigMax = -1 if pfCandidates.value() == 'packedPFCandidates': # case 1: running over jets whose daughters are PackedCandidates (only via updateJetCollection for now) - puppi_value_map = "" + puppi_value_map = setupPackedPuppi(process) vertex_associator = "" elif pfCandidates.value() == 'particleFlow': raise ValueError("Running pfDeepBoostedJetTagInfos with reco::PFCandidates is currently not supported.") @@ -757,6 +759,10 @@ def setupPuppiForBTagging(process): vertex_associator = "primaryVertexAssociation:original" else: raise ValueError("Invalid pfCandidates collection: %s." % pfCandidates.value()) + # If this jet is a Puppi jet, use puppi-weighted p4. + use_puppiP4 = False + if "puppi" in jetSource.value().lower(): + use_puppiP4 = True addToProcessAndTask(btagPrefix+btagInfo+labelName+postfix, btag.pfParticleNetAK4TagInfos.clone( jets = jetSource, @@ -767,6 +773,7 @@ def setupPuppiForBTagging(process): vertex_associator = vertex_associator, flip_ip_sign = flip_ip_sign, sip3dSigMax = sip3dSigMax, + use_puppiP4 = use_puppiP4 ), process, task) From 5c0afbdbc8febb24029ad4541407b04209dc8e9c Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Tue, 14 Feb 2023 16:03:23 +0100 Subject: [PATCH 014/233] reformat new code --- .../plugins/ParticleNetFeatureEvaluator.cc | 685 ++++++++++-------- 1 file changed, 390 insertions(+), 295 deletions(-) diff --git a/RecoBTag/FeatureTools/plugins/ParticleNetFeatureEvaluator.cc b/RecoBTag/FeatureTools/plugins/ParticleNetFeatureEvaluator.cc index c4217bf3ff0aa..d6163b2b2592b 100644 --- a/RecoBTag/FeatureTools/plugins/ParticleNetFeatureEvaluator.cc +++ b/RecoBTag/FeatureTools/plugins/ParticleNetFeatureEvaluator.cc @@ -39,22 +39,18 @@ class ParticleNetFeatureEvaluator : public edm::stream::EDProducer<> { static void fillDescriptions(edm::ConfigurationDescriptions &descriptions); private: - void beginStream(edm::StreamID) override {} void produce(edm::Event &, const edm::EventSetup &) override; void endStream() override {} - void fillParticleFeatures(DeepBoostedJetFeatures & fts, - const reco::Jet & jet, - const std::vector & tau_pfcandidates, - const pat::MuonCollection & muons, - const pat::ElectronCollection & electrons, - const pat::PhotonCollection & photons - ); - void fillSVFeatures(DeepBoostedJetFeatures & fts, - const reco::Jet & jet); - void fillLostTrackFeatures(DeepBoostedJetFeatures & fts, - const reco::Jet & jet); - bool useTrackProperties(const pat::PackedCandidate* cand); + void fillParticleFeatures(DeepBoostedJetFeatures &fts, + const reco::Jet &jet, + const std::vector &tau_pfcandidates, + const pat::MuonCollection &muons, + const pat::ElectronCollection &electrons, + const pat::PhotonCollection &photons); + void fillSVFeatures(DeepBoostedJetFeatures &fts, const reco::Jet &jet); + void fillLostTrackFeatures(DeepBoostedJetFeatures &fts, const reco::Jet &jet); + bool useTrackProperties(const pat::PackedCandidate *cand); const double jet_radius_; const double min_jet_pt_; @@ -66,25 +62,25 @@ class ParticleNetFeatureEvaluator : public edm::stream::EDProducer<> { const double max_dr_for_losttrack_; const double min_pt_for_taus_; const double max_eta_for_taus_; - const bool use_puppiP4_; + const bool use_puppiP4_; const double min_puppi_wgt_; - const bool include_neutrals_; - - edm::EDGetTokenT muon_token_; - edm::EDGetTokenT electron_token_; - edm::EDGetTokenT photon_token_; - edm::EDGetTokenT tau_token_; - edm::EDGetTokenT > jet_token_; - edm::EDGetTokenT losttrack_token_; + const bool include_neutrals_; + + edm::EDGetTokenT muon_token_; + edm::EDGetTokenT electron_token_; + edm::EDGetTokenT photon_token_; + edm::EDGetTokenT tau_token_; + edm::EDGetTokenT> jet_token_; + edm::EDGetTokenT losttrack_token_; edm::EDGetTokenT vtx_token_; edm::EDGetTokenT sv_token_; - edm::EDGetTokenT > pfcand_token_; + edm::EDGetTokenT> pfcand_token_; edm::ESGetToken track_builder_token_; - + edm::Handle vtxs_; edm::Handle svs_; - edm::Handle > pfcands_; - edm::Handle losttracks_; + edm::Handle> pfcands_; + edm::Handle losttracks_; edm::ESHandle track_builder_; const static std::vector particle_features_; @@ -92,7 +88,7 @@ class ParticleNetFeatureEvaluator : public edm::stream::EDProducer<> { const static std::vector losttrack_features_; const reco::Vertex *pv_ = nullptr; - TTree* tree; + TTree *tree; unsigned int event; float jet_pt; float jet_pt_raw; @@ -104,7 +100,7 @@ class ParticleNetFeatureEvaluator : public edm::stream::EDProducer<> { std::vector jet_pfcand_energy_log; std::vector jet_pfcand_deta; std::vector jet_pfcand_dphi; - std::vector jet_pfcand_eta ; + std::vector jet_pfcand_eta; std::vector jet_pfcand_charge; std::vector jet_pfcand_frompv; std::vector jet_pfcand_nlostinnerhits; @@ -172,43 +168,116 @@ class ParticleNetFeatureEvaluator : public edm::stream::EDProducer<> { std::vector jet_losttrack_trackjet_dist; std::vector jet_losttrack_trackjet_decayL; std::vector jet_losttrack_npixhits; - std::vector jet_losttrack_nstriphits; - + std::vector jet_losttrack_nstriphits; }; -const std::vector ParticleNetFeatureEvaluator::particle_features_{ "jet_pfcand_pt_log", "jet_pfcand_energy_log", "jet_pfcand_deta", "jet_pfcand_dphi", "jet_pfcand_eta", "jet_pfcand_charge", "jet_pfcand_frompv", "jet_pfcand_nlostinnerhits", "jet_pfcand_track_chi2", "jet_pfcand_track_qual", "jet_pfcand_dz", "jet_pfcand_dzsig", "jet_pfcand_dxy", "jet_pfcand_dxysig", "jet_pfcand_etarel", "jet_pfcand_pperp_ratio", "jet_pfcand_ppara_ratio", "jet_pfcand_trackjet_d3d", "jet_pfcand_trackjet_d3dsig", "jet_pfcand_trackjet_dist", "jet_pfcand_nhits", "jet_pfcand_npixhits", "jet_pfcand_nstriphits", "jet_pfcand_trackjet_decayL", "jet_pfcand_id", "jet_pfcand_calofraction", "jet_pfcand_hcalfraction", "jet_pfcand_puppiw", "jet_pfcand_muon_id", "jet_pfcand_muon_isglobal", "jet_pfcand_muon_segcomp", "jet_pfcand_muon_chi2", "jet_pfcand_muon_nvalidhit", "jet_pfcand_muon_nstation", "jet_pfcand_electron_detaIn", "jet_pfcand_electron_dphiIn", "jet_pfcand_electron_sigIetaIeta", "jet_pfcand_electron_sigIphiIphi", "jet_pfcand_electron_r9", "jet_pfcand_electron_convProb", "jet_pfcand_photon_sigIetaIeta", "jet_pfcand_photon_r9", "jet_pfcand_photon_eVeto", "jet_pfcand_tau_signal", "pfcand_mask"}; - -const std::vector ParticleNetFeatureEvaluator::sv_features_{"jet_sv_pt_log","jet_sv_mass","jet_sv_deta","jet_sv_dphi", "jet_sv_eta", "jet_sv_ntrack", "jet_sv_chi2", "jet_sv_dxy", "jet_sv_dxysig", "jet_sv_d3d", "jet_sv_d3dsig", "sv_mask"}; - -const std::vector ParticleNetFeatureEvaluator::losttrack_features_{"jet_losttrack_pt_log","jet_losttrack_eta","jet_losttrack_deta","jet_losttrack_dphi","jet_losttrack_charge","jet_losttrack_frompv","jet_losttrack_track_chi2","jet_losttrack_track_qual","jet_losttrack_dz","jet_losttrack_dxy","jet_losttrack_dzsig","jet_losttrack_dxysig","jet_losttrack_etarel","jet_losttrack_trackjet_d3d","jet_losttrack_trackjet_d3dsig","jet_losttrack_trackjet_dist","jet_losttrack_trackjet_decayL","jet_losttrack_npixhits","jet_losttrack_nstriphits","lt_mask"}; - -ParticleNetFeatureEvaluator::ParticleNetFeatureEvaluator(const edm::ParameterSet &iConfig): - jet_radius_(iConfig.getParameter("jet_radius")), - min_jet_pt_(iConfig.getParameter("min_jet_pt")), - max_jet_eta_(iConfig.getParameter("max_jet_eta")), - min_jet_eta_(iConfig.getParameter("min_jet_eta")), - min_pt_for_track_properties_(iConfig.getParameter("min_pt_for_track_properties")), - min_pt_for_pfcandidates_(iConfig.getParameter("min_pt_for_pfcandidates")), - min_pt_for_losttrack_(iConfig.getParameter("min_pt_for_losttrack")), - max_dr_for_losttrack_(iConfig.getParameter("max_dr_for_losttrack")), - min_pt_for_taus_(iConfig.getParameter("min_pt_for_taus")), - max_eta_for_taus_(iConfig.getParameter("max_eta_for_taus")), - use_puppiP4_(iConfig.getParameter("use_puppiP4")), - min_puppi_wgt_(iConfig.getParameter("min_puppi_wgt")), - include_neutrals_(iConfig.getParameter("include_neutrals")), - muon_token_(consumes(iConfig.getParameter("muons"))), - electron_token_(consumes(iConfig.getParameter("electrons"))), - photon_token_(consumes(iConfig.getParameter("photons"))), - tau_token_(consumes(iConfig.getParameter("taus"))), - jet_token_(consumes >(iConfig.getParameter("jets"))), - losttrack_token_(consumes(iConfig.getParameter("losttracks"))), - vtx_token_(consumes(iConfig.getParameter("vertices"))), - sv_token_(consumes(iConfig.getParameter("secondary_vertices"))), - pfcand_token_(consumes >(iConfig.getParameter("pf_candidates"))), - track_builder_token_(esConsumes(edm::ESInputTag("", "TransientTrackBuilder"))) { - +const std::vector ParticleNetFeatureEvaluator::particle_features_{"jet_pfcand_pt_log", + "jet_pfcand_energy_log", + "jet_pfcand_deta", + "jet_pfcand_dphi", + "jet_pfcand_eta", + "jet_pfcand_charge", + "jet_pfcand_frompv", + "jet_pfcand_nlostinnerhits", + "jet_pfcand_track_chi2", + "jet_pfcand_track_qual", + "jet_pfcand_dz", + "jet_pfcand_dzsig", + "jet_pfcand_dxy", + "jet_pfcand_dxysig", + "jet_pfcand_etarel", + "jet_pfcand_pperp_ratio", + "jet_pfcand_ppara_ratio", + "jet_pfcand_trackjet_d3d", + "jet_pfcand_trackjet_d3dsig", + "jet_pfcand_trackjet_dist", + "jet_pfcand_nhits", + "jet_pfcand_npixhits", + "jet_pfcand_nstriphits", + "jet_pfcand_trackjet_decayL", + "jet_pfcand_id", + "jet_pfcand_calofraction", + "jet_pfcand_hcalfraction", + "jet_pfcand_puppiw", + "jet_pfcand_muon_id", + "jet_pfcand_muon_isglobal", + "jet_pfcand_muon_segcomp", + "jet_pfcand_muon_chi2", + "jet_pfcand_muon_nvalidhit", + "jet_pfcand_muon_nstation", + "jet_pfcand_electron_detaIn", + "jet_pfcand_electron_dphiIn", + "jet_pfcand_electron_sigIetaIeta", + "jet_pfcand_electron_sigIphiIphi", + "jet_pfcand_electron_r9", + "jet_pfcand_electron_convProb", + "jet_pfcand_photon_sigIetaIeta", + "jet_pfcand_photon_r9", + "jet_pfcand_photon_eVeto", + "jet_pfcand_tau_signal", + "pfcand_mask"}; + +const std::vector ParticleNetFeatureEvaluator::sv_features_{"jet_sv_pt_log", + "jet_sv_mass", + "jet_sv_deta", + "jet_sv_dphi", + "jet_sv_eta", + "jet_sv_ntrack", + "jet_sv_chi2", + "jet_sv_dxy", + "jet_sv_dxysig", + "jet_sv_d3d", + "jet_sv_d3dsig", + "sv_mask"}; + +const std::vector ParticleNetFeatureEvaluator::losttrack_features_{"jet_losttrack_pt_log", + "jet_losttrack_eta", + "jet_losttrack_deta", + "jet_losttrack_dphi", + "jet_losttrack_charge", + "jet_losttrack_frompv", + "jet_losttrack_track_chi2", + "jet_losttrack_track_qual", + "jet_losttrack_dz", + "jet_losttrack_dxy", + "jet_losttrack_dzsig", + "jet_losttrack_dxysig", + "jet_losttrack_etarel", + "jet_losttrack_trackjet_d3d", + "jet_losttrack_trackjet_d3dsig", + "jet_losttrack_trackjet_dist", + "jet_losttrack_trackjet_decayL", + "jet_losttrack_npixhits", + "jet_losttrack_nstriphits", + "lt_mask"}; + +ParticleNetFeatureEvaluator::ParticleNetFeatureEvaluator(const edm::ParameterSet &iConfig) + : jet_radius_(iConfig.getParameter("jet_radius")), + min_jet_pt_(iConfig.getParameter("min_jet_pt")), + max_jet_eta_(iConfig.getParameter("max_jet_eta")), + min_jet_eta_(iConfig.getParameter("min_jet_eta")), + min_pt_for_track_properties_(iConfig.getParameter("min_pt_for_track_properties")), + min_pt_for_pfcandidates_(iConfig.getParameter("min_pt_for_pfcandidates")), + min_pt_for_losttrack_(iConfig.getParameter("min_pt_for_losttrack")), + max_dr_for_losttrack_(iConfig.getParameter("max_dr_for_losttrack")), + min_pt_for_taus_(iConfig.getParameter("min_pt_for_taus")), + max_eta_for_taus_(iConfig.getParameter("max_eta_for_taus")), + use_puppiP4_(iConfig.getParameter("use_puppiP4")), + min_puppi_wgt_(iConfig.getParameter("min_puppi_wgt")), + include_neutrals_(iConfig.getParameter("include_neutrals")), + muon_token_(consumes(iConfig.getParameter("muons"))), + electron_token_(consumes(iConfig.getParameter("electrons"))), + photon_token_(consumes(iConfig.getParameter("photons"))), + tau_token_(consumes(iConfig.getParameter("taus"))), + jet_token_(consumes>(iConfig.getParameter("jets"))), + losttrack_token_(consumes(iConfig.getParameter("losttracks"))), + vtx_token_(consumes(iConfig.getParameter("vertices"))), + sv_token_(consumes( + iConfig.getParameter("secondary_vertices"))), + pfcand_token_(consumes>(iConfig.getParameter("pf_candidates"))), + track_builder_token_( + esConsumes(edm::ESInputTag("", "TransientTrackBuilder"))) { produces>(); - } ParticleNetFeatureEvaluator::~ParticleNetFeatureEvaluator() {} @@ -224,8 +293,8 @@ void ParticleNetFeatureEvaluator::fillDescriptions(edm::ConfigurationDescription desc.add("min_pt_for_pfcandidates", -1); desc.add("min_pt_for_losttrack", 1); desc.add("max_dr_for_losttrack", 0.4); - desc.add("min_pt_for_taus",20.); - desc.add("max_eta_for_taus",2.5); + desc.add("min_pt_for_taus", 20.); + desc.add("max_eta_for_taus", 2.5); desc.add("use_puppiP4", false); desc.add("include_neutrals", true); desc.add("min_puppi_wgt", -1.); @@ -242,15 +311,14 @@ void ParticleNetFeatureEvaluator::fillDescriptions(edm::ConfigurationDescription } void ParticleNetFeatureEvaluator::produce(edm::Event &iEvent, const edm::EventSetup &iSetup) { - // output collection auto output_tag_infos = std::make_unique>(); // Input jets auto jets = iEvent.getHandle(jet_token_); // Input muons - auto muons = iEvent.getHandle(muon_token_); + auto muons = iEvent.getHandle(muon_token_); // Input taus - auto taus = iEvent.getHandle(tau_token_); + auto taus = iEvent.getHandle(tau_token_); // Input electrons auto electrons = iEvent.getHandle(electron_token_); // Input photons @@ -276,32 +344,34 @@ void ParticleNetFeatureEvaluator::produce(edm::Event &iEvent, const edm::EventSe // tau signal candidates std::vector tau_pfcandidates; for (size_t itau = 0; itau < taus->size(); itau++) { - if(taus->at(itau).pt() < min_pt_for_taus_) continue; - if(fabs(taus->at(itau).eta()) > max_eta_for_taus_) continue; - for(unsigned ipart = 0; ipart < taus->at(itau).signalCands().size(); ipart++){ - const pat::PackedCandidate* pfcand = dynamic_cast (taus->at(itau).signalCands()[ipart].get()); + if (taus->at(itau).pt() < min_pt_for_taus_) + continue; + if (fabs(taus->at(itau).eta()) > max_eta_for_taus_) + continue; + for (unsigned ipart = 0; ipart < taus->at(itau).signalCands().size(); ipart++) { + const pat::PackedCandidate *pfcand = + dynamic_cast(taus->at(itau).signalCands()[ipart].get()); tau_pfcandidates.push_back(pfcand->p4()); } } - + // Loop over jet for (std::size_t jet_n = 0; jet_n < jets->size(); jet_n++) { - - const auto & jet = (*jets)[jet_n]; + const auto &jet = (*jets)[jet_n]; edm::RefToBase jet_ref(jets, jet_n); // create jet features DeepBoostedJetFeatures features; - for (const auto &name : particle_features_) + for (const auto &name : particle_features_) features.add(name); for (const auto &name : sv_features_) features.add(name); // fill values only if above pt threshold and has daughters, otherwise left bool fill_vars = true; - if ((jet.pt() < min_jet_pt_ and dynamic_cast(&jet)->correctedJet("Uncorrected").pt() < min_jet_pt_) or - std::abs(jet.eta()) > max_jet_eta_ or - std::abs(jet.eta()) < min_jet_eta_ ) + if ((jet.pt() < min_jet_pt_ and + dynamic_cast(&jet)->correctedJet("Uncorrected").pt() < min_jet_pt_) or + std::abs(jet.eta()) > max_jet_eta_ or std::abs(jet.eta()) < min_jet_eta_) fill_vars = false; if (jet.numberOfDaughters() == 0) fill_vars = false; @@ -318,92 +388,99 @@ void ParticleNetFeatureEvaluator::produce(edm::Event &iEvent, const edm::EventSe // this should always be done even if features are not filled output_tag_infos->emplace_back(features, jet_ref); - } // move output collection iEvent.put(std::move(output_tag_infos)); } -bool ParticleNetFeatureEvaluator::useTrackProperties(const pat::PackedCandidate* cand) { +bool ParticleNetFeatureEvaluator::useTrackProperties(const pat::PackedCandidate *cand) { const auto *track = cand->bestTrack(); return track != nullptr and track->pt() > min_pt_for_track_properties_; }; -void ParticleNetFeatureEvaluator::fillParticleFeatures(DeepBoostedJetFeatures & fts, - const reco::Jet & jet, - const std::vector & tau_pfcandidates, - const pat::MuonCollection & muons, - const pat::ElectronCollection & electrons, - const pat::PhotonCollection & photons - ) { +void ParticleNetFeatureEvaluator::fillParticleFeatures(DeepBoostedJetFeatures &fts, + const reco::Jet &jet, + const std::vector &tau_pfcandidates, + const pat::MuonCollection &muons, + const pat::ElectronCollection &electrons, + const pat::PhotonCollection &photons) { // some jet properties math::XYZVector jet_dir = jet.momentum().Unit(); - TVector3 jet_direction (jet.momentum().Unit().x(), jet.momentum().Unit().y(), jet.momentum().Unit().z()); - GlobalVector jet_ref_track_dir (jet.px(), jet.py(), jet.pz()); + TVector3 jet_direction(jet.momentum().Unit().x(), jet.momentum().Unit().y(), jet.momentum().Unit().z()); + GlobalVector jet_ref_track_dir(jet.px(), jet.py(), jet.pz()); // vertexes reco::VertexRefProd PVRefProd(vtxs_); // track builder - TrackInfoBuilder trackinfo (track_builder_); + TrackInfoBuilder trackinfo(track_builder_); // make list of pf-candidates to be considered - std::vector daughters; + std::vector daughters; for (const auto &dau : jet.daughterPtrVector()) { - // remove particles w/ extremely low puppi weights - const pat::PackedCandidate* cand = dynamic_cast(&(*dau)); - if(not cand) - throw edm::Exception(edm::errors::InvalidReference) - << "Cannot convert to either pat::PackedCandidate"; - if(cand->puppiWeight() < min_puppi_wgt_) continue; + // remove particles w/ extremely low puppi weights + const pat::PackedCandidate *cand = dynamic_cast(&(*dau)); + if (not cand) + throw edm::Exception(edm::errors::InvalidReference) << "Cannot convert to either pat::PackedCandidate"; + if (cand->puppiWeight() < min_puppi_wgt_) + continue; // base requirements on PF candidates - if (cand->pt() < min_pt_for_pfcandidates_) continue; + if (cand->pt() < min_pt_for_pfcandidates_) + continue; // charged candidate selection (for Higgs Interaction Net) - if (!include_neutrals_ and (cand->charge() == 0 or cand->pt() < min_pt_for_track_properties_)) continue; + if (!include_neutrals_ and (cand->charge() == 0 or cand->pt() < min_pt_for_track_properties_)) + continue; // filling daughters daughters.push_back(cand); } // sort by Puppi-weighted pt if (use_puppiP4_) - std::sort(daughters.begin(), daughters.end(), [&](const pat::PackedCandidate* a, const pat::PackedCandidate* b) { - return a->puppiWeight() * a->pt() > b->puppiWeight() * b->pt(); - }); + std::sort(daughters.begin(), daughters.end(), [&](const pat::PackedCandidate *a, const pat::PackedCandidate *b) { + return a->puppiWeight() * a->pt() > b->puppiWeight() * b->pt(); + }); // sort by original pt (not Puppi-weighted) else - std::sort(daughters.begin(), daughters.end(), [](const auto &a, const auto &b) { return a->pt() > b->pt();}); - + std::sort(daughters.begin(), daughters.end(), [](const auto &a, const auto &b) { return a->pt() > b->pt(); }); + // reserve space for (const auto &name : particle_features_) fts.reserve(name, daughters.size()); // Build observables for (const auto &cand : daughters) { - - if (!include_neutrals_ and !useTrackProperties(cand)) continue; - + if (!include_neutrals_ and !useTrackProperties(cand)) + continue; + // input particle is a packed PF candidate auto candP4 = use_puppiP4_ ? cand->puppiWeight() * cand->p4() : cand->p4(); auto candP3 = use_puppiP4_ ? cand->puppiWeight() * cand->momentum() : cand->momentum(); - + // candidate track const reco::Track *track = nullptr; - if(useTrackProperties(cand)) + if (useTrackProperties(cand)) track = cand->bestTrack(); // reco-vertex association reco::VertexRef pv_ass = reco::VertexRef(vtxs_, 0); - math::XYZPoint pv_ass_pos = pv_ass->position(); + math::XYZPoint pv_ass_pos = pv_ass->position(); TVector3 cand_direction(candP3.x(), candP3.y(), candP3.z()); - + fts.fill("jet_pfcand_pt_log", std::isnan(std::log(candP4.pt())) ? 0 : std::log(candP4.pt())); fts.fill("jet_pfcand_energy_log", std::isnan(std::log(candP4.energy())) ? 0 : std::log(candP4.energy())); fts.fill("jet_pfcand_eta", candP4.eta()); fts.fill("jet_pfcand_deta", jet_direction.Eta() - cand_direction.Eta()); fts.fill("jet_pfcand_dphi", jet_direction.DeltaPhi(cand_direction)); fts.fill("jet_pfcand_charge", cand->charge()); - fts.fill("jet_pfcand_etarel", std::isnan(reco::btau::etaRel(jet_dir, candP3)) ? 0 : reco::btau::etaRel(jet_dir, candP3)); - fts.fill("jet_pfcand_pperp_ratio", std::isnan(jet_direction.Perp(cand_direction) / cand_direction.Mag()) ? 0 : jet_direction.Perp(cand_direction) / cand_direction.Mag()); - fts.fill("jet_pfcand_ppara_ratio", std::isnan(jet_direction.Dot(cand_direction) / cand_direction.Mag()) ? 0 : jet_direction.Dot(cand_direction) / cand_direction.Mag()); + fts.fill("jet_pfcand_etarel", + std::isnan(reco::btau::etaRel(jet_dir, candP3)) ? 0 : reco::btau::etaRel(jet_dir, candP3)); + fts.fill("jet_pfcand_pperp_ratio", + std::isnan(jet_direction.Perp(cand_direction) / cand_direction.Mag()) + ? 0 + : jet_direction.Perp(cand_direction) / cand_direction.Mag()); + fts.fill("jet_pfcand_ppara_ratio", + std::isnan(jet_direction.Dot(cand_direction) / cand_direction.Mag()) + ? 0 + : jet_direction.Dot(cand_direction) / cand_direction.Mag()); fts.fill("jet_pfcand_frompv", cand->fromPV()); fts.fill("jet_pfcand_dz", std::isnan(cand->dz(pv_ass_pos)) ? 0 : cand->dz(pv_ass_pos)); fts.fill("jet_pfcand_dxy", std::isnan(cand->dxy(pv_ass_pos)) ? 0 : cand->dxy(pv_ass_pos)); @@ -413,45 +490,51 @@ void ParticleNetFeatureEvaluator::fillParticleFeatures(DeepBoostedJetFeatures & fts.fill("jet_pfcand_npixhits", cand->numberOfPixelHits()); fts.fill("jet_pfcand_nstriphits", cand->stripLayersWithMeasurement()); - if(abs(cand->pdgId()) == 11 and cand->charge() != 0) - fts.fill("jet_pfcand_id",0); - else if(abs(cand->pdgId()) == 13 and cand->charge() != 0) - fts.fill("jet_pfcand_id",1); - else if(abs(cand->pdgId()) == 22 and cand->charge() == 0) - fts.fill("jet_pfcand_id",2); - else if(abs(cand->pdgId()) != 22 and cand->charge() == 0 and abs(cand->pdgId()) != 1 and abs(cand->pdgId()) != 2) - fts.fill("jet_pfcand_id",3); - else if(abs(cand->pdgId()) != 11 and abs(cand->pdgId()) != 13 and cand->charge() != 0) - fts.fill("jet_pfcand_id",4); - else if(cand->charge() == 0 and abs(cand->pdgId()) == 1) - fts.fill("jet_pfcand_id",5); - else if(cand->charge() == 0 and abs(cand->pdgId()) == 2) - fts.fill("jet_pfcand_id",6); + if (abs(cand->pdgId()) == 11 and cand->charge() != 0) + fts.fill("jet_pfcand_id", 0); + else if (abs(cand->pdgId()) == 13 and cand->charge() != 0) + fts.fill("jet_pfcand_id", 1); + else if (abs(cand->pdgId()) == 22 and cand->charge() == 0) + fts.fill("jet_pfcand_id", 2); + else if (abs(cand->pdgId()) != 22 and cand->charge() == 0 and abs(cand->pdgId()) != 1 and abs(cand->pdgId()) != 2) + fts.fill("jet_pfcand_id", 3); + else if (abs(cand->pdgId()) != 11 and abs(cand->pdgId()) != 13 and cand->charge() != 0) + fts.fill("jet_pfcand_id", 4); + else if (cand->charge() == 0 and abs(cand->pdgId()) == 1) + fts.fill("jet_pfcand_id", 5); + else if (cand->charge() == 0 and abs(cand->pdgId()) == 2) + fts.fill("jet_pfcand_id", 6); else - fts.fill("jet_pfcand_id",-1); + fts.fill("jet_pfcand_id", -1); - fts.fill("jet_pfcand_hcalfraction",std::isnan(cand->hcalFraction()) ? 0 : cand->hcalFraction()); - fts.fill("jet_pfcand_calofraction",std::isnan(cand->caloFraction()) ? 0 : cand->caloFraction()); + fts.fill("jet_pfcand_hcalfraction", std::isnan(cand->hcalFraction()) ? 0 : cand->hcalFraction()); + fts.fill("jet_pfcand_calofraction", std::isnan(cand->caloFraction()) ? 0 : cand->caloFraction()); fts.fill("pfcand_mask", 1); if (track) { - fts.fill("jet_pfcand_dzsig", std::isnan(fabs(cand->dz(pv_ass_pos)) / cand->dzError()) ? 0 : fabs(cand->dz(pv_ass_pos)) / cand->dzError()); - fts.fill("jet_pfcand_dxysig", std::isnan(fabs(cand->dxy(pv_ass_pos)) / cand->dxyError()) ? 0 : fabs(cand->dxy(pv_ass_pos)) / cand->dxyError()); + fts.fill( + "jet_pfcand_dzsig", + std::isnan(fabs(cand->dz(pv_ass_pos)) / cand->dzError()) ? 0 : fabs(cand->dz(pv_ass_pos)) / cand->dzError()); + fts.fill("jet_pfcand_dxysig", + std::isnan(fabs(cand->dxy(pv_ass_pos)) / cand->dxyError()) + ? 0 + : fabs(cand->dxy(pv_ass_pos)) / cand->dxyError()); fts.fill("jet_pfcand_track_chi2", track->normalizedChi2()); fts.fill("jet_pfcand_track_qual", track->qualityMask()); reco::TransientTrack transientTrack = track_builder_->build(*track); - Measurement1D meas_ip2d = IPTools::signedTransverseImpactParameter(transientTrack, jet_ref_track_dir, *pv_).second; - Measurement1D meas_ip3d = IPTools::signedImpactParameter3D(transientTrack, jet_ref_track_dir, *pv_).second; + Measurement1D meas_ip2d = + IPTools::signedTransverseImpactParameter(transientTrack, jet_ref_track_dir, *pv_).second; + Measurement1D meas_ip3d = IPTools::signedImpactParameter3D(transientTrack, jet_ref_track_dir, *pv_).second; Measurement1D meas_jetdist = IPTools::jetTrackDistance(transientTrack, jet_ref_track_dir, *pv_).second; - Measurement1D meas_decayl = IPTools::signedDecayLength3D(transientTrack, jet_ref_track_dir, *pv_).second; + Measurement1D meas_decayl = IPTools::signedDecayLength3D(transientTrack, jet_ref_track_dir, *pv_).second; fts.fill("jet_pfcand_trackjet_d3d", std::isnan(meas_ip3d.value()) ? 0 : meas_ip3d.value()); - fts.fill("jet_pfcand_trackjet_d3dsig", std::isnan(fabs(meas_ip3d.significance())) ? 0 : fabs(meas_ip3d.significance())); + fts.fill("jet_pfcand_trackjet_d3dsig", + std::isnan(fabs(meas_ip3d.significance())) ? 0 : fabs(meas_ip3d.significance())); fts.fill("jet_pfcand_trackjet_dist", std::isnan(-meas_jetdist.value()) ? 0 : -meas_jetdist.value()); - fts.fill("jet_pfcand_trackjet_decayL", std::isnan(meas_decayl.value()) ? 0 : meas_decayl.value()); - } - else { + fts.fill("jet_pfcand_trackjet_decayL", std::isnan(meas_decayl.value()) ? 0 : meas_decayl.value()); + } else { fts.fill("jet_pfcand_dzsig", 0); fts.fill("jet_pfcand_dxysig", 0); fts.fill("jet_pfcand_track_chi2", 0); @@ -463,129 +546,139 @@ void ParticleNetFeatureEvaluator::fillParticleFeatures(DeepBoostedJetFeatures & } // muons specific - if(abs(cand->pdgId()) == 13){ + if (abs(cand->pdgId()) == 13) { std::vector muonsToSkip; int ipos = -1; float minDR = 1000; for (size_t i = 0; i < muons.size(); i++) { - if(not muons[i].isPFMuon()) continue; - if(std::find(muonsToSkip.begin(),muonsToSkip.end(),i) != muonsToSkip.end()) continue; - float dR = reco::deltaR(muons[i].p4(),candP4); - if(dR < jet_radius_ and dR < minDR){ - minDR = dR; - ipos = i; - muonsToSkip.push_back(i); - } - } - if(ipos >= 0){ - int muonId = 0; - if(muons[ipos].passed(reco::Muon::CutBasedIdLoose)) muonId++; - if(muons[ipos].passed(reco::Muon::CutBasedIdMedium)) muonId++; - if(muons[ipos].passed(reco::Muon::CutBasedIdTight)) muonId++; - if(muons[ipos].passed(reco::Muon::CutBasedIdGlobalHighPt)) muonId++; - if(muons[ipos].passed(reco::Muon::CutBasedIdTrkHighPt)) muonId++; - fts.fill("jet_pfcand_muon_id",muonId); - fts.fill("jet_pfcand_muon_isglobal",muons[ipos].isGlobalMuon()); - fts.fill("jet_pfcand_muon_chi2",(muons[ipos].isGlobalMuon()) ? muons[ipos].globalTrack()->normalizedChi2(): 0); - fts.fill("jet_pfcand_muon_nvalidhit",(muons[ipos].isGlobalMuon()) ? muons[ipos].globalTrack()->hitPattern().numberOfValidMuonHits() : 0); - fts.fill("jet_pfcand_muon_nstation",muons[ipos].numberOfMatchedStations()); - fts.fill("jet_pfcand_muon_segcomp",muon::segmentCompatibility(muons[ipos])); + if (not muons[i].isPFMuon()) + continue; + if (std::find(muonsToSkip.begin(), muonsToSkip.end(), i) != muonsToSkip.end()) + continue; + float dR = reco::deltaR(muons[i].p4(), candP4); + if (dR < jet_radius_ and dR < minDR) { + minDR = dR; + ipos = i; + muonsToSkip.push_back(i); + } } - else{ - fts.fill("jet_pfcand_muon_id",0); - fts.fill("jet_pfcand_muon_isglobal",0); - fts.fill("jet_pfcand_muon_chi2",0); - fts.fill("jet_pfcand_muon_nvalidhit",0); - fts.fill("jet_pfcand_muon_nstation",0); - fts.fill("jet_pfcand_muon_segcomp",0); + if (ipos >= 0) { + int muonId = 0; + if (muons[ipos].passed(reco::Muon::CutBasedIdLoose)) + muonId++; + if (muons[ipos].passed(reco::Muon::CutBasedIdMedium)) + muonId++; + if (muons[ipos].passed(reco::Muon::CutBasedIdTight)) + muonId++; + if (muons[ipos].passed(reco::Muon::CutBasedIdGlobalHighPt)) + muonId++; + if (muons[ipos].passed(reco::Muon::CutBasedIdTrkHighPt)) + muonId++; + fts.fill("jet_pfcand_muon_id", muonId); + fts.fill("jet_pfcand_muon_isglobal", muons[ipos].isGlobalMuon()); + fts.fill("jet_pfcand_muon_chi2", + (muons[ipos].isGlobalMuon()) ? muons[ipos].globalTrack()->normalizedChi2() : 0); + fts.fill("jet_pfcand_muon_nvalidhit", + (muons[ipos].isGlobalMuon()) ? muons[ipos].globalTrack()->hitPattern().numberOfValidMuonHits() : 0); + fts.fill("jet_pfcand_muon_nstation", muons[ipos].numberOfMatchedStations()); + fts.fill("jet_pfcand_muon_segcomp", muon::segmentCompatibility(muons[ipos])); + } else { + fts.fill("jet_pfcand_muon_id", 0); + fts.fill("jet_pfcand_muon_isglobal", 0); + fts.fill("jet_pfcand_muon_chi2", 0); + fts.fill("jet_pfcand_muon_nvalidhit", 0); + fts.fill("jet_pfcand_muon_nstation", 0); + fts.fill("jet_pfcand_muon_segcomp", 0); } + } else { + fts.fill("jet_pfcand_muon_id", 0); + fts.fill("jet_pfcand_muon_isglobal", 0); + fts.fill("jet_pfcand_muon_chi2", 0); + fts.fill("jet_pfcand_muon_nvalidhit", 0); + fts.fill("jet_pfcand_muon_nstation", 0); + fts.fill("jet_pfcand_muon_segcomp", 0); } - else{ - fts.fill("jet_pfcand_muon_id",0); - fts.fill("jet_pfcand_muon_isglobal",0); - fts.fill("jet_pfcand_muon_chi2",0); - fts.fill("jet_pfcand_muon_nvalidhit",0); - fts.fill("jet_pfcand_muon_nstation",0); - fts.fill("jet_pfcand_muon_segcomp",0); - } - + // electrons specific - if(abs(cand->pdgId()) == 11){ - int ipos = -1; + if (abs(cand->pdgId()) == 11) { + int ipos = -1; for (size_t i = 0; i < electrons.size(); i++) { - if(electrons[i].isPF()){ - for(const auto & element : electrons[i].associatedPackedPFCandidates()){ - if(abs(element->pdgId()) == 11 and element->p4() == candP4) - ipos = i; - } - } - } - if(ipos >= 0){ - fts.fill("jet_pfcand_electron_detaIn",std::isnan(electrons[ipos].deltaEtaSuperClusterTrackAtVtx()) ? 0 : electrons[ipos].deltaEtaSuperClusterTrackAtVtx()); - fts.fill("jet_pfcand_electron_dphiIn",std::isnan(electrons[ipos].deltaPhiSuperClusterTrackAtVtx()) ? 0 : electrons[ipos].deltaPhiSuperClusterTrackAtVtx()); - fts.fill("jet_pfcand_electron_sigIetaIeta",std::isnan(electrons[ipos].full5x5_sigmaIetaIeta()) ? 0 : electrons[ipos].full5x5_sigmaIetaIeta()); - fts.fill("jet_pfcand_electron_sigIphiIphi",std::isnan(electrons[ipos].full5x5_sigmaIphiIphi()) ? 0 : electrons[ipos].full5x5_sigmaIphiIphi()); - fts.fill("jet_pfcand_electron_r9",std::isnan(electrons[ipos].full5x5_r9()) ? 0 : electrons[ipos].full5x5_r9()); - fts.fill("jet_pfcand_electron_convProb",std::isnan(electrons[ipos].convVtxFitProb()) ? 0 : electrons[ipos].convVtxFitProb()); + if (electrons[i].isPF()) { + for (const auto &element : electrons[i].associatedPackedPFCandidates()) { + if (abs(element->pdgId()) == 11 and element->p4() == candP4) + ipos = i; + } + } } - else{ - fts.fill("jet_pfcand_electron_detaIn",0); - fts.fill("jet_pfcand_electron_dphiIn",0); - fts.fill("jet_pfcand_electron_sigIetaIeta",0); - fts.fill("jet_pfcand_electron_sigIphiIphi",0); - fts.fill("jet_pfcand_electron_r9",0); - fts.fill("jet_pfcand_electron_convProb",0); + if (ipos >= 0) { + fts.fill("jet_pfcand_electron_detaIn", + std::isnan(electrons[ipos].deltaEtaSuperClusterTrackAtVtx()) + ? 0 + : electrons[ipos].deltaEtaSuperClusterTrackAtVtx()); + fts.fill("jet_pfcand_electron_dphiIn", + std::isnan(electrons[ipos].deltaPhiSuperClusterTrackAtVtx()) + ? 0 + : electrons[ipos].deltaPhiSuperClusterTrackAtVtx()); + fts.fill("jet_pfcand_electron_sigIetaIeta", + std::isnan(electrons[ipos].full5x5_sigmaIetaIeta()) ? 0 : electrons[ipos].full5x5_sigmaIetaIeta()); + fts.fill("jet_pfcand_electron_sigIphiIphi", + std::isnan(electrons[ipos].full5x5_sigmaIphiIphi()) ? 0 : electrons[ipos].full5x5_sigmaIphiIphi()); + fts.fill("jet_pfcand_electron_r9", std::isnan(electrons[ipos].full5x5_r9()) ? 0 : electrons[ipos].full5x5_r9()); + fts.fill("jet_pfcand_electron_convProb", + std::isnan(electrons[ipos].convVtxFitProb()) ? 0 : electrons[ipos].convVtxFitProb()); + } else { + fts.fill("jet_pfcand_electron_detaIn", 0); + fts.fill("jet_pfcand_electron_dphiIn", 0); + fts.fill("jet_pfcand_electron_sigIetaIeta", 0); + fts.fill("jet_pfcand_electron_sigIphiIphi", 0); + fts.fill("jet_pfcand_electron_r9", 0); + fts.fill("jet_pfcand_electron_convProb", 0); } - } - else{ - fts.fill("jet_pfcand_electron_detaIn",0); - fts.fill("jet_pfcand_electron_dphiIn",0); - fts.fill("jet_pfcand_electron_sigIetaIeta",0); - fts.fill("jet_pfcand_electron_sigIphiIphi",0); - fts.fill("jet_pfcand_electron_r9",0); - fts.fill("jet_pfcand_electron_convProb",0); + } else { + fts.fill("jet_pfcand_electron_detaIn", 0); + fts.fill("jet_pfcand_electron_dphiIn", 0); + fts.fill("jet_pfcand_electron_sigIetaIeta", 0); + fts.fill("jet_pfcand_electron_sigIphiIphi", 0); + fts.fill("jet_pfcand_electron_r9", 0); + fts.fill("jet_pfcand_electron_convProb", 0); } // photons specific - if(abs(cand->pdgId()) == 22){ - int ipos = -1; + if (abs(cand->pdgId()) == 22) { + int ipos = -1; for (size_t i = 0; i < photons.size(); i++) { - for(const auto & element : photons[i].associatedPackedPFCandidates()){ - if(abs(element->pdgId()) == 22 and element->p4() == candP4) - ipos = i; - } - } - if(ipos >= 0){ - fts.fill("jet_pfcand_photon_sigIetaIeta",std::isnan(photons[ipos].full5x5_sigmaIetaIeta()) ? 0 : photons[ipos].full5x5_sigmaIetaIeta()); - fts.fill("jet_pfcand_photon_r9",std::isnan(photons[ipos].full5x5_r9()) ? 0 : photons[ipos].full5x5_r9()); - fts.fill("jet_pfcand_photon_eVeto",photons[ipos].passElectronVeto()); + for (const auto &element : photons[i].associatedPackedPFCandidates()) { + if (abs(element->pdgId()) == 22 and element->p4() == candP4) + ipos = i; + } } - else{ - fts.fill("jet_pfcand_photon_sigIetaIeta",0); - fts.fill("jet_pfcand_photon_r9",0); - fts.fill("jet_pfcand_photon_eVeto",0); + if (ipos >= 0) { + fts.fill("jet_pfcand_photon_sigIetaIeta", + std::isnan(photons[ipos].full5x5_sigmaIetaIeta()) ? 0 : photons[ipos].full5x5_sigmaIetaIeta()); + fts.fill("jet_pfcand_photon_r9", std::isnan(photons[ipos].full5x5_r9()) ? 0 : photons[ipos].full5x5_r9()); + fts.fill("jet_pfcand_photon_eVeto", photons[ipos].passElectronVeto()); + } else { + fts.fill("jet_pfcand_photon_sigIetaIeta", 0); + fts.fill("jet_pfcand_photon_r9", 0); + fts.fill("jet_pfcand_photon_eVeto", 0); } + } else { + fts.fill("jet_pfcand_photon_sigIetaIeta", 0); + fts.fill("jet_pfcand_photon_r9", 0); + fts.fill("jet_pfcand_photon_eVeto", 0); } - else{ - fts.fill("jet_pfcand_photon_sigIetaIeta",0); - fts.fill("jet_pfcand_photon_r9",0); - fts.fill("jet_pfcand_photon_eVeto",0); - } - - // tau specific prior to any puppi weight application - if(std::find(tau_pfcandidates.begin(),tau_pfcandidates.end(),cand->p4()) != tau_pfcandidates.end()) - fts.fill("jet_pfcand_tau_signal",1); - else - fts.fill("jet_pfcand_tau_signal",0); + // tau specific prior to any puppi weight application + if (std::find(tau_pfcandidates.begin(), tau_pfcandidates.end(), cand->p4()) != tau_pfcandidates.end()) + fts.fill("jet_pfcand_tau_signal", 1); + else + fts.fill("jet_pfcand_tau_signal", 0); } } -void ParticleNetFeatureEvaluator::fillSVFeatures(DeepBoostedJetFeatures &fts, - const reco::Jet & jet) { - +void ParticleNetFeatureEvaluator::fillSVFeatures(DeepBoostedJetFeatures &fts, const reco::Jet &jet) { // secondary vertexes matching jet - std::vector jetSVs; + std::vector jetSVs; for (const auto &sv : *svs_) { if (reco::deltaR2(sv, jet) < jet_radius_ * jet_radius_) { jetSVs.push_back(&sv); @@ -595,17 +688,16 @@ void ParticleNetFeatureEvaluator::fillSVFeatures(DeepBoostedJetFeatures &fts, // sort by dxy significance std::sort(jetSVs.begin(), jetSVs.end(), - [&](const reco::VertexCompositePtrCandidate *sva, - const reco::VertexCompositePtrCandidate *svb) { + [&](const reco::VertexCompositePtrCandidate *sva, const reco::VertexCompositePtrCandidate *svb) { return sv_vertex_comparator(*sva, *svb, *pv_); }); // reserve space for (const auto &name : sv_features_) fts.reserve(name, jetSVs.size()); - + GlobalVector jet_global_vec(jet.px(), jet.py(), jet.pz()); - + for (const auto *sv : jetSVs) { fts.fill("sv_mask", 1); fts.fill("jet_sv_pt_log", std::isnan(std::log(sv->pt())) ? 0 : std::log(sv->pt())); @@ -615,98 +707,101 @@ void ParticleNetFeatureEvaluator::fillSVFeatures(DeepBoostedJetFeatures &fts, fts.fill("jet_sv_dphi", sv->phi() - jet.phi()); fts.fill("jet_sv_ntrack", sv->numberOfDaughters()); fts.fill("jet_sv_chi2", sv->vertexNormalizedChi2()); - + reco::Vertex::CovarianceMatrix csv; sv->fillVertexCovariance(csv); reco::Vertex svtx(sv->vertex(), csv); - + VertexDistanceXY dxy; auto valxy = dxy.signedDistance(svtx, *pv_, jet_global_vec); fts.fill("jet_sv_dxy", std::isnan(valxy.value()) ? 0 : valxy.value()); fts.fill("jet_sv_dxysig", std::isnan(fabs(valxy.significance())) ? 0 : fabs(valxy.significance())); - + VertexDistance3D d3d; auto val3d = d3d.signedDistance(svtx, *pv_, jet_global_vec); fts.fill("jet_sv_d3d", std::isnan(val3d.value()) ? 0 : val3d.value()); fts.fill("jet_sv_d3dsig", std::isnan(fabs(val3d.significance())) ? 0 : fabs(val3d.significance())); - } } -void ParticleNetFeatureEvaluator::fillLostTrackFeatures(DeepBoostedJetFeatures &fts, - const reco::Jet & jet - ) { - +void ParticleNetFeatureEvaluator::fillLostTrackFeatures(DeepBoostedJetFeatures &fts, const reco::Jet &jet) { // some jet properties - TVector3 jet_direction (jet.momentum().Unit().x(), jet.momentum().Unit().y(), jet.momentum().Unit().z()); - GlobalVector jet_ref_track_dir (jet.px(), jet.py(), jet.pz()); + TVector3 jet_direction(jet.momentum().Unit().x(), jet.momentum().Unit().y(), jet.momentum().Unit().z()); + GlobalVector jet_ref_track_dir(jet.px(), jet.py(), jet.pz()); math::XYZVector jet_dir = jet.momentum().Unit(); std::vector jet_lost_tracks; - for(size_t itrk = 0; itrk < losttracks_->size(); itrk++){ - if(reco::deltaR(losttracks_->at(itrk).p4(),jet.p4()) < max_dr_for_losttrack_ and - losttracks_->at(itrk).pt() > min_pt_for_losttrack_ ){ + for (size_t itrk = 0; itrk < losttracks_->size(); itrk++) { + if (reco::deltaR(losttracks_->at(itrk).p4(), jet.p4()) < max_dr_for_losttrack_ and + losttracks_->at(itrk).pt() > min_pt_for_losttrack_) { jet_lost_tracks.push_back(losttracks_->at(itrk)); } } - std::sort(jet_lost_tracks.begin(), jet_lost_tracks.end(), [](const auto &a, const auto &b) { return a.pt() > b.pt();}); + std::sort( + jet_lost_tracks.begin(), jet_lost_tracks.end(), [](const auto &a, const auto &b) { return a.pt() > b.pt(); }); // reserve space for (const auto &name : losttrack_features_) fts.reserve(name, jet_lost_tracks.size()); reco::VertexRef pv_ass = reco::VertexRef(vtxs_, 0); - math::XYZPoint pv_ass_pos = pv_ass->position(); - - for(auto const & ltrack : jet_lost_tracks){ - - fts.fill("jet_losttrack_pt_log",std::isnan(std::log(ltrack.pt())) ? 0 : std::log(ltrack.pt())); - fts.fill("jet_losttrack_eta",ltrack.eta()); - fts.fill("jet_losttrack_charge",ltrack.charge()); - fts.fill("jet_losttrack_frompv",ltrack.fromPV()); - fts.fill("jet_losttrack_dz",std::isnan(ltrack.dz(pv_ass_pos)) ? 0 : ltrack.dz(pv_ass_pos)); - fts.fill("jet_losttrack_dxy",std::isnan(ltrack.dxy(pv_ass_pos)) ? 0 : ltrack.dxy(pv_ass_pos)); - fts.fill("jet_losttrack_npixhits",ltrack.numberOfPixelHits()); - fts.fill("jet_losttrack_nstriphits",ltrack.stripLayersWithMeasurement()); - - TVector3 ltrack_momentum (ltrack.momentum().x(),ltrack.momentum().y(),ltrack.momentum().z()); - fts.fill("jet_losttrack_deta",jet_direction.Eta()-ltrack_momentum.Eta()); - fts.fill("jet_losttrack_dphi",jet_direction.DeltaPhi(ltrack_momentum)); - fts.fill("jet_losttrack_etarel",std::isnan(reco::btau::etaRel(jet_dir,ltrack.momentum())) ? 0 : reco::btau::etaRel(jet_dir,ltrack.momentum())); - - const reco::Track* track = ltrack.bestTrack(); - if(track){ - fts.fill("jet_losttrack_track_chi2",track->normalizedChi2()); - fts.fill("jet_losttrack_track_qual",track->qualityMask()); - fts.fill("jet_losttrack_dxysig",std::isnan(fabs(ltrack.dxy(pv_ass_pos))/ltrack.dxyError()) ? 0 : fabs(ltrack.dxy(pv_ass_pos))/ltrack.dxyError()); - fts.fill("jet_losttrack_dzsig",std::isnan(fabs(ltrack.dz(pv_ass_pos))/ltrack.dzError()) ? 0 : fabs(ltrack.dz(pv_ass_pos))/ltrack.dzError()); + math::XYZPoint pv_ass_pos = pv_ass->position(); + + for (auto const <rack : jet_lost_tracks) { + fts.fill("jet_losttrack_pt_log", std::isnan(std::log(ltrack.pt())) ? 0 : std::log(ltrack.pt())); + fts.fill("jet_losttrack_eta", ltrack.eta()); + fts.fill("jet_losttrack_charge", ltrack.charge()); + fts.fill("jet_losttrack_frompv", ltrack.fromPV()); + fts.fill("jet_losttrack_dz", std::isnan(ltrack.dz(pv_ass_pos)) ? 0 : ltrack.dz(pv_ass_pos)); + fts.fill("jet_losttrack_dxy", std::isnan(ltrack.dxy(pv_ass_pos)) ? 0 : ltrack.dxy(pv_ass_pos)); + fts.fill("jet_losttrack_npixhits", ltrack.numberOfPixelHits()); + fts.fill("jet_losttrack_nstriphits", ltrack.stripLayersWithMeasurement()); + + TVector3 ltrack_momentum(ltrack.momentum().x(), ltrack.momentum().y(), ltrack.momentum().z()); + fts.fill("jet_losttrack_deta", jet_direction.Eta() - ltrack_momentum.Eta()); + fts.fill("jet_losttrack_dphi", jet_direction.DeltaPhi(ltrack_momentum)); + fts.fill("jet_losttrack_etarel", + std::isnan(reco::btau::etaRel(jet_dir, ltrack.momentum())) + ? 0 + : reco::btau::etaRel(jet_dir, ltrack.momentum())); + + const reco::Track *track = ltrack.bestTrack(); + if (track) { + fts.fill("jet_losttrack_track_chi2", track->normalizedChi2()); + fts.fill("jet_losttrack_track_qual", track->qualityMask()); + fts.fill("jet_losttrack_dxysig", + std::isnan(fabs(ltrack.dxy(pv_ass_pos)) / ltrack.dxyError()) + ? 0 + : fabs(ltrack.dxy(pv_ass_pos)) / ltrack.dxyError()); + fts.fill("jet_losttrack_dzsig", + std::isnan(fabs(ltrack.dz(pv_ass_pos)) / ltrack.dzError()) + ? 0 + : fabs(ltrack.dz(pv_ass_pos)) / ltrack.dzError()); reco::TransientTrack transientTrack = track_builder_->build(*track); - Measurement1D meas_ip3d = IPTools::signedImpactParameter3D(transientTrack, jet_ref_track_dir, *pv_).second; + Measurement1D meas_ip3d = IPTools::signedImpactParameter3D(transientTrack, jet_ref_track_dir, *pv_).second; Measurement1D meas_jetdist = IPTools::jetTrackDistance(transientTrack, jet_ref_track_dir, *pv_).second; - Measurement1D meas_decayl = IPTools::signedDecayLength3D(transientTrack, jet_ref_track_dir, *pv_).second; + Measurement1D meas_decayl = IPTools::signedDecayLength3D(transientTrack, jet_ref_track_dir, *pv_).second; fts.fill("jet_losttrack_trackjet_d3d", std::isnan(meas_ip3d.value()) ? 0 : meas_ip3d.value()); - fts.fill("jet_losttrack_trackjet_d3dsig", std::isnan(fabs(meas_ip3d.significance())) ? 0 : fabs(meas_ip3d.significance())); + fts.fill("jet_losttrack_trackjet_d3dsig", + std::isnan(fabs(meas_ip3d.significance())) ? 0 : fabs(meas_ip3d.significance())); fts.fill("jet_losttrack_trackjet_dist", std::isnan(-meas_jetdist.value()) ? 0 : -meas_jetdist.value()); - fts.fill("jet_losttrack_trackjet_decayL", std::isnan(meas_decayl.value()) ? 0 : meas_decayl.value()); - } - else{ - fts.fill("jet_losttrack_track_chi2",0); - fts.fill("jet_losttrack_track_qual",0); - fts.fill("jet_losttrack_dxysig",0); - fts.fill("jet_losttrack_dzsig",0); + fts.fill("jet_losttrack_trackjet_decayL", std::isnan(meas_decayl.value()) ? 0 : meas_decayl.value()); + } else { + fts.fill("jet_losttrack_track_chi2", 0); + fts.fill("jet_losttrack_track_qual", 0); + fts.fill("jet_losttrack_dxysig", 0); + fts.fill("jet_losttrack_dzsig", 0); fts.fill("jet_losttrack_trackjet_d3d", 0); fts.fill("jet_losttrack_trackjet_d3dsig", 0); fts.fill("jet_losttrack_trackjet_dist", 0); fts.fill("jet_losttrack_trackjet_decayL", 0); } - fts.fill("lt_mask",1); - + fts.fill("lt_mask", 1); } } // define this as a plug-in DEFINE_FWK_MODULE(ParticleNetFeatureEvaluator); - From 7d30f14ca71845f736643f330f4d990ce3db7122 Mon Sep 17 00:00:00 2001 From: Sam Harper Date: Tue, 14 Feb 2023 17:24:31 +0100 Subject: [PATCH 015/233] updating format to that suggested by Laurent T --- PhysicsTools/NanoAOD/python/l1trig_cff.py | 50 ++++++++++++++++++----- 1 file changed, 39 insertions(+), 11 deletions(-) diff --git a/PhysicsTools/NanoAOD/python/l1trig_cff.py b/PhysicsTools/NanoAOD/python/l1trig_cff.py index d9f005d41aed6..d9e830ad65223 100644 --- a/PhysicsTools/NanoAOD/python/l1trig_cff.py +++ b/PhysicsTools/NanoAOD/python/l1trig_cff.py @@ -20,6 +20,31 @@ hwIso = Var("hwIso()",int,doc="hardware iso") ) +l1JetReducedVars = cms.PSet( + l1P3Vars +) + +l1EtSumReducedVars = cms.PSet( + l1PtVars +) +l1EGReducedVars = cms.PSet( + l1P3Vars, + hwIso = Var("hwIso()",int,doc="hardware iso") +) + +l1TauReducedVars = cms.PSet( + l1P3Vars, + hwIso = Var("hwIso()",int,doc="hardware iso") +) + +l1MuonReducedVars = cms.PSet( + hwQual = Var("hwQual()",int,doc="hardware qual"), + hwCharge = Var("hwCharge()",int,doc=""), + etaAtVtx = Var("etaAtVtx()",float,doc=""), + phiAtVtx = Var("phiAtVtx()",float,doc=""), + ptUnconstrained = Var("ptUnconstrained()",float,doc=""), + hwDXY = Var("hwDXY()",int,doc=""), +) l1MuTable = cms.EDProducer("SimpleTriggerL1MuonFlatTableProducer", src = cms.InputTag("gmtStage2Digis","Muon"), @@ -28,7 +53,7 @@ cut = cms.string(""), name= cms.string("L1Mu"), doc = cms.string(""), - extension = cms.bool(False), # this is the main table for L1 EGs + extension = cms.bool(False), variables = cms.PSet(l1ObjVars, hwCharge = Var("hwCharge()",int,doc=""), hwChargeValid = Var("hwChargeValid()",int,doc=""), @@ -56,7 +81,7 @@ cut = cms.string(""), name= cms.string("L1Jet"), doc = cms.string(""), - extension = cms.bool(False), # this is the main table for L1 EGs + extension = cms.bool(False), variables = cms.PSet(l1ObjVars, towerIEta = Var("towerIEta()",int,doc=""), towerIPhi = Var("towerIPhi()",int,doc=""), @@ -97,7 +122,7 @@ cut = cms.string(""), name= cms.string("L1EtSum"), doc = cms.string(""), - extension = cms.bool(False), # this is the main table for L1 EGs + extension = cms.bool(False), variables = cms.PSet(l1PtVars, hwPt = Var("hwPt()",int,doc="hardware pt"), hwPhi = Var("hwPhi()",int,doc="hardware phi"), @@ -112,7 +137,7 @@ cut = cms.string(""), name= cms.string("L1EG"), doc = cms.string(""), - extension = cms.bool(False), # this is the main table for L1 EGs + extension = cms.bool(False), variables = cms.PSet(l1ObjVars, towerIEta = Var("towerIEta()",int,doc="tower ieta"), towerIPhi = Var("towerIPhi()",int,doc="tower iphi"), @@ -134,10 +159,11 @@ def setL1NanoToReduced(process): """ #reduce the variables to the core variables #note et sum variables are already reduced - process.l1EGTable.variables = cms.PSet(l1ObjVars) - process.l1MuTable.variables = cms.PSet(l1ObjVars) - process.l1JetTable.variables = cms.PSet(l1ObjVars) - process.l1TauTable.variables = cms.PSet(l1ObjVars) + process.l1EGTable.variables = cms.PSet(l1EGReducedVars) + process.l1MuTable.variables = cms.PSet(l1MuonReducedVars) + process.l1JetTable.variables = cms.PSet(l1JetReducedVars) + process.l1TauTable.variables = cms.PSet(l1TauReducedVars) + process.l1EtSumTable.variables = cms.PSet(l1EtSumReducedVars) #restrict bx process.l1EGTable.minBX = 0 @@ -152,9 +178,11 @@ def setL1NanoToReduced(process): process.l1EtSumTable.maxBX = 0 #apply cuts - process.l1EGTable.cut="hwPt>=10" - process.l1TauTable.cut="hwPt>=50" - process.l1JetTable.cut="hwPt>=100" + process.l1EGTable.cut="pt>=10" + process.l1TauTable.cut="pt>=24" + process.l1JetTable.cut="pt>=30" + process.l1MuTable.cut="pt>=3 && hwQual>=8" + process.l1EtSumTable.cut="(getType==8 || getType==1)" return process From 79f3a5b949828e5c761b84f690dad7c36f4a3778 Mon Sep 17 00:00:00 2001 From: Nurfikri Norjoharuddeen Date: Wed, 15 Feb 2023 19:15:57 +0100 Subject: [PATCH 016/233] Set fallback puppi weight to 1.0 for packed_cand also. throw exception when jet is weighted but no ValueMap is set. code-checks formatting. --- .../interface/ChargedCandidateConverter.h | 5 +- .../interface/NeutralCandidateConverter.h | 5 +- .../plugins/DeepBoostedJetTagInfoProducer.cc | 17 ++++-- .../plugins/DeepDoubleXTagInfoProducer.cc | 59 +++++++++++++------ .../plugins/DeepFlavourTagInfoProducer.cc | 36 +++++++---- .../src/ChargedCandidateConverter.cc | 4 +- .../src/NeutralCandidateConverter.cc | 4 +- 7 files changed, 85 insertions(+), 45 deletions(-) diff --git a/RecoBTag/FeatureTools/interface/ChargedCandidateConverter.h b/RecoBTag/FeatureTools/interface/ChargedCandidateConverter.h index c621d5cd22f09..f88f01b3daf7c 100644 --- a/RecoBTag/FeatureTools/interface/ChargedCandidateConverter.h +++ b/RecoBTag/FeatureTools/interface/ChargedCandidateConverter.h @@ -35,10 +35,11 @@ namespace btagbtvdeep { c_pf_features.deltaR = reco::deltaR(*c_pf, jet); float constituentWeight = 1.; - if (isWeightedJet) constituentWeight = puppiw; + if (isWeightedJet) + constituentWeight = puppiw; c_pf_features.ptrel = catch_infs_and_bound((c_pf->pt() * constituentWeight) / jet.pt(), 0, -1, 0, -1); - c_pf_features.ptrel_noclip = (c_pf->pt() * constituentWeight) / jet.pt(); + c_pf_features.ptrel_noclip = (c_pf->pt() * constituentWeight) / jet.pt(); c_pf_features.erel = (c_pf->energy() * constituentWeight) / jet.energy(); const float etasign = jet.eta() > 0 ? 1 : -1; diff --git a/RecoBTag/FeatureTools/interface/NeutralCandidateConverter.h b/RecoBTag/FeatureTools/interface/NeutralCandidateConverter.h index b54234180308e..1b6d4a9170ae1 100644 --- a/RecoBTag/FeatureTools/interface/NeutralCandidateConverter.h +++ b/RecoBTag/FeatureTools/interface/NeutralCandidateConverter.h @@ -40,7 +40,8 @@ namespace btagbtvdeep { n_pf_features.drsubjet2 = drSubjetFeatures.second; float constituentWeight = 1.; - if (isWeightedJet) constituentWeight = puppiw; + if (isWeightedJet) + constituentWeight = puppiw; // Jet relative vars n_pf_features.ptrel = catch_infs_and_bound((n_pf->pt() * constituentWeight) / jet.pt(), 0, -1, 0, -1); @@ -49,7 +50,7 @@ namespace btagbtvdeep { n_pf_features.deltaR = catch_infs_and_bound(reco::deltaR(*n_pf, jet), 0, -0.6, 0, -0.6); n_pf_features.deltaR_noclip = reco::deltaR(*n_pf, jet); - + n_pf_features.isGamma = 0; if (std::abs(n_pf->pdgId()) == 22) n_pf_features.isGamma = 1; diff --git a/RecoBTag/FeatureTools/plugins/DeepBoostedJetTagInfoProducer.cc b/RecoBTag/FeatureTools/plugins/DeepBoostedJetTagInfoProducer.cc index d4fd8427af5bb..e59b71267ac48 100644 --- a/RecoBTag/FeatureTools/plugins/DeepBoostedJetTagInfoProducer.cc +++ b/RecoBTag/FeatureTools/plugins/DeepBoostedJetTagInfoProducer.cc @@ -200,6 +200,9 @@ DeepBoostedJetTagInfoProducer::DeepBoostedJetTagInfoProducer(const edm::Paramete if (!puppi_value_map_tag.label().empty()) { puppi_value_map_token_ = consumes>(puppi_value_map_tag); use_puppi_value_map_ = true; + } else if (use_puppiP4_) { + throw edm::Exception(edm::errors::Configuration, + "puppi_value_map is not set but use_puppiP4 is set to True. Must also set puppi_value_map."); } const auto &pvas_tag = iConfig.getParameter("vertex_associator"); @@ -323,14 +326,16 @@ void DeepBoostedJetTagInfoProducer::produce(edm::Event &iEvent, const edm::Event float DeepBoostedJetTagInfoProducer::puppiWgt(const reco::CandidatePtr &cand) { const auto *pack_cand = dynamic_cast(&(*cand)); const auto *reco_cand = dynamic_cast(&(*cand)); - float wgt = 1.; - if (pack_cand){ - //fallback value - wgt = pack_cand->puppiWeight(); + + // + // Access puppi weight from ValueMap. + // + float wgt = 1.; // Set to fallback value + + if (pack_cand) { if (use_puppi_value_map_) wgt = (*puppi_value_map_)[cand]; - } - else if (reco_cand) { + } else if (reco_cand) { if (use_puppi_value_map_) wgt = (*puppi_value_map_)[cand]; } else diff --git a/RecoBTag/FeatureTools/plugins/DeepDoubleXTagInfoProducer.cc b/RecoBTag/FeatureTools/plugins/DeepDoubleXTagInfoProducer.cc index 8d408f94a534f..2642bd7c47dee 100644 --- a/RecoBTag/FeatureTools/plugins/DeepDoubleXTagInfoProducer.cc +++ b/RecoBTag/FeatureTools/plugins/DeepDoubleXTagInfoProducer.cc @@ -79,17 +79,19 @@ DeepDoubleXTagInfoProducer::DeepDoubleXTagInfoProducer(const edm::ParameterSet& shallow_tag_info_token_( consumes(iConfig.getParameter("shallow_tag_infos"))), track_builder_token_( - esConsumes(edm::ESInputTag("", "TransientTrackBuilder"))), + esConsumes(edm::ESInputTag("", "TransientTrackBuilder"))), use_puppi_value_map_(false), fallback_puppi_weight_(iConfig.getParameter("fallback_puppi_weight")), - is_weighted_jet_(iConfig.getParameter("is_weighted_jet")) - { + is_weighted_jet_(iConfig.getParameter("is_weighted_jet")) { produces(); const auto& puppi_value_map_tag = iConfig.getParameter("puppi_value_map"); if (!puppi_value_map_tag.label().empty()) { puppi_value_map_token_ = consumes>(puppi_value_map_tag); use_puppi_value_map_ = true; + } else if (is_weighted_jet_) { + throw edm::Exception(edm::errors::Configuration, + "puppi_value_map is not set but jet is weighted. Must set puppi_value_map."); } } @@ -289,34 +291,37 @@ void DeepDoubleXTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSet reco::PFCandidatePtr reco_ptr; if (pf_jet) { reco_ptr = pf_jet->getPFConstituent(i); - } + } reco::CandidatePtr cand_ptr; - if (pat_jet){ + if (pat_jet) { cand_ptr = pat_jet->sourceCandidatePtr(i); } - float puppiw = 1.0; // fallback value + // + // Access puppi weight from ValueMap. + // + float puppiw = 1.0; // Set to fallback value + if (reco_cand) { - puppiw = 1.0; // fallback value for reco_cand if (use_puppi_value_map_) puppiw = (*puppi_value_map)[reco_ptr]; else if (!fallback_puppi_weight_) { throw edm::Exception(edm::errors::InvalidReference, "PUPPI value map missing") - << "use fallback_puppi_weight option to use " << puppiw << " for reco_cand as default"; + << "use fallback_puppi_weight option to use " << puppiw << " for reco_cand as default"; } - } - else if(packed_cand){ - puppiw = packed_cand->puppiWeight(); // fallback value for packed_cand + } else if (packed_cand) { if (use_puppi_value_map_) puppiw = (*puppi_value_map)[cand_ptr]; else if (!fallback_puppi_weight_) { throw edm::Exception(edm::errors::InvalidReference, "PUPPI value map missing") - << "use fallback_puppi_weight option to use puppiWeight() for packed_cand as default"; + << "use fallback_puppi_weight option to use " << puppiw << " for packed_cand as default"; } + } else { + throw edm::Exception(edm::errors::InvalidReference) + << "Cannot convert to either reco::PFCandidate or pat::PackedCandidate"; } - float drminpfcandsv = btagbtvdeep::mindrsvpfcand(svs_unsorted, cand, jet_radius_); if (cand->charge() != 0) { // is charged candidate @@ -326,8 +331,14 @@ void DeepDoubleXTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSet // get_ref to vector element auto& c_pf_features = features.c_pf_features.at(entry); if (packed_cand) { - btagbtvdeep::packedCandidateToFeatures( - packed_cand, *pat_jet, trackinfo, is_weighted_jet_, drminpfcandsv, static_cast(jet_radius_), puppiw, c_pf_features); + btagbtvdeep::packedCandidateToFeatures(packed_cand, + *pat_jet, + trackinfo, + is_weighted_jet_, + drminpfcandsv, + static_cast(jet_radius_), + puppiw, + c_pf_features); } else if (reco_cand) { // get vertex association quality int pv_ass_quality = 0; // fallback value @@ -362,11 +373,21 @@ void DeepDoubleXTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSet auto& n_pf_features = features.n_pf_features.at(entry); // // fill feature structure if (packed_cand) { - btagbtvdeep::packedCandidateToFeatures( - packed_cand, *pat_jet, is_weighted_jet_, drminpfcandsv, static_cast(jet_radius_), puppiw, n_pf_features); + btagbtvdeep::packedCandidateToFeatures(packed_cand, + *pat_jet, + is_weighted_jet_, + drminpfcandsv, + static_cast(jet_radius_), + puppiw, + n_pf_features); } else if (reco_cand) { - btagbtvdeep::recoCandidateToFeatures( - reco_cand, jet, is_weighted_jet_, drminpfcandsv, static_cast(jet_radius_), puppiw, n_pf_features); + btagbtvdeep::recoCandidateToFeatures(reco_cand, + jet, + is_weighted_jet_, + drminpfcandsv, + static_cast(jet_radius_), + puppiw, + n_pf_features); } } } diff --git a/RecoBTag/FeatureTools/plugins/DeepFlavourTagInfoProducer.cc b/RecoBTag/FeatureTools/plugins/DeepFlavourTagInfoProducer.cc index 681c5ca0ee5e6..0bbb98b2442d5 100644 --- a/RecoBTag/FeatureTools/plugins/DeepFlavourTagInfoProducer.cc +++ b/RecoBTag/FeatureTools/plugins/DeepFlavourTagInfoProducer.cc @@ -139,6 +139,9 @@ DeepFlavourTagInfoProducer::DeepFlavourTagInfoProducer(const edm::ParameterSet& if (!puppi_value_map_tag.label().empty()) { puppi_value_map_token_ = consumes>(puppi_value_map_tag); use_puppi_value_map_ = true; + } else if (is_weighted_jet_) { + throw edm::Exception(edm::errors::Configuration, + "puppi_value_map is not set but jet is weighted. Must set puppi_value_map."); } const auto& pvas_tag = iConfig.getParameter("vertex_associator"); @@ -368,31 +371,33 @@ void DeepFlavourTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSet reco_ptr = pat_jet->getPFConstituent(i); } - reco::CandidatePtr cand_ptr; - if (pat_jet){ + reco::CandidatePtr cand_ptr; + if (pat_jet) { cand_ptr = pat_jet->sourceCandidatePtr(i); } - // get PUPPI weight from value map - float puppiw = 1.0; // fallback value + // + // Access puppi weight from ValueMap. + // + float puppiw = 1.0; // Set to fallback value if (reco_cand) { - puppiw = 1.0; // fallback value for reco_cand if (use_puppi_value_map_) puppiw = (*puppi_value_map)[reco_ptr]; else if (!fallback_puppi_weight_) { throw edm::Exception(edm::errors::InvalidReference, "PUPPI value map missing") - << "use fallback_puppi_weight option to use " << puppiw << " for reco_cand as default"; + << "use fallback_puppi_weight option to use " << puppiw << " for reco_cand as default"; } - } - else if(packed_cand){ - puppiw = packed_cand->puppiWeight(); // fallback value for packed_cand + } else if (packed_cand) { if (use_puppi_value_map_) puppiw = (*puppi_value_map)[cand_ptr]; else if (!fallback_puppi_weight_) { throw edm::Exception(edm::errors::InvalidReference, "PUPPI value map missing") - << "use fallback_puppi_weight option to use puppiWeight() for packed_cand as default"; + << "use fallback_puppi_weight option to use " << puppiw << " for packed_cand as default"; } + } else { + throw edm::Exception(edm::errors::InvalidReference) + << "Cannot convert to either reco::PFCandidate or pat::PackedCandidate"; } float drminpfcandsv = btagbtvdeep::mindrsvpfcand(svs_unsorted, cand); @@ -409,8 +414,15 @@ void DeepFlavourTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSet auto& c_pf_features = features.c_pf_features.at(entry); // fill feature structure if (packed_cand) { - btagbtvdeep::packedCandidateToFeatures( - packed_cand, jet, trackinfo, is_weighted_jet_, drminpfcandsv, static_cast(jet_radius_), puppiw, c_pf_features, flip_); + btagbtvdeep::packedCandidateToFeatures(packed_cand, + jet, + trackinfo, + is_weighted_jet_, + drminpfcandsv, + static_cast(jet_radius_), + puppiw, + c_pf_features, + flip_); } else if (reco_cand) { // get vertex association quality int pv_ass_quality = 0; // fallback value diff --git a/RecoBTag/FeatureTools/src/ChargedCandidateConverter.cc b/RecoBTag/FeatureTools/src/ChargedCandidateConverter.cc index 4ef8c31b7597c..84d0fdb2d1cca 100644 --- a/RecoBTag/FeatureTools/src/ChargedCandidateConverter.cc +++ b/RecoBTag/FeatureTools/src/ChargedCandidateConverter.cc @@ -5,7 +5,7 @@ namespace btagbtvdeep { void packedCandidateToFeatures(const pat::PackedCandidate* c_pf, const pat::Jet& jet, const TrackInfoBuilder& track_info, - const bool isWeightedJet, + const bool isWeightedJet, const float drminpfcandsv, const float jetR, const float puppiw, @@ -39,7 +39,7 @@ namespace btagbtvdeep { void recoCandidateToFeatures(const reco::PFCandidate* c_pf, const reco::Jet& jet, const TrackInfoBuilder& track_info, - const bool isWeightedJet, + const bool isWeightedJet, const float drminpfcandsv, const float jetR, const float puppiw, diff --git a/RecoBTag/FeatureTools/src/NeutralCandidateConverter.cc b/RecoBTag/FeatureTools/src/NeutralCandidateConverter.cc index 62135055589c3..95772b14d0618 100644 --- a/RecoBTag/FeatureTools/src/NeutralCandidateConverter.cc +++ b/RecoBTag/FeatureTools/src/NeutralCandidateConverter.cc @@ -4,7 +4,7 @@ namespace btagbtvdeep { void packedCandidateToFeatures(const pat::PackedCandidate* n_pf, const pat::Jet& jet, - const bool isWeightedJet, + const bool isWeightedJet, const float drminpfcandsv, const float jetR, const float puppiw, @@ -17,7 +17,7 @@ namespace btagbtvdeep { void recoCandidateToFeatures(const reco::PFCandidate* n_pf, const reco::Jet& jet, - const bool isWeightedJet, + const bool isWeightedJet, const float drminpfcandsv, const float jetR, const float puppiw, From 06594450b583ccd9cb53ba6bea136e8ecc638bb9 Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Thu, 16 Feb 2023 15:05:57 +0100 Subject: [PATCH 017/233] add test cfgs for ParticleNetFromMiniAOD --- .../test_particle_from_miniaod_ak4chs_cfg.py | 95 +++++++++++++++++++ ...test_particle_from_miniaod_ak4puppi_cfg.py | 95 +++++++++++++++++++ .../test_particle_from_miniaod_ak8_cfg.py | 78 +++++++++++++++ 3 files changed, 268 insertions(+) create mode 100644 RecoBTag/ONNXRuntime/test/test_particle_from_miniaod_ak4chs_cfg.py create mode 100644 RecoBTag/ONNXRuntime/test/test_particle_from_miniaod_ak4puppi_cfg.py create mode 100644 RecoBTag/ONNXRuntime/test/test_particle_from_miniaod_ak8_cfg.py diff --git a/RecoBTag/ONNXRuntime/test/test_particle_from_miniaod_ak4chs_cfg.py b/RecoBTag/ONNXRuntime/test/test_particle_from_miniaod_ak4chs_cfg.py new file mode 100644 index 0000000000000..8d18f274b372c --- /dev/null +++ b/RecoBTag/ONNXRuntime/test/test_particle_from_miniaod_ak4chs_cfg.py @@ -0,0 +1,95 @@ +### CMSSW command line parameter parser +import FWCore.ParameterSet.Config as cms + + +process = cms.Process("test") + +# Message Logger settings +process.load("FWCore.MessageService.MessageLogger_cfi") +process.MessageLogger.cerr.FwkReport.reportEvery = 250 +process.load("RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff") + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(100) +) + +process.options = cms.untracked.PSet( + allowUnscheduled = cms.untracked.bool(True), + wantSummary = cms.untracked.bool(True), + numberOfThreads = cms.untracked.uint32(8), + numberOfStreams = cms.untracked.uint32(0) +) + +process.source = cms.Source("PoolSource", + fileNames = cms.untracked.vstring("/store/mc/RunIISummer20UL18MiniAODv2/TTToSemiLeptonic_TuneCP5_13TeV-powheg-pythia8/MINIAODSIM/106X_upgrade2018_realistic_v16_L1v1-v2/130000/25BF763A-BF41-E242-86A2-5E0BE8EF605C.root") +) + +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') +process.load('Configuration.StandardSequences.GeometryDB_cff') +process.load('Configuration.StandardSequences.MagneticField_cff') +process.load('TrackingTools.TransientTrack.TransientTrackBuilder_cfi') + +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2018_realistic', '') + + +from PhysicsTools.PatAlgos.producersLayer1.jetUpdater_cfi import updatedPatJets +process.slimmedJetsUpdated = updatedPatJets.clone( + jetSource = "slimmedJets", + addJetCorrFactors = False, + discriminatorSources = cms.VInputTag( + cms.InputTag("pfParticleNetFromMiniAODAK4CHSCentralJetTags:probb"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSCentralJetTags:probc"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSCentralJetTags:probuds"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSCentralJetTags:probg"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSCentralJetTags:probmu"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSCentralJetTags:probele"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSCentralJetTags:probtaup1h0p"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSCentralJetTags:probtaup1h1p"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSCentralJetTags:probtaup1h2p"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSCentralJetTags:probtaup3h0p"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSCentralJetTags:probtaup3h1p"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSCentralJetTags:probtaum1h0p"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSCentralJetTags:probtaum1h1p"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSCentralJetTags:probtaum1h2p"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSCentralJetTags:probtaum3h0p"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSCentralJetTags:probtaum3h1p"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSCentralJetTags:ptcorr"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSCentralJetTags:ptnu"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSCentralJetTags:ptreshigh"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSCentralJetTags:ptreslow"), + + cms.InputTag("pfParticleNetFromMiniAODAK4CHSForwardJetTags:probq"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSForwardJetTags:probg"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSForwardJetTags:ptcorr"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSForwardJetTags:ptnu"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSForwardJetTags:ptreshigh"), + cms.InputTag("pfParticleNetFromMiniAODAK4CHSForwardJetTags:ptreslow"), + + ) +) + + +process.path = cms.Path( + process.slimmedJetsUpdated,process.pfParticleNetFromMiniAODAK4CHSTask +) + +process.output = cms.OutputModule( "PoolOutputModule", + fileName = cms.untracked.string( "test.root" ), + compressionAlgorithm = cms.untracked.string('LZMA'), + compressionLevel = cms.untracked.int32(4), + eventAutoFlushCompressedSize = cms.untracked.int32(31457280), + dataset = cms.untracked.PSet( + dataTier = cms.untracked.string( 'RECO' ), + filterName = cms.untracked.string( '' ) + ), + overrideBranchesSplitLevel = cms.untracked.VPSet(), + outputCommands = cms.untracked.vstring( + 'drop *', + 'keep *_*slimmedJetsUpdated*_*_*', + ) +) + +process.endpath = cms.EndPath(process.output); +process.schedule = cms.Schedule(process.path,process.endpath); + diff --git a/RecoBTag/ONNXRuntime/test/test_particle_from_miniaod_ak4puppi_cfg.py b/RecoBTag/ONNXRuntime/test/test_particle_from_miniaod_ak4puppi_cfg.py new file mode 100644 index 0000000000000..844113f2973db --- /dev/null +++ b/RecoBTag/ONNXRuntime/test/test_particle_from_miniaod_ak4puppi_cfg.py @@ -0,0 +1,95 @@ +### CMSSW command line parameter parser +import FWCore.ParameterSet.Config as cms + + +process = cms.Process("test") + +# Message Logger settings +process.load("FWCore.MessageService.MessageLogger_cfi") +process.MessageLogger.cerr.FwkReport.reportEvery = 250 +process.load("RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff") + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(100) +) + +process.options = cms.untracked.PSet( + allowUnscheduled = cms.untracked.bool(True), + wantSummary = cms.untracked.bool(True), + numberOfThreads = cms.untracked.uint32(8), + numberOfStreams = cms.untracked.uint32(0) +) + +process.source = cms.Source("PoolSource", + fileNames = cms.untracked.vstring("/store/mc/RunIISummer20UL18MiniAODv2/TTToSemiLeptonic_TuneCP5_13TeV-powheg-pythia8/MINIAODSIM/106X_upgrade2018_realistic_v16_L1v1-v2/130000/25BF763A-BF41-E242-86A2-5E0BE8EF605C.root") +) + +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') +process.load('Configuration.StandardSequences.GeometryDB_cff') +process.load('Configuration.StandardSequences.MagneticField_cff') +process.load('TrackingTools.TransientTrack.TransientTrackBuilder_cfi') + +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2018_realistic', '') + + +from PhysicsTools.PatAlgos.producersLayer1.jetUpdater_cfi import updatedPatJets +process.slimmedJetsUpdated = updatedPatJets.clone( + jetSource = "slimmedJetsPuppi", + addJetCorrFactors = False, + discriminatorSources = cms.VInputTag( + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiCentralJetTags:probb"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiCentralJetTags:probc"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiCentralJetTags:probuds"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiCentralJetTags:probg"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiCentralJetTags:probmu"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiCentralJetTags:probele"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiCentralJetTags:probtaup1h0p"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiCentralJetTags:probtaup1h1p"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiCentralJetTags:probtaup1h2p"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiCentralJetTags:probtaup3h0p"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiCentralJetTags:probtaup3h1p"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiCentralJetTags:probtaum1h0p"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiCentralJetTags:probtaum1h1p"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiCentralJetTags:probtaum1h2p"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiCentralJetTags:probtaum3h0p"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiCentralJetTags:probtaum3h1p"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiCentralJetTags:ptcorr"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiCentralJetTags:ptnu"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiCentralJetTags:ptreshigh"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiCentralJetTags:ptreslow"), + + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiForwardJetTags:probq"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiForwardJetTags:probg"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiForwardJetTags:ptcorr"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiForwardJetTags:ptnu"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiForwardJetTags:ptreshigh"), + cms.InputTag("pfParticleNetFromMiniAODAK4PuppiForwardJetTags:ptreslow"), + + ) +) + + +process.path = cms.Path( + process.slimmedJetsUpdated,process.pfParticleNetFromMiniAODAK4PuppiTask +) + +process.output = cms.OutputModule( "PoolOutputModule", + fileName = cms.untracked.string( "test.root" ), + compressionAlgorithm = cms.untracked.string('LZMA'), + compressionLevel = cms.untracked.int32(4), + eventAutoFlushCompressedSize = cms.untracked.int32(31457280), + dataset = cms.untracked.PSet( + dataTier = cms.untracked.string( 'RECO' ), + filterName = cms.untracked.string( '' ) + ), + overrideBranchesSplitLevel = cms.untracked.VPSet(), + outputCommands = cms.untracked.vstring( + 'drop *', + 'keep *_*slimmedJetsUpdated*_*_*', + ) +) + +process.endpath = cms.EndPath(process.output); +process.schedule = cms.Schedule(process.path,process.endpath); + diff --git a/RecoBTag/ONNXRuntime/test/test_particle_from_miniaod_ak8_cfg.py b/RecoBTag/ONNXRuntime/test/test_particle_from_miniaod_ak8_cfg.py new file mode 100644 index 0000000000000..230ce0d042a6d --- /dev/null +++ b/RecoBTag/ONNXRuntime/test/test_particle_from_miniaod_ak8_cfg.py @@ -0,0 +1,78 @@ +### CMSSW command line parameter parser +import FWCore.ParameterSet.Config as cms + + +process = cms.Process("test") + +# Message Logger settings +process.load("FWCore.MessageService.MessageLogger_cfi") +process.MessageLogger.cerr.FwkReport.reportEvery = 250 +process.load("RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK8_cff") + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(100) +) + +process.options = cms.untracked.PSet( + allowUnscheduled = cms.untracked.bool(True), + wantSummary = cms.untracked.bool(True), + numberOfThreads = cms.untracked.uint32(8), + numberOfStreams = cms.untracked.uint32(0) +) + +process.source = cms.Source("PoolSource", + fileNames = cms.untracked.vstring("/store/mc/RunIISummer20UL18MiniAODv2/TTToSemiLeptonic_TuneCP5_13TeV-powheg-pythia8/MINIAODSIM/106X_upgrade2018_realistic_v16_L1v1-v2/130000/25BF763A-BF41-E242-86A2-5E0BE8EF605C.root") +) + +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') +process.load('Configuration.StandardSequences.GeometryDB_cff') +process.load('Configuration.StandardSequences.MagneticField_cff') +process.load('TrackingTools.TransientTrack.TransientTrackBuilder_cfi') + +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2018_realistic', '') + + +from PhysicsTools.PatAlgos.producersLayer1.jetUpdater_cfi import updatedPatJets +process.slimmedJetsUpdated = updatedPatJets.clone( + jetSource = "slimmedJetsAK8", + addJetCorrFactors = False, + discriminatorSources = cms.VInputTag( + cms.InputTag("pfParticleNetFromMiniAODAK8JetTags:probHtt"), + cms.InputTag("pfParticleNetFromMiniAODAK8JetTags:probHtm"), + cms.InputTag("pfParticleNetFromMiniAODAK8JetTags:probHte"), + cms.InputTag("pfParticleNetFromMiniAODAK8JetTags:probHbb"), + cms.InputTag("pfParticleNetFromMiniAODAK8JetTags:probHcc"), + cms.InputTag("pfParticleNetFromMiniAODAK8JetTags:probHqq"), + cms.InputTag("pfParticleNetFromMiniAODAK8JetTags:probHgg"), + cms.InputTag("pfParticleNetFromMiniAODAK8JetTags:probQCD2hf"), + cms.InputTag("pfParticleNetFromMiniAODAK8JetTags:probQCD1hf"), + cms.InputTag("pfParticleNetFromMiniAODAK8JetTags:probQCD0hf"), + cms.InputTag("pfParticleNetFromMiniAODAK8JetTags:masscorr"), + ) +) + + +process.path = cms.Path( + process.slimmedJetsUpdated,process.pfParticleNetFromMiniAODAK8Task +) + +process.output = cms.OutputModule( "PoolOutputModule", + fileName = cms.untracked.string( "test.root" ), + compressionAlgorithm = cms.untracked.string('LZMA'), + compressionLevel = cms.untracked.int32(4), + eventAutoFlushCompressedSize = cms.untracked.int32(31457280), + dataset = cms.untracked.PSet( + dataTier = cms.untracked.string( 'RECO' ), + filterName = cms.untracked.string( '' ) + ), + overrideBranchesSplitLevel = cms.untracked.VPSet(), + outputCommands = cms.untracked.vstring( + 'drop *', + 'keep *_*slimmedJetsUpdated*_*_*', + ) +) + +process.endpath = cms.EndPath(process.output); +process.schedule = cms.Schedule(process.path,process.endpath); + From a773bdb72062275e4636eef05257116872f214fd Mon Sep 17 00:00:00 2001 From: Sam Harper Date: Thu, 16 Feb 2023 15:55:18 +0100 Subject: [PATCH 018/233] adjusting pt/eta/phi precision, adding ET types 2 and 3 --- PhysicsTools/NanoAOD/python/l1trig_cff.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/PhysicsTools/NanoAOD/python/l1trig_cff.py b/PhysicsTools/NanoAOD/python/l1trig_cff.py index d9e830ad65223..467998c794a93 100644 --- a/PhysicsTools/NanoAOD/python/l1trig_cff.py +++ b/PhysicsTools/NanoAOD/python/l1trig_cff.py @@ -3,12 +3,12 @@ from PhysicsTools.NanoAOD.common_cff import * l1PtVars = cms.PSet( - pt = Var("pt", float, precision=5), - phi = Var("phi", float, precision=5), + pt = Var("pt", float, precision=10), + phi = Var("phi", float, precision=10), ) l1P3Vars = cms.PSet( l1PtVars, - eta = Var("eta", float, precision=5), + eta = Var("eta", float, precision=10), ) l1ObjVars = cms.PSet( @@ -182,7 +182,6 @@ def setL1NanoToReduced(process): process.l1TauTable.cut="pt>=24" process.l1JetTable.cut="pt>=30" process.l1MuTable.cut="pt>=3 && hwQual>=8" - process.l1EtSumTable.cut="(getType==8 || getType==1)" - + process.l1EtSumTable.cut="(getType==8 || getType==1 || getType==2 || getType==3)" return process From fa8a4b47d3997e29f129a6ec9514326b4b213252 Mon Sep 17 00:00:00 2001 From: abellora Date: Tue, 28 Feb 2023 09:26:35 +0100 Subject: [PATCH 019/233] Added DQM module for PPS random stream --- DQM/CTPPS/plugins/CTPPSRandomDQMSource.cc | 201 ++++++++++++++++++ DQM/CTPPS/python/ctppsDQM_cff.py | 15 ++ DQM/CTPPS/python/ctppsRandomDQMSource_cfi.py | 8 + .../pps_random_dqm_test_from_alcaraw_cfg.py | 62 ++++++ 4 files changed, 286 insertions(+) create mode 100644 DQM/CTPPS/plugins/CTPPSRandomDQMSource.cc create mode 100644 DQM/CTPPS/python/ctppsRandomDQMSource_cfi.py create mode 100644 DQM/CTPPS/test/pps_random_dqm_test_from_alcaraw_cfg.py diff --git a/DQM/CTPPS/plugins/CTPPSRandomDQMSource.cc b/DQM/CTPPS/plugins/CTPPSRandomDQMSource.cc new file mode 100644 index 0000000000000..73e0a56683c3a --- /dev/null +++ b/DQM/CTPPS/plugins/CTPPSRandomDQMSource.cc @@ -0,0 +1,201 @@ +/****************************************** + * + * This is a part of CTPPSDQM software. + * Authors: + * A. Bellora (Universita' e INFN Torino) + * + *******************************************/ + +#include "FWCore/Framework/interface/ESHandle.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/InputTag.h" + +#include "DQMServices/Core/interface/DQMEDAnalyzer.h" +#include "DQMServices/Core/interface/DQMStore.h" + +#include "DataFormats/Common/interface/DetSetVector.h" + +#include "CondFormats/PPSObjects/interface/CTPPSPixelIndices.h" +#include "DataFormats/CTPPSDetId/interface/CTPPSDetId.h" +#include "DataFormats/CTPPSDigi/interface/CTPPSPixelDigi.h" +#include "DataFormats/CTPPSDigi/interface/CTPPSPixelDataError.h" +#include "DataFormats/CTPPSReco/interface/CTPPSPixelCluster.h" +#include "DataFormats/CTPPSReco/interface/CTPPSPixelLocalTrack.h" +#include "DataFormats/Common/interface/TriggerResults.h" + +#include + +//----------------------------------------------------------------------------- + +class CTPPSRandomDQMSource : public DQMEDAnalyzer { +public: + CTPPSRandomDQMSource(const edm::ParameterSet &ps); + ~CTPPSRandomDQMSource() {}; + +protected: + void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override; + void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; + void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override; + +private: + edm::EDGetTokenT> tokenDigi; + + static constexpr int NArms = 2; + static constexpr int NStationMAX = 3; // in an arm + static constexpr int NRPotsMAX = 6; // per station + static constexpr int NplaneMAX = 6; // per RPot + static constexpr int RPn_first = 3, RPn_last = 4; + static constexpr int StationIDMAX = 4; // possible range of ID + static constexpr int RPotsIDMAX = 8; // possible range of ID + + unsigned int rpStatusWord = 0x8008; // 220_fr_hr(stn2rp3)+ 210_fr_hr + int RPstatus[StationIDMAX][RPotsIDMAX]; // symmetric in both arms + int StationStatus[StationIDMAX]; // symmetric in both arms + const int IndexNotValid = 0; + + MonitorElement *hBX; + + static constexpr int RPotsTotalNumber = NArms * NStationMAX * NRPotsMAX; + + int RPindexValid[RPotsTotalNumber]; + MonitorElement *h2HitsVsBXRandoms[RPotsTotalNumber]; + + int getRPindex(int arm, int station, int rp) { + if (arm < 0 || station < 0 || rp < 0) + return (IndexNotValid); + if (arm > 1 || station >= NStationMAX || rp >= NRPotsMAX) + return (IndexNotValid); + int rc = (arm * NStationMAX + station) * NRPotsMAX + rp; + return (rc); + } + +}; + +//---------------------------------------------------------------------------------- + +using namespace std; +using namespace edm; + +//------------------------------------------------------------------------------- + +CTPPSRandomDQMSource::CTPPSRandomDQMSource(const edm::ParameterSet &ps) + : rpStatusWord(ps.getUntrackedParameter("RPStatusWord", 0x8008)){ + tokenDigi = consumes>(ps.getUntrackedParameter("tagRPixDigi")); +} + +//-------------------------------------------------------------------------- + +void CTPPSRandomDQMSource::dqmBeginRun(edm::Run const &run, edm::EventSetup const &) { + + for (int stn = 0; stn < StationIDMAX; stn++) { + StationStatus[stn] = 0; + for (int rp = 0; rp < RPotsIDMAX; rp++) + RPstatus[stn][rp] = 0; + } + + unsigned int rpSts = rpStatusWord << 1; + for (int stn = 0; stn < NStationMAX; stn++) { + int stns = 0; + for (int rp = 0; rp < NRPotsMAX; rp++) { + rpSts = (rpSts >> 1); + RPstatus[stn][rp] = rpSts & 1; + if (RPstatus[stn][rp] > 0) + stns = 1; + } + StationStatus[stn] = stns; + } + + for (int index = 0; index < 2 * 3 * NRPotsMAX; index++) + RPindexValid[index] = 0; + +} + +//------------------------------------------------------------------------------------- + +void CTPPSRandomDQMSource::bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) { + + ibooker.cd(); + ibooker.setCurrentFolder("CTPPS/TrackingPixel"); + + hBX = ibooker.book1D("events per BX", "ctpps_pixel;Event.BX", 4002, -1.5, 4000. + 0.5); + + for (int arm = 0; arm < NArms; arm++) { + CTPPSDetId ID(CTPPSDetId::sdTrackingPixel, arm, 0); + string sd; + ID.armName(sd, CTPPSDetId::nPath); + + ibooker.setCurrentFolder(sd); + + for (int stn = 0; stn < NStationMAX; stn++) { + if (StationStatus[stn] == 0) + continue; + ID.setStation(stn); + string stnd; + CTPPSDetId(ID.stationId()).stationName(stnd, CTPPSDetId::nPath); + + ibooker.setCurrentFolder(stnd); + + for (int rp = RPn_first; rp < RPn_last; rp++) { // only installed pixel pots + ID.setRP(rp); + string rpd, rpTitle; + CTPPSDetId(ID.rpId()).rpName(rpTitle, CTPPSDetId::nFull); + CTPPSDetId(ID.rpId()).rpName(rpd, CTPPSDetId::nPath); + + ibooker.setCurrentFolder(rpd); + + int indexP = getRPindex(arm, stn, rp); + RPindexValid[indexP] = 1; + + h2HitsVsBXRandoms[indexP] = ibooker.book2D( + "Digi per plane per BX - random triggers", rpTitle + ";Event.BX;Plane", 4002, -1.5, 4000. + 0.5, NplaneMAX, 0, NplaneMAX); + + } // end for(int rp=0; rp> pixDigi; + event.getByToken(tokenDigi, pixDigi); + + cout << "Before checking digi" << endl; + if (!pixDigi.isValid()) + return; + cout << "After checking digi" << endl; + + hBX->Fill(event.bunchCrossing()); + + for (int arm = 0; arm < 2; arm++) { + for (int stn = 0; stn < NStationMAX; stn++) { + if (!StationStatus[stn]) + continue; + for (int rp = 0; rp < NRPotsMAX; rp++) { + if (!RPstatus[stn][rp]) + continue; + int index = getRPindex(arm, stn, rp); + if (RPindexValid[index] == 0) + continue; + + for (int p = 0; p < NplaneMAX; p++) { + CTPPSPixelDetId planeId(arm,stn,rp,p); + if((*pixDigi).find(planeId.rawId()) != (*pixDigi).end()){ + int n_digis = (*pixDigi)[planeId.rawId()].size(); + h2HitsVsBXRandoms[index]->Fill(event.bunchCrossing(), p, n_digis); + } + } + } // end for (int rp=0; rp Date: Tue, 28 Feb 2023 16:17:42 +0100 Subject: [PATCH 020/233] Code checks --- DQM/CTPPS/plugins/CTPPSRandomDQMSource.cc | 34 +++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/DQM/CTPPS/plugins/CTPPSRandomDQMSource.cc b/DQM/CTPPS/plugins/CTPPSRandomDQMSource.cc index 73e0a56683c3a..f3926bc0252e9 100644 --- a/DQM/CTPPS/plugins/CTPPSRandomDQMSource.cc +++ b/DQM/CTPPS/plugins/CTPPSRandomDQMSource.cc @@ -33,7 +33,7 @@ class CTPPSRandomDQMSource : public DQMEDAnalyzer { public: CTPPSRandomDQMSource(const edm::ParameterSet &ps); - ~CTPPSRandomDQMSource() {}; + ~CTPPSRandomDQMSource() override; protected: void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override; @@ -71,7 +71,6 @@ class CTPPSRandomDQMSource : public DQMEDAnalyzer { int rc = (arm * NStationMAX + station) * NRPotsMAX + rp; return (rc); } - }; //---------------------------------------------------------------------------------- @@ -82,14 +81,13 @@ using namespace edm; //------------------------------------------------------------------------------- CTPPSRandomDQMSource::CTPPSRandomDQMSource(const edm::ParameterSet &ps) - : rpStatusWord(ps.getUntrackedParameter("RPStatusWord", 0x8008)){ + : rpStatusWord(ps.getUntrackedParameter("RPStatusWord", 0x8008)) { tokenDigi = consumes>(ps.getUntrackedParameter("tagRPixDigi")); } //-------------------------------------------------------------------------- void CTPPSRandomDQMSource::dqmBeginRun(edm::Run const &run, edm::EventSetup const &) { - for (int stn = 0; stn < StationIDMAX; stn++) { StationStatus[stn] = 0; for (int rp = 0; rp < RPotsIDMAX; rp++) @@ -110,18 +108,16 @@ void CTPPSRandomDQMSource::dqmBeginRun(edm::Run const &run, edm::EventSetup cons for (int index = 0; index < 2 * 3 * NRPotsMAX; index++) RPindexValid[index] = 0; - } //------------------------------------------------------------------------------------- void CTPPSRandomDQMSource::bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) { - ibooker.cd(); ibooker.setCurrentFolder("CTPPS/TrackingPixel"); hBX = ibooker.book1D("events per BX", "ctpps_pixel;Event.BX", 4002, -1.5, 4000. + 0.5); - + for (int arm = 0; arm < NArms; arm++) { CTPPSDetId ID(CTPPSDetId::sdTrackingPixel, arm, 0); string sd; @@ -145,12 +141,18 @@ void CTPPSRandomDQMSource::bookHistograms(DQMStore::IBooker &ibooker, edm::Run c CTPPSDetId(ID.rpId()).rpName(rpd, CTPPSDetId::nPath); ibooker.setCurrentFolder(rpd); - + int indexP = getRPindex(arm, stn, rp); RPindexValid[indexP] = 1; - h2HitsVsBXRandoms[indexP] = ibooker.book2D( - "Digi per plane per BX - random triggers", rpTitle + ";Event.BX;Plane", 4002, -1.5, 4000. + 0.5, NplaneMAX, 0, NplaneMAX); + h2HitsVsBXRandoms[indexP] = ibooker.book2D("Digi per plane per BX - random triggers", + rpTitle + ";Event.BX;Plane", + 4002, + -1.5, + 4000. + 0.5, + NplaneMAX, + 0, + NplaneMAX); } // end for(int rp=0; rp> pixDigi; event.getByToken(tokenDigi, pixDigi); @@ -170,7 +171,7 @@ void CTPPSRandomDQMSource::analyze(edm::Event const &event, edm::EventSetup cons if (!pixDigi.isValid()) return; cout << "After checking digi" << endl; - + hBX->Fill(event.bunchCrossing()); for (int arm = 0; arm < 2; arm++) { @@ -179,22 +180,21 @@ void CTPPSRandomDQMSource::analyze(edm::Event const &event, edm::EventSetup cons continue; for (int rp = 0; rp < NRPotsMAX; rp++) { if (!RPstatus[stn][rp]) - continue; + continue; int index = getRPindex(arm, stn, rp); if (RPindexValid[index] == 0) continue; for (int p = 0; p < NplaneMAX; p++) { - CTPPSPixelDetId planeId(arm,stn,rp,p); - if((*pixDigi).find(planeId.rawId()) != (*pixDigi).end()){ - int n_digis = (*pixDigi)[planeId.rawId()].size(); + CTPPSPixelDetId planeId(arm, stn, rp, p); + if ((*pixDigi).find(planeId.rawId()) != (*pixDigi).end()) { + int n_digis = (*pixDigi)[planeId.rawId()].size(); h2HitsVsBXRandoms[index]->Fill(event.bunchCrossing(), p, n_digis); } } } // end for (int rp=0; rp Date: Wed, 1 Mar 2023 12:57:47 +0100 Subject: [PATCH 021/233] Added PR suggestions --- DQM/CTPPS/plugins/CTPPSRandomDQMSource.cc | 180 ++++++++++--------- DQM/CTPPS/python/ctppsRandomDQMSource_cfi.py | 3 +- 2 files changed, 94 insertions(+), 89 deletions(-) diff --git a/DQM/CTPPS/plugins/CTPPSRandomDQMSource.cc b/DQM/CTPPS/plugins/CTPPSRandomDQMSource.cc index f3926bc0252e9..41f9bfe11a2fb 100644 --- a/DQM/CTPPS/plugins/CTPPSRandomDQMSource.cc +++ b/DQM/CTPPS/plugins/CTPPSRandomDQMSource.cc @@ -33,128 +33,124 @@ class CTPPSRandomDQMSource : public DQMEDAnalyzer { public: CTPPSRandomDQMSource(const edm::ParameterSet &ps); - ~CTPPSRandomDQMSource() override; + ~CTPPSRandomDQMSource() override = default; + static void fillDescriptions(edm::ConfigurationDescriptions &descriptions); protected: - void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override; private: - edm::EDGetTokenT> tokenDigi; + edm::EDGetTokenT> const tokenDigi_; - static constexpr int NArms = 2; - static constexpr int NStationMAX = 3; // in an arm - static constexpr int NRPotsMAX = 6; // per station - static constexpr int NplaneMAX = 6; // per RPot - static constexpr int RPn_first = 3, RPn_last = 4; - static constexpr int StationIDMAX = 4; // possible range of ID - static constexpr int RPotsIDMAX = 8; // possible range of ID + static constexpr int kNArms_ = 2; + static constexpr int kNStationMAX_ = 3; // in an arm + static constexpr int kNRPotsMAX_ = 6; // per station + static constexpr int kNplaneMAX_ = 6; // per RPot + static constexpr int kFirstRPn_ = 3, kLastRPn_ = 4; + static constexpr int kStationIDMAX_ = 4; // possible range of ID + static constexpr int kRPotsIDMAX_ = 8; // possible range of ID - unsigned int rpStatusWord = 0x8008; // 220_fr_hr(stn2rp3)+ 210_fr_hr - int RPstatus[StationIDMAX][RPotsIDMAX]; // symmetric in both arms - int StationStatus[StationIDMAX]; // symmetric in both arms - const int IndexNotValid = 0; + const std::string folderName_ = "CTPPS/RandomPixel"; - MonitorElement *hBX; + unsigned int rpStatusWord_ = 0x8008; // 220_fr_hr(stn2rp3)+ 210_fr_hr + int rpStatus_[kStationIDMAX_][kRPotsIDMAX_]; // symmetric in both arms + int stationStatus_[kStationIDMAX_]; // symmetric in both arms + const int kIndexNotValid = 0; - static constexpr int RPotsTotalNumber = NArms * NStationMAX * NRPotsMAX; + MonitorElement *hBX_; - int RPindexValid[RPotsTotalNumber]; - MonitorElement *h2HitsVsBXRandoms[RPotsTotalNumber]; + static constexpr int kRPotsTotalNumber_ = kNArms_ * kNStationMAX_ * kNRPotsMAX_; - int getRPindex(int arm, int station, int rp) { + int RPindexValid_[kRPotsTotalNumber_]; + MonitorElement *h2HitsVsBXRandoms_[kRPotsTotalNumber_]; + + int getRPindex(int arm, int station, int rp) const { if (arm < 0 || station < 0 || rp < 0) - return (IndexNotValid); - if (arm > 1 || station >= NStationMAX || rp >= NRPotsMAX) - return (IndexNotValid); - int rc = (arm * NStationMAX + station) * NRPotsMAX + rp; + return (kIndexNotValid); + if (arm > 1 || station >= kNStationMAX_ || rp >= kNRPotsMAX_) + return (kIndexNotValid); + int rc = (arm * kNStationMAX_ + station) * kNRPotsMAX_ + rp; return (rc); } }; -//---------------------------------------------------------------------------------- - -using namespace std; -using namespace edm; - //------------------------------------------------------------------------------- CTPPSRandomDQMSource::CTPPSRandomDQMSource(const edm::ParameterSet &ps) - : rpStatusWord(ps.getUntrackedParameter("RPStatusWord", 0x8008)) { - tokenDigi = consumes>(ps.getUntrackedParameter("tagRPixDigi")); -} - -//-------------------------------------------------------------------------- - -void CTPPSRandomDQMSource::dqmBeginRun(edm::Run const &run, edm::EventSetup const &) { - for (int stn = 0; stn < StationIDMAX; stn++) { - StationStatus[stn] = 0; - for (int rp = 0; rp < RPotsIDMAX; rp++) - RPstatus[stn][rp] = 0; + : tokenDigi_(consumes>(ps.getUntrackedParameter("tagRPixDigi"))), + folderName_(ps.getUntrackedParameter("folderName", "CTPPS/RandomPixel")), + rpStatusWord_(ps.getUntrackedParameter("RPStatusWord", 0x8008)) { + for (int stn = 0; stn < kStationIDMAX_; stn++) { + stationStatus_[stn] = 0; + for (int rp = 0; rp < kRPotsIDMAX_; rp++) + rpStatus_[stn][rp] = 0; } - unsigned int rpSts = rpStatusWord << 1; - for (int stn = 0; stn < NStationMAX; stn++) { + unsigned int rpSts = rpStatusWord_ << 1; + for (int stn = 0; stn < kNStationMAX_; stn++) { int stns = 0; - for (int rp = 0; rp < NRPotsMAX; rp++) { + for (int rp = 0; rp < kNRPotsMAX_; rp++) { rpSts = (rpSts >> 1); - RPstatus[stn][rp] = rpSts & 1; - if (RPstatus[stn][rp] > 0) + rpStatus_[stn][rp] = rpSts & 1; + if (rpStatus_[stn][rp] > 0) stns = 1; } - StationStatus[stn] = stns; + stationStatus_[stn] = stns; } - for (int index = 0; index < 2 * 3 * NRPotsMAX; index++) - RPindexValid[index] = 0; + for (int index = 0; index < 2 * 3 * kNRPotsMAX_; index++) + RPindexValid_[index] = 0; } -//------------------------------------------------------------------------------------- +//-------------------------------------------------------------------------- void CTPPSRandomDQMSource::bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) { ibooker.cd(); - ibooker.setCurrentFolder("CTPPS/TrackingPixel"); + ibooker.setCurrentFolder(folderName_); - hBX = ibooker.book1D("events per BX", "ctpps_pixel;Event.BX", 4002, -1.5, 4000. + 0.5); + hBX_ = ibooker.book1D("events per BX", "ctpps_pixel;Event.BX", 4002, -1.5, 4000. + 0.5); - for (int arm = 0; arm < NArms; arm++) { + for (int arm = 0; arm < kNArms_; arm++) { CTPPSDetId ID(CTPPSDetId::sdTrackingPixel, arm, 0); - string sd; - ID.armName(sd, CTPPSDetId::nPath); + std::string sd; + ID.armName(sd, CTPPSDetId::nShort); + sd = folderName_ + "/sector " + sd; ibooker.setCurrentFolder(sd); - for (int stn = 0; stn < NStationMAX; stn++) { - if (StationStatus[stn] == 0) + for (int stn = 0; stn < kNStationMAX_; stn++) { + if (stationStatus_[stn] == 0) continue; ID.setStation(stn); - string stnd; - CTPPSDetId(ID.stationId()).stationName(stnd, CTPPSDetId::nPath); + std::string stnd; + CTPPSDetId(ID.stationId()).stationName(stnd, CTPPSDetId::nShort); + stnd = sd + "/station " + stnd; ibooker.setCurrentFolder(stnd); - for (int rp = RPn_first; rp < RPn_last; rp++) { // only installed pixel pots + for (int rp = kFirstRPn_; rp < kLastRPn_; rp++) { // only installed pixel pots ID.setRP(rp); - string rpd, rpTitle; + std::string rpd, rpTitle; CTPPSDetId(ID.rpId()).rpName(rpTitle, CTPPSDetId::nFull); - CTPPSDetId(ID.rpId()).rpName(rpd, CTPPSDetId::nPath); + CTPPSDetId(ID.rpId()).rpName(rpd, CTPPSDetId::nShort); + rpd = stnd + "/" + rpd; ibooker.setCurrentFolder(rpd); int indexP = getRPindex(arm, stn, rp); - RPindexValid[indexP] = 1; - - h2HitsVsBXRandoms[indexP] = ibooker.book2D("Digi per plane per BX - random triggers", - rpTitle + ";Event.BX;Plane", - 4002, - -1.5, - 4000. + 0.5, - NplaneMAX, - 0, - NplaneMAX); - - } // end for(int rp=0; rp> pixDigi; - event.getByToken(tokenDigi, pixDigi); + auto const pixDigi = event.getHandle(tokenDigi_); - cout << "Before checking digi" << endl; if (!pixDigi.isValid()) return; - cout << "After checking digi" << endl; - hBX->Fill(event.bunchCrossing()); + hBX_->Fill(event.bunchCrossing()); for (int arm = 0; arm < 2; arm++) { - for (int stn = 0; stn < NStationMAX; stn++) { - if (!StationStatus[stn]) + for (int stn = 0; stn < kNStationMAX_; stn++) { + if (!stationStatus_[stn]) continue; - for (int rp = 0; rp < NRPotsMAX; rp++) { - if (!RPstatus[stn][rp]) + for (int rp = 0; rp < kNRPotsMAX_; rp++) { + if (!rpStatus_[stn][rp]) continue; int index = getRPindex(arm, stn, rp); - if (RPindexValid[index] == 0) + if (RPindexValid_[index] == 0) continue; - for (int p = 0; p < NplaneMAX; p++) { + for (int p = 0; p < kNplaneMAX_; p++) { CTPPSPixelDetId planeId(arm, stn, rp, p); - if ((*pixDigi).find(planeId.rawId()) != (*pixDigi).end()) { - int n_digis = (*pixDigi)[planeId.rawId()].size(); - h2HitsVsBXRandoms[index]->Fill(event.bunchCrossing(), p, n_digis); + auto pix_d = pixDigi->find(planeId.rawId()); + if (pix_d != pixDigi->end()) { + int n_digis = pix_d->size(); + h2HitsVsBXRandoms_[index]->Fill(event.bunchCrossing(), p, n_digis); } } - } // end for (int rp=0; rp("tagRPixDigi", edm::InputTag("ctppsPixelDigisAlCaRecoProducer")); + desc.addUntracked("folderName", "CTPPS/RandomPixel"); + desc.addUntracked("RPStatusWord", 0x8008); + descriptions.add("ctppsRandomDQMSource", desc); +} + //--------------------------------------------------------------------------- DEFINE_FWK_MODULE(CTPPSRandomDQMSource); diff --git a/DQM/CTPPS/python/ctppsRandomDQMSource_cfi.py b/DQM/CTPPS/python/ctppsRandomDQMSource_cfi.py index 99a797f73a2c3..2aa6bdf7ccba7 100644 --- a/DQM/CTPPS/python/ctppsRandomDQMSource_cfi.py +++ b/DQM/CTPPS/python/ctppsRandomDQMSource_cfi.py @@ -4,5 +4,6 @@ ctppsRandomDQMSource = DQMEDAnalyzer('CTPPSRandomDQMSource', tagRPixDigi = cms.untracked.InputTag("ctppsPixelDigisAlCaRecoProducer", ""), - RPStatusWord = cms.untracked.uint32(0x8008), # rpots in readout:220_fr_hr; 210_fr_hr + folderName = cms.untracked.string("CTPPS/RandomPixel"), + RPStatusWord = cms.untracked.uint32(0x8008) # rpots in readout:220_fr_hr; 210_fr_hr ) \ No newline at end of file From 17457a557bd75ab479dfb78013edf9e551ecd6b7 Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Wed, 1 Mar 2023 17:03:49 +0100 Subject: [PATCH 022/233] first implementation of new extended ParticleNet networks in miniAOD and nanoAOD --- .../NanoAOD/python/jetsAK4_CHS_cff.py | 7 + .../NanoAOD/python/jetsAK4_Puppi_cff.py | 7 + PhysicsTools/NanoAOD/python/jetsAK8_cff.py | 26 +- .../python/recoLayer0/bTagging_cff.py | 32 ++ .../python/slimming/applyDeepBtagging_cff.py | 30 +- .../PatAlgos/python/tools/jetTools.py | 230 ++++++++++++- ...FromMiniAODAK4DiscriminatorsJetTags_cfi.py | 313 ++++++++++++++++++ .../python/pfParticleNetFromMiniAODAK4_cff.py | 14 + ...FromMiniAODAK8DiscriminatorsJetTags_cfi.py | 71 ++++ .../python/pfParticleNetFromMiniAODAK8_cff.py | 5 + ...st_particlenet_from_miniaod_ak4chs_cfg.py} | 0 ..._particlenet_from_miniaod_ak4puppi_cfg.py} | 0 ... test_particlenet_from_miniaod_ak8_cfg.py} | 0 13 files changed, 717 insertions(+), 18 deletions(-) create mode 100644 RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4DiscriminatorsJetTags_cfi.py create mode 100644 RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK8DiscriminatorsJetTags_cfi.py rename RecoBTag/ONNXRuntime/test/{test_particle_from_miniaod_ak4chs_cfg.py => test_particlenet_from_miniaod_ak4chs_cfg.py} (100%) rename RecoBTag/ONNXRuntime/test/{test_particle_from_miniaod_ak4puppi_cfg.py => test_particlenet_from_miniaod_ak4puppi_cfg.py} (100%) rename RecoBTag/ONNXRuntime/test/{test_particle_from_miniaod_ak8_cfg.py => test_particlenet_from_miniaod_ak8_cfg.py} (100%) diff --git a/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py b/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py index 414a011c9140b..4cb80962f4354 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py @@ -129,6 +129,13 @@ btagDeepFlavCvL = Var("?(bDiscriminator('pfDeepFlavourJetTags:probc')+bDiscriminator('pfDeepFlavourJetTags:probuds')+bDiscriminator('pfDeepFlavourJetTags:probg'))>0?bDiscriminator('pfDeepFlavourJetTags:probc')/(bDiscriminator('pfDeepFlavourJetTags:probc')+bDiscriminator('pfDeepFlavourJetTags:probuds')+bDiscriminator('pfDeepFlavourJetTags:probg')):-1",float,doc="DeepJet c vs uds+g discriminator",precision=10), btagDeepFlavCvB = Var("?(bDiscriminator('pfDeepFlavourJetTags:probc')+bDiscriminator('pfDeepFlavourJetTags:probb')+bDiscriminator('pfDeepFlavourJetTags:probbb')+bDiscriminator('pfDeepFlavourJetTags:problepb'))>0?bDiscriminator('pfDeepFlavourJetTags:probc')/(bDiscriminator('pfDeepFlavourJetTags:probc')+bDiscriminator('pfDeepFlavourJetTags:probb')+bDiscriminator('pfDeepFlavourJetTags:probbb')+bDiscriminator('pfDeepFlavourJetTags:problepb')):-1",float,doc="DeepJet c vs b+bb+lepb discriminator",precision=10), btagDeepFlavQG = Var("?(bDiscriminator('pfDeepFlavourJetTags:probg')+bDiscriminator('pfDeepFlavourJetTags:probuds'))>0?bDiscriminator('pfDeepFlavourJetTags:probg')/(bDiscriminator('pfDeepFlavourJetTags:probg')+bDiscriminator('pfDeepFlavourJetTags:probuds')):-1",float,doc="DeepJet g vs uds discriminator",precision=10), + btagPNetB = Var("?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:BvsAll')>0?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:BvsAll'):-1",float,precision=10,doc="ParticleNet b vs. udscg"), + btagPNetCvL = Var("?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:CvsL')>0?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:CvsL'):-1",float,precision=10,doc="ParticleNet c vs. udsg"), + btagPNetCvB = Var("?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:CvsB')>0?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:CvsB'):-1",float,precision=10,doc="ParticleNet c vs. b"), + btagPNetQvG = Var("?abs(eta())<2.5?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:QvsG'):bDiscriminator('pfParticleNetFromMiniAODAK4CHSForwardDiscriminatorsJetTags:QvsG')",float,precision=10,doc="ParticleNet q (udsbc) vs. g"), + btagPNetTauVJet = Var("?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:TauVsJet')>0?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:TauVsJet'):-1",float,precision=10,doc="ParticleNet tau vs. jet"), + PNetRegPtRawCorr = Var("?abs(eta())<2.5?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralJetTags:ptcorr'):bDiscriminator('pfParticleNetFromMiniAODAK4CHSForwardJetTags:ptcorr')",float,precision=10,doc="ParticleNet universal flavor-aware pT regression, correction relative to raw jet pT"), + PNetRegPtRawRes = Var("?abs(eta())<2.5?0.5*(bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralJetTags:ptreshigh')-bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralJetTags:ptreslow')):0.5*(bDiscriminator('pfParticleNetFromMiniAODAK4CHSForwardJetTags:ptreshigh')-bDiscriminator('pfParticleNetFromMiniAODAK4CHSForwardJetTags:ptreslow'))",float,precision=10,doc="ParticleNet universal flavor-aware jet pT resolution estimator, (q84 - q16)/2"), puIdDisc = Var("userFloat('puIdNanoDisc')", float,doc="Pileup ID discriminant with 106X (2018) training",precision=10), puId = Var("userInt('puIdNanoId')", "uint8", doc="Pileup ID flags with 106X (2018) training"), jetId = Var("userInt('tightId')*2+4*userInt('tightIdLepVeto')", "uint8", doc="Jet ID flags bit1 is loose (always false in 2017 since it does not exist), bit2 is tight, bit3 is tightLepVeto"), diff --git a/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py b/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py index b83575526acf3..9ee07d2cc1669 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py @@ -87,6 +87,13 @@ btagDeepFlavCvL = Var("?(bDiscriminator('pfDeepFlavourJetTags:probc')+bDiscriminator('pfDeepFlavourJetTags:probuds')+bDiscriminator('pfDeepFlavourJetTags:probg'))>0?bDiscriminator('pfDeepFlavourJetTags:probc')/(bDiscriminator('pfDeepFlavourJetTags:probc')+bDiscriminator('pfDeepFlavourJetTags:probuds')+bDiscriminator('pfDeepFlavourJetTags:probg')):-1",float,doc="DeepJet c vs uds+g discriminator",precision=10), btagDeepFlavCvB = Var("?(bDiscriminator('pfDeepFlavourJetTags:probc')+bDiscriminator('pfDeepFlavourJetTags:probb')+bDiscriminator('pfDeepFlavourJetTags:probbb')+bDiscriminator('pfDeepFlavourJetTags:problepb'))>0?bDiscriminator('pfDeepFlavourJetTags:probc')/(bDiscriminator('pfDeepFlavourJetTags:probc')+bDiscriminator('pfDeepFlavourJetTags:probb')+bDiscriminator('pfDeepFlavourJetTags:probbb')+bDiscriminator('pfDeepFlavourJetTags:problepb')):-1",float,doc="DeepJet c vs b+bb+lepb discriminator",precision=10), btagDeepFlavQG = Var("?(bDiscriminator('pfDeepFlavourJetTags:probg')+bDiscriminator('pfDeepFlavourJetTags:probuds'))>0?bDiscriminator('pfDeepFlavourJetTags:probg')/(bDiscriminator('pfDeepFlavourJetTags:probg')+bDiscriminator('pfDeepFlavourJetTags:probuds')):-1",float,doc="DeepJet g vs uds discriminator",precision=10), + btagPNetB = Var("?bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags:BvsAll')>0?bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags:BvsAll'):-1",float,precision=10,doc="ParticleNet b vs. udscg"), + btagPNetCvL = Var("?bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags:CvsL')>0?bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags:CvsL'):-1",float,precision=10,doc="ParticleNet c vs. udsg"), + btagPNetCvB = Var("?bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags:CvsB')>0?bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags:CvsB'):-1",float,precision=10,doc="ParticleNet c vs. b"), + btagPNetQvG = Var("?abs(eta())<2.5?bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags:QvsG'):bDiscriminator('pfParticleNetFromMiniAODAK4PuppiForwardDiscriminatorsJetTags:QvsG')",float,precision=10,doc="ParticleNet q (udsbc) vs. g"), + btagPNetTauVJet = Var("?bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags:TauVsJet')>0?bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags:TauVsJet'):-1",float,precision=10,doc="ParticleNet tau vs. jet"), + PNetRegPtRawCorr = Var("?abs(eta())<2.5?bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralJetTags:ptcorr'):bDiscriminator('pfParticleNetFromMiniAODAK4PuppiForwardJetTags:ptcorr')",float,precision=10,doc="ParticleNet universal flavor-aware pT regression, correction relative to raw jet pT"), + PNetRegPtRawRes = Var("?abs(eta())<2.5?0.5*(bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralJetTags:ptreshigh')-bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralJetTags:ptreslow')):0.5*(bDiscriminator('pfParticleNetFromMiniAODAK4PuppiForwardJetTags:ptreshigh')-bDiscriminator('pfParticleNetFromMiniAODAK4PuppiForwardJetTags:ptreslow'))",float,precision=10,doc="ParticleNet universal flavor-aware jet pT resolution estimator, (q84 - q16)/2"), jetId = Var("userInt('tightId')*2+4*userInt('tightIdLepVeto')", "uint8",doc="Jet ID flag: bit2 is tight, bit3 is tightLepVeto"), hfsigmaEtaEta = Var("userFloat('hfsigmaEtaEta')",float,doc="sigmaEtaEta for HF jets (noise discriminating variable)",precision=10), hfsigmaPhiPhi = Var("userFloat('hfsigmaPhiPhi')",float,doc="sigmaPhiPhi for HF jets (noise discriminating variable)",precision=10), diff --git a/PhysicsTools/NanoAOD/python/jetsAK8_cff.py b/PhysicsTools/NanoAOD/python/jetsAK8_cff.py index 8206049eff8e5..43a3ef11ef3c6 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK8_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK8_cff.py @@ -112,18 +112,20 @@ deepTagMD_H4qvsQCD = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:H4qvsQCD')",float,doc="Mass-decorrelated DeepBoostedJet tagger H->4q vs QCD discriminator",precision=10), deepTagMD_bbvsLight = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:bbvsLight')",float,doc="Mass-decorrelated DeepBoostedJet tagger Z/H/gluon->bb vs light flavour discriminator",precision=10), deepTagMD_ccvsLight = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:ccvsLight')",float,doc="Mass-decorrelated DeepBoostedJet tagger Z/H/gluon->cc vs light flavour discriminator",precision=10), - particleNet_TvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:TvsQCD')",float,doc="ParticleNet tagger top vs QCD discriminator",precision=10), - particleNet_WvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:WvsQCD')",float,doc="ParticleNet tagger W vs QCD discriminator",precision=10), - particleNet_ZvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:ZvsQCD')",float,doc="ParticleNet tagger Z vs QCD discriminator",precision=10), - particleNet_HbbvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:HbbvsQCD')",float,doc="ParticleNet tagger H(->bb) vs QCD discriminator",precision=10), - particleNet_HccvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:HccvsQCD')",float,doc="ParticleNet tagger H(->cc) vs QCD discriminator",precision=10), - particleNet_H4qvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:H4qvsQCD')",float,doc="ParticleNet tagger H(->VV->qqqq) vs QCD discriminator",precision=10), - particleNet_QCD = Var("bDiscriminator('pfParticleNetJetTags:probQCDbb')+bDiscriminator('pfParticleNetJetTags:probQCDcc')+bDiscriminator('pfParticleNetJetTags:probQCDb')+bDiscriminator('pfParticleNetJetTags:probQCDc')+bDiscriminator('pfParticleNetJetTags:probQCDothers')",float,doc="ParticleNet tagger QCD(bb,cc,b,c,others) sum",precision=10), - particleNet_mass = Var("bDiscriminator('pfParticleNetMassRegressionJetTags:mass')",float,doc="ParticleNet mass regression",precision=10), - particleNetMD_Xbb = Var("bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probXbb')",float,doc="Mass-decorrelated ParticleNet tagger raw X->bb score. For X->bb vs QCD tagging, use Xbb/(Xbb+QCD)",precision=10), - particleNetMD_Xcc = Var("bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probXcc')",float,doc="Mass-decorrelated ParticleNet tagger raw X->cc score. For X->cc vs QCD tagging, use Xcc/(Xcc+QCD)",precision=10), - particleNetMD_Xqq = Var("bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probXqq')",float,doc="Mass-decorrelated ParticleNet tagger raw X->qq (uds) score. For X->qq vs QCD tagging, use Xqq/(Xqq+QCD). For W vs QCD tagging, use (Xcc+Xqq)/(Xcc+Xqq+QCD)",precision=10), - particleNetMD_QCD = Var("bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probQCDbb')+bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probQCDcc')+bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probQCDb')+bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probQCDc')+bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probQCDothers')",float,doc="Mass-decorrelated ParticleNet tagger raw QCD score",precision=10), + particleNet_TvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:TvsQCD')",float,doc="ParticleNet tagger (w/ mass) top vs QCD discriminator",precision=10), + particleNet_WvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:WvsQCD')",float,doc="ParticleNet tagger (w/ mass) W vs QCD discriminator",precision=10), + particleNet_ZvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:ZvsQCD')",float,doc="ParticleNet tagger (w/ mass) Z vs QCD discriminator",precision=10), + particleNet_XbbvsQCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HbbvsQCD')",float,doc="ParticleNet tagger X(->bb) vs QCD discriminator",precision=10), + particleNet_XccvsQCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HccvsQCD')",float,doc="ParticleNet tagger X(->cc) vs QCD discriminator",precision=10), + particleNet_XttvsQCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HttvsQCD')",float,doc="ParticleNet tagger X(->tau_h tau_x) vs QCD discriminator",precision=10), + particleNet_H4qvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:H4qvsQCD')",float,doc="ParticleNet tagger (w/ mass) H(->VV->qqqq) vs QCD discriminator",precision=10), + particleNet_QCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:QCD2hf')+bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:QCD1hf')+bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:QCD0hf')",float,doc="ParticleNet tagger QCD(0+1+2HF) sum",precision=10), + particleNet_QCDHF = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:QCD2hf')+bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:QCD1hf')",float,doc="ParticleNet tagger QCD 1 or 2 HF (b/c) vs. 0HF score",precision=10), + particleNet_mass = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:masscorr')",float,doc="ParticleNet mass regression",precision=10), + particleNet_Xbb = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHbb')",float,doc="ParticleNet tagger raw X->bb score. For X->bb vs QCD tagging, use Xbb/(Xbb+QCD)",precision=10), + particleNet_Xcc = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHcc')",float,doc="ParticleNet tagger raw X->cc score. For X->cc vs QCD tagging, use Xcc/(Xcc+QCD)",precision=10), + particleNet_Xqq = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHqq')",float,doc="ParticleNet tagger raw X->qq (uds) score. For X->qq vs QCD tagging, use Xqq/(Xqq+QCD). For W vs QCD tagging, use (Xcc+Xqq)/(Xcc+Xqq+QCD)",precision=10), + particleNet_Xgg = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHgg')",float,doc="ParticleNet tagger raw X->gg score. For X->gg vs QCD tagging, use Xgg/(Xgg+QCD)",precision=10), subJetIdx1 = Var("?nSubjetCollections()>0 && subjets('SoftDropPuppi').size()>0?subjets('SoftDropPuppi')[0].key():-1", "int16", doc="index of first subjet"), subJetIdx2 = Var("?nSubjetCollections()>0 && subjets('SoftDropPuppi').size()>1?subjets('SoftDropPuppi')[1].key():-1", "int16", diff --git a/PhysicsTools/PatAlgos/python/recoLayer0/bTagging_cff.py b/PhysicsTools/PatAlgos/python/recoLayer0/bTagging_cff.py index 7231fb8196915..c31f7f94d2bad 100644 --- a/PhysicsTools/PatAlgos/python/recoLayer0/bTagging_cff.py +++ b/PhysicsTools/PatAlgos/python/recoLayer0/bTagging_cff.py @@ -54,6 +54,12 @@ , 'pixelClusterTagInfos' # HiggsInteractionNet tag infos , 'pfHiggsInteractionNetTagInfos' + , 'pfParticleNetFromMiniAODAK4PuppiCentralTagInfos' + , 'pfParticleNetFromMiniAODAK4PuppiForwardTagInfos' + , 'pfParticleNetFromMiniAODAK4CHSCentralTagInfos' + , 'pfParticleNetFromMiniAODAK4CHSForwardTagInfos' + , 'pfParticleNetFromMiniAODAK8TagInfos' + ] # extend for "internal use" in PAT/MINIAOD (renaming) supportedBtagInfos.append( 'caTopTagInfosPAT' ) @@ -279,6 +285,32 @@ for disc in _pfNegativeParticleNetAK4JetTagsProbs: supportedBtagDiscr[disc] = [["pfNegativeParticleNetAK4TagInfos"]] # ----------------------------------- +from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import _pfParticleNetFromMiniAODAK4PuppiCentralJetTagsProbs,_pfParticleNetFromMiniAODAK4PuppiCentralJetTagsMetaDiscr +for disc in _pfParticleNetFromMiniAODAK4PuppiCentralJetTagsProbs: + supportedBtagDiscr[disc] = [["pfParticleNetFromMiniAODAK4PuppiCentralTagInfos"]] +for disc in _pfParticleNetFromMiniAODAK4PuppiCentralJetTagsMetaDiscr: + supportedMetaDiscr[disc] = _pfParticleNetFromMiniAODAK4PuppiCentralJetTagsProbs +from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import _pfParticleNetFromMiniAODAK4PuppiForwardJetTagsProbs,_pfParticleNetFromMiniAODAK4PuppiForwardJetTagsMetaDiscr +for disc in _pfParticleNetFromMiniAODAK4PuppiForwardJetTagsProbs: + supportedBtagDiscr[disc] = [["pfParticleNetFromMiniAODAK4PuppiForwardTagInfos"]] +for disc in _pfParticleNetFromMiniAODAK4PuppiForwardJetTagsMetaDiscr: + supportedMetaDiscr[disc] = _pfParticleNetFromMiniAODAK4PuppiForwardJetTagsProbs +from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import _pfParticleNetFromMiniAODAK4CHSCentralJetTagsProbs,_pfParticleNetFromMiniAODAK4CHSCentralJetTagsMetaDiscr +for disc in _pfParticleNetFromMiniAODAK4CHSCentralJetTagsProbs: + supportedBtagDiscr[disc] = [["pfParticleNetFromMiniAODAK4CHSCentralTagInfos"]] +for disc in _pfParticleNetFromMiniAODAK4CHSCentralJetTagsMetaDiscr: + supportedMetaDiscr[disc] = _pfParticleNetFromMiniAODAK4CHSCentralJetTagsProbs +from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import _pfParticleNetFromMiniAODAK4CHSForwardJetTagsProbs,_pfParticleNetFromMiniAODAK4CHSForwardJetTagsMetaDiscr +for disc in _pfParticleNetFromMiniAODAK4CHSForwardJetTagsProbs: + supportedBtagDiscr[disc] = [["pfParticleNetFromMiniAODAK4CHSForwardTagInfos"]] +for disc in _pfParticleNetFromMiniAODAK4CHSForwardJetTagsMetaDiscr: + supportedMetaDiscr[disc] = _pfParticleNetFromMiniAODAK4CHSForwardJetTagsProbs +from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK8_cff import _pfParticleNetFromMiniAODAK8JetTagsProbs,_pfParticleNetFromMiniAODAK8JetTagsMetaDiscr +for disc in _pfParticleNetFromMiniAODAK8JetTagsProbs: + supportedBtagDiscr[disc] = [["pfParticleNetFromMiniAODAK8TagInfos"]] +for disc in _pfParticleNetFromMiniAODAK8JetTagsMetaDiscr: + supportedMetaDiscr[disc] = _pfParticleNetFromMiniAODAK8JetTagsProbs + # ----------------------------------- # setup HiggsInteractionNet diff --git a/PhysicsTools/PatAlgos/python/slimming/applyDeepBtagging_cff.py b/PhysicsTools/PatAlgos/python/slimming/applyDeepBtagging_cff.py index 937e910a87797..f43a31dbf7c25 100644 --- a/PhysicsTools/PatAlgos/python/slimming/applyDeepBtagging_cff.py +++ b/PhysicsTools/PatAlgos/python/slimming/applyDeepBtagging_cff.py @@ -10,6 +10,10 @@ def applyDeepBtagging(process, postfix=""): from PhysicsTools.PatAlgos.slimming.slimmedJets_cfi import slimmedJets, slimmedJetsAK8 from RecoBTag.ONNXRuntime.pfParticleNetAK4_cff import _pfParticleNetAK4JetTagsAll as pfParticleNetAK4JetTagsAll + from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import _pfParticleNetFromMiniAODAK4PuppiCentralJetTagsAll as pfParticleNetFromMiniAODAK4PuppiCentralJetTagsAll + from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import _pfParticleNetFromMiniAODAK4PuppiForwardJetTagsAll as pfParticleNetFromMiniAODAK4PuppiForwardJetTagsAll + from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import _pfParticleNetFromMiniAODAK4CHSCentralJetTagsAll as pfParticleNetFromMiniAODAK4CHSCentralJetTagsAll + from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import _pfParticleNetFromMiniAODAK4CHSForwardJetTagsAll as pfParticleNetFromMiniAODAK4CHSForwardJetTagsAll # update slimmed jets to include DeepFlavour (keep same name) # make clone for DeepFlavour-less slimmed jets, so output name is preserved @@ -22,6 +26,8 @@ def applyDeepBtagging(process, postfix=""): 'pfDeepFlavourJetTags:probc', 'pfDeepFlavourJetTags:probuds', 'pfDeepFlavourJetTags:probg') + + pfParticleNetFromMiniAODAK4CHSCentralJetTagsAll + + pfParticleNetFromMiniAODAK4CHSForwardJetTagsAll ) updateJetCollection( process, @@ -55,8 +61,12 @@ def applyDeepBtagging(process, postfix=""): 'pfDeepFlavourJetTags:problepb', 'pfDeepFlavourJetTags:probc', 'pfDeepFlavourJetTags:probuds', - 'pfDeepFlavourJetTags:probg') + pfParticleNetAK4JetTagsAll + 'pfDeepFlavourJetTags:probg', + 'pfParticleNetAK4JetTags:probpu') + pfParticleNetAK4JetTagsAll + + pfParticleNetFromMiniAODAK4PuppiCentralJetTagsAll + + pfParticleNetFromMiniAODAK4PuppiForwardJetTagsAll ) + updateJetCollection( process, jetSource = cms.InputTag('slimmedJetsPuppiNoDeepTags'), @@ -80,6 +90,7 @@ def applyDeepBtagging(process, postfix=""): from RecoBTag.ONNXRuntime.pfHiggsInteractionNet_cff import _pfHiggsInteractionNetTagsProbs as pfHiggsInteractionNetTagsProbs from RecoBTag.ONNXRuntime.pfParticleNet_cff import _pfParticleNetJetTagsAll as pfParticleNetJetTagsAll from RecoBTag.ONNXRuntime.pfParticleNet_cff import _pfParticleNetMassRegressionOutputs + from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK8_cff import _pfParticleNetFromMiniAODAK8JetTagsAll as pfParticleNetFromMiniAODAK8JetTagsAll # update slimmed jets to include particle-based deep taggers (keep same name) # make clone for DeepTags-less slimmed AK8 jets, so output name is preserved @@ -91,7 +102,22 @@ def applyDeepBtagging(process, postfix=""): 'pfMassIndependentDeepDoubleCvLV2JetTags:probHcc', 'pfMassIndependentDeepDoubleCvBV2JetTags:probHbb', 'pfMassIndependentDeepDoubleCvBV2JetTags:probHcc', - ) + pfDeepBoostedJetTagsAll + pfParticleNetJetTagsAll + pfHiggsInteractionNetTagsProbs + _pfParticleNetMassRegressionOutputs) + 'pfParticleNetDiscriminatorsJetTags:TvsQCD', + 'pfParticleNetDiscriminatorsJetTags:WvsQCD', + 'pfParticleNetDiscriminatorsJetTags:H4qvsQCD', + 'pfParticleNetJetTags:probTbcq', + 'pfParticleNetJetTags:probTbqq', + 'pfParticleNetJetTags:probTbc', + 'pfParticleNetJetTags:probTbq', + 'pfParticleNetJetTags:probTbel', + 'pfParticleNetJetTags:probTbmu', + 'pfParticleNetJetTags:probTbta', + 'pfParticleNetJetTags:probWcq', + 'pfParticleNetJetTags:probWqq', + 'pfParticleNetJetTags:probHqqqq', + ) + pfDeepBoostedJetTagsAll + pfHiggsInteractionNetTagsProbs + pfParticleNetFromMiniAODAK8JetTagsAll) + #) + pfDeepBoostedJetTagsAll + pfParticleNetJetTagsAll + pfHiggsInteractionNetTagsProbs + _pfParticleNetMassRegressionOutputs + # + pfParticleNetFromMiniAODAK8JetTagsAll) updateJetCollection( process, jetSource = cms.InputTag('slimmedJetsAK8NoDeepTags'), diff --git a/PhysicsTools/PatAlgos/python/tools/jetTools.py b/PhysicsTools/PatAlgos/python/tools/jetTools.py index c217ce6eb9b3c..086976a204d08 100644 --- a/PhysicsTools/PatAlgos/python/tools/jetTools.py +++ b/PhysicsTools/PatAlgos/python/tools/jetTools.py @@ -7,6 +7,11 @@ from PhysicsTools.PatAlgos.recoLayer0.bTagging_cff import * import sys from FWCore.ParameterSet.MassReplace import MassSearchReplaceAnyInputTagVisitor +from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import pfParticleNetFromMiniAODAK4PuppiCentralTagInfos,pfParticleNetFromMiniAODAK4PuppiCentralJetTags,pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags +from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import pfParticleNetFromMiniAODAK4PuppiForwardTagInfos,pfParticleNetFromMiniAODAK4PuppiForwardJetTags,pfParticleNetFromMiniAODAK4PuppiForwardDiscriminatorsJetTags +from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import pfParticleNetFromMiniAODAK4CHSCentralTagInfos,pfParticleNetFromMiniAODAK4CHSCentralJetTags,pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags +from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import pfParticleNetFromMiniAODAK4CHSForwardTagInfos,pfParticleNetFromMiniAODAK4CHSForwardJetTags,pfParticleNetFromMiniAODAK4CHSForwardDiscriminatorsJetTags +from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK8_cff import pfParticleNetFromMiniAODAK8TagInfos,pfParticleNetFromMiniAODAK8JetTags,pfParticleNetFromMiniAODAK8DiscriminatorsJetTags ## dictionary with supported jet clustering algorithms supportedJetAlgos = { @@ -755,15 +760,80 @@ def setupBTagging(process, jetSource, pfCandidates, explicitJTA, pvSource, svSou acceptedTagInfos.append(btagInfo) elif hasattr(toptag, btagInfo) : acceptedTagInfos.append(btagInfo) + elif btagInfo == 'pfParticleNetFromMiniAODAK4PuppiCentralTagInfos': + # ParticleNetFromMiniAOD cannot be run on RECO inputs, so need a workaround + if pfCandidates.value() != 'packedPFCandidates': + raise ValueError("Invalid pfCandidates collection: %s." % pfCandidates.value()) + addToProcessAndTask(btagPrefix+btagInfo+labelName+postfix, + pfParticleNetFromMiniAODAK4PuppiCentralTagInfos.clone( + jets = jetSource, + vertices = pvSource, + secondary_vertices = svSource, + pf_candidates = pfCandidates, + ), + process, task) + acceptedTagInfos.append(btagInfo) + elif btagInfo == 'pfParticleNetFromMiniAODAK4PuppiForwardTagInfos': + # ParticleNetFromMiniAOD cannot be run on RECO inputs, so need a workaround + if pfCandidates.value() != 'packedPFCandidates': + raise ValueError("Invalid pfCandidates collection: %s." % pfCandidates.value()) + addToProcessAndTask(btagPrefix+btagInfo+labelName+postfix, + pfParticleNetFromMiniAODAK4PuppiForwardTagInfos.clone( + jets = jetSource, + vertices = pvSource, + secondary_vertices = svSource, + pf_candidates = pfCandidates, + ), + process, task) + acceptedTagInfos.append(btagInfo) + elif btagInfo == 'pfParticleNetFromMiniAODAK4CHSCentralTagInfos': + # ParticleNetFromMiniAOD cannot be run on RECO inputs, so need a workaround + if pfCandidates.value() != 'packedPFCandidates': + raise ValueError("Invalid pfCandidates collection: %s." % pfCandidates.value()) + addToProcessAndTask(btagPrefix+btagInfo+labelName+postfix, + pfParticleNetFromMiniAODAK4CHSCentralTagInfos.clone( + jets = jetSource, + vertices = pvSource, + secondary_vertices = svSource, + pf_candidates = pfCandidates, + ), + process, task) + acceptedTagInfos.append(btagInfo) + elif btagInfo == 'pfParticleNetFromMiniAODAK4CHSForwardTagInfos': + # ParticleNetFromMiniAOD cannot be run on RECO inputs, so need a workaround + if pfCandidates.value() != 'packedPFCandidates': + raise ValueError("Invalid pfCandidates collection: %s." % pfCandidates.value()) + addToProcessAndTask(btagPrefix+btagInfo+labelName+postfix, + pfParticleNetFromMiniAODAK4CHSForwardTagInfos.clone( + jets = jetSource, + vertices = pvSource, + secondary_vertices = svSource, + pf_candidates = pfCandidates, + ), + process, task) + acceptedTagInfos.append(btagInfo) + elif btagInfo == 'pfParticleNetFromMiniAODAK8TagInfos': + # ParticleNetFromMiniAOD cannot be run on RECO inputs, so need a workaround + if pfCandidates.value() != 'packedPFCandidates': + raise ValueError("Invalid pfCandidates collection: %s." % pfCandidates.value()) + addToProcessAndTask(btagPrefix+btagInfo+labelName+postfix, + pfParticleNetFromMiniAODAK8TagInfos.clone( + jets = jetSource, + vertices = pvSource, + secondary_vertices = svSource, + pf_candidates = pfCandidates, + ), + process, task) + acceptedTagInfos.append(btagInfo) else: print(' --> %s ignored, since not available via RecoBTag.Configuration.RecoBTag_cff!'%(btagInfo)) - ## setup all required btagDiscriminators + # setup all required btagDiscriminators acceptedBtagDiscriminators = list() for discriminator_name in btagDiscriminators : btagDiscr = discriminator_name.split(':')[0] #split input tag to get the producer label #print discriminator_name, '-->', btagDiscr + newDiscr = btagPrefix+btagDiscr+labelName+postfix #new discriminator name if hasattr(btag,btagDiscr): - newDiscr = btagPrefix+btagDiscr+labelName+postfix #new discriminator name if hasattr(process, newDiscr): pass elif hasattr(getattr(btag, btagDiscr), 'tagInfos'): @@ -790,14 +860,75 @@ def setupBTagging(process, jetSource, pfCandidates, explicitJTA, pvSource, svSou else: raise ValueError('I do not know how to update %s it does not have neither "tagInfos" nor "src" attributes' % btagDiscr) acceptedBtagDiscriminators.append(discriminator_name) + elif btagDiscr=='pfParticleNetFromMiniAODAK4PuppiCentralJetTags': + if hasattr(process, newDiscr): + pass + addToProcessAndTask( + newDiscr, + pfParticleNetFromMiniAODAK4PuppiCentralJetTags.clone( + src = cms.InputTag(btagPrefix+supportedBtagDiscr[discriminator_name][0][0]+labelName+postfix) + ), + process, + task + ) + acceptedBtagDiscriminators.append(discriminator_name) + elif btagDiscr=='pfParticleNetFromMiniAODAK4PuppiForwardJetTags': + if hasattr(process, newDiscr): + pass + addToProcessAndTask( + newDiscr, + pfParticleNetFromMiniAODAK4PuppiForwardJetTags.clone( + src = cms.InputTag(btagPrefix+supportedBtagDiscr[discriminator_name][0][0]+labelName+postfix) + ), + process, + task + ) + acceptedBtagDiscriminators.append(discriminator_name) + elif btagDiscr=='pfParticleNetFromMiniAODAK4CHSCentralJetTags': + if hasattr(process, newDiscr): + pass + addToProcessAndTask( + newDiscr, + pfParticleNetFromMiniAODAK4CHSCentralJetTags.clone( + src = cms.InputTag(btagPrefix+supportedBtagDiscr[discriminator_name][0][0]+labelName+postfix) + ), + process, + task + ) + acceptedBtagDiscriminators.append(discriminator_name) + elif btagDiscr=='pfParticleNetFromMiniAODAK4CHSForwardJetTags': + if hasattr(process, newDiscr): + pass + addToProcessAndTask( + newDiscr, + pfParticleNetFromMiniAODAK4CHSForwardJetTags.clone( + src = cms.InputTag(btagPrefix+supportedBtagDiscr[discriminator_name][0][0]+labelName+postfix) + ), + process, + task + ) + acceptedBtagDiscriminators.append(discriminator_name) + elif btagDiscr=='pfParticleNetFromMiniAODAK8JetTags': + if hasattr(process, newDiscr): + pass + addToProcessAndTask( + newDiscr, + pfParticleNetFromMiniAODAK8JetTags.clone( + src = cms.InputTag(btagPrefix+supportedBtagDiscr[discriminator_name][0][0]+labelName+postfix) + ), + process, + task + ) + acceptedBtagDiscriminators.append(discriminator_name) else: print(' --> %s ignored, since not available via RecoBTag.Configuration.RecoBTag_cff!'%(btagDiscr)) + #update meta-taggers, if any for meta_tagger in present_meta: btagDiscr = meta_tagger.split(':')[0] #split input tag to get the producer label #print discriminator_name, '-->', btagDiscr + newDiscr = btagPrefix+btagDiscr+labelName+postfix #new discriminator name if hasattr(btag,btagDiscr): - newDiscr = btagPrefix+btagDiscr+labelName+postfix #new discriminator name if hasattr(process, newDiscr): pass else: @@ -814,7 +945,98 @@ def setupBTagging(process, jetSource, pfCandidates, explicitJTA, pvSource, svSou new_dep = btagPrefix+dependency+labelName+postfix replace = MassSearchReplaceAnyInputTagVisitor(dependency, new_dep) replace.doIt(getattr(process, newDiscr), newDiscr) - acceptedBtagDiscriminators.append(meta_tagger) + acceptedBtagDiscriminators.append(meta_tagger) + elif btagDiscr=='pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags': + if hasattr(process, newDiscr): + pass + else: + addToProcessAndTask( + newDiscr, + pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags.clone(), + process, + task + ) + for dependency in supportedMetaDiscr[meta_tagger]: + if ':' in dependency: + new_dep = btagPrefix+dependency.split(':')[0]+labelName+postfix+':'+dependency.split(':')[1] + else: + new_dep = btagPrefix+dependency+labelName+postfix + replace = MassSearchReplaceAnyInputTagVisitor(dependency, new_dep) + replace.doIt(getattr(process, newDiscr), newDiscr) + acceptedBtagDiscriminators.append(meta_tagger) + elif btagDiscr=='pfParticleNetFromMiniAODAK4PuppiForwardDiscriminatorsJetTags': + if hasattr(process, newDiscr): + pass + else: + addToProcessAndTask( + newDiscr, + pfParticleNetFromMiniAODAK4PuppiForwardDiscriminatorsJetTags.clone(), + process, + task + ) + for dependency in supportedMetaDiscr[meta_tagger]: + if ':' in dependency: + new_dep = btagPrefix+dependency.split(':')[0]+labelName+postfix+':'+dependency.split(':')[1] + else: + new_dep = btagPrefix+dependency+labelName+postfix + replace = MassSearchReplaceAnyInputTagVisitor(dependency, new_dep) + replace.doIt(getattr(process, newDiscr), newDiscr) + acceptedBtagDiscriminators.append(meta_tagger) + elif btagDiscr=='pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags': + if hasattr(process, newDiscr): + pass + else: + addToProcessAndTask( + newDiscr, + pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags.clone(), + process, + task + ) + for dependency in supportedMetaDiscr[meta_tagger]: + if ':' in dependency: + new_dep = btagPrefix+dependency.split(':')[0]+labelName+postfix+':'+dependency.split(':')[1] + else: + new_dep = btagPrefix+dependency+labelName+postfix + replace = MassSearchReplaceAnyInputTagVisitor(dependency, new_dep) + replace.doIt(getattr(process, newDiscr), newDiscr) + acceptedBtagDiscriminators.append(meta_tagger) + elif btagDiscr=='pfParticleNetFromMiniAODAK4CHSForwardDiscriminatorsJetTags': + if hasattr(process, newDiscr): + pass + else: + addToProcessAndTask( + newDiscr, + pfParticleNetFromMiniAODAK4CHSForwardDiscriminatorsJetTags.clone(), + process, + task + ) + for dependency in supportedMetaDiscr[meta_tagger]: + if ':' in dependency: + new_dep = btagPrefix+dependency.split(':')[0]+labelName+postfix+':'+dependency.split(':')[1] + else: + new_dep = btagPrefix+dependency+labelName+postfix + replace = MassSearchReplaceAnyInputTagVisitor(dependency, new_dep) + replace.doIt(getattr(process, newDiscr), newDiscr) + acceptedBtagDiscriminators.append(meta_tagger) + elif btagDiscr=='pfParticleNetFromMiniAODAK8DiscriminatorsJetTags': + if hasattr(process, newDiscr): + pass + else: + addToProcessAndTask( + newDiscr, + pfParticleNetFromMiniAODAK8DiscriminatorsJetTags.clone(), + process, + task + ) + for dependency in supportedMetaDiscr[meta_tagger]: + if ':' in dependency: + new_dep = btagPrefix+dependency.split(':')[0]+labelName+postfix+':'+dependency.split(':')[1] + else: + new_dep = btagPrefix+dependency+labelName+postfix + replace = MassSearchReplaceAnyInputTagVisitor(dependency, new_dep) + replace.doIt(getattr(process, newDiscr), newDiscr) + acceptedBtagDiscriminators.append(meta_tagger) + else: print(' --> %s ignored, since not available via RecoBTag.Configuration.RecoBTag_cff!'%(btagDiscr)) diff --git a/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4DiscriminatorsJetTags_cfi.py b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4DiscriminatorsJetTags_cfi.py new file mode 100644 index 0000000000000..9e68cb1727c58 --- /dev/null +++ b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4DiscriminatorsJetTags_cfi.py @@ -0,0 +1,313 @@ +import FWCore.ParameterSet.Config as cms + +pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags = cms.EDProducer( + 'BTagProbabilityToDiscriminator', + discriminators = cms.VPSet( + cms.PSet( + name = cms.string('BvsAll'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probb'), + ), + denominator=cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probb'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probc'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probuds'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probg'), + ), + ), + cms.PSet( + name = cms.string('CvsL'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probc'), + ), + denominator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probb'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probc'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probuds'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probg'), + ), + ), + cms.PSet( + name = cms.string('CvsB'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probc'), + ), + denominator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probc'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probb'), + ), + ), + cms.PSet( + name = cms.string('QvsG'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probuds'), + ), + denominator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probuds'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probg'), + ), + ), + cms.PSet( + name = cms.string('TauVsJet'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup3h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum3h1p'), + ), + denominator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probb'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probc'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probuds'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probg'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup3h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum3h1p'), + ), + ), + cms.PSet( + name = cms.string('TauVsEle'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup3h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum3h1p'), + ), + denominator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probele'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup3h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum3h1p'), + ), + ), + + cms.PSet( + name = cms.string('TauVsMu'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup3h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum3h1p'), + ), + denominator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probmu'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaup3h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probtaum3h1p'), + ), + ), + + ) + ) + +pfParticleNetFromMiniAODAK4PuppiForwardDiscriminatorsJetTags = cms.EDProducer( + 'BTagProbabilityToDiscriminator', + discriminators = cms.VPSet( + cms.PSet( + name = cms.string('QvsG'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiForwardJetTags', 'probq'), + ), + denominator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiForwardJetTags', 'probq'), + cms.InputTag('pfParticleNetFromMiniAODAK4PuppiForwardJetTags', 'probg'), + ), + ), + + ) + ) + +pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags = cms.EDProducer( + 'BTagProbabilityToDiscriminator', + discriminators = cms.VPSet( + cms.PSet( + name = cms.string('BvsAll'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probb'), + ), + denominator=cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probb'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probc'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probuds'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probg'), + ), + ), + cms.PSet( + name = cms.string('CvsL'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probc'), + ), + denominator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probb'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probc'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probuds'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probg'), + ), + ), + cms.PSet( + name = cms.string('CvsB'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probc'), + ), + denominator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probc'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probb'), + ), + ), + cms.PSet( + name = cms.string('QvsG'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probuds'), + ), + denominator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probuds'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probg'), + ), + ), + cms.PSet( + name = cms.string('TauVsJet'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup3h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum3h1p'), + ), + denominator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probb'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probc'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probuds'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probg'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup3h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum3h1p'), + ), + ), + cms.PSet( + name = cms.string('TauVsEle'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup3h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum3h1p'), + ), + denominator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probele'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup3h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum3h1p'), + ), + ), + + cms.PSet( + name = cms.string('TauVsMu'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup3h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum3h1p'), + ), + denominator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probmu'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaup3h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum1h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum1h1p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum1h2p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum3h0p'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probtaum3h1p'), + ), + ), + + ) + ) + +pfParticleNetFromMiniAODAK4CHSForwardDiscriminatorsJetTags = cms.EDProducer( + 'BTagProbabilityToDiscriminator', + discriminators = cms.VPSet( + cms.PSet( + name = cms.string('QvsG'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4CHSForwardJetTags', 'probq'), + ), + denominator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK4CHSForwardJetTags', 'probq'), + cms.InputTag('pfParticleNetFromMiniAODAK4CHSForwardJetTags', 'probg'), + ), + ), + + ) + ) diff --git a/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4_cff.py b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4_cff.py index b3ea9b90caff9..82356764f3818 100644 --- a/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4_cff.py +++ b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4_cff.py @@ -3,6 +3,7 @@ from RecoBTag.FeatureTools.pfDeepBoostedJetTagInfos_cfi import pfDeepBoostedJetTagInfos from RecoBTag.ONNXRuntime.boostedJetONNXJetTagsProducer_cfi import boostedJetONNXJetTagsProducer from RecoBTag.FeatureTools.ParticleNetFeatureEvaluator_cfi import ParticleNetFeatureEvaluator +from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4DiscriminatorsJetTags_cfi import * pfParticleNetFromMiniAODAK4CHSCentralTagInfos = ParticleNetFeatureEvaluator.clone( jets = "slimmedJets", @@ -79,3 +80,16 @@ _pfParticleNetFromMiniAODAK4PuppiForwardJetTagsProbs = ['pfParticleNetFromMiniAODAK4PuppiForwardJetTags:' + flav_name for flav_name in pfParticleNetFromMiniAODAK4PuppiForwardJetTags.flav_names] +_pfParticleNetFromMiniAODAK4CHSCentralJetTagsMetaDiscr = ['pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:' + disc.name.value() + for disc in pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags.discriminators] +_pfParticleNetFromMiniAODAK4CHSForwardJetTagsMetaDiscr = ['pfParticleNetFromMiniAODAK4CHSForwardDiscriminatorsJetTags:' + disc.name.value() + for disc in pfParticleNetFromMiniAODAK4CHSForwardDiscriminatorsJetTags.discriminators] +_pfParticleNetFromMiniAODAK4PuppiCentralJetTagsMetaDiscr = ['pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags:' + disc.name.value() + for disc in pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags.discriminators] +_pfParticleNetFromMiniAODAK4PuppiForwardJetTagsMetaDiscr = ['pfParticleNetFromMiniAODAK4PuppiForwardDiscriminatorsJetTags:' + disc.name.value() + for disc in pfParticleNetFromMiniAODAK4PuppiForwardDiscriminatorsJetTags.discriminators] + +_pfParticleNetFromMiniAODAK4CHSCentralJetTagsAll = _pfParticleNetFromMiniAODAK4CHSCentralJetTagsProbs + _pfParticleNetFromMiniAODAK4CHSCentralJetTagsMetaDiscr +_pfParticleNetFromMiniAODAK4CHSForwardJetTagsAll = _pfParticleNetFromMiniAODAK4CHSForwardJetTagsProbs + _pfParticleNetFromMiniAODAK4CHSForwardJetTagsMetaDiscr +_pfParticleNetFromMiniAODAK4PuppiCentralJetTagsAll = _pfParticleNetFromMiniAODAK4PuppiCentralJetTagsProbs + _pfParticleNetFromMiniAODAK4PuppiCentralJetTagsMetaDiscr +_pfParticleNetFromMiniAODAK4PuppiForwardJetTagsAll = _pfParticleNetFromMiniAODAK4PuppiForwardJetTagsProbs + _pfParticleNetFromMiniAODAK4PuppiForwardJetTagsMetaDiscr diff --git a/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK8DiscriminatorsJetTags_cfi.py b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK8DiscriminatorsJetTags_cfi.py new file mode 100644 index 0000000000000..a755317a383c8 --- /dev/null +++ b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK8DiscriminatorsJetTags_cfi.py @@ -0,0 +1,71 @@ +import FWCore.ParameterSet.Config as cms + +pfParticleNetFromMiniAODAK8DiscriminatorsJetTags = cms.EDProducer( + 'BTagProbabilityToDiscriminator', + discriminators = cms.VPSet( + cms.PSet( + name = cms.string('HbbvsQCD'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHbb'), + ), + denominator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHbb'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD2hf'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD1hf'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD0hf'), + ), + ), + cms.PSet( + name = cms.string('HccvsQCD'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHcc'), + ), + denominator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHcc'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD2hf'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD1hf'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD0hf'), + ), + ), + cms.PSet( + name = cms.string('HttvsQCD'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHtt'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHtm'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHte'), + ), + denominator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHtt'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHtm'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHte'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD2hf'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD1hf'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD0hf'), + ), + ), + cms.PSet( + name = cms.string('HqqvsQCD'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHqq'), + ), + denominator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHqq'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD2hf'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD1hf'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD0hf'), + ), + ), + cms.PSet( + name = cms.string('HggvsQCD'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHgg'), + ), + denominator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHgg'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD2hf'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD1hf'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD0hf'), + ), + ), + ) + ) diff --git a/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK8_cff.py b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK8_cff.py index 045c6962c5534..2c9e3c62e4c94 100644 --- a/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK8_cff.py +++ b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK8_cff.py @@ -3,6 +3,7 @@ from RecoBTag.FeatureTools.pfDeepBoostedJetTagInfos_cfi import pfDeepBoostedJetTagInfos from RecoBTag.ONNXRuntime.boostedJetONNXJetTagsProducer_cfi import boostedJetONNXJetTagsProducer from RecoBTag.FeatureTools.ParticleNetFeatureEvaluator_cfi import ParticleNetFeatureEvaluator +from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK8DiscriminatorsJetTags_cfi import pfParticleNetFromMiniAODAK8DiscriminatorsJetTags pfParticleNetFromMiniAODAK8TagInfos = ParticleNetFeatureEvaluator.clone( jets = "slimmedJetsAK8", @@ -27,3 +28,7 @@ # probs _pfParticleNetFromMiniAODAK8JetTagsProbs = ['pfParticleNetFromMiniAODAK8JetTags:' + flav_name for flav_name in pfParticleNetFromMiniAODAK8JetTags.flav_names] +_pfParticleNetFromMiniAODAK8JetTagsMetaDiscr = ['pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:' + disc.name.value() + for disc in pfParticleNetFromMiniAODAK8DiscriminatorsJetTags.discriminators] + +_pfParticleNetFromMiniAODAK8JetTagsAll = _pfParticleNetFromMiniAODAK8JetTagsProbs + _pfParticleNetFromMiniAODAK8JetTagsMetaDiscr diff --git a/RecoBTag/ONNXRuntime/test/test_particle_from_miniaod_ak4chs_cfg.py b/RecoBTag/ONNXRuntime/test/test_particlenet_from_miniaod_ak4chs_cfg.py similarity index 100% rename from RecoBTag/ONNXRuntime/test/test_particle_from_miniaod_ak4chs_cfg.py rename to RecoBTag/ONNXRuntime/test/test_particlenet_from_miniaod_ak4chs_cfg.py diff --git a/RecoBTag/ONNXRuntime/test/test_particle_from_miniaod_ak4puppi_cfg.py b/RecoBTag/ONNXRuntime/test/test_particlenet_from_miniaod_ak4puppi_cfg.py similarity index 100% rename from RecoBTag/ONNXRuntime/test/test_particle_from_miniaod_ak4puppi_cfg.py rename to RecoBTag/ONNXRuntime/test/test_particlenet_from_miniaod_ak4puppi_cfg.py diff --git a/RecoBTag/ONNXRuntime/test/test_particle_from_miniaod_ak8_cfg.py b/RecoBTag/ONNXRuntime/test/test_particlenet_from_miniaod_ak8_cfg.py similarity index 100% rename from RecoBTag/ONNXRuntime/test/test_particle_from_miniaod_ak8_cfg.py rename to RecoBTag/ONNXRuntime/test/test_particlenet_from_miniaod_ak8_cfg.py From 06e01817aabb5ff789e8663ec2a654d832771c7b Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Thu, 2 Mar 2023 10:10:11 +0100 Subject: [PATCH 023/233] clean up saved output nodes --- PhysicsTools/NanoAOD/python/jetsAK8_cff.py | 11 ++++++----- .../PatAlgos/python/slimming/applyDeepBtagging_cff.py | 3 +-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/PhysicsTools/NanoAOD/python/jetsAK8_cff.py b/PhysicsTools/NanoAOD/python/jetsAK8_cff.py index 43a3ef11ef3c6..04b105da099ec 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK8_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK8_cff.py @@ -114,18 +114,19 @@ deepTagMD_ccvsLight = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:ccvsLight')",float,doc="Mass-decorrelated DeepBoostedJet tagger Z/H/gluon->cc vs light flavour discriminator",precision=10), particleNet_TvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:TvsQCD')",float,doc="ParticleNet tagger (w/ mass) top vs QCD discriminator",precision=10), particleNet_WvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:WvsQCD')",float,doc="ParticleNet tagger (w/ mass) W vs QCD discriminator",precision=10), - particleNet_ZvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:ZvsQCD')",float,doc="ParticleNet tagger (w/ mass) Z vs QCD discriminator",precision=10), - particleNet_XbbvsQCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HbbvsQCD')",float,doc="ParticleNet tagger X(->bb) vs QCD discriminator",precision=10), - particleNet_XccvsQCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HccvsQCD')",float,doc="ParticleNet tagger X(->cc) vs QCD discriminator",precision=10), - particleNet_XttvsQCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HttvsQCD')",float,doc="ParticleNet tagger X(->tau_h tau_x) vs QCD discriminator",precision=10), particleNet_H4qvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:H4qvsQCD')",float,doc="ParticleNet tagger (w/ mass) H(->VV->qqqq) vs QCD discriminator",precision=10), particleNet_QCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:QCD2hf')+bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:QCD1hf')+bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:QCD0hf')",float,doc="ParticleNet tagger QCD(0+1+2HF) sum",precision=10), - particleNet_QCDHF = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:QCD2hf')+bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:QCD1hf')",float,doc="ParticleNet tagger QCD 1 or 2 HF (b/c) vs. 0HF score",precision=10), + particleNet_QCD2HF = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:QCD2hf')",float,doc="ParticleNet tagger QCD 2 HF (b/c) score",precision=10), + particleNet_QCD1HF = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:QCD1hf')",float,doc="ParticleNet tagger QCD 1 HF (b/c) score",precision=10), + particleNet_QCD0HF = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:QCD0hf')",float,doc="ParticleNet tagger QCD 0 HF (b/c) score",precision=10), particleNet_mass = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:masscorr')",float,doc="ParticleNet mass regression",precision=10), particleNet_Xbb = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHbb')",float,doc="ParticleNet tagger raw X->bb score. For X->bb vs QCD tagging, use Xbb/(Xbb+QCD)",precision=10), particleNet_Xcc = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHcc')",float,doc="ParticleNet tagger raw X->cc score. For X->cc vs QCD tagging, use Xcc/(Xcc+QCD)",precision=10), particleNet_Xqq = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHqq')",float,doc="ParticleNet tagger raw X->qq (uds) score. For X->qq vs QCD tagging, use Xqq/(Xqq+QCD). For W vs QCD tagging, use (Xcc+Xqq)/(Xcc+Xqq+QCD)",precision=10), particleNet_Xgg = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHgg')",float,doc="ParticleNet tagger raw X->gg score. For X->gg vs QCD tagging, use Xgg/(Xgg+QCD)",precision=10), + particleNet_Xtt = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHtt')",float,doc="ParticleNet tagger raw X->tau_h tau_h score. For X->tau_h tau_h vs QCD tagging, use Xtt/(Xtt+QCD)",precision=10), + particleNet_Xtm = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHtm')",float,doc="ParticleNet tagger raw X-> mu tau_h score. For X->mu tau_h vs QCD tagging, use Xtm/(Xtm+QCD)",precision=10), + particleNet_Xte = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHte')",float,doc="ParticleNet tagger raw X-> e tau_h score. For X->e tau_h vs QCD tagging, use Xte/(Xte+QCD)",precision=10), subJetIdx1 = Var("?nSubjetCollections()>0 && subjets('SoftDropPuppi').size()>0?subjets('SoftDropPuppi')[0].key():-1", "int16", doc="index of first subjet"), subJetIdx2 = Var("?nSubjetCollections()>0 && subjets('SoftDropPuppi').size()>1?subjets('SoftDropPuppi')[1].key():-1", "int16", diff --git a/PhysicsTools/PatAlgos/python/slimming/applyDeepBtagging_cff.py b/PhysicsTools/PatAlgos/python/slimming/applyDeepBtagging_cff.py index f43a31dbf7c25..a234d6baeb360 100644 --- a/PhysicsTools/PatAlgos/python/slimming/applyDeepBtagging_cff.py +++ b/PhysicsTools/PatAlgos/python/slimming/applyDeepBtagging_cff.py @@ -61,8 +61,7 @@ def applyDeepBtagging(process, postfix=""): 'pfDeepFlavourJetTags:problepb', 'pfDeepFlavourJetTags:probc', 'pfDeepFlavourJetTags:probuds', - 'pfDeepFlavourJetTags:probg', - 'pfParticleNetAK4JetTags:probpu') + pfParticleNetAK4JetTagsAll + 'pfDeepFlavourJetTags:probg') + pfParticleNetFromMiniAODAK4PuppiCentralJetTagsAll + pfParticleNetFromMiniAODAK4PuppiForwardJetTagsAll ) From e003ff2b671f72bc8da83b45a3e07b0030917c24 Mon Sep 17 00:00:00 2001 From: Sam Harper Date: Thu, 2 Mar 2023 10:39:35 +0100 Subject: [PATCH 024/233] adding missing variables from reduced as found by Finn --- PhysicsTools/NanoAOD/python/l1trig_cff.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PhysicsTools/NanoAOD/python/l1trig_cff.py b/PhysicsTools/NanoAOD/python/l1trig_cff.py index 467998c794a93..9f154cba2bfc3 100644 --- a/PhysicsTools/NanoAOD/python/l1trig_cff.py +++ b/PhysicsTools/NanoAOD/python/l1trig_cff.py @@ -25,7 +25,8 @@ ) l1EtSumReducedVars = cms.PSet( - l1PtVars + l1PtVars, + etSumType = Var("getType()",int,doc="et sum type"), ) l1EGReducedVars = cms.PSet( l1P3Vars, @@ -38,6 +39,7 @@ ) l1MuonReducedVars = cms.PSet( + l1P3Vars, hwQual = Var("hwQual()",int,doc="hardware qual"), hwCharge = Var("hwCharge()",int,doc=""), etaAtVtx = Var("etaAtVtx()",float,doc=""), From da0325fa8437e295506579fc5d5d2c7cb49d38fe Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Thu, 2 Mar 2023 11:14:12 +0100 Subject: [PATCH 025/233] fix reference to PNet miniAOD tags --- PhysicsTools/NanoAOD/python/jetsAK8_cff.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PhysicsTools/NanoAOD/python/jetsAK8_cff.py b/PhysicsTools/NanoAOD/python/jetsAK8_cff.py index 04b105da099ec..e8896fb32bce5 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK8_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK8_cff.py @@ -115,11 +115,11 @@ particleNet_TvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:TvsQCD')",float,doc="ParticleNet tagger (w/ mass) top vs QCD discriminator",precision=10), particleNet_WvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:WvsQCD')",float,doc="ParticleNet tagger (w/ mass) W vs QCD discriminator",precision=10), particleNet_H4qvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:H4qvsQCD')",float,doc="ParticleNet tagger (w/ mass) H(->VV->qqqq) vs QCD discriminator",precision=10), - particleNet_QCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:QCD2hf')+bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:QCD1hf')+bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:QCD0hf')",float,doc="ParticleNet tagger QCD(0+1+2HF) sum",precision=10), - particleNet_QCD2HF = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:QCD2hf')",float,doc="ParticleNet tagger QCD 2 HF (b/c) score",precision=10), - particleNet_QCD1HF = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:QCD1hf')",float,doc="ParticleNet tagger QCD 1 HF (b/c) score",precision=10), - particleNet_QCD0HF = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:QCD0hf')",float,doc="ParticleNet tagger QCD 0 HF (b/c) score",precision=10), - particleNet_mass = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:masscorr')",float,doc="ParticleNet mass regression",precision=10), + particleNet_QCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD2hf')+bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD1hf')+bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD0hf')",float,doc="ParticleNet tagger QCD(0+1+2HF) sum",precision=10), + particleNet_QCD2HF = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD2hf')",float,doc="ParticleNet tagger QCD 2 HF (b/c) score",precision=10), + particleNet_QCD1HF = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD1hf')",float,doc="ParticleNet tagger QCD 1 HF (b/c) score",precision=10), + particleNet_QCD0HF = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD0hf')",float,doc="ParticleNet tagger QCD 0 HF (b/c) score",precision=10), + particleNet_massCorr = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:masscorr')",float,doc="ParticleNet mass regression, relative correction to JEC-corrected jet mass (no softdrop)",precision=10), particleNet_Xbb = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHbb')",float,doc="ParticleNet tagger raw X->bb score. For X->bb vs QCD tagging, use Xbb/(Xbb+QCD)",precision=10), particleNet_Xcc = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHcc')",float,doc="ParticleNet tagger raw X->cc score. For X->cc vs QCD tagging, use Xcc/(Xcc+QCD)",precision=10), particleNet_Xqq = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHqq')",float,doc="ParticleNet tagger raw X->qq (uds) score. For X->qq vs QCD tagging, use Xqq/(Xqq+QCD). For W vs QCD tagging, use (Xcc+Xqq)/(Xcc+Xqq+QCD)",precision=10), From 7e5767b769e472ac54a43315db255cbd01bdaaf1 Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Thu, 2 Mar 2023 15:10:18 +0100 Subject: [PATCH 026/233] remove DeepAK8 from miniAOD and nanoAOD, include full ParticleNet mass correlated outputs --- PhysicsTools/NanoAOD/python/jetsAK8_cff.py | 36 +++++++++---------- .../python/slimming/applyDeepBtagging_cff.py | 32 ++++++++--------- .../pfParticleNetDiscriminatorsJetTags_cfi.py | 14 ++++++++ ...FromMiniAODAK8DiscriminatorsJetTags_cfi.py | 24 +++++++++++-- .../ONNXRuntime/python/pfParticleNet_cff.py | 2 ++ 5 files changed, 70 insertions(+), 38 deletions(-) diff --git a/PhysicsTools/NanoAOD/python/jetsAK8_cff.py b/PhysicsTools/NanoAOD/python/jetsAK8_cff.py index e8896fb32bce5..9a92d66462b68 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK8_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK8_cff.py @@ -96,25 +96,15 @@ btagDDBvLV2 = Var("bDiscriminator('pfMassIndependentDeepDoubleBvLV2JetTags:probHbb')",float,doc="DeepDoubleX V2(mass-decorrelated) discriminator for H(Z)->bb vs QCD",precision=10), btagDDCvLV2 = Var("bDiscriminator('pfMassIndependentDeepDoubleCvLV2JetTags:probHcc')",float,doc="DeepDoubleX V2 (mass-decorrelated) discriminator for H(Z)->cc vs QCD",precision=10), btagDDCvBV2 = Var("bDiscriminator('pfMassIndependentDeepDoubleCvBV2JetTags:probHcc')",float,doc="DeepDoubleX V2 (mass-decorrelated) discriminator for H(Z)->cc vs H(Z)->bb",precision=10), - deepTag_TvsQCD = Var("bDiscriminator('pfDeepBoostedDiscriminatorsJetTags:TvsQCD')",float,doc="DeepBoostedJet tagger top vs QCD discriminator",precision=10), - deepTag_WvsQCD = Var("bDiscriminator('pfDeepBoostedDiscriminatorsJetTags:WvsQCD')",float,doc="DeepBoostedJet tagger W vs QCD discriminator",precision=10), - deepTag_ZvsQCD = Var("bDiscriminator('pfDeepBoostedDiscriminatorsJetTags:ZvsQCD')",float,doc="DeepBoostedJet tagger Z vs QCD discriminator",precision=10), - deepTag_H = Var("bDiscriminator('pfDeepBoostedJetTags:probHbb')+bDiscriminator('pfDeepBoostedJetTags:probHcc')+bDiscriminator('pfDeepBoostedJetTags:probHqqqq')",float,doc="DeepBoostedJet tagger H(bb,cc,4q) sum",precision=10), - deepTag_QCD = Var("bDiscriminator('pfDeepBoostedJetTags:probQCDbb')+bDiscriminator('pfDeepBoostedJetTags:probQCDcc')+bDiscriminator('pfDeepBoostedJetTags:probQCDb')+bDiscriminator('pfDeepBoostedJetTags:probQCDc')+bDiscriminator('pfDeepBoostedJetTags:probQCDothers')",float,doc="DeepBoostedJet tagger QCD(bb,cc,b,c,others) sum",precision=10), - deepTag_QCDothers = Var("bDiscriminator('pfDeepBoostedJetTags:probQCDothers')",float,doc="DeepBoostedJet tagger QCDothers value",precision=10), - deepTagMD_TvsQCD = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:TvsQCD')",float,doc="Mass-decorrelated DeepBoostedJet tagger top vs QCD discriminator",precision=10), - deepTagMD_WvsQCD = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:WvsQCD')",float,doc="Mass-decorrelated DeepBoostedJet tagger W vs QCD discriminator",precision=10), - deepTagMD_ZvsQCD = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:ZvsQCD')",float,doc="Mass-decorrelated DeepBoostedJet tagger Z vs QCD discriminator",precision=10), - deepTagMD_ZHbbvsQCD = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:ZHbbvsQCD')",float,doc="Mass-decorrelated DeepBoostedJet tagger Z/H->bb vs QCD discriminator",precision=10), - deepTagMD_ZbbvsQCD = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:ZbbvsQCD')",float,doc="Mass-decorrelated DeepBoostedJet tagger Z->bb vs QCD discriminator",precision=10), - deepTagMD_HbbvsQCD = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:HbbvsQCD')",float,doc="Mass-decorrelated DeepBoostedJet tagger H->bb vs QCD discriminator",precision=10), - deepTagMD_ZHccvsQCD = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:ZHccvsQCD')",float,doc="Mass-decorrelated DeepBoostedJet tagger Z/H->cc vs QCD discriminator",precision=10), - deepTagMD_H4qvsQCD = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:H4qvsQCD')",float,doc="Mass-decorrelated DeepBoostedJet tagger H->4q vs QCD discriminator",precision=10), - deepTagMD_bbvsLight = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:bbvsLight')",float,doc="Mass-decorrelated DeepBoostedJet tagger Z/H/gluon->bb vs light flavour discriminator",precision=10), - deepTagMD_ccvsLight = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:ccvsLight')",float,doc="Mass-decorrelated DeepBoostedJet tagger Z/H/gluon->cc vs light flavour discriminator",precision=10), - particleNet_TvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:TvsQCD')",float,doc="ParticleNet tagger (w/ mass) top vs QCD discriminator",precision=10), - particleNet_WvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:WvsQCD')",float,doc="ParticleNet tagger (w/ mass) W vs QCD discriminator",precision=10), - particleNet_H4qvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:H4qvsQCD')",float,doc="ParticleNet tagger (w/ mass) H(->VV->qqqq) vs QCD discriminator",precision=10), + particleNetMassCorr_QCD = Var("bDiscriminator('pfParticleNetJetTags:probQCDbb')+bDiscriminator('pfParticleNetJetTags:probQCDcc')+bDiscriminator('pfParticleNetJetTags:probQCDb')+bDiscriminator('pfParticleNetJetTags:probQCDc')+bDiscriminator('pfParticleNetJetTags:probQCDothers')",float,doc="ParticleNet tagger QCD(bb,cc,b,c,others) sum",precision=10), + particleNetMassCorr_TvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:TvsQCD')",float,doc="ParticleNet tagger (w/ mass) top vs QCD discriminator",precision=10), + particleNetMassCorr_WvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:WvsQCD')",float,doc="ParticleNet tagger (w/ mass) W vs QCD discriminator",precision=10), + particleNetMassCorr_ZvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:ZvsQCD')",float,doc="ParticleNet tagger (w/ mass) Z vs QCD discriminator",precision=10), + particleNetMassCorr_H4qvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:H4qvsQCD')",float,doc="ParticleNet tagger (w/ mass) H(->VV->qqqq) vs QCD discriminator",precision=10), + particleNetMassCorr_HbbvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:HbbvsQCD')",float,doc="ParticleNet tagger (w/mass) H(->bb) vs QCD discriminator",precision=10), + particleNetMassCorr_HccvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:HccvsQCD')",float,doc="ParticleNet tagger (w/mass) H(->cc) vs QCD discriminator",precision=10), + particleNetMassCorr_ZbbvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:ZbbvsQCD')",float,doc="ParticleNet tagger (w/mass) Z(->bb) vs QCD discriminator",precision=10), + particleNetMassCorr_ZccvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:ZccvsQCD')",float,doc="ParticleNet tagger (w/mass) Z(->cc) vs QCD discriminator",precision=10), particleNet_QCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD2hf')+bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD1hf')+bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD0hf')",float,doc="ParticleNet tagger QCD(0+1+2HF) sum",precision=10), particleNet_QCD2HF = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD2hf')",float,doc="ParticleNet tagger QCD 2 HF (b/c) score",precision=10), particleNet_QCD1HF = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD1hf')",float,doc="ParticleNet tagger QCD 1 HF (b/c) score",precision=10), @@ -127,6 +117,14 @@ particleNet_Xtt = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHtt')",float,doc="ParticleNet tagger raw X->tau_h tau_h score. For X->tau_h tau_h vs QCD tagging, use Xtt/(Xtt+QCD)",precision=10), particleNet_Xtm = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHtm')",float,doc="ParticleNet tagger raw X-> mu tau_h score. For X->mu tau_h vs QCD tagging, use Xtm/(Xtm+QCD)",precision=10), particleNet_Xte = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHte')",float,doc="ParticleNet tagger raw X-> e tau_h score. For X->e tau_h vs QCD tagging, use Xte/(Xte+QCD)",precision=10), + # explicitly combine tagger vs. QCD scores, for convenience + particleNet_XbbVsQCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HbbvsQCD')",float,doc="ParticleNet X->bb vs. QCD score: Xbb/(Xbb+QCD)",precision=10), + particleNet_XccVsQCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HccvsQCD')",float,doc="ParticleNet X->cc vs. QCD score: Xcc/(Xcc+QCD)",precision=10), + particleNet_XqqVsQCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HqqvsQCD')",float,doc="ParticleNet X->qq (uds) vs. QCD score: Xqq/(Xqq+QCD)",precision=10), + particleNet_XggVsQCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HggvsQCD')",float,doc="ParticleNet X->gg vs. QCD score: Xgg/(Xgg+QCD)",precision=10), + particleNet_XttVsQCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HttvsQCD')",float,doc="ParticleNet X->tau_h tau_h vs. QCD score: Xtt/(Xtt+QCD)",precision=10), + particleNet_XtmVsQCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HtmvsQCD')",float,doc="ParticleNet X->mu tau_h vs. QCD score: Xtm/(Xtm+QCD)",precision=10), + particleNet_XteVsQCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HtevsQCD')",float,doc="ParticleNet X->e tau_h vs. QCD score: Xte/(Xte+QCD)",precision=10), subJetIdx1 = Var("?nSubjetCollections()>0 && subjets('SoftDropPuppi').size()>0?subjets('SoftDropPuppi')[0].key():-1", "int16", doc="index of first subjet"), subJetIdx2 = Var("?nSubjetCollections()>0 && subjets('SoftDropPuppi').size()>1?subjets('SoftDropPuppi')[1].key():-1", "int16", diff --git a/PhysicsTools/PatAlgos/python/slimming/applyDeepBtagging_cff.py b/PhysicsTools/PatAlgos/python/slimming/applyDeepBtagging_cff.py index a234d6baeb360..7b1ae50bb45ca 100644 --- a/PhysicsTools/PatAlgos/python/slimming/applyDeepBtagging_cff.py +++ b/PhysicsTools/PatAlgos/python/slimming/applyDeepBtagging_cff.py @@ -87,7 +87,7 @@ def applyDeepBtagging(process, postfix=""): from RecoBTag.ONNXRuntime.pfDeepBoostedJet_cff import _pfDeepBoostedJetTagsAll as pfDeepBoostedJetTagsAll from RecoBTag.ONNXRuntime.pfHiggsInteractionNet_cff import _pfHiggsInteractionNetTagsProbs as pfHiggsInteractionNetTagsProbs - from RecoBTag.ONNXRuntime.pfParticleNet_cff import _pfParticleNetJetTagsAll as pfParticleNetJetTagsAll + from RecoBTag.ONNXRuntime.pfParticleNet_cff import _pfParticleNetMassCorrelatedJetTagsAll as pfParticleNetMassCorrelatedJetTagsAll from RecoBTag.ONNXRuntime.pfParticleNet_cff import _pfParticleNetMassRegressionOutputs from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK8_cff import _pfParticleNetFromMiniAODAK8JetTagsAll as pfParticleNetFromMiniAODAK8JetTagsAll @@ -101,22 +101,20 @@ def applyDeepBtagging(process, postfix=""): 'pfMassIndependentDeepDoubleCvLV2JetTags:probHcc', 'pfMassIndependentDeepDoubleCvBV2JetTags:probHbb', 'pfMassIndependentDeepDoubleCvBV2JetTags:probHcc', - 'pfParticleNetDiscriminatorsJetTags:TvsQCD', - 'pfParticleNetDiscriminatorsJetTags:WvsQCD', - 'pfParticleNetDiscriminatorsJetTags:H4qvsQCD', - 'pfParticleNetJetTags:probTbcq', - 'pfParticleNetJetTags:probTbqq', - 'pfParticleNetJetTags:probTbc', - 'pfParticleNetJetTags:probTbq', - 'pfParticleNetJetTags:probTbel', - 'pfParticleNetJetTags:probTbmu', - 'pfParticleNetJetTags:probTbta', - 'pfParticleNetJetTags:probWcq', - 'pfParticleNetJetTags:probWqq', - 'pfParticleNetJetTags:probHqqqq', - ) + pfDeepBoostedJetTagsAll + pfHiggsInteractionNetTagsProbs + pfParticleNetFromMiniAODAK8JetTagsAll) - #) + pfDeepBoostedJetTagsAll + pfParticleNetJetTagsAll + pfHiggsInteractionNetTagsProbs + _pfParticleNetMassRegressionOutputs - # + pfParticleNetFromMiniAODAK8JetTagsAll) + #'pfParticleNetDiscriminatorsJetTags:TvsQCD', + #'pfParticleNetDiscriminatorsJetTags:WvsQCD', + #'pfParticleNetDiscriminatorsJetTags:H4qvsQCD', + #'pfParticleNetJetTags:probTbcq', + #'pfParticleNetJetTags:probTbqq', + #'pfParticleNetJetTags:probTbc', + #'pfParticleNetJetTags:probTbq', + #'pfParticleNetJetTags:probTbel', + #'pfParticleNetJetTags:probTbmu', + #'pfParticleNetJetTags:probTbta', + #'pfParticleNetJetTags:probWcq', + #'pfParticleNetJetTags:probWqq', + #'pfParticleNetJetTags:probHqqqq', + ) + pfParticleNetMassCorrelatedJetTagsAll + pfHiggsInteractionNetTagsProbs + pfParticleNetFromMiniAODAK8JetTagsAll) updateJetCollection( process, jetSource = cms.InputTag('slimmedJetsAK8NoDeepTags'), diff --git a/RecoBTag/ONNXRuntime/python/pfParticleNetDiscriminatorsJetTags_cfi.py b/RecoBTag/ONNXRuntime/python/pfParticleNetDiscriminatorsJetTags_cfi.py index b6a57b56cb065..d265136180efa 100644 --- a/RecoBTag/ONNXRuntime/python/pfParticleNetDiscriminatorsJetTags_cfi.py +++ b/RecoBTag/ONNXRuntime/python/pfParticleNetDiscriminatorsJetTags_cfi.py @@ -67,6 +67,20 @@ cms.InputTag('pfParticleNetJetTags', 'probQCDothers'), ), ), + cms.PSet( + name = cms.string('ZccvsQCD'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetJetTags', 'probZcc'), + ), + denominator = cms.VInputTag( + cms.InputTag('pfParticleNetJetTags', 'probZcc'), + cms.InputTag('pfParticleNetJetTags', 'probQCDbb'), + cms.InputTag('pfParticleNetJetTags', 'probQCDcc'), + cms.InputTag('pfParticleNetJetTags', 'probQCDb'), + cms.InputTag('pfParticleNetJetTags', 'probQCDc'), + cms.InputTag('pfParticleNetJetTags', 'probQCDothers'), + ), + ), cms.PSet( name = cms.string('HbbvsQCD'), numerator = cms.VInputTag( diff --git a/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK8DiscriminatorsJetTags_cfi.py b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK8DiscriminatorsJetTags_cfi.py index a755317a383c8..3c478acd7120e 100644 --- a/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK8DiscriminatorsJetTags_cfi.py +++ b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK8DiscriminatorsJetTags_cfi.py @@ -31,12 +31,32 @@ name = cms.string('HttvsQCD'), numerator = cms.VInputTag( cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHtt'), - cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHtm'), - cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHte'), ), denominator = cms.VInputTag( cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHtt'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD2hf'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD1hf'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD0hf'), + ), + ), + cms.PSet( + name = cms.string('HtmvsQCD'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHtm'), + ), + denominator = cms.VInputTag( cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHtm'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD2hf'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD1hf'), + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD0hf'), + ), + ), + cms.PSet( + name = cms.string('HtevsQCD'), + numerator = cms.VInputTag( + cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHte'), + ), + denominator = cms.VInputTag( cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probHte'), cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD2hf'), cms.InputTag('pfParticleNetFromMiniAODAK8JetTags', 'probQCD1hf'), diff --git a/RecoBTag/ONNXRuntime/python/pfParticleNet_cff.py b/RecoBTag/ONNXRuntime/python/pfParticleNet_cff.py index cc2b8862db615..cb007ca23fc56 100644 --- a/RecoBTag/ONNXRuntime/python/pfParticleNet_cff.py +++ b/RecoBTag/ONNXRuntime/python/pfParticleNet_cff.py @@ -136,3 +136,5 @@ _pfParticleNetJetTagsAll = _pfParticleNetJetTagsProbs + _pfParticleNetJetTagsMetaDiscrs + \ _pfMassDecorrelatedParticleNetJetTagsProbs + _pfMassDecorrelatedParticleNetJetTagsMetaDiscrs + +_pfParticleNetMassCorrelatedJetTagsAll = _pfParticleNetJetTagsProbs + _pfParticleNetJetTagsMetaDiscrs From 159f060a58477758dc67f30e2efd770688dea3b9 Mon Sep 17 00:00:00 2001 From: abellora Date: Fri, 3 Mar 2023 14:26:09 +0100 Subject: [PATCH 027/233] Making digi InputTag trackedd --- DQM/CTPPS/plugins/CTPPSRandomDQMSource.cc | 4 ++-- DQM/CTPPS/python/ctppsRandomDQMSource_cfi.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DQM/CTPPS/plugins/CTPPSRandomDQMSource.cc b/DQM/CTPPS/plugins/CTPPSRandomDQMSource.cc index 41f9bfe11a2fb..1dd26cb32b1ae 100644 --- a/DQM/CTPPS/plugins/CTPPSRandomDQMSource.cc +++ b/DQM/CTPPS/plugins/CTPPSRandomDQMSource.cc @@ -78,7 +78,7 @@ class CTPPSRandomDQMSource : public DQMEDAnalyzer { //------------------------------------------------------------------------------- CTPPSRandomDQMSource::CTPPSRandomDQMSource(const edm::ParameterSet &ps) - : tokenDigi_(consumes>(ps.getUntrackedParameter("tagRPixDigi"))), + : tokenDigi_(consumes>(ps.getParameter("tagRPixDigi"))), folderName_(ps.getUntrackedParameter("folderName", "CTPPS/RandomPixel")), rpStatusWord_(ps.getUntrackedParameter("RPStatusWord", 0x8008)) { for (int stn = 0; stn < kStationIDMAX_; stn++) { @@ -195,7 +195,7 @@ void CTPPSRandomDQMSource::analyze(edm::Event const &event, edm::EventSetup cons void CTPPSRandomDQMSource::fillDescriptions(edm::ConfigurationDescriptions &descriptions) { edm::ParameterSetDescription desc; - desc.addUntracked("tagRPixDigi", edm::InputTag("ctppsPixelDigisAlCaRecoProducer")); + desc.add("tagRPixDigi", edm::InputTag("ctppsPixelDigisAlCaRecoProducer")); desc.addUntracked("folderName", "CTPPS/RandomPixel"); desc.addUntracked("RPStatusWord", 0x8008); descriptions.add("ctppsRandomDQMSource", desc); diff --git a/DQM/CTPPS/python/ctppsRandomDQMSource_cfi.py b/DQM/CTPPS/python/ctppsRandomDQMSource_cfi.py index 2aa6bdf7ccba7..0aa290edc7d25 100644 --- a/DQM/CTPPS/python/ctppsRandomDQMSource_cfi.py +++ b/DQM/CTPPS/python/ctppsRandomDQMSource_cfi.py @@ -3,7 +3,7 @@ from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer ctppsRandomDQMSource = DQMEDAnalyzer('CTPPSRandomDQMSource', - tagRPixDigi = cms.untracked.InputTag("ctppsPixelDigisAlCaRecoProducer", ""), + tagRPixDigi = cms.InputTag("ctppsPixelDigisAlCaRecoProducer", ""), folderName = cms.untracked.string("CTPPS/RandomPixel"), RPStatusWord = cms.untracked.uint32(0x8008) # rpots in readout:220_fr_hr; 210_fr_hr ) \ No newline at end of file From 8903fcda762a6e24b398410e63dc17c7275daa38 Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Mon, 6 Mar 2023 14:07:18 +0100 Subject: [PATCH 028/233] enable evaluation of new ParticleNet trainings in nanoAOD step --- .../NanoAOD/python/jetsAK4_CHS_cff.py | 9 ++++- .../NanoAOD/python/jetsAK4_Puppi_cff.py | 35 +++++++++++++++++++ PhysicsTools/NanoAOD/python/jetsAK8_cff.py | 16 ++------- PhysicsTools/NanoAOD/python/nano_cff.py | 9 +++-- 4 files changed, 53 insertions(+), 16 deletions(-) diff --git a/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py b/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py index 4cb80962f4354..7af46d26f4667 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py @@ -330,7 +330,7 @@ ## - To be used in nanoAOD_customizeCommon() in nano_cff.py ############################################################### from PhysicsTools.PatAlgos.tools.jetTools import updateJetCollection -def nanoAOD_addDeepInfoAK4CHS(process,addDeepBTag,addDeepFlavour): +def nanoAOD_addDeepInfoAK4CHS(process,addDeepBTag,addDeepFlavour,addParticleNet): _btagDiscriminators=[] if addDeepBTag: print("Updating process to run DeepCSV btag") @@ -338,6 +338,12 @@ def nanoAOD_addDeepInfoAK4CHS(process,addDeepBTag,addDeepFlavour): if addDeepFlavour: print("Updating process to run DeepFlavour btag") _btagDiscriminators += ['pfDeepFlavourJetTags:probb','pfDeepFlavourJetTags:probbb','pfDeepFlavourJetTags:problepb','pfDeepFlavourJetTags:probc'] + if addParticleNet: + print("Updating process run ParticleNetAK4") + from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import _pfParticleNetFromMiniAODAK4CHSCentralJetTagsAll as pfParticleNetFromMiniAODAK4CHSCentralJetTagsAll + from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import _pfParticleNetFromMiniAODAK4CHSForwardJetTagsAll as pfParticleNetFromMiniAODAK4CHSForwardJetTagsAll + _btagDiscriminators += pfParticleNetFromMiniAODAK4CHSCentralJetTagsAll + _btagDiscriminators += pfParticleNetFromMiniAODAK4CHSForwardJetTagsAll if len(_btagDiscriminators)==0: return process print("Will recalculate the following discriminators: "+", ".join(_btagDiscriminators)) updateJetCollection( @@ -355,6 +361,7 @@ def nanoAOD_addDeepInfoAK4CHS(process,addDeepBTag,addDeepFlavour): nanoAOD_addDeepInfoAK4CHS_switch = cms.PSet( nanoAOD_addDeepBTag_switch = cms.untracked.bool(False), nanoAOD_addDeepFlavourTag_switch = cms.untracked.bool(False), + nanoAOD_addParticleNet_switch = cms.untracked.bool(False), ) ################################################ diff --git a/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py b/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py index 9ee07d2cc1669..9aa94a4fa2bb5 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py @@ -118,6 +118,41 @@ #jets are not as precise as muons jetPuppiTable.variables.pt.precision=10 +############################################################## +## DeepInfoAK4:Start +## - To be used in nanoAOD_customizeCommon() in nano_cff.py +############################################################### +from PhysicsTools.PatAlgos.tools.jetTools import updateJetCollection +def nanoAOD_addDeepInfoAK4(process,addParticleNet): + _btagDiscriminators=[] + if addParticleNet: + print("Updating process run ParticleNetAK4") + from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import _pfParticleNetFromMiniAODAK4CHSCentralJetTagsAll as pfParticleNetFromMiniAODAK4CHSCentralJetTagsAll + from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import _pfParticleNetFromMiniAODAK4CHSForwardJetTagsAll as pfParticleNetFromMiniAODAK4CHSForwardJetTagsAll + _btagDiscriminators += pfParticleNetFromMiniAODAK4CHSCentralJetTagsAll + _btagDiscriminators += pfParticleNetFromMiniAODAK4CHSForwardJetTagsAll + if len(_btagDiscriminators)==0: return process + print("Will recalculate the following discriminators: "+", ".join(_btagDiscriminators)) + updateJetCollection( + process, + jetSource = cms.InputTag('slimmedJets'), + jetCorrections = ('AK4PFchs', cms.vstring(['L1FastJet', 'L2Relative', 'L3Absolute','L2L3Residual']), 'None'), + btagDiscriminators = _btagDiscriminators, + postfix = 'WithDeepInfo', + ) + process.load("Configuration.StandardSequences.MagneticField_cff") + process.jetCorrFactorsNano.src="selectedUpdatedPatJetsWithDeepInfo" + process.updatedJets.jetSource="selectedUpdatedPatJetsWithDeepInfo" + return process + +nanoAOD_addDeepInfoAK4_switch = cms.PSet( + nanoAOD_addParticleNet_switch = cms.untracked.bool(False), +) + +################################################ +## DeepInfoAK4CHS:End +################################################# + ################################################################################ # JETS FOR MET type1 ################################################################################ diff --git a/PhysicsTools/NanoAOD/python/jetsAK8_cff.py b/PhysicsTools/NanoAOD/python/jetsAK8_cff.py index 9a92d66462b68..ddbfc43022a86 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK8_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK8_cff.py @@ -148,7 +148,7 @@ ## - To be used in nanoAOD_customizeCommon() in nano_cff.py ############################################################### from PhysicsTools.PatAlgos.tools.jetTools import updateJetCollection -def nanoAOD_addDeepInfoAK8(process, addDeepBTag, addDeepBoostedJet, addDeepDoubleX, addDeepDoubleXV2, addParticleNet, addParticleNetMass, jecPayload): +def nanoAOD_addDeepInfoAK8(process, addDeepBTag, addDeepBoostedJet, addDeepDoubleX, addDeepDoubleXV2, addParticleNet, jecPayload): _btagDiscriminators=[] if addDeepBTag: print("Updating process to run DeepCSV btag to AK8 jets") @@ -158,12 +158,8 @@ def nanoAOD_addDeepInfoAK8(process, addDeepBTag, addDeepBoostedJet, addDeepDoubl from RecoBTag.ONNXRuntime.pfDeepBoostedJet_cff import _pfDeepBoostedJetTagsAll as pfDeepBoostedJetTagsAll _btagDiscriminators += pfDeepBoostedJetTagsAll if addParticleNet: - print("Updating process to run ParticleNet before it's included in MiniAOD") - from RecoBTag.ONNXRuntime.pfParticleNet_cff import _pfParticleNetJetTagsAll as pfParticleNetJetTagsAll - _btagDiscriminators += pfParticleNetJetTagsAll - if addParticleNetMass: - from RecoBTag.ONNXRuntime.pfParticleNet_cff import _pfParticleNetMassRegressionOutputs - _btagDiscriminators += _pfParticleNetMassRegressionOutputs + from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK8_cff import _pfParticleNetFromMiniAODAK8JetTagsAll as pfParticleNetFromMiniAODAK8JetTagsAll + _btagDiscriminators += pfParticleNetFromMiniAODAK8JetTagsAll if addDeepDoubleX: print("Updating process to run DeepDoubleX on datasets before 104X") _btagDiscriminators += ['pfDeepDoubleBvLJetTags:probHbb', \ @@ -200,15 +196,9 @@ def nanoAOD_addDeepInfoAK8(process, addDeepBTag, addDeepBoostedJet, addDeepDoubl nanoAOD_addDeepDoubleX_switch = cms.untracked.bool(False), nanoAOD_addDeepDoubleXV2_switch = cms.untracked.bool(False), nanoAOD_addParticleNet_switch = cms.untracked.bool(False), - nanoAOD_addParticleNetMass_switch = cms.untracked.bool(False), jecPayload = cms.untracked.string('AK8PFPuppi') ) -# for 106Xv2: only needs to run ParticleNet Mass regression; The rest are already in MiniAOD -run2_nanoAOD_106Xv2.toModify( - nanoAOD_addDeepInfoAK8_switch, - nanoAOD_addParticleNetMass_switch = True, -) ################################################ ## DeepInfoAK8:End ################################################# diff --git a/PhysicsTools/NanoAOD/python/nano_cff.py b/PhysicsTools/NanoAOD/python/nano_cff.py index d10ba5084fe2d..01b40bdf1b7af 100644 --- a/PhysicsTools/NanoAOD/python/nano_cff.py +++ b/PhysicsTools/NanoAOD/python/nano_cff.py @@ -154,11 +154,17 @@ def nanoAOD_activateVID(process): def nanoAOD_customizeCommon(process): process = nanoAOD_activateVID(process) + + # This function is defined in jetsAK4_Puppi_cff.py + process = nanoAOD_addDeepInfoAK4(process, + addParticleNet=nanoAOD_addDeepInfoAK4_switch.nanoAOD_addParticleNet_switch + ) # This function is defined in jetsAK4_CHS_cff.py process = nanoAOD_addDeepInfoAK4CHS(process, addDeepBTag=nanoAOD_addDeepInfoAK4CHS_switch.nanoAOD_addDeepBTag_switch, - addDeepFlavour=nanoAOD_addDeepInfoAK4CHS_switch.nanoAOD_addDeepFlavourTag_switch + addDeepFlavour=nanoAOD_addDeepInfoAK4CHS_switch.nanoAOD_addDeepFlavourTag_switch, + addParticleNet=nanoAOD_addDeepInfoAK4CHS_switch.nanoAOD_addParticleNet_switch ) # This function is defined in jetsAK8_cff.py @@ -168,7 +174,6 @@ def nanoAOD_customizeCommon(process): addDeepDoubleX=nanoAOD_addDeepInfoAK8_switch.nanoAOD_addDeepDoubleX_switch, addDeepDoubleXV2=nanoAOD_addDeepInfoAK8_switch.nanoAOD_addDeepDoubleXV2_switch, addParticleNet=nanoAOD_addDeepInfoAK8_switch.nanoAOD_addParticleNet_switch, - addParticleNetMass=nanoAOD_addDeepInfoAK8_switch.nanoAOD_addParticleNetMass_switch, jecPayload=nanoAOD_addDeepInfoAK8_switch.jecPayload ) From ac075a6553261aa009a787e8eaa167fffe3ca0ba Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Mon, 6 Mar 2023 14:09:36 +0100 Subject: [PATCH 029/233] fix printouts --- PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py | 2 +- PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py | 2 +- PhysicsTools/NanoAOD/python/jetsAK8_cff.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py b/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py index 7af46d26f4667..090983ac2a092 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py @@ -339,7 +339,7 @@ def nanoAOD_addDeepInfoAK4CHS(process,addDeepBTag,addDeepFlavour,addParticleNet) print("Updating process to run DeepFlavour btag") _btagDiscriminators += ['pfDeepFlavourJetTags:probb','pfDeepFlavourJetTags:probbb','pfDeepFlavourJetTags:problepb','pfDeepFlavourJetTags:probc'] if addParticleNet: - print("Updating process run ParticleNetAK4") + print("Updating process to run ParticleNetAK4") from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import _pfParticleNetFromMiniAODAK4CHSCentralJetTagsAll as pfParticleNetFromMiniAODAK4CHSCentralJetTagsAll from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import _pfParticleNetFromMiniAODAK4CHSForwardJetTagsAll as pfParticleNetFromMiniAODAK4CHSForwardJetTagsAll _btagDiscriminators += pfParticleNetFromMiniAODAK4CHSCentralJetTagsAll diff --git a/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py b/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py index 9aa94a4fa2bb5..2ff5c6ef0dd9f 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py @@ -126,7 +126,7 @@ def nanoAOD_addDeepInfoAK4(process,addParticleNet): _btagDiscriminators=[] if addParticleNet: - print("Updating process run ParticleNetAK4") + print("Updating process to run ParticleNetAK4") from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import _pfParticleNetFromMiniAODAK4CHSCentralJetTagsAll as pfParticleNetFromMiniAODAK4CHSCentralJetTagsAll from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import _pfParticleNetFromMiniAODAK4CHSForwardJetTagsAll as pfParticleNetFromMiniAODAK4CHSForwardJetTagsAll _btagDiscriminators += pfParticleNetFromMiniAODAK4CHSCentralJetTagsAll diff --git a/PhysicsTools/NanoAOD/python/jetsAK8_cff.py b/PhysicsTools/NanoAOD/python/jetsAK8_cff.py index ddbfc43022a86..a913544f933c4 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK8_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK8_cff.py @@ -158,6 +158,7 @@ def nanoAOD_addDeepInfoAK8(process, addDeepBTag, addDeepBoostedJet, addDeepDoubl from RecoBTag.ONNXRuntime.pfDeepBoostedJet_cff import _pfDeepBoostedJetTagsAll as pfDeepBoostedJetTagsAll _btagDiscriminators += pfDeepBoostedJetTagsAll if addParticleNet: + print("Updating process to run ParticleNet joint classification and mass regression") from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK8_cff import _pfParticleNetFromMiniAODAK8JetTagsAll as pfParticleNetFromMiniAODAK8JetTagsAll _btagDiscriminators += pfParticleNetFromMiniAODAK8JetTagsAll if addDeepDoubleX: From 3bca26d4153b4e2df1c7bf5a3e4e4231aa40a4be Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Mon, 6 Mar 2023 16:06:45 +0100 Subject: [PATCH 030/233] add PNet regression neutrino correction --- PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py | 3 ++- PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py b/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py index 090983ac2a092..23bde64545221 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py @@ -134,7 +134,8 @@ btagPNetCvB = Var("?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:CvsB')>0?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:CvsB'):-1",float,precision=10,doc="ParticleNet c vs. b"), btagPNetQvG = Var("?abs(eta())<2.5?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:QvsG'):bDiscriminator('pfParticleNetFromMiniAODAK4CHSForwardDiscriminatorsJetTags:QvsG')",float,precision=10,doc="ParticleNet q (udsbc) vs. g"), btagPNetTauVJet = Var("?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:TauVsJet')>0?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:TauVsJet'):-1",float,precision=10,doc="ParticleNet tau vs. jet"), - PNetRegPtRawCorr = Var("?abs(eta())<2.5?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralJetTags:ptcorr'):bDiscriminator('pfParticleNetFromMiniAODAK4CHSForwardJetTags:ptcorr')",float,precision=10,doc="ParticleNet universal flavor-aware pT regression, correction relative to raw jet pT"), + PNetRegPtRawCorr = Var("?abs(eta())<2.5?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralJetTags:ptcorr'):bDiscriminator('pfParticleNetFromMiniAODAK4CHSForwardJetTags:ptcorr')",float,precision=10,doc="ParticleNet universal flavor-aware visible pT regression (no neutrinos), correction relative to raw jet pT"), + PNetRegPtRawCorrNeutrino = Var("?abs(eta())<2.5?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralJetTags:ptnu'):bDiscriminator('pfParticleNetFromMiniAODAK4CHSForwardJetTags:ptnu')",float,precision=10,doc="ParticleNet universal flavor-aware pT regression neutrino correction, relative to visible. To apply full regression, multiply raw jet pT by both PNetRegPtRawCorr and PNetRegPtRawCorrNeutrino."), PNetRegPtRawRes = Var("?abs(eta())<2.5?0.5*(bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralJetTags:ptreshigh')-bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralJetTags:ptreslow')):0.5*(bDiscriminator('pfParticleNetFromMiniAODAK4CHSForwardJetTags:ptreshigh')-bDiscriminator('pfParticleNetFromMiniAODAK4CHSForwardJetTags:ptreslow'))",float,precision=10,doc="ParticleNet universal flavor-aware jet pT resolution estimator, (q84 - q16)/2"), puIdDisc = Var("userFloat('puIdNanoDisc')", float,doc="Pileup ID discriminant with 106X (2018) training",precision=10), puId = Var("userInt('puIdNanoId')", "uint8", doc="Pileup ID flags with 106X (2018) training"), diff --git a/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py b/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py index 2ff5c6ef0dd9f..255bbc290b10c 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py @@ -92,7 +92,8 @@ btagPNetCvB = Var("?bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags:CvsB')>0?bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags:CvsB'):-1",float,precision=10,doc="ParticleNet c vs. b"), btagPNetQvG = Var("?abs(eta())<2.5?bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags:QvsG'):bDiscriminator('pfParticleNetFromMiniAODAK4PuppiForwardDiscriminatorsJetTags:QvsG')",float,precision=10,doc="ParticleNet q (udsbc) vs. g"), btagPNetTauVJet = Var("?bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags:TauVsJet')>0?bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags:TauVsJet'):-1",float,precision=10,doc="ParticleNet tau vs. jet"), - PNetRegPtRawCorr = Var("?abs(eta())<2.5?bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralJetTags:ptcorr'):bDiscriminator('pfParticleNetFromMiniAODAK4PuppiForwardJetTags:ptcorr')",float,precision=10,doc="ParticleNet universal flavor-aware pT regression, correction relative to raw jet pT"), + PNetRegPtRawCorr = Var("?abs(eta())<2.5?bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralJetTags:ptcorr'):bDiscriminator('pfParticleNetFromMiniAODAK4PuppiForwardJetTags:ptcorr')",float,precision=10,doc="ParticleNet universal flavor-aware visible pT regression (no neutrinos), correction relative to raw jet pT"), + PNetRegPtRawCorrNeutrino = Var("?abs(eta())<2.5?bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralJetTags:ptnu'):bDiscriminator('pfParticleNetFromMiniAODAK4PuppiForwardJetTags:ptnu')",float,precision=10,doc="ParticleNet universal flavor-aware pT regression neutrino correction, relative to visible. To apply full regression, multiply raw jet pT by both PNetRegPtRawCorr and PNetRegPtRawCorrNeutrino."), PNetRegPtRawRes = Var("?abs(eta())<2.5?0.5*(bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralJetTags:ptreshigh')-bDiscriminator('pfParticleNetFromMiniAODAK4PuppiCentralJetTags:ptreslow')):0.5*(bDiscriminator('pfParticleNetFromMiniAODAK4PuppiForwardJetTags:ptreshigh')-bDiscriminator('pfParticleNetFromMiniAODAK4PuppiForwardJetTags:ptreslow'))",float,precision=10,doc="ParticleNet universal flavor-aware jet pT resolution estimator, (q84 - q16)/2"), jetId = Var("userInt('tightId')*2+4*userInt('tightIdLepVeto')", "uint8",doc="Jet ID flag: bit2 is tight, bit3 is tightLepVeto"), hfsigmaEtaEta = Var("userFloat('hfsigmaEtaEta')",float,doc="sigmaEtaEta for HF jets (noise discriminating variable)",precision=10), From ca728b249e89c76d431f1c458e4032064737ade7 Mon Sep 17 00:00:00 2001 From: Andrea Trapote Date: Thu, 23 Feb 2023 18:55:38 +0100 Subject: [PATCH 031/233] removing not used muon MVAs from miniAOD --- DataFormats/PatCandidates/interface/Muon.h | 10 -- DataFormats/PatCandidates/src/Muon.cc | 8 - .../PatCandidates/src/classes_def_objects.xml | 2 +- .../PatAlgos/interface/MuonMvaEstimator.h | 45 ----- .../PatAlgos/plugins/PATMuonProducer.cc | 84 ++------- .../displacedMuonProducer_cff.py | 3 - .../producersLayer1/muonProducer_cfi.py | 3 - .../PatAlgos/python/slimming/miniAOD_tools.py | 4 +- PhysicsTools/PatAlgos/src/MuonMvaEstimator.cc | 162 ------------------ 9 files changed, 18 insertions(+), 303 deletions(-) delete mode 100644 PhysicsTools/PatAlgos/interface/MuonMvaEstimator.h delete mode 100644 PhysicsTools/PatAlgos/src/MuonMvaEstimator.cc diff --git a/DataFormats/PatCandidates/interface/Muon.h b/DataFormats/PatCandidates/interface/Muon.h index 5406d7bc92df0..5f34670e14e69 100644 --- a/DataFormats/PatCandidates/interface/Muon.h +++ b/DataFormats/PatCandidates/interface/Muon.h @@ -282,14 +282,6 @@ namespace pat { void setJetPtRatio(float jetPtRatio) { jetPtRatio_ = jetPtRatio; } void setJetPtRel(float jetPtRel) { jetPtRel_ = jetPtRel; } - /// Muon MVA - float mvaValue() const { return mvaValue_; } - void setMvaValue(float mva) { mvaValue_ = mva; } - - // Low pt Muon MVA - float lowptMvaValue() const { return lowptMvaValue_; } - void setLowPtMvaValue(float lowptmva) { lowptMvaValue_ = lowptmva; } - /// Soft Muon MVA float softMvaValue() const { return softMvaValue_; } void setSoftMvaValue(float softmva) { softMvaValue_ = softmva; } @@ -420,8 +412,6 @@ namespace pat { float jetPtRel_; /// Muon MVA - float mvaValue_; - float lowptMvaValue_; float mvaIDValue_; float softMvaValue_; diff --git a/DataFormats/PatCandidates/src/Muon.cc b/DataFormats/PatCandidates/src/Muon.cc index 5a0b5fd4ca960..cfdaa2253d900 100644 --- a/DataFormats/PatCandidates/src/Muon.cc +++ b/DataFormats/PatCandidates/src/Muon.cc @@ -31,8 +31,6 @@ Muon::Muon() pfEcalEnergy_(0), jetPtRatio_(0), jetPtRel_(0), - mvaValue_(0), - lowptMvaValue_(0), mvaIDValue_(0), softMvaValue_(0), inverseBeta_(0), @@ -63,8 +61,6 @@ Muon::Muon(const reco::Muon& aMuon) pfEcalEnergy_(0), jetPtRatio_(0), jetPtRel_(0), - mvaValue_(0), - lowptMvaValue_(0), mvaIDValue_(0), softMvaValue_(0), inverseBeta_(0), @@ -95,8 +91,6 @@ Muon::Muon(const edm::RefToBase& aMuonRef) pfEcalEnergy_(0), jetPtRatio_(0), jetPtRel_(0), - mvaValue_(0), - lowptMvaValue_(0), mvaIDValue_(0), softMvaValue_(0), inverseBeta_(0), @@ -127,8 +121,6 @@ Muon::Muon(const edm::Ptr& aMuonRef) pfEcalEnergy_(0), jetPtRatio_(0), jetPtRel_(0), - mvaValue_(0), - lowptMvaValue_(0), mvaIDValue_(0), softMvaValue_(0), inverseBeta_(0), diff --git a/DataFormats/PatCandidates/src/classes_def_objects.xml b/DataFormats/PatCandidates/src/classes_def_objects.xml index 88fb44593ba8d..4717eb3a0fcc3 100644 --- a/DataFormats/PatCandidates/src/classes_def_objects.xml +++ b/DataFormats/PatCandidates/src/classes_def_objects.xml @@ -68,7 +68,7 @@ - + diff --git a/PhysicsTools/PatAlgos/interface/MuonMvaEstimator.h b/PhysicsTools/PatAlgos/interface/MuonMvaEstimator.h deleted file mode 100644 index fc7f52edc1c8b..0000000000000 --- a/PhysicsTools/PatAlgos/interface/MuonMvaEstimator.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef __PhysicsTools_PatAlgos_MuonMvaEstimator__ -#define __PhysicsTools_PatAlgos_MuonMvaEstimator__ - -#include "DataFormats/BTauReco/interface/JetTag.h" - -#include -#include - -class GBRForest; - -namespace pat { - class Muon; -} - -namespace reco { - class JetCorrector; - class Vertex; -} // namespace reco - -namespace edm { - class FileInPath; -} - -namespace pat { - class MuonMvaEstimator { - public: - MuonMvaEstimator(const edm::FileInPath& weightsfile, float dRmax); - - ~MuonMvaEstimator(); - - float computeMva(const pat::Muon& imuon, - const reco::Vertex& vertex, - const reco::JetTagCollection& bTags, - float& jetPtRatio, - float& jetPtRel, - float& miniIsoValue, - const reco::JetCorrector* correctorL1 = nullptr, - const reco::JetCorrector* correctorL1L2L3Res = nullptr) const; - - private: - std::unique_ptr gbrForest_; - float dRmax_; - }; -} // namespace pat -#endif diff --git a/PhysicsTools/PatAlgos/plugins/PATMuonProducer.cc b/PhysicsTools/PatAlgos/plugins/PATMuonProducer.cc index 50605edbd950a..c41322887d4f9 100644 --- a/PhysicsTools/PatAlgos/plugins/PATMuonProducer.cc +++ b/PhysicsTools/PatAlgos/plugins/PATMuonProducer.cc @@ -42,7 +42,7 @@ #include "PhysicsTools/PatAlgos/interface/EfficiencyLoader.h" #include "PhysicsTools/PatAlgos/interface/KinResolutionsLoader.h" #include "PhysicsTools/PatAlgos/interface/MultiIsolator.h" -#include "PhysicsTools/PatAlgos/interface/MuonMvaEstimator.h" +#include "PhysicsTools/PatAlgos/interface/CalculatePtRatioRel.h" #include "PhysicsTools/PatAlgos/interface/MuonMvaIDEstimator.h" #include "PhysicsTools/PatAlgos/interface/PATUserDataHelper.h" #include "PhysicsTools/PatAlgos/interface/SoftMuonMvaEstimator.h" @@ -57,15 +57,13 @@ namespace pat { class PATMuonHeavyObjectCache { public: PATMuonHeavyObjectCache(const edm::ParameterSet&); - - pat::MuonMvaEstimator const& muonMvaEstimator() const { return *muonMvaEstimator_; } - pat::MuonMvaEstimator const& muonLowPtMvaEstimator() const { return *muonLowPtMvaEstimator_; } + + pat::CalculatePtRatioRel const& calculatePtRatioRel() const { return *calculatePtRatioRel_; } pat::MuonMvaIDEstimator const& muonMvaIDEstimator() const { return *muonMvaIDEstimator_; } pat::SoftMuonMvaEstimator const& softMuonMvaEstimator() const { return *softMuonMvaEstimator_; } private: - std::unique_ptr muonLowPtMvaEstimator_; - std::unique_ptr muonMvaEstimator_; + std::unique_ptr calculatePtRatioRel_; std::unique_ptr muonMvaIDEstimator_; std::unique_ptr softMuonMvaEstimator_; }; @@ -234,7 +232,6 @@ namespace pat { edm::EDGetTokenT> PUPPINoLeptonsIsolation_neutral_hadrons_; edm::EDGetTokenT> PUPPINoLeptonsIsolation_photons_; /// standard muon selectors - bool computeMuonMVA_; bool computeMuonIDMVA_; bool computeSoftMuonMVA_; bool recomputeBasicSelectors_; @@ -325,12 +322,9 @@ using namespace pat; using namespace std; PATMuonHeavyObjectCache::PATMuonHeavyObjectCache(const edm::ParameterSet& iConfig) { - if (iConfig.getParameter("computeMuonMVA")) { - edm::FileInPath mvaTrainingFile = iConfig.getParameter("mvaTrainingFile"); - edm::FileInPath mvaLowPtTrainingFile = iConfig.getParameter("lowPtmvaTrainingFile"); + if (iConfig.getParameter("computeMiniIso")) { float mvaDrMax = iConfig.getParameter("mvaDrMax"); - muonMvaEstimator_ = std::make_unique(mvaTrainingFile, mvaDrMax); - muonLowPtMvaEstimator_ = std::make_unique(mvaLowPtTrainingFile, mvaDrMax); + calculatePtRatioRel_ = std::make_unique(mvaDrMax); } if (iConfig.getParameter("computeMuonIDMVA")) { @@ -347,7 +341,6 @@ PATMuonHeavyObjectCache::PATMuonHeavyObjectCache(const edm::ParameterSet& iConfi PATMuonProducer::PATMuonProducer(const edm::ParameterSet& iConfig, PATMuonHeavyObjectCache const*) : relMiniIsoPUCorrected_(0), useUserData_(iConfig.exists("userData")), - computeMuonMVA_(false), computeMuonIDMVA_(false), computeSoftMuonMVA_(false), recomputeBasicSelectors_(false), @@ -460,12 +453,9 @@ PATMuonProducer::PATMuonProducer(const edm::ParameterSet& iConfig, PATMuonHeavyO // standard selectors recomputeBasicSelectors_ = iConfig.getParameter("recomputeBasicSelectors"); - computeMuonMVA_ = iConfig.getParameter("computeMuonMVA"); computeMuonIDMVA_ = iConfig.getParameter("computeMuonIDMVA"); - if (computeMuonMVA_ and not computeMiniIso_) - throw cms::Exception("ConfigurationError") << "MiniIso is needed for Muon MVA calculation.\n"; - if (computeMuonMVA_) { + if (computeMiniIso_) { // pfCombinedInclusiveSecondaryVertexV2BJetTags mvaBTagCollectionTag_ = consumes(iConfig.getParameter("mvaJetTag")); mvaL1Corrector_ = consumes(iConfig.getParameter("mvaL1Corrector")); @@ -642,7 +632,7 @@ void PATMuonProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) edm::Handle mvaBTagCollectionTag; edm::Handle mvaL1Corrector; edm::Handle mvaL1L2L3ResCorrector; - if (computeMuonMVA_) { + if (computeMiniIso_) { iEvent.getByToken(mvaBTagCollectionTag_, mvaBTagCollectionTag); iEvent.getByToken(mvaL1Corrector_, mvaL1Corrector); iEvent.getByToken(mvaL1L2L3ResCorrector_, mvaL1L2L3ResCorrector); @@ -932,7 +922,7 @@ void PATMuonProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) // Need a separate loop over muons to have all inputs properly // computed and stored in the object. edm::Handle rho; - if (computeMuonMVA_) + if (computeMiniIso_) iEvent.getByToken(rho_, rho); const reco::Vertex* pv(nullptr); if (primaryVertexIsValid) @@ -980,68 +970,26 @@ void PATMuonProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) muon.setSelector(reco::Muon::PuppiIsoTight, puppiCombinedIsolationPAT < 0.12); } - float jetPtRatio = 0.0; - float jetPtRel = 0.0; - float mva = 0.0; - float mva_lowpt = 0.0; - if (computeMuonMVA_ && primaryVertexIsValid && computeMiniIso_) { + std::vector jetPtRatioRel = {0.0, 0.0}; + if (primaryVertexIsValid && computeMiniIso_) { if (mvaUseJec_) { - mva = globalCache()->muonMvaEstimator().computeMva(muon, - primaryVertex, + jetPtRatioRel = globalCache()->calculatePtRatioRel().computePtRatioRel(muon, *(mvaBTagCollectionTag.product()), - jetPtRatio, - jetPtRel, - miniIsoValue, mvaL1Corrector.product(), mvaL1L2L3ResCorrector.product()); - mva_lowpt = globalCache()->muonLowPtMvaEstimator().computeMva(muon, - primaryVertex, - *(mvaBTagCollectionTag.product()), - jetPtRatio, - jetPtRel, - miniIsoValue, - mvaL1Corrector.product(), - mvaL1L2L3ResCorrector.product()); - } else { - mva = globalCache()->muonMvaEstimator().computeMva( - muon, primaryVertex, *mvaBTagCollectionTag, jetPtRatio, jetPtRel, miniIsoValue); - mva_lowpt = globalCache()->muonLowPtMvaEstimator().computeMva( - muon, primaryVertex, *mvaBTagCollectionTag, jetPtRatio, jetPtRel, miniIsoValue); + jetPtRatioRel = globalCache()->calculatePtRatioRel().computePtRatioRel( + muon, *mvaBTagCollectionTag); } - muon.setMvaValue(mva); - muon.setLowPtMvaValue(mva_lowpt); - muon.setJetPtRatio(jetPtRatio); - muon.setJetPtRel(jetPtRel); + muon.setJetPtRatio(jetPtRatioRel[0]); + muon.setJetPtRel(jetPtRatioRel[1]); // multi-isolation if (computeMiniIso_) { muon.setSelector(reco::Muon::MultiIsoMedium, miniIsoValue < 0.11 && (muon.jetPtRatio() > 0.74 || muon.jetPtRel() > 6.8)); } - - // MVA working points - // https://twiki.cern.ch/twiki/bin/viewauth/CMS/LeptonMVA - const double dB2D = std::abs(muon.dB(pat::Muon::PV2D)); - const double dB3D = std::abs(muon.dB(pat::Muon::PV3D)); - const double edB3D = std::abs(muon.edB(pat::Muon::PV3D)); - const double sip3D = edB3D > 0 ? dB3D / edB3D : 0.0; - const double dz = std::abs(muon.muonBestTrack()->dz(primaryVertex.position())); - - // muon preselection - if (muon.pt() > 5 and muon.isLooseMuon() and muon.passed(reco::Muon::MiniIsoLoose) and sip3D < 8.0 and - dB2D < 0.05 and dz < 0.1) { - muon.setSelector(reco::Muon::MvaLoose, muon.mvaValue() > -0.60); - muon.setSelector(reco::Muon::MvaMedium, muon.mvaValue() > -0.20); - muon.setSelector(reco::Muon::MvaTight, muon.mvaValue() > 0.15); - muon.setSelector(reco::Muon::MvaVTight, muon.mvaValue() > 0.45); - muon.setSelector(reco::Muon::MvaVVTight, muon.mvaValue() > 0.9); - } - if (muon.pt() > 5 and muon.isLooseMuon() and sip3D < 4 and dB2D < 0.5 and dz < 1) { - muon.setSelector(reco::Muon::LowPtMvaLoose, muon.lowptMvaValue() > -0.60); - muon.setSelector(reco::Muon::LowPtMvaMedium, muon.lowptMvaValue() > -0.20); - } } // MVA ID diff --git a/PhysicsTools/PatAlgos/python/producersLayer1/displacedMuonProducer_cff.py b/PhysicsTools/PatAlgos/python/producersLayer1/displacedMuonProducer_cff.py index 4c160f238a501..8acb32c05df17 100644 --- a/PhysicsTools/PatAlgos/python/producersLayer1/displacedMuonProducer_cff.py +++ b/PhysicsTools/PatAlgos/python/producersLayer1/displacedMuonProducer_cff.py @@ -60,9 +60,6 @@ # Standard Muon Selectors and Jet-related observables # Depends on MiniIsolation, so only works in miniaod # Don't forget to set flags properly in miniAOD_tools.py - computeMuonMVA = False, - mvaTrainingFile = "RecoMuon/MuonIdentification/data/mu_2017_BDTG.weights.xml", - lowPtmvaTrainingFile = "RecoMuon/MuonIdentification/data/mu_lowpt_BDTG.weights.xml", recomputeBasicSelectors = False, mvaUseJec = False, mvaDrMax = 0.4, diff --git a/PhysicsTools/PatAlgos/python/producersLayer1/muonProducer_cfi.py b/PhysicsTools/PatAlgos/python/producersLayer1/muonProducer_cfi.py index f95b31dd5a4d4..f043ae4b7ee92 100644 --- a/PhysicsTools/PatAlgos/python/producersLayer1/muonProducer_cfi.py +++ b/PhysicsTools/PatAlgos/python/producersLayer1/muonProducer_cfi.py @@ -109,11 +109,8 @@ # Standard Muon Selectors and Jet-related observables # Depends on MiniIsolation, so only works in miniaod # Don't forget to set flags properly in miniAOD_tools.py - computeMuonMVA = cms.bool(False), computeMuonIDMVA = cms.bool(False), - mvaTrainingFile = cms.FileInPath("RecoMuon/MuonIdentification/data/mu_2017_BDTG.weights.xml"), mvaIDTrainingFile = cms.FileInPath("RecoMuon/MuonIdentification/data/mvaID.onnx"), - lowPtmvaTrainingFile = cms.FileInPath("RecoMuon/MuonIdentification/data/mu_lowpt_BDTG.weights.xml"), recomputeBasicSelectors = cms.bool(True), mvaUseJec = cms.bool(True), mvaDrMax = cms.double(0.4), diff --git a/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py b/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py index bff1bfb7ed5d8..669db367cfa86 100644 --- a/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py +++ b/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py @@ -30,7 +30,6 @@ def miniAOD_customizeCommon(process): process.patMuons.puppiNoLeptonsIsolationPhotons = cms.InputTag("muonPUPPINoLeptonsIsolation","gamma-DR040-ThresholdVeto000-ConeVeto001") process.patMuons.computeMiniIso = True - process.patMuons.computeMuonMVA = True process.patMuons.computeMuonIDMVA = True process.patMuons.computeSoftMuonMVA = True @@ -41,8 +40,7 @@ def miniAOD_customizeCommon(process): run2_muon_2016.toModify( process.patMuons, effectiveAreaVec = [0.0735,0.0619,0.0465,0.0433,0.0577]) run2_muon_2017.toModify( process.patMuons, effectiveAreaVec = [0.0566, 0.0562, 0.0363, 0.0119, 0.0064]) run2_muon_2018.toModify( process.patMuons, effectiveAreaVec = [0.0566, 0.0562, 0.0363, 0.0119, 0.0064]) - run2_muon_2016.toModify( process.patMuons, mvaTrainingFile = "RecoMuon/MuonIdentification/data/mu_2016_BDTG.weights.xml") - + process.patMuons.computePuppiCombinedIso = True # # disable embedding of electron and photon associated objects already stored by the ReducedEGProducer diff --git a/PhysicsTools/PatAlgos/src/MuonMvaEstimator.cc b/PhysicsTools/PatAlgos/src/MuonMvaEstimator.cc deleted file mode 100644 index 5bd3c4463c344..0000000000000 --- a/PhysicsTools/PatAlgos/src/MuonMvaEstimator.cc +++ /dev/null @@ -1,162 +0,0 @@ -#include "PhysicsTools/PatAlgos/interface/MuonMvaEstimator.h" - -#include "FWCore/ParameterSet/interface/FileInPath.h" -#include "CommonTools/MVAUtils/interface/GBRForestTools.h" -#include "DataFormats/Candidate/interface/Candidate.h" -#include "DataFormats/MuonReco/interface/Muon.h" -#include "DataFormats/MuonReco/interface/MuonSelectors.h" -#include "DataFormats/VertexReco/interface/Vertex.h" -#include "DataFormats/JetReco/interface/PFJet.h" -#include "DataFormats/JetReco/interface/PFJetCollection.h" -#include "DataFormats/PatCandidates/interface/Muon.h" -#include "JetMETCorrections/JetCorrector/interface/JetCorrector.h" - -using namespace pat; - -MuonMvaEstimator::MuonMvaEstimator(const edm::FileInPath& weightsfile, float dRmax) : dRmax_(dRmax) { - gbrForest_ = createGBRForest(weightsfile); -} - -MuonMvaEstimator::~MuonMvaEstimator() {} - -namespace { - - enum inputIndexes { - kPt, - kEta, - kJetNDauCharged, - kMiniRelIsoCharged, - kMiniRelIsoNeutral, - kJetPtRel, - kJetBTagCSV, - kJetPtRatio, - kLog_abs_dxyBS, - kSip, - kLog_abs_dzPV, - kSegmentCompatibility, - kLast - }; - - float ptRel(const reco::Candidate::LorentzVector& muP4, - const reco::Candidate::LorentzVector& jetP4, - bool subtractMuon = true) { - reco::Candidate::LorentzVector jp4 = jetP4; - if (subtractMuon) - jp4 -= muP4; - float dot = muP4.Vect().Dot(jp4.Vect()); - float ptrel = muP4.P2() - dot * dot / jp4.P2(); - ptrel = ptrel > 0 ? sqrt(ptrel) : 0.0; - return ptrel; - } -} // namespace - -float MuonMvaEstimator::computeMva(const pat::Muon& muon, - const reco::Vertex& vertex, - const reco::JetTagCollection& bTags, - float& jetPtRatio, - float& jetPtRel, - float& miniIsoValue, - const reco::JetCorrector* correctorL1, - const reco::JetCorrector* correctorL1L2L3Res) const { - float var[kLast]{}; - - var[kPt] = muon.pt(); - var[kEta] = muon.eta(); - var[kSegmentCompatibility] = muon.segmentCompatibility(); - var[kMiniRelIsoCharged] = muon.miniPFIsolation().chargedHadronIso() / muon.pt(); - var[kMiniRelIsoNeutral] = miniIsoValue - var[kMiniRelIsoCharged]; - - double dB2D = fabs(muon.dB(pat::Muon::PV2D)); - double dB3D = muon.dB(pat::Muon::PV3D); - double edB3D = muon.edB(pat::Muon::PV3D); - double dz = fabs(muon.muonBestTrack()->dz(vertex.position())); - var[kSip] = edB3D > 0 ? fabs(dB3D / edB3D) : 0.0; - var[kLog_abs_dxyBS] = dB2D > 0 ? log(dB2D) : 0; - var[kLog_abs_dzPV] = dz > 0 ? log(dz) : 0; - - //Initialise loop variables - double minDr = 9999; - double jecL1L2L3Res = 1.; - double jecL1 = 1.; - - // Compute corrected isolation variables - double chIso = muon.pfIsolationR04().sumChargedHadronPt; - double nIso = muon.pfIsolationR04().sumNeutralHadronEt; - double phoIso = muon.pfIsolationR04().sumPhotonEt; - double puIso = muon.pfIsolationR04().sumPUPt; - double dbCorrectedIsolation = chIso + std::max(nIso + phoIso - .5 * puIso, 0.); - double dbCorrectedRelIso = dbCorrectedIsolation / muon.pt(); - - var[kJetPtRatio] = 1. / (1 + dbCorrectedRelIso); - var[kJetPtRel] = 0; - var[kJetBTagCSV] = -999; - var[kJetNDauCharged] = -1; - - for (const auto& tagI : bTags) { - // for each muon with the lepton - double dr = deltaR(*(tagI.first), muon); - if (dr > minDr) - continue; - minDr = dr; - - const reco::Candidate::LorentzVector& muP4(muon.p4()); - reco::Candidate::LorentzVector jetP4(tagI.first->p4()); - - if (correctorL1 && correctorL1L2L3Res) { - jecL1L2L3Res = correctorL1L2L3Res->correction(*(tagI.first)); - jecL1 = correctorL1->correction(*(tagI.first)); - } - - // Get b-jet info - var[kJetBTagCSV] = tagI.second; - var[kJetNDauCharged] = 0; - for (auto jet : tagI.first->getJetConstituentsQuick()) { - const reco::PFCandidate* pfcand = dynamic_cast(jet); - if (pfcand == nullptr) - throw cms::Exception("ConfigurationError") << "Cannot get jet constituents"; - if (pfcand->charge() == 0) - continue; - auto bestTrackPtr = pfcand->bestTrack(); - if (!bestTrackPtr) - continue; - if (!bestTrackPtr->quality(reco::Track::highPurity)) - continue; - if (bestTrackPtr->pt() < 1.) - continue; - if (bestTrackPtr->hitPattern().numberOfValidHits() < 8) - continue; - if (bestTrackPtr->hitPattern().numberOfValidPixelHits() < 2) - continue; - if (bestTrackPtr->normalizedChi2() >= 5) - continue; - - if (std::fabs(bestTrackPtr->dxy(vertex.position())) > 0.2) - continue; - if (std::fabs(bestTrackPtr->dz(vertex.position())) > 17) - continue; - var[kJetNDauCharged]++; - } - - if (minDr < dRmax_) { - if ((jetP4 - muP4).Rho() < 0.0001) { - var[kJetPtRel] = 0; - var[kJetPtRatio] = 1; - } else { - jetP4 -= muP4 / jecL1; - jetP4 *= jecL1L2L3Res; - jetP4 += muP4; - - var[kJetPtRatio] = muP4.pt() / jetP4.pt(); - var[kJetPtRel] = ptRel(muP4, jetP4); - } - } - } - - if (var[kJetPtRatio] > 1.5) - var[kJetPtRatio] = 1.5; - if (var[kJetBTagCSV] < 0) - var[kJetBTagCSV] = 0; - jetPtRatio = var[kJetPtRatio]; - jetPtRel = var[kJetPtRel]; - return gbrForest_->GetClassifier(var); -}; From 1c93dfa31de9ea6a5fa12f85a226a83434f57bd2 Mon Sep 17 00:00:00 2001 From: Andrea Trapote Date: Fri, 24 Feb 2023 11:57:41 +0100 Subject: [PATCH 032/233] fixing format --- PhysicsTools/PatAlgos/plugins/PATMuonProducer.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/PhysicsTools/PatAlgos/plugins/PATMuonProducer.cc b/PhysicsTools/PatAlgos/plugins/PATMuonProducer.cc index c41322887d4f9..3922898d0e758 100644 --- a/PhysicsTools/PatAlgos/plugins/PATMuonProducer.cc +++ b/PhysicsTools/PatAlgos/plugins/PATMuonProducer.cc @@ -57,7 +57,7 @@ namespace pat { class PATMuonHeavyObjectCache { public: PATMuonHeavyObjectCache(const edm::ParameterSet&); - + pat::CalculatePtRatioRel const& calculatePtRatioRel() const { return *calculatePtRatioRel_; } pat::MuonMvaIDEstimator const& muonMvaIDEstimator() const { return *muonMvaIDEstimator_; } pat::SoftMuonMvaEstimator const& softMuonMvaEstimator() const { return *softMuonMvaEstimator_; } @@ -973,13 +973,10 @@ void PATMuonProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) std::vector jetPtRatioRel = {0.0, 0.0}; if (primaryVertexIsValid && computeMiniIso_) { if (mvaUseJec_) { - jetPtRatioRel = globalCache()->calculatePtRatioRel().computePtRatioRel(muon, - *(mvaBTagCollectionTag.product()), - mvaL1Corrector.product(), - mvaL1L2L3ResCorrector.product()); - } else { jetPtRatioRel = globalCache()->calculatePtRatioRel().computePtRatioRel( - muon, *mvaBTagCollectionTag); + muon, *(mvaBTagCollectionTag.product()), mvaL1Corrector.product(), mvaL1L2L3ResCorrector.product()); + } else { + jetPtRatioRel = globalCache()->calculatePtRatioRel().computePtRatioRel(muon, *mvaBTagCollectionTag); } muon.setJetPtRatio(jetPtRatioRel[0]); From 1cd4a9eebda1bc30c6086c16ccfb4bfcecf93e3f Mon Sep 17 00:00:00 2001 From: Andrea Trapote Date: Fri, 24 Feb 2023 15:39:03 +0100 Subject: [PATCH 033/233] adding files missed --- .../PatAlgos/interface/CalculatePtRatioRel.h | 35 +++++++ .../PatAlgos/src/CalculatePtRatioRel.cc | 94 +++++++++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 PhysicsTools/PatAlgos/interface/CalculatePtRatioRel.h create mode 100644 PhysicsTools/PatAlgos/src/CalculatePtRatioRel.cc diff --git a/PhysicsTools/PatAlgos/interface/CalculatePtRatioRel.h b/PhysicsTools/PatAlgos/interface/CalculatePtRatioRel.h new file mode 100644 index 0000000000000..44a2cface4584 --- /dev/null +++ b/PhysicsTools/PatAlgos/interface/CalculatePtRatioRel.h @@ -0,0 +1,35 @@ +#ifndef __PhysicsTools_PatAlgos_CalculatePtRatioRel__ +#define __PhysicsTools_PatAlgos_CalculatePtRatioRel__ + +#include "DataFormats/BTauReco/interface/JetTag.h" + +#include +#include + + +namespace pat { + class Muon; +} + +namespace reco { + class JetCorrector; +} // namespace reco + + +namespace pat { + class CalculatePtRatioRel { + public: + CalculatePtRatioRel(float dRmax); + + ~CalculatePtRatioRel(); + + std::vector computePtRatioRel(const pat::Muon& imuon, + const reco::JetTagCollection& bTags, + const reco::JetCorrector* correctorL1 = nullptr, + const reco::JetCorrector* correctorL1L2L3Res = nullptr) const; + + private: + float dRmax_; + }; +} // namespace pat +#endif diff --git a/PhysicsTools/PatAlgos/src/CalculatePtRatioRel.cc b/PhysicsTools/PatAlgos/src/CalculatePtRatioRel.cc new file mode 100644 index 0000000000000..652413bfe0a6e --- /dev/null +++ b/PhysicsTools/PatAlgos/src/CalculatePtRatioRel.cc @@ -0,0 +1,94 @@ +#include "PhysicsTools/PatAlgos/interface/CalculatePtRatioRel.h" + +#include "FWCore/ParameterSet/interface/FileInPath.h" +#include "CommonTools/MVAUtils/interface/GBRForestTools.h" +#include "DataFormats/Candidate/interface/Candidate.h" +#include "DataFormats/MuonReco/interface/Muon.h" +#include "DataFormats/MuonReco/interface/MuonSelectors.h" +#include "DataFormats/VertexReco/interface/Vertex.h" +#include "DataFormats/JetReco/interface/PFJet.h" +#include "DataFormats/JetReco/interface/PFJetCollection.h" +#include "DataFormats/PatCandidates/interface/Muon.h" +#include "JetMETCorrections/JetCorrector/interface/JetCorrector.h" + +using namespace pat; + +CalculatePtRatioRel::CalculatePtRatioRel(float dRmax) : dRmax_(dRmax) { +} + +CalculatePtRatioRel::~CalculatePtRatioRel() {} + +namespace { + + float ptRel(const reco::Candidate::LorentzVector& muP4, + const reco::Candidate::LorentzVector& jetP4, + bool subtractMuon = true) { + reco::Candidate::LorentzVector jp4 = jetP4; + if (subtractMuon) + jp4 -= muP4; + float dot = muP4.Vect().Dot(jp4.Vect()); + float ptrel = muP4.P2() - dot * dot / jp4.P2(); + ptrel = ptrel > 0 ? sqrt(ptrel) : 0.0; + return ptrel; + } +} // namespace + +std::vector CalculatePtRatioRel::computePtRatioRel(const pat::Muon& muon, + const reco::JetTagCollection& bTags, + const reco::JetCorrector* correctorL1, + const reco::JetCorrector* correctorL1L2L3Res) const { + + //Initialise loop variables + double minDr = 9999; + double jecL1L2L3Res = 1.; + double jecL1 = 1.; + float JetPtRatio = 0.0; + float JetPtRel = 0.0; + + // Compute corrected isolation variables + double chIso = muon.pfIsolationR04().sumChargedHadronPt; + double nIso = muon.pfIsolationR04().sumNeutralHadronEt; + double phoIso = muon.pfIsolationR04().sumPhotonEt; + double puIso = muon.pfIsolationR04().sumPUPt; + double dbCorrectedIsolation = chIso + std::max(nIso + phoIso - .5 * puIso, 0.); + double dbCorrectedRelIso = dbCorrectedIsolation / muon.pt(); + + JetPtRatio = 1. / (1 + dbCorrectedRelIso); + JetPtRel = 0; + + for (const auto& tagI : bTags) { + // for each muon with the lepton + double dr = deltaR(*(tagI.first), muon); + if (dr > minDr) + continue; + minDr = dr; + + const reco::Candidate::LorentzVector& muP4(muon.p4()); + reco::Candidate::LorentzVector jetP4(tagI.first->p4()); + + if (correctorL1 && correctorL1L2L3Res) { + jecL1L2L3Res = correctorL1L2L3Res->correction(*(tagI.first)); + jecL1 = correctorL1->correction(*(tagI.first)); + } + + if (minDr < dRmax_) { + if ((jetP4 - muP4).Rho() < 0.0001) { + JetPtRel = 0; + JetPtRatio = 1; + } else { + jetP4 -= muP4 / jecL1; + jetP4 *= jecL1L2L3Res; + jetP4 += muP4; + + JetPtRatio = muP4.pt() / jetP4.pt(); + JetPtRel = ptRel(muP4, jetP4); + } + } + } + + if (JetPtRatio > 1.5) + JetPtRatio = 1.5; + + std::vector outputs = {JetPtRatio, JetPtRel}; + return outputs; +}; From 976a4b02a5bf3e32e6ae912e1e429a9896ada610 Mon Sep 17 00:00:00 2001 From: Andrea Trapote Date: Fri, 24 Feb 2023 15:51:29 +0100 Subject: [PATCH 034/233] fixing format --- .../PatAlgos/interface/CalculatePtRatioRel.h | 8 +++----- PhysicsTools/PatAlgos/src/CalculatePtRatioRel.cc | 12 +++++------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/PhysicsTools/PatAlgos/interface/CalculatePtRatioRel.h b/PhysicsTools/PatAlgos/interface/CalculatePtRatioRel.h index 44a2cface4584..a43d9e543c00b 100644 --- a/PhysicsTools/PatAlgos/interface/CalculatePtRatioRel.h +++ b/PhysicsTools/PatAlgos/interface/CalculatePtRatioRel.h @@ -6,7 +6,6 @@ #include #include - namespace pat { class Muon; } @@ -15,7 +14,6 @@ namespace reco { class JetCorrector; } // namespace reco - namespace pat { class CalculatePtRatioRel { public: @@ -24,9 +22,9 @@ namespace pat { ~CalculatePtRatioRel(); std::vector computePtRatioRel(const pat::Muon& imuon, - const reco::JetTagCollection& bTags, - const reco::JetCorrector* correctorL1 = nullptr, - const reco::JetCorrector* correctorL1L2L3Res = nullptr) const; + const reco::JetTagCollection& bTags, + const reco::JetCorrector* correctorL1 = nullptr, + const reco::JetCorrector* correctorL1L2L3Res = nullptr) const; private: float dRmax_; diff --git a/PhysicsTools/PatAlgos/src/CalculatePtRatioRel.cc b/PhysicsTools/PatAlgos/src/CalculatePtRatioRel.cc index 652413bfe0a6e..79e6f18986b71 100644 --- a/PhysicsTools/PatAlgos/src/CalculatePtRatioRel.cc +++ b/PhysicsTools/PatAlgos/src/CalculatePtRatioRel.cc @@ -13,8 +13,7 @@ using namespace pat; -CalculatePtRatioRel::CalculatePtRatioRel(float dRmax) : dRmax_(dRmax) { -} +CalculatePtRatioRel::CalculatePtRatioRel(float dRmax) : dRmax_(dRmax) {} CalculatePtRatioRel::~CalculatePtRatioRel() {} @@ -34,17 +33,16 @@ namespace { } // namespace std::vector CalculatePtRatioRel::computePtRatioRel(const pat::Muon& muon, - const reco::JetTagCollection& bTags, - const reco::JetCorrector* correctorL1, - const reco::JetCorrector* correctorL1L2L3Res) const { - + const reco::JetTagCollection& bTags, + const reco::JetCorrector* correctorL1, + const reco::JetCorrector* correctorL1L2L3Res) const { //Initialise loop variables double minDr = 9999; double jecL1L2L3Res = 1.; double jecL1 = 1.; float JetPtRatio = 0.0; float JetPtRel = 0.0; - + // Compute corrected isolation variables double chIso = muon.pfIsolationR04().sumChargedHadronPt; double nIso = muon.pfIsolationR04().sumNeutralHadronEt; From eec138c133fe9c8b8a877c69648627dad8e8d065 Mon Sep 17 00:00:00 2001 From: Andrea Trapote Date: Thu, 2 Mar 2023 10:23:30 +0100 Subject: [PATCH 035/233] changing checksum --- DataFormats/PatCandidates/src/classes_def_objects.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DataFormats/PatCandidates/src/classes_def_objects.xml b/DataFormats/PatCandidates/src/classes_def_objects.xml index 4717eb3a0fcc3..a984a6d278381 100644 --- a/DataFormats/PatCandidates/src/classes_def_objects.xml +++ b/DataFormats/PatCandidates/src/classes_def_objects.xml @@ -67,8 +67,9 @@ - - + + + From b05dd9d6bc45cdf99f1d9fa861c1198954902b43 Mon Sep 17 00:00:00 2001 From: Andrea Trapote Date: Tue, 7 Mar 2023 12:57:36 +0100 Subject: [PATCH 036/233] changing mvaUseJEC name --- PhysicsTools/PatAlgos/plugins/PATMuonProducer.cc | 8 ++++---- .../python/producersLayer1/displacedMuonProducer_cff.py | 2 +- .../PatAlgos/python/producersLayer1/muonProducer_cfi.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/PhysicsTools/PatAlgos/plugins/PATMuonProducer.cc b/PhysicsTools/PatAlgos/plugins/PATMuonProducer.cc index 3922898d0e758..d1ff0ce173baa 100644 --- a/PhysicsTools/PatAlgos/plugins/PATMuonProducer.cc +++ b/PhysicsTools/PatAlgos/plugins/PATMuonProducer.cc @@ -235,7 +235,7 @@ namespace pat { bool computeMuonIDMVA_; bool computeSoftMuonMVA_; bool recomputeBasicSelectors_; - bool mvaUseJec_; + bool useJec_; edm::EDGetTokenT mvaBTagCollectionTag_; edm::EDGetTokenT mvaL1Corrector_; edm::EDGetTokenT mvaL1L2L3ResCorrector_; @@ -344,7 +344,7 @@ PATMuonProducer::PATMuonProducer(const edm::ParameterSet& iConfig, PATMuonHeavyO computeMuonIDMVA_(false), computeSoftMuonMVA_(false), recomputeBasicSelectors_(false), - mvaUseJec_(false), + useJec_(false), isolator_(iConfig.getParameter("userIsolation"), consumesCollector(), false), geometryToken_{esConsumes()}, transientTrackBuilderToken_{esConsumes(edm::ESInputTag("", "TransientTrackBuilder"))}, @@ -461,7 +461,7 @@ PATMuonProducer::PATMuonProducer(const edm::ParameterSet& iConfig, PATMuonHeavyO mvaL1Corrector_ = consumes(iConfig.getParameter("mvaL1Corrector")); mvaL1L2L3ResCorrector_ = consumes(iConfig.getParameter("mvaL1L2L3ResCorrector")); rho_ = consumes(iConfig.getParameter("rho")); - mvaUseJec_ = iConfig.getParameter("mvaUseJec"); + useJec_ = iConfig.getParameter("useJec"); } computeSoftMuonMVA_ = iConfig.getParameter("computeSoftMuonMVA"); @@ -972,7 +972,7 @@ void PATMuonProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) std::vector jetPtRatioRel = {0.0, 0.0}; if (primaryVertexIsValid && computeMiniIso_) { - if (mvaUseJec_) { + if (useJec_) { jetPtRatioRel = globalCache()->calculatePtRatioRel().computePtRatioRel( muon, *(mvaBTagCollectionTag.product()), mvaL1Corrector.product(), mvaL1L2L3ResCorrector.product()); } else { diff --git a/PhysicsTools/PatAlgos/python/producersLayer1/displacedMuonProducer_cff.py b/PhysicsTools/PatAlgos/python/producersLayer1/displacedMuonProducer_cff.py index 8acb32c05df17..6ddc7ee47ceff 100644 --- a/PhysicsTools/PatAlgos/python/producersLayer1/displacedMuonProducer_cff.py +++ b/PhysicsTools/PatAlgos/python/producersLayer1/displacedMuonProducer_cff.py @@ -61,7 +61,7 @@ # Depends on MiniIsolation, so only works in miniaod # Don't forget to set flags properly in miniAOD_tools.py recomputeBasicSelectors = False, - mvaUseJec = False, + useJec = False, mvaDrMax = 0.4, mvaJetTag = "pfCombinedInclusiveSecondaryVertexV2BJetTags", mvaL1Corrector = "ak4PFCHSL1FastjetCorrector", diff --git a/PhysicsTools/PatAlgos/python/producersLayer1/muonProducer_cfi.py b/PhysicsTools/PatAlgos/python/producersLayer1/muonProducer_cfi.py index f043ae4b7ee92..eb562b4b51340 100644 --- a/PhysicsTools/PatAlgos/python/producersLayer1/muonProducer_cfi.py +++ b/PhysicsTools/PatAlgos/python/producersLayer1/muonProducer_cfi.py @@ -112,7 +112,7 @@ computeMuonIDMVA = cms.bool(False), mvaIDTrainingFile = cms.FileInPath("RecoMuon/MuonIdentification/data/mvaID.onnx"), recomputeBasicSelectors = cms.bool(True), - mvaUseJec = cms.bool(True), + useJec = cms.bool(True), mvaDrMax = cms.double(0.4), mvaJetTag = cms.InputTag("pfCombinedInclusiveSecondaryVertexV2BJetTags"), mvaL1Corrector = cms.InputTag("ak4PFCHSL1FastjetCorrector"), From 150eb67f2840f0cd66bab90835af638decbdc72b Mon Sep 17 00:00:00 2001 From: Andrea Trapote Date: Tue, 7 Mar 2023 16:16:53 +0100 Subject: [PATCH 037/233] removing variables from nano and DQM --- PhysicsTools/NanoAOD/python/muons_cff.py | 2 -- PhysicsTools/NanoAOD/python/nanoDQM_cfi.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/PhysicsTools/NanoAOD/python/muons_cff.py b/PhysicsTools/NanoAOD/python/muons_cff.py index 23cfb633c79a4..8beaff505fb2c 100644 --- a/PhysicsTools/NanoAOD/python/muons_cff.py +++ b/PhysicsTools/NanoAOD/python/muons_cff.py @@ -162,8 +162,6 @@ highPtId = Var("?passed('CutBasedIdGlobalHighPt')?2:passed('CutBasedIdTrkHighPt')","uint8",doc="high-pT cut-based ID (1 = tracker high pT, 2 = global high pT, which includes tracker high pT)"), pfIsoId = Var("passed('PFIsoVeryLoose')+passed('PFIsoLoose')+passed('PFIsoMedium')+passed('PFIsoTight')+passed('PFIsoVeryTight')+passed('PFIsoVeryVeryTight')","uint8",doc="PFIso ID from miniAOD selector (1=PFIsoVeryLoose, 2=PFIsoLoose, 3=PFIsoMedium, 4=PFIsoTight, 5=PFIsoVeryTight, 6=PFIsoVeryVeryTight)"), tkIsoId = Var("?passed('TkIsoTight')?2:passed('TkIsoLoose')","uint8",doc="TkIso ID (1=TkIsoLoose, 2=TkIsoTight)"), - mvaId = Var("passed('MvaLoose')+passed('MvaMedium')+passed('MvaTight')+passed('MvaVTight')+passed('MvaVVTight')","uint8",doc="Mva for ID of prompt leptons from miniAOD selector (1=MvaLoose, 2=MvaMedium, 3=MvaTight, 4=MvaVTight, 5=MvaVVTight)"), - mvaLowPtId = Var("passed('LowPtMvaLoose')+passed('LowPtMvaMedium')","uint8", doc="Low Pt Mva ID from miniAOD selector (1=LowPtMvaLoose, 2=LowPtMvaMedium)"), miniIsoId = Var("passed('MiniIsoLoose')+passed('MiniIsoMedium')+passed('MiniIsoTight')+passed('MiniIsoVeryTight')","uint8",doc="MiniIso ID from miniAOD selector (1=MiniIsoLoose, 2=MiniIsoMedium, 3=MiniIsoTight, 4=MiniIsoVeryTight)"), mvaMuID = Var("mvaIDValue()",float,doc="MVA-based ID score ",precision=6), mvaMuID_WP = Var("userFloat('mvaIDMuon_wpMedium') + userFloat('mvaIDMuon_wpTight')","uint8",doc="MVA-based ID selector WPs (1=MVAIDwpMedium,2=MVAIDwpTight)"), diff --git a/PhysicsTools/NanoAOD/python/nanoDQM_cfi.py b/PhysicsTools/NanoAOD/python/nanoDQM_cfi.py index f10a05ebe642c..746f3a640fb00 100644 --- a/PhysicsTools/NanoAOD/python/nanoDQM_cfi.py +++ b/PhysicsTools/NanoAOD/python/nanoDQM_cfi.py @@ -523,9 +523,7 @@ Plot1D('miniPFRelIso_all', 'miniPFRelIso_all', 20, 0, 1, 'mini PF relative isolation, total (with scaled rho*EA PU corrections)'), Plot1D('miniPFRelIso_chg', 'miniPFRelIso_chg', 20, 0, 1, 'mini PF relative isolation, charged component'), Plot1D('multiIsoId', 'multiIsoId', 3, -0.5, 2.5, 'MultiIsoId from miniAOD selector (1=MultiIsoLoose, 2=MultiIsoMedium)'), - Plot1D('mvaId', 'mvaId', 6, -0.5, 5.5, 'Mva ID from miniAOD selector (1=MvaLoose, 2=MvaMedium, 3=MvaTight, 4=MvaVTight, 5=MvaVVTight)'), Plot1D('mvaLowPt', 'mvaLowPt', 20, -1, 1, 'Low pt muon ID score'), - Plot1D('mvaLowPtId', 'mvaLowPtId', 3, -0.5, 2.5, 'Low Pt Mva ID from miniAOD selector (1=LowPtMvaLoose, 2=LowPtMvaMedium)'), Plot1D('mvaTTH', 'mvaTTH', 20, -1, 1, 'TTH MVA lepton ID score'), Plot1D('mvaMuID', 'mvaMuID', 20, 0, 1, 'Score of MVA-based muon ID'), Plot1D('mvaMuID_WP', 'mvaMuID_WP', 3, -0.5, 2.5, 'MVA-based ID selector WPs (1=MVAIDwpMedium,2=MVAIDwpTight)'), From 57484c480c61e48172a1c1b33409e46bcf2bf508 Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Tue, 7 Mar 2023 17:47:52 +0100 Subject: [PATCH 038/233] fix jet and JEC reference in nanoAOD PNet reevaluation for PUPPI --- PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py b/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py index 255bbc290b10c..0b0d36b89c980 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py @@ -136,8 +136,8 @@ def nanoAOD_addDeepInfoAK4(process,addParticleNet): print("Will recalculate the following discriminators: "+", ".join(_btagDiscriminators)) updateJetCollection( process, - jetSource = cms.InputTag('slimmedJets'), - jetCorrections = ('AK4PFchs', cms.vstring(['L1FastJet', 'L2Relative', 'L3Absolute','L2L3Residual']), 'None'), + jetSource = cms.InputTag('slimmedJetsPuppi'), + jetCorrections = ('AK4PFPuppi', cms.vstring(['L2Relative', 'L3Absolute']), 'None'), btagDiscriminators = _btagDiscriminators, postfix = 'WithDeepInfo', ) From 915dd4bf3fcd0ee44cf7269381a626e55780c1e9 Mon Sep 17 00:00:00 2001 From: Sam Harper Date: Wed, 8 Mar 2023 14:31:29 +0100 Subject: [PATCH 039/233] code format --- .../NanoAOD/interface/SimpleFlatTableProducer.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/PhysicsTools/NanoAOD/interface/SimpleFlatTableProducer.h b/PhysicsTools/NanoAOD/interface/SimpleFlatTableProducer.h index b6540c4233986..e77af3a99cad0 100644 --- a/PhysicsTools/NanoAOD/interface/SimpleFlatTableProducer.h +++ b/PhysicsTools/NanoAOD/interface/SimpleFlatTableProducer.h @@ -372,23 +372,23 @@ class BXVectorSimpleFlatTableProducer : public SimpleFlatTableProducerBase>::baseDescriptions(); - desc.add("cut", "")->setComment("selection on the main input collection (but selection can not be bx based)"); + desc.add("cut", "")->setComment( + "selection on the main input collection (but selection can not be bx based)"); desc.addOptional("maxLen")->setComment( - "define the maximum length of the input collection to put in the branch"); - desc.add("minBX",-2)->setComment("min bx (inclusive) to include"); - desc.add("maxBX",2)->setComment("max bx (inclusive) to include"); + "define the maximum length of the input collection to put in the branch"); + desc.add("minBX", -2)->setComment("min bx (inclusive) to include"); + desc.add("maxBX", 2)->setComment("max bx (inclusive) to include"); descriptions.addWithDefaultLabel(desc); } std::unique_ptr fillTable(const edm::Event &iEvent, const edm::Handle> &prod) const override { - std::vector selObjs; std::vector selObjBXs; if (prod.isValid() || !(this->skipNonExistingSrc_)) { - const int minBX = std::max(minBX_,prod->getFirstBX()); - const int maxBX = std::min(maxBX_,prod->getLastBX()); + const int minBX = std::max(minBX_, prod->getFirstBX()); + const int maxBX = std::min(maxBX_, prod->getLastBX()); for (int bx = minBX; bx <= maxBX; bx++) { for (size_t objNr = 0, nrObjs = prod->size(bx); objNr < nrObjs; ++objNr) { const auto &obj = prod->at(bx, objNr); From 5e7f771eaebb5f4c0349cdee90e9400c9b14de39 Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Wed, 8 Mar 2023 18:02:15 +0100 Subject: [PATCH 040/233] remove puppi weight from PNet feature evaluator and fix nano AK4 PUPPI jet config --- .../NanoAOD/python/jetsAK4_Puppi_cff.py | 2 +- .../plugins/ParticleNetFeatureEvaluator.cc | 22 ++++--------------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py b/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py index 0b0d36b89c980..8c62ea45a5864 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py @@ -142,7 +142,7 @@ def nanoAOD_addDeepInfoAK4(process,addParticleNet): postfix = 'WithDeepInfo', ) process.load("Configuration.StandardSequences.MagneticField_cff") - process.jetCorrFactorsNano.src="selectedUpdatedPatJetsWithDeepInfo" + process.jetPuppiCorrFactorsNano.src="selectedUpdatedPatJetsWithDeepInfo" process.updatedJets.jetSource="selectedUpdatedPatJetsWithDeepInfo" return process diff --git a/RecoBTag/FeatureTools/plugins/ParticleNetFeatureEvaluator.cc b/RecoBTag/FeatureTools/plugins/ParticleNetFeatureEvaluator.cc index d6163b2b2592b..747bb0e0dc108 100644 --- a/RecoBTag/FeatureTools/plugins/ParticleNetFeatureEvaluator.cc +++ b/RecoBTag/FeatureTools/plugins/ParticleNetFeatureEvaluator.cc @@ -62,8 +62,6 @@ class ParticleNetFeatureEvaluator : public edm::stream::EDProducer<> { const double max_dr_for_losttrack_; const double min_pt_for_taus_; const double max_eta_for_taus_; - const bool use_puppiP4_; - const double min_puppi_wgt_; const bool include_neutrals_; edm::EDGetTokenT muon_token_; @@ -262,8 +260,6 @@ ParticleNetFeatureEvaluator::ParticleNetFeatureEvaluator(const edm::ParameterSet max_dr_for_losttrack_(iConfig.getParameter("max_dr_for_losttrack")), min_pt_for_taus_(iConfig.getParameter("min_pt_for_taus")), max_eta_for_taus_(iConfig.getParameter("max_eta_for_taus")), - use_puppiP4_(iConfig.getParameter("use_puppiP4")), - min_puppi_wgt_(iConfig.getParameter("min_puppi_wgt")), include_neutrals_(iConfig.getParameter("include_neutrals")), muon_token_(consumes(iConfig.getParameter("muons"))), electron_token_(consumes(iConfig.getParameter("electrons"))), @@ -295,9 +291,7 @@ void ParticleNetFeatureEvaluator::fillDescriptions(edm::ConfigurationDescription desc.add("max_dr_for_losttrack", 0.4); desc.add("min_pt_for_taus", 20.); desc.add("max_eta_for_taus", 2.5); - desc.add("use_puppiP4", false); desc.add("include_neutrals", true); - desc.add("min_puppi_wgt", -1.); desc.add("vertices", edm::InputTag("offlineSlimmedPrimaryVertices")); desc.add("secondary_vertices", edm::InputTag("slimmedSecondaryVertices")); desc.add("pf_candidates", edm::InputTag("packedPFCandidates")); @@ -371,7 +365,7 @@ void ParticleNetFeatureEvaluator::produce(edm::Event &iEvent, const edm::EventSe bool fill_vars = true; if ((jet.pt() < min_jet_pt_ and dynamic_cast(&jet)->correctedJet("Uncorrected").pt() < min_jet_pt_) or - std::abs(jet.eta()) > max_jet_eta_ or std::abs(jet.eta()) < min_jet_eta_) + std::abs(jet.eta()) >= max_jet_eta_ or std::abs(jet.eta()) < min_jet_eta_) fill_vars = false; if (jet.numberOfDaughters() == 0) fill_vars = false; @@ -420,8 +414,6 @@ void ParticleNetFeatureEvaluator::fillParticleFeatures(DeepBoostedJetFeatures &f const pat::PackedCandidate *cand = dynamic_cast(&(*dau)); if (not cand) throw edm::Exception(edm::errors::InvalidReference) << "Cannot convert to either pat::PackedCandidate"; - if (cand->puppiWeight() < min_puppi_wgt_) - continue; // base requirements on PF candidates if (cand->pt() < min_pt_for_pfcandidates_) continue; @@ -432,14 +424,8 @@ void ParticleNetFeatureEvaluator::fillParticleFeatures(DeepBoostedJetFeatures &f daughters.push_back(cand); } - // sort by Puppi-weighted pt - if (use_puppiP4_) - std::sort(daughters.begin(), daughters.end(), [&](const pat::PackedCandidate *a, const pat::PackedCandidate *b) { - return a->puppiWeight() * a->pt() > b->puppiWeight() * b->pt(); - }); // sort by original pt (not Puppi-weighted) - else - std::sort(daughters.begin(), daughters.end(), [](const auto &a, const auto &b) { return a->pt() > b->pt(); }); + std::sort(daughters.begin(), daughters.end(), [](const auto &a, const auto &b) { return a->pt() > b->pt(); }); // reserve space for (const auto &name : particle_features_) @@ -451,8 +437,8 @@ void ParticleNetFeatureEvaluator::fillParticleFeatures(DeepBoostedJetFeatures &f continue; // input particle is a packed PF candidate - auto candP4 = use_puppiP4_ ? cand->puppiWeight() * cand->p4() : cand->p4(); - auto candP3 = use_puppiP4_ ? cand->puppiWeight() * cand->momentum() : cand->momentum(); + auto candP4 = cand->p4(); + auto candP3 = cand->momentum(); // candidate track const reco::Track *track = nullptr; From 69a2c39ba09e8c131e816f66ab87c25893a533ab Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Thu, 9 Mar 2023 10:30:49 +0100 Subject: [PATCH 041/233] fix CvsL definition --- RecoBTag/FeatureTools/plugins/ParticleNetFeatureEvaluator.cc | 4 ++-- .../pfParticleNetFromMiniAODAK4DiscriminatorsJetTags_cfi.py | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/RecoBTag/FeatureTools/plugins/ParticleNetFeatureEvaluator.cc b/RecoBTag/FeatureTools/plugins/ParticleNetFeatureEvaluator.cc index 747bb0e0dc108..7f820b6fe4fcf 100644 --- a/RecoBTag/FeatureTools/plugins/ParticleNetFeatureEvaluator.cc +++ b/RecoBTag/FeatureTools/plugins/ParticleNetFeatureEvaluator.cc @@ -437,8 +437,8 @@ void ParticleNetFeatureEvaluator::fillParticleFeatures(DeepBoostedJetFeatures &f continue; // input particle is a packed PF candidate - auto candP4 = cand->p4(); - auto candP3 = cand->momentum(); + auto candP4 = cand->p4(); + auto candP3 = cand->momentum(); // candidate track const reco::Track *track = nullptr; diff --git a/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4DiscriminatorsJetTags_cfi.py b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4DiscriminatorsJetTags_cfi.py index 9e68cb1727c58..b09fabc5e9632 100644 --- a/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4DiscriminatorsJetTags_cfi.py +++ b/RecoBTag/ONNXRuntime/python/pfParticleNetFromMiniAODAK4DiscriminatorsJetTags_cfi.py @@ -21,7 +21,6 @@ cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probc'), ), denominator = cms.VInputTag( - cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probb'), cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probc'), cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probuds'), cms.InputTag('pfParticleNetFromMiniAODAK4PuppiCentralJetTags', 'probg'), @@ -177,7 +176,6 @@ cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probc'), ), denominator = cms.VInputTag( - cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probb'), cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probc'), cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probuds'), cms.InputTag('pfParticleNetFromMiniAODAK4CHSCentralJetTags', 'probg'), From acbdc841d730aebde87a0f4dc2659f24dbd204fc Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Thu, 9 Mar 2023 11:12:53 +0100 Subject: [PATCH 042/233] add PNet to NanoAOD DQM and change name of mass-correlated tagger nodes --- PhysicsTools/NanoAOD/python/jetsAK8_cff.py | 18 ++++---- PhysicsTools/NanoAOD/python/nanoDQM_cfi.py | 52 +++++++++++++++------- 2 files changed, 45 insertions(+), 25 deletions(-) diff --git a/PhysicsTools/NanoAOD/python/jetsAK8_cff.py b/PhysicsTools/NanoAOD/python/jetsAK8_cff.py index a913544f933c4..2a9ee5c8a49ee 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK8_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK8_cff.py @@ -96,15 +96,15 @@ btagDDBvLV2 = Var("bDiscriminator('pfMassIndependentDeepDoubleBvLV2JetTags:probHbb')",float,doc="DeepDoubleX V2(mass-decorrelated) discriminator for H(Z)->bb vs QCD",precision=10), btagDDCvLV2 = Var("bDiscriminator('pfMassIndependentDeepDoubleCvLV2JetTags:probHcc')",float,doc="DeepDoubleX V2 (mass-decorrelated) discriminator for H(Z)->cc vs QCD",precision=10), btagDDCvBV2 = Var("bDiscriminator('pfMassIndependentDeepDoubleCvBV2JetTags:probHcc')",float,doc="DeepDoubleX V2 (mass-decorrelated) discriminator for H(Z)->cc vs H(Z)->bb",precision=10), - particleNetMassCorr_QCD = Var("bDiscriminator('pfParticleNetJetTags:probQCDbb')+bDiscriminator('pfParticleNetJetTags:probQCDcc')+bDiscriminator('pfParticleNetJetTags:probQCDb')+bDiscriminator('pfParticleNetJetTags:probQCDc')+bDiscriminator('pfParticleNetJetTags:probQCDothers')",float,doc="ParticleNet tagger QCD(bb,cc,b,c,others) sum",precision=10), - particleNetMassCorr_TvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:TvsQCD')",float,doc="ParticleNet tagger (w/ mass) top vs QCD discriminator",precision=10), - particleNetMassCorr_WvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:WvsQCD')",float,doc="ParticleNet tagger (w/ mass) W vs QCD discriminator",precision=10), - particleNetMassCorr_ZvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:ZvsQCD')",float,doc="ParticleNet tagger (w/ mass) Z vs QCD discriminator",precision=10), - particleNetMassCorr_H4qvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:H4qvsQCD')",float,doc="ParticleNet tagger (w/ mass) H(->VV->qqqq) vs QCD discriminator",precision=10), - particleNetMassCorr_HbbvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:HbbvsQCD')",float,doc="ParticleNet tagger (w/mass) H(->bb) vs QCD discriminator",precision=10), - particleNetMassCorr_HccvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:HccvsQCD')",float,doc="ParticleNet tagger (w/mass) H(->cc) vs QCD discriminator",precision=10), - particleNetMassCorr_ZbbvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:ZbbvsQCD')",float,doc="ParticleNet tagger (w/mass) Z(->bb) vs QCD discriminator",precision=10), - particleNetMassCorr_ZccvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:ZccvsQCD')",float,doc="ParticleNet tagger (w/mass) Z(->cc) vs QCD discriminator",precision=10), + particleNetWithMass_QCD = Var("bDiscriminator('pfParticleNetJetTags:probQCDbb')+bDiscriminator('pfParticleNetJetTags:probQCDcc')+bDiscriminator('pfParticleNetJetTags:probQCDb')+bDiscriminator('pfParticleNetJetTags:probQCDc')+bDiscriminator('pfParticleNetJetTags:probQCDothers')",float,doc="ParticleNet tagger (w/ mass) QCD(bb,cc,b,c,others) sum",precision=10), + particleNetWithMass_TvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:TvsQCD')",float,doc="ParticleNet tagger (w/ mass) top vs QCD discriminator",precision=10), + particleNetWithMass_WvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:WvsQCD')",float,doc="ParticleNet tagger (w/ mass) W vs QCD discriminator",precision=10), + particleNetWithMass_ZvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:ZvsQCD')",float,doc="ParticleNet tagger (w/ mass) Z vs QCD discriminator",precision=10), + particleNetWithMass_H4qvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:H4qvsQCD')",float,doc="ParticleNet tagger (w/ mass) H(->VV->qqqq) vs QCD discriminator",precision=10), + particleNetWithMass_HbbvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:HbbvsQCD')",float,doc="ParticleNet tagger (w/mass) H(->bb) vs QCD discriminator",precision=10), + particleNetWithMass_HccvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:HccvsQCD')",float,doc="ParticleNet tagger (w/mass) H(->cc) vs QCD discriminator",precision=10), + particleNetWithMass_ZbbvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:ZbbvsQCD')",float,doc="ParticleNet tagger (w/mass) Z(->bb) vs QCD discriminator",precision=10), + particleNetWithMass_ZccvsQCD = Var("bDiscriminator('pfParticleNetDiscriminatorsJetTags:ZccvsQCD')",float,doc="ParticleNet tagger (w/mass) Z(->cc) vs QCD discriminator",precision=10), particleNet_QCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD2hf')+bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD1hf')+bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD0hf')",float,doc="ParticleNet tagger QCD(0+1+2HF) sum",precision=10), particleNet_QCD2HF = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD2hf')",float,doc="ParticleNet tagger QCD 2 HF (b/c) score",precision=10), particleNet_QCD1HF = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD1hf')",float,doc="ParticleNet tagger QCD 1 HF (b/c) score",precision=10), diff --git a/PhysicsTools/NanoAOD/python/nanoDQM_cfi.py b/PhysicsTools/NanoAOD/python/nanoDQM_cfi.py index f10a05ebe642c..38940605248f0 100644 --- a/PhysicsTools/NanoAOD/python/nanoDQM_cfi.py +++ b/PhysicsTools/NanoAOD/python/nanoDQM_cfi.py @@ -182,23 +182,35 @@ Plot1D('btagDDCvLV2', 'btagDDCvLV2', 20, 0, 1, 'DeepDoubleX V2 (mass-decorrelated) discriminator for H(Z)->cc vs QCD'), Plot1D('btagDDCvL_noMD', 'btagDDCvL_noMD', 20, 0, 1, 'DeepDoubleX discriminator (no mass-decorrelation) for H(Z)->cc vs QCD'), Plot1D('btagDeepB', 'btagDeepB', 20, -1, 1, 'Deep B+BB btag discriminator'), + Plot1D('particleNetWithMass_QCD', 'particleNetWithMass_QCD', 20, -1, 1, 'ParticleNet (mass-correlated) QCD score'), + Plot1D('particleNetWithMass_TvsQCD', 'particleNetWithMass_TvsQCD', 20, -1, 1, 'ParticleNet (mass-correlated) top vs. QCD score'), + Plot1D('particleNetWithMass_WvsQCD', 'particleNetWithMass_WvsQCD', 20, -1, 1, 'ParticleNet (mass-correlated) W vs. QCD score'), + Plot1D('particleNetWithMass_ZvsQCD', 'particleNetWithMass_ZvsQCD', 20, -1, 1, 'ParticleNet (mass-correlated) Z vs. QCD score'), + Plot1D('particleNetWithMass_H4qvsQCD', 'particleNetWithMass_H4qvsQCD', 20, -1, 1, 'ParticleNet (mass-correlated) H(->VV->qqqq) vs. QCD score'), + Plot1D('particleNetWithMass_HbbvsQCD', 'particleNetWithMass_HbbvsQCD', 20, -1, 1, 'ParticleNet (mass-correlated) H->bb vs. QCD score'), + Plot1D('particleNetWithMass_HccvsQCD', 'particleNetWithMass_HccvsQCD', 20, -1, 1, 'ParticleNet (mass-correlated) H->cc vs. QCD score'), + Plot1D('particleNetWithMass_ZbbvsQCD', 'particleNetWithMass_ZbbvsQCD', 20, -1, 1, 'ParticleNet (mass-correlated) Z->bb vs. QCD score'), + Plot1D('particleNetWithMass_ZccvsQCD', 'particleNetWithMass_HccvsQCD', 20, -1, 1, 'ParticleNet (mass-correlated) H->cc vs. QCD score'), + Plot1D('particleNet_QCD', 'particleNet_QCD', 20, 0, 1, 'ParticleNet QCD score'), + Plot1D('particleNet_QCD2HF', 'particleNet_QCD2HF', 20, 0, 1, 'ParticleNet QCD 2HF (b,c) score'), + Plot1D('particleNet_QCD1HF', 'particleNet_QCD1HF', 20, 0, 1, 'ParticleNet QCD 1HF (b,c) score'), + Plot1D('particleNet_QCD0HF', 'particleNet_QCD0HF', 20, 0, 1, 'ParticleNet QCD 0HF (b,c) score'), + Plot1D('particleNet_Xbb', 'particleNet_Xbb', 20, 0, 1, 'ParticleNet X->bb score'), + Plot1D('particleNet_Xcc', 'particleNet_Xcc', 20, 0, 1, 'ParticleNet X->cc score'), + Plot1D('particleNet_Xqq', 'particleNet_Xqq', 20, 0, 1, 'ParticleNet X->qq (uds) score'), + Plot1D('particleNet_Xgg', 'particleNet_Xgg', 20, 0, 1, 'ParticleNet X->gg score'), + Plot1D('particleNet_Xtt', 'particleNet_Xtt', 20, 0, 1, 'ParticleNet X->tautau score'), + Plot1D('particleNet_Xtm', 'particleNet_Xtm', 20, 0, 1, 'ParticleNet X->mutau score'), + Plot1D('particleNet_Xte', 'particleNet_Xte', 20, 0, 1, 'ParticleNet X->etau score'), + Plot1D('particleNet_massCorr', 'particleNet_massCorr', 20, 0, 2, 'ParticleNet mass regression, correction relative to jet mass'), + Plot1D('particleNet_XbbVsQCD', 'particleNet_XbbVsQCD', 20, 0, 1, 'ParticleNet X->bb vs. QCD score'), + Plot1D('particleNet_XccVsQCD', 'particleNet_XccVsQCD', 20, 0, 1, 'ParticleNet X->cc vs. QCD score'), + Plot1D('particleNet_XqqVsQCD', 'particleNet_XqqVsQCD', 20, 0, 1, 'ParticleNet X->qq (uds) vs. QCD score'), + Plot1D('particleNet_XggVsQCD', 'particleNet_XggVsQCD', 20, 0, 1, 'ParticleNet X->gg vs. QCD score'), + Plot1D('particleNet_XttVsQCD', 'particleNet_XttVsQCD', 20, 0, 1, 'ParticleNet X->tautau vs. QCD score'), + Plot1D('particleNet_XtmVsQCD', 'particleNet_XtmVsQCD', 20, 0, 1, 'ParticleNet X->mutau vs. QCD score'), + Plot1D('particleNet_XteVsQCD', 'particleNet_XteVsQCD', 20, 0, 1, 'ParticleNet X->etau vs. QCD score'), Plot1D('btagHbb', 'btagHbb', 20, -1, 1, 'Higgs to BB tagger discriminator'), - Plot1D('deepTagMD_H4qvsQCD', 'deepTagMD_H4qvsQCD', 20, 0, 1, 'Mass-decorrelated DeepBoostedJet tagger H->4q vs QCD discriminator'), - Plot1D('deepTagMD_HbbvsQCD', 'deepTagMD_HbbvsQCD', 20, 0, 1, 'Mass-decorrelated DeepBoostedJet tagger H->bb vs QCD discriminator'), - Plot1D('deepTagMD_TvsQCD', 'deepTagMD_TvsQCD', 20, 0, 1, 'Mass-decorrelated DeepBoostedJet tagger top vs QCD discriminator'), - Plot1D('deepTagMD_WvsQCD', 'deepTagMD_WvsQCD', 20, 0, 1, 'Mass-decorrelated DeepBoostedJet tagger W vs QCD discriminator'), - Plot1D('deepTagMD_ZHbbvsQCD', 'deepTagMD_ZHbbvsQCD', 20, 0, 1, 'Mass-decorrelated DeepBoostedJet tagger Z/H->bb vs QCD discriminator'), - Plot1D('deepTagMD_ZHccvsQCD', 'deepTagMD_ZHccvsQCD', 20, 0, 1, 'Mass-decorrelated DeepBoostedJet tagger Z/H->cc vs QCD discriminator'), - Plot1D('deepTagMD_ZbbvsQCD', 'deepTagMD_ZbbvsQCD', 20, 0, 1, 'Mass-decorrelated DeepBoostedJet tagger Z->bb vs QCD discriminator'), - Plot1D('deepTagMD_ZvsQCD', 'deepTagMD_ZvsQCD', 20, 0, 1, 'Mass-decorrelated DeepBoostedJet tagger Z vs QCD discriminator'), - Plot1D('deepTagMD_bbvsLight', 'deepTagMD_bbvsLight', 20, 0, 1, 'Mass-decorrelated DeepBoostedJet tagger Z/H/gluon->bb vs light flavour discriminator'), - Plot1D('deepTagMD_ccvsLight', 'deepTagMD_ccvsLight', 20, 0, 1, 'Mass-decorrelated DeepBoostedJet tagger Z/H/gluon->cc vs light flavour discriminator'), - Plot1D('deepTag_H', 'deepTag_H', 20, 0, 1, 'DeepBoostedJet tagger H(bb,cc,4q) sum'), - Plot1D('deepTag_QCD', 'deepTag_QCD', 20, 0, 1, 'DeepBoostedJet tagger QCD(bb,cc,b,c,others) sum'), - Plot1D('deepTag_QCDothers', 'deepTag_QCDothers', 20, 0, 1, 'DeepBoostedJet tagger QCDothers value'), - Plot1D('deepTag_TvsQCD', 'deepTag_TvsQCD', 20, 0, 1, 'DeepBoostedJet tagger top vs QCD discriminator'), - Plot1D('deepTag_WvsQCD', 'deepTag_WvsQCD', 20, 0, 1, 'DeepBoostedJet tagger W vs QCD discriminator'), - Plot1D('deepTag_ZvsQCD', 'deepTag_ZvsQCD', 20, 0, 1, 'DeepBoostedJet tagger Z vs QCD discriminator'), NoPlot('electronIdx3SJ'), Plot1D('eta', 'eta', 20, -4, 4, 'eta'), NoPlot('genJetAK8Idx'), @@ -414,6 +426,14 @@ Plot1D('btagDeepFlavQG', 'btagDeepFlavQG', 20, -1, 1, 'DeepJet g vs uds discriminator'), Plot1D('cRegCorr', 'cRegCorr', 20, 0.6, 2, 'pt correction for c-jet energy regression'), Plot1D('cRegRes', 'cRegRes', 20, 0.05, 0.4, 'res on pt corrected with c-jet regression'), + Plot1D('btagPNetB', 'btagPNetB', 20, 0, 1, 'ParticleNet b tag discriminator'), + Plot1D('btagPNetCvL', 'btagPNetCvL', 20, 0, 1, 'ParticleNet c vs. light (udsg) discriminator'), + Plot1D('btagPNetCvB', 'btagPNetCvB', 20, 0, 1, 'ParticleNet c vs. b discriminator'), + Plot1D('btagPNetQvG', 'btagPNetQvG', 20, 0, 1, 'ParticleNet quark (udsbc) vs. gluon discriminator'), + Plot1D('btagPNetTauVJet', 'btagPNetTauVJet', 20, 0, 1, 'ParticleNet tau vs. jet discriminator'), + Plot1D('PNetRegPtRawCorr', 'PNetRegPtRawCorr', 20, 0, 2, 'ParticleNet visible pT regression, correction relative to raw pT'), + Plot1D('PNetRegPtRawCorrNeutrino', 'PNetRegPtRawCorrNeutrino', 20, 0, 2, 'ParticleNet neutrino pT correction, relative to regressed visible pT'), + Plot1D('PNetRegPtRawRes', 'PNetRegPtRawRes', 20, 0, 0.5, 'ParticleNet per-jet resolution estimator: (q84 - q16)/2'), Plot1D('chEmEF', 'chEmEF', 20, 0, 1, 'charged Electromagnetic Energy Fraction'), Plot1D('chFPV0EF', 'chFPV0EF', 20, 0, 2, 'charged fromPV==0 Energy Fraction (energy excluded from CHS jets). Previously called betastar.'), Plot1D('chHEF', 'chHEF', 20, 0, 2, 'charged Hadron Energy Fraction'), From 5e0a9dd5f55cde7bb212d149f17803a3a37dec3d Mon Sep 17 00:00:00 2001 From: qianying guo Date: Sun, 12 Mar 2023 14:01:14 +0100 Subject: [PATCH 043/233] update the TnP code for GEM muon efficiency measurement --- DQM/GEM/python/gem_dqm_offline_client_cff.py | 5 +- DQM/GEM/python/gem_dqm_offline_source_cff.py | 5 +- .../MuonDPG/plugins/GEMTnPEfficiencyTask.cc | 821 ++++++++++++++++++ .../python/gemTnPEfficiencyClient_cfi.py | 36 + .../python/gemTnPEfficiencyTask_cfi.py | 28 + 5 files changed, 893 insertions(+), 2 deletions(-) create mode 100644 DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc create mode 100644 DQMOffline/MuonDPG/python/gemTnPEfficiencyClient_cfi.py create mode 100644 DQMOffline/MuonDPG/python/gemTnPEfficiencyTask_cfi.py diff --git a/DQM/GEM/python/gem_dqm_offline_client_cff.py b/DQM/GEM/python/gem_dqm_offline_client_cff.py index 03eb7daae33a5..84fa7e81ec400 100644 --- a/DQM/GEM/python/gem_dqm_offline_client_cff.py +++ b/DQM/GEM/python/gem_dqm_offline_client_cff.py @@ -3,8 +3,11 @@ from DQM.GEM.GEMDQMHarvester_cfi import * from DQM.GEM.gemEfficiencyHarvester_cff import * +from DQMOffline.MuonDPG.gemTnPEfficiencyClient_cfi import * + gemClients = cms.Sequence( GEMDQMHarvester * gemEfficiencyHarvesterTightGlb * - gemEfficiencyHarvesterSta + gemEfficiencyHarvesterSta * + gemTnPEfficiencyClient ) diff --git a/DQM/GEM/python/gem_dqm_offline_source_cff.py b/DQM/GEM/python/gem_dqm_offline_source_cff.py index 762feec518e57..070ae588e82c7 100644 --- a/DQM/GEM/python/gem_dqm_offline_source_cff.py +++ b/DQM/GEM/python/gem_dqm_offline_source_cff.py @@ -5,6 +5,8 @@ from DQM.GEM.GEMDAQStatusSource_cfi import * from DQM.GEM.gemEfficiencyAnalyzer_cff import * +from DQMOffline.MuonDPG.gemTnPEfficiencyTask_cfi import * + GEMDigiSource.runType = "offline" GEMRecHitSource.runType = "offline" GEMDAQStatusSource.runType = "offline" @@ -14,5 +16,6 @@ GEMRecHitSource * GEMDAQStatusSource * gemEfficiencyAnalyzerTightGlbSeq * - gemEfficiencyAnalyzerStaSeq + gemEfficiencyAnalyzerStaSeq * + gemTnPEfficiencyMonitor ) diff --git a/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc b/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc new file mode 100644 index 0000000000000..3527f577cba2c --- /dev/null +++ b/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc @@ -0,0 +1,821 @@ +/* + * \file GEMTnPEfficiencyTask.cc + * \author Qianying + * + * \interited from the TnP framework of + * \author L. Lunerti - INFN Bologna + * + */ + +#include "FWCore/Framework/interface/MakerMacros.h" + +#include "DataFormats/MuonReco/interface/MuonSegmentMatch.h" +#include "DataFormats/MuonReco/interface/MuonGEMHitMatch.h" +#include "DataFormats/Math/interface/deltaPhi.h" + +#include "DQMOffline/MuonDPG/interface/BaseTnPEfficiencyTask.h" + +class GEMTnPEfficiencyTask : public BaseTnPEfficiencyTask { +public: + /// Constructor + GEMTnPEfficiencyTask(const edm::ParameterSet& config); + + /// Destructor + ~GEMTnPEfficiencyTask() override; + +protected: + std::string topFolder() const override; + + void bookHistograms(DQMStore::IBooker& iBooker, edm::Run const& run, edm::EventSetup const& context) override; + + /// Analyze + void analyze(const edm::Event& event, const edm::EventSetup& context) override; +}; + +GEMTnPEfficiencyTask::GEMTnPEfficiencyTask(const edm::ParameterSet& config) : BaseTnPEfficiencyTask(config) { + LogTrace("DQMOffline|MuonDPG|GEMTnPEfficiencyTask") << "[GEMTnPEfficiencyTask]: Constructor" << std::endl; +} + +GEMTnPEfficiencyTask::~GEMTnPEfficiencyTask() { + LogTrace("DQMOffline|MuonDPG|GEMTnPEfficiencyTask") + << "[GEMTnPEfficiencyTask]: analyzed " << m_nEvents << " events" << std::endl; +} + +void GEMTnPEfficiencyTask::bookHistograms(DQMStore::IBooker& iBooker, + edm::Run const& run, + edm::EventSetup const& context) { + BaseTnPEfficiencyTask::bookHistograms(iBooker, run, context); + + LogTrace("DQMOffline|MuonDPG|GEMTnPEfficiencyTask") << "[GEMTnPEfficiencyTask]: bookHistograms" << std::endl; + + auto baseDir = topFolder() + "Task/"; + iBooker.setCurrentFolder(baseDir); + + MonitorElement* me_GEM_pass_Ch_region = iBooker.book2D("GEM_nPassingProbe_Ch_region", "GEM_nPassingProbe_Ch_region", 2, -1.5, 1.5, 37, 0, 37); + MonitorElement* me_GEM_fail_Ch_region = iBooker.book2D("GEM_nFailingProbe_Ch_region", "GEM_nFailingProbe_Ch_region", 2, -1.5, 1.5, 37, 0, 37); + MonitorElement* me_GEM_pass_Ch_region_GE1 = iBooker.book2D("GEM_nPassingProbe_Ch_region_GE1", "GEM_nPassingProbe_Ch_region_GE1", 4, 0, 4, 37, 0, 37); + MonitorElement* me_GEM_fail_Ch_region_GE1 = iBooker.book2D("GEM_nFailingProbe_Ch_region_GE1", "GEM_nFailingProbe_Ch_region_GE1", 4, 0, 4, 37, 0, 37); + MonitorElement* me_GEM_pass_Ch_region_GE1_NoL = iBooker.book2D("GEM_nPassingProbe_Ch_region_GE1_NoL", "GEM_nPassingProbe_Ch_region_GE1_NoL", 2, 0, 2, 37, 0, 37); + MonitorElement* me_GEM_fail_Ch_region_GE1_NoL = iBooker.book2D("GEM_nFailingProbe_Ch_region_GE1_NoL", "GEM_nFailingProbe_Ch_region_GE1_NoL", 2, 0, 2, 37, 0, 37); + MonitorElement* me_GEM_pass_Ch_eta = iBooker.book2D("GEM_nPassingProbe_Ch_eta", "GEM_nPassingProbe_Ch_eta", 24, -2.4, 2.4, 37, 0, 37); + MonitorElement* me_GEM_fail_Ch_eta = iBooker.book2D("GEM_nFailingProbe_Ch_eta", "GEM_nFailingProbe_Ch_eta", 24, -2.4, 2.4, 37, 0, 37); + MonitorElement* me_GEM_pass_Ch_phi = iBooker.book2D("GEM_nPassingProbe_Ch_phi", "GEM_nPassingProbe_Ch_phi", 20, -TMath::Pi(), TMath::Pi(), 37, 0, 37); + MonitorElement* me_GEM_fail_Ch_phi = iBooker.book2D("GEM_nFailingProbe_Ch_phi", "GEM_nFailingProbe_Ch_phi", 20, -TMath::Pi(), TMath::Pi(), 37, 0, 37); + MonitorElement* me_GEM_pass_allCh_1D = iBooker.book1D("GEM_nPassingProbe_allCh_1D", "GEM_nPassingProbe_allCh_1D", 2, -1.5, 1.5); + MonitorElement* me_GEM_fail_allCh_1D = iBooker.book1D("GEM_nFailingProbe_allCh_1D", "GEM_nFailingProbe_allCh_1D", 2, -1.5, 1.5); + MonitorElement* me_GEM_pass_chamber_1D = iBooker.book1D("GEM_nPassingProbe_chamber_1D", "GEM_nPassingProbe_chamber_1D", 37, 0, 37); + MonitorElement* me_GEM_fail_chamber_1D = iBooker.book1D("GEM_nFailingProbe_chamber_1D", "GEM_nFailingProbe_chamber_1D", 37, 0, 37); + MonitorElement* me_GEM_pass_chamber_p1_1D = iBooker.book1D("GEM_nPassingProbe_chamber_p1_1D", "GEM_nPassingProbe_chamber_p1_1D", 37, 0, 37); + MonitorElement* me_GEM_fail_chamber_p1_1D = iBooker.book1D("GEM_nFailingProbe_chamber_p1_1D", "GEM_nFailingProbe_chamber_p1_1D", 37, 0, 37); + MonitorElement* me_GEM_pass_chamber_p2_1D = iBooker.book1D("GEM_nPassingProbe_chamber_p2_1D", "GEM_nPassingProbe_chamber_p2_1D", 37, 0, 37); + MonitorElement* me_GEM_fail_chamber_p2_1D = iBooker.book1D("GEM_nFailingProbe_chamber_p2_1D", "GEM_nFailingProbe_chamber_p2_1D", 37, 0, 37); + MonitorElement* me_GEM_pass_chamber_n1_1D = iBooker.book1D("GEM_nPassingProbe_chamber_n1_1D", "GEM_nPassingProbe_chamber_n1_1D", 37, 0, 37); + MonitorElement* me_GEM_fail_chamber_n1_1D = iBooker.book1D("GEM_nFailingProbe_chamber_n1_1D", "GEM_nFailingProbe_chamber_n1_1D", 37, 0, 37); + MonitorElement* me_GEM_pass_chamber_n2_1D = iBooker.book1D("GEM_nPassingProbe_chamber_n2_1D", "GEM_nPassingProbe_chamber_n2_1D", 37, 0, 37); + MonitorElement* me_GEM_fail_chamber_n2_1D = iBooker.book1D("GEM_nFailingProbe_chamber_n2_1D", "GEM_nFailingProbe_chamber_n2_1D", 37, 0, 37); + // + MonitorElement* me_GEM_pass_pt_1D = iBooker.book1D("GEM_nPassingProbe_pt_1D", "GEM_nPassingProbe_pt_1D", 20, 0, 100); + MonitorElement* me_GEM_fail_pt_1D = iBooker.book1D("GEM_nFailingProbe_pt_1D", "GEM_nFailingProbe_pt_1D", 20, 0, 100); + MonitorElement* me_GEM_pass_eta_1D = iBooker.book1D("GEM_nPassingProbe_eta_1D", "GEM_nPassingProbe_eta_1D", 48, -2.4, 2.4); + MonitorElement* me_GEM_fail_eta_1D = iBooker.book1D("GEM_nFailingProbe_eta_1D", "GEM_nFailingProbe_eta_1D", 48, -2.4, 2.4); + MonitorElement* me_GEM_pass_phi_1D = iBooker.book1D("GEM_nPassingProbe_phi_1D", "GEM_nPassingProbe_phi_1D", 20, -TMath::Pi(), TMath::Pi()); + MonitorElement* me_GEM_fail_phi_1D = iBooker.book1D("GEM_nFailingProbe_phi_1D", "GEM_nFailingProbe_phi_1D", 20, -TMath::Pi(), TMath::Pi()); +/// + MonitorElement* me_GEM_pass_pt_p1_1D = iBooker.book1D("GEM_nPassingProbe_pt_p1_1D", "GEM_nPassingProbe_pt_p1_1D", 20, 0, 100); + MonitorElement* me_GEM_fail_pt_p1_1D = iBooker.book1D("GEM_nFailingProbe_pt_p1_1D", "GEM_nFailingProbe_pt_p1_1D", 20, 0, 100); + MonitorElement* me_GEM_pass_eta_p1_1D = iBooker.book1D("GEM_nPassingProbe_eta_p1_1D", "GEM_nPassingProbe_eta_p1_1D", 48, -2.4, 2.4); + MonitorElement* me_GEM_fail_eta_p1_1D = iBooker.book1D("GEM_nFailingProbe_eta_p1_1D", "GEM_nFailingProbe_eta_p1_1D", 48, -2.4, 2.4); + MonitorElement* me_GEM_pass_phi_p1_1D = iBooker.book1D("GEM_nPassingProbe_phi_p1_1D", "GEM_nPassingProbe_phi_p1_1D", 20, -TMath::Pi(), TMath::Pi()); + MonitorElement* me_GEM_fail_phi_p1_1D = iBooker.book1D("GEM_nFailingProbe_phi_p1_1D", "GEM_nFailingProbe_phi_p1_1D", 20, -TMath::Pi(), TMath::Pi()); + MonitorElement* me_GEM_pass_pt_p2_1D = iBooker.book1D("GEM_nPassingProbe_pt_p2_1D", "GEM_nPassingProbe_pt_p2_1D", 20, 0, 100); + MonitorElement* me_GEM_fail_pt_p2_1D = iBooker.book1D("GEM_nFailingProbe_pt_p2_1D", "GEM_nFailingProbe_pt_p2_1D", 20, 0, 100); + MonitorElement* me_GEM_pass_eta_p2_1D = iBooker.book1D("GEM_nPassingProbe_eta_p2_1D", "GEM_nPassingProbe_eta_p2_1D", 48, -2.4, 2.4); + MonitorElement* me_GEM_fail_eta_p2_1D = iBooker.book1D("GEM_nFailingProbe_eta_p2_1D", "GEM_nFailingProbe_eta_p2_1D", 48, -2.4, 2.4); + MonitorElement* me_GEM_pass_phi_p2_1D = iBooker.book1D("GEM_nPassingProbe_phi_p2_1D", "GEM_nPassingProbe_phi_p2_1D", 20, -TMath::Pi(), TMath::Pi()); + MonitorElement* me_GEM_fail_phi_p2_1D = iBooker.book1D("GEM_nFailingProbe_phi_p2_1D", "GEM_nFailingProbe_phi_p2_1D", 20, -TMath::Pi(), TMath::Pi()); + MonitorElement* me_GEM_pass_pt_n1_1D = iBooker.book1D("GEM_nPassingProbe_pt_n1_1D", "GEM_nPassingProbe_pt_n1_1D", 20, 0, 100); + MonitorElement* me_GEM_fail_pt_n1_1D = iBooker.book1D("GEM_nFailingProbe_pt_n1_1D", "GEM_nFailingProbe_pt_n1_1D", 20, 0, 100); + MonitorElement* me_GEM_pass_eta_n1_1D = iBooker.book1D("GEM_nPassingProbe_eta_n1_1D", "GEM_nPassingProbe_eta_n1_1D", 48, -2.4, 2.4); + MonitorElement* me_GEM_fail_eta_n1_1D = iBooker.book1D("GEM_nFailingProbe_eta_n1_1D", "GEM_nFailingProbe_eta_n1_1D", 48, -2.4, 2.4); + MonitorElement* me_GEM_pass_phi_n1_1D = iBooker.book1D("GEM_nPassingProbe_phi_n1_1D", "GEM_nPassingProbe_phi_n1_1D", 20, -TMath::Pi(), TMath::Pi()); + MonitorElement* me_GEM_fail_phi_n1_1D = iBooker.book1D("GEM_nFailingProbe_phi_n1_1D", "GEM_nFailingProbe_phi_n1_1D", 20, -TMath::Pi(), TMath::Pi()); + MonitorElement* me_GEM_pass_pt_n2_1D = iBooker.book1D("GEM_nPassingProbe_pt_n2_1D", "GEM_nPassingProbe_pt_n2_1D", 20, 0, 100); + MonitorElement* me_GEM_fail_pt_n2_1D = iBooker.book1D("GEM_nFailingProbe_pt_n2_1D", "GEM_nFailingProbe_pt_n2_1D", 20, 0, 100); + MonitorElement* me_GEM_pass_eta_n2_1D = iBooker.book1D("GEM_nPassingProbe_eta_n2_1D", "GEM_nPassingProbe_eta_n2_1D", 48, -2.4, 2.4); + MonitorElement* me_GEM_fail_eta_n2_1D = iBooker.book1D("GEM_nFailingProbe_eta_n2_1D", "GEM_nFailingProbe_eta_n2_1D", 48, -2.4, 2.4); + MonitorElement* me_GEM_pass_phi_n2_1D = iBooker.book1D("GEM_nPassingProbe_phi_n2_1D", "GEM_nPassingProbe_phi_n2_1D", 20, -TMath::Pi(), TMath::Pi()); + MonitorElement* me_GEM_fail_phi_n2_1D = iBooker.book1D("GEM_nFailingProbe_phi_n2_1D", "GEM_nFailingProbe_phi_n2_1D", 20, -TMath::Pi(), TMath::Pi()); +//// + MonitorElement* me_ME0_pass_chamber_1D = iBooker.book1D("ME0_nPassingProbe_chamber_1D", "ME0_nPassingProbe_chamber_1D", 19, 0, 19); + MonitorElement* me_ME0_fail_chamber_1D = iBooker.book1D("ME0_nFailingProbe_chamber_1D", "ME0_nFailingProbe_chamber_1D", 19, 0, 19); + MonitorElement* me_GEM_pass_Ch_region_layer_phase2 = iBooker.book2D("GEM_nPassingProbe_Ch_region_layer_phase2", "GEM_nPassingProbe_Ch_region_layer_phase2", 10, 0, 10, 37, 0, 37); + MonitorElement* me_GEM_fail_Ch_region_layer_phase2 = iBooker.book2D("GEM_nFailingProbe_Ch_region_layer_phase2", "GEM_nFailingProbe_Ch_region_layer_phase2", 10, 0, 10, 37, 0, 37); + + + me_GEM_pass_allCh_1D->setBinLabel(1, "GE-11", 1); + me_GEM_pass_allCh_1D->setBinLabel(2, "GE11", 1); + me_GEM_pass_allCh_1D->setAxisTitle("Number of passing probes", 2); + + me_GEM_fail_allCh_1D->setBinLabel(1, "GE-11", 1); + me_GEM_fail_allCh_1D->setBinLabel(2, "GE11", 1); + me_GEM_fail_allCh_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_pass_chamber_1D->setAxisTitle("Chamber", 1); + me_GEM_pass_chamber_1D->setAxisTitle("Number of passing probes", 2); + me_GEM_fail_chamber_1D->setAxisTitle("Chamber", 1); + me_GEM_fail_chamber_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_pass_chamber_p1_1D->setAxisTitle("Chamber", 1); + me_GEM_pass_chamber_p1_1D->setAxisTitle("Number of passing probes", 2); + me_GEM_fail_chamber_p1_1D->setAxisTitle("Chamber", 1); + me_GEM_fail_chamber_p1_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_pass_chamber_p2_1D->setAxisTitle("Chamber", 1); + me_GEM_pass_chamber_p2_1D->setAxisTitle("Number of passing probes", 2); + me_GEM_fail_chamber_p2_1D->setAxisTitle("Chamber", 1); + me_GEM_fail_chamber_p2_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_pass_chamber_n1_1D->setAxisTitle("Chamber", 1); + me_GEM_pass_chamber_n1_1D->setAxisTitle("Number of passing probes", 2); + me_GEM_fail_chamber_n1_1D->setAxisTitle("Chamber", 1); + me_GEM_fail_chamber_n1_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_pass_chamber_n2_1D->setAxisTitle("Chamber", 1); + me_GEM_pass_chamber_n2_1D->setAxisTitle("Number of passing probes", 2); + me_GEM_fail_chamber_n2_1D->setAxisTitle("Chamber", 1); + me_GEM_fail_chamber_n2_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_pass_pt_1D->setAxisTitle("P_{T}", 1); + me_GEM_pass_pt_1D->setAxisTitle("Number of passing probes", 2); + me_GEM_fail_pt_1D->setAxisTitle("P_{T}", 1); + me_GEM_fail_pt_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_pass_eta_1D->setAxisTitle("#eta", 1); + me_GEM_pass_eta_1D->setAxisTitle("Number of passing probes", 2); + me_GEM_fail_eta_1D->setAxisTitle("#eta", 1); + me_GEM_fail_eta_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_pass_phi_1D->setAxisTitle("#phi", 1); + me_GEM_pass_phi_1D->setAxisTitle("Number of passing probes", 2); + me_GEM_fail_phi_1D->setAxisTitle("#phi", 1); + me_GEM_fail_phi_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_pass_pt_p1_1D->setAxisTitle("P_{T}", 1); + me_GEM_pass_pt_p1_1D->setAxisTitle("Number of passing probes", 2); + me_GEM_fail_pt_p1_1D->setAxisTitle("P_{T}", 1); + me_GEM_fail_pt_p1_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_pass_eta_p1_1D->setAxisTitle("#eta", 1); + me_GEM_pass_eta_p1_1D->setAxisTitle("Number of passing probes", 2); + me_GEM_fail_eta_p1_1D->setAxisTitle("#eta", 1); + me_GEM_fail_eta_p1_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_pass_phi_p1_1D->setAxisTitle("#phi", 1); + me_GEM_pass_phi_p1_1D->setAxisTitle("Number of passing probes", 2); + me_GEM_fail_phi_p1_1D->setAxisTitle("#phi", 1); + me_GEM_fail_phi_p1_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_pass_pt_p2_1D->setAxisTitle("P_{T}", 1); + me_GEM_pass_pt_p2_1D->setAxisTitle("Number of passing probes", 2); + me_GEM_fail_pt_p2_1D->setAxisTitle("P_{T}", 1); + me_GEM_fail_pt_p2_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_pass_eta_p2_1D->setAxisTitle("#eta", 1); + me_GEM_pass_eta_p2_1D->setAxisTitle("Number of passing probes", 2); + me_GEM_fail_eta_p2_1D->setAxisTitle("#eta", 1); + me_GEM_fail_eta_p2_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_pass_phi_p2_1D->setAxisTitle("#phi", 1); + me_GEM_pass_phi_p2_1D->setAxisTitle("Number of passing probes", 2); + me_GEM_fail_phi_p2_1D->setAxisTitle("#phi", 1); + me_GEM_fail_phi_p2_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_pass_pt_n1_1D->setAxisTitle("P_{T}", 1); + me_GEM_pass_pt_n1_1D->setAxisTitle("Number of passing probes", 2); + me_GEM_fail_pt_n1_1D->setAxisTitle("P_{T}", 1); + me_GEM_fail_pt_n1_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_pass_eta_n1_1D->setAxisTitle("#eta", 1); + me_GEM_pass_eta_n1_1D->setAxisTitle("Number of passing probes", 2); + me_GEM_fail_eta_n1_1D->setAxisTitle("#eta", 1); + me_GEM_fail_eta_n1_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_pass_phi_n1_1D->setAxisTitle("#phi", 1); + me_GEM_pass_phi_n1_1D->setAxisTitle("Number of passing probes", 2); + me_GEM_fail_phi_n1_1D->setAxisTitle("#phi", 1); + me_GEM_fail_phi_n1_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_pass_pt_n2_1D->setAxisTitle("P_{T}", 1); + me_GEM_pass_pt_n2_1D->setAxisTitle("Number of passing probes", 2); + me_GEM_fail_pt_n2_1D->setAxisTitle("P_{T}", 1); + me_GEM_fail_pt_n2_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_pass_eta_n2_1D->setAxisTitle("#eta", 1); + me_GEM_pass_eta_n2_1D->setAxisTitle("Number of passing probes", 2); + me_GEM_fail_eta_n2_1D->setAxisTitle("#eta", 1); + me_GEM_fail_eta_n2_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_pass_phi_n2_1D->setAxisTitle("#phi", 1); + me_GEM_pass_phi_n2_1D->setAxisTitle("Number of passing probes", 2); + me_GEM_fail_phi_n2_1D->setAxisTitle("#phi", 1); + me_GEM_fail_phi_n2_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_fail_Ch_region->setBinLabel(1, "GE-11", 1); + me_GEM_fail_Ch_region->setBinLabel(2, "GE11", 1); + for (int i=1; i<38; ++i){ + me_GEM_fail_Ch_region->setBinLabel(i, std::to_string(i-1), 2); + } + me_GEM_fail_Ch_region->setAxisTitle("Chamber", 2); + me_GEM_fail_Ch_region->setAxisTitle("Number of failing probes", 3); + + me_GEM_pass_Ch_region->setBinLabel(1, "GE-11", 1); + me_GEM_pass_Ch_region->setBinLabel(2, "GE11", 1); + for (int i=1; i<38; ++i){ + me_GEM_pass_Ch_region->setBinLabel(i, std::to_string(i-1), 2); + } + me_GEM_pass_Ch_region->setAxisTitle("Chamber", 2); + me_GEM_pass_Ch_region->setAxisTitle("Number of passing probes", 3); + + me_GEM_fail_Ch_region_GE1->setBinLabel(1, "GE-1/1_L2", 1); + me_GEM_fail_Ch_region_GE1->setBinLabel(2, "GE-1/1_L1", 1); + me_GEM_fail_Ch_region_GE1->setBinLabel(3, "GE1/1_L1", 1); + me_GEM_fail_Ch_region_GE1->setBinLabel(4, "GE1/1_L2", 1); + for (int i=1; i<38; ++i){ + me_GEM_fail_Ch_region_GE1->setBinLabel(i, std::to_string(i-1), 2); + } + me_GEM_fail_Ch_region_GE1->setAxisTitle("Chamber", 2); + me_GEM_fail_Ch_region_GE1->setAxisTitle("Number of passing probes", 3); + + me_GEM_pass_Ch_region_GE1->setBinLabel(1, "GE-1/1_L2", 1); + me_GEM_pass_Ch_region_GE1->setBinLabel(2, "GE-1/1_L1", 1); + me_GEM_pass_Ch_region_GE1->setBinLabel(3, "GE1/1_L1", 1); + me_GEM_pass_Ch_region_GE1->setBinLabel(4, "GE1/1_L2", 1); + for (int i=1; i<38; ++i){ + me_GEM_pass_Ch_region_GE1->setBinLabel(i, std::to_string(i-1), 2); + } + me_GEM_pass_Ch_region_GE1->setAxisTitle("Chamber", 2); + me_GEM_pass_Ch_region_GE1->setAxisTitle("Number of passing probes", 3); + + me_GEM_fail_Ch_region_GE1_NoL->setBinLabel(1, "GE-1", 1); + me_GEM_fail_Ch_region_GE1_NoL->setBinLabel(2, "GE+1", 1); + for (int i=1; i<38; ++i){ + me_GEM_fail_Ch_region_GE1_NoL->setBinLabel(i, std::to_string(i-1), 2); + } + me_GEM_fail_Ch_region_GE1_NoL->setAxisTitle("Chamber", 2); + me_GEM_fail_Ch_region_GE1_NoL->setAxisTitle("Number of passing probes", 3); + + me_GEM_pass_Ch_region_GE1_NoL->setBinLabel(1, "GE-1", 1); + me_GEM_pass_Ch_region_GE1_NoL->setBinLabel(2, "GE+1", 1); + for (int i=1; i<38; ++i){ + me_GEM_pass_Ch_region_GE1_NoL->setBinLabel(i, std::to_string(i-1), 2); + } + me_GEM_pass_Ch_region_GE1_NoL->setAxisTitle("Chamber", 2); + me_GEM_pass_Ch_region_GE1_NoL->setAxisTitle("Number of passing probes", 3); + + for (int i=1; i<38; ++i){ + me_GEM_fail_Ch_eta->setBinLabel(i, std::to_string(i-1), 2); + } + me_GEM_fail_Ch_eta->setAxisTitle("#eta", 1); + me_GEM_fail_Ch_eta->setAxisTitle("Chamber", 2); + me_GEM_fail_Ch_eta->setAxisTitle("Number of failing probes", 3); + + for (int i=1; i<38; ++i){ + me_GEM_pass_Ch_eta->setBinLabel(i, std::to_string(i-1), 2); + } + me_GEM_pass_Ch_eta->setAxisTitle("#eta", 1); + me_GEM_pass_Ch_eta->setAxisTitle("Chamber", 2); + me_GEM_pass_Ch_eta->setAxisTitle("Number of passing probes", 3); + + for (int i=1; i<38; ++i){ + me_GEM_fail_Ch_phi->setBinLabel(i, std::to_string(i-1), 2); + } + me_GEM_fail_Ch_phi->setAxisTitle("#phi", 1); + me_GEM_fail_Ch_phi->setAxisTitle("Chamber", 2); + me_GEM_fail_Ch_phi->setAxisTitle("Number of failing probes", 3); + + for (int i=1; i<38; ++i){ + me_GEM_pass_Ch_phi->setBinLabel(i, std::to_string(i-1), 2); + } + me_GEM_pass_Ch_phi->setAxisTitle("#phi", 1); + me_GEM_pass_Ch_phi->setAxisTitle("Chamber", 2); + me_GEM_pass_Ch_phi->setAxisTitle("Number of passing probes", 3); + + for (int i=1; i<20; ++i){ + me_ME0_pass_chamber_1D->setBinLabel(i, std::to_string(i-1), 1); + } + me_ME0_pass_chamber_1D->setAxisTitle("Chamber", 1); + me_ME0_pass_chamber_1D->setAxisTitle("Number of passing probes", 2); + for (int i=1; i<20; ++i){ + me_ME0_fail_chamber_1D->setBinLabel(i, std::to_string(i-1), 1); + } + me_ME0_fail_chamber_1D->setAxisTitle("Chamber", 1); + me_ME0_fail_chamber_1D->setAxisTitle("Number of failing probes", 2); + + me_GEM_fail_Ch_region_layer_phase2->setBinLabel(1, "GE-2/1_L2", 1); + me_GEM_fail_Ch_region_layer_phase2->setBinLabel(2, "GE-2/1_L1", 1); + me_GEM_fail_Ch_region_layer_phase2->setBinLabel(3, "GE-1/1_L2", 1); + me_GEM_fail_Ch_region_layer_phase2->setBinLabel(4, "GE-1/1_L1", 1); + me_GEM_fail_Ch_region_layer_phase2->setBinLabel(5, "GE0-1", 1); + me_GEM_fail_Ch_region_layer_phase2->setBinLabel(6, "GE0+1", 1); + me_GEM_fail_Ch_region_layer_phase2->setBinLabel(7, "GE1/1_L1", 1); + me_GEM_fail_Ch_region_layer_phase2->setBinLabel(8, "GE1/1_L2", 1); + me_GEM_fail_Ch_region_layer_phase2->setBinLabel(9, "GE2/1_L1", 1); + me_GEM_fail_Ch_region_layer_phase2->setBinLabel(10, "GE2/1_L2", 1); + for (int i=1; i<38; ++i){ + me_GEM_fail_Ch_region_layer_phase2->setBinLabel(i, std::to_string(i-1), 2); + } + me_GEM_fail_Ch_region_layer_phase2->setAxisTitle("Chamber", 2); + me_GEM_fail_Ch_region_layer_phase2->setAxisTitle("Number of passing probes", 3); + + me_GEM_pass_Ch_region_layer_phase2->setBinLabel(1, "GE-2/1_L2", 1); + me_GEM_pass_Ch_region_layer_phase2->setBinLabel(2, "GE-2/1_L1", 1); + me_GEM_pass_Ch_region_layer_phase2->setBinLabel(3, "GE-1/1_L2", 1); + me_GEM_pass_Ch_region_layer_phase2->setBinLabel(4, "GE-1/1_L1", 1); + me_GEM_pass_Ch_region_layer_phase2->setBinLabel(5, "GE0-1", 1); + me_GEM_pass_Ch_region_layer_phase2->setBinLabel(6, "GE0+1", 1); + me_GEM_pass_Ch_region_layer_phase2->setBinLabel(7, "GE1/1_L1", 1); + me_GEM_pass_Ch_region_layer_phase2->setBinLabel(8, "GE1/1_L2", 1); + me_GEM_pass_Ch_region_layer_phase2->setBinLabel(9, "GE2/1_L1", 1); + me_GEM_pass_Ch_region_layer_phase2->setBinLabel(10, "GE2/1_L2", 1); + + for (int i=1; i<38; ++i){ + me_GEM_pass_Ch_region_layer_phase2->setBinLabel(i, std::to_string(i-1), 2); + } + me_GEM_pass_Ch_region_layer_phase2->setAxisTitle("Chamber", 2); + me_GEM_pass_Ch_region_layer_phase2->setAxisTitle("Number of passing probes", 3); + + m_histos["GEM_nPassingProbe_Ch_region"] = me_GEM_pass_Ch_region; + m_histos["GEM_nFailingProbe_Ch_region"] = me_GEM_fail_Ch_region; + m_histos["GEM_nPassingProbe_Ch_region_GE1"] = me_GEM_pass_Ch_region_GE1; + m_histos["GEM_nFailingProbe_Ch_region_GE1"] = me_GEM_fail_Ch_region_GE1; + m_histos["GEM_nPassingProbe_Ch_region_GE1_NoL"] = me_GEM_pass_Ch_region_GE1_NoL; + m_histos["GEM_nFailingProbe_Ch_region_GE1_NoL"] = me_GEM_fail_Ch_region_GE1_NoL; + m_histos["GEM_nPassingProbe_Ch_eta"] = me_GEM_pass_Ch_eta; + m_histos["GEM_nFailingProbe_Ch_eta"] = me_GEM_fail_Ch_eta; + m_histos["GEM_nPassingProbe_Ch_phi"] = me_GEM_pass_Ch_phi; + m_histos["GEM_nFailingProbe_Ch_phi"] = me_GEM_fail_Ch_phi; + m_histos["GEM_nPassingProbe_allCh_1D"] = me_GEM_pass_allCh_1D; + m_histos["GEM_nFailingProbe_allCh_1D"] = me_GEM_fail_allCh_1D; + m_histos["GEM_nPassingProbe_chamber_1D"] = me_GEM_pass_chamber_1D; + m_histos["GEM_nFailingProbe_chamber_1D"] = me_GEM_fail_chamber_1D; + m_histos["GEM_nPassingProbe_chamber_p1_1D"] = me_GEM_pass_chamber_p1_1D; + m_histos["GEM_nFailingProbe_chamber_p1_1D"] = me_GEM_fail_chamber_p1_1D; + m_histos["GEM_nPassingProbe_chamber_p2_1D"] = me_GEM_pass_chamber_p2_1D; + m_histos["GEM_nFailingProbe_chamber_p2_1D"] = me_GEM_fail_chamber_p2_1D; + m_histos["GEM_nPassingProbe_chamber_n1_1D"] = me_GEM_pass_chamber_n1_1D; + m_histos["GEM_nFailingProbe_chamber_n1_1D"] = me_GEM_fail_chamber_n1_1D; + m_histos["GEM_nPassingProbe_chamber_n2_1D"] = me_GEM_pass_chamber_n2_1D; + m_histos["GEM_nFailingProbe_chamber_n2_1D"] = me_GEM_fail_chamber_n2_1D; + m_histos["GEM_nPassingProbe_pt_1D"] = me_GEM_pass_pt_1D; + m_histos["GEM_nFailingProbe_pt_1D"] = me_GEM_fail_pt_1D; + m_histos["GEM_nPassingProbe_eta_1D"] = me_GEM_pass_eta_1D; + m_histos["GEM_nFailingProbe_eta_1D"] = me_GEM_fail_eta_1D; + m_histos["GEM_nPassingProbe_phi_1D"] = me_GEM_pass_phi_1D; + m_histos["GEM_nFailingProbe_phi_1D"] = me_GEM_fail_phi_1D; + m_histos["GEM_nPassingProbe_pt_p1_1D"] = me_GEM_pass_pt_p1_1D; + m_histos["GEM_nFailingProbe_pt_p1_1D"] = me_GEM_fail_pt_p1_1D; + m_histos["GEM_nPassingProbe_eta_p1_1D"] = me_GEM_pass_eta_p1_1D; + m_histos["GEM_nFailingProbe_eta_p1_1D"] = me_GEM_fail_eta_p1_1D; + m_histos["GEM_nPassingProbe_phi_p1_1D"] = me_GEM_pass_phi_p1_1D; + m_histos["GEM_nFailingProbe_phi_p1_1D"] = me_GEM_fail_phi_p1_1D; + m_histos["GEM_nPassingProbe_pt_p2_1D"] = me_GEM_pass_pt_p2_1D; + m_histos["GEM_nFailingProbe_pt_p2_1D"] = me_GEM_fail_pt_p2_1D; + m_histos["GEM_nPassingProbe_eta_p2_1D"] = me_GEM_pass_eta_p2_1D; + m_histos["GEM_nFailingProbe_eta_p2_1D"] = me_GEM_fail_eta_p2_1D; + m_histos["GEM_nPassingProbe_phi_p2_1D"] = me_GEM_pass_phi_p2_1D; + m_histos["GEM_nFailingProbe_phi_p2_1D"] = me_GEM_fail_phi_p2_1D; + m_histos["GEM_nPassingProbe_pt_n1_1D"] = me_GEM_pass_pt_n1_1D; + m_histos["GEM_nFailingProbe_pt_n1_1D"] = me_GEM_fail_pt_n1_1D; + m_histos["GEM_nPassingProbe_eta_n1_1D"] = me_GEM_pass_eta_n1_1D; + m_histos["GEM_nFailingProbe_eta_n1_1D"] = me_GEM_fail_eta_n1_1D; + m_histos["GEM_nPassingProbe_phi_n1_1D"] = me_GEM_pass_phi_n1_1D; + m_histos["GEM_nFailingProbe_phi_n1_1D"] = me_GEM_fail_phi_n1_1D; + m_histos["GEM_nPassingProbe_pt_n2_1D"] = me_GEM_pass_pt_n2_1D; + m_histos["GEM_nFailingProbe_pt_n2_1D"] = me_GEM_fail_pt_n2_1D; + m_histos["GEM_nPassingProbe_eta_n2_1D"] = me_GEM_pass_eta_n2_1D; + m_histos["GEM_nFailingProbe_eta_n2_1D"] = me_GEM_fail_eta_n2_1D; + m_histos["GEM_nPassingProbe_phi_n2_1D"] = me_GEM_pass_phi_n2_1D; + m_histos["GEM_nFailingProbe_phi_n2_1D"] = me_GEM_fail_phi_n2_1D; + m_histos["ME0_nPassingProbe_chamber_1D"] = me_ME0_pass_chamber_1D; + m_histos["ME0_nFailingProbe_chamber_1D"] = me_ME0_fail_chamber_1D; + m_histos["GEM_nPassingProbe_Ch_region_layer_phase2"] = me_GEM_pass_Ch_region_layer_phase2; + m_histos["GEM_nFailingProbe_Ch_region_layer_phase2"] = me_GEM_fail_Ch_region_layer_phase2; + + std::string baseDir_ = topFolder() + "/detailed/"; + iBooker.setCurrentFolder(baseDir_); + m_histos["GEMhit_dx"] = iBooker.book1D("GEMhit_dx", "GEMhit_dx;probe dx [cm];Events", 100, 0., 10.); + m_histos["GEMseg_dx"] = iBooker.book1D("GEMseg_dx", "GEMseg_dx;probe dx [cm];Events", 100, 0., 20.); + + m_histos["GEMhit_x"] = iBooker.book1D("GEMhit_x", "GEMhit_x;probe x [cm];Events", 100, -10., 10.); + m_histos["GEMhit_x_GE2"] = iBooker.book1D("GEMhit_x_GE2", "GEMhit_x;probe x [cm];Events", 100, -10., 10.); + m_histos["Cham_x"] = iBooker.book1D("Cham_x", "Cham_x;probe x [cm];Events", 100, -10., 10.); + m_histos["Cham_x_GE2"] = iBooker.book1D("Cham_x_GE2", "Cham_x;probe x [cm];Events", 100, -10., 10.); + + m_histos["GEMhit_dx_GE2"] = iBooker.book1D("GEMhit_dx_GE2", "GEMhit_dx;probe dx [cm];Events", 100, 0., 10.); +} + +void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetup& context) { + BaseTnPEfficiencyTask::analyze(event, context); + + edm::Handle muons; + event.getByToken(m_muToken, muons); + + //GEM variables + std::vector> probe_coll_GEM_region; + std::vector> probe_coll_GEM_ring; + std::vector> probe_coll_GEM_lay; + std::vector> probe_coll_GEM_chamber; + std::vector> probe_coll_GEM_pt; + std::vector> probe_coll_GEM_eta; + std::vector> probe_coll_GEM_phi; + std::vector> probe_coll_GEM_sta; + std::vector> probe_coll_GEM_dx; + std::vector probe_coll_GEM_staMatch; + + //ME0 variables + std::vector> probe_coll_ME0_region; + std::vector> probe_coll_ME0_roll; + std::vector> probe_coll_ME0_lay; + std::vector> probe_coll_ME0_chamber; + std::vector> probe_coll_ME0_pt; + std::vector> probe_coll_ME0_eta; + std::vector> probe_coll_ME0_phi; + std::vector> probe_coll_ME0_sta; + std::vector> probe_coll_ME0_dx; + std::vector probe_coll_ME0_staMatch; + + std::vector probe_indices; + if (!m_probeIndices.empty()) + probe_indices = m_probeIndices.back(); + + //Fill probe dx + subdetector coordinates + for (const auto i : probe_indices) { + //GEM variables + std::vector probe_GEM_region; + std::vector probe_GEM_ring; + std::vector probe_GEM_sta; + std::vector probe_GEM_lay; + std::vector probe_GEM_chamber; + std::vector probe_GEM_pt; + std::vector probe_GEM_eta; + std::vector probe_GEM_phi; + std::vector probe_GEM_dx; + //std::vector probe_GEM_dx_seg; + uint8_t GEM_stationMatching = 0; + //ME0 variables + std::vector probe_ME0_region; + std::vector probe_ME0_roll; + std::vector probe_ME0_sta; + std::vector probe_ME0_lay; + std::vector probe_ME0_chamber; + std::vector probe_ME0_pt; + std::vector probe_ME0_eta; + std::vector probe_ME0_phi; + std::vector probe_ME0_dx; + uint8_t ME0_stationMatching = 0; + + float gem_matched = false; // fill detailed plots only for probes matching GEM + + for (const auto& chambMatch : (*muons).at(i).matches()) { + // look in GEMs + if (chambMatch.detector() == MuonSubdetId::GEM) { + if (chambMatch.edgeX < m_borderCut && chambMatch.edgeY < m_borderCut) { + gem_matched = true; //fill detailed plots if at least one GEM match + + GEMDetId chId(chambMatch.id.rawId()); + + int roll = chId.roll(); + int region = chId.region(); + int ring = chId.ring(); + int station = chId.station(); + int layer = chId.layer(); + int chamber = chId.chamber(); + float pt = (*muons).at(i).pt(); + float eta = (*muons).at(i).eta(); + float phi = (*muons).at(i).phi(); + + //reco::MuonSegmentMatch closest_matchedSegment; + reco::MuonGEMHitMatch closest_matchedHit; + double smallestDx = 99999.; + double matched_GEMHit_x = 99999.; + + //for (auto& seg : chambMatch.gemMatches) { + for (auto& gemHit : chambMatch.gemHitMatches) { + float dx = std::abs(chambMatch.x - gemHit.x); + if (dx < smallestDx) { + smallestDx = dx; + closest_matchedHit = gemHit; + matched_GEMHit_x = gemHit.x; + } + } + + ////////// + + reco::MuonSegmentMatch closest_matchedSegment; + double smallestDx_seg = 99999.; + + for (auto& seg : chambMatch.gemMatches) { + float dx_seg = std::abs(chambMatch.x - seg.x); + if (dx_seg < smallestDx_seg) { + smallestDx_seg = dx_seg; + closest_matchedSegment = seg; + } + } + if (m_detailedAnalysis && gem_matched) { + m_histos.find("GEMhit_dx")->second->Fill(smallestDx); + m_histos.find("GEMhit_x")->second->Fill(matched_GEMHit_x); + m_histos.find("Cham_x")->second->Fill(chambMatch.x); + m_histos.find("GEMseg_dx")->second->Fill(smallestDx_seg); + if (station==2) { + m_histos.find("GEMhit_dx_GE2")->second->Fill(smallestDx); + m_histos.find("GEMhit_x_GE2")->second->Fill(matched_GEMHit_x); + m_histos.find("Cham_x_GE2")->second->Fill(chambMatch.x); + } + } + + GEM_stationMatching = GEM_stationMatching | (1 << (station - 1)); + + probe_GEM_region.push_back(region); + probe_GEM_ring.push_back(ring); + probe_GEM_sta.push_back(station); + probe_GEM_lay.push_back(layer); + probe_GEM_chamber.push_back(chamber); + probe_GEM_pt.push_back(pt); + probe_GEM_eta.push_back(eta); + probe_GEM_phi.push_back(phi); + probe_GEM_dx.push_back(smallestDx); + //probe_GEM_dx.push_back(smallestDx_seg); + //probe_GEM_dx_seg.push_back(smallestDx_seg); + + if (station==0) + { + reco::MuonSegmentMatch closest_matchedSegment_ME0; + double smallestDx_ME0 = 99999.; + for (auto& seg : chambMatch.gemMatches) { + float dx = std::abs(chambMatch.x - seg.x); + if (dx < smallestDx_ME0) { + smallestDx_ME0 = dx; + closest_matchedSegment_ME0 = seg; + } + } + ME0_stationMatching = ME0_stationMatching | (1 << (station-1)); + probe_ME0_region.push_back(region); + probe_ME0_roll.push_back(roll); + probe_ME0_sta.push_back(station); + probe_ME0_lay.push_back(layer); + probe_ME0_chamber.push_back(chamber); + probe_ME0_pt.push_back(pt); + probe_ME0_eta.push_back(eta); + probe_ME0_phi.push_back(phi); + probe_ME0_dx.push_back(smallestDx_ME0); + } + } + } else + continue; + } //loop over chamber matches + + //Fill detailed plots + if (m_detailedAnalysis && gem_matched) { + m_histos.find("probeEta")->second->Fill((*muons).at(i).eta()); + m_histos.find("probePhi")->second->Fill((*muons).at(i).phi()); + m_histos.find("probeNumberOfMatchedStations")->second->Fill((*muons).at(i).numberOfMatchedStations()); + m_histos.find("probePt")->second->Fill((*muons).at(i).pt()); + //for(int ii=0; isecond->Fill(probe_GEM_dx[ii]); + // m_histos.find("GEMseg_dx")->second->Fill(probe_GEM_dx_seg[ii]); + //} + } + + //Fill GEM variables + probe_coll_GEM_region.push_back(probe_GEM_region); + probe_coll_GEM_ring.push_back(probe_GEM_ring); + probe_coll_GEM_sta.push_back(probe_GEM_sta); + probe_coll_GEM_lay.push_back(probe_GEM_lay); + probe_coll_GEM_chamber.push_back(probe_GEM_chamber); + probe_coll_GEM_pt.push_back(probe_GEM_pt); + probe_coll_GEM_eta.push_back(probe_GEM_eta); + probe_coll_GEM_phi.push_back(probe_GEM_phi); + probe_coll_GEM_dx.push_back(probe_GEM_dx); + probe_coll_GEM_staMatch.push_back(GEM_stationMatching); + + //Fill ME0 variables + probe_coll_ME0_region.push_back(probe_ME0_region); + probe_coll_ME0_roll.push_back(probe_ME0_roll); + probe_coll_ME0_sta.push_back(probe_ME0_sta); + probe_coll_ME0_lay.push_back(probe_ME0_lay); + probe_coll_ME0_chamber.push_back(probe_ME0_chamber); + probe_coll_ME0_pt.push_back(probe_ME0_pt); + probe_coll_ME0_eta.push_back(probe_ME0_eta); + probe_coll_ME0_phi.push_back(probe_ME0_phi); + probe_coll_ME0_dx.push_back(probe_ME0_dx); + probe_coll_ME0_staMatch.push_back(ME0_stationMatching); + + } //loop over probe collection + + //Loop over probes + for (unsigned i = 0; i < probe_indices.size(); ++i) { + uint8_t GEM_matchPatt = probe_coll_GEM_staMatch.at(i); + uint8_t ME0_matchPatt = probe_coll_ME0_staMatch.at(i); + + //Loop over ME0 matches + unsigned nME0_matches = probe_coll_ME0_region.at(i).size(); + for(unsigned j=0; jsecond->Fill(ME0_chamber); + if (ME0_region<0) + m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(4, ME0_chamber); + else if (ME0_region>0) + m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(5, ME0_chamber); + } + else + { + m_histos.find("ME0_nFailingProbe_chamber_1D")->second->Fill(ME0_chamber); + if (ME0_region<0) + m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(4, ME0_chamber); + else if (ME0_region>0) + m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(5, ME0_chamber); + } + } + } + // + + //Loop over GEM matches + unsigned nGEM_matches = probe_coll_GEM_region.at(i).size(); + for (unsigned j = 0; j < nGEM_matches; ++j) { + + //GEM variables + int GEM_region = probe_coll_GEM_region.at(i).at(j); + int GEM_ring = probe_coll_GEM_ring.at(i).at(j); + int GEM_sta = probe_coll_GEM_sta.at(i).at(j); + int GEM_lay = probe_coll_GEM_lay.at(i).at(j); + int GEM_chamber = probe_coll_GEM_chamber.at(i).at(j); + float GEM_pt = probe_coll_GEM_pt.at(i).at(j); + float GEM_dx = probe_coll_GEM_dx.at(i).at(j); + float GEM_eta = probe_coll_GEM_eta.at(i).at(j); + float GEM_phi = probe_coll_GEM_phi.at(i).at(j); + + + //Fill GEM plots + if ( ((GEM_matchPatt & (1<<(GEM_sta-1))) != 0) && GEM_sta!=0) //avoids 0 station matching + { + if (GEM_dx < m_dxCut) + { + if (GEM_region==1 && GEM_lay==0 && GEM_sta==2 && GEM_chamber==16) continue; //exclude GE2 ch16 of Run3 + m_histos.find("GEM_nPassingProbe_Ch_region")->second->Fill(GEM_region, GEM_chamber); + m_histos.find("GEM_nPassingProbe_Ch_eta")->second->Fill(GEM_eta, GEM_chamber); + m_histos.find("GEM_nPassingProbe_Ch_phi")->second->Fill(GEM_phi, GEM_chamber); + m_histos.find("GEM_nPassingProbe_allCh_1D")->second->Fill(GEM_region); + m_histos.find("GEM_nPassingProbe_chamber_1D")->second->Fill(GEM_chamber); + if(GEM_region<0) + { + if (GEM_sta==2 and GEM_lay==2) + m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(0, GEM_chamber); + if (GEM_sta==2 and GEM_lay==1) + m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(1, GEM_chamber); + if (GEM_sta==1 and GEM_lay==2) + m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(2, GEM_chamber); + if (GEM_sta==1 and GEM_lay==1) + m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(3, GEM_chamber); + } + if(GEM_region>0) + { + if (GEM_sta==1 and GEM_lay==1) + m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(6, GEM_chamber); + if (GEM_sta==1 and GEM_lay==2) + m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(7, GEM_chamber); + if (GEM_sta==2 and GEM_lay==1) + m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(8, GEM_chamber); + if (GEM_sta==2 and GEM_lay==2) + m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(9, GEM_chamber); + } + if(GEM_region==-1 && GEM_sta==1){ + m_histos.find("GEM_nPassingProbe_Ch_region_GE1_NoL")->second->Fill(0, GEM_chamber); + } + else if (GEM_region==1 && GEM_sta==1){ + m_histos.find("GEM_nPassingProbe_Ch_region_GE1_NoL")->second->Fill(1, GEM_chamber); + } + + if(GEM_region==1 && GEM_lay==1 && GEM_sta==1){ + m_histos.find("GEM_nPassingProbe_chamber_p1_1D")->second->Fill(GEM_chamber); + m_histos.find("GEM_nPassingProbe_Ch_region_GE1")->second->Fill(2, GEM_chamber); + m_histos.find("GEM_nPassingProbe_pt_p1_1D")->second->Fill(GEM_pt); + m_histos.find("GEM_nPassingProbe_eta_p1_1D")->second->Fill(GEM_eta); + m_histos.find("GEM_nPassingProbe_phi_p1_1D")->second->Fill(GEM_phi); + } + else if(GEM_region==1 && GEM_lay==2 && GEM_sta==1){ + m_histos.find("GEM_nPassingProbe_chamber_p2_1D")->second->Fill(GEM_chamber); + m_histos.find("GEM_nPassingProbe_Ch_region_GE1")->second->Fill(3, GEM_chamber); + m_histos.find("GEM_nPassingProbe_pt_p2_1D")->second->Fill(GEM_pt); + m_histos.find("GEM_nPassingProbe_eta_p2_1D")->second->Fill(GEM_eta); + m_histos.find("GEM_nPassingProbe_phi_p2_1D")->second->Fill(GEM_phi); + } + else if(GEM_region==-1 && GEM_lay==1 && GEM_sta==1){ + m_histos.find("GEM_nPassingProbe_chamber_n1_1D")->second->Fill(GEM_chamber); + m_histos.find("GEM_nPassingProbe_Ch_region_GE1")->second->Fill(1, GEM_chamber); + m_histos.find("GEM_nPassingProbe_pt_n1_1D")->second->Fill(GEM_pt); + m_histos.find("GEM_nPassingProbe_eta_n1_1D")->second->Fill(GEM_eta); + m_histos.find("GEM_nPassingProbe_phi_n1_1D")->second->Fill(GEM_phi); + } + else if(GEM_region==-1 && GEM_lay==2 && GEM_sta==1){ + m_histos.find("GEM_nPassingProbe_chamber_n2_1D")->second->Fill(GEM_chamber); + m_histos.find("GEM_nPassingProbe_Ch_region_GE1")->second->Fill(0, GEM_chamber); + m_histos.find("GEM_nPassingProbe_pt_n2_1D")->second->Fill(GEM_pt); + m_histos.find("GEM_nPassingProbe_eta_n2_1D")->second->Fill(GEM_eta); + m_histos.find("GEM_nPassingProbe_phi_n2_1D")->second->Fill(GEM_phi); + } + m_histos.find("GEM_nPassingProbe_pt_1D")->second->Fill(GEM_pt); + m_histos.find("GEM_nPassingProbe_eta_1D")->second->Fill(GEM_eta); + m_histos.find("GEM_nPassingProbe_phi_1D")->second->Fill(GEM_phi); + } + else + { + if (GEM_region==1 && GEM_lay==0 && GEM_sta==2 && GEM_chamber==16) continue; + m_histos.find("GEM_nFailingProbe_Ch_region")->second->Fill(GEM_region, GEM_chamber); + m_histos.find("GEM_nFailingProbe_Ch_eta")->second->Fill(GEM_eta, GEM_chamber); + m_histos.find("GEM_nFailingProbe_Ch_phi")->second->Fill(GEM_phi, GEM_chamber); + m_histos.find("GEM_nFailingProbe_allCh_1D")->second->Fill(GEM_region); + m_histos.find("GEM_nFailingProbe_chamber_1D")->second->Fill(GEM_chamber); + if(GEM_region<0) + { + if (GEM_sta==2 and GEM_lay==2) + m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(0, GEM_chamber); + if (GEM_sta==2 and GEM_lay==1) + m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(1, GEM_chamber); + if (GEM_sta==1 and GEM_lay==2) + m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(2, GEM_chamber); + if (GEM_sta==1 and GEM_lay==1) + m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(3, GEM_chamber); + } + if(GEM_region>0) + { + if (GEM_sta==1 and GEM_lay==1) + m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(6, GEM_chamber); + if (GEM_sta==1 and GEM_lay==2) + m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(7, GEM_chamber); + if (GEM_sta==2 and GEM_lay==1) + m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(8, GEM_chamber); + if (GEM_sta==2 and GEM_lay==2) + m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(9, GEM_chamber); + } + if(GEM_region==-1 && GEM_sta==1){ + m_histos.find("GEM_nFailingProbe_Ch_region_GE1_NoL")->second->Fill(0, GEM_chamber); + } + else if (GEM_region==1 && GEM_sta==1){ + m_histos.find("GEM_nFailingProbe_Ch_region_GE1_NoL")->second->Fill(1, GEM_chamber); + } + // + if(GEM_region==1 && GEM_lay==1 && GEM_sta==1){ + m_histos.find("GEM_nFailingProbe_chamber_p1_1D")->second->Fill(GEM_chamber); + m_histos.find("GEM_nFailingProbe_Ch_region_GE1")->second->Fill(2, GEM_chamber); + m_histos.find("GEM_nFailingProbe_pt_p1_1D")->second->Fill(GEM_pt); + m_histos.find("GEM_nFailingProbe_eta_p1_1D")->second->Fill(GEM_eta); + m_histos.find("GEM_nFailingProbe_phi_p1_1D")->second->Fill(GEM_phi); + } + else if(GEM_region==1 && GEM_lay==2 && GEM_sta==1){ + m_histos.find("GEM_nFailingProbe_chamber_p2_1D")->second->Fill(GEM_chamber); + m_histos.find("GEM_nFailingProbe_Ch_region_GE1")->second->Fill(3, GEM_chamber); + m_histos.find("GEM_nFailingProbe_pt_p2_1D")->second->Fill(GEM_pt); + m_histos.find("GEM_nFailingProbe_eta_p2_1D")->second->Fill(GEM_eta); + m_histos.find("GEM_nFailingProbe_phi_p2_1D")->second->Fill(GEM_phi); + } + else if(GEM_region==-1 && GEM_lay==1 && GEM_sta==1){ + m_histos.find("GEM_nFailingProbe_chamber_n1_1D")->second->Fill(GEM_chamber); + m_histos.find("GEM_nFailingProbe_Ch_region_GE1")->second->Fill(1, GEM_chamber); + m_histos.find("GEM_nFailingProbe_pt_n1_1D")->second->Fill(GEM_pt); + m_histos.find("GEM_nFailingProbe_eta_n1_1D")->second->Fill(GEM_eta); + m_histos.find("GEM_nFailingProbe_phi_n1_1D")->second->Fill(GEM_phi); + } + else if(GEM_region==-1 && GEM_lay==2 && GEM_sta==1){ + m_histos.find("GEM_nFailingProbe_chamber_n2_1D")->second->Fill(GEM_chamber); + m_histos.find("GEM_nFailingProbe_Ch_region_GE1")->second->Fill(0, GEM_chamber); + m_histos.find("GEM_nFailingProbe_pt_n2_1D")->second->Fill(GEM_pt); + m_histos.find("GEM_nFailingProbe_eta_n2_1D")->second->Fill(GEM_eta); + m_histos.find("GEM_nFailingProbe_phi_n2_1D")->second->Fill(GEM_phi); + } + m_histos.find("GEM_nFailingProbe_pt_1D")->second->Fill(GEM_pt); + m_histos.find("GEM_nFailingProbe_eta_1D")->second->Fill(GEM_eta); + m_histos.find("GEM_nFailingProbe_phi_1D")->second->Fill(GEM_phi); + } + } + } + } +} + +std::string GEMTnPEfficiencyTask::topFolder() const { return "GEM/Segment_TnP/"; }; + +DEFINE_FWK_MODULE(GEMTnPEfficiencyTask); diff --git a/DQMOffline/MuonDPG/python/gemTnPEfficiencyClient_cfi.py b/DQMOffline/MuonDPG/python/gemTnPEfficiencyClient_cfi.py new file mode 100644 index 0000000000000..f625f5a8a321c --- /dev/null +++ b/DQMOffline/MuonDPG/python/gemTnPEfficiencyClient_cfi.py @@ -0,0 +1,36 @@ +import FWCore.ParameterSet.Config as cms +from DQMServices.Core.DQMEDHarvester import DQMEDHarvester + +gemTnPEfficiencyClient = DQMEDHarvester("TnPEfficiencyClient", + #Histogram names listed as "passProbeHistoName:failProbeHistoName" + subsystem = cms.untracked.string("GEM"), + #histoNames = cms.untracked.vstring("GEM_nPassingProbe_allCh:GEM_nFailingProbe_allCh", + histoNames = cms.untracked.vstring("GEM_nPassingProbe_allCh_1D:GEM_nFailingProbe_allCh_1D", + "GEM_nPassingProbe_chamber_1D:GEM_nFailingProbe_chamber_1D", + "GEM_nPassingProbe_chamber_p1_1D:GEM_nFailingProbe_chamber_p1_1D", + "GEM_nPassingProbe_chamber_p2_1D:GEM_nFailingProbe_chamber_p2_1D", + "GEM_nPassingProbe_chamber_n1_1D:GEM_nFailingProbe_chamber_n1_1D", + "GEM_nPassingProbe_chamber_n2_1D:GEM_nFailingProbe_chamber_n2_1D", + "GEM_nPassingProbe_pt_1D:GEM_nFailingProbe_pt_1D", + "GEM_nPassingProbe_eta_1D:GEM_nFailingProbe_eta_1D", + "GEM_nPassingProbe_phi_1D:GEM_nFailingProbe_phi_1D", + "GEM_nPassingProbe_pt_p1_1D:GEM_nFailingProbe_pt_p1_1D", + "GEM_nPassingProbe_eta_p1_1D:GEM_nFailingProbe_eta_p1_1D", + "GEM_nPassingProbe_phi_p1_1D:GEM_nFailingProbe_phi_p1_1D", + "GEM_nPassingProbe_pt_p2_1D:GEM_nFailingProbe_pt_p2_1D", + "GEM_nPassingProbe_eta_p2_1D:GEM_nFailingProbe_eta_p2_1D", + "GEM_nPassingProbe_phi_p2_1D:GEM_nFailingProbe_phi_p2_1D", + "GEM_nPassingProbe_pt_n1_1D:GEM_nFailingProbe_pt_n1_1D", + "GEM_nPassingProbe_eta_n1_1D:GEM_nFailingProbe_eta_n1_1D", + "GEM_nPassingProbe_phi_n1_1D:GEM_nFailingProbe_phi_n1_1D", + "GEM_nPassingProbe_pt_n2_1D:GEM_nFailingProbe_pt_n2_1D", + "GEM_nPassingProbe_eta_n2_1D:GEM_nFailingProbe_eta_n2_1D", + "GEM_nPassingProbe_phi_n2_1D:GEM_nFailingProbe_phi_n2_1D", + "GEM_nPassingProbe_Ch_region:GEM_nFailingProbe_Ch_region", + "GEM_nPassingProbe_Ch_region_GE1:GEM_nFailingProbe_Ch_region_GE1", + "GEM_nPassingProbe_Ch_region_GE1_NoL:GEM_nFailingProbe_Ch_region_GE1_NoL", + "GEM_nPassingProbe_Ch_eta:GEM_nFailingProbe_Ch_eta", + "GEM_nPassingProbe_Ch_phi:GEM_nFailingProbe_Ch_phi", + "ME0_nPassingProbe_chamber_1D:ME0_nFailingProbe_chamber_1D", + "GEM_nPassingProbe_Ch_region_layer_phase2:GEM_nFailingProbe_Ch_region_layer_phase2"), + diagnosticPrescale = cms.untracked.int32(1)) diff --git a/DQMOffline/MuonDPG/python/gemTnPEfficiencyTask_cfi.py b/DQMOffline/MuonDPG/python/gemTnPEfficiencyTask_cfi.py new file mode 100644 index 0000000000000..92fcb8af326ad --- /dev/null +++ b/DQMOffline/MuonDPG/python/gemTnPEfficiencyTask_cfi.py @@ -0,0 +1,28 @@ +import FWCore.ParameterSet.Config as cms + +from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer +gemTnPEfficiencyMonitor = DQMEDAnalyzer('GEMTnPEfficiencyTask', + # The muon object input tag + inputTagMuons = cms.untracked.InputTag('muons'), + inputTagPrimaryVertices = cms.untracked.InputTag('offlinePrimaryVertices'), + trigResultsTag = cms.untracked.InputTag("TriggerResults::HLT"), + trigEventTag = cms.untracked.InputTag("hltTriggerSummaryAOD::HLT"), + # A string-based cut on muon variables + probeCut = cms.untracked.string('isTrackerMuon && (innerTrack.normalizedChi2 < 10) && (innerTrack.hitPattern.numberOfValidPixelHits > 0) && (innerTrack.hitPattern.trackerLayersWithMeasurement > 5) && ((isolationR03.sumPt)/(pt) < 0.1) && pt>10.' ), + probeDxyCut = cms.untracked.double(0.2), + probeDzCut = cms.untracked.double(0.5), + #Cut on muon ID: + # CutBasedIdLoose = 1UL << 0 + # CutBasedIdMedium = 1UL << 1 + # CutBasedIdMediumPrompt = 1UL << 2 + # CutBasedIdTight = 1UL << 3 + tagCut = cms.untracked.string('(selectors & 8) && ((isolationR03.sumPt)/(pt) < 0.05) && pt>24.'), + borderCut = cms.untracked.double(-10.), + lowPairMassCut = cms.untracked.double (80.), + highPairMassCut = cms.untracked.double (100.), + trigName = cms.untracked.string("HLT_IsoMu*"), + #cuts for passing probe definition + dx_cut = cms.untracked.double(10.), + # If true, enables detailed analysis plots + detailedAnalysis = cms.untracked.bool(True) +) From 9ef2de7f2d5720f0e327716ca6fa4f1aa2fae9ce Mon Sep 17 00:00:00 2001 From: abellora Date: Mon, 13 Mar 2023 15:05:12 +0100 Subject: [PATCH 044/233] Added new DQM client for the PPSRandom stream --- .../ppsrandom_dqm_sourceclient-live_cfg.py | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 DQM/Integration/python/clients/ppsrandom_dqm_sourceclient-live_cfg.py diff --git a/DQM/Integration/python/clients/ppsrandom_dqm_sourceclient-live_cfg.py b/DQM/Integration/python/clients/ppsrandom_dqm_sourceclient-live_cfg.py new file mode 100644 index 0000000000000..2f1f602e740bb --- /dev/null +++ b/DQM/Integration/python/clients/ppsrandom_dqm_sourceclient-live_cfg.py @@ -0,0 +1,95 @@ +import FWCore.ParameterSet.Config as cms + +import sys +from Configuration.Eras.Era_Run3_cff import Run3 +process = cms.Process('CTPPSDQM', Run3) + +test = False +unitTest = False + +if 'unitTest=True' in sys.argv: + unitTest=True + +# event source +if unitTest: + process.load("DQM.Integration.config.unittestinputsource_cfi") + from DQM.Integration.config.unittestinputsource_cfi import options +elif not test: + # for live online DQM in P5 + process.load("DQM.Integration.config.inputsource_cfi") + from DQM.Integration.config.inputsource_cfi import options +else: + # for testing in lxplus + process.load("DQM.Integration.config.fileinputsource_cfi") + from DQM.Integration.config.fileinputsource_cfi import options + process.source.fileNames = cms.untracked.vstring( + "/store/group/dpg_ctpps/comm_ctpps/PixelRandomTrigger2023/outputExpressPPSRandom.root" + ) + process.source.inputCommands = cms.untracked.vstring( + 'drop *', + 'keep FEDRawDataCollection_*_*_*' + ) + +# DQM environment +process.load("DQM.Integration.config.environment_cfi") +process.dqmEnv.subSystemFolder = 'PPSRANDOM' +process.dqmSaver.tag = 'PPSRANDOM' +process.dqmSaver.runNumber = options.runNumber +process.dqmSaverPB.tag = 'PPSRANDOM' +process.dqmSaverPB.runNumber = options.runNumber + +if test: + process.dqmSaver.path = "." + process.dqmSaverPB.path = "./pb" + +process.load("DQMServices.Components.DQMProvInfo_cfi") + +# message logger +process.MessageLogger = cms.Service("MessageLogger", + destinations = cms.untracked.vstring('cout'), + cout = cms.untracked.PSet(threshold = cms.untracked.string('WARNING')) +) + +# global tag - conditions for P5 cluster +process.load("DQM.Integration.config.FrontierCondition_GT_cfi") + +# raw-to-digi conversion +from EventFilter.CTPPSRawToDigi.ctppsRawToDigi_cff import ctppsPixelDigis as _ctppsPixelDigis +process.ctppsPixelDigisAlCaRecoProducer = _ctppsPixelDigis.clone(inputLabel = 'hltPPSCalibrationRaw') + +# loading Meta tags used by commonDQM +process.load('EventFilter.OnlineMetaDataRawToDigi.onlineMetaDataRawToDigi_cfi') +process.onlineMetaDataDigis = cms.EDProducer('OnlineMetaDataRawToDigi') + + +# DQM Modules +process.load("DQM.CTPPS.ctppsDQM_cff") + +# processing path +process.recoStep = cms.Sequence( + process.ctppsPixelDigisAlCaRecoProducer * + process.onlineMetaDataDigis +) + +process.dqmModules = cms.Sequence( + process.ctppsDQMRandomSource * + process.ctppsDQMRandomHarvest +) + +process.path = cms.Path( + process.recoStep * + process.dqmModules * + + process.dqmEnv * + process.dqmSaver * + process.dqmSaverPB +) + +process.schedule = cms.Schedule(process.path) + +process.dqmProvInfo.runType = process.runType.getRunTypeName() + +# Process customizations included here +from DQM.Integration.config.online_customizations_cfi import * +print("Final Source settings:", process.source) +process = customise(process) From e428d1ba17a4ecd77ef4e7a138106b31e8cdae74 Mon Sep 17 00:00:00 2001 From: qianying guo Date: Tue, 14 Mar 2023 04:28:25 +0100 Subject: [PATCH 045/233] GEM TnP efficiency removing the ring --- DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc b/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc index 3527f577cba2c..4a071c0d7bb1d 100644 --- a/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc +++ b/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc @@ -422,7 +422,6 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu //GEM variables std::vector> probe_coll_GEM_region; - std::vector> probe_coll_GEM_ring; std::vector> probe_coll_GEM_lay; std::vector> probe_coll_GEM_chamber; std::vector> probe_coll_GEM_pt; @@ -452,7 +451,6 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu for (const auto i : probe_indices) { //GEM variables std::vector probe_GEM_region; - std::vector probe_GEM_ring; std::vector probe_GEM_sta; std::vector probe_GEM_lay; std::vector probe_GEM_chamber; @@ -536,7 +534,6 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu GEM_stationMatching = GEM_stationMatching | (1 << (station - 1)); probe_GEM_region.push_back(region); - probe_GEM_ring.push_back(ring); probe_GEM_sta.push_back(station); probe_GEM_lay.push_back(layer); probe_GEM_chamber.push_back(chamber); @@ -589,7 +586,6 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu //Fill GEM variables probe_coll_GEM_region.push_back(probe_GEM_region); - probe_coll_GEM_ring.push_back(probe_GEM_ring); probe_coll_GEM_sta.push_back(probe_GEM_sta); probe_coll_GEM_lay.push_back(probe_GEM_lay); probe_coll_GEM_chamber.push_back(probe_GEM_chamber); @@ -660,7 +656,6 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu //GEM variables int GEM_region = probe_coll_GEM_region.at(i).at(j); - int GEM_ring = probe_coll_GEM_ring.at(i).at(j); int GEM_sta = probe_coll_GEM_sta.at(i).at(j); int GEM_lay = probe_coll_GEM_lay.at(i).at(j); int GEM_chamber = probe_coll_GEM_chamber.at(i).at(j); From 98b1c277936d4ab1a580526b776022ebbb156c63 Mon Sep 17 00:00:00 2001 From: qianying guo Date: Tue, 14 Mar 2023 05:57:10 +0100 Subject: [PATCH 046/233] TnP Efficiency for GEM removing unused variable --- .../MuonDPG/plugins/GEMTnPEfficiencyTask.cc | 57 +++++++++---------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc b/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc index 4a071c0d7bb1d..0924d3539deab 100644 --- a/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc +++ b/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc @@ -51,28 +51,28 @@ void GEMTnPEfficiencyTask::bookHistograms(DQMStore::IBooker& iBooker, auto baseDir = topFolder() + "Task/"; iBooker.setCurrentFolder(baseDir); - MonitorElement* me_GEM_pass_Ch_region = iBooker.book2D("GEM_nPassingProbe_Ch_region", "GEM_nPassingProbe_Ch_region", 2, -1.5, 1.5, 37, 0, 37); - MonitorElement* me_GEM_fail_Ch_region = iBooker.book2D("GEM_nFailingProbe_Ch_region", "GEM_nFailingProbe_Ch_region", 2, -1.5, 1.5, 37, 0, 37); - MonitorElement* me_GEM_pass_Ch_region_GE1 = iBooker.book2D("GEM_nPassingProbe_Ch_region_GE1", "GEM_nPassingProbe_Ch_region_GE1", 4, 0, 4, 37, 0, 37); - MonitorElement* me_GEM_fail_Ch_region_GE1 = iBooker.book2D("GEM_nFailingProbe_Ch_region_GE1", "GEM_nFailingProbe_Ch_region_GE1", 4, 0, 4, 37, 0, 37); - MonitorElement* me_GEM_pass_Ch_region_GE1_NoL = iBooker.book2D("GEM_nPassingProbe_Ch_region_GE1_NoL", "GEM_nPassingProbe_Ch_region_GE1_NoL", 2, 0, 2, 37, 0, 37); - MonitorElement* me_GEM_fail_Ch_region_GE1_NoL = iBooker.book2D("GEM_nFailingProbe_Ch_region_GE1_NoL", "GEM_nFailingProbe_Ch_region_GE1_NoL", 2, 0, 2, 37, 0, 37); - MonitorElement* me_GEM_pass_Ch_eta = iBooker.book2D("GEM_nPassingProbe_Ch_eta", "GEM_nPassingProbe_Ch_eta", 24, -2.4, 2.4, 37, 0, 37); - MonitorElement* me_GEM_fail_Ch_eta = iBooker.book2D("GEM_nFailingProbe_Ch_eta", "GEM_nFailingProbe_Ch_eta", 24, -2.4, 2.4, 37, 0, 37); - MonitorElement* me_GEM_pass_Ch_phi = iBooker.book2D("GEM_nPassingProbe_Ch_phi", "GEM_nPassingProbe_Ch_phi", 20, -TMath::Pi(), TMath::Pi(), 37, 0, 37); - MonitorElement* me_GEM_fail_Ch_phi = iBooker.book2D("GEM_nFailingProbe_Ch_phi", "GEM_nFailingProbe_Ch_phi", 20, -TMath::Pi(), TMath::Pi(), 37, 0, 37); + MonitorElement* me_GEM_pass_Ch_region = iBooker.book2D("GEM_nPassingProbe_Ch_region", "GEM_nPassingProbe_Ch_region", 2, -1.5, 1.5, 36, 1, 37); + MonitorElement* me_GEM_fail_Ch_region = iBooker.book2D("GEM_nFailingProbe_Ch_region", "GEM_nFailingProbe_Ch_region", 2, -1.5, 1.5, 36, 1, 37); + MonitorElement* me_GEM_pass_Ch_region_GE1 = iBooker.book2D("GEM_nPassingProbe_Ch_region_GE1", "GEM_nPassingProbe_Ch_region_GE1", 4, 0, 4, 36, 1, 37); + MonitorElement* me_GEM_fail_Ch_region_GE1 = iBooker.book2D("GEM_nFailingProbe_Ch_region_GE1", "GEM_nFailingProbe_Ch_region_GE1", 4, 0, 4, 36, 1, 37); + MonitorElement* me_GEM_pass_Ch_region_GE1_NoL = iBooker.book2D("GEM_nPassingProbe_Ch_region_GE1_NoL", "GEM_nPassingProbe_Ch_region_GE1_NoL", 2, 0, 2, 36, 1, 37); + MonitorElement* me_GEM_fail_Ch_region_GE1_NoL = iBooker.book2D("GEM_nFailingProbe_Ch_region_GE1_NoL", "GEM_nFailingProbe_Ch_region_GE1_NoL", 2, 0, 2, 36, 1, 37); + MonitorElement* me_GEM_pass_Ch_eta = iBooker.book2D("GEM_nPassingProbe_Ch_eta", "GEM_nPassingProbe_Ch_eta", 24, -2.4, 2.4, 36, 1, 37); + MonitorElement* me_GEM_fail_Ch_eta = iBooker.book2D("GEM_nFailingProbe_Ch_eta", "GEM_nFailingProbe_Ch_eta", 24, -2.4, 2.4, 36, 1, 37); + MonitorElement* me_GEM_pass_Ch_phi = iBooker.book2D("GEM_nPassingProbe_Ch_phi", "GEM_nPassingProbe_Ch_phi", 20, -TMath::Pi(), TMath::Pi(), 36, 1, 37); + MonitorElement* me_GEM_fail_Ch_phi = iBooker.book2D("GEM_nFailingProbe_Ch_phi", "GEM_nFailingProbe_Ch_phi", 20, -TMath::Pi(), TMath::Pi(), 36, 1, 37); MonitorElement* me_GEM_pass_allCh_1D = iBooker.book1D("GEM_nPassingProbe_allCh_1D", "GEM_nPassingProbe_allCh_1D", 2, -1.5, 1.5); MonitorElement* me_GEM_fail_allCh_1D = iBooker.book1D("GEM_nFailingProbe_allCh_1D", "GEM_nFailingProbe_allCh_1D", 2, -1.5, 1.5); - MonitorElement* me_GEM_pass_chamber_1D = iBooker.book1D("GEM_nPassingProbe_chamber_1D", "GEM_nPassingProbe_chamber_1D", 37, 0, 37); - MonitorElement* me_GEM_fail_chamber_1D = iBooker.book1D("GEM_nFailingProbe_chamber_1D", "GEM_nFailingProbe_chamber_1D", 37, 0, 37); - MonitorElement* me_GEM_pass_chamber_p1_1D = iBooker.book1D("GEM_nPassingProbe_chamber_p1_1D", "GEM_nPassingProbe_chamber_p1_1D", 37, 0, 37); - MonitorElement* me_GEM_fail_chamber_p1_1D = iBooker.book1D("GEM_nFailingProbe_chamber_p1_1D", "GEM_nFailingProbe_chamber_p1_1D", 37, 0, 37); - MonitorElement* me_GEM_pass_chamber_p2_1D = iBooker.book1D("GEM_nPassingProbe_chamber_p2_1D", "GEM_nPassingProbe_chamber_p2_1D", 37, 0, 37); - MonitorElement* me_GEM_fail_chamber_p2_1D = iBooker.book1D("GEM_nFailingProbe_chamber_p2_1D", "GEM_nFailingProbe_chamber_p2_1D", 37, 0, 37); - MonitorElement* me_GEM_pass_chamber_n1_1D = iBooker.book1D("GEM_nPassingProbe_chamber_n1_1D", "GEM_nPassingProbe_chamber_n1_1D", 37, 0, 37); - MonitorElement* me_GEM_fail_chamber_n1_1D = iBooker.book1D("GEM_nFailingProbe_chamber_n1_1D", "GEM_nFailingProbe_chamber_n1_1D", 37, 0, 37); - MonitorElement* me_GEM_pass_chamber_n2_1D = iBooker.book1D("GEM_nPassingProbe_chamber_n2_1D", "GEM_nPassingProbe_chamber_n2_1D", 37, 0, 37); - MonitorElement* me_GEM_fail_chamber_n2_1D = iBooker.book1D("GEM_nFailingProbe_chamber_n2_1D", "GEM_nFailingProbe_chamber_n2_1D", 37, 0, 37); + MonitorElement* me_GEM_pass_chamber_1D = iBooker.book1D("GEM_nPassingProbe_chamber_1D", "GEM_nPassingProbe_chamber_1D", 36, 1, 37); + MonitorElement* me_GEM_fail_chamber_1D = iBooker.book1D("GEM_nFailingProbe_chamber_1D", "GEM_nFailingProbe_chamber_1D", 36, 1, 37); + MonitorElement* me_GEM_pass_chamber_p1_1D = iBooker.book1D("GEM_nPassingProbe_chamber_p1_1D", "GEM_nPassingProbe_chamber_p1_1D", 36, 1, 37); + MonitorElement* me_GEM_fail_chamber_p1_1D = iBooker.book1D("GEM_nFailingProbe_chamber_p1_1D", "GEM_nFailingProbe_chamber_p1_1D", 36, 1, 37); + MonitorElement* me_GEM_pass_chamber_p2_1D = iBooker.book1D("GEM_nPassingProbe_chamber_p2_1D", "GEM_nPassingProbe_chamber_p2_1D", 36, 1, 37); + MonitorElement* me_GEM_fail_chamber_p2_1D = iBooker.book1D("GEM_nFailingProbe_chamber_p2_1D", "GEM_nFailingProbe_chamber_p2_1D", 36, 1, 37); + MonitorElement* me_GEM_pass_chamber_n1_1D = iBooker.book1D("GEM_nPassingProbe_chamber_n1_1D", "GEM_nPassingProbe_chamber_n1_1D", 36, 1, 37); + MonitorElement* me_GEM_fail_chamber_n1_1D = iBooker.book1D("GEM_nFailingProbe_chamber_n1_1D", "GEM_nFailingProbe_chamber_n1_1D", 36, 1, 37); + MonitorElement* me_GEM_pass_chamber_n2_1D = iBooker.book1D("GEM_nPassingProbe_chamber_n2_1D", "GEM_nPassingProbe_chamber_n2_1D", 36, 1, 37); + MonitorElement* me_GEM_fail_chamber_n2_1D = iBooker.book1D("GEM_nFailingProbe_chamber_n2_1D", "GEM_nFailingProbe_chamber_n2_1D", 36, 1, 37); // MonitorElement* me_GEM_pass_pt_1D = iBooker.book1D("GEM_nPassingProbe_pt_1D", "GEM_nPassingProbe_pt_1D", 20, 0, 100); MonitorElement* me_GEM_fail_pt_1D = iBooker.book1D("GEM_nFailingProbe_pt_1D", "GEM_nFailingProbe_pt_1D", 20, 0, 100); @@ -108,8 +108,8 @@ void GEMTnPEfficiencyTask::bookHistograms(DQMStore::IBooker& iBooker, //// MonitorElement* me_ME0_pass_chamber_1D = iBooker.book1D("ME0_nPassingProbe_chamber_1D", "ME0_nPassingProbe_chamber_1D", 19, 0, 19); MonitorElement* me_ME0_fail_chamber_1D = iBooker.book1D("ME0_nFailingProbe_chamber_1D", "ME0_nFailingProbe_chamber_1D", 19, 0, 19); - MonitorElement* me_GEM_pass_Ch_region_layer_phase2 = iBooker.book2D("GEM_nPassingProbe_Ch_region_layer_phase2", "GEM_nPassingProbe_Ch_region_layer_phase2", 10, 0, 10, 37, 0, 37); - MonitorElement* me_GEM_fail_Ch_region_layer_phase2 = iBooker.book2D("GEM_nFailingProbe_Ch_region_layer_phase2", "GEM_nFailingProbe_Ch_region_layer_phase2", 10, 0, 10, 37, 0, 37); + MonitorElement* me_GEM_pass_Ch_region_layer_phase2 = iBooker.book2D("GEM_nPassingProbe_Ch_region_layer_phase2", "GEM_nPassingProbe_Ch_region_layer_phase2", 10, 0, 10, 36, 1, 37); + MonitorElement* me_GEM_fail_Ch_region_layer_phase2 = iBooker.book2D("GEM_nFailingProbe_Ch_region_layer_phase2", "GEM_nFailingProbe_Ch_region_layer_phase2", 10, 0, 10, 36, 1, 37); me_GEM_pass_allCh_1D->setBinLabel(1, "GE-11", 1); @@ -484,7 +484,6 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu int roll = chId.roll(); int region = chId.region(); - int ring = chId.ring(); int station = chId.station(); int layer = chId.layer(); int chamber = chId.chamber(); @@ -612,21 +611,21 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu //Loop over probes for (unsigned i = 0; i < probe_indices.size(); ++i) { uint8_t GEM_matchPatt = probe_coll_GEM_staMatch.at(i); - uint8_t ME0_matchPatt = probe_coll_ME0_staMatch.at(i); + //uint8_t ME0_matchPatt = probe_coll_ME0_staMatch.at(i); //Loop over ME0 matches unsigned nME0_matches = probe_coll_ME0_region.at(i).size(); for(unsigned j=0; j Date: Tue, 14 Mar 2023 08:44:04 +0100 Subject: [PATCH 047/233] Try to introduce the gurad rings for both full and partial wafers of HGCal (will be a part of V18) --- .../data/hfnoseCons/v1/hfnoseCons.xml | 1 + .../data/hfnoseCons/v1m/hfnoseCons.xml | 1 + .../data/hgcalCons/v16/hgcalCons.xml | 1 + .../data/hgcalCons/v17/hgcalCons.xml | 1 + .../data/hgcalCons/v17n/hgcalCons.xml | 1 + .../interface/HGCalDDDConstants.h | 3 + .../interface/HGCalParameters.h | 1 + .../interface/HGCalWaferMask.h | 4 +- .../HGCalCommonData/plugins/DDHGCalWaferP.cc | 7 +- .../plugins/dd4hep/DDHGCalWaferP.cc | 7 +- .../src/HGCalParametersFromDD.cc | 13 +-- .../HGCalCommonData/src/HGCalWaferMask.cc | 8 +- .../test/HGCalPartialCellTester.cc | 2 +- SimG4CMS/Calo/interface/HFNoseSD.h | 5 +- SimG4CMS/Calo/interface/HGCGuardRing.h | 24 ++++++ SimG4CMS/Calo/interface/HGCMouseBite.h | 2 +- SimG4CMS/Calo/interface/HGCalSD.h | 2 + SimG4CMS/Calo/src/HFNoseSD.cc | 40 ++++----- SimG4CMS/Calo/src/HGCGuradRing.cc | 83 +++++++++++++++++++ SimG4CMS/Calo/src/HGCMouseBite.cc | 27 +++--- SimG4CMS/Calo/src/HGCSD.cc | 21 +++-- SimG4CMS/Calo/src/HGCalSD.cc | 83 +++++++++---------- 22 files changed, 226 insertions(+), 111 deletions(-) create mode 100644 SimG4CMS/Calo/interface/HGCGuardRing.h create mode 100644 SimG4CMS/Calo/src/HGCGuradRing.cc diff --git a/Geometry/ForwardCommonData/data/hfnoseCons/v1/hfnoseCons.xml b/Geometry/ForwardCommonData/data/hfnoseCons/v1/hfnoseCons.xml index 68ea30522d351..bd01aea822cc5 100644 --- a/Geometry/ForwardCommonData/data/hfnoseCons/v1/hfnoseCons.xml +++ b/Geometry/ForwardCommonData/data/hfnoseCons/v1/hfnoseCons.xml @@ -64,6 +64,7 @@ + diff --git a/Geometry/ForwardCommonData/data/hfnoseCons/v1m/hfnoseCons.xml b/Geometry/ForwardCommonData/data/hfnoseCons/v1m/hfnoseCons.xml index 73b94703c2dc9..3bca73b9e37a9 100644 --- a/Geometry/ForwardCommonData/data/hfnoseCons/v1m/hfnoseCons.xml +++ b/Geometry/ForwardCommonData/data/hfnoseCons/v1m/hfnoseCons.xml @@ -64,6 +64,7 @@ + diff --git a/Geometry/HGCalCommonData/data/hgcalCons/v16/hgcalCons.xml b/Geometry/HGCalCommonData/data/hgcalCons/v16/hgcalCons.xml index eb165576e6713..2aade4b3f1922 100644 --- a/Geometry/HGCalCommonData/data/hgcalCons/v16/hgcalCons.xml +++ b/Geometry/HGCalCommonData/data/hgcalCons/v16/hgcalCons.xml @@ -205,6 +205,7 @@ + diff --git a/Geometry/HGCalCommonData/data/hgcalCons/v17/hgcalCons.xml b/Geometry/HGCalCommonData/data/hgcalCons/v17/hgcalCons.xml index 3894eae826991..56fc0f5c66ea6 100644 --- a/Geometry/HGCalCommonData/data/hgcalCons/v17/hgcalCons.xml +++ b/Geometry/HGCalCommonData/data/hgcalCons/v17/hgcalCons.xml @@ -208,6 +208,7 @@ + diff --git a/Geometry/HGCalCommonData/data/hgcalCons/v17n/hgcalCons.xml b/Geometry/HGCalCommonData/data/hgcalCons/v17n/hgcalCons.xml index 932b12b49a63d..4b01808347294 100644 --- a/Geometry/HGCalCommonData/data/hgcalCons/v17n/hgcalCons.xml +++ b/Geometry/HGCalCommonData/data/hgcalCons/v17n/hgcalCons.xml @@ -208,6 +208,7 @@ + diff --git a/Geometry/HGCalCommonData/interface/HGCalDDDConstants.h b/Geometry/HGCalCommonData/interface/HGCalDDDConstants.h index 8af62260cda20..269e73a59848a 100644 --- a/Geometry/HGCalCommonData/interface/HGCalDDDConstants.h +++ b/Geometry/HGCalCommonData/interface/HGCalDDDConstants.h @@ -171,6 +171,9 @@ class HGCalDDDConstants { return ((mode_ == HGCalGeometryMode::Hexagon8File) || (mode_ == HGCalGeometryMode::Hexagon8Module) || (mode_ == HGCalGeometryMode::Hexagon8Cassette)); } + inline bool waferHexagon8Module() const { + return ((mode_ == HGCalGeometryMode::Hexagon8Module) || (mode_ == HGCalGeometryMode::Hexagon8Cassette)); + } bool waferInLayer(int wafer, int lay, bool reco) const; bool waferFullInLayer(int wafer, int lay, bool reco) const; inline int waferCount(const int type) const { return ((type == 0) ? waferMax_[2] : waferMax_[3]); } diff --git a/Geometry/HGCalCommonData/interface/HGCalParameters.h b/Geometry/HGCalCommonData/interface/HGCalParameters.h index 30f34c931c8ed..6b10a0ffab4b0 100644 --- a/Geometry/HGCalCommonData/interface/HGCalParameters.h +++ b/Geometry/HGCalCommonData/interface/HGCalParameters.h @@ -156,6 +156,7 @@ class HGCalParameters { double sensorSizeOffset_; double guardRingOffset_; double mouseBite_; + int useOffset_; int waferUVMax_; std::vector waferUVMaxLayer_; bool defineFull_; diff --git a/Geometry/HGCalCommonData/interface/HGCalWaferMask.h b/Geometry/HGCalCommonData/interface/HGCalWaferMask.h index fd1eff813a484..316eefe4136de 100644 --- a/Geometry/HGCalCommonData/interface/HGCalWaferMask.h +++ b/Geometry/HGCalCommonData/interface/HGCalWaferMask.h @@ -49,11 +49,11 @@ class HGCalWaferMask { // Gets the corners of the partial wafers from its type, orientation, zside // (Good for V15, V16 geometries) static std::vector > waferXY( - int part, int orient, int zside, double delX, double delY, double xpos, double ypos); + int part, int orient, int zside, double waferSize, double offset, double xpos, double ypos); // Gets the corners of the partial wafers from its type, placement index // (Good for V17 geometry) static std::vector > waferXY( - int part, int placement, double delX, double delY, double xpos, double ypos); + int part, int placement, double wafersize, double offset, double xpos, double ypos); private: static constexpr double sqrt3_ = 1.732050807568877; // std::sqrt(3.0) in double precision diff --git a/Geometry/HGCalCommonData/plugins/DDHGCalWaferP.cc b/Geometry/HGCalCommonData/plugins/DDHGCalWaferP.cc index 930400d3aa724..995393d06994a 100644 --- a/Geometry/HGCalCommonData/plugins/DDHGCalWaferP.cc +++ b/Geometry/HGCalCommonData/plugins/DDHGCalWaferP.cc @@ -106,9 +106,6 @@ void DDHGCalWaferP::initialize(const DDNumericArguments& nArgs, void DDHGCalWaferP::execute(DDCompactView& cpv) { static constexpr double tol = 0.00001; - static const double sqrt3 = std::sqrt(3.0); - double r = 0.5 * waferSize_; - double R = 2.0 * r / sqrt3; std::string parentName = parent().name().name(); // Loop over all types @@ -116,7 +113,7 @@ void DDHGCalWaferP::execute(DDCompactView& cpv) { // First the mother std::string mother = parentName + tags_[k]; std::vector > wxy = - HGCalWaferMask::waferXY(partialTypes_[k], orientations_[k], 1, r, R, 0.0, 0.0); + HGCalWaferMask::waferXY(partialTypes_[k], orientations_[k], 1, waferSize_, 0.0, 0.0, 0.0); std::vector xM, yM; for (unsigned int i = 0; i < (wxy.size() - 1); ++i) { xM.emplace_back(wxy[i].first); @@ -139,7 +136,7 @@ void DDHGCalWaferP::execute(DDCompactView& cpv) { #endif // Then the layers - wxy = HGCalWaferMask::waferXY(partialTypes_[k], orientations_[k], 1, r, R, 0.0, 0.0); + wxy = HGCalWaferMask::waferXY(partialTypes_[k], orientations_[k], 1, waferSize_, 0.0, 0.0, 0.0); std::vector xL, yL; for (unsigned int i = 0; i < (wxy.size() - 1); ++i) { xL.emplace_back(wxy[i].first); diff --git a/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalWaferP.cc b/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalWaferP.cc index cf1710e5c3d88..229c417bd48e8 100644 --- a/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalWaferP.cc +++ b/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalWaferP.cc @@ -70,16 +70,13 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext #endif static constexpr double tol = 0.00001 * dd4hep::mm; - static const double sqrt3 = std::sqrt(3.0); - double r = 0.5 * waferSize; - double R = 2.0 * r / sqrt3; // Loop over all types for (unsigned int k = 0; k < tags.size(); ++k) { // First the mother std::string mother = parentName + tags[k]; std::vector> wxy = - HGCalWaferMask::waferXY(partialTypes[k], orientations[k], 1, r, R, 0.0, 0.0); + HGCalWaferMask::waferXY(partialTypes[k], orientations[k], 1, waferSize, 0.0, 0.0, 0.0); std::vector xM, yM; for (unsigned int i = 0; i < (wxy.size() - 1); ++i) { xM.emplace_back(wxy[i].first); @@ -106,7 +103,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext // Then the layers dd4hep::Rotation3D rotation; - wxy = HGCalWaferMask::waferXY(partialTypes[k], orientations[k], 1, r, R, 0.0, 0.0); + wxy = HGCalWaferMask::waferXY(partialTypes[k], orientations[k], 1, waferSize, 0.0, 0.0, 0.0); std::vector xL, yL; for (unsigned int i = 0; i < (wxy.size() - 1); ++i) { xL.emplace_back(wxy[i].first); diff --git a/Geometry/HGCalCommonData/src/HGCalParametersFromDD.cc b/Geometry/HGCalCommonData/src/HGCalParametersFromDD.cc index 6d879044da442..5a4b9da92ff32 100644 --- a/Geometry/HGCalCommonData/src/HGCalParametersFromDD.cc +++ b/Geometry/HGCalCommonData/src/HGCalParametersFromDD.cc @@ -8,7 +8,7 @@ #include "Geometry/HGCalCommonData/interface/HGCalGeometryMode.h" #include "Geometry/HGCalCommonData/interface/HGCalParameters.h" -//#define EDM_ML_DEBUG +#define EDM_ML_DEBUG using namespace geant_units::operators; bool HGCalParametersFromDD::build(const DDCompactView* cpv, @@ -116,6 +116,7 @@ bool HGCalParametersFromDD::build(const DDCompactView* cpv, php.sensorSizeOffset_ = HGCalParameters::k_ScaleFromDDD * getDDDValue("SensorSizeOffset", sv2); php.guardRingOffset_ = HGCalParameters::k_ScaleFromDDD * getDDDValue("GuardRingOffset", sv2); php.mouseBite_ = HGCalParameters::k_ScaleFromDDD * getDDDValue("MouseBite", sv2); + php.useOffset_ = static_cast(getDDDValue("UseOffset", sv2)); php.waferR_ = HGCalParameters::k_ScaleToDDD * php.waferSize_ * tan30deg_; php.cellSize_.emplace_back(HGCalParameters::k_ScaleToDDD * php.waferSize_ / php.nCellsFine_); php.cellSize_.emplace_back(HGCalParameters::k_ScaleToDDD * php.waferSize_ / php.nCellsCoarse_); @@ -126,7 +127,7 @@ bool HGCalParametersFromDD::build(const DDCompactView* cpv, << php.cellSize_[1] << " wafer Params " << php.waferSize_ << ":" << php.waferR_ << ":" << php.waferThick_ << ":" << php.sensorSeparation_ << ":" << php.sensorSizeOffset_ << ":" << php.guardRingOffset_ << ":" << php.mouseBite_ - << ":" << php.waferR_; + << ":" << php.useOffset_ << ":" << php.waferR_; #endif for (int k = 0; k < 2; ++k) getCellPosition(php, k); @@ -193,7 +194,7 @@ bool HGCalParametersFromDD::build(const DDCompactView* cpv, php.minTileSize_ = HGCalParameters::k_ScaleFromDDD * getDDDValue("MinimumTileSize", sv); php.waferSize_ = php.waferR_ = 0; php.sensorSeparation_ = php.mouseBite_ = 0; - php.sensorSizeOffset_ = php.guardRingOffset_ = 0; + php.sensorSizeOffset_ = php.guardRingOffset_ = php.useOffset_ = 0; php.waferMaskMode_ = static_cast(getDDDValue("WaferMaskMode", sv)); php.waferZSide_ = static_cast(getDDDValue("WaferZside", sv)); if ((php.mode_ == HGCalGeometryMode::TrapezoidModule) || (php.mode_ == HGCalGeometryMode::TrapezoidCassette)) @@ -343,6 +344,8 @@ bool HGCalParametersFromDD::build(const cms::DDCompactView* cpv, php.guardRingOffset_ = HGCalParameters::k_ScaleFromDD4hep * tempD[0]; tempD = fv.get >(namet, "MouseBite"); php.mouseBite_ = HGCalParameters::k_ScaleFromDD4hep * tempD[0]; + tempD = fv.get >(namet, "UseOffset"); + php.useOffset_ = static_cast(tempD[0]); php.waferR_ = HGCalParameters::k_ScaleToDDD * php.waferSize_ * tan30deg_; php.cellSize_.emplace_back(HGCalParameters::k_ScaleToDDD * php.waferSize_ / php.nCellsFine_); php.cellSize_.emplace_back(HGCalParameters::k_ScaleToDDD * php.waferSize_ / php.nCellsCoarse_); @@ -353,7 +356,7 @@ bool HGCalParametersFromDD::build(const cms::DDCompactView* cpv, << php.cellSize_[1] << " wafer Params " << php.waferSize_ << ":" << php.waferR_ << ":" << php.waferThick_ << ":" << php.sensorSeparation_ << ":" << php.sensorSizeOffset_ << ":" << php.guardRingOffset_ << ":" << php.mouseBite_ - << ":" << php.waferR_; + << ":" << php.useOffset_ << ":" << php.waferR_; #endif for (int k = 0; k < 2; ++k) getCellPosition(php, k); @@ -427,7 +430,7 @@ bool HGCalParametersFromDD::build(const cms::DDCompactView* cpv, php.minTileSize_ = HGCalParameters::k_ScaleFromDD4hep * tempD[0]; php.waferSize_ = php.waferR_ = 0; php.sensorSeparation_ = php.mouseBite_ = 0; - php.sensorSizeOffset_ = php.guardRingOffset_ = 0; + php.sensorSizeOffset_ = php.guardRingOffset_ = php.useOffset_ = 0; tempD = fv.get >(name, "WaferMaskMode"); php.waferMaskMode_ = static_cast(tempD[0]); tempD = fv.get >(name, "WaferZside"); diff --git a/Geometry/HGCalCommonData/src/HGCalWaferMask.cc b/Geometry/HGCalCommonData/src/HGCalWaferMask.cc index 3cfa3e540c3a1..64036d7e873b0 100644 --- a/Geometry/HGCalCommonData/src/HGCalWaferMask.cc +++ b/Geometry/HGCalCommonData/src/HGCalWaferMask.cc @@ -504,8 +504,8 @@ int HGCalWaferMask::getRotation(int zside, int type, int rotn) { std::pair HGCalWaferMask::getTypeMode(const double& xpos, const double& ypos, - const double& delX, - const double& delY, + const double& delX, + const double& delY, const double& rin, const double& rout, const int& wType, @@ -1073,8 +1073,10 @@ bool HGCalWaferMask::goodTypeMode( } std::vector > HGCalWaferMask::waferXY( - int part, int ori, int zside, double delX, double delY, double xpos, double ypos) { + int part, int ori, int zside, double waferSize, double offset, double xpos, double ypos) { // Good for V15 and V16 versions + double delX = 0.5 * waferSize; + double delY = delX / sin_60_; std::vector > xy; int orient = getRotation(-zside, part, ori); #ifdef EDM_ML_DEBUG diff --git a/Geometry/HGCalCommonData/test/HGCalPartialCellTester.cc b/Geometry/HGCalCommonData/test/HGCalPartialCellTester.cc index 6a7f5700881c8..947408cb1026e 100644 --- a/Geometry/HGCalCommonData/test/HGCalPartialCellTester.cc +++ b/Geometry/HGCalCommonData/test/HGCalPartialCellTester.cc @@ -118,7 +118,7 @@ void HGCalPartialCellTester::analyze(const edm::Event&, const edm::EventSetup&) std::pair xyg = wafer2.cellUV2XY2(ug, vg, placeIndex_, waferType_); //std::cout << xyg.first << ":" << xyg.second << std::endl; std::vector > wxy = - HGCalWaferMask::waferXY(partialType_, placeIndex_, r2, R2, 0.0, 0.0); + HGCalWaferMask::waferXY(partialType_, placeIndex_, waferSize_, 0.0, 0.0, 0.0); for (unsigned int i = 0; i < (wxy.size() - 1); ++i) { double xp1 = wxy[i].first; double yp1 = wxy[i].second; diff --git a/SimG4CMS/Calo/interface/HFNoseSD.h b/SimG4CMS/Calo/interface/HFNoseSD.h index b6da329f69649..b27aa67b9a474 100644 --- a/SimG4CMS/Calo/interface/HFNoseSD.h +++ b/SimG4CMS/Calo/interface/HFNoseSD.h @@ -9,6 +9,7 @@ #include "SimG4CMS/Calo/interface/CaloSD.h" #include "SimG4Core/Notification/interface/BeginOfJob.h" #include "SimG4CMS/Calo/interface/HFNoseNumberingScheme.h" +#include "SimG4CMS/Calo/interface/HGCGuardRing.h" #include "SimG4CMS/Calo/interface/HGCMouseBite.h" #include @@ -41,6 +42,7 @@ class HFNoseSD : public CaloSD, public Observer { const HGCalDDDConstants *hgcons_; std::unique_ptr numberingScheme_; + std::unique_ptr guardRing_; std::unique_ptr mouseBite_; std::string nameX_; HGCalGeometryMode::GeometryMode geom_mode_; @@ -48,7 +50,8 @@ class HFNoseSD : public CaloSD, public Observer { double mouseBiteCut_, distanceFromEdge_; int levelT1_, levelT2_, cornerMinMask_; bool storeAllG4Hits_; - bool fiducialCut_, rejectMB_, waferRot_; + bool fiducialCut_, rejectMB_, waferRot_, checkID_; + int useSimWt_, verbose_; const double tan30deg_; std::vector angles_; }; diff --git a/SimG4CMS/Calo/interface/HGCGuardRing.h b/SimG4CMS/Calo/interface/HGCGuardRing.h new file mode 100644 index 0000000000000..28447ff32d04f --- /dev/null +++ b/SimG4CMS/Calo/interface/HGCGuardRing.h @@ -0,0 +1,24 @@ +#ifndef SimG4CMS_HGCGuardRing_h +#define SimG4CMS_HGCGuardRing_h + +#include "Geometry/HGCalCommonData/interface/HGCalDDDConstants.h" +#include "G4ThreeVector.hh" + +#include + +class HGCGuardRing { +public: + HGCGuardRing(const HGCalDDDConstants& hgc); + bool exclude(G4ThreeVector& point, int zside, int frontBack, int layer, int waferU, int waferV); + +private: + bool insidePolygon(double x, double y, const std::vector >& xyv); + + static constexpr double sqrt3_ = 1.732050807568877; // std::sqrt(3.0) in double precision + const HGCalDDDConstants& hgcons_; + const HGCalGeometryMode::GeometryMode modeUV_; + const double waferSize_, sensorSizeOffset_, guardRingOffset_; + double offset_, xmax_, ymax_; +}; + +#endif // HGCGuardRing_h diff --git a/SimG4CMS/Calo/interface/HGCMouseBite.h b/SimG4CMS/Calo/interface/HGCMouseBite.h index f856607da7fdb..47a849c56e438 100644 --- a/SimG4CMS/Calo/interface/HGCMouseBite.h +++ b/SimG4CMS/Calo/interface/HGCMouseBite.h @@ -9,7 +9,7 @@ class HGCMouseBite { public: HGCMouseBite(const HGCalDDDConstants& hgc, const std::vector& angle, double maxLength, bool waferRotate); - bool exclude(G4ThreeVector& point, int zside, int waferU, int waferV); + bool exclude(G4ThreeVector& point, int zside, int layer, int waferU, int waferV); private: const HGCalDDDConstants& hgcons_; diff --git a/SimG4CMS/Calo/interface/HGCalSD.h b/SimG4CMS/Calo/interface/HGCalSD.h index 913318da433fc..4cf1747f3eeda 100644 --- a/SimG4CMS/Calo/interface/HGCalSD.h +++ b/SimG4CMS/Calo/interface/HGCalSD.h @@ -9,6 +9,7 @@ #include "SimG4CMS/Calo/interface/CaloSD.h" #include "SimG4Core/Notification/interface/BeginOfJob.h" #include "SimG4CMS/Calo/interface/HGCalNumberingScheme.h" +#include "SimG4CMS/Calo/interface/HGCGuardRing.h" #include "SimG4CMS/Calo/interface/HGCMouseBite.h" #include @@ -41,6 +42,7 @@ class HGCalSD : public CaloSD, public Observer { const HGCalDDDConstants *hgcons_; std::unique_ptr numberingScheme_; + std::unique_ptr guardRing_; std::unique_ptr mouseBite_; DetId::Detector mydet_; std::string nameX_; diff --git a/SimG4CMS/Calo/src/HFNoseSD.cc b/SimG4CMS/Calo/src/HFNoseSD.cc index 515c74bef2993..d64362fea56f1 100644 --- a/SimG4CMS/Calo/src/HFNoseSD.cc +++ b/SimG4CMS/Calo/src/HFNoseSD.cc @@ -39,8 +39,10 @@ HFNoseSD::HFNoseSD(const std::string& name, slopeMin_(0), levelT1_(99), levelT2_(99), + useSimWt_(0), tan30deg_(std::tan(30.0 * CLHEP::deg)) { numberingScheme_.reset(nullptr); + guardRing_.reset(nullptr); mouseBite_.reset(nullptr); edm::ParameterSet m_HFN = p.getParameter("HFNoseSD"); @@ -118,27 +120,22 @@ uint32_t HFNoseSD::setDetUnitId(const G4Step* aStep) { float globalZ = touch->GetTranslation(0).z(); int iz(globalZ > 0 ? 1 : -1); - int layer, module, cell; - if ((touch->GetHistoryDepth() == levelT1_) || (touch->GetHistoryDepth() == levelT2_)) { + int layer(-1), moduleLev(-1), cell(-1); + if (useSimWt_ > 0) { + layer = touch->GetReplicaNumber(2); + moduleLev = 1; + } else if ((touch->GetHistoryDepth() == levelT1_) || (touch->GetHistoryDepth() == levelT2_)) { layer = touch->GetReplicaNumber(0); - module = -1; - cell = -1; -#ifdef EDM_ML_DEBUG - edm::LogVerbatim("HFNSim") << "DepthsTop: " << touch->GetHistoryDepth() << ":" << levelT1_ << ":" << levelT2_ - << " name " << touch->GetVolume(0)->GetName() << " layer:module:cell " << layer << ":" - << module << ":" << cell; -#endif } else { layer = touch->GetReplicaNumber(3); - module = touch->GetReplicaNumber(2); cell = touch->GetReplicaNumber(1); -#ifdef EDM_ML_DEBUG - edm::LogVerbatim("HFNSim") << "DepthsInside: " << touch->GetHistoryDepth() << " name " - << touch->GetVolume(0)->GetName() << " layer:module:cell " << layer << ":" << module - << ":" << cell; -#endif + moduleLev = 2; } + int module = (moduleLev >= 0) ? touch->GetReplicaNumber(moduleLev) : -1; #ifdef EDM_ML_DEBUG + edm::LogVerbatim("HFNSim") << "DepthsInside: " << touch->GetHistoryDepth() << " name " + << touch->GetVolume(0)->GetName() << " layer:module:cell " << layer << ":" << moduleLev + << ":" << module << ":" << cell; G4Material* mat = aStep->GetPreStepPoint()->GetMaterial(); edm::LogVerbatim("HFNSim") << "Depths: " << touch->GetHistoryDepth() << " name " << touch->GetVolume(0)->GetName() << ":" << touch->GetReplicaNumber(0) << " " << touch->GetVolume(1)->GetName() << ":" @@ -154,15 +151,15 @@ uint32_t HFNoseSD::setDetUnitId(const G4Step* aStep) { return 0; uint32_t id = setDetUnitId(layer, module, cell, iz, hitPoint); - if (rejectMB_ && id != 0) { + if ((rejectMB_ || fiducialCut_) && id != 0) { auto uv = HFNoseDetId(id).waferUV(); #ifdef EDM_ML_DEBUG edm::LogVerbatim("HFNSim") << "ID " << std::hex << id << std::dec << " " << HFNoseDetId(id); #endif - if (mouseBite_->exclude(hitPoint, iz, uv.first, uv.second)) { + if ((rejectMB_) && (mouseBite_->exclude(hitPoint, iz, layer, uv.first, uv.second))) { id = 0; #ifdef EDM_ML_DEBUG - edm::LogVerbatim("HFNSim") << "Rejected by mousebite cutoff *****"; + edm::LogVerbatim("HFNSim") << "Rejected by MouseBite cutoff *****"; #endif } } @@ -175,13 +172,18 @@ void HFNoseSD::update(const BeginOfJob* job) { slopeMin_ = hgcons_->minSlope(); levelT1_ = hgcons_->levelTop(0); levelT2_ = hgcons_->levelTop(1); + int useOffset = hgcons_->getParameter()->useOffset_; double waferSize = hgcons_->waferSize(false); double mouseBite = hgcons_->mouseBite(false); mouseBiteCut_ = waferSize * tan30deg_ - mouseBite; + if (useOffset > 0) { + rejectMB_ = true; + fiducialCut_ = true; + } #ifdef EDM_ML_DEBUG edm::LogVerbatim("HFNSim") << "HFNoseSD::Initialized with mode " << geom_mode_ << " Slope cut " << slopeMin_ << " top Level " << levelT1_ << ":" << levelT2_ << " wafer " << waferSize << ":" - << mouseBite; + << mouseBite << " useOffset " << useOffset; #endif numberingScheme_ = std::make_unique(*hgcons_); diff --git a/SimG4CMS/Calo/src/HGCGuradRing.cc b/SimG4CMS/Calo/src/HGCGuradRing.cc new file mode 100644 index 0000000000000..ff3f104a76041 --- /dev/null +++ b/SimG4CMS/Calo/src/HGCGuradRing.cc @@ -0,0 +1,83 @@ +#include "SimG4CMS/Calo/interface/HGCGuardRing.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "Geometry/HGCalCommonData/interface/HGCalWaferMask.h" +#include "Geometry/HGCalCommonData/interface/HGCalWaferType.h" +#include + +//#define EDM_ML_DEBUG + +HGCGuardRing::HGCGuardRing(const HGCalDDDConstants& hgc) : + hgcons_(hgc), + modeUV_(hgcons_.geomMode()), + waferSize_(hgcons_.waferSize(false)), + sensorSizeOffset_(hgcons_.getParameter()->sensorSizeOffset_), + guardRingOffset_(hgcons_.getParameter()->guardRingOffset_) { + offset_ = sensorSizeOffset_ + 2.0 * guardRingOffset_; + xmax_ = 0.5 * (waferSize_ - offset_); + ymax_ = xmax_ / sqrt3_; +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCSim") << "Creating HGCGuardRing with wafer size " << waferSize_ << ", Offsets " << sensorSizeOffset_ << ":" << guardRingOffset_ << ":" << offset_<< ", and mode " << modeUV_ << " xmax|ymax " << xmax_ << ":" << ymax_; +#endif +} + +bool HGCGuardRing::exclude(G4ThreeVector& point, int zside, int frontBack, int layer, int waferU, int waferV) { + bool check(false); + if ((modeUV_ == HGCalGeometryMode::Hexagon8Module) || + (modeUV_ == HGCalGeometryMode::Hexagon8Cassette)) { + int index = HGCalWaferIndex::waferIndex(layer, waferU, waferV); + int partial = HGCalWaferType::getPartial(index, hgcons_.getParameter()->waferInfoMap_); + if (partial == HGCalTypes::WaferFull) { + double dx = std::abs(point.x()); + double dy = std::abs(point.y()); + if (dx > xmax_) { + check = true; + } else if (dy > (2 * ymax_)) { + check = true; + } else { + check = (dx > (sqrt3_ * (2 * ymax_ - dy))); + } +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCSim") << "HGCGuardRing:: Point " << point << " zside " << zside << " layer " << layer << " wafer " << waferU << ":" << waferV << " partial type " << partial << ":" << HGCalTypes::WaferFull << " x " << dx << ":" << xmax_ << " y " << dy << ":" << ymax_ << " check " << check; +#endif + } else { + int orient = HGCalWaferType::getOrient(index, hgcons_.getParameter()->waferInfoMap_); + if (modeUV_ == HGCalGeometryMode::Hexagon8Module) { + std::vector > wxy = HGCalWaferMask::waferXY(partial, orient, zside, waferSize_, offset_, 0.0, 0.0); + check = insidePolygon(point.x(), point.y(), wxy); + } else { + int placement = HGCalCell::cellPlacementIndex(zside, frontBack, orient); + std::vector > wxy = + HGCalWaferMask::waferXY(partial, placement, waferSize_, offset_, 0.0, 0.0); + check = insidePolygon(point.x(), point.y(), wxy); + } + } + } + return check; +} + +bool HGCGuardRing::insidePolygon(double x, double y, const std::vector >& xyv) { + int counter(0); + double x1(xyv[0].first), y1(xyv[0].second); + for (unsigned i1 = 1; i1 <= xyv.size(); i1++) { + unsigned i2 = (i1 % xyv.size()); + double x2(xyv[i2].first), y2(xyv[i2].second); + if (y > std::min(y1, y2)) { + if (y <= std::max(y1, y2)) { + if (x <= std::max(x1, x2)) { + if (y1 != y2) { + double xinter = (y - y1) * (x2 - x1) / (y2 - y1) + x1; + if ((x1 == x2) || (x <= xinter)) + ++counter; + } + } + } + } + x1 = x2; + y1 = y2; + } + + if (counter % 2 == 0) + return false; + else + return true; +} diff --git a/SimG4CMS/Calo/src/HGCMouseBite.cc b/SimG4CMS/Calo/src/HGCMouseBite.cc index 3e8ee3c5f3060..9aaf203aa352a 100644 --- a/SimG4CMS/Calo/src/HGCMouseBite.cc +++ b/SimG4CMS/Calo/src/HGCMouseBite.cc @@ -21,19 +21,23 @@ HGCMouseBite::HGCMouseBite(const HGCalDDDConstants& hgc, const std::vector xy = - (modeUV_ ? hgcons_.waferPosition(lay, waferU, waferV, false, false) : hgcons_.waferPosition(waferU, false)); - double xx = (zside > 0) ? xy.first : -xy.first; double dx(0), dy(0); - if (rot_) { - dx = std::abs(point.y() - xy.second); - dy = std::abs(point.x() - xx); + if (point == G4ThreeVector()) { + std::pair xy = + (modeUV_ ? hgcons_.waferPosition(lay, waferU, waferV, false, false) : hgcons_.waferPosition(waferU, false)); + double xx = (zside > 0) ? xy.first : -xy.first; + if (rot_) { + dx = std::abs(point.y() - xy.second); + dy = std::abs(point.x() - xx); + } else { + dx = std::abs(point.x() - xx); + dy = std::abs(point.y() - xy.second); + } } else { - dx = std::abs(point.x() - xx); - dy = std::abs(point.y() - xy.second); + dx = std::abs(point.x()); + dy = std::abs(point.y()); } for (auto proj : projXY_) { double dist = dx * proj.first + dy * proj.second; @@ -44,8 +48,7 @@ bool HGCMouseBite::exclude(G4ThreeVector& point, int zside, int waferU, int wafe } #ifdef EDM_ML_DEBUG edm::LogVerbatim("HGCSim") << "HGCMouseBite:: Point " << point << " zside " << zside << " wafer " << waferU << ":" - << waferV << " position " << xy.first << ":" << xx << ":" << xy.second << " dxy " << dx - << ":" << dy << " check " << check; + << waferV << " position " << dx << ":" << dy << " check " << check; #endif return check; } diff --git a/SimG4CMS/Calo/src/HGCSD.cc b/SimG4CMS/Calo/src/HGCSD.cc index a5269da56f9aa..1af4a689009a6 100644 --- a/SimG4CMS/Calo/src/HGCSD.cc +++ b/SimG4CMS/Calo/src/HGCSD.cc @@ -121,13 +121,13 @@ double HGCSD::getEnergyDeposit(const G4Step* aStep) { #ifdef plotDebug const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable(); G4double tmptrackE = aStep->GetTrack()->GetKineticEnergy(); - G4int parCode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding(); + G4int parCodex = aStep->GetTrack()->GetDefinition()->GetPDGEncoding(); G4double angle = (aStep->GetTrack()->GetMomentumDirection().theta()) / CLHEP::deg; G4int layer = ((touch->GetHistoryDepth() == levelT_) ? touch->GetReplicaNumber(0) : touch->GetReplicaNumber(2)); G4int ilayer = (layer - 1) / 3; if (aStep->GetTotalEnergyDeposit() > 0) { t_Layer_.emplace_back(ilayer); - t_Parcode_.emplace_back(parCode); + t_Parcode_.emplace_back(parCodex); t_dEStep1_.emplace_back(aStep->GetTotalEnergyDeposit()); t_dEStep2_.emplace_back(destep); t_TrackE_.emplace_back(tmptrackE); @@ -153,29 +153,27 @@ uint32_t HGCSD::setDetUnitId(const G4Step* aStep) { //get the det unit id with ForwardSubdetector subdet = myFwdSubdet_; - int layer, module, cell; + int layer(-1), moduleLev(-1), module(-1), cell(-1); if (touch->GetHistoryDepth() == levelT_) { layer = touch->GetReplicaNumber(0); - module = -1; - cell = -1; #ifdef EDM_ML_DEBUG edm::LogVerbatim("HGCSim") << "Depths: " << touch->GetHistoryDepth() << " name " << touch->GetVolume(0)->GetName() - << " layer:module:cell " << layer << ":" << module << ":" << cell; + << " layer:module:cell " << layer << ":" << moduleLev << ":" << module << ":" << cell; #endif } else { layer = touch->GetReplicaNumber(2); module = touch->GetReplicaNumber(1); cell = touch->GetReplicaNumber(0); + moduleLev = 1; } #ifdef EDM_ML_DEBUG const G4Material* mat = aStep->GetPreStepPoint()->GetMaterial(); edm::LogVerbatim("HGCSim") << "Depths: " << touch->GetHistoryDepth() << " name " << touch->GetVolume(0)->GetName() << ":" << touch->GetReplicaNumber(0) << " " << touch->GetVolume(1)->GetName() << ":" << touch->GetReplicaNumber(1) << " " << touch->GetVolume(2)->GetName() << ":" - << touch->GetReplicaNumber(2) << " layer:module:cell " << layer << ":" << module << ":" - << cell << " Material " << mat->GetName() << ":" << mat->GetRadlen(); -//for (int k = 0; k< touch->GetHistoryDepth(); ++k) -// edm::LogVerbatim("HGCSim") << "Level [" << k << "] " << touch->GetVolume(k)->GetName() << ":" << touch->GetReplicaNumber(k); + << touch->GetReplicaNumber(2) << " layer:module:cell " << layer << ":" << moduleLev << ":" << module << ":" << cell << " Material " << mat->GetName() << ":" << mat->GetRadlen(); + for (int k = 0; k< touch->GetHistoryDepth(); ++k) + edm::LogVerbatim("HGCSim") << "Level [" << k << "] " << touch->GetVolume(k)->GetName() << ":" << touch->GetReplicaNumber(k); #endif // The following statement should be examined later before elimination // VI: this is likely a check if media is vacuum - not needed @@ -192,7 +190,8 @@ uint32_t HGCSD::setDetUnitId(const G4Step* aStep) { << " Decode " << det << ":" << z << ":" << lay << ":" << wafer << ":" << type << ":" << ic; #endif - if (mouseBite_->exclude(hitPoint, z, wafer, 0)) + G4ThreeVector local = ((moduleLev >= 0) ? (touch->GetHistory()->GetTransform(moduleLev).TransformPoint(hitPoint)) : G4ThreeVector()); + if (mouseBite_->exclude(local, z, layer, wafer, 0)) id = 0; } return id; diff --git a/SimG4CMS/Calo/src/HGCalSD.cc b/SimG4CMS/Calo/src/HGCalSD.cc index b3bbf0321ef3b..324d4e5e5818b 100644 --- a/SimG4CMS/Calo/src/HGCalSD.cc +++ b/SimG4CMS/Calo/src/HGCalSD.cc @@ -43,12 +43,12 @@ HGCalSD::HGCalSD(const std::string& name, useSimWt_(0), tan30deg_(std::tan(30.0 * CLHEP::deg)) { numberingScheme_.reset(nullptr); + guardRing_.reset(nullptr); mouseBite_.reset(nullptr); edm::ParameterSet m_HGC = p.getParameter("HGCSD"); eminHit_ = m_HGC.getParameter("EminHit") * CLHEP::MeV; fiducialCut_ = m_HGC.getParameter("FiducialCut"); - distanceFromEdge_ = m_HGC.getParameter("DistanceFromEdge"); storeAllG4Hits_ = m_HGC.getParameter("StoreAllG4Hits"); rejectMB_ = m_HGC.getParameter("RejectMouseBite"); waferRot_ = m_HGC.getParameter("RotatedWafer"); @@ -138,43 +138,24 @@ uint32_t HGCalSD::setDetUnitId(const G4Step* aStep) { float globalZ = touch->GetTranslation(0).z(); int iz(globalZ > 0 ? 1 : -1); - int layer(0), module(-1), cell(-1); - if ((geom_mode_ == HGCalGeometryMode::Hexagon8Module) || (geom_mode_ == HGCalGeometryMode::Hexagon8Cassette)) { - if (useSimWt_ > 0) { - layer = touch->GetReplicaNumber(2); - module = touch->GetReplicaNumber(1); - } else if (touch->GetHistoryDepth() > levelT2_) { - layer = touch->GetReplicaNumber(4); - module = touch->GetReplicaNumber(3); - cell = touch->GetReplicaNumber(1); - } else { - layer = touch->GetReplicaNumber(3); - module = touch->GetReplicaNumber(2); - } -#ifdef EDM_ML_DEBUG - edm::LogVerbatim("HGCSim") << "DepthsTop: " << touch->GetHistoryDepth() << ":" << levelT1_ << ":" << levelT2_ << ":" - << useSimWt_ << " name " << touch->GetVolume(0)->GetName() << " layer:module:cell " - << layer << ":" << module << ":" << cell; - printDetectorLevels(touch); -#endif - } else if ((touch->GetHistoryDepth() == levelT1_) || (touch->GetHistoryDepth() == levelT2_)) { - layer = touch->GetReplicaNumber(0); -#ifdef EDM_ML_DEBUG - edm::LogVerbatim("HGCSim") << "DepthsTop: " << touch->GetHistoryDepth() << ":" << levelT1_ << ":" << levelT2_ - << " name " << touch->GetVolume(0)->GetName() << " layer:module:cell " << layer << ":" - << module << ":" << cell; -#endif + int layer(0), moduleLev(-1), cell(-1); + if (useSimWt_ > 0) { + layer = touch->GetReplicaNumber(2); + moduleLev = 1; + } else if (touch->GetHistoryDepth() > levelT2_) { + layer = touch->GetReplicaNumber(4); + cell = touch->GetReplicaNumber(1); + moduleLev = 3; } else { layer = touch->GetReplicaNumber(3); - module = touch->GetReplicaNumber(2); - cell = touch->GetReplicaNumber(1); -#ifdef EDM_ML_DEBUG - edm::LogVerbatim("HGCSim") << "DepthsInside: " << touch->GetHistoryDepth() << " name " - << touch->GetVolume(0)->GetName() << " layer:module:cell " << layer << ":" << module - << ":" << cell; -#endif + moduleLev = 2; } + int module = touch->GetReplicaNumber(moduleLev); #ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCSim") << "DepthsTop: " << touch->GetHistoryDepth() << ":" << levelT1_ << ":" << levelT2_ << ":" + << useSimWt_ << " name " << touch->GetVolume(0)->GetName() << " layer:module:cell " + << layer << ":" << moduleLev << ":" << module << ":" << cell; + printDetectorLevels(touch); G4Material* mat = aStep->GetPreStepPoint()->GetMaterial(); edm::LogVerbatim("HGCSim") << "Depths: " << touch->GetHistoryDepth() << " name " << touch->GetVolume(0)->GetName() << ":" << touch->GetReplicaNumber(0) << " " << touch->GetVolume(1)->GetName() << ":" @@ -190,15 +171,26 @@ uint32_t HGCalSD::setDetUnitId(const G4Step* aStep) { return 0; uint32_t id = setDetUnitId(layer, module, cell, iz, hitPoint); - if (rejectMB_ && id != 0) { + if ((rejectMB_ || fiducialCut_) && id != 0) { auto uv = HGCSiliconDetId(id).waferUV(); #ifdef EDM_ML_DEBUG edm::LogVerbatim("HGCSim") << "ID " << std::hex << id << std::dec << " " << HGCSiliconDetId(id); #endif - if (mouseBite_->exclude(hitPoint, iz, uv.first, uv.second)) { + G4ThreeVector local = (touch->GetHistory()->GetTransform(moduleLev).TransformPoint(hitPoint)); + if (fiducialCut_) { + int layertype = hgcons_->layerType(layer); + int frontBack = HGCalTypes::layerFrontBack(layertype); + if (guardRing_->exclude(local, iz, frontBack, layer, uv.first, uv.second)) { + id = 0; +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCSim") << "Rejected by GuardRing cutoff *****"; +#endif + } + } + if ((rejectMB_) && (mouseBite_->exclude(local, iz, layer, uv.first, uv.second))) { id = 0; #ifdef EDM_ML_DEBUG - edm::LogVerbatim("HGCSim") << "Rejected by mousebite cutoff *****"; + edm::LogVerbatim("HGCSim") << "Rejected by MouseBite cutoff *****"; #endif } } @@ -236,18 +228,25 @@ void HGCalSD::update(const BeginOfJob* job) { levelT1_ = hgcons_->levelTop(0); levelT2_ = hgcons_->levelTop(1); useSimWt_ = hgcons_->getParameter()->useSimWt_; + int useOffset = hgcons_->getParameter()->useOffset_; double waferSize = hgcons_->waferSize(false); double mouseBite = hgcons_->mouseBite(false); mouseBiteCut_ = waferSize * tan30deg_ - mouseBite; + if (useOffset > 0) { + rejectMB_ = true; + fiducialCut_ = true; + } #ifdef EDM_ML_DEBUG edm::LogVerbatim("HGCSim") << "HGCalSD::Initialized with mode " << geom_mode_ << " Slope cut " << slopeMin_ << " top Level " << levelT1_ << ":" << levelT2_ << " useSimWt " << useSimWt_ << " wafer " - << waferSize << ":" << mouseBite; + << waferSize << ":" << mouseBite << " useOffset " << useOffset; #endif numberingScheme_ = std::make_unique(*hgcons_, mydet_, nameX_, missingFile_); if (rejectMB_) mouseBite_ = std::make_unique(*hgcons_, angles_, mouseBiteCut_, waferRot_); + if (fiducialCut_) + guardRing_ = std::make_unique(*hgcons_); } else { throw cms::Exception("Unknown", "HGCalSD") << "Cannot find HGCalDDDConstants for " << nameX_ << "\n"; } @@ -271,11 +270,3 @@ uint32_t HGCalSD::setDetUnitId(int layer, int module, int cell, int iz, G4ThreeV ignoreRejection(); return id; } - -bool HGCalSD::isItinFidVolume(const G4ThreeVector& pos) { - if (fiducialCut_) { - return (hgcons_->distFromEdgeHex(pos.x(), pos.y(), pos.z()) > distanceFromEdge_); - } else { - return true; - } -} From 343912edcd51d733e858047d76fee04af8533f88 Mon Sep 17 00:00:00 2001 From: Sunanda Date: Tue, 14 Mar 2023 08:57:18 +0100 Subject: [PATCH 048/233] Code check --- .../HGCalCommonData/plugins/DDHGCalWaferP.cc | 2 +- .../plugins/dd4hep/DDHGCalWaferP.cc | 2 +- .../HGCalCommonData/src/HGCalWaferMask.cc | 4 +- SimG4CMS/Calo/src/HFNoseSD.cc | 4 +- SimG4CMS/Calo/src/HGCGuradRing.cc | 59 ++++++++++--------- SimG4CMS/Calo/src/HGCMouseBite.cc | 2 +- SimG4CMS/Calo/src/HGCSD.cc | 12 ++-- SimG4CMS/Calo/src/HGCalSD.cc | 8 +-- 8 files changed, 51 insertions(+), 42 deletions(-) diff --git a/Geometry/HGCalCommonData/plugins/DDHGCalWaferP.cc b/Geometry/HGCalCommonData/plugins/DDHGCalWaferP.cc index 995393d06994a..f8c8692bd26e3 100644 --- a/Geometry/HGCalCommonData/plugins/DDHGCalWaferP.cc +++ b/Geometry/HGCalCommonData/plugins/DDHGCalWaferP.cc @@ -113,7 +113,7 @@ void DDHGCalWaferP::execute(DDCompactView& cpv) { // First the mother std::string mother = parentName + tags_[k]; std::vector > wxy = - HGCalWaferMask::waferXY(partialTypes_[k], orientations_[k], 1, waferSize_, 0.0, 0.0, 0.0); + HGCalWaferMask::waferXY(partialTypes_[k], orientations_[k], 1, waferSize_, 0.0, 0.0, 0.0); std::vector xM, yM; for (unsigned int i = 0; i < (wxy.size() - 1); ++i) { xM.emplace_back(wxy[i].first); diff --git a/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalWaferP.cc b/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalWaferP.cc index 229c417bd48e8..c16085efc80a2 100644 --- a/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalWaferP.cc +++ b/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalWaferP.cc @@ -76,7 +76,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext // First the mother std::string mother = parentName + tags[k]; std::vector> wxy = - HGCalWaferMask::waferXY(partialTypes[k], orientations[k], 1, waferSize, 0.0, 0.0, 0.0); + HGCalWaferMask::waferXY(partialTypes[k], orientations[k], 1, waferSize, 0.0, 0.0, 0.0); std::vector xM, yM; for (unsigned int i = 0; i < (wxy.size() - 1); ++i) { xM.emplace_back(wxy[i].first); diff --git a/Geometry/HGCalCommonData/src/HGCalWaferMask.cc b/Geometry/HGCalCommonData/src/HGCalWaferMask.cc index 64036d7e873b0..4c123f0d08030 100644 --- a/Geometry/HGCalCommonData/src/HGCalWaferMask.cc +++ b/Geometry/HGCalCommonData/src/HGCalWaferMask.cc @@ -504,8 +504,8 @@ int HGCalWaferMask::getRotation(int zside, int type, int rotn) { std::pair HGCalWaferMask::getTypeMode(const double& xpos, const double& ypos, - const double& delX, - const double& delY, + const double& delX, + const double& delY, const double& rin, const double& rout, const int& wType, diff --git a/SimG4CMS/Calo/src/HFNoseSD.cc b/SimG4CMS/Calo/src/HFNoseSD.cc index d64362fea56f1..e141fd817f3cc 100644 --- a/SimG4CMS/Calo/src/HFNoseSD.cc +++ b/SimG4CMS/Calo/src/HFNoseSD.cc @@ -134,8 +134,8 @@ uint32_t HFNoseSD::setDetUnitId(const G4Step* aStep) { int module = (moduleLev >= 0) ? touch->GetReplicaNumber(moduleLev) : -1; #ifdef EDM_ML_DEBUG edm::LogVerbatim("HFNSim") << "DepthsInside: " << touch->GetHistoryDepth() << " name " - << touch->GetVolume(0)->GetName() << " layer:module:cell " << layer << ":" << moduleLev - << ":" << module << ":" << cell; + << touch->GetVolume(0)->GetName() << " layer:module:cell " << layer << ":" << moduleLev + << ":" << module << ":" << cell; G4Material* mat = aStep->GetPreStepPoint()->GetMaterial(); edm::LogVerbatim("HFNSim") << "Depths: " << touch->GetHistoryDepth() << " name " << touch->GetVolume(0)->GetName() << ":" << touch->GetReplicaNumber(0) << " " << touch->GetVolume(1)->GetName() << ":" diff --git a/SimG4CMS/Calo/src/HGCGuradRing.cc b/SimG4CMS/Calo/src/HGCGuradRing.cc index ff3f104a76041..2d520ffa50ccd 100644 --- a/SimG4CMS/Calo/src/HGCGuradRing.cc +++ b/SimG4CMS/Calo/src/HGCGuradRing.cc @@ -6,49 +6,54 @@ //#define EDM_ML_DEBUG -HGCGuardRing::HGCGuardRing(const HGCalDDDConstants& hgc) : - hgcons_(hgc), - modeUV_(hgcons_.geomMode()), - waferSize_(hgcons_.waferSize(false)), - sensorSizeOffset_(hgcons_.getParameter()->sensorSizeOffset_), - guardRingOffset_(hgcons_.getParameter()->guardRingOffset_) { +HGCGuardRing::HGCGuardRing(const HGCalDDDConstants& hgc) + : hgcons_(hgc), + modeUV_(hgcons_.geomMode()), + waferSize_(hgcons_.waferSize(false)), + sensorSizeOffset_(hgcons_.getParameter()->sensorSizeOffset_), + guardRingOffset_(hgcons_.getParameter()->guardRingOffset_) { offset_ = sensorSizeOffset_ + 2.0 * guardRingOffset_; xmax_ = 0.5 * (waferSize_ - offset_); ymax_ = xmax_ / sqrt3_; #ifdef EDM_ML_DEBUG - edm::LogVerbatim("HGCSim") << "Creating HGCGuardRing with wafer size " << waferSize_ << ", Offsets " << sensorSizeOffset_ << ":" << guardRingOffset_ << ":" << offset_<< ", and mode " << modeUV_ << " xmax|ymax " << xmax_ << ":" << ymax_; + edm::LogVerbatim("HGCSim") << "Creating HGCGuardRing with wafer size " << waferSize_ << ", Offsets " + << sensorSizeOffset_ << ":" << guardRingOffset_ << ":" << offset_ << ", and mode " + << modeUV_ << " xmax|ymax " << xmax_ << ":" << ymax_; #endif } bool HGCGuardRing::exclude(G4ThreeVector& point, int zside, int frontBack, int layer, int waferU, int waferV) { bool check(false); - if ((modeUV_ == HGCalGeometryMode::Hexagon8Module) || - (modeUV_ == HGCalGeometryMode::Hexagon8Cassette)) { + if ((modeUV_ == HGCalGeometryMode::Hexagon8Module) || (modeUV_ == HGCalGeometryMode::Hexagon8Cassette)) { int index = HGCalWaferIndex::waferIndex(layer, waferU, waferV); int partial = HGCalWaferType::getPartial(index, hgcons_.getParameter()->waferInfoMap_); if (partial == HGCalTypes::WaferFull) { double dx = std::abs(point.x()); double dy = std::abs(point.y()); if (dx > xmax_) { - check = true; + check = true; } else if (dy > (2 * ymax_)) { - check = true; + check = true; } else { - check = (dx > (sqrt3_ * (2 * ymax_ - dy))); + check = (dx > (sqrt3_ * (2 * ymax_ - dy))); } #ifdef EDM_ML_DEBUG - edm::LogVerbatim("HGCSim") << "HGCGuardRing:: Point " << point << " zside " << zside << " layer " << layer << " wafer " << waferU << ":" << waferV << " partial type " << partial << ":" << HGCalTypes::WaferFull << " x " << dx << ":" << xmax_ << " y " << dy << ":" << ymax_ << " check " << check; + edm::LogVerbatim("HGCSim") << "HGCGuardRing:: Point " << point << " zside " << zside << " layer " << layer + << " wafer " << waferU << ":" << waferV << " partial type " << partial << ":" + << HGCalTypes::WaferFull << " x " << dx << ":" << xmax_ << " y " << dy << ":" << ymax_ + << " check " << check; #endif } else { int orient = HGCalWaferType::getOrient(index, hgcons_.getParameter()->waferInfoMap_); if (modeUV_ == HGCalGeometryMode::Hexagon8Module) { - std::vector > wxy = HGCalWaferMask::waferXY(partial, orient, zside, waferSize_, offset_, 0.0, 0.0); - check = insidePolygon(point.x(), point.y(), wxy); + std::vector > wxy = + HGCalWaferMask::waferXY(partial, orient, zside, waferSize_, offset_, 0.0, 0.0); + check = insidePolygon(point.x(), point.y(), wxy); } else { - int placement = HGCalCell::cellPlacementIndex(zside, frontBack, orient); - std::vector > wxy = - HGCalWaferMask::waferXY(partial, placement, waferSize_, offset_, 0.0, 0.0); - check = insidePolygon(point.x(), point.y(), wxy); + int placement = HGCalCell::cellPlacementIndex(zside, frontBack, orient); + std::vector > wxy = + HGCalWaferMask::waferXY(partial, placement, waferSize_, offset_, 0.0, 0.0); + check = insidePolygon(point.x(), point.y(), wxy); } } } @@ -63,13 +68,13 @@ bool HGCGuardRing::insidePolygon(double x, double y, const std::vector std::min(y1, y2)) { if (y <= std::max(y1, y2)) { - if (x <= std::max(x1, x2)) { - if (y1 != y2) { - double xinter = (y - y1) * (x2 - x1) / (y2 - y1) + x1; - if ((x1 == x2) || (x <= xinter)) - ++counter; - } - } + if (x <= std::max(x1, x2)) { + if (y1 != y2) { + double xinter = (y - y1) * (x2 - x1) / (y2 - y1) + x1; + if ((x1 == x2) || (x <= xinter)) + ++counter; + } + } } } x1 = x2; @@ -78,6 +83,6 @@ bool HGCGuardRing::insidePolygon(double x, double y, const std::vector xy = - (modeUV_ ? hgcons_.waferPosition(lay, waferU, waferV, false, false) : hgcons_.waferPosition(waferU, false)); + (modeUV_ ? hgcons_.waferPosition(lay, waferU, waferV, false, false) : hgcons_.waferPosition(waferU, false)); double xx = (zside > 0) ? xy.first : -xy.first; if (rot_) { dx = std::abs(point.y() - xy.second); diff --git a/SimG4CMS/Calo/src/HGCSD.cc b/SimG4CMS/Calo/src/HGCSD.cc index 1af4a689009a6..c3450afb97ce0 100644 --- a/SimG4CMS/Calo/src/HGCSD.cc +++ b/SimG4CMS/Calo/src/HGCSD.cc @@ -171,9 +171,12 @@ uint32_t HGCSD::setDetUnitId(const G4Step* aStep) { edm::LogVerbatim("HGCSim") << "Depths: " << touch->GetHistoryDepth() << " name " << touch->GetVolume(0)->GetName() << ":" << touch->GetReplicaNumber(0) << " " << touch->GetVolume(1)->GetName() << ":" << touch->GetReplicaNumber(1) << " " << touch->GetVolume(2)->GetName() << ":" - << touch->GetReplicaNumber(2) << " layer:module:cell " << layer << ":" << moduleLev << ":" << module << ":" << cell << " Material " << mat->GetName() << ":" << mat->GetRadlen(); - for (int k = 0; k< touch->GetHistoryDepth(); ++k) - edm::LogVerbatim("HGCSim") << "Level [" << k << "] " << touch->GetVolume(k)->GetName() << ":" << touch->GetReplicaNumber(k); + << touch->GetReplicaNumber(2) << " layer:module:cell " << layer << ":" << moduleLev + << ":" << module << ":" << cell << " Material " << mat->GetName() << ":" + << mat->GetRadlen(); + for (int k = 0; k < touch->GetHistoryDepth(); ++k) + edm::LogVerbatim("HGCSim") << "Level [" << k << "] " << touch->GetVolume(k)->GetName() << ":" + << touch->GetReplicaNumber(k); #endif // The following statement should be examined later before elimination // VI: this is likely a check if media is vacuum - not needed @@ -190,7 +193,8 @@ uint32_t HGCSD::setDetUnitId(const G4Step* aStep) { << " Decode " << det << ":" << z << ":" << lay << ":" << wafer << ":" << type << ":" << ic; #endif - G4ThreeVector local = ((moduleLev >= 0) ? (touch->GetHistory()->GetTransform(moduleLev).TransformPoint(hitPoint)) : G4ThreeVector()); + G4ThreeVector local = + ((moduleLev >= 0) ? (touch->GetHistory()->GetTransform(moduleLev).TransformPoint(hitPoint)) : G4ThreeVector()); if (mouseBite_->exclude(local, z, layer, wafer, 0)) id = 0; } diff --git a/SimG4CMS/Calo/src/HGCalSD.cc b/SimG4CMS/Calo/src/HGCalSD.cc index 324d4e5e5818b..75bcc398c0770 100644 --- a/SimG4CMS/Calo/src/HGCalSD.cc +++ b/SimG4CMS/Calo/src/HGCalSD.cc @@ -153,8 +153,8 @@ uint32_t HGCalSD::setDetUnitId(const G4Step* aStep) { int module = touch->GetReplicaNumber(moduleLev); #ifdef EDM_ML_DEBUG edm::LogVerbatim("HGCSim") << "DepthsTop: " << touch->GetHistoryDepth() << ":" << levelT1_ << ":" << levelT2_ << ":" - << useSimWt_ << " name " << touch->GetVolume(0)->GetName() << " layer:module:cell " - << layer << ":" << moduleLev << ":" << module << ":" << cell; + << useSimWt_ << " name " << touch->GetVolume(0)->GetName() << " layer:module:cell " + << layer << ":" << moduleLev << ":" << module << ":" << cell; printDetectorLevels(touch); G4Material* mat = aStep->GetPreStepPoint()->GetMaterial(); edm::LogVerbatim("HGCSim") << "Depths: " << touch->GetHistoryDepth() << " name " << touch->GetVolume(0)->GetName() @@ -181,9 +181,9 @@ uint32_t HGCalSD::setDetUnitId(const G4Step* aStep) { int layertype = hgcons_->layerType(layer); int frontBack = HGCalTypes::layerFrontBack(layertype); if (guardRing_->exclude(local, iz, frontBack, layer, uv.first, uv.second)) { - id = 0; + id = 0; #ifdef EDM_ML_DEBUG - edm::LogVerbatim("HGCSim") << "Rejected by GuardRing cutoff *****"; + edm::LogVerbatim("HGCSim") << "Rejected by GuardRing cutoff *****"; #endif } } From 577d690e8195a1f42f9fbf692271fde17fea2d91 Mon Sep 17 00:00:00 2001 From: Sunanda Date: Tue, 14 Mar 2023 12:33:35 +0100 Subject: [PATCH 049/233] Update from Pruthvi --- .../HGCalCommonData/src/HGCalWaferMask.cc | 219 ++++++++++++++---- 1 file changed, 169 insertions(+), 50 deletions(-) diff --git a/Geometry/HGCalCommonData/src/HGCalWaferMask.cc b/Geometry/HGCalCommonData/src/HGCalWaferMask.cc index 4c123f0d08030..48abd8fafb5dc 100644 --- a/Geometry/HGCalCommonData/src/HGCalWaferMask.cc +++ b/Geometry/HGCalCommonData/src/HGCalWaferMask.cc @@ -1075,8 +1075,6 @@ bool HGCalWaferMask::goodTypeMode( std::vector > HGCalWaferMask::waferXY( int part, int ori, int zside, double waferSize, double offset, double xpos, double ypos) { // Good for V15 and V16 versions - double delX = 0.5 * waferSize; - double delY = delX / sin_60_; std::vector > xy; int orient = getRotation(-zside, part, ori); #ifdef EDM_ML_DEBUG @@ -1105,22 +1103,134 @@ std::vector > HGCalWaferMask::waferXY( Depending on the wafer type and orientation index, the corners are chosen in the variable *np* */ - double dx[24] = {HGCalTypes::c00 * delX, HGCalTypes::c10 * delX, HGCalTypes::c10 * delX, HGCalTypes::c00 * delX, + double delX = 0.5 * waferSize; + double delY = delX / sin_60_; + double dx[48] = {HGCalTypes::c00 * delX, HGCalTypes::c10 * delX, HGCalTypes::c10 * delX, HGCalTypes::c00 * delX, -HGCalTypes::c10 * delX, -HGCalTypes::c10 * delX, HGCalTypes::c50 * delX, HGCalTypes::c10 * delX, HGCalTypes::c50 * delX, -HGCalTypes::c50 * delX, -HGCalTypes::c10 * delX, -HGCalTypes::c50 * delX, HGCalTypes::c22 * delX, HGCalTypes::c10 * delX, HGCalTypes::c77 * delX, -HGCalTypes::c22 * delX, -HGCalTypes::c10 * delX, -HGCalTypes::c77 * delX, HGCalTypes::c22 * delX, -HGCalTypes::c77 * delX, + -HGCalTypes::c10 * delX, -HGCalTypes::c22 * delX, HGCalTypes::c77 * delX, HGCalTypes::c10 * delX, + HGCalTypes::c50 * delX, HGCalTypes::c10 * delX, HGCalTypes::c50 * delX, -HGCalTypes::c50 * delX, + -HGCalTypes::c10 * delX, -HGCalTypes::c50 * delX, HGCalTypes::c50 * delX, HGCalTypes::c10 * delX, + HGCalTypes::c50 * delX, -HGCalTypes::c50 * delX, -HGCalTypes::c10 * delX, -HGCalTypes::c50 * delX, + HGCalTypes::c22 * delX, HGCalTypes::c10 * delX, HGCalTypes::c77 * delX, -HGCalTypes::c22 * delX, + -HGCalTypes::c10 * delX, -HGCalTypes::c77 * delX, HGCalTypes::c22 * delX, -HGCalTypes::c77 * delX, -HGCalTypes::c10 * delX, -HGCalTypes::c22 * delX, HGCalTypes::c77 * delX, HGCalTypes::c10 * delX}; - double dy[24] = {-HGCalTypes::c10 * delY, -HGCalTypes::c50 * delY, HGCalTypes::c50 * delY, HGCalTypes::c10 * delY, + double dy[48] = {-HGCalTypes::c10 * delY, -HGCalTypes::c50 * delY, HGCalTypes::c50 * delY, HGCalTypes::c10 * delY, HGCalTypes::c50 * delY, -HGCalTypes::c50 * delY, -HGCalTypes::c75 * delY, HGCalTypes::c00 * delY, HGCalTypes::c75 * delY, HGCalTypes::c75 * delY, HGCalTypes::c00 * delY, -HGCalTypes::c75 * delY, -HGCalTypes::c88 * delY, -HGCalTypes::c27 * delY, HGCalTypes::c61 * delY, HGCalTypes::c88 * delY, HGCalTypes::c27 * delY, -HGCalTypes::c61 * delY, HGCalTypes::c88 * delY, HGCalTypes::c61 * delY, + -HGCalTypes::c27 * delY, -HGCalTypes::c88 * delY, -HGCalTypes::c61 * delY, HGCalTypes::c27 * delY, + -HGCalTypes::c75 * delY, HGCalTypes::c00 * delY, -HGCalTypes::c75 * delY, HGCalTypes::c00 * delY, + HGCalTypes::c75 * delY, HGCalTypes::c75 * delY, HGCalTypes::c00 * delY, -HGCalTypes::c75 * delY, + HGCalTypes::c75 * delY, HGCalTypes::c75 * delY, HGCalTypes::c00 * delY, -HGCalTypes::c75 * delY, + -HGCalTypes::c88 * delY, -HGCalTypes::c27 * delY, HGCalTypes::c61 * delY, HGCalTypes::c88 * delY, + HGCalTypes::c27 * delY, -HGCalTypes::c61 * delY, HGCalTypes::c88 * delY, HGCalTypes::c61 * delY, -HGCalTypes::c27 * delY, -HGCalTypes::c88 * delY, -HGCalTypes::c61 * delY, HGCalTypes::c27 * delY}; + + double offsetx[48] = {0.0, + -offset, + -offset, + 0.0, + offset, + offset, + -offset * cos_60_, + -offset, + -offset * cos_60_, + offset * cos_60_, + offset, + offset * cos_60_, + -offset * cos_60_, + -offset, + -offset * cos_60_, + offset * cos_60_, + offset, + offset * cos_60_, + -offset * cos_60_, + offset * cos_60_, + offset, + offset * cos_60_, + -offset * cos_60_, + -offset, + 0.0, + -offset, + -offset, + 0.0, + offset, + offset, + 0.0, + offset, + offset, + 0.0, + -offset, + -offset, + 0.0, + -offset, + -offset, + 0.0, + offset, + offset, + 0.0, + offset, + offset, + 0.0, + -offset, + -offset}; + double offsety[48] = {offset / sin_60_, + offset / tan_60_, + -offset / tan_60_, + -offset / sin_60_, + -offset / tan_60_, + offset / tan_60_, + offset * sin_60_, + 0.0, + -offset * sin_60_, + -offset * sin_60_, + 0.0, + offset * sin_60_, + offset * sin_60_, + 0.0, + -offset * sin_60_, + -offset * sin_60_, + 0.0, + offset * sin_60_, + -offset * sin_60_, + -offset * sin_60_, + 0.0, + offset * sin_60_, + offset * sin_60_, + 0.0, + offset / sin_60_, + offset / tan_60_, + -offset / tan_60_, + -offset / sin_60_, + -offset / tan_60_, + -offset / sin_60_, + -offset / tan_60_, + offset / tan_60_, + offset / sin_60_, + offset / tan_60_, + -offset / tan_60_, + offset / tan_60_, + offset / sin_60_, + offset / tan_60_, + -offset / tan_60_, + -offset / sin_60_, + -offset / tan_60_, + offset / tan_60_, + -offset / sin_60_, + -offset / tan_60_, + offset / tan_60_, + offset / sin_60_, + offset / tan_60_, + -offset / tan_60_}; + if (part == HGCalTypes::WaferFull) { int np[7] = {0, 1, 2, 3, 4, 5, 0}; for (int k = 0; k < 7; ++k) - xy.push_back(std::make_pair((xpos + dx[np[k]]), (ypos + dy[np[k]]))); + xy.push_back(std::make_pair((xpos + dx[np[k]] + offsetx[np[k]]), (ypos + dy[np[k]] + offsety[np[k]]))); } else if (part == HGCalTypes::WaferFive) { int np[6][6] = {{0, 2, 3, 4, 5, 0}, {1, 3, 4, 5, 0, 1}, @@ -1129,43 +1239,47 @@ std::vector > HGCalWaferMask::waferXY( {4, 0, 1, 2, 3, 4}, {5, 1, 2, 3, 4, 5}}; for (int k = 0; k < 6; ++k) { - xy.push_back(std::make_pair((xpos + dx[np[orient][k]]), (ypos + dy[np[orient][k]]))); + xy.push_back(std::make_pair((xpos + dx[np[orient][k]] + offsetx[np[orient][k]]), + (ypos + dy[np[orient][k]] + offsety[np[orient][k]]))); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] << ":" - << dy[np[orient][k]]; + edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] + offsetx[np[orient][k]])<< ":" + << dy[np[orient][k]] + offsety[np[orient][k]]; #endif } } else if (part == HGCalTypes::WaferHalf) { int np[6][5] = { {0, 3, 4, 5, 0}, {1, 4, 5, 0, 1}, {2, 5, 0, 1, 2}, {3, 0, 1, 2, 3}, {4, 1, 2, 3, 4}, {5, 2, 3, 4, 5}}; for (int k = 0; k < 5; ++k) { - xy.push_back(std::make_pair((xpos + dx[np[orient][k]]), (ypos + dy[np[orient][k]]))); + xy.push_back(std::make_pair((xpos + dx[np[orient][k]] + offsetx[np[orient][k]]), + (ypos + dy[np[orient][k]] + offsety[np[orient][k]]))); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] << ":" - << dy[np[orient][k]]; + edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] + offsetx[np[orient][k]])<< ":" + << dy[np[orient][k]] + offsety[np[orient][k]]; #endif } } else if (part == HGCalTypes::WaferThree) { int np[6][4] = {{0, 4, 5, 0}, {1, 5, 0, 1}, {2, 0, 1, 2}, {3, 1, 2, 3}, {4, 2, 3, 4}, {5, 3, 4, 5}}; for (int k = 0; k < 4; ++k) { - xy.push_back(std::make_pair((xpos + dx[np[orient][k]]), (ypos + dy[np[orient][k]]))); + xy.push_back(std::make_pair((xpos + dx[np[orient][k]] + offsetx[np[orient][k]]), + (ypos + dy[np[orient][k]] + offsety[np[orient][k]]))); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] << ":" - << dy[np[orient][k]]; + edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] + offsetx[np[orient][k]])<< ":" + << dy[np[orient][k]] + offsety[np[orient][k]]; #endif } } else if (part == HGCalTypes::WaferChopTwo) { - int np[6][7] = {{6, 8, 3, 4, 5, 0, 6}, - {7, 9, 4, 5, 0, 1, 7}, - {8, 10, 5, 0, 1, 2, 8}, - {9, 11, 0, 1, 2, 3, 9}, - {10, 6, 1, 2, 3, 4, 10}, - {11, 7, 2, 3, 4, 5, 11}}; + int np[6][7] = {{24, 32, 3, 4, 5, 0, 24}, + {25, 33, 4, 5, 0, 1, 25}, + {26, 34, 5, 0, 1, 2, 26}, + {27, 35, 0, 1, 2, 3, 27}, + {28, 30, 1, 2, 3, 4, 28}, + {29, 31, 2, 3, 4, 5, 29}}; for (int k = 0; k < 7; ++k) { - xy.push_back(std::make_pair((xpos + dx[np[orient][k]]), (ypos + dy[np[orient][k]]))); + xy.push_back(std::make_pair((xpos + dx[np[orient][k]] + offsetx[np[orient][k]]), + (ypos + dy[np[orient][k]] + offsety[np[orient][k]]))); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] << ":" - << dy[np[orient][k]]; + edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] + offsetx[np[orient][k]])<< ":" + << dy[np[orient][k]] + offsety[np[orient][k]]; #endif } } else if (part == HGCalTypes::WaferSemi) { @@ -1176,24 +1290,26 @@ std::vector > HGCalWaferMask::waferXY( {10, 7, 2, 3, 4, 10}, {11, 8, 3, 4, 5, 11}}; for (int k = 0; k < 6; ++k) { - xy.push_back(std::make_pair((xpos + dx[np[orient][k]]), (ypos + dy[np[orient][k]]))); + xy.push_back(std::make_pair((xpos + dx[np[orient][k]] + offsetx[np[orient][k]]), + (ypos + dy[np[orient][k]] + offsety[np[orient][k]]))); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] << ":" - << dy[np[orient][k]]; + edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] + offsetx[np[orient][k]])<< ":" + << dy[np[orient][k]] + offsety[np[orient][k]]; #endif } } else if (part == HGCalTypes::WaferChopTwoM) { - int np[6][7] = {{12, 18, 3, 4, 5, 0, 12}, - {13, 19, 4, 5, 0, 1, 13}, - {14, 20, 5, 0, 1, 2, 14}, - {15, 21, 0, 1, 2, 3, 15}, - {16, 22, 1, 2, 3, 4, 16}, - {17, 23, 2, 3, 4, 5, 17}}; + int np[6][7] = {{36, 42, 3, 4, 5, 0, 36}, + {37, 43, 4, 5, 0, 1, 37}, + {38, 44, 5, 0, 1, 2, 38}, + {39, 45, 0, 1, 2, 3, 39}, + {40, 46, 1, 2, 3, 4, 40}, + {41, 47, 2, 3, 4, 5, 41}}; for (int k = 0; k < 7; ++k) { - xy.push_back(std::make_pair((xpos + dx[np[orient][k]]), (ypos + dy[np[orient][k]]))); + xy.push_back(std::make_pair((xpos + dx[np[orient][k]] + offsetx[np[orient][k]]), + (ypos + dy[np[orient][k]] + offsety[np[orient][k]]))); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] << ":" - << dy[np[orient][k]]; + edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] + offsetx[np[orient][k]])<< ":" + << dy[np[orient][k]] + offsety[np[orient][k]]; #endif } } else if (part == HGCalTypes::WaferSemi2) { @@ -1204,10 +1320,11 @@ std::vector > HGCalWaferMask::waferXY( {16, 23, 2, 3, 4, 16}, {17, 18, 3, 4, 5, 17}}; for (int k = 0; k < 6; ++k) { - xy.push_back(std::make_pair((xpos + dx[np[orient][k]]), (ypos + dy[np[orient][k]]))); + xy.push_back(std::make_pair((xpos + dx[np[orient][k]] + offsetx[np[orient][k]]), + (ypos + dy[np[orient][k]] + offsety[np[orient][k]]))); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] << ":" - << dy[np[orient][k]]; + edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] + offsetx[np[orient][k]])<< ":" + << dy[np[orient][k]] + offsety[np[orient][k]]; #endif } } else if (part == HGCalTypes::WaferFive2) { @@ -1218,24 +1335,26 @@ std::vector > HGCalWaferMask::waferXY( {20, 13, 2, 3, 4, 20}, {21, 14, 3, 4, 5, 21}}; for (int k = 0; k < 6; ++k) { - xy.push_back(std::make_pair((xpos + dx[np[orient][k]]), (ypos + dy[np[orient][k]]))); + xy.push_back(std::make_pair((xpos + dx[np[orient][k]] + offsetx[np[orient][k]]), + (ypos + dy[np[orient][k]] + offsety[np[orient][k]]))); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] << ":" - << dy[np[orient][k]]; + edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] + offsetx[np[orient][k]])<< ":" + << dy[np[orient][k]] + offsety[np[orient][k]]; #endif } } else if (part == HGCalTypes::WaferHalf2) { - int np[6][5] = {{21, 15, 4, 5, 21}, - {22, 16, 5, 0, 22}, - {23, 17, 0, 1, 23}, - {18, 12, 1, 2, 18}, - {19, 13, 2, 3, 19}, - {20, 14, 3, 4, 20}}; + int np[6][5] = {{45, 39, 4, 5, 45}, + {47, 40, 5, 0, 47}, + {48, 41, 0, 1, 48}, + {42, 36, 1, 2, 42}, + {43, 37, 2, 3, 43}, + {44, 38, 3, 4, 44}}; for (int k = 0; k < 5; ++k) { - xy.push_back(std::make_pair((xpos + dx[np[orient][k]]), (ypos + dy[np[orient][k]]))); + xy.push_back(std::make_pair((xpos + dx[np[orient][k]] + offsetx[np[orient][k]]), + (ypos + dy[np[orient][k]] + offsety[np[orient][k]]))); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] << ":" - << dy[np[orient][k]]; + edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] + offsetx[np[orient][k]])<< ":" + << dy[np[orient][k]] + offsety[np[orient][k]]; #endif } } From 8972bf55fce0590145862015ef5ab1d766b580aa Mon Sep 17 00:00:00 2001 From: Sunanda Date: Tue, 14 Mar 2023 12:42:35 +0100 Subject: [PATCH 050/233] Code check --- Geometry/HGCalCommonData/src/HGCalWaferMask.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Geometry/HGCalCommonData/src/HGCalWaferMask.cc b/Geometry/HGCalCommonData/src/HGCalWaferMask.cc index 48abd8fafb5dc..3984d8ee412db 100644 --- a/Geometry/HGCalCommonData/src/HGCalWaferMask.cc +++ b/Geometry/HGCalCommonData/src/HGCalWaferMask.cc @@ -1111,11 +1111,11 @@ std::vector > HGCalWaferMask::waferXY( HGCalTypes::c22 * delX, HGCalTypes::c10 * delX, HGCalTypes::c77 * delX, -HGCalTypes::c22 * delX, -HGCalTypes::c10 * delX, -HGCalTypes::c77 * delX, HGCalTypes::c22 * delX, -HGCalTypes::c77 * delX, -HGCalTypes::c10 * delX, -HGCalTypes::c22 * delX, HGCalTypes::c77 * delX, HGCalTypes::c10 * delX, - HGCalTypes::c50 * delX, HGCalTypes::c10 * delX, HGCalTypes::c50 * delX, -HGCalTypes::c50 * delX, + HGCalTypes::c50 * delX, HGCalTypes::c10 * delX, HGCalTypes::c50 * delX, -HGCalTypes::c50 * delX, -HGCalTypes::c10 * delX, -HGCalTypes::c50 * delX, HGCalTypes::c50 * delX, HGCalTypes::c10 * delX, HGCalTypes::c50 * delX, -HGCalTypes::c50 * delX, -HGCalTypes::c10 * delX, -HGCalTypes::c50 * delX, - HGCalTypes::c22 * delX, HGCalTypes::c10 * delX, HGCalTypes::c77 * delX, -HGCalTypes::c22 * delX, - -HGCalTypes::c10 * delX, -HGCalTypes::c77 * delX, HGCalTypes::c22 * delX, -HGCalTypes::c77 * delX, + HGCalTypes::c22 * delX, HGCalTypes::c10 * delX, HGCalTypes::c77 * delX, -HGCalTypes::c22 * delX, + -HGCalTypes::c10 * delX, -HGCalTypes::c77 * delX, HGCalTypes::c22 * delX, -HGCalTypes::c77 * delX, -HGCalTypes::c10 * delX, -HGCalTypes::c22 * delX, HGCalTypes::c77 * delX, HGCalTypes::c10 * delX}; double dy[48] = {-HGCalTypes::c10 * delY, -HGCalTypes::c50 * delY, HGCalTypes::c50 * delY, HGCalTypes::c10 * delY, HGCalTypes::c50 * delY, -HGCalTypes::c50 * delY, -HGCalTypes::c75 * delY, HGCalTypes::c00 * delY, @@ -1125,7 +1125,7 @@ std::vector > HGCalWaferMask::waferXY( -HGCalTypes::c27 * delY, -HGCalTypes::c88 * delY, -HGCalTypes::c61 * delY, HGCalTypes::c27 * delY, -HGCalTypes::c75 * delY, HGCalTypes::c00 * delY, -HGCalTypes::c75 * delY, HGCalTypes::c00 * delY, HGCalTypes::c75 * delY, HGCalTypes::c75 * delY, HGCalTypes::c00 * delY, -HGCalTypes::c75 * delY, - HGCalTypes::c75 * delY, HGCalTypes::c75 * delY, HGCalTypes::c00 * delY, -HGCalTypes::c75 * delY, + HGCalTypes::c75 * delY, HGCalTypes::c75 * delY, HGCalTypes::c00 * delY, -HGCalTypes::c75 * delY, -HGCalTypes::c88 * delY, -HGCalTypes::c27 * delY, HGCalTypes::c61 * delY, HGCalTypes::c88 * delY, HGCalTypes::c27 * delY, -HGCalTypes::c61 * delY, HGCalTypes::c88 * delY, HGCalTypes::c61 * delY, -HGCalTypes::c27 * delY, -HGCalTypes::c88 * delY, -HGCalTypes::c61 * delY, HGCalTypes::c27 * delY}; From c4c7c68c36a05ab2023b54d6f740173ef93fdc94 Mon Sep 17 00:00:00 2001 From: qianying guo Date: Tue, 14 Mar 2023 15:53:12 +0100 Subject: [PATCH 051/233] update the TnP efficiency measurement of GEM for eta --- .../MuonDPG/plugins/GEMTnPEfficiencyTask.cc | 110 +++++++++--------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc b/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc index 0924d3539deab..a10a8d2aaf005 100644 --- a/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc +++ b/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc @@ -57,8 +57,8 @@ void GEMTnPEfficiencyTask::bookHistograms(DQMStore::IBooker& iBooker, MonitorElement* me_GEM_fail_Ch_region_GE1 = iBooker.book2D("GEM_nFailingProbe_Ch_region_GE1", "GEM_nFailingProbe_Ch_region_GE1", 4, 0, 4, 36, 1, 37); MonitorElement* me_GEM_pass_Ch_region_GE1_NoL = iBooker.book2D("GEM_nPassingProbe_Ch_region_GE1_NoL", "GEM_nPassingProbe_Ch_region_GE1_NoL", 2, 0, 2, 36, 1, 37); MonitorElement* me_GEM_fail_Ch_region_GE1_NoL = iBooker.book2D("GEM_nFailingProbe_Ch_region_GE1_NoL", "GEM_nFailingProbe_Ch_region_GE1_NoL", 2, 0, 2, 36, 1, 37); - MonitorElement* me_GEM_pass_Ch_eta = iBooker.book2D("GEM_nPassingProbe_Ch_eta", "GEM_nPassingProbe_Ch_eta", 24, -2.4, 2.4, 36, 1, 37); - MonitorElement* me_GEM_fail_Ch_eta = iBooker.book2D("GEM_nFailingProbe_Ch_eta", "GEM_nFailingProbe_Ch_eta", 24, -2.4, 2.4, 36, 1, 37); + MonitorElement* me_GEM_pass_Ch_eta = iBooker.book2D("GEM_nPassingProbe_Ch_eta", "GEM_nPassingProbe_Ch_eta", 24, 0, 2.4, 36, 1, 37); + MonitorElement* me_GEM_fail_Ch_eta = iBooker.book2D("GEM_nFailingProbe_Ch_eta", "GEM_nFailingProbe_Ch_eta", 24, 0, 2.4, 36, 1, 37); MonitorElement* me_GEM_pass_Ch_phi = iBooker.book2D("GEM_nPassingProbe_Ch_phi", "GEM_nPassingProbe_Ch_phi", 20, -TMath::Pi(), TMath::Pi(), 36, 1, 37); MonitorElement* me_GEM_fail_Ch_phi = iBooker.book2D("GEM_nFailingProbe_Ch_phi", "GEM_nFailingProbe_Ch_phi", 20, -TMath::Pi(), TMath::Pi(), 36, 1, 37); MonitorElement* me_GEM_pass_allCh_1D = iBooker.book1D("GEM_nPassingProbe_allCh_1D", "GEM_nPassingProbe_allCh_1D", 2, -1.5, 1.5); @@ -76,38 +76,38 @@ void GEMTnPEfficiencyTask::bookHistograms(DQMStore::IBooker& iBooker, // MonitorElement* me_GEM_pass_pt_1D = iBooker.book1D("GEM_nPassingProbe_pt_1D", "GEM_nPassingProbe_pt_1D", 20, 0, 100); MonitorElement* me_GEM_fail_pt_1D = iBooker.book1D("GEM_nFailingProbe_pt_1D", "GEM_nFailingProbe_pt_1D", 20, 0, 100); - MonitorElement* me_GEM_pass_eta_1D = iBooker.book1D("GEM_nPassingProbe_eta_1D", "GEM_nPassingProbe_eta_1D", 48, -2.4, 2.4); - MonitorElement* me_GEM_fail_eta_1D = iBooker.book1D("GEM_nFailingProbe_eta_1D", "GEM_nFailingProbe_eta_1D", 48, -2.4, 2.4); + MonitorElement* me_GEM_pass_eta_1D = iBooker.book1D("GEM_nPassingProbe_eta_1D", "GEM_nPassingProbe_eta_1D", 24, 0, 2.4); + MonitorElement* me_GEM_fail_eta_1D = iBooker.book1D("GEM_nFailingProbe_eta_1D", "GEM_nFailingProbe_eta_1D", 24, 0, 2.4); MonitorElement* me_GEM_pass_phi_1D = iBooker.book1D("GEM_nPassingProbe_phi_1D", "GEM_nPassingProbe_phi_1D", 20, -TMath::Pi(), TMath::Pi()); MonitorElement* me_GEM_fail_phi_1D = iBooker.book1D("GEM_nFailingProbe_phi_1D", "GEM_nFailingProbe_phi_1D", 20, -TMath::Pi(), TMath::Pi()); /// MonitorElement* me_GEM_pass_pt_p1_1D = iBooker.book1D("GEM_nPassingProbe_pt_p1_1D", "GEM_nPassingProbe_pt_p1_1D", 20, 0, 100); MonitorElement* me_GEM_fail_pt_p1_1D = iBooker.book1D("GEM_nFailingProbe_pt_p1_1D", "GEM_nFailingProbe_pt_p1_1D", 20, 0, 100); - MonitorElement* me_GEM_pass_eta_p1_1D = iBooker.book1D("GEM_nPassingProbe_eta_p1_1D", "GEM_nPassingProbe_eta_p1_1D", 48, -2.4, 2.4); - MonitorElement* me_GEM_fail_eta_p1_1D = iBooker.book1D("GEM_nFailingProbe_eta_p1_1D", "GEM_nFailingProbe_eta_p1_1D", 48, -2.4, 2.4); + MonitorElement* me_GEM_pass_eta_p1_1D = iBooker.book1D("GEM_nPassingProbe_eta_p1_1D", "GEM_nPassingProbe_eta_p1_1D", 24, 0, 2.4); + MonitorElement* me_GEM_fail_eta_p1_1D = iBooker.book1D("GEM_nFailingProbe_eta_p1_1D", "GEM_nFailingProbe_eta_p1_1D", 24, 0, 2.4); MonitorElement* me_GEM_pass_phi_p1_1D = iBooker.book1D("GEM_nPassingProbe_phi_p1_1D", "GEM_nPassingProbe_phi_p1_1D", 20, -TMath::Pi(), TMath::Pi()); MonitorElement* me_GEM_fail_phi_p1_1D = iBooker.book1D("GEM_nFailingProbe_phi_p1_1D", "GEM_nFailingProbe_phi_p1_1D", 20, -TMath::Pi(), TMath::Pi()); MonitorElement* me_GEM_pass_pt_p2_1D = iBooker.book1D("GEM_nPassingProbe_pt_p2_1D", "GEM_nPassingProbe_pt_p2_1D", 20, 0, 100); MonitorElement* me_GEM_fail_pt_p2_1D = iBooker.book1D("GEM_nFailingProbe_pt_p2_1D", "GEM_nFailingProbe_pt_p2_1D", 20, 0, 100); - MonitorElement* me_GEM_pass_eta_p2_1D = iBooker.book1D("GEM_nPassingProbe_eta_p2_1D", "GEM_nPassingProbe_eta_p2_1D", 48, -2.4, 2.4); - MonitorElement* me_GEM_fail_eta_p2_1D = iBooker.book1D("GEM_nFailingProbe_eta_p2_1D", "GEM_nFailingProbe_eta_p2_1D", 48, -2.4, 2.4); + MonitorElement* me_GEM_pass_eta_p2_1D = iBooker.book1D("GEM_nPassingProbe_eta_p2_1D", "GEM_nPassingProbe_eta_p2_1D", 24, 0, 2.4); + MonitorElement* me_GEM_fail_eta_p2_1D = iBooker.book1D("GEM_nFailingProbe_eta_p2_1D", "GEM_nFailingProbe_eta_p2_1D", 24, 0, 2.4); MonitorElement* me_GEM_pass_phi_p2_1D = iBooker.book1D("GEM_nPassingProbe_phi_p2_1D", "GEM_nPassingProbe_phi_p2_1D", 20, -TMath::Pi(), TMath::Pi()); MonitorElement* me_GEM_fail_phi_p2_1D = iBooker.book1D("GEM_nFailingProbe_phi_p2_1D", "GEM_nFailingProbe_phi_p2_1D", 20, -TMath::Pi(), TMath::Pi()); MonitorElement* me_GEM_pass_pt_n1_1D = iBooker.book1D("GEM_nPassingProbe_pt_n1_1D", "GEM_nPassingProbe_pt_n1_1D", 20, 0, 100); MonitorElement* me_GEM_fail_pt_n1_1D = iBooker.book1D("GEM_nFailingProbe_pt_n1_1D", "GEM_nFailingProbe_pt_n1_1D", 20, 0, 100); - MonitorElement* me_GEM_pass_eta_n1_1D = iBooker.book1D("GEM_nPassingProbe_eta_n1_1D", "GEM_nPassingProbe_eta_n1_1D", 48, -2.4, 2.4); - MonitorElement* me_GEM_fail_eta_n1_1D = iBooker.book1D("GEM_nFailingProbe_eta_n1_1D", "GEM_nFailingProbe_eta_n1_1D", 48, -2.4, 2.4); + MonitorElement* me_GEM_pass_eta_n1_1D = iBooker.book1D("GEM_nPassingProbe_eta_n1_1D", "GEM_nPassingProbe_eta_n1_1D", 24, 0, 2.4); + MonitorElement* me_GEM_fail_eta_n1_1D = iBooker.book1D("GEM_nFailingProbe_eta_n1_1D", "GEM_nFailingProbe_eta_n1_1D", 24, 0, 2.4); MonitorElement* me_GEM_pass_phi_n1_1D = iBooker.book1D("GEM_nPassingProbe_phi_n1_1D", "GEM_nPassingProbe_phi_n1_1D", 20, -TMath::Pi(), TMath::Pi()); MonitorElement* me_GEM_fail_phi_n1_1D = iBooker.book1D("GEM_nFailingProbe_phi_n1_1D", "GEM_nFailingProbe_phi_n1_1D", 20, -TMath::Pi(), TMath::Pi()); MonitorElement* me_GEM_pass_pt_n2_1D = iBooker.book1D("GEM_nPassingProbe_pt_n2_1D", "GEM_nPassingProbe_pt_n2_1D", 20, 0, 100); MonitorElement* me_GEM_fail_pt_n2_1D = iBooker.book1D("GEM_nFailingProbe_pt_n2_1D", "GEM_nFailingProbe_pt_n2_1D", 20, 0, 100); - MonitorElement* me_GEM_pass_eta_n2_1D = iBooker.book1D("GEM_nPassingProbe_eta_n2_1D", "GEM_nPassingProbe_eta_n2_1D", 48, -2.4, 2.4); - MonitorElement* me_GEM_fail_eta_n2_1D = iBooker.book1D("GEM_nFailingProbe_eta_n2_1D", "GEM_nFailingProbe_eta_n2_1D", 48, -2.4, 2.4); + MonitorElement* me_GEM_pass_eta_n2_1D = iBooker.book1D("GEM_nPassingProbe_eta_n2_1D", "GEM_nPassingProbe_eta_n2_1D", 24, 0, 2.4); + MonitorElement* me_GEM_fail_eta_n2_1D = iBooker.book1D("GEM_nFailingProbe_eta_n2_1D", "GEM_nFailingProbe_eta_n2_1D", 24, 0, 2.4); MonitorElement* me_GEM_pass_phi_n2_1D = iBooker.book1D("GEM_nPassingProbe_phi_n2_1D", "GEM_nPassingProbe_phi_n2_1D", 20, -TMath::Pi(), TMath::Pi()); MonitorElement* me_GEM_fail_phi_n2_1D = iBooker.book1D("GEM_nFailingProbe_phi_n2_1D", "GEM_nFailingProbe_phi_n2_1D", 20, -TMath::Pi(), TMath::Pi()); //// - MonitorElement* me_ME0_pass_chamber_1D = iBooker.book1D("ME0_nPassingProbe_chamber_1D", "ME0_nPassingProbe_chamber_1D", 19, 0, 19); - MonitorElement* me_ME0_fail_chamber_1D = iBooker.book1D("ME0_nFailingProbe_chamber_1D", "ME0_nFailingProbe_chamber_1D", 19, 0, 19); + MonitorElement* me_ME0_pass_chamber_1D = iBooker.book1D("ME0_nPassingProbe_chamber_1D", "ME0_nPassingProbe_chamber_1D", 18, 1, 19); + MonitorElement* me_ME0_fail_chamber_1D = iBooker.book1D("ME0_nFailingProbe_chamber_1D", "ME0_nFailingProbe_chamber_1D", 18, 1, 19); MonitorElement* me_GEM_pass_Ch_region_layer_phase2 = iBooker.book2D("GEM_nPassingProbe_Ch_region_layer_phase2", "GEM_nPassingProbe_Ch_region_layer_phase2", 10, 0, 10, 36, 1, 37); MonitorElement* me_GEM_fail_Ch_region_layer_phase2 = iBooker.book2D("GEM_nFailingProbe_Ch_region_layer_phase2", "GEM_nFailingProbe_Ch_region_layer_phase2", 10, 0, 10, 36, 1, 37); @@ -222,16 +222,16 @@ void GEMTnPEfficiencyTask::bookHistograms(DQMStore::IBooker& iBooker, me_GEM_fail_Ch_region->setBinLabel(1, "GE-11", 1); me_GEM_fail_Ch_region->setBinLabel(2, "GE11", 1); - for (int i=1; i<38; ++i){ - me_GEM_fail_Ch_region->setBinLabel(i, std::to_string(i-1), 2); + for (int i=1; i<37; ++i){ + me_GEM_fail_Ch_region->setBinLabel(i, std::to_string(i), 2); } me_GEM_fail_Ch_region->setAxisTitle("Chamber", 2); me_GEM_fail_Ch_region->setAxisTitle("Number of failing probes", 3); me_GEM_pass_Ch_region->setBinLabel(1, "GE-11", 1); me_GEM_pass_Ch_region->setBinLabel(2, "GE11", 1); - for (int i=1; i<38; ++i){ - me_GEM_pass_Ch_region->setBinLabel(i, std::to_string(i-1), 2); + for (int i=1; i<37; ++i){ + me_GEM_pass_Ch_region->setBinLabel(i, std::to_string(i), 2); } me_GEM_pass_Ch_region->setAxisTitle("Chamber", 2); me_GEM_pass_Ch_region->setAxisTitle("Number of passing probes", 3); @@ -240,8 +240,8 @@ void GEMTnPEfficiencyTask::bookHistograms(DQMStore::IBooker& iBooker, me_GEM_fail_Ch_region_GE1->setBinLabel(2, "GE-1/1_L1", 1); me_GEM_fail_Ch_region_GE1->setBinLabel(3, "GE1/1_L1", 1); me_GEM_fail_Ch_region_GE1->setBinLabel(4, "GE1/1_L2", 1); - for (int i=1; i<38; ++i){ - me_GEM_fail_Ch_region_GE1->setBinLabel(i, std::to_string(i-1), 2); + for (int i=1; i<37; ++i){ + me_GEM_fail_Ch_region_GE1->setBinLabel(i, std::to_string(i), 2); } me_GEM_fail_Ch_region_GE1->setAxisTitle("Chamber", 2); me_GEM_fail_Ch_region_GE1->setAxisTitle("Number of passing probes", 3); @@ -250,63 +250,63 @@ void GEMTnPEfficiencyTask::bookHistograms(DQMStore::IBooker& iBooker, me_GEM_pass_Ch_region_GE1->setBinLabel(2, "GE-1/1_L1", 1); me_GEM_pass_Ch_region_GE1->setBinLabel(3, "GE1/1_L1", 1); me_GEM_pass_Ch_region_GE1->setBinLabel(4, "GE1/1_L2", 1); - for (int i=1; i<38; ++i){ - me_GEM_pass_Ch_region_GE1->setBinLabel(i, std::to_string(i-1), 2); + for (int i=1; i<37; ++i){ + me_GEM_pass_Ch_region_GE1->setBinLabel(i, std::to_string(i), 2); } me_GEM_pass_Ch_region_GE1->setAxisTitle("Chamber", 2); me_GEM_pass_Ch_region_GE1->setAxisTitle("Number of passing probes", 3); me_GEM_fail_Ch_region_GE1_NoL->setBinLabel(1, "GE-1", 1); me_GEM_fail_Ch_region_GE1_NoL->setBinLabel(2, "GE+1", 1); - for (int i=1; i<38; ++i){ - me_GEM_fail_Ch_region_GE1_NoL->setBinLabel(i, std::to_string(i-1), 2); + for (int i=1; i<37; ++i){ + me_GEM_fail_Ch_region_GE1_NoL->setBinLabel(i, std::to_string(i), 2); } me_GEM_fail_Ch_region_GE1_NoL->setAxisTitle("Chamber", 2); me_GEM_fail_Ch_region_GE1_NoL->setAxisTitle("Number of passing probes", 3); me_GEM_pass_Ch_region_GE1_NoL->setBinLabel(1, "GE-1", 1); me_GEM_pass_Ch_region_GE1_NoL->setBinLabel(2, "GE+1", 1); - for (int i=1; i<38; ++i){ - me_GEM_pass_Ch_region_GE1_NoL->setBinLabel(i, std::to_string(i-1), 2); + for (int i=1; i<37; ++i){ + me_GEM_pass_Ch_region_GE1_NoL->setBinLabel(i, std::to_string(i), 2); } me_GEM_pass_Ch_region_GE1_NoL->setAxisTitle("Chamber", 2); me_GEM_pass_Ch_region_GE1_NoL->setAxisTitle("Number of passing probes", 3); - for (int i=1; i<38; ++i){ - me_GEM_fail_Ch_eta->setBinLabel(i, std::to_string(i-1), 2); + for (int i=1; i<37; ++i){ + me_GEM_fail_Ch_eta->setBinLabel(i, std::to_string(i), 2); } me_GEM_fail_Ch_eta->setAxisTitle("#eta", 1); me_GEM_fail_Ch_eta->setAxisTitle("Chamber", 2); me_GEM_fail_Ch_eta->setAxisTitle("Number of failing probes", 3); - for (int i=1; i<38; ++i){ - me_GEM_pass_Ch_eta->setBinLabel(i, std::to_string(i-1), 2); + for (int i=1; i<37; ++i){ + me_GEM_pass_Ch_eta->setBinLabel(i, std::to_string(i), 2); } me_GEM_pass_Ch_eta->setAxisTitle("#eta", 1); me_GEM_pass_Ch_eta->setAxisTitle("Chamber", 2); me_GEM_pass_Ch_eta->setAxisTitle("Number of passing probes", 3); - for (int i=1; i<38; ++i){ - me_GEM_fail_Ch_phi->setBinLabel(i, std::to_string(i-1), 2); + for (int i=1; i<37; ++i){ + me_GEM_fail_Ch_phi->setBinLabel(i, std::to_string(i), 2); } me_GEM_fail_Ch_phi->setAxisTitle("#phi", 1); me_GEM_fail_Ch_phi->setAxisTitle("Chamber", 2); me_GEM_fail_Ch_phi->setAxisTitle("Number of failing probes", 3); - for (int i=1; i<38; ++i){ - me_GEM_pass_Ch_phi->setBinLabel(i, std::to_string(i-1), 2); + for (int i=1; i<37; ++i){ + me_GEM_pass_Ch_phi->setBinLabel(i, std::to_string(i), 2); } me_GEM_pass_Ch_phi->setAxisTitle("#phi", 1); me_GEM_pass_Ch_phi->setAxisTitle("Chamber", 2); me_GEM_pass_Ch_phi->setAxisTitle("Number of passing probes", 3); - for (int i=1; i<20; ++i){ - me_ME0_pass_chamber_1D->setBinLabel(i, std::to_string(i-1), 1); + for (int i=1; i<19; ++i){ + me_ME0_pass_chamber_1D->setBinLabel(i, std::to_string(i), 1); } me_ME0_pass_chamber_1D->setAxisTitle("Chamber", 1); me_ME0_pass_chamber_1D->setAxisTitle("Number of passing probes", 2); - for (int i=1; i<20; ++i){ - me_ME0_fail_chamber_1D->setBinLabel(i, std::to_string(i-1), 1); + for (int i=1; i<19; ++i){ + me_ME0_fail_chamber_1D->setBinLabel(i, std::to_string(i), 1); } me_ME0_fail_chamber_1D->setAxisTitle("Chamber", 1); me_ME0_fail_chamber_1D->setAxisTitle("Number of failing probes", 2); @@ -321,8 +321,8 @@ void GEMTnPEfficiencyTask::bookHistograms(DQMStore::IBooker& iBooker, me_GEM_fail_Ch_region_layer_phase2->setBinLabel(8, "GE1/1_L2", 1); me_GEM_fail_Ch_region_layer_phase2->setBinLabel(9, "GE2/1_L1", 1); me_GEM_fail_Ch_region_layer_phase2->setBinLabel(10, "GE2/1_L2", 1); - for (int i=1; i<38; ++i){ - me_GEM_fail_Ch_region_layer_phase2->setBinLabel(i, std::to_string(i-1), 2); + for (int i=1; i<37; ++i){ + me_GEM_fail_Ch_region_layer_phase2->setBinLabel(i, std::to_string(i), 2); } me_GEM_fail_Ch_region_layer_phase2->setAxisTitle("Chamber", 2); me_GEM_fail_Ch_region_layer_phase2->setAxisTitle("Number of passing probes", 3); @@ -338,8 +338,8 @@ void GEMTnPEfficiencyTask::bookHistograms(DQMStore::IBooker& iBooker, me_GEM_pass_Ch_region_layer_phase2->setBinLabel(9, "GE2/1_L1", 1); me_GEM_pass_Ch_region_layer_phase2->setBinLabel(10, "GE2/1_L2", 1); - for (int i=1; i<38; ++i){ - me_GEM_pass_Ch_region_layer_phase2->setBinLabel(i, std::to_string(i-1), 2); + for (int i=1; i<37; ++i){ + me_GEM_pass_Ch_region_layer_phase2->setBinLabel(i, std::to_string(i), 2); } me_GEM_pass_Ch_region_layer_phase2->setAxisTitle("Chamber", 2); me_GEM_pass_Ch_region_layer_phase2->setAxisTitle("Number of passing probes", 3); @@ -572,7 +572,7 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu //Fill detailed plots if (m_detailedAnalysis && gem_matched) { - m_histos.find("probeEta")->second->Fill((*muons).at(i).eta()); + m_histos.find("probeEta")->second->Fill(abs((*muons).at(i).eta())); m_histos.find("probePhi")->second->Fill((*muons).at(i).phi()); m_histos.find("probeNumberOfMatchedStations")->second->Fill((*muons).at(i).numberOfMatchedStations()); m_histos.find("probePt")->second->Fill((*muons).at(i).pt()); @@ -671,7 +671,7 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu { if (GEM_region==1 && GEM_lay==0 && GEM_sta==2 && GEM_chamber==16) continue; //exclude GE2 ch16 of Run3 m_histos.find("GEM_nPassingProbe_Ch_region")->second->Fill(GEM_region, GEM_chamber); - m_histos.find("GEM_nPassingProbe_Ch_eta")->second->Fill(GEM_eta, GEM_chamber); + m_histos.find("GEM_nPassingProbe_Ch_eta")->second->Fill(abs(GEM_eta), GEM_chamber); m_histos.find("GEM_nPassingProbe_Ch_phi")->second->Fill(GEM_phi, GEM_chamber); m_histos.find("GEM_nPassingProbe_allCh_1D")->second->Fill(GEM_region); m_histos.find("GEM_nPassingProbe_chamber_1D")->second->Fill(GEM_chamber); @@ -708,39 +708,39 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu m_histos.find("GEM_nPassingProbe_chamber_p1_1D")->second->Fill(GEM_chamber); m_histos.find("GEM_nPassingProbe_Ch_region_GE1")->second->Fill(2, GEM_chamber); m_histos.find("GEM_nPassingProbe_pt_p1_1D")->second->Fill(GEM_pt); - m_histos.find("GEM_nPassingProbe_eta_p1_1D")->second->Fill(GEM_eta); + m_histos.find("GEM_nPassingProbe_eta_p1_1D")->second->Fill(abs(GEM_eta)); m_histos.find("GEM_nPassingProbe_phi_p1_1D")->second->Fill(GEM_phi); } else if(GEM_region==1 && GEM_lay==2 && GEM_sta==1){ m_histos.find("GEM_nPassingProbe_chamber_p2_1D")->second->Fill(GEM_chamber); m_histos.find("GEM_nPassingProbe_Ch_region_GE1")->second->Fill(3, GEM_chamber); m_histos.find("GEM_nPassingProbe_pt_p2_1D")->second->Fill(GEM_pt); - m_histos.find("GEM_nPassingProbe_eta_p2_1D")->second->Fill(GEM_eta); + m_histos.find("GEM_nPassingProbe_eta_p2_1D")->second->Fill(abs(GEM_eta)); m_histos.find("GEM_nPassingProbe_phi_p2_1D")->second->Fill(GEM_phi); } else if(GEM_region==-1 && GEM_lay==1 && GEM_sta==1){ m_histos.find("GEM_nPassingProbe_chamber_n1_1D")->second->Fill(GEM_chamber); m_histos.find("GEM_nPassingProbe_Ch_region_GE1")->second->Fill(1, GEM_chamber); m_histos.find("GEM_nPassingProbe_pt_n1_1D")->second->Fill(GEM_pt); - m_histos.find("GEM_nPassingProbe_eta_n1_1D")->second->Fill(GEM_eta); + m_histos.find("GEM_nPassingProbe_eta_n1_1D")->second->Fill(abs(GEM_eta)); m_histos.find("GEM_nPassingProbe_phi_n1_1D")->second->Fill(GEM_phi); } else if(GEM_region==-1 && GEM_lay==2 && GEM_sta==1){ m_histos.find("GEM_nPassingProbe_chamber_n2_1D")->second->Fill(GEM_chamber); m_histos.find("GEM_nPassingProbe_Ch_region_GE1")->second->Fill(0, GEM_chamber); m_histos.find("GEM_nPassingProbe_pt_n2_1D")->second->Fill(GEM_pt); - m_histos.find("GEM_nPassingProbe_eta_n2_1D")->second->Fill(GEM_eta); + m_histos.find("GEM_nPassingProbe_eta_n2_1D")->second->Fill(abs(GEM_eta)); m_histos.find("GEM_nPassingProbe_phi_n2_1D")->second->Fill(GEM_phi); } m_histos.find("GEM_nPassingProbe_pt_1D")->second->Fill(GEM_pt); - m_histos.find("GEM_nPassingProbe_eta_1D")->second->Fill(GEM_eta); + m_histos.find("GEM_nPassingProbe_eta_1D")->second->Fill(abs(GEM_eta)); m_histos.find("GEM_nPassingProbe_phi_1D")->second->Fill(GEM_phi); } else { if (GEM_region==1 && GEM_lay==0 && GEM_sta==2 && GEM_chamber==16) continue; m_histos.find("GEM_nFailingProbe_Ch_region")->second->Fill(GEM_region, GEM_chamber); - m_histos.find("GEM_nFailingProbe_Ch_eta")->second->Fill(GEM_eta, GEM_chamber); + m_histos.find("GEM_nFailingProbe_Ch_eta")->second->Fill(abs(GEM_eta), GEM_chamber); m_histos.find("GEM_nFailingProbe_Ch_phi")->second->Fill(GEM_phi, GEM_chamber); m_histos.find("GEM_nFailingProbe_allCh_1D")->second->Fill(GEM_region); m_histos.find("GEM_nFailingProbe_chamber_1D")->second->Fill(GEM_chamber); @@ -777,32 +777,32 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu m_histos.find("GEM_nFailingProbe_chamber_p1_1D")->second->Fill(GEM_chamber); m_histos.find("GEM_nFailingProbe_Ch_region_GE1")->second->Fill(2, GEM_chamber); m_histos.find("GEM_nFailingProbe_pt_p1_1D")->second->Fill(GEM_pt); - m_histos.find("GEM_nFailingProbe_eta_p1_1D")->second->Fill(GEM_eta); + m_histos.find("GEM_nFailingProbe_eta_p1_1D")->second->Fill(abs(GEM_eta)); m_histos.find("GEM_nFailingProbe_phi_p1_1D")->second->Fill(GEM_phi); } else if(GEM_region==1 && GEM_lay==2 && GEM_sta==1){ m_histos.find("GEM_nFailingProbe_chamber_p2_1D")->second->Fill(GEM_chamber); m_histos.find("GEM_nFailingProbe_Ch_region_GE1")->second->Fill(3, GEM_chamber); m_histos.find("GEM_nFailingProbe_pt_p2_1D")->second->Fill(GEM_pt); - m_histos.find("GEM_nFailingProbe_eta_p2_1D")->second->Fill(GEM_eta); + m_histos.find("GEM_nFailingProbe_eta_p2_1D")->second->Fill(abs(GEM_eta)); m_histos.find("GEM_nFailingProbe_phi_p2_1D")->second->Fill(GEM_phi); } else if(GEM_region==-1 && GEM_lay==1 && GEM_sta==1){ m_histos.find("GEM_nFailingProbe_chamber_n1_1D")->second->Fill(GEM_chamber); m_histos.find("GEM_nFailingProbe_Ch_region_GE1")->second->Fill(1, GEM_chamber); m_histos.find("GEM_nFailingProbe_pt_n1_1D")->second->Fill(GEM_pt); - m_histos.find("GEM_nFailingProbe_eta_n1_1D")->second->Fill(GEM_eta); + m_histos.find("GEM_nFailingProbe_eta_n1_1D")->second->Fill(abs(GEM_eta)); m_histos.find("GEM_nFailingProbe_phi_n1_1D")->second->Fill(GEM_phi); } else if(GEM_region==-1 && GEM_lay==2 && GEM_sta==1){ m_histos.find("GEM_nFailingProbe_chamber_n2_1D")->second->Fill(GEM_chamber); m_histos.find("GEM_nFailingProbe_Ch_region_GE1")->second->Fill(0, GEM_chamber); m_histos.find("GEM_nFailingProbe_pt_n2_1D")->second->Fill(GEM_pt); - m_histos.find("GEM_nFailingProbe_eta_n2_1D")->second->Fill(GEM_eta); + m_histos.find("GEM_nFailingProbe_eta_n2_1D")->second->Fill(abs(GEM_eta)); m_histos.find("GEM_nFailingProbe_phi_n2_1D")->second->Fill(GEM_phi); } m_histos.find("GEM_nFailingProbe_pt_1D")->second->Fill(GEM_pt); - m_histos.find("GEM_nFailingProbe_eta_1D")->second->Fill(GEM_eta); + m_histos.find("GEM_nFailingProbe_eta_1D")->second->Fill(abs(GEM_eta)); m_histos.find("GEM_nFailingProbe_phi_1D")->second->Fill(GEM_phi); } } From ac584e835f30f1f6640b4e751eab7cbc3370f8c9 Mon Sep 17 00:00:00 2001 From: mmusich Date: Mon, 13 Mar 2023 13:57:55 +0100 Subject: [PATCH 052/233] move RecoPixelVertexing subsystem to RecoTracker --- .../python/Reconstruction_cff.py | 2 +- .../python/HITpixelTripletRegGenerator_cfi.py | 2 +- .../EventContent/doc/EventContent.doc | 2 +- .../python/EventContentCosmics_cff.py | 2 +- .../EventContent/python/EventContent_cff.py | 2 +- .../python/relval_steps.py | 2 +- .../python/upgradeWorkflowComponents.py | 14 ++++----- .../python/ReconstructionHeavyIons_cff.py | 4 +-- .../python/Reconstruction_cff.py | 4 +-- .../clients/beam_dqm_sourceclient-live_cfg.py | 4 +-- .../beampixel_dqm_sourceclient-live_cfg.py | 4 +-- .../clients/hlt_dqm_sourceclient-live_cfg.py | 4 +-- .../pixel_dqm_sourceclient-live_cfg.py | 4 +-- .../sistrip_dqm_sourceclient-live_cfg.py | 4 +-- .../SiPixelPhase1OfflineDQM_source_cff.py | 2 +- DQM/SiPixelPhase1Track/plugins/BuildFile.xml | 2 +- .../plugins/SiPixelPhase1TrackClusters.cc | 2 +- .../python/RecoForDQM_cff.py | 2 +- .../python/SiPixel_OfflineMonitoring_cff.py | 2 +- FastSimulation/Tracking/BuildFile.xml | 2 +- FastSimulation/Tracking/plugins/BuildFile.xml | 2 +- .../Tracking/plugins/PixelTracksProducer.cc | 6 ++-- .../Tracking/python/hltPixelTracks_cff.py | 4 +-- .../Tracking/src/SeedFinderSelector.cc | 10 +++---- .../Configuration/python/HLT_75e33_cff.py | 4 +-- .../python/customizeHLTforCMSSW.py | 8 +++++ .../HiRegitMuonDetachedTripletStep_cff.py | 2 +- RecoHI/HiTracking/BuildFile.xml | 4 +-- .../HiTracking/interface/HIPixelTrackFilter.h | 2 +- .../HiTracking/interface/HIProtoTrackFilter.h | 2 +- RecoHI/HiTracking/plugins/BuildFile.xml | 2 +- .../plugins/HIPixelTrackFilterProducer.cc | 2 +- .../plugins/HIProtoTrackFilterProducer.cc | 2 +- .../HIInitialJetCoreClusterSplitting_cff.py | 2 +- .../python/HILowPtConformalPixelTracks_cfi.py | 12 ++++---- .../python/HIPixel3PrimTracks_cfi.py | 12 ++++---- .../python/HIPixel3ProtoTracks_cfi.py | 10 +++---- .../python/HIPixelTrackFilter_cff.py | 4 +-- .../python/HIPixelTripletSeeds_cff.py | 4 +-- .../python/hiDetachedQuadStep_cff.py | 16 +++++----- .../python/hiDetachedTripletStep_cff.py | 20 ++++++------- .../python/hiHighPtTripletStep_cff.py | 18 +++++------ .../HiTracking/python/hiLowPtQuadStep_cff.py | 20 ++++++------- .../python/hiLowPtTripletStep_cff.py | 22 +++++++------- .../python/hiRegitDetachedTripletStep_cff.py | 6 ++-- .../python/hiRegitLowPtTripletStep_cff.py | 6 ++-- RecoMuon/TrackerSeedGenerator/BuildFile.xml | 2 +- .../plugins/BuildFile.xml | 2 +- .../plugins/TSGFromL1Muon.cc | 2 +- .../python/TSGFromPixelTriplets_cfi.py | 2 +- .../python/TSGSmart_cff.py | 2 +- .../TrackerSeedGenerator/python/TSGs_cff.py | 2 +- ...TrackFilterByKinematicsForTSGFromL1_cfi.py | 2 +- .../src/L1MuonPixelTrackFitter.cc | 2 +- .../python/pixelNtupletsFitter_cfi.py | 6 ---- .../python/caHitQuadrupletEDProducer_cfi.py | 4 --- .../python/PixelVertexes_cff.py | 3 -- .../python/PixelTracksL2Tau_cfi.py | 2 +- .../HLTProducers/src/L2TauTagNNProducer.cc | 2 +- .../RecoPixelVertexing_EventContent_cff.py | 0 .../python/RecoPixelVertexing_cff.py | 12 ++++---- .../Configuration/python/RecoTrackerP5_cff.py | 2 +- .../python/customizePixelTracksForTriplets.py | 0 .../python/DetachedQuadStep_cff.py | 6 ++-- .../python/DetachedTripletStep_cff.py | 10 +++---- .../python/DisplacedGeneralStep_cff.py | 4 +-- .../python/ElectronSeeds_cff.py | 4 +-- .../python/HighPtTripletStep_cff.py | 10 +++---- .../python/InitialStepPreSplitting_cff.py | 16 +++++----- .../python/InitialStep_cff.py | 14 ++++----- .../python/LowPtBarrelTripletStep_cff.py | 6 ++-- .../python/LowPtForwardTripletStep_cff.py | 6 ++-- .../python/LowPtQuadStep_cff.py | 12 ++++---- .../python/LowPtTripletStep_cff.py | 12 ++++---- .../python/MixedTripletStep_cff.py | 6 ++-- .../python/PixelLessStep_cff.py | 6 ++-- .../python/PixelPairStep_cff.py | 6 ++-- .../python/TobTecStep_cff.py | 4 +-- .../PixelLowPtUtilities/BuildFile.xml | 4 +-- .../PixelLowPtUtilities/bin/BuildFile.xml | 2 +- .../bin/ClusterShapeAnalyzer.cpp | 0 .../bin/PixelClusterShapeExtractor.cc | 2 +- .../data/ITShapePhase2_all.par | 0 .../data/ITShapePhase2_noL1.par | 0 .../PixelLowPtUtilities/data/READE.md | 0 .../data/pixelShapePhase0.par | 0 .../data/pixelShapePhase1_all.par | 0 .../data/pixelShapePhase1_loose.par | 0 .../data/pixelShapePhase1_noL1.par | 0 .../PixelLowPtUtilities/data/stripShape.par | 0 .../interface/ClusterData.h | 0 .../interface/ClusterShape.h | 0 .../interface/ClusterShapeHitFilter.h | 2 +- .../interface/ClusterShapeTrackFilter.h | 2 +- .../interface/ClusterShapeTrajectoryFilter.h | 0 .../PixelLowPtUtilities/interface/HitInfo.h | 0 .../LowPtClusterShapeSeedComparitor.h | 2 +- .../interface/PixelTripletLowPtGenerator.h | 4 +-- .../StripSubClusterShapeTrajectoryFilter.h | 0 .../interface/ThirdHitPrediction.h | 0 .../interface/TrackCleaner.h | 4 +-- .../interface/TrackFitter.h | 2 +- .../interface/TripletFilter.h | 0 .../PixelLowPtUtilities/plugins/BuildFile.xml | 2 +- .../ClusterShapeHitFilterESProducer.cc | 6 ++-- .../plugins/ClusterShapeSeedComparitor.cc | 2 +- .../ClusterShapeTrackFilterProducer.cc | 4 +-- .../plugins/PixelVertexProducerClusters.cc | 0 .../plugins/PixelVertexProducerClusters.h | 0 .../plugins/PixelVertexProducerMedian.cc | 0 .../plugins/PixelVertexProducerMedian.h | 0 .../SiPixelClusterShapeCacheProducer.cc | 4 +-- .../plugins/TrackCleanerESProducer.cc | 2 +- .../plugins/TrackFitterProducer.cc | 4 +-- .../plugins/TrackListCombiner.cc | 0 .../plugins/TrackListCombiner.h | 0 .../PixelLowPtUtilities/plugins/modules.cc | 14 ++++----- .../python/AllPixelTracks_cfi.py | 8 ++--- .../python/ClusterShapeExtractor_cfi.py | 0 .../ClusterShapeHitFilterESProducer_cfi.py | 14 ++++----- .../ClusterShapeTrajectoryFilter_cfi.py | 0 .../LowPtClusterShapeSeedComparitor_cfi.py | 0 .../python/MinBiasCkfTrajectoryFilter_cfi.py | 4 +-- .../python/PixelMedianVertices_cfi.py | 0 .../python/StripSubClusterShapeFilter_cfi.py | 0 .../StripSubClusterShapeSeedFilter_cfi.py | 2 +- ...tripSubClusterShapeTrajectoryFilter_cfi.py | 2 +- .../python/TrackSeeds_cfi.py | 0 .../PixelLowPtUtilities/src/ClusterShape.cc | 4 +-- .../src/ClusterShapeHitFilter.cc | 4 +-- .../src/ClusterShapeTrackFilter.cc | 8 ++--- .../src/ClusterShapeTrajectoryFilter.cc | 4 +-- .../PixelLowPtUtilities/src/HitInfo.cc | 2 +- .../src/LowPtClusterShapeSeedComparitor.cc | 6 ++-- .../src/PixelTripletLowPtGenerator.cc | 8 ++--- .../StripSubClusterShapeTrajectoryFilter.cc | 4 +-- .../src/ThirdHitPrediction.cc | 4 +-- .../PixelLowPtUtilities/src/TrackCleaner.cc | 4 +-- .../PixelLowPtUtilities/src/TrackFitter.cc | 8 ++--- .../PixelLowPtUtilities/src/TripletFilter.cc | 6 ++-- .../PixelLowPtUtilities/test/BuildFile.xml | 6 ++-- .../test/ClusterShapeExtractor.cc | 2 +- .../test/ClusterShapeHitFilter_t.cpp | 8 ++--- .../test/LowPtGlobalDir_t.cpp | 2 +- .../PixelLowPtUtilities/test/README.md | 4 +-- .../test/clusterShapeExtractor_phase1_cfg.py | 2 +- .../test/clusterShapeExtractor_phase2_cfg.py | 2 +- .../PixelLowPtUtilities/test/pcsfVerify.ipynb | 0 .../PixelSeeding}/BuildFile.xml | 2 +- .../PixelSeeding}/interface/CACut.h | 4 +-- .../PixelSeeding}/interface/CAGraph.h | 0 .../interface/CAHitQuadrupletGenerator.h | 6 ++-- .../interface/CAHitTripletGenerator.h | 6 ++-- .../PixelSeeding}/interface/CircleEq.h | 0 .../interface/CosmicHitTripletGenerator.h | 4 +-- ...osmicHitTripletGeneratorFromLayerTriplet.h | 2 +- .../interface/CosmicLayerTriplets.h | 0 .../interface/HitTripletEDProducerT.h | 6 ++-- .../interface/HitTripletGenerator.h | 2 +- .../HitTripletGeneratorFromPairAndLayers.h | 2 +- ...TripletGeneratorFromPairAndLayersFactory.h | 2 +- .../interface/IntermediateHitTriplets.h | 2 +- .../PixelSeeding}/interface/LayerTriplets.h | 0 .../PixelSeeding}/interface/OrderedHitSeeds.h | 0 .../interface/OrderedHitTriplet.h | 0 .../interface/OrderedHitTriplets.h | 2 +- .../interface/ThirdHitPredictionFromCircle.h | 0 .../interface/ThirdHitRZPrediction.h | 2 +- .../interface/ThirdHitRZPredictionBase.h | 0 .../plugins/BrokenLineFitOnGPU.cc | 0 .../plugins/BrokenLineFitOnGPU.cu | 0 .../plugins/BrokenLineFitOnGPU.h | 2 +- .../PixelSeeding}/plugins/BuildFile.xml | 2 +- .../PixelSeeding}/plugins/CAHitNtupletCUDA.cc | 0 .../plugins/CAHitNtupletEDProducerT.cc | 6 ++-- .../plugins/CAHitNtupletGeneratorKernels.cc | 2 +- .../plugins/CAHitNtupletGeneratorKernels.cu | 2 +- .../plugins/CAHitNtupletGeneratorKernels.h | 0 .../CAHitNtupletGeneratorKernelsAlloc.cc | 0 .../CAHitNtupletGeneratorKernelsAlloc.cu | 0 .../CAHitNtupletGeneratorKernelsImpl.h | 0 .../plugins/CAHitNtupletGeneratorOnGPU.cc | 0 .../plugins/CAHitNtupletGeneratorOnGPU.h | 0 .../PixelSeeding}/plugins/CAStructures.h | 0 .../plugins/CombinedHitTripletGenerator.cc | 6 ++-- .../plugins/CombinedHitTripletGenerator.h | 2 +- .../PixelSeeding}/plugins/GPUCACell.h | 2 +- .../PixelSeeding}/plugins/HelixFitOnGPU.cc | 0 .../PixelSeeding}/plugins/HelixFitOnGPU.h | 2 +- .../MatchedHitRZCorrectionFromBending.cc | 2 +- .../MatchedHitRZCorrectionFromBending.h | 0 .../plugins/PixelTripletHLTGenerator.cc | 4 +-- .../plugins/PixelTripletHLTGenerator.h | 2 +- .../plugins/PixelTripletLargeTipGenerator.cc | 8 ++--- .../plugins/PixelTripletLargeTipGenerator.h | 2 +- .../plugins/PixelTripletNoTipGenerator.cc | 0 .../plugins/PixelTripletNoTipGenerator.h | 2 +- .../PixelSeeding}/plugins/RiemannFitOnGPU.cc | 0 .../PixelSeeding}/plugins/RiemannFitOnGPU.cu | 0 .../PixelSeeding}/plugins/RiemannFitOnGPU.h | 2 +- .../PixelSeeding}/plugins/SealModule.cc | 6 ++-- .../plugins/ThirdHitCorrection.cc | 0 .../plugins/ThirdHitCorrection.h | 0 .../plugins/ThirdHitPredictionFromInvLine.cc | 0 .../plugins/ThirdHitPredictionFromInvLine.h | 0 .../ThirdHitPredictionFromInvParabola.cc | 0 .../ThirdHitPredictionFromInvParabola.h | 0 .../plugins/ThirdHitZPrediction.cc | 0 .../plugins/ThirdHitZPrediction.h | 0 .../PixelSeeding}/plugins/gpuFishbone.h | 0 .../PixelSeeding}/plugins/gpuPixelDoublets.h | 2 +- .../plugins/gpuPixelDoubletsAlgos.h | 0 .../python/PixelTripletHLTGenerator_cfi.py | 4 +-- .../PixelTripletLargeTipGenerator_cfi.py | 0 .../python/PixelTripletNoTipGenerator_cfi.py | 0 .../python/caHitQuadrupletEDProducer_cfi.py | 4 +++ .../python/pixelTripletHLTEDProducer_cfi.py | 2 +- .../pixelTripletLargeTipEDProducer_cfi.py | 2 +- .../PixelSeeding}/src/CACell.h | 2 +- .../src/CAHitQuadrupletGenerator.cc | 6 ++-- .../src/CAHitTripletGenerator.cc | 8 ++--- .../PixelSeeding}/src/CellularAutomaton.cc | 0 .../PixelSeeding}/src/CellularAutomaton.h | 2 +- .../src/CosmicHitTripletGenerator.cc | 4 +-- ...smicHitTripletGeneratorFromLayerTriplet.cc | 4 +-- .../PixelSeeding}/src/CosmicLayerTriplets.cc | 2 +- .../PixelSeeding}/src/HitTripletGenerator.cc | 2 +- .../HitTripletGeneratorFromPairAndLayers.cc | 2 +- ...ripletGeneratorFromPairAndLayersFactory.cc | 2 +- .../src/IntermediateHitTriplets.cc | 2 +- .../PixelSeeding}/src/LayerTriplets.cc | 2 +- .../src/ThirdHitPredictionFromCircle.cc | 2 +- .../src/ThirdHitRZPredictionBase.cc | 2 +- .../PixelSeeding}/src/TripletHLTGenerator.h | 0 .../PixelSeeding}/src/classes.h | 2 +- .../PixelSeeding}/src/classes_def.xml | 0 .../PixelSeeding}/test/BuildFile.xml | 6 ++-- .../PixelSeeding}/test/CAsizes_t.cpp | 2 +- .../PixelSeeding}/test/CircleEq_t.cpp | 2 +- .../PixelSeeding}/test/HitTripletProducer.cc | 0 .../test/PixelTriplets_InvPrbl_prec.cpp | 2 +- .../test/PixelTriplets_InvPrbl_t.cpp | 2 +- .../PixelSeeding}/test/fastDPHI_t.cpp | 0 .../PixelSeeding}/test/trip_cfg.py | 0 .../PixelTrackFitting/BuildFile.xml | 0 .../PixelTrackFitting/interface/BrokenLine.h | 2 +- .../interface/CircleFromThreePoints.h | 0 .../PixelTrackFitting/interface/FitResult.h | 0 .../PixelTrackFitting/interface/FitUtils.h | 2 +- .../interface/KFBasedPixelFitter.h | 2 +- .../PixelTrackFitting/interface/PixelFitter.h | 2 +- .../interface/PixelFitterBase.h | 0 .../PixelFitterByConformalMappingAndLine.h | 2 +- .../interface/PixelFitterByHelixProjections.h | 2 +- .../interface/PixelNtupletsFitter.h | 2 +- .../interface/PixelTrackBuilder.h | 0 .../interface/PixelTrackCleaner.h | 2 +- .../interface/PixelTrackCleanerBySharedHits.h | 4 +-- .../interface/PixelTrackCleanerWrapper.h | 4 +-- .../interface/PixelTrackErrorParam.h | 0 .../interface/PixelTrackFilter.h | 2 +- .../interface/PixelTrackFilterBase.h | 0 .../interface/PixelTrackFilterByKinematics.h | 2 +- .../interface/PixelTrackReconstruction.h | 4 +-- .../PixelTrackFitting/interface/RZLine.h | 0 .../PixelTrackFitting/interface/RiemannFit.h | 2 +- .../interface/TracksWithHits.h | 0 .../PixelTrackFitting/plugins/BuildFile.xml | 2 +- .../plugins/KFBasedPixelFitterProducer.cc | 4 +-- ...FitterByConformalMappingAndLineProducer.cc | 4 +-- .../PixelFitterByHelixProjectionsProducer.cc | 4 +-- .../plugins/PixelNtupletsFitterProducer.cc | 4 +-- ...PixelTrackCleanerBySharedHitsESProducer.cc | 2 +- .../plugins/PixelTrackDumpCUDA.cc | 0 .../PixelTrackFilterByKinematicsProducer.cc | 4 +-- .../plugins/PixelTrackProducer.cc | 2 +- .../plugins/PixelTrackProducerFromSoA.cc | 2 +- .../plugins/PixelTrackSoAFromCUDA.cc | 0 .../PixelTrackFitting/plugins/storeTracks.h | 2 +- .../python/PixelTracks_cff.py | 30 +++++++++---------- .../pixelFitterByHelixProjections_cfi.py | 2 +- .../python/pixelNtupletsFitter_cfi.py | 6 ++++ .../src/CircleFromThreePoints.cc | 2 +- .../src/ConformalMappingFit.cc | 0 .../src/ConformalMappingFit.h | 0 .../src/ES_PixelTrackCleaner.cc | 2 +- .../src/KFBasedPixelFitter.cc | 4 +-- .../PixelTrackFitting/src/ParabolaFit.cc | 0 .../PixelTrackFitting/src/ParabolaFit.h | 0 .../PixelFitterByConformalMappingAndLine.cc | 6 ++-- .../src/PixelFitterByHelixProjections.cc | 10 +++---- .../src/PixelNtupletsFitter.cc | 10 +++---- .../src/PixelTrackBuilder.cc | 2 +- .../src/PixelTrackCleanerBySharedHits.cc | 2 +- .../src/PixelTrackErrorParam.cc | 2 +- .../src/PixelTrackFilterByKinematics.cc | 2 +- .../src/PixelTrackReconstruction.cc | 8 ++--- .../PixelTrackFitting/src/classes.h | 4 +-- .../PixelTrackFitting/src/classes_def.xml | 0 .../PixelTrackFitting/test/BuildFile.xml | 2 +- .../PixelTrackFitting/test/PixelTrackFits.cc | 4 +-- .../PixelTrackFitting/test/PixelTrackTest.cc | 0 .../PixelTrackFitting/test/RZLine_catch2.cc | 2 +- .../PixelTrackFitting/test/testEigenGPU.cu | 4 +-- .../test/testEigenGPUNoFit.cu | 0 .../test/testEigenJacobian.cpp | 2 +- .../PixelTrackFitting/test/testFits.cpp | 4 +-- .../PixelTrackFitting/test/test_cfg.py | 4 +-- .../PixelTrackFitting/test/test_common.h | 0 .../PixelVertexFinding/BuildFile.xml | 0 .../interface/Cluster1DCleaner.h | 0 .../interface/Cluster1DMerger.h | 0 .../interface/DivisiveClusterizer1D.h | 4 +-- .../interface/DivisiveVertexFinder.h | 6 ++-- .../interface/FindPeakFastPV.h | 2 +- .../PixelVertexFinding/interface/PVCluster.h | 4 +-- .../interface/PVClusterComparer.h | 4 +-- .../interface/PVPositionBuilder.h | 2 +- .../PixelVertexFinding/plugins/BuildFile.xml | 2 +- .../plugins/FastPrimaryVertexProducer.cc | 0 .../FastPrimaryVertexWithWeightsProducer.cc | 2 +- .../plugins/JetVertexChecker.cc | 0 .../plugins/PixelVertexCollectionTrimmer.cc | 4 +-- .../plugins/PixelVertexProducer.cc | 2 +- .../plugins/PixelVertexProducerCUDA.cc | 0 .../plugins/PixelVertexProducerFromSoA.cc | 0 .../plugins/PixelVertexSoAFromCUDA.cc | 0 .../plugins/PixelVertexWorkSpaceSoADevice.h | 2 +- .../plugins/PixelVertexWorkSpaceSoAHost.h | 2 +- .../plugins/PixelVertexWorkSpaceUtilities.h | 0 .../plugins/gpuClusterTracksByDensity.h | 0 .../plugins/gpuClusterTracksDBSCAN.h | 0 .../plugins/gpuClusterTracksIterative.h | 0 .../plugins/gpuFitVertices.h | 0 .../PixelVertexFinding/plugins/gpuSortByPt2.h | 0 .../plugins/gpuSplitVertices.h | 0 .../plugins/gpuVertexFinder.cc | 0 .../plugins/gpuVertexFinder.cu | 0 .../plugins/gpuVertexFinder.h | 0 .../python/PVClusterComparer_cfi.py | 0 .../python/PixelVertexes_cff.py | 3 ++ .../python/PixelVertexes_cfi.py | 2 +- .../python/fastPrimaryVertexProducer_cfi.py | 0 .../src/DivisiveVertexFinder.cc | 6 ++-- .../src/PVClusterComparer.cc | 2 +- .../src/PVPositionBuilder.cc | 2 +- .../PixelVertexFinding/test/BuildFile.xml | 0 .../PixelVertexFinding/test/PixelTrackRoot.cc | 0 .../PixelVertexFinding/test/PixelTrackRoot.h | 0 .../test/PixelVertexTest.cc | 4 +-- .../PixelVertexFinding/test/VertexFinder_t.h | 18 +++++------ .../test/cpuVertexFinder_t.cpp | 0 .../test/gpuVertexFinder_t.cu | 0 .../SpecialSeedGenerators/BuildFile.xml | 2 +- .../interface/GenericTripletGenerator.h | 2 +- .../interface/SeedGeneratorForCosmics.h | 2 +- .../interface/SimpleCosmicBONSeeder.h | 2 +- .../src/SeedGeneratorForCosmics.cc | 2 +- .../TkSeedGenerator/plugins/BuildFile.xml | 6 ++-- .../plugins/CombinedMultiHitGenerator.cc | 2 +- .../plugins/MultiHitFromChi2EDProducer.cc | 2 +- .../plugins/MultiHitGeneratorFromChi2.cc | 6 ++-- .../plugins/MultiHitGeneratorFromChi2.h | 2 +- .../plugins/SeedProducerFromSoA.cc | 2 +- .../python/GlobalSeedsFromTriplets_cff.py | 4 +-- ...dGeneratorFromProtoTracksEDProducer_cff.py | 2 +- Validation/RecoTrack/plugins/BuildFile.xml | 2 +- .../RecoTrack/plugins/TrackingNtuple.cc | 2 +- 368 files changed, 542 insertions(+), 534 deletions(-) delete mode 100644 RecoPixelVertexing/PixelTrackFitting/python/pixelNtupletsFitter_cfi.py delete mode 100644 RecoPixelVertexing/PixelTriplets/python/caHitQuadrupletEDProducer_cfi.py delete mode 100644 RecoPixelVertexing/PixelVertexFinding/python/PixelVertexes_cff.py rename {RecoPixelVertexing => RecoTracker}/Configuration/python/RecoPixelVertexing_EventContent_cff.py (100%) rename {RecoPixelVertexing => RecoTracker}/Configuration/python/RecoPixelVertexing_cff.py (80%) rename {RecoPixelVertexing => RecoTracker}/Configuration/python/customizePixelTracksForTriplets.py (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/BuildFile.xml (85%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/bin/BuildFile.xml (86%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/bin/ClusterShapeAnalyzer.cpp (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/bin/PixelClusterShapeExtractor.cc (99%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/data/ITShapePhase2_all.par (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/data/ITShapePhase2_noL1.par (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/data/READE.md (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/data/pixelShapePhase0.par (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/data/pixelShapePhase1_all.par (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/data/pixelShapePhase1_loose.par (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/data/pixelShapePhase1_noL1.par (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/data/stripShape.par (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/interface/ClusterData.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/interface/ClusterShape.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h (99%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/interface/ClusterShapeTrackFilter.h (95%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/interface/ClusterShapeTrajectoryFilter.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/interface/HitInfo.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/interface/LowPtClusterShapeSeedComparitor.h (95%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/interface/PixelTripletLowPtGenerator.h (94%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/interface/StripSubClusterShapeTrajectoryFilter.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/interface/ThirdHitPrediction.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/interface/TrackCleaner.h (84%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/interface/TrackFitter.h (94%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/interface/TripletFilter.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/plugins/BuildFile.xml (73%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/plugins/ClusterShapeHitFilterESProducer.cc (94%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/plugins/ClusterShapeSeedComparitor.cc (98%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/plugins/ClusterShapeTrackFilterProducer.cc (95%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/plugins/PixelVertexProducerClusters.cc (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/plugins/PixelVertexProducerClusters.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/plugins/PixelVertexProducerMedian.cc (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/plugins/PixelVertexProducerMedian.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/plugins/SiPixelClusterShapeCacheProducer.cc (96%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/plugins/TrackCleanerESProducer.cc (95%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/plugins/TrackFitterProducer.cc (94%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/plugins/TrackListCombiner.cc (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/plugins/TrackListCombiner.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/plugins/modules.cc (72%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/python/AllPixelTracks_cfi.py (85%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/python/ClusterShapeExtractor_cfi.py (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/python/ClusterShapeHitFilterESProducer_cfi.py (54%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/python/ClusterShapeTrajectoryFilter_cfi.py (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/python/LowPtClusterShapeSeedComparitor_cfi.py (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/python/MinBiasCkfTrajectoryFilter_cfi.py (78%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/python/PixelMedianVertices_cfi.py (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/python/StripSubClusterShapeFilter_cfi.py (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/python/StripSubClusterShapeSeedFilter_cfi.py (72%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/python/StripSubClusterShapeTrajectoryFilter_cfi.py (86%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/python/TrackSeeds_cfi.py (100%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/src/ClusterShape.cc (97%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/src/ClusterShapeHitFilter.cc (98%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/src/ClusterShapeTrackFilter.cc (93%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/src/ClusterShapeTrajectoryFilter.cc (97%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/src/HitInfo.cc (96%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/src/LowPtClusterShapeSeedComparitor.cc (95%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/src/PixelTripletLowPtGenerator.cc (96%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/src/StripSubClusterShapeTrajectoryFilter.cc (99%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/src/ThirdHitPrediction.cc (98%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/src/TrackCleaner.cc (98%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/src/TrackFitter.cc (95%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/src/TripletFilter.cc (90%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/test/BuildFile.xml (76%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/test/ClusterShapeExtractor.cc (99%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/test/ClusterShapeHitFilter_t.cpp (80%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/test/LowPtGlobalDir_t.cpp (94%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/test/README.md (75%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/test/clusterShapeExtractor_phase1_cfg.py (98%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/test/clusterShapeExtractor_phase2_cfg.py (99%) rename {RecoPixelVertexing => RecoTracker}/PixelLowPtUtilities/test/pcsfVerify.ipynb (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/BuildFile.xml (95%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/interface/CACut.h (98%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/interface/CAGraph.h (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/interface/CAHitQuadrupletGenerator.h (96%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/interface/CAHitTripletGenerator.h (95%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/interface/CircleEq.h (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/interface/CosmicHitTripletGenerator.h (85%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/interface/CosmicHitTripletGeneratorFromLayerTriplet.h (95%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/interface/CosmicLayerTriplets.h (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/interface/HitTripletEDProducerT.h (98%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/interface/HitTripletGenerator.h (94%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/interface/HitTripletGeneratorFromPairAndLayers.h (96%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/interface/HitTripletGeneratorFromPairAndLayersFactory.h (85%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/interface/IntermediateHitTriplets.h (99%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/interface/LayerTriplets.h (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/interface/OrderedHitSeeds.h (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/interface/OrderedHitTriplet.h (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/interface/OrderedHitTriplets.h (87%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/interface/ThirdHitPredictionFromCircle.h (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/interface/ThirdHitRZPrediction.h (95%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/interface/ThirdHitRZPredictionBase.h (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/BrokenLineFitOnGPU.cc (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/BrokenLineFitOnGPU.cu (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/BrokenLineFitOnGPU.h (99%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/BuildFile.xml (93%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/CAHitNtupletCUDA.cc (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/CAHitNtupletEDProducerT.cc (95%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/CAHitNtupletGeneratorKernels.cc (99%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/CAHitNtupletGeneratorKernels.cu (99%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/CAHitNtupletGeneratorKernels.h (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/CAHitNtupletGeneratorKernelsAlloc.cc (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/CAHitNtupletGeneratorKernelsAlloc.cu (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/CAHitNtupletGeneratorKernelsImpl.h (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/CAHitNtupletGeneratorOnGPU.cc (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/CAHitNtupletGeneratorOnGPU.h (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/CAStructures.h (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/CombinedHitTripletGenerator.cc (87%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/CombinedHitTripletGenerator.h (94%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/GPUCACell.h (99%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/HelixFitOnGPU.cc (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/HelixFitOnGPU.h (97%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/MatchedHitRZCorrectionFromBending.cc (96%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/MatchedHitRZCorrectionFromBending.h (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/PixelTripletHLTGenerator.cc (99%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/PixelTripletHLTGenerator.h (97%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/PixelTripletLargeTipGenerator.cc (98%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/PixelTripletLargeTipGenerator.h (97%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/PixelTripletNoTipGenerator.cc (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/PixelTripletNoTipGenerator.h (95%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/RiemannFitOnGPU.cc (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/RiemannFitOnGPU.cu (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/RiemannFitOnGPU.h (99%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/SealModule.cc (82%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/ThirdHitCorrection.cc (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/ThirdHitCorrection.h (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/ThirdHitPredictionFromInvLine.cc (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/ThirdHitPredictionFromInvLine.h (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/ThirdHitPredictionFromInvParabola.cc (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/ThirdHitPredictionFromInvParabola.h (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/ThirdHitZPrediction.cc (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/ThirdHitZPrediction.h (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/gpuFishbone.h (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/gpuPixelDoublets.h (96%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/plugins/gpuPixelDoubletsAlgos.h (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/python/PixelTripletHLTGenerator_cfi.py (80%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/python/PixelTripletLargeTipGenerator_cfi.py (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/python/PixelTripletNoTipGenerator_cfi.py (100%) create mode 100644 RecoTracker/PixelSeeding/python/caHitQuadrupletEDProducer_cfi.py rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/python/pixelTripletHLTEDProducer_cfi.py (70%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/python/pixelTripletLargeTipEDProducer_cfi.py (81%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/src/CACell.h (99%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/src/CAHitQuadrupletGenerator.cc (98%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/src/CAHitTripletGenerator.cc (97%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/src/CellularAutomaton.cc (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/src/CellularAutomaton.h (95%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/src/CosmicHitTripletGenerator.cc (91%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/src/CosmicHitTripletGeneratorFromLayerTriplet.cc (96%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/src/CosmicLayerTriplets.cc (98%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/src/HitTripletGenerator.cc (89%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/src/HitTripletGeneratorFromPairAndLayers.cc (91%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/src/HitTripletGeneratorFromPairAndLayersFactory.cc (64%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/src/IntermediateHitTriplets.cc (82%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/src/LayerTriplets.cc (93%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/src/ThirdHitPredictionFromCircle.cc (99%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/src/ThirdHitRZPredictionBase.cc (95%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/src/TripletHLTGenerator.h (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/src/classes.h (77%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/src/classes_def.xml (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/test/BuildFile.xml (79%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/test/CAsizes_t.cpp (93%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/test/CircleEq_t.cpp (97%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/test/HitTripletProducer.cc (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/test/PixelTriplets_InvPrbl_prec.cpp (94%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/test/PixelTriplets_InvPrbl_t.cpp (98%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/test/fastDPHI_t.cpp (100%) rename {RecoPixelVertexing/PixelTriplets => RecoTracker/PixelSeeding}/test/trip_cfg.py (100%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/BuildFile.xml (100%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/BrokenLine.h (99%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/CircleFromThreePoints.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/FitResult.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/FitUtils.h (99%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/KFBasedPixelFitter.h (97%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/PixelFitter.h (88%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/PixelFitterBase.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/PixelFitterByConformalMappingAndLine.h (94%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/PixelFitterByHelixProjections.h (93%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/PixelNtupletsFitter.h (92%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/PixelTrackBuilder.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/PixelTrackCleaner.h (92%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/PixelTrackCleanerBySharedHits.h (84%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/PixelTrackCleanerWrapper.h (92%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/PixelTrackErrorParam.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/PixelTrackFilter.h (87%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/PixelTrackFilterBase.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/PixelTrackFilterByKinematics.h (90%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/PixelTrackReconstruction.h (87%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/RZLine.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/RiemannFit.h (99%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/interface/TracksWithHits.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/plugins/BuildFile.xml (82%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/plugins/KFBasedPixelFitterProducer.cc (96%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/plugins/PixelFitterByConformalMappingAndLineProducer.cc (95%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/plugins/PixelFitterByHelixProjectionsProducer.cc (93%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/plugins/PixelNtupletsFitterProducer.cc (92%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/plugins/PixelTrackCleanerBySharedHitsESProducer.cc (94%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/plugins/PixelTrackDumpCUDA.cc (100%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/plugins/PixelTrackFilterByKinematicsProducer.cc (93%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/plugins/PixelTrackProducer.cc (96%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/plugins/PixelTrackProducerFromSoA.cc (99%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/plugins/PixelTrackSoAFromCUDA.cc (100%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/plugins/storeTracks.h (97%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/python/PixelTracks_cff.py (77%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/python/pixelFitterByHelixProjections_cfi.py (68%) create mode 100644 RecoTracker/PixelTrackFitting/python/pixelNtupletsFitter_cfi.py rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/src/CircleFromThreePoints.cc (96%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/src/ConformalMappingFit.cc (100%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/src/ConformalMappingFit.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/src/ES_PixelTrackCleaner.cc (53%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/src/KFBasedPixelFitter.cc (98%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/src/ParabolaFit.cc (100%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/src/ParabolaFit.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/src/PixelFitterByConformalMappingAndLine.cc (94%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/src/PixelFitterByHelixProjections.cc (94%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/src/PixelNtupletsFitter.cc (89%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/src/PixelTrackBuilder.cc (99%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/src/PixelTrackCleanerBySharedHits.cc (97%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/src/PixelTrackErrorParam.cc (98%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/src/PixelTrackFilterByKinematics.cc (95%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/src/PixelTrackReconstruction.cc (92%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/src/classes.h (67%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/src/classes_def.xml (100%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/test/BuildFile.xml (97%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/test/PixelTrackFits.cc (99%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/test/PixelTrackTest.cc (100%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/test/RZLine_catch2.cc (98%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/test/testEigenGPU.cu (98%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/test/testEigenGPUNoFit.cu (100%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/test/testEigenJacobian.cpp (98%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/test/testFits.cpp (97%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/test/test_cfg.py (94%) rename {RecoPixelVertexing => RecoTracker}/PixelTrackFitting/test/test_common.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/BuildFile.xml (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/interface/Cluster1DCleaner.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/interface/Cluster1DMerger.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/interface/DivisiveClusterizer1D.h (98%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/interface/DivisiveVertexFinder.h (90%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/interface/FindPeakFastPV.h (95%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/interface/PVCluster.h (76%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/interface/PVClusterComparer.h (91%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/interface/PVPositionBuilder.h (91%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/BuildFile.xml (95%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/FastPrimaryVertexProducer.cc (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/FastPrimaryVertexWithWeightsProducer.cc (99%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/JetVertexChecker.cc (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/PixelVertexCollectionTrimmer.cc (96%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/PixelVertexProducer.cc (99%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/PixelVertexProducerCUDA.cc (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/PixelVertexProducerFromSoA.cc (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/PixelVertexSoAFromCUDA.cc (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/PixelVertexWorkSpaceSoADevice.h (90%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/PixelVertexWorkSpaceSoAHost.h (91%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/PixelVertexWorkSpaceUtilities.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/gpuClusterTracksByDensity.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/gpuClusterTracksDBSCAN.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/gpuClusterTracksIterative.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/gpuFitVertices.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/gpuSortByPt2.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/gpuSplitVertices.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/gpuVertexFinder.cc (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/gpuVertexFinder.cu (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/plugins/gpuVertexFinder.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/python/PVClusterComparer_cfi.py (100%) create mode 100644 RecoTracker/PixelVertexFinding/python/PixelVertexes_cff.py rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/python/PixelVertexes_cfi.py (88%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/python/fastPrimaryVertexProducer_cfi.py (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/src/DivisiveVertexFinder.cc (95%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/src/PVClusterComparer.cc (97%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/src/PVPositionBuilder.cc (94%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/test/BuildFile.xml (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/test/PixelTrackRoot.cc (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/test/PixelTrackRoot.h (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/test/PixelVertexTest.cc (98%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/test/VertexFinder_t.h (94%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/test/cpuVertexFinder_t.cpp (100%) rename {RecoPixelVertexing => RecoTracker}/PixelVertexFinding/test/gpuVertexFinder_t.cu (100%) diff --git a/CalibTracker/Configuration/python/Reconstruction_cff.py b/CalibTracker/Configuration/python/Reconstruction_cff.py index 5e20b01ceb9a2..dd78bb14a5540 100644 --- a/CalibTracker/Configuration/python/Reconstruction_cff.py +++ b/CalibTracker/Configuration/python/Reconstruction_cff.py @@ -15,7 +15,7 @@ from RecoLocalTracker.SiStripRecHitConverter.SiStripRecHitConverter_cfi import * from RecoTracker.Configuration.RecoTracker_cff import * from RecoTracker.Configuration.RecoTrackerP5_cff import * -from RecoPixelVertexing.Configuration.RecoPixelVertexing_cff import * +from RecoTracker.Configuration.RecoPixelVertexing_cff import * recotrack = cms.Sequence(offlineBeamSpot + siPixelRecHitsPreSplitting + siStripMatchedRecHits + recopixelvertexing + ckftracks) recotrackP5 = cms.Sequence(offlineBeamSpot + siPixelRecHitsPreSplitting + siStripMatchedRecHits + recopixelvertexing + ctftracksP5) diff --git a/Calibration/HcalIsolatedTrackReco/python/HITpixelTripletRegGenerator_cfi.py b/Calibration/HcalIsolatedTrackReco/python/HITpixelTripletRegGenerator_cfi.py index 529d09b94225e..9b977cea57e87 100644 --- a/Calibration/HcalIsolatedTrackReco/python/HITpixelTripletRegGenerator_cfi.py +++ b/Calibration/HcalIsolatedTrackReco/python/HITpixelTripletRegGenerator_cfi.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms -from RecoPixelVertexing.PixelTriplets.PixelTripletHLTGenerator_cfi import * +from RecoTracker.PixelSeeding.PixelTripletHLTGenerator_cfi import * HITpixelTripletRegGenerator = cms.EDProducer("SeedGeneratorFromRegionHitsEDProducer", OrderedHitsFactoryPSet = cms.PSet( ComponentName = cms.string('StandardHitTripletGenerator'), diff --git a/Configuration/EventContent/doc/EventContent.doc b/Configuration/EventContent/doc/EventContent.doc index 64335a6f1fe13..2530b50d5b03f 100644 --- a/Configuration/EventContent/doc/EventContent.doc +++ b/Configuration/EventContent/doc/EventContent.doc @@ -35,7 +35,7 @@ Package which contains .cff files defining event content for the different data "RecoBTag/Configuration/data/RecoBTag_EventContent.cff" "RecoTauTag/Configuration/data/RecoTauTag_EventContent.cff" "RecoVertex/Configuration/data/RecoVertex_EventContent.cff" -"RecoPixelVertexing/Configuration/data/RecoPixelVertexing_EventContent.cff" +"RecoTracker/Configuration/data/RecoPixelVertexing_EventContent.cff" "RecoEgamma/Configuration/data/RecoEgamma_EventContent.cff" # Simulation part "SimG4Core/Configuration/data/SimG4Core_EventContent.cff" diff --git a/Configuration/EventContent/python/EventContentCosmics_cff.py b/Configuration/EventContent/python/EventContentCosmics_cff.py index 21ec8b2549f2b..8c3120c8b0f52 100644 --- a/Configuration/EventContent/python/EventContentCosmics_cff.py +++ b/Configuration/EventContent/python/EventContentCosmics_cff.py @@ -65,7 +65,7 @@ #include "RecoBTag/Configuration/data/RecoBTag_EventContent.cff" #include "RecoTauTag/Configuration/data/RecoTauTag_EventContent.cff" #include "RecoVertex/Configuration/data/RecoVertex_EventContent.cff" -#include "RecoPixelVertexing/Configuration/data/RecoPixelVertexing_EventContent.cff" +#include "RecoTracker/Configuration/data/RecoPixelVertexing_EventContent.cff" #include "RecoEgamma/Configuration/data/RecoEgamma_EventContent.cff" #include "RecoParticleFlow/Configuration/data/RecoParticleFlow_EventContent.cff" diff --git a/Configuration/EventContent/python/EventContent_cff.py b/Configuration/EventContent/python/EventContent_cff.py index 3b5471e04c55d..e671fafcbc1e8 100644 --- a/Configuration/EventContent/python/EventContent_cff.py +++ b/Configuration/EventContent/python/EventContent_cff.py @@ -56,7 +56,7 @@ from RecoBTag.Configuration.RecoBTag_EventContent_cff import * from RecoTauTag.Configuration.RecoTauTag_EventContent_cff import * from RecoVertex.Configuration.RecoVertex_EventContent_cff import * -from RecoPixelVertexing.Configuration.RecoPixelVertexing_EventContent_cff import * +from RecoTracker.Configuration.RecoPixelVertexing_EventContent_cff import * from RecoEgamma.Configuration.RecoEgamma_EventContent_cff import * from RecoParticleFlow.Configuration.RecoParticleFlow_EventContent_cff import * from RecoVertex.BeamSpotProducer.BeamSpot_EventContent_cff import * diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 0c94d2faa4b42..46cc6e622c7ed 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -2601,7 +2601,7 @@ def gen2021HiMix(fragment,howMuch): '--procModifiers': 'pixelNtupletFit,gpu' } step3_pixel_triplets = { - '--customise': 'RecoPixelVertexing/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets' + '--customise': 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets' } step3_gpu = { '--procModifiers': 'gpu', diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index da38232757bfb..f85b12a555de3 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -876,7 +876,7 @@ def setup_(self, step, stepName, stepDict, k, properties): reco = { '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM', '--procModifiers': 'pixelNtupletFit', - '--customise' : 'RecoPixelVertexing/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets' + '--customise' : 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets' }, harvest = { '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM' @@ -897,7 +897,7 @@ def setup_(self, step, stepName, stepDict, k, properties): reco = { '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM', '--procModifiers': 'pixelNtupletFit,gpu', - '--customise': 'RecoPixelVertexing/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets' + '--customise': 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets' }, harvest = { '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM' @@ -920,7 +920,7 @@ def setup_(self, step, stepName, stepDict, k, properties): '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM', '--accelerators': 'gpu-nvidia', '--procModifiers': 'pixelNtupletFit,gpuValidation', - '--customise': 'RecoPixelVertexing/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets' + '--customise': 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets' }, harvest = { '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM', @@ -941,7 +941,7 @@ def setup_(self, step, stepName, stepDict, k, properties): reco = { '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly', '--procModifiers': 'pixelNtupletFit,gpu', - '--customise': 'RecoPixelVertexing/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets,RecoTracker/Configuration/customizePixelOnlyForProfiling.customizePixelOnlyForProfilingGPUOnly' + '--customise': 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets,RecoTracker/Configuration/customizePixelOnlyForProfiling.customizePixelOnlyForProfilingGPUOnly' }, harvest = None, suffix = 'Patatrack_PixelOnlyTripletsGPU_Profiling', @@ -1314,7 +1314,7 @@ def setup_(self, step, stepName, stepDict, k, properties): # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM', '--procModifiers': 'pixelNtupletFit', - '--customise' : 'RecoPixelVertexing/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets' + '--customise' : 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets' }, harvest = { # skip the @pixelTrackingOnlyDQM harvesting @@ -1336,7 +1336,7 @@ def setup_(self, step, stepName, stepDict, k, properties): # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM', '--procModifiers': 'pixelNtupletFit,gpu', - '--customise': 'RecoPixelVertexing/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets' + '--customise': 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets' }, harvest = { # skip the @pixelTrackingOnlyDQM harvesting @@ -1360,7 +1360,7 @@ def setup_(self, step, stepName, stepDict, k, properties): '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM', '--accelerators': 'gpu-nvidia', '--procModifiers': 'pixelNtupletFit,gpuValidation', - '--customise' : 'RecoPixelVertexing/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets' + '--customise' : 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets' }, harvest = { # skip the @pixelTrackingOnlyDQM harvesting diff --git a/Configuration/StandardSequences/python/ReconstructionHeavyIons_cff.py b/Configuration/StandardSequences/python/ReconstructionHeavyIons_cff.py index 15826a5c2cf25..4ebf51cca6251 100644 --- a/Configuration/StandardSequences/python/ReconstructionHeavyIons_cff.py +++ b/Configuration/StandardSequences/python/ReconstructionHeavyIons_cff.py @@ -8,7 +8,7 @@ from RecoLuminosity.LumiProducer.bunchSpacingProducer_cfi import * from RecoLocalTracker.Configuration.RecoLocalTrackerHeavyIons_cff import * from RecoTracker.MeasurementDet.MeasurementTrackerEventProducer_cfi import * -from RecoPixelVertexing.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import * +from RecoTracker.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import * # Ecal from RecoLocalCalo.Configuration.ecalLocalRecoSequence_cff import * @@ -33,7 +33,7 @@ from RecoHI.HiEgammaAlgos.HiElectronSequence_cff import * #-------------------------------------------------------------------------- -from RecoPixelVertexing.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import * +from RecoTracker.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import * siPixelClusterShapeCachePreSplitting = siPixelClusterShapeCache.clone( src = 'siPixelClustersPreSplitting' ) diff --git a/Configuration/StandardSequences/python/Reconstruction_cff.py b/Configuration/StandardSequences/python/Reconstruction_cff.py index 30e3cdec61f25..d01b11b329a04 100644 --- a/Configuration/StandardSequences/python/Reconstruction_cff.py +++ b/Configuration/StandardSequences/python/Reconstruction_cff.py @@ -9,7 +9,7 @@ from RecoParticleFlow.PFClusterProducer.particleFlowCluster_cff import * from TrackingTools.Configuration.TrackingTools_cff import * from RecoTracker.MeasurementDet.MeasurementTrackerEventProducer_cfi import * -from RecoPixelVertexing.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import * +from RecoTracker.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import * from RecoHGCal.Configuration.recoHGCAL_cff import * from Configuration.Eras.Modifier_fastSim_cff import fastSim @@ -26,7 +26,7 @@ # Higher level objects from RecoVertex.Configuration.RecoVertex_cff import * from RecoEgamma.Configuration.RecoEgamma_cff import * -from RecoPixelVertexing.Configuration.RecoPixelVertexing_cff import * +from RecoTracker.Configuration.RecoPixelVertexing_cff import * from RecoJets.Configuration.RecoJetsGlobal_cff import * diff --git a/DQM/Integration/python/clients/beam_dqm_sourceclient-live_cfg.py b/DQM/Integration/python/clients/beam_dqm_sourceclient-live_cfg.py index fde60eb802425..78b68e883e780 100644 --- a/DQM/Integration/python/clients/beam_dqm_sourceclient-live_cfg.py +++ b/DQM/Integration/python/clients/beam_dqm_sourceclient-live_cfg.py @@ -121,7 +121,7 @@ process.load("Configuration.StandardSequences.RawToDigi_Data_cff") process.load("RecoLocalTracker.Configuration.RecoLocalTracker_cff") process.load("TrackingTools.TransientTrack.TransientTrackBuilder_cfi") -from RecoPixelVertexing.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import * +from RecoTracker.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import * process.siPixelClusterShapeCachePreSplitting = siPixelClusterShapeCache.clone( src = 'siPixelClustersPreSplitting' ) @@ -333,7 +333,7 @@ #---------------------------- # Pixel tracks/vertices reco -process.load("RecoPixelVertexing.Configuration.RecoPixelVertexing_cff") +process.load("RecoTracker.Configuration.RecoPixelVertexing_cff") from RecoVertex.PrimaryVertexProducer.OfflinePixel3DPrimaryVertices_cfi import * process.pixelVertices = pixelVertices.clone( TkFilterParameters = dict( minPt = process.pixelTracksTrackingRegions.RegionPSet.ptMin) diff --git a/DQM/Integration/python/clients/beampixel_dqm_sourceclient-live_cfg.py b/DQM/Integration/python/clients/beampixel_dqm_sourceclient-live_cfg.py index 1e990f8318baf..d91ba52ffc396 100644 --- a/DQM/Integration/python/clients/beampixel_dqm_sourceclient-live_cfg.py +++ b/DQM/Integration/python/clients/beampixel_dqm_sourceclient-live_cfg.py @@ -90,10 +90,10 @@ #---------------------------- # Pixel-Tracks&Vertices Config #---------------------------- -from RecoPixelVertexing.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import * +from RecoTracker.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import * process.siPixelClusterShapeCachePreSplitting = siPixelClusterShapeCache.clone(src = 'siPixelClustersPreSplitting') process.load("RecoLocalTracker.SiPixelRecHits.PixelCPEGeneric_cfi") -process.load("RecoPixelVertexing.Configuration.RecoPixelVertexing_cff") +process.load("RecoTracker.Configuration.RecoPixelVertexing_cff") from RecoVertex.PrimaryVertexProducer.OfflinePixel3DPrimaryVertices_cfi import * process.pixelVertices = pixelVertices.clone( TkFilterParameters = dict( diff --git a/DQM/Integration/python/clients/hlt_dqm_sourceclient-live_cfg.py b/DQM/Integration/python/clients/hlt_dqm_sourceclient-live_cfg.py index cc04e270abfef..e23d84981f9ab 100644 --- a/DQM/Integration/python/clients/hlt_dqm_sourceclient-live_cfg.py +++ b/DQM/Integration/python/clients/hlt_dqm_sourceclient-live_cfg.py @@ -40,9 +40,9 @@ process.HLTSiStripClusterChargeCutNone = cms.PSet( value = cms.double( -1.0 ) ) process.ClusterShapeHitFilterESProducer = cms.ESProducer( "ClusterShapeHitFilterESProducer", ComponentName = cms.string( "ClusterShapeHitFilter" ), - PixelShapeFileL1 = cms.string( "RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase1_loose.par" ), + PixelShapeFileL1 = cms.string( "RecoTracker/PixelLowPtUtilities/data/pixelShapePhase1_loose.par" ), clusterChargeCut = cms.PSet( refToPSet_ = cms.string( "HLTSiStripClusterChargeCutNone" ) ), - PixelShapeFile = cms.string( "RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase1_noL1.par" ) + PixelShapeFile = cms.string( "RecoTracker/PixelLowPtUtilities/data/pixelShapePhase1_noL1.par" ) ) #SiStrip Local Reco process.load("CalibTracker.SiStripCommon.TkDetMapESProducer_cfi") diff --git a/DQM/Integration/python/clients/pixel_dqm_sourceclient-live_cfg.py b/DQM/Integration/python/clients/pixel_dqm_sourceclient-live_cfg.py index 5a0d3121ed411..528e2b85d52f5 100644 --- a/DQM/Integration/python/clients/pixel_dqm_sourceclient-live_cfg.py +++ b/DQM/Integration/python/clients/pixel_dqm_sourceclient-live_cfg.py @@ -128,7 +128,7 @@ if (process.runType.getRunType() == process.runType.cosmic_run or process.runType.getRunType() == process.runType.cosmic_run_stage1): process.load("RecoTracker.Configuration.RecoTrackerP5_cff") process.load("Configuration.StandardSequences.ReconstructionCosmics_cff") - process.load("RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi") + process.load("RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi") else: process.load("Configuration.StandardSequences.Reconstruction_cff") @@ -223,7 +223,7 @@ from RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi import * process.PixelLayerTriplets.BPix.HitProducer = cms.string('siPixelRecHitsPreSplitting') process.PixelLayerTriplets.FPix.HitProducer = cms.string('siPixelRecHitsPreSplitting') - from RecoPixelVertexing.PixelTrackFitting.PixelTracks_cff import * + from RecoTracker.PixelTrackFitting.PixelTracks_cff import * process.pixelTracksHitTriplets.SeedComparitorPSet.clusterShapeCacheSrc = 'siPixelClusterShapeCachePreSplitting' process.RecoForDQM_TrkReco = cms.Sequence(process.offlineBeamSpot*process.MeasurementTrackerEventPreSplitting*process.siPixelClusterShapeCachePreSplitting*process.recopixelvertexing*process.InitialStepPreSplitting) diff --git a/DQM/Integration/python/clients/sistrip_dqm_sourceclient-live_cfg.py b/DQM/Integration/python/clients/sistrip_dqm_sourceclient-live_cfg.py index bff0bc30e8586..5b23544bf41d7 100644 --- a/DQM/Integration/python/clients/sistrip_dqm_sourceclient-live_cfg.py +++ b/DQM/Integration/python/clients/sistrip_dqm_sourceclient-live_cfg.py @@ -390,7 +390,7 @@ from RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi import * process.PixelLayerTriplets.BPix.HitProducer = cms.string('siPixelRecHitsPreSplitting') process.PixelLayerTriplets.FPix.HitProducer = cms.string('siPixelRecHitsPreSplitting') - from RecoPixelVertexing.PixelTrackFitting.PixelTracks_cff import * + from RecoTracker.PixelTrackFitting.PixelTracks_cff import * process.pixelTracksHitTriplets.SeedComparitorPSet.clusterShapeCacheSrc = 'siPixelClusterShapeCachePreSplitting' process.RecoForDQM_TrkReco = cms.Sequence(process.offlineBeamSpot*process.MeasurementTrackerEventPreSplitting*process.siPixelClusterShapeCachePreSplitting*process.recopixelvertexing*process.InitialStepPreSplitting) @@ -636,7 +636,7 @@ from RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi import * process.PixelLayerTriplets.BPix.HitProducer = 'siPixelRecHitsPreSplitting' process.PixelLayerTriplets.FPix.HitProducer = 'siPixelRecHitsPreSplitting' - from RecoPixelVertexing.PixelTrackFitting.PixelTracks_cff import * + from RecoTracker.PixelTrackFitting.PixelTracks_cff import * process.pixelTracksHitTriplets.SeedComparitorPSet.clusterShapeCacheSrc = 'siPixelClusterShapeCachePreSplitting' process.RecoForDQM_TrkReco = cms.Sequence(process.offlineBeamSpot*process.MeasurementTrackerEventPreSplitting*process.siPixelClusterShapeCachePreSplitting*process.recopixelvertexing*process.InitialStepPreSplitting) diff --git a/DQM/SiPixelPhase1Config/python/SiPixelPhase1OfflineDQM_source_cff.py b/DQM/SiPixelPhase1Config/python/SiPixelPhase1OfflineDQM_source_cff.py index a2e0da8bddb68..5b409b5b7fa6f 100644 --- a/DQM/SiPixelPhase1Config/python/SiPixelPhase1OfflineDQM_source_cff.py +++ b/DQM/SiPixelPhase1Config/python/SiPixelPhase1OfflineDQM_source_cff.py @@ -25,7 +25,7 @@ -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * from RecoLocalTracker.SiStripClusterizer.SiStripClusterChargeCut_cfi import * from DQM.SiPixelPhase1Track.SiPixelPhase1EfficiencyExtras_cfi import * diff --git a/DQM/SiPixelPhase1Track/plugins/BuildFile.xml b/DQM/SiPixelPhase1Track/plugins/BuildFile.xml index 9445daca14d82..a0c196d8fa185 100644 --- a/DQM/SiPixelPhase1Track/plugins/BuildFile.xml +++ b/DQM/SiPixelPhase1Track/plugins/BuildFile.xml @@ -1,6 +1,6 @@ - + diff --git a/DQM/SiPixelPhase1Track/plugins/SiPixelPhase1TrackClusters.cc b/DQM/SiPixelPhase1Track/plugins/SiPixelPhase1TrackClusters.cc index 4f57ba4617981..e0772b2f3cf7e 100644 --- a/DQM/SiPixelPhase1Track/plugins/SiPixelPhase1TrackClusters.cc +++ b/DQM/SiPixelPhase1Track/plugins/SiPixelPhase1TrackClusters.cc @@ -29,7 +29,7 @@ #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h" #include "RecoTracker/Record/interface/CkfComponentsRecord.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" #include "CondFormats/SiPixelTransient/interface/SiPixelTemplate.h" #include "CalibTracker/Records/interface/SiPixelTemplateDBObjectESProducerRcd.h" diff --git a/DQM/SiStripMonitorClient/python/RecoForDQM_cff.py b/DQM/SiStripMonitorClient/python/RecoForDQM_cff.py index 06fe407f1f6f7..004ca3bc88986 100644 --- a/DQM/SiStripMonitorClient/python/RecoForDQM_cff.py +++ b/DQM/SiStripMonitorClient/python/RecoForDQM_cff.py @@ -21,7 +21,7 @@ from RecoVertex.BeamSpotProducer.BeamSpot_cff import * # Pixel Vertex -from RecoPixelVertexing.Configuration.RecoPixelVertexing_cff import * +from RecoTracker.Configuration.RecoPixelVertexing_cff import * # Reconstruction Sequence RecoForDQMCollision = cms.Sequence(siPixelDigis*siStripDigis*trackerlocalreco*offlineBeamSpot*recopixelvertexing*ckftracks) diff --git a/DQMOffline/Trigger/python/SiPixel_OfflineMonitoring_cff.py b/DQMOffline/Trigger/python/SiPixel_OfflineMonitoring_cff.py index 7cab5cdcd830d..562025b0fd8f9 100644 --- a/DQMOffline/Trigger/python/SiPixel_OfflineMonitoring_cff.py +++ b/DQMOffline/Trigger/python/SiPixel_OfflineMonitoring_cff.py @@ -2,7 +2,7 @@ from DQMOffline.Trigger.SiPixel_OfflineMonitoring_Cluster_cff import * from DQMOffline.Trigger.SiPixel_OfflineMonitoring_TrackCluster_cff import * -from RecoPixelVertexing.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import * +from RecoTracker.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import * from DQM.SiPixelMonitorTrack.RefitterForPixelDQM import * hltSiPixelClusterShapeCache = siPixelClusterShapeCache.clone(src = 'hltSiPixelClusters') diff --git a/FastSimulation/Tracking/BuildFile.xml b/FastSimulation/Tracking/BuildFile.xml index 318f3ef3784ed..02786f63af416 100644 --- a/FastSimulation/Tracking/BuildFile.xml +++ b/FastSimulation/Tracking/BuildFile.xml @@ -10,7 +10,7 @@ - + diff --git a/FastSimulation/Tracking/plugins/BuildFile.xml b/FastSimulation/Tracking/plugins/BuildFile.xml index 443d212623bb5..5edd70a59fbb2 100644 --- a/FastSimulation/Tracking/plugins/BuildFile.xml +++ b/FastSimulation/Tracking/plugins/BuildFile.xml @@ -10,7 +10,7 @@ - + diff --git a/FastSimulation/Tracking/plugins/PixelTracksProducer.cc b/FastSimulation/Tracking/plugins/PixelTracksProducer.cc index b3f478202f9e3..99527832b172a 100644 --- a/FastSimulation/Tracking/plugins/PixelTracksProducer.cc +++ b/FastSimulation/Tracking/plugins/PixelTracksProducer.cc @@ -14,10 +14,10 @@ #include "RecoTracker/TkTrackingRegions/interface/TrackingRegionProducer.h" #include "RecoTracker/TkTrackingRegions/interface/TrackingRegionProducerFactory.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitter.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelFitter.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilter.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/TracksWithHits.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackFilter.h" +#include "RecoTracker/PixelTrackFitting/interface/TracksWithHits.h" #include "RecoTracker/TkTrackingRegions/interface/TrackingRegion.h" #include "DataFormats/TrackReco/interface/Track.h" diff --git a/FastSimulation/Tracking/python/hltPixelTracks_cff.py b/FastSimulation/Tracking/python/hltPixelTracks_cff.py index 3cde14dbd5ce5..b12fcee6edcd1 100644 --- a/FastSimulation/Tracking/python/hltPixelTracks_cff.py +++ b/FastSimulation/Tracking/python/hltPixelTracks_cff.py @@ -4,10 +4,10 @@ # Note: naming convention of pixel track filter needs to follow HLT, # current it is set to what gets used in customizeHLTforCMSSW -from RecoPixelVertexing.PixelTrackFitting.pixelFitterByHelixProjections_cfi import pixelFitterByHelixProjections as _pixelFitterByHelixProjections +from RecoTracker.PixelTrackFitting.pixelFitterByHelixProjections_cfi import pixelFitterByHelixProjections as _pixelFitterByHelixProjections hltPixelTracksFitter = _pixelFitterByHelixProjections.clone() -from RecoPixelVertexing.PixelTrackFitting.pixelTrackFilterByKinematics_cfi import pixelTrackFilterByKinematics as _pixelTrackFilterByKinematics +from RecoTracker.PixelTrackFitting.pixelTrackFilterByKinematics_cfi import pixelTrackFilterByKinematics as _pixelTrackFilterByKinematics hltPixelTracksFilter = _pixelTrackFilterByKinematics.clone() hltPixelTracks = cms.EDProducer("PixelTracksProducer", diff --git a/FastSimulation/Tracking/src/SeedFinderSelector.cc b/FastSimulation/Tracking/src/SeedFinderSelector.cc index db3d124ca19f4..8040431ff35ee 100644 --- a/FastSimulation/Tracking/src/SeedFinderSelector.cc +++ b/FastSimulation/Tracking/src/SeedFinderSelector.cc @@ -11,11 +11,11 @@ #include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h" #include "RecoTracker/TkSeedGenerator/interface/MultiHitGeneratorFromPairAndLayers.h" #include "RecoTracker/TkSeedGenerator/interface/MultiHitGeneratorFromPairAndLayersFactory.h" -#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayers.h" -#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayersFactory.h" -#include "RecoPixelVertexing/PixelTriplets/interface/CAHitTripletGenerator.h" -#include "RecoPixelVertexing/PixelTriplets/interface/CAHitQuadrupletGenerator.h" -#include "RecoPixelVertexing/PixelTriplets/interface/OrderedHitSeeds.h" +#include "RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayers.h" +#include "RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayersFactory.h" +#include "RecoTracker/PixelSeeding/interface/CAHitTripletGenerator.h" +#include "RecoTracker/PixelSeeding/interface/CAHitQuadrupletGenerator.h" +#include "RecoTracker/PixelSeeding/interface/OrderedHitSeeds.h" #include "RecoTracker/TkHitPairs/interface/IntermediateHitDoublets.h" #include "RecoTracker/TkMSParametrization/interface/MultipleScatteringParametrisationMaker.h" #include "RecoTracker/Record/interface/TrackerMultipleScatteringRecord.h" diff --git a/HLTrigger/Configuration/python/HLT_75e33_cff.py b/HLTrigger/Configuration/python/HLT_75e33_cff.py index bc280670a1ad2..912e30e01b181 100644 --- a/HLTrigger/Configuration/python/HLT_75e33_cff.py +++ b/HLTrigger/Configuration/python/HLT_75e33_cff.py @@ -12,8 +12,8 @@ fragment.load("RecoLocalCalo/HcalRecAlgos/hcalChannelPropertiesESProd_cfi") fragment.load("RecoLocalTracker/Phase2TrackerRecHits/Phase2StripCPEESProducer_cfi") fragment.load("RecoLocalTracker/SiPixelRecHits/PixelCPEGeneric_cfi") -fragment.load("RecoPixelVertexing.PixelTrackFitting.pixelTrackCleanerBySharedHits_cfi") -fragment.load("RecoPixelVertexing/PixelLowPtUtilities/ClusterShapeHitFilterESProducer_cfi") +fragment.load("RecoTracker/PixelTrackFitting/pixelTrackCleanerBySharedHits_cfi") +fragment.load("RecoTracker/PixelLowPtUtilities/ClusterShapeHitFilterESProducer_cfi") fragment.load("RecoTracker/FinalTrackSelectors/trackAlgoPriorityOrder_cfi") fragment.load("RecoTracker/MeasurementDet/MeasurementTrackerESProducer_cfi") fragment.load("RecoTracker/TkNavigation/NavigationSchoolESProducer_cfi") diff --git a/HLTrigger/Configuration/python/customizeHLTforCMSSW.py b/HLTrigger/Configuration/python/customizeHLTforCMSSW.py index 53b007a50b775..f930413d7945d 100644 --- a/HLTrigger/Configuration/python/customizeHLTforCMSSW.py +++ b/HLTrigger/Configuration/python/customizeHLTforCMSSW.py @@ -210,6 +210,12 @@ def customiseForOffline(process): return process +def customizeForRecoPixelVertexing(process): + for prod in esproducers_by_type(process, 'ClusterShapeHitFilterESProducer'): + prod.PixelShapeFile = "RecoTracker/PixelLowPtUtilities/data/pixelShapePhase1_noL1.par" + prod.PixelShapeFileL1 = "RecoTracker/PixelLowPtUtilities/data/pixelShapePhase1_loose.par" + + return process # CMSSW version specific customizations def customizeHLTforCMSSW(process, menuType="GRun"): @@ -219,4 +225,6 @@ def customizeHLTforCMSSW(process, menuType="GRun"): # add call to action function in proper order: newest last! # process = customiseFor12718(process) + process = customizeForRecoPixelVertexing(process) + return process diff --git a/RecoHI/HiMuonAlgos/python/HiRegitMuonDetachedTripletStep_cff.py b/RecoHI/HiMuonAlgos/python/HiRegitMuonDetachedTripletStep_cff.py index 3f6c7458a7aa4..99d3eba335fda 100644 --- a/RecoHI/HiMuonAlgos/python/HiRegitMuonDetachedTripletStep_cff.py +++ b/RecoHI/HiMuonAlgos/python/HiRegitMuonDetachedTripletStep_cff.py @@ -62,7 +62,7 @@ hiRegitMuDetachedTripletStepSeeds = RecoTracker.IterativeTracking.DetachedTripletStep_cff.detachedTripletStepSeeds.clone( seedingHitSets = "hiRegitMuDetachedTripletStepHitTriplets" ) -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * # building: feed the new-named seeds diff --git a/RecoHI/HiTracking/BuildFile.xml b/RecoHI/HiTracking/BuildFile.xml index b4adafd3bab95..b41ba5f545b27 100644 --- a/RecoHI/HiTracking/BuildFile.xml +++ b/RecoHI/HiTracking/BuildFile.xml @@ -9,8 +9,8 @@ - - + + diff --git a/RecoHI/HiTracking/interface/HIPixelTrackFilter.h b/RecoHI/HiTracking/interface/HIPixelTrackFilter.h index 5d635af4a27e5..67b38e3bb2bd3 100644 --- a/RecoHI/HiTracking/interface/HIPixelTrackFilter.h +++ b/RecoHI/HiTracking/interface/HIPixelTrackFilter.h @@ -1,7 +1,7 @@ #ifndef _HIPixelTrackFilter_h_ #define _HIPixelTrackFilter_h_ -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeTrackFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterShapeTrackFilter.h" #include "DataFormats/VertexReco/interface/Vertex.h" #include "DataFormats/VertexReco/interface/VertexFwd.h" diff --git a/RecoHI/HiTracking/interface/HIProtoTrackFilter.h b/RecoHI/HiTracking/interface/HIProtoTrackFilter.h index dfe462690d625..fe441ef46b9e6 100644 --- a/RecoHI/HiTracking/interface/HIProtoTrackFilter.h +++ b/RecoHI/HiTracking/interface/HIProtoTrackFilter.h @@ -1,7 +1,7 @@ #ifndef _HIProtoTrackFilter_h_ #define _HIProtoTrackFilter_h_ -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilterBase.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackFilterBase.h" namespace reco { class BeamSpot; diff --git a/RecoHI/HiTracking/plugins/BuildFile.xml b/RecoHI/HiTracking/plugins/BuildFile.xml index 7e9bf57196d4f..3185e4b6e7b55 100644 --- a/RecoHI/HiTracking/plugins/BuildFile.xml +++ b/RecoHI/HiTracking/plugins/BuildFile.xml @@ -19,7 +19,7 @@ - + diff --git a/RecoHI/HiTracking/plugins/HIPixelTrackFilterProducer.cc b/RecoHI/HiTracking/plugins/HIPixelTrackFilterProducer.cc index fe884bff1a82a..a06a5ccd12106 100644 --- a/RecoHI/HiTracking/plugins/HIPixelTrackFilterProducer.cc +++ b/RecoHI/HiTracking/plugins/HIPixelTrackFilterProducer.cc @@ -10,7 +10,7 @@ #include "FWCore/Utilities/interface/EDGetToken.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilter.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackFilter.h" #include "RecoHI/HiTracking/interface/HIPixelTrackFilter.h" #include "DataFormats/SiPixelCluster/interface/SiPixelClusterShapeCache.h" #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" diff --git a/RecoHI/HiTracking/plugins/HIProtoTrackFilterProducer.cc b/RecoHI/HiTracking/plugins/HIProtoTrackFilterProducer.cc index acb6ba508ea27..cc3b68587ab0f 100644 --- a/RecoHI/HiTracking/plugins/HIProtoTrackFilterProducer.cc +++ b/RecoHI/HiTracking/plugins/HIProtoTrackFilterProducer.cc @@ -11,7 +11,7 @@ #include "FWCore/Utilities/interface/EDGetToken.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilter.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackFilter.h" #include "RecoHI/HiTracking/interface/HIProtoTrackFilter.h" #include "DataFormats/TrackerCommon/interface/TrackerTopology.h" #include "Geometry/Records/interface/TrackerTopologyRcd.h" diff --git a/RecoHI/HiTracking/python/HIInitialJetCoreClusterSplitting_cff.py b/RecoHI/HiTracking/python/HIInitialJetCoreClusterSplitting_cff.py index d89861bd40799..0e5569befdb91 100644 --- a/RecoHI/HiTracking/python/HIInitialJetCoreClusterSplitting_cff.py +++ b/RecoHI/HiTracking/python/HIInitialJetCoreClusterSplitting_cff.py @@ -34,7 +34,7 @@ from RecoLocalTracker.SiPixelRecHits.SiPixelRecHits_cfi import siPixelRecHits from RecoTracker.MeasurementDet.MeasurementTrackerEventProducer_cfi import MeasurementTrackerEvent -from RecoPixelVertexing.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import * +from RecoTracker.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import * hiInitialJetCoreClusterSplittingTask = cms.Task( hiPixelVerticesPreSplittingTask , hiCaloTowerForTrkPreSplitting diff --git a/RecoHI/HiTracking/python/HILowPtConformalPixelTracks_cfi.py b/RecoHI/HiTracking/python/HILowPtConformalPixelTracks_cfi.py index 95c0fd42b98f3..135c927ee75c8 100644 --- a/RecoHI/HiTracking/python/HILowPtConformalPixelTracks_cfi.py +++ b/RecoHI/HiTracking/python/HILowPtConformalPixelTracks_cfi.py @@ -1,10 +1,10 @@ import FWCore.ParameterSet.Config as cms from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer -from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * -from RecoPixelVertexing.PixelLowPtUtilities.trackCleaner_cfi import * -from RecoPixelVertexing.PixelTrackFitting.pixelFitterByConformalMappingAndLine_cfi import * +from RecoTracker.PixelSeeding.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +from RecoTracker.PixelLowPtUtilities.trackCleaner_cfi import * +from RecoTracker.PixelTrackFitting.pixelFitterByConformalMappingAndLine_cfi import * from RecoHI.HiTracking.HIPixelTrackFilter_cff import * from RecoHI.HiTracking.HITrackingRegionProducer_cfi import * @@ -23,7 +23,7 @@ produceSeedingHitSets = True, ) -import RecoPixelVertexing.PixelTrackFitting.pixelTracks_cfi as _mod +import RecoTracker.PixelTrackFitting.pixelTracks_cfi as _mod # Pixel tracks hiConformalPixelTracks = _mod.pixelTracks.clone( #passLabel = 'Pixel triplet low-pt tracks with vertex constraint', @@ -111,7 +111,7 @@ tipMax = 999.0 ) -from RecoPixelVertexing.PixelTrackFitting.pixelNtupletsFitter_cfi import pixelNtupletsFitter +from RecoTracker.PixelTrackFitting.pixelNtupletsFitter_cfi import pixelNtupletsFitter from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel phase1Pixel.toModify(hiConformalPixelTracks, diff --git a/RecoHI/HiTracking/python/HIPixel3PrimTracks_cfi.py b/RecoHI/HiTracking/python/HIPixel3PrimTracks_cfi.py index c2fa6e3e1e169..7be3e682abaf9 100644 --- a/RecoHI/HiTracking/python/HIPixel3PrimTracks_cfi.py +++ b/RecoHI/HiTracking/python/HIPixel3PrimTracks_cfi.py @@ -1,10 +1,10 @@ import FWCore.ParameterSet.Config as cms from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer -from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * -from RecoPixelVertexing.PixelLowPtUtilities.trackCleaner_cfi import * -from RecoPixelVertexing.PixelTrackFitting.pixelFitterByHelixProjections_cfi import * +from RecoTracker.PixelSeeding.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +from RecoTracker.PixelLowPtUtilities.trackCleaner_cfi import * +from RecoTracker.PixelTrackFitting.pixelFitterByHelixProjections_cfi import * from RecoHI.HiTracking.HIPixelTrackFilter_cff import * from RecoHI.HiTracking.HITrackingRegionProducer_cfi import * from RecoTracker.TkSeedingLayers.PixelLayerQuadruplets_cfi import PixelLayerQuadruplets as _PixelLayerQuadruplets @@ -34,7 +34,7 @@ produceIntermediateHitTriplets = True, ) -from RecoPixelVertexing.PixelTriplets.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer +from RecoTracker.PixelSeeding.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer hiPixel3PrimTracksHitDoubletsCA = hiPixel3PrimTracksHitDoublets.clone( layerPairs = [0,1,2] ) @@ -53,7 +53,7 @@ CAPhiCut = 0.2, ) -import RecoPixelVertexing.PixelTrackFitting.pixelTracks_cfi as _mod +import RecoTracker.PixelTrackFitting.pixelTracks_cfi as _mod # Pixel tracks hiPixel3PrimTracks = _mod.pixelTracks.clone( diff --git a/RecoHI/HiTracking/python/HIPixel3ProtoTracks_cfi.py b/RecoHI/HiTracking/python/HIPixel3ProtoTracks_cfi.py index 3c01923a4cd70..869bcdca245c5 100644 --- a/RecoHI/HiTracking/python/HIPixel3ProtoTracks_cfi.py +++ b/RecoHI/HiTracking/python/HIPixel3ProtoTracks_cfi.py @@ -1,10 +1,10 @@ import FWCore.ParameterSet.Config as cms from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer -from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer -from RecoPixelVertexing.PixelTriplets.PixelTripletHLTGenerator_cfi import * -from RecoPixelVertexing.PixelTrackFitting.pixelFitterByHelixProjections_cfi import * -from RecoPixelVertexing.PixelTrackFitting.pixelTrackCleanerBySharedHits_cfi import * +from RecoTracker.PixelSeeding.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer +from RecoTracker.PixelSeeding.PixelTripletHLTGenerator_cfi import * +from RecoTracker.PixelTrackFitting.pixelFitterByHelixProjections_cfi import * +from RecoTracker.PixelTrackFitting.pixelTrackCleanerBySharedHits_cfi import * from RecoHI.HiTracking.HIPixelTrackFilter_cff import * from RecoHI.HiTracking.HITrackingRegionProducer_cfi import * from RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi import * @@ -24,7 +24,7 @@ produceSeedingHitSets = True, ) -import RecoPixelVertexing.PixelTrackFitting.pixelTracks_cfi as _mod +import RecoTracker.PixelTrackFitting.pixelTracks_cfi as _mod # Pixel tracks hiPixel3ProtoTracks = _mod.pixelTracks.clone( diff --git a/RecoHI/HiTracking/python/HIPixelTrackFilter_cff.py b/RecoHI/HiTracking/python/HIPixelTrackFilter_cff.py index 945b31e5b3ab3..8cc311ab2eac7 100644 --- a/RecoHI/HiTracking/python/HIPixelTrackFilter_cff.py +++ b/RecoHI/HiTracking/python/HIPixelTrackFilter_cff.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms -from RecoPixelVertexing.PixelLowPtUtilities.clusterShapeTrackFilter_cfi import clusterShapeTrackFilter as _clusterShapeTrackFilter +from RecoTracker.PixelLowPtUtilities.clusterShapeTrackFilter_cfi import clusterShapeTrackFilter as _clusterShapeTrackFilter clusterFilter = _clusterShapeTrackFilter.clone( ptMin = 1.5, ) @@ -8,7 +8,7 @@ from RecoHI.HiTracking.hiPixelTrackFilter_cfi import hiPixelTrackFilter as _hiPixelTrackFilter hiFilter = _hiPixelTrackFilter.clone() -from RecoPixelVertexing.PixelTrackFitting.pixelTrackFilterByKinematics_cfi import pixelTrackFilterByKinematics as _pixelTrackFilterByKinematics +from RecoTracker.PixelTrackFitting.pixelTrackFilterByKinematics_cfi import pixelTrackFilterByKinematics as _pixelTrackFilterByKinematics kinematicFilter = _pixelTrackFilterByKinematics.clone( ptMin = 0.7, ) diff --git a/RecoHI/HiTracking/python/HIPixelTripletSeeds_cff.py b/RecoHI/HiTracking/python/HIPixelTripletSeeds_cff.py index 86f57f63d4d34..897b9ca410105 100644 --- a/RecoHI/HiTracking/python/HIPixelTripletSeeds_cff.py +++ b/RecoHI/HiTracking/python/HIPixelTripletSeeds_cff.py @@ -5,8 +5,8 @@ from RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi import * # pixel seeds -import RecoPixelVertexing.PixelLowPtUtilities.TrackSeeds_cfi -hiPixelTrackSeeds = RecoPixelVertexing.PixelLowPtUtilities.TrackSeeds_cfi.pixelTrackSeeds.clone( +import RecoTracker.PixelLowPtUtilities.TrackSeeds_cfi +hiPixelTrackSeeds = RecoTracker.PixelLowPtUtilities.TrackSeeds_cfi.pixelTrackSeeds.clone( InputCollection = 'hiPixel3PrimTracks' ) diff --git a/RecoHI/HiTracking/python/hiDetachedQuadStep_cff.py b/RecoHI/HiTracking/python/hiDetachedQuadStep_cff.py index 3e1003e45ef7a..39a65ebf89e26 100644 --- a/RecoHI/HiTracking/python/hiDetachedQuadStep_cff.py +++ b/RecoHI/HiTracking/python/hiDetachedQuadStep_cff.py @@ -30,10 +30,10 @@ # SEEDS from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cfi import globalTrackingRegionWithVertices as _globalTrackingRegionWithVertices from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer -from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * -from RecoPixelVertexing.PixelLowPtUtilities.trackCleaner_cfi import * -from RecoPixelVertexing.PixelTrackFitting.pixelFitterByHelixProjections_cfi import * +from RecoTracker.PixelSeeding.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +from RecoTracker.PixelLowPtUtilities.trackCleaner_cfi import * +from RecoTracker.PixelTrackFitting.pixelFitterByHelixProjections_cfi import * from RecoHI.HiTracking.HIPixelTrackFilter_cff import * from RecoHI.HiTracking.HITrackingRegionProducer_cfi import * @@ -62,7 +62,7 @@ layerPairs = [0,1,2] ) -from RecoPixelVertexing.PixelTriplets.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer +from RecoTracker.PixelSeeding.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer hiDetachedQuadStepTracksHitQuadrupletsCA = _caHitQuadrupletEDProducer.clone( doublets = "hiDetachedQuadStepTracksHitDoubletsCA", extraHitRPhitolerance = 0.0, @@ -84,7 +84,7 @@ ptMin = 0.95, #seeding region is 0.3 ) -import RecoPixelVertexing.PixelTrackFitting.pixelTracks_cfi as _mod +import RecoTracker.PixelTrackFitting.pixelTracks_cfi as _mod hiDetachedQuadStepPixelTracks = _mod.pixelTracks.clone( passLabel = 'Pixel detached tracks with vertex constraint', @@ -99,8 +99,8 @@ ) -import RecoPixelVertexing.PixelLowPtUtilities.TrackSeeds_cfi -hiDetachedQuadStepSeeds = RecoPixelVertexing.PixelLowPtUtilities.TrackSeeds_cfi.pixelTrackSeeds.clone( +import RecoTracker.PixelLowPtUtilities.TrackSeeds_cfi +hiDetachedQuadStepSeeds = RecoTracker.PixelLowPtUtilities.TrackSeeds_cfi.pixelTrackSeeds.clone( InputCollection = 'hiDetachedQuadStepPixelTracks' ) diff --git a/RecoHI/HiTracking/python/hiDetachedTripletStep_cff.py b/RecoHI/HiTracking/python/hiDetachedTripletStep_cff.py index aec663900d939..352982b0d7bae 100644 --- a/RecoHI/HiTracking/python/hiDetachedTripletStep_cff.py +++ b/RecoHI/HiTracking/python/hiDetachedTripletStep_cff.py @@ -39,10 +39,10 @@ # SEEDS from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cfi import globalTrackingRegionWithVertices as _globalTrackingRegionWithVertices from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer -from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * -from RecoPixelVertexing.PixelLowPtUtilities.trackCleaner_cfi import * -from RecoPixelVertexing.PixelTrackFitting.pixelFitterByHelixProjections_cfi import * +from RecoTracker.PixelSeeding.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +from RecoTracker.PixelLowPtUtilities.trackCleaner_cfi import * +from RecoTracker.PixelTrackFitting.pixelFitterByHelixProjections_cfi import * from RecoHI.HiTracking.HIPixelTrackFilter_cff import * from RecoHI.HiTracking.HITrackingRegionProducer_cfi import * @@ -67,17 +67,17 @@ maxElement = 50000000, produceIntermediateHitDoublets = True, ) -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * hiDetachedTripletStepTracksHitTriplets = _pixelTripletHLTEDProducer.clone( doublets = "hiDetachedTripletStepTracksHitDoublets", extraHitRPhitolerance = 0.0, extraHitRZtolerance = 0.0, maxElement = 1000000, - SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(), + SeedComparitorPSet = RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(), produceSeedingHitSets = True, ) -from RecoPixelVertexing.PixelTriplets.caHitTripletEDProducer_cfi import caHitTripletEDProducer as _caHitTripletEDProducer +from RecoTracker.PixelSeeding.caHitTripletEDProducer_cfi import caHitTripletEDProducer as _caHitTripletEDProducer hiDetachedTripletStepTracksHitDoubletsCA = hiDetachedTripletStepTracksHitDoublets.clone( layerPairs = [0,1] ) @@ -101,7 +101,7 @@ ptMin = 0.95, ) -import RecoPixelVertexing.PixelTrackFitting.pixelTracks_cfi as _mod +import RecoTracker.PixelTrackFitting.pixelTracks_cfi as _mod hiDetachedTripletStepPixelTracks = _mod.pixelTracks.clone( passLabel = 'Pixel detached tracks with vertex constraint', @@ -119,8 +119,8 @@ ) -import RecoPixelVertexing.PixelLowPtUtilities.TrackSeeds_cfi -hiDetachedTripletStepSeeds = RecoPixelVertexing.PixelLowPtUtilities.TrackSeeds_cfi.pixelTrackSeeds.clone( +import RecoTracker.PixelLowPtUtilities.TrackSeeds_cfi +hiDetachedTripletStepSeeds = RecoTracker.PixelLowPtUtilities.TrackSeeds_cfi.pixelTrackSeeds.clone( InputCollection = 'hiDetachedTripletStepPixelTracks' ) diff --git a/RecoHI/HiTracking/python/hiHighPtTripletStep_cff.py b/RecoHI/HiTracking/python/hiHighPtTripletStep_cff.py index 829747a78564f..a7d17aabf8490 100644 --- a/RecoHI/HiTracking/python/hiHighPtTripletStep_cff.py +++ b/RecoHI/HiTracking/python/hiHighPtTripletStep_cff.py @@ -31,10 +31,10 @@ # SEEDS from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cfi import globalTrackingRegionWithVertices as _globalTrackingRegionWithVertices from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer -from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * -from RecoPixelVertexing.PixelLowPtUtilities.trackCleaner_cfi import * -from RecoPixelVertexing.PixelTrackFitting.pixelFitterByHelixProjections_cfi import * +from RecoTracker.PixelSeeding.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +from RecoTracker.PixelLowPtUtilities.trackCleaner_cfi import * +from RecoTracker.PixelTrackFitting.pixelFitterByHelixProjections_cfi import * from RecoHI.HiTracking.HIPixelTrackFilter_cff import * from RecoHI.HiTracking.HITrackingRegionProducer_cfi import * @@ -61,11 +61,11 @@ layerPairs = [0,1] ) -from RecoPixelVertexing.PixelTriplets.caHitTripletEDProducer_cfi import caHitTripletEDProducer as _caHitTripletEDProducer +from RecoTracker.PixelSeeding.caHitTripletEDProducer_cfi import caHitTripletEDProducer as _caHitTripletEDProducer hiHighPtTripletStepTracksHitTripletsCA = _caHitTripletEDProducer.clone( doublets = "hiHighPtTripletStepTracksHitDoubletsCA", extraHitRPhitolerance = 0.0, - SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(), + SeedComparitorPSet = RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(), maxChi2 = dict( pt1 = 0.8, pt2 = 8, value1 = 100, value2 = 6, @@ -83,7 +83,7 @@ ptMin = 1.0, #seeding region is 0.6 ) -import RecoPixelVertexing.PixelTrackFitting.pixelTracks_cfi as _mod +import RecoTracker.PixelTrackFitting.pixelTracks_cfi as _mod hiHighPtTripletStepPixelTracks = _mod.pixelTracks.clone( passLabel = 'Pixel detached tracks with vertex constraint', @@ -97,8 +97,8 @@ Cleaner = "trackCleaner" ) -import RecoPixelVertexing.PixelLowPtUtilities.TrackSeeds_cfi -hiHighPtTripletStepSeeds = RecoPixelVertexing.PixelLowPtUtilities.TrackSeeds_cfi.pixelTrackSeeds.clone( +import RecoTracker.PixelLowPtUtilities.TrackSeeds_cfi +hiHighPtTripletStepSeeds = RecoTracker.PixelLowPtUtilities.TrackSeeds_cfi.pixelTrackSeeds.clone( InputCollection = 'hiHighPtTripletStepPixelTracks' ) diff --git a/RecoHI/HiTracking/python/hiLowPtQuadStep_cff.py b/RecoHI/HiTracking/python/hiLowPtQuadStep_cff.py index 0ed003c741281..380dad955b0f2 100644 --- a/RecoHI/HiTracking/python/hiLowPtQuadStep_cff.py +++ b/RecoHI/HiTracking/python/hiLowPtQuadStep_cff.py @@ -31,10 +31,10 @@ # SEEDS from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cfi import globalTrackingRegionWithVertices as _globalTrackingRegionWithVertices from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer -from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * -from RecoPixelVertexing.PixelLowPtUtilities.trackCleaner_cfi import * -from RecoPixelVertexing.PixelTrackFitting.pixelFitterByHelixProjections_cfi import * +from RecoTracker.PixelSeeding.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +from RecoTracker.PixelLowPtUtilities.trackCleaner_cfi import * +from RecoTracker.PixelTrackFitting.pixelFitterByHelixProjections_cfi import * from RecoHI.HiTracking.HIPixelTrackFilter_cff import * from RecoHI.HiTracking.HITrackingRegionProducer_cfi import * @@ -61,12 +61,12 @@ layerPairs = [0,1,2] ) -import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi -from RecoPixelVertexing.PixelTriplets.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer +import RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi +from RecoTracker.PixelSeeding.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer hiLowPtQuadStepTracksHitQuadrupletsCA = _caHitQuadrupletEDProducer.clone( doublets = "hiLowPtQuadStepTracksHitDoubletsCA", extraHitRPhitolerance = 0.0, - SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(), + SeedComparitorPSet = RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(), maxChi2 = dict( pt1 = 0.7, pt2 = 2, value1 = 1000, value2 = 150, @@ -86,7 +86,7 @@ ptMin = 0.4, #seeding region is 0.3 ) -import RecoPixelVertexing.PixelTrackFitting.pixelTracks_cfi as _mod +import RecoTracker.PixelTrackFitting.pixelTracks_cfi as _mod hiLowPtQuadStepPixelTracks = _mod.pixelTracks.clone( passLabel = 'Pixel detached tracks with vertex constraint', @@ -101,8 +101,8 @@ ) -import RecoPixelVertexing.PixelLowPtUtilities.TrackSeeds_cfi -hiLowPtQuadStepSeeds = RecoPixelVertexing.PixelLowPtUtilities.TrackSeeds_cfi.pixelTrackSeeds.clone( +import RecoTracker.PixelLowPtUtilities.TrackSeeds_cfi +hiLowPtQuadStepSeeds = RecoTracker.PixelLowPtUtilities.TrackSeeds_cfi.pixelTrackSeeds.clone( InputCollection = 'hiLowPtQuadStepPixelTracks' ) diff --git a/RecoHI/HiTracking/python/hiLowPtTripletStep_cff.py b/RecoHI/HiTracking/python/hiLowPtTripletStep_cff.py index 04a60a34a57eb..114e97af85998 100644 --- a/RecoHI/HiTracking/python/hiLowPtTripletStep_cff.py +++ b/RecoHI/HiTracking/python/hiLowPtTripletStep_cff.py @@ -32,11 +32,11 @@ # SEEDS from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cfi import globalTrackingRegionWithVertices as _globalTrackingRegionWithVertices from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer -from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * -import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi -from RecoPixelVertexing.PixelLowPtUtilities.trackCleaner_cfi import * -from RecoPixelVertexing.PixelTrackFitting.pixelFitterByHelixProjections_cfi import * +from RecoTracker.PixelSeeding.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +import RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi +from RecoTracker.PixelLowPtUtilities.trackCleaner_cfi import * +from RecoTracker.PixelTrackFitting.pixelFitterByHelixProjections_cfi import * from RecoHI.HiTracking.HIPixelTrackFilter_cff import * from RecoHI.HiTracking.HITrackingRegionProducer_cfi import * @@ -61,15 +61,15 @@ maxElement = 50000000, produceIntermediateHitDoublets = True, ) -import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi +import RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi hiLowPtTripletStepTracksHitTriplets = _pixelTripletHLTEDProducer.clone( doublets = "hiLowPtTripletStepTracksHitDoublets", #maxElement = 5000000, - SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(), + SeedComparitorPSet = RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(), produceSeedingHitSets = True, ) -from RecoPixelVertexing.PixelTriplets.caHitTripletEDProducer_cfi import caHitTripletEDProducer as _caHitTripletEDProducer +from RecoTracker.PixelSeeding.caHitTripletEDProducer_cfi import caHitTripletEDProducer as _caHitTripletEDProducer hiLowPtTripletStepTracksHitDoubletsCA = hiLowPtTripletStepTracksHitDoublets.clone( layerPairs = [0,1] ) @@ -93,7 +93,7 @@ ptMin = 0.4, ) -import RecoPixelVertexing.PixelTrackFitting.pixelTracks_cfi as _mod +import RecoTracker.PixelTrackFitting.pixelTracks_cfi as _mod hiLowPtTripletStepPixelTracks = _mod.pixelTracks.clone( passLabel = 'Pixel primary tracks with vertex constraint', @@ -112,8 +112,8 @@ ) -import RecoPixelVertexing.PixelLowPtUtilities.TrackSeeds_cfi -hiLowPtTripletStepSeeds = RecoPixelVertexing.PixelLowPtUtilities.TrackSeeds_cfi.pixelTrackSeeds.clone( +import RecoTracker.PixelLowPtUtilities.TrackSeeds_cfi +hiLowPtTripletStepSeeds = RecoTracker.PixelLowPtUtilities.TrackSeeds_cfi.pixelTrackSeeds.clone( InputCollection = 'hiLowPtTripletStepPixelTracks' ) diff --git a/RecoHI/HiTracking/python/hiRegitDetachedTripletStep_cff.py b/RecoHI/HiTracking/python/hiRegitDetachedTripletStep_cff.py index 71618a0597bd0..c527d1ca3cb20 100644 --- a/RecoHI/HiTracking/python/hiRegitDetachedTripletStep_cff.py +++ b/RecoHI/HiTracking/python/hiRegitDetachedTripletStep_cff.py @@ -36,8 +36,8 @@ FPix = dict(skipClusters = 'hiRegitDetachedTripletStepClusters') ) -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * -#import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +#import RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi # seeding hiRegitDetachedTripletStepSeeds = RecoTracker.IterativeTracking.DetachedTripletStep_cff.detachedTripletStepSeeds.clone( RegionFactoryPSet = HiTrackingRegionFactoryFromJetsBlock.clone( @@ -46,7 +46,7 @@ ClusterCheckPSet = dict(doClusterCheck = False), # do not check for max number of clusters pixel or strips OrderedHitsFactoryPSet = dict( SeedingLayers = 'hiRegitDetachedTripletStepSeedLayers' - #GeneratorPSet = dict(SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone()), + #GeneratorPSet = dict(SeedComparitorPSet = RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone()), ), ) # building: feed the new-named seeds diff --git a/RecoHI/HiTracking/python/hiRegitLowPtTripletStep_cff.py b/RecoHI/HiTracking/python/hiRegitLowPtTripletStep_cff.py index b2a54f08579c9..1835c15e315d0 100644 --- a/RecoHI/HiTracking/python/hiRegitLowPtTripletStep_cff.py +++ b/RecoHI/HiTracking/python/hiRegitLowPtTripletStep_cff.py @@ -35,8 +35,8 @@ FPix = dict(skipClusters = 'hiRegitLowPtTripletStepClusters') ) -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * -import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +import RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi # seeds hiRegitLowPtTripletStepSeeds = RecoTracker.IterativeTracking.LowPtTripletStep_cff.lowPtTripletStepSeeds.clone( RegionFactoryPSet = HiTrackingRegionFactoryFromJetsBlock.clone( @@ -46,7 +46,7 @@ OrderedHitsFactoryPSet = dict( SeedingLayers = 'hiRegitLowPtTripletStepSeedLayers', GeneratorPSet = dict ( - SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone() + SeedComparitorPSet = RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone() ), ), ) diff --git a/RecoMuon/TrackerSeedGenerator/BuildFile.xml b/RecoMuon/TrackerSeedGenerator/BuildFile.xml index ebe12da30cca9..485ac85a0dd2e 100644 --- a/RecoMuon/TrackerSeedGenerator/BuildFile.xml +++ b/RecoMuon/TrackerSeedGenerator/BuildFile.xml @@ -18,7 +18,7 @@ - + diff --git a/RecoMuon/TrackerSeedGenerator/plugins/BuildFile.xml b/RecoMuon/TrackerSeedGenerator/plugins/BuildFile.xml index bfa3a523555e7..5528edd4e9959 100644 --- a/RecoMuon/TrackerSeedGenerator/plugins/BuildFile.xml +++ b/RecoMuon/TrackerSeedGenerator/plugins/BuildFile.xml @@ -19,7 +19,7 @@ - + diff --git a/RecoMuon/TrackerSeedGenerator/plugins/TSGFromL1Muon.cc b/RecoMuon/TrackerSeedGenerator/plugins/TSGFromL1Muon.cc index b44c1a802b40c..bf8576ff3922c 100644 --- a/RecoMuon/TrackerSeedGenerator/plugins/TSGFromL1Muon.cc +++ b/RecoMuon/TrackerSeedGenerator/plugins/TSGFromL1Muon.cc @@ -16,7 +16,7 @@ #include "RecoMuon/TrackerSeedGenerator/interface/L1MuonRegionProducer.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilter.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackFilter.h" #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" diff --git a/RecoMuon/TrackerSeedGenerator/python/TSGFromPixelTriplets_cfi.py b/RecoMuon/TrackerSeedGenerator/python/TSGFromPixelTriplets_cfi.py index 6203ab8c87d6e..d2888e19d2e88 100644 --- a/RecoMuon/TrackerSeedGenerator/python/TSGFromPixelTriplets_cfi.py +++ b/RecoMuon/TrackerSeedGenerator/python/TSGFromPixelTriplets_cfi.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms -from RecoPixelVertexing.PixelTriplets.PixelTripletHLTGenerator_cfi import * +from RecoTracker.PixelSeeding.PixelTripletHLTGenerator_cfi import * SeedGeneratorParameters = cms.PSet( ComponentName = cms.string('TSGFromOrderedHits'), OrderedHitsFactoryPSet = cms.PSet( diff --git a/RecoMuon/TrackerSeedGenerator/python/TSGSmart_cff.py b/RecoMuon/TrackerSeedGenerator/python/TSGSmart_cff.py index cb2def872b6b0..804668f6fc116 100644 --- a/RecoMuon/TrackerSeedGenerator/python/TSGSmart_cff.py +++ b/RecoMuon/TrackerSeedGenerator/python/TSGSmart_cff.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms -from RecoPixelVertexing.PixelTriplets.PixelTripletHLTGenerator_cfi import * +from RecoTracker.PixelSeeding.PixelTripletHLTGenerator_cfi import * SeedGeneratorParameters = cms.PSet( EtaBound = cms.double(2.0), ComponentName = cms.string('TSGSmart'), diff --git a/RecoMuon/TrackerSeedGenerator/python/TSGs_cff.py b/RecoMuon/TrackerSeedGenerator/python/TSGs_cff.py index 1393cf1a68f3e..c6f45a9128afb 100644 --- a/RecoMuon/TrackerSeedGenerator/python/TSGs_cff.py +++ b/RecoMuon/TrackerSeedGenerator/python/TSGs_cff.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms -from RecoPixelVertexing.PixelTriplets.PixelTripletHLTGenerator_cfi import * +from RecoTracker.PixelSeeding.PixelTripletHLTGenerator_cfi import * from RecoMuon.TrackingTools.MuonErrorMatrixValues_cff import * TSGsBlock = cms.PSet( TSGFromCombinedHits = cms.PSet( diff --git a/RecoMuon/TrackerSeedGenerator/python/pixelTrackFilterByKinematicsForTSGFromL1_cfi.py b/RecoMuon/TrackerSeedGenerator/python/pixelTrackFilterByKinematicsForTSGFromL1_cfi.py index efa71ad2d28c5..bc7dd18691eb8 100644 --- a/RecoMuon/TrackerSeedGenerator/python/pixelTrackFilterByKinematicsForTSGFromL1_cfi.py +++ b/RecoMuon/TrackerSeedGenerator/python/pixelTrackFilterByKinematicsForTSGFromL1_cfi.py @@ -1,4 +1,4 @@ -from RecoPixelVertexing.PixelTrackFitting.pixelTrackFilterByKinematics_cfi import pixelTrackFilterByKinematics as _pixelTrackFilterByKinematics +from RecoTracker.PixelTrackFitting.pixelTrackFilterByKinematics_cfi import pixelTrackFilterByKinematics as _pixelTrackFilterByKinematics pixelTrackFilterByKinematicsForTSGFromL1 = _pixelTrackFilterByKinematics.clone( nSigmaInvPtTolerance = 2.0, nSigmaTipMaxTolerance = 3.0, diff --git a/RecoMuon/TrackerSeedGenerator/src/L1MuonPixelTrackFitter.cc b/RecoMuon/TrackerSeedGenerator/src/L1MuonPixelTrackFitter.cc index e55ce7eb25e25..04cccc9cb5951 100644 --- a/RecoMuon/TrackerSeedGenerator/src/L1MuonPixelTrackFitter.cc +++ b/RecoMuon/TrackerSeedGenerator/src/L1MuonPixelTrackFitter.cc @@ -4,7 +4,7 @@ #include "RecoTracker/TkMSParametrization/interface/PixelRecoLineRZ.h" #include "RecoTracker/TkMSParametrization/interface/PixelRecoUtilities.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackBuilder.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackBuilder.h" #include "DataFormats/GeometryCommonDetAlgo/interface/Measurement1D.h" #include "MagneticField/Engine/interface/MagneticField.h" #include "RecoTracker/TkSeedingLayers/interface/SeedingHitSet.h" diff --git a/RecoPixelVertexing/PixelTrackFitting/python/pixelNtupletsFitter_cfi.py b/RecoPixelVertexing/PixelTrackFitting/python/pixelNtupletsFitter_cfi.py deleted file mode 100644 index 10e1e3852e9c4..0000000000000 --- a/RecoPixelVertexing/PixelTrackFitting/python/pixelNtupletsFitter_cfi.py +++ /dev/null @@ -1,6 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -from RecoPixelVertexing.PixelTrackFitting.pixelNtupletsFitterDefault_cfi import pixelNtupletsFitterDefault - -pixelNtupletsFitter = pixelNtupletsFitterDefault.clone() - diff --git a/RecoPixelVertexing/PixelTriplets/python/caHitQuadrupletEDProducer_cfi.py b/RecoPixelVertexing/PixelTriplets/python/caHitQuadrupletEDProducer_cfi.py deleted file mode 100644 index c72c07ae5a721..0000000000000 --- a/RecoPixelVertexing/PixelTriplets/python/caHitQuadrupletEDProducer_cfi.py +++ /dev/null @@ -1,4 +0,0 @@ -import FWCore.ParameterSet.Config as cms -from RecoPixelVertexing.PixelTriplets.caHitQuadrupletDefaultEDProducer_cfi import caHitQuadrupletDefaultEDProducer as _caHitQuadrupletDefaultEDProducer - -caHitQuadrupletEDProducer = _caHitQuadrupletDefaultEDProducer.clone() diff --git a/RecoPixelVertexing/PixelVertexFinding/python/PixelVertexes_cff.py b/RecoPixelVertexing/PixelVertexFinding/python/PixelVertexes_cff.py deleted file mode 100644 index d47ce2eb339b4..0000000000000 --- a/RecoPixelVertexing/PixelVertexFinding/python/PixelVertexes_cff.py +++ /dev/null @@ -1,3 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -from RecoPixelVertexing.PixelVertexFinding.PixelVertexes_cfi import * diff --git a/RecoTauTag/HLTProducers/python/PixelTracksL2Tau_cfi.py b/RecoTauTag/HLTProducers/python/PixelTracksL2Tau_cfi.py index e69782c9622e3..2e993340ef308 100644 --- a/RecoTauTag/HLTProducers/python/PixelTracksL2Tau_cfi.py +++ b/RecoTauTag/HLTProducers/python/PixelTracksL2Tau_cfi.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms -from RecoPixelVertexing.PixelTrackFitting.pixelTracks_cfi import pixelTracks as _pixelTracks +from RecoTracker.PixelTrackFitting.pixelTracks_cfi import pixelTracks as _pixelTracks from RecoTauTag.HLTProducers.trackingRegionsFromBeamSpotAndL2Tau_cfi import trackingRegionsFromBeamSpotAndL2Tau # Note from new seeding framework migration diff --git a/RecoTauTag/HLTProducers/src/L2TauTagNNProducer.cc b/RecoTauTag/HLTProducers/src/L2TauTagNNProducer.cc index 4637bac6fa580..4a0996aab2361 100644 --- a/RecoTauTag/HLTProducers/src/L2TauTagNNProducer.cc +++ b/RecoTauTag/HLTProducers/src/L2TauTagNNProducer.cc @@ -38,7 +38,7 @@ #include "DataFormats/HLTReco/interface/TriggerTypeDefs.h" #include "DataFormats/HLTReco/interface/TriggerFilterObjectWithRefs.h" #include "TrackingTools/TrajectoryParametrization/interface/CurvilinearTrajectoryError.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/FitUtils.h" +#include "RecoTracker/PixelTrackFitting/interface/FitUtils.h" #include "TrackingTools/TrajectoryParametrization/interface/GlobalTrajectoryParameters.h" #include "DataFormats/TrackReco/interface/HitPattern.h" #include "TrackingTools/AnalyticalJacobians/interface/JacobianLocalToCurvilinear.h" diff --git a/RecoPixelVertexing/Configuration/python/RecoPixelVertexing_EventContent_cff.py b/RecoTracker/Configuration/python/RecoPixelVertexing_EventContent_cff.py similarity index 100% rename from RecoPixelVertexing/Configuration/python/RecoPixelVertexing_EventContent_cff.py rename to RecoTracker/Configuration/python/RecoPixelVertexing_EventContent_cff.py diff --git a/RecoPixelVertexing/Configuration/python/RecoPixelVertexing_cff.py b/RecoTracker/Configuration/python/RecoPixelVertexing_cff.py similarity index 80% rename from RecoPixelVertexing/Configuration/python/RecoPixelVertexing_cff.py rename to RecoTracker/Configuration/python/RecoPixelVertexing_cff.py index e941ffb207fce..93a5cfa401ad3 100644 --- a/RecoPixelVertexing/Configuration/python/RecoPixelVertexing_cff.py +++ b/RecoTracker/Configuration/python/RecoPixelVertexing_cff.py @@ -1,8 +1,8 @@ import FWCore.ParameterSet.Config as cms from HeterogeneousCore.CUDACore.SwitchProducerCUDA import SwitchProducerCUDA -from RecoPixelVertexing.PixelTrackFitting.PixelTracks_cff import * -from RecoPixelVertexing.PixelVertexFinding.PixelVertexes_cff import * +from RecoTracker.PixelTrackFitting.PixelTracks_cff import * +from RecoTracker.PixelVertexFinding.PixelVertexes_cff import * # legacy pixel vertex reconsruction using the divisive vertex finder pixelVerticesTask = cms.Task( @@ -14,8 +14,8 @@ from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker # build the pixel vertices in SoA format on the CPU -from RecoPixelVertexing.PixelVertexFinding.pixelVertexProducerCUDAPhase1_cfi import pixelVertexProducerCUDAPhase1 as _pixelVerticesCUDA -from RecoPixelVertexing.PixelVertexFinding.pixelVertexProducerCUDAPhase2_cfi import pixelVertexProducerCUDAPhase2 as _pixelVerticesCUDAPhase2 +from RecoTracker.PixelVertexFinding.pixelVertexProducerCUDAPhase1_cfi import pixelVertexProducerCUDAPhase1 as _pixelVerticesCUDA +from RecoTracker.PixelVertexFinding.pixelVertexProducerCUDAPhase2_cfi import pixelVertexProducerCUDAPhase2 as _pixelVerticesCUDAPhase2 pixelVerticesSoA = SwitchProducerCUDA( cpu = _pixelVerticesCUDA.clone( @@ -31,7 +31,7 @@ )) # convert the pixel vertices from SoA to legacy format -from RecoPixelVertexing.PixelVertexFinding.pixelVertexFromSoA_cfi import pixelVertexFromSoA as _pixelVertexFromSoA +from RecoTracker.PixelVertexFinding.pixelVertexFromSoA_cfi import pixelVertexFromSoA as _pixelVertexFromSoA (pixelNtupletFit).toReplaceWith(pixelVertices, _pixelVertexFromSoA.clone( src = "pixelVerticesSoA" @@ -61,7 +61,7 @@ )) # transfer the pixel vertices in SoA format to the CPU -from RecoPixelVertexing.PixelVertexFinding.pixelVerticesSoA_cfi import pixelVerticesSoA as _pixelVerticesSoA +from RecoTracker.PixelVertexFinding.pixelVerticesSoA_cfi import pixelVerticesSoA as _pixelVerticesSoA gpu.toModify(pixelVerticesSoA, cuda = _pixelVerticesSoA.clone( src = cms.InputTag("pixelVerticesCUDA") diff --git a/RecoTracker/Configuration/python/RecoTrackerP5_cff.py b/RecoTracker/Configuration/python/RecoTrackerP5_cff.py index 1194f858c9b11..81b08a72720be 100644 --- a/RecoTracker/Configuration/python/RecoTrackerP5_cff.py +++ b/RecoTracker/Configuration/python/RecoTrackerP5_cff.py @@ -11,7 +11,7 @@ from RecoTracker.SingleTrackPattern.CosmicTrackFinderP5_cff import * # Final Track Selector for CosmicTF from RecoTracker.FinalTrackSelectors.CosmicTFFinalTrackSelectorP5_cff import * -from RecoPixelVertexing.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import * +from RecoTracker.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import * #chi2 set to 40!! # CTF diff --git a/RecoPixelVertexing/Configuration/python/customizePixelTracksForTriplets.py b/RecoTracker/Configuration/python/customizePixelTracksForTriplets.py similarity index 100% rename from RecoPixelVertexing/Configuration/python/customizePixelTracksForTriplets.py rename to RecoTracker/Configuration/python/customizePixelTracksForTriplets.py diff --git a/RecoTracker/IterativeTracking/python/DetachedQuadStep_cff.py b/RecoTracker/IterativeTracking/python/DetachedQuadStep_cff.py index d3dbd5bbafe48..e518f4430e888 100644 --- a/RecoTracker/IterativeTracking/python/DetachedQuadStep_cff.py +++ b/RecoTracker/IterativeTracking/python/DetachedQuadStep_cff.py @@ -64,9 +64,9 @@ maxElement = 50000000, produceIntermediateHitDoublets = True, ) -from RecoPixelVertexing.PixelTriplets.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer -from RecoPixelVertexing.PixelTriplets.pixelTripletLargeTipEDProducer_cfi import pixelTripletLargeTipEDProducer as _pixelTripletLargeTipEDProducer -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +from RecoTracker.PixelSeeding.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer +from RecoTracker.PixelSeeding.pixelTripletLargeTipEDProducer_cfi import pixelTripletLargeTipEDProducer as _pixelTripletLargeTipEDProducer +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * detachedQuadStepHitQuadruplets = _caHitQuadrupletEDProducer.clone( doublets = 'detachedQuadStepHitDoublets', extraHitRPhitolerance = _pixelTripletLargeTipEDProducer.extraHitRPhitolerance, diff --git a/RecoTracker/IterativeTracking/python/DetachedTripletStep_cff.py b/RecoTracker/IterativeTracking/python/DetachedTripletStep_cff.py index b145566aa803e..8b71ab323f93f 100644 --- a/RecoTracker/IterativeTracking/python/DetachedTripletStep_cff.py +++ b/RecoTracker/IterativeTracking/python/DetachedTripletStep_cff.py @@ -76,8 +76,8 @@ maxElement = 50000000, produceIntermediateHitDoublets = True, ) -from RecoPixelVertexing.PixelTriplets.pixelTripletLargeTipEDProducer_cfi import pixelTripletLargeTipEDProducer as _pixelTripletLargeTipEDProducer -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +from RecoTracker.PixelSeeding.pixelTripletLargeTipEDProducer_cfi import pixelTripletLargeTipEDProducer as _pixelTripletLargeTipEDProducer +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * detachedTripletStepHitTriplets = _pixelTripletLargeTipEDProducer.clone( doublets = 'detachedTripletStepHitDoublets', produceSeedingHitSets = True, @@ -95,7 +95,7 @@ ), ) -from RecoPixelVertexing.PixelTriplets.caHitTripletEDProducer_cfi import caHitTripletEDProducer as _caHitTripletEDProducer +from RecoTracker.PixelSeeding.caHitTripletEDProducer_cfi import caHitTripletEDProducer as _caHitTripletEDProducer trackingPhase1.toModify(detachedTripletStepHitDoublets, layerPairs = [0,1]) # layer pairs (0,1), (1,2) trackingPhase1.toReplaceWith(detachedTripletStepHitTriplets, _caHitTripletEDProducer.clone( doublets = 'detachedTripletStepHitDoublets', @@ -157,8 +157,8 @@ (pp_on_XeXe_2017 | pp_on_AA).toModify(detachedTripletStepTrajectoryFilterBase, minPt=0.9) -import RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi -detachedTripletStepTrajectoryFilterShape = RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone() +import RecoTracker.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi +detachedTripletStepTrajectoryFilterShape = RecoTracker.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone() detachedTripletStepTrajectoryFilter = cms.PSet( ComponentType = cms.string('CompositeTrajectoryFilter'), filters = cms.VPSet( diff --git a/RecoTracker/IterativeTracking/python/DisplacedGeneralStep_cff.py b/RecoTracker/IterativeTracking/python/DisplacedGeneralStep_cff.py index 23b33d023f6cd..984dfefb8a98a 100644 --- a/RecoTracker/IterativeTracking/python/DisplacedGeneralStep_cff.py +++ b/RecoTracker/IterativeTracking/python/DisplacedGeneralStep_cff.py @@ -28,7 +28,7 @@ #----------------------------------------- Triplet seeding -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import ClusterShapeHitFilterESProducer as _ClusterShapeHitFilterESProducer +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import ClusterShapeHitFilterESProducer as _ClusterShapeHitFilterESProducer displacedGeneralStepClusterShapeHitFilter = _ClusterShapeHitFilterESProducer.clone( ComponentName = 'displacedGeneralStepClusterShapeHitFilter', doStripShapeCut = cms.bool(False), @@ -51,7 +51,7 @@ from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer_cff import seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer as _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer -from RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeSeedFilter_cfi import StripSubClusterShapeSeedFilter as _StripSubClusterShapeSeedFilter +from RecoTracker.PixelLowPtUtilities.StripSubClusterShapeSeedFilter_cfi import StripSubClusterShapeSeedFilter as _StripSubClusterShapeSeedFilter displacedGeneralStepSeeds = _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer.clone( seedingHitSets = "displacedGeneralStepHitTriplets", SeedComparitorPSet = dict( diff --git a/RecoTracker/IterativeTracking/python/ElectronSeeds_cff.py b/RecoTracker/IterativeTracking/python/ElectronSeeds_cff.py index a11f7fe9905b1..6f43750cfdd8c 100644 --- a/RecoTracker/IterativeTracking/python/ElectronSeeds_cff.py +++ b/RecoTracker/IterativeTracking/python/ElectronSeeds_cff.py @@ -114,8 +114,8 @@ maxElement = 50000000, produceIntermediateHitDoublets = True, ) -from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer -import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi +from RecoTracker.PixelSeeding.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer +import RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi tripletElectronHitTriplets = _pixelTripletHLTEDProducer.clone( doublets = 'tripletElectronHitDoublets', maxElement = 1000000, diff --git a/RecoTracker/IterativeTracking/python/HighPtTripletStep_cff.py b/RecoTracker/IterativeTracking/python/HighPtTripletStep_cff.py index 8402754bbbbb7..ba5667a56c002 100644 --- a/RecoTracker/IterativeTracking/python/HighPtTripletStep_cff.py +++ b/RecoTracker/IterativeTracking/python/HighPtTripletStep_cff.py @@ -97,14 +97,14 @@ maxElement = 50000000, produceIntermediateHitDoublets = True, ) -from RecoPixelVertexing.PixelTriplets.caHitTripletEDProducer_cfi import caHitTripletEDProducer as _caHitTripletEDProducer -from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * -import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi +from RecoTracker.PixelSeeding.caHitTripletEDProducer_cfi import caHitTripletEDProducer as _caHitTripletEDProducer +from RecoTracker.PixelSeeding.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +import RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi highPtTripletStepHitTriplets = _caHitTripletEDProducer.clone( doublets = 'highPtTripletStepHitDoublets', extraHitRPhitolerance = _pixelTripletHLTEDProducer.extraHitRPhitolerance, - SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(), + SeedComparitorPSet = RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(), maxChi2 = dict( pt1 = 0.8, pt2 = 8, value1 = 100, value2 = 6, diff --git a/RecoTracker/IterativeTracking/python/InitialStepPreSplitting_cff.py b/RecoTracker/IterativeTracking/python/InitialStepPreSplitting_cff.py index 12ce0323eb71b..40943e5a03d7c 100644 --- a/RecoTracker/IterativeTracking/python/InitialStepPreSplitting_cff.py +++ b/RecoTracker/IterativeTracking/python/InitialStepPreSplitting_cff.py @@ -42,17 +42,17 @@ maxElement = 50000000, produceIntermediateHitDoublets = True, ) -from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * -import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi +from RecoTracker.PixelSeeding.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +import RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi initialStepHitTripletsPreSplitting = _pixelTripletHLTEDProducer.clone( doublets = 'initialStepHitDoubletsPreSplitting', produceSeedingHitSets = True, - SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone( + SeedComparitorPSet = RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone( clusterShapeCacheSrc = 'siPixelClusterShapeCachePreSplitting' ), ) -from RecoPixelVertexing.PixelTriplets.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer +from RecoTracker.PixelSeeding.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer trackingPhase1.toModify(initialStepHitDoubletsPreSplitting, layerPairs = [0,1,2]) # layer pairs (0,1), (1,2), (2,3) initialStepHitQuadrupletsPreSplitting = _caHitQuadrupletEDProducer.clone( doublets = 'initialStepHitDoubletsPreSplitting', @@ -85,8 +85,8 @@ ) from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016 _tracker_apv_vfp30_2016.toModify(initialStepTrajectoryFilterBasePreSplitting, maxCCCLostHits = 2) -import RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi -initialStepTrajectoryFilterShapePreSplitting = RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone() +import RecoTracker.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi +initialStepTrajectoryFilterShapePreSplitting = RecoTracker.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone() initialStepTrajectoryFilterPreSplitting = cms.PSet( ComponentType = cms.string('CompositeTrajectoryFilter'), filters = cms.VPSet( @@ -215,7 +215,7 @@ # Final sequence from RecoLocalTracker.SiPixelRecHits.SiPixelRecHits_cfi import siPixelRecHits from RecoTracker.MeasurementDet.MeasurementTrackerEventProducer_cfi import MeasurementTrackerEvent -from RecoPixelVertexing.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import * +from RecoTracker.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import * InitialStepPreSplittingTask = cms.Task(trackerClusterCheckPreSplitting, initialStepSeedLayersPreSplitting, initialStepTrackingRegionsPreSplitting, diff --git a/RecoTracker/IterativeTracking/python/InitialStep_cff.py b/RecoTracker/IterativeTracking/python/InitialStep_cff.py index 9dd2ee40aef30..4e4e6719cf613 100644 --- a/RecoTracker/IterativeTracking/python/InitialStep_cff.py +++ b/RecoTracker/IterativeTracking/python/InitialStep_cff.py @@ -51,19 +51,19 @@ maxElement = 50000000, produceIntermediateHitDoublets = True, ) -from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * -import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi +from RecoTracker.PixelSeeding.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +import RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi initialStepHitTriplets = _pixelTripletHLTEDProducer.clone( doublets = 'initialStepHitDoublets', produceSeedingHitSets = True, - SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone() + SeedComparitorPSet = RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone() ) from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsEDProducer initialStepSeeds = _seedCreatorFromRegionConsecutiveHitsEDProducer.clone( seedingHitSets = 'initialStepHitTriplets', ) -from RecoPixelVertexing.PixelTriplets.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer +from RecoTracker.PixelSeeding.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer _initialStepCAHitQuadruplets = _caHitQuadrupletEDProducer.clone( doublets = 'initialStepHitDoublets', extraHitRPhitolerance = initialStepHitTriplets.extraHitRPhitolerance, @@ -166,8 +166,8 @@ trackingLowPU.toReplaceWith(initialStepTrajectoryFilterBase, _initialStepTrajectoryFilterBase) trackingPhase2PU140.toReplaceWith(initialStepTrajectoryFilterBase, _initialStepTrajectoryFilterBase) -import RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi -initialStepTrajectoryFilterShape = RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone() +import RecoTracker.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi +initialStepTrajectoryFilterShape = RecoTracker.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone() initialStepTrajectoryFilter = cms.PSet( ComponentType = cms.string('CompositeTrajectoryFilter'), filters = cms.VPSet( diff --git a/RecoTracker/IterativeTracking/python/LowPtBarrelTripletStep_cff.py b/RecoTracker/IterativeTracking/python/LowPtBarrelTripletStep_cff.py index 83e7cae2cba14..9d0f3498fee90 100644 --- a/RecoTracker/IterativeTracking/python/LowPtBarrelTripletStep_cff.py +++ b/RecoTracker/IterativeTracking/python/LowPtBarrelTripletStep_cff.py @@ -37,9 +37,9 @@ ) lowPtBarrelTripletStepSeeds.OrderedHitsFactoryPSet.SeedingLayers = 'lowPtBarrelTripletStepSeedLayers' -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * -import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi -lowPtBarrelTripletStepSeeds.OrderedHitsFactoryPSet.GeneratorPSet.SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +import RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi +lowPtBarrelTripletStepSeeds.OrderedHitsFactoryPSet.GeneratorPSet.SeedComparitorPSet = RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor # QUALITY CUTS DURING TRACK BUILDING diff --git a/RecoTracker/IterativeTracking/python/LowPtForwardTripletStep_cff.py b/RecoTracker/IterativeTracking/python/LowPtForwardTripletStep_cff.py index 3818eb2e2aea4..3a68fd8e30610 100644 --- a/RecoTracker/IterativeTracking/python/LowPtForwardTripletStep_cff.py +++ b/RecoTracker/IterativeTracking/python/LowPtForwardTripletStep_cff.py @@ -38,9 +38,9 @@ ) ) -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * -import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi -lowPtForwardTripletStepSeeds.OrderedHitsFactoryPSet.GeneratorPSet.SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +import RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi +lowPtForwardTripletStepSeeds.OrderedHitsFactoryPSet.GeneratorPSet.SeedComparitorPSet = RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor # QUALITY CUTS DURING TRACK BUILDING import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff diff --git a/RecoTracker/IterativeTracking/python/LowPtQuadStep_cff.py b/RecoTracker/IterativeTracking/python/LowPtQuadStep_cff.py index fe20126b6631b..74dc4034dd2dc 100644 --- a/RecoTracker/IterativeTracking/python/LowPtQuadStep_cff.py +++ b/RecoTracker/IterativeTracking/python/LowPtQuadStep_cff.py @@ -57,14 +57,14 @@ maxElement = 50000000, produceIntermediateHitDoublets = True, ) -from RecoPixelVertexing.PixelTriplets.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer -from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * -import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi +from RecoTracker.PixelSeeding.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer +from RecoTracker.PixelSeeding.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +import RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi lowPtQuadStepHitQuadruplets = _caHitQuadrupletEDProducer.clone( doublets = 'lowPtQuadStepHitDoublets', extraHitRPhitolerance = _pixelTripletHLTEDProducer.extraHitRPhitolerance, - SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(), + SeedComparitorPSet = RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(), maxChi2 = dict( pt1 = 0.7, pt2 = 2, value1 = 1000, value2 = 150, @@ -114,7 +114,7 @@ (pp_on_XeXe_2017 | pp_on_AA).toModify(lowPtQuadStepTrajectoryFilterBase, minPt=0.49) -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeTrajectoryFilter_cfi import * +from RecoTracker.PixelLowPtUtilities.ClusterShapeTrajectoryFilter_cfi import * # Composite filter lowPtQuadStepTrajectoryFilter = _TrajectoryFilter_cff.CompositeTrajectoryFilter_block.clone( filters = [cms.PSet(refToPSet_ = cms.string('lowPtQuadStepTrajectoryFilterBase'))] diff --git a/RecoTracker/IterativeTracking/python/LowPtTripletStep_cff.py b/RecoTracker/IterativeTracking/python/LowPtTripletStep_cff.py index 9d47a4c084977..6ec5cdfd82889 100644 --- a/RecoTracker/IterativeTracking/python/LowPtTripletStep_cff.py +++ b/RecoTracker/IterativeTracking/python/LowPtTripletStep_cff.py @@ -89,20 +89,20 @@ maxElement = 50000000, produceIntermediateHitDoublets = True, ) -from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * -import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi +from RecoTracker.PixelSeeding.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +import RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi lowPtTripletStepHitTriplets = _pixelTripletHLTEDProducer.clone( doublets = 'lowPtTripletStepHitDoublets', produceSeedingHitSets = True, - SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone() + SeedComparitorPSet = RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone() ) from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsEDProducer lowPtTripletStepSeeds = _seedCreatorFromRegionConsecutiveHitsEDProducer.clone( seedingHitSets = 'lowPtTripletStepHitTriplets', ) -from RecoPixelVertexing.PixelTriplets.caHitTripletEDProducer_cfi import caHitTripletEDProducer as _caHitTripletEDProducer +from RecoTracker.PixelSeeding.caHitTripletEDProducer_cfi import caHitTripletEDProducer as _caHitTripletEDProducer trackingPhase1.toModify(lowPtTripletStepHitDoublets, layerPairs = [0,1]) # layer pairs (0,1), (1,2) trackingPhase1.toReplaceWith(lowPtTripletStepHitTriplets, _caHitTripletEDProducer.clone( doublets = 'lowPtTripletStepHitDoublets', @@ -178,7 +178,7 @@ (pp_on_XeXe_2017 | pp_on_AA).toModify(lowPtTripletStepStandardTrajectoryFilter, minPt=0.49) -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeTrajectoryFilter_cfi import * +from RecoTracker.PixelLowPtUtilities.ClusterShapeTrajectoryFilter_cfi import * # Composite filter lowPtTripletStepTrajectoryFilter = _TrajectoryFilter_cff.CompositeTrajectoryFilter_block.clone( filters = [cms.PSet(refToPSet_ = cms.string('lowPtTripletStepStandardTrajectoryFilter')), diff --git a/RecoTracker/IterativeTracking/python/MixedTripletStep_cff.py b/RecoTracker/IterativeTracking/python/MixedTripletStep_cff.py index bffe0a92c9202..cde6d3f5b77d2 100644 --- a/RecoTracker/IterativeTracking/python/MixedTripletStep_cff.py +++ b/RecoTracker/IterativeTracking/python/MixedTripletStep_cff.py @@ -119,7 +119,7 @@ # seeding -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import ClusterShapeHitFilterESProducer as _ClusterShapeHitFilterESProducer +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import ClusterShapeHitFilterESProducer as _ClusterShapeHitFilterESProducer mixedTripletStepClusterShapeHitFilter = _ClusterShapeHitFilterESProducer.clone( ComponentName = 'mixedTripletStepClusterShapeHitFilter', clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTight') @@ -131,8 +131,8 @@ maxElement = 50000000, produceIntermediateHitDoublets = True, ) -from RecoPixelVertexing.PixelTriplets.pixelTripletLargeTipEDProducer_cfi import pixelTripletLargeTipEDProducer as _pixelTripletLargeTipEDProducer -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +from RecoTracker.PixelSeeding.pixelTripletLargeTipEDProducer_cfi import pixelTripletLargeTipEDProducer as _pixelTripletLargeTipEDProducer +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * mixedTripletStepHitTripletsA = _pixelTripletLargeTipEDProducer.clone( doublets = 'mixedTripletStepHitDoubletsA', produceSeedingHitSets = True, diff --git a/RecoTracker/IterativeTracking/python/PixelLessStep_cff.py b/RecoTracker/IterativeTracking/python/PixelLessStep_cff.py index 8c79cb43017b0..b1e72bf674719 100644 --- a/RecoTracker/IterativeTracking/python/PixelLessStep_cff.py +++ b/RecoTracker/IterativeTracking/python/PixelLessStep_cff.py @@ -168,7 +168,7 @@ # seeding -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import ClusterShapeHitFilterESProducer as _ClusterShapeHitFilterESProducer +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import ClusterShapeHitFilterESProducer as _ClusterShapeHitFilterESProducer pixelLessStepClusterShapeHitFilter = _ClusterShapeHitFilterESProducer.clone( ComponentName = 'pixelLessStepClusterShapeHitFilter', doStripShapeCut = cms.bool(False), @@ -187,7 +187,7 @@ doublets = 'pixelLessStepHitDoublets', ) from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer_cff import seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer as _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer -from RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeSeedFilter_cfi import StripSubClusterShapeSeedFilter as _StripSubClusterShapeSeedFilter +from RecoTracker.PixelLowPtUtilities.StripSubClusterShapeSeedFilter_cfi import StripSubClusterShapeSeedFilter as _StripSubClusterShapeSeedFilter pixelLessStepSeeds = _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer.clone( seedingHitSets = 'pixelLessStepHitTriplets', SeedComparitorPSet = dict( @@ -206,7 +206,7 @@ ) ) -from RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeSeedFilter_cfi import StripSubClusterShapeSeedFilter as _StripSubClusterShapeSeedFilter +from RecoTracker.PixelLowPtUtilities.StripSubClusterShapeSeedFilter_cfi import StripSubClusterShapeSeedFilter as _StripSubClusterShapeSeedFilter from Configuration.ProcessModifiers.approxSiStripClusters_cff import approxSiStripClusters (~approxSiStripClusters).toModify(pixelLessStepSeeds.SeedComparitorPSet.comparitors, func = lambda list: list.append(_StripSubClusterShapeSeedFilter.clone()) ) diff --git a/RecoTracker/IterativeTracking/python/PixelPairStep_cff.py b/RecoTracker/IterativeTracking/python/PixelPairStep_cff.py index b5c4cdfbcf387..ba2905848c4e6 100644 --- a/RecoTracker/IterativeTracking/python/PixelPairStep_cff.py +++ b/RecoTracker/IterativeTracking/python/PixelPairStep_cff.py @@ -231,8 +231,8 @@ )) highBetaStar_2018.toModify(pixelPairStepTrajectoryFilterBase, minPt = 0.05) -import RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi -pixelPairStepTrajectoryFilterShape = RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone() +import RecoTracker.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi +pixelPairStepTrajectoryFilterShape = RecoTracker.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone() pixelPairStepTrajectoryFilter = cms.PSet( ComponentType = cms.string('CompositeTrajectoryFilter'), filters = cms.VPSet( @@ -240,7 +240,7 @@ # cms.PSet( refToPSet_ = cms.string('pixelPairStepTrajectoryFilterShape')) ), ) -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeTrajectoryFilter_cfi import * +from RecoTracker.PixelLowPtUtilities.ClusterShapeTrajectoryFilter_cfi import * trackingPhase2PU140.toModify(pixelPairStepTrajectoryFilter, filters = pixelPairStepTrajectoryFilter.filters + [cms.PSet(refToPSet_ = cms.string('ClusterShapeTrajectoryFilter'))] ) diff --git a/RecoTracker/IterativeTracking/python/TobTecStep_cff.py b/RecoTracker/IterativeTracking/python/TobTecStep_cff.py index 881d5852cdd64..172e609e621fe 100644 --- a/RecoTracker/IterativeTracking/python/TobTecStep_cff.py +++ b/RecoTracker/IterativeTracking/python/TobTecStep_cff.py @@ -73,7 +73,7 @@ ) # Triplet seeding -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import ClusterShapeHitFilterESProducer as _ClusterShapeHitFilterESProducer +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import ClusterShapeHitFilterESProducer as _ClusterShapeHitFilterESProducer tobTecStepClusterShapeHitFilter = _ClusterShapeHitFilterESProducer.clone( ComponentName = 'tobTecStepClusterShapeHitFilter', doStripShapeCut = cms.bool(False), @@ -113,7 +113,7 @@ SeedComparitorPSet = _tobTecStepSeedComparitorPSet, ) -from RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeSeedFilter_cfi import StripSubClusterShapeSeedFilter as _StripSubClusterShapeSeedFilter +from RecoTracker.PixelLowPtUtilities.StripSubClusterShapeSeedFilter_cfi import StripSubClusterShapeSeedFilter as _StripSubClusterShapeSeedFilter from Configuration.ProcessModifiers.approxSiStripClusters_cff import approxSiStripClusters (~approxSiStripClusters).toModify(tobTecStepSeedsTripl.SeedComparitorPSet.comparitors, func = lambda list: list.append(_StripSubClusterShapeSeedFilter.clone()) ) diff --git a/RecoPixelVertexing/PixelLowPtUtilities/BuildFile.xml b/RecoTracker/PixelLowPtUtilities/BuildFile.xml similarity index 85% rename from RecoPixelVertexing/PixelLowPtUtilities/BuildFile.xml rename to RecoTracker/PixelLowPtUtilities/BuildFile.xml index 75cc3e70c5ed7..3226f2c8d5658 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/BuildFile.xml +++ b/RecoTracker/PixelLowPtUtilities/BuildFile.xml @@ -9,8 +9,8 @@ - - + + diff --git a/RecoPixelVertexing/PixelLowPtUtilities/bin/BuildFile.xml b/RecoTracker/PixelLowPtUtilities/bin/BuildFile.xml similarity index 86% rename from RecoPixelVertexing/PixelLowPtUtilities/bin/BuildFile.xml rename to RecoTracker/PixelLowPtUtilities/bin/BuildFile.xml index a0c7818b5e445..6fe0e371d5447 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/bin/BuildFile.xml +++ b/RecoTracker/PixelLowPtUtilities/bin/BuildFile.xml @@ -1,4 +1,4 @@ - + diff --git a/RecoPixelVertexing/PixelLowPtUtilities/bin/ClusterShapeAnalyzer.cpp b/RecoTracker/PixelLowPtUtilities/bin/ClusterShapeAnalyzer.cpp similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/bin/ClusterShapeAnalyzer.cpp rename to RecoTracker/PixelLowPtUtilities/bin/ClusterShapeAnalyzer.cpp diff --git a/RecoPixelVertexing/PixelLowPtUtilities/bin/PixelClusterShapeExtractor.cc b/RecoTracker/PixelLowPtUtilities/bin/PixelClusterShapeExtractor.cc similarity index 99% rename from RecoPixelVertexing/PixelLowPtUtilities/bin/PixelClusterShapeExtractor.cc rename to RecoTracker/PixelLowPtUtilities/bin/PixelClusterShapeExtractor.cc index 1ebfd5a365ea6..996c77bf51c93 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/bin/PixelClusterShapeExtractor.cc +++ b/RecoTracker/PixelLowPtUtilities/bin/PixelClusterShapeExtractor.cc @@ -18,7 +18,7 @@ #include "DataFormats/TrackReco/interface/Track.h" #include "RecoTracker/Record/interface/CkfComponentsRecord.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" #include "Geometry/CommonDetUnit/interface/PixelGeomDetUnit.h" #include "Geometry/CommonTopologies/interface/PixelTopology.h" diff --git a/RecoPixelVertexing/PixelLowPtUtilities/data/ITShapePhase2_all.par b/RecoTracker/PixelLowPtUtilities/data/ITShapePhase2_all.par similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/data/ITShapePhase2_all.par rename to RecoTracker/PixelLowPtUtilities/data/ITShapePhase2_all.par diff --git a/RecoPixelVertexing/PixelLowPtUtilities/data/ITShapePhase2_noL1.par b/RecoTracker/PixelLowPtUtilities/data/ITShapePhase2_noL1.par similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/data/ITShapePhase2_noL1.par rename to RecoTracker/PixelLowPtUtilities/data/ITShapePhase2_noL1.par diff --git a/RecoPixelVertexing/PixelLowPtUtilities/data/READE.md b/RecoTracker/PixelLowPtUtilities/data/READE.md similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/data/READE.md rename to RecoTracker/PixelLowPtUtilities/data/READE.md diff --git a/RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase0.par b/RecoTracker/PixelLowPtUtilities/data/pixelShapePhase0.par similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase0.par rename to RecoTracker/PixelLowPtUtilities/data/pixelShapePhase0.par diff --git a/RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase1_all.par b/RecoTracker/PixelLowPtUtilities/data/pixelShapePhase1_all.par similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase1_all.par rename to RecoTracker/PixelLowPtUtilities/data/pixelShapePhase1_all.par diff --git a/RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase1_loose.par b/RecoTracker/PixelLowPtUtilities/data/pixelShapePhase1_loose.par similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase1_loose.par rename to RecoTracker/PixelLowPtUtilities/data/pixelShapePhase1_loose.par diff --git a/RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase1_noL1.par b/RecoTracker/PixelLowPtUtilities/data/pixelShapePhase1_noL1.par similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase1_noL1.par rename to RecoTracker/PixelLowPtUtilities/data/pixelShapePhase1_noL1.par diff --git a/RecoPixelVertexing/PixelLowPtUtilities/data/stripShape.par b/RecoTracker/PixelLowPtUtilities/data/stripShape.par similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/data/stripShape.par rename to RecoTracker/PixelLowPtUtilities/data/stripShape.par diff --git a/RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterData.h b/RecoTracker/PixelLowPtUtilities/interface/ClusterData.h similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterData.h rename to RecoTracker/PixelLowPtUtilities/interface/ClusterData.h diff --git a/RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShape.h b/RecoTracker/PixelLowPtUtilities/interface/ClusterShape.h similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShape.h rename to RecoTracker/PixelLowPtUtilities/interface/ClusterShape.h diff --git a/RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h b/RecoTracker/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h similarity index 99% rename from RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h rename to RecoTracker/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h index 41491093d54c9..b79ca4e0f6f41 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h +++ b/RecoTracker/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h @@ -12,7 +12,7 @@ #include "Geometry/CommonDetUnit/interface/GeomDet.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterData.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterData.h" #include #include diff --git a/RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeTrackFilter.h b/RecoTracker/PixelLowPtUtilities/interface/ClusterShapeTrackFilter.h similarity index 95% rename from RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeTrackFilter.h rename to RecoTracker/PixelLowPtUtilities/interface/ClusterShapeTrackFilter.h index 6402cce29f879..c965505c4126f 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeTrackFilter.h +++ b/RecoTracker/PixelLowPtUtilities/interface/ClusterShapeTrackFilter.h @@ -1,7 +1,7 @@ #ifndef _ClusterShapeTrackFilter_h_ #define _ClusterShapeTrackFilter_h_ -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilterBase.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackFilterBase.h" #include "DataFormats/GeometryVector/interface/GlobalTag.h" #include "DataFormats/GeometryVector/interface/Vector2DBase.h" diff --git a/RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeTrajectoryFilter.h b/RecoTracker/PixelLowPtUtilities/interface/ClusterShapeTrajectoryFilter.h similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeTrajectoryFilter.h rename to RecoTracker/PixelLowPtUtilities/interface/ClusterShapeTrajectoryFilter.h diff --git a/RecoPixelVertexing/PixelLowPtUtilities/interface/HitInfo.h b/RecoTracker/PixelLowPtUtilities/interface/HitInfo.h similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/interface/HitInfo.h rename to RecoTracker/PixelLowPtUtilities/interface/HitInfo.h diff --git a/RecoPixelVertexing/PixelLowPtUtilities/interface/LowPtClusterShapeSeedComparitor.h b/RecoTracker/PixelLowPtUtilities/interface/LowPtClusterShapeSeedComparitor.h similarity index 95% rename from RecoPixelVertexing/PixelLowPtUtilities/interface/LowPtClusterShapeSeedComparitor.h rename to RecoTracker/PixelLowPtUtilities/interface/LowPtClusterShapeSeedComparitor.h index c65b147f139f7..402da85b29bf0 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/interface/LowPtClusterShapeSeedComparitor.h +++ b/RecoTracker/PixelLowPtUtilities/interface/LowPtClusterShapeSeedComparitor.h @@ -9,7 +9,7 @@ #include "DataFormats/SiPixelCluster/interface/SiPixelClusterShapeCache.h" #include "DataFormats/TrackerCommon/interface/TrackerTopology.h" #include "Geometry/Records/interface/TrackerTopologyRcd.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" #include "RecoTracker/Record/interface/CkfComponentsRecord.h" class LowPtClusterShapeSeedComparitor : public SeedComparitor { diff --git a/RecoPixelVertexing/PixelLowPtUtilities/interface/PixelTripletLowPtGenerator.h b/RecoTracker/PixelLowPtUtilities/interface/PixelTripletLowPtGenerator.h similarity index 94% rename from RecoPixelVertexing/PixelLowPtUtilities/interface/PixelTripletLowPtGenerator.h rename to RecoTracker/PixelLowPtUtilities/interface/PixelTripletLowPtGenerator.h index 580ea101378a1..c03ac432e4ee9 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/interface/PixelTripletLowPtGenerator.h +++ b/RecoTracker/PixelLowPtUtilities/interface/PixelTripletLowPtGenerator.h @@ -15,9 +15,9 @@ #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Utilities/interface/EDGetToken.h" -#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayers.h" +#include "RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayers.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/TripletFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/TripletFilter.h" class IdealMagneticFieldRecord; class MultipleScatteringParametrisationMaker; diff --git a/RecoPixelVertexing/PixelLowPtUtilities/interface/StripSubClusterShapeTrajectoryFilter.h b/RecoTracker/PixelLowPtUtilities/interface/StripSubClusterShapeTrajectoryFilter.h similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/interface/StripSubClusterShapeTrajectoryFilter.h rename to RecoTracker/PixelLowPtUtilities/interface/StripSubClusterShapeTrajectoryFilter.h diff --git a/RecoPixelVertexing/PixelLowPtUtilities/interface/ThirdHitPrediction.h b/RecoTracker/PixelLowPtUtilities/interface/ThirdHitPrediction.h similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/interface/ThirdHitPrediction.h rename to RecoTracker/PixelLowPtUtilities/interface/ThirdHitPrediction.h diff --git a/RecoPixelVertexing/PixelLowPtUtilities/interface/TrackCleaner.h b/RecoTracker/PixelLowPtUtilities/interface/TrackCleaner.h similarity index 84% rename from RecoPixelVertexing/PixelLowPtUtilities/interface/TrackCleaner.h rename to RecoTracker/PixelLowPtUtilities/interface/TrackCleaner.h index a22bf633d9976..9c848f48b1c83 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/interface/TrackCleaner.h +++ b/RecoTracker/PixelLowPtUtilities/interface/TrackCleaner.h @@ -3,8 +3,8 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/TracksWithHits.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackCleaner.h" +#include "RecoTracker/PixelTrackFitting/interface/TracksWithHits.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackCleaner.h" #include #include diff --git a/RecoPixelVertexing/PixelLowPtUtilities/interface/TrackFitter.h b/RecoTracker/PixelLowPtUtilities/interface/TrackFitter.h similarity index 94% rename from RecoPixelVertexing/PixelLowPtUtilities/interface/TrackFitter.h rename to RecoTracker/PixelLowPtUtilities/interface/TrackFitter.h index 11046390f5d43..d2190a8f1a316 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/interface/TrackFitter.h +++ b/RecoTracker/PixelLowPtUtilities/interface/TrackFitter.h @@ -1,7 +1,7 @@ #ifndef TrackFitter_H #define TrackFitter_H -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterBase.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelFitterBase.h" #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h" #include "RecoTracker/TkTrackingRegions/interface/TrackingRegion.h" #include "DataFormats/TrackReco/interface/Track.h" diff --git a/RecoPixelVertexing/PixelLowPtUtilities/interface/TripletFilter.h b/RecoTracker/PixelLowPtUtilities/interface/TripletFilter.h similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/interface/TripletFilter.h rename to RecoTracker/PixelLowPtUtilities/interface/TripletFilter.h diff --git a/RecoPixelVertexing/PixelLowPtUtilities/plugins/BuildFile.xml b/RecoTracker/PixelLowPtUtilities/plugins/BuildFile.xml similarity index 73% rename from RecoPixelVertexing/PixelLowPtUtilities/plugins/BuildFile.xml rename to RecoTracker/PixelLowPtUtilities/plugins/BuildFile.xml index 281e0b20b59b7..258e70e0d62d0 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/plugins/BuildFile.xml +++ b/RecoTracker/PixelLowPtUtilities/plugins/BuildFile.xml @@ -1,5 +1,5 @@ - + diff --git a/RecoPixelVertexing/PixelLowPtUtilities/plugins/ClusterShapeHitFilterESProducer.cc b/RecoTracker/PixelLowPtUtilities/plugins/ClusterShapeHitFilterESProducer.cc similarity index 94% rename from RecoPixelVertexing/PixelLowPtUtilities/plugins/ClusterShapeHitFilterESProducer.cc rename to RecoTracker/PixelLowPtUtilities/plugins/ClusterShapeHitFilterESProducer.cc index 84471aafa3557..db7da80ed1e65 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/plugins/ClusterShapeHitFilterESProducer.cc +++ b/RecoTracker/PixelLowPtUtilities/plugins/ClusterShapeHitFilterESProducer.cc @@ -6,7 +6,7 @@ #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" #include "RecoTracker/Record/interface/CkfComponentsRecord.h" @@ -97,8 +97,8 @@ ClusterShapeHitFilterESProducer::ReturnType ClusterShapeHitFilterESProducer::pro /*****************************************************************************/ void ClusterShapeHitFilterESProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { edm::ParameterSetDescription desc; - desc.add("PixelShapeFile", "RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase0.par"); - desc.add("PixelShapeFileL1", "RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase0.par"); + desc.add("PixelShapeFile", "RecoTracker/PixelLowPtUtilities/data/pixelShapePhase0.par"); + desc.add("PixelShapeFileL1", "RecoTracker/PixelLowPtUtilities/data/pixelShapePhase0.par"); desc.add("ComponentName", ""); desc.add("isPhase2", false); desc.add("doPixelShapeCut", true); diff --git a/RecoPixelVertexing/PixelLowPtUtilities/plugins/ClusterShapeSeedComparitor.cc b/RecoTracker/PixelLowPtUtilities/plugins/ClusterShapeSeedComparitor.cc similarity index 98% rename from RecoPixelVertexing/PixelLowPtUtilities/plugins/ClusterShapeSeedComparitor.cc rename to RecoTracker/PixelLowPtUtilities/plugins/ClusterShapeSeedComparitor.cc index 5ff902c855e40..3d50e5d4c7be7 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/plugins/ClusterShapeSeedComparitor.cc +++ b/RecoTracker/PixelLowPtUtilities/plugins/ClusterShapeSeedComparitor.cc @@ -2,7 +2,7 @@ #include "RecoTracker/TkSeedingLayers/interface/SeedComparitorFactory.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h" #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2D.h" #include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2D.h" diff --git a/RecoPixelVertexing/PixelLowPtUtilities/plugins/ClusterShapeTrackFilterProducer.cc b/RecoTracker/PixelLowPtUtilities/plugins/ClusterShapeTrackFilterProducer.cc similarity index 95% rename from RecoPixelVertexing/PixelLowPtUtilities/plugins/ClusterShapeTrackFilterProducer.cc rename to RecoTracker/PixelLowPtUtilities/plugins/ClusterShapeTrackFilterProducer.cc index 261de4e65d78f..9094ca49fb6ab 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/plugins/ClusterShapeTrackFilterProducer.cc +++ b/RecoTracker/PixelLowPtUtilities/plugins/ClusterShapeTrackFilterProducer.cc @@ -9,8 +9,8 @@ #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "FWCore/Utilities/interface/EDGetToken.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilter.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeTrackFilter.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterShapeTrackFilter.h" #include "DataFormats/SiPixelCluster/interface/SiPixelClusterShapeCache.h" #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" #include "RecoTracker/Record/interface/CkfComponentsRecord.h" diff --git a/RecoPixelVertexing/PixelLowPtUtilities/plugins/PixelVertexProducerClusters.cc b/RecoTracker/PixelLowPtUtilities/plugins/PixelVertexProducerClusters.cc similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/plugins/PixelVertexProducerClusters.cc rename to RecoTracker/PixelLowPtUtilities/plugins/PixelVertexProducerClusters.cc diff --git a/RecoPixelVertexing/PixelLowPtUtilities/plugins/PixelVertexProducerClusters.h b/RecoTracker/PixelLowPtUtilities/plugins/PixelVertexProducerClusters.h similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/plugins/PixelVertexProducerClusters.h rename to RecoTracker/PixelLowPtUtilities/plugins/PixelVertexProducerClusters.h diff --git a/RecoPixelVertexing/PixelLowPtUtilities/plugins/PixelVertexProducerMedian.cc b/RecoTracker/PixelLowPtUtilities/plugins/PixelVertexProducerMedian.cc similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/plugins/PixelVertexProducerMedian.cc rename to RecoTracker/PixelLowPtUtilities/plugins/PixelVertexProducerMedian.cc diff --git a/RecoPixelVertexing/PixelLowPtUtilities/plugins/PixelVertexProducerMedian.h b/RecoTracker/PixelLowPtUtilities/plugins/PixelVertexProducerMedian.h similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/plugins/PixelVertexProducerMedian.h rename to RecoTracker/PixelLowPtUtilities/plugins/PixelVertexProducerMedian.h diff --git a/RecoPixelVertexing/PixelLowPtUtilities/plugins/SiPixelClusterShapeCacheProducer.cc b/RecoTracker/PixelLowPtUtilities/plugins/SiPixelClusterShapeCacheProducer.cc similarity index 96% rename from RecoPixelVertexing/PixelLowPtUtilities/plugins/SiPixelClusterShapeCacheProducer.cc rename to RecoTracker/PixelLowPtUtilities/plugins/SiPixelClusterShapeCacheProducer.cc index 6322f9cc868f0..ee75aa4cb3403 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/plugins/SiPixelClusterShapeCacheProducer.cc +++ b/RecoTracker/PixelLowPtUtilities/plugins/SiPixelClusterShapeCacheProducer.cc @@ -18,8 +18,8 @@ #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShape.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterData.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterShape.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterData.h" #include diff --git a/RecoPixelVertexing/PixelLowPtUtilities/plugins/TrackCleanerESProducer.cc b/RecoTracker/PixelLowPtUtilities/plugins/TrackCleanerESProducer.cc similarity index 95% rename from RecoPixelVertexing/PixelLowPtUtilities/plugins/TrackCleanerESProducer.cc rename to RecoTracker/PixelLowPtUtilities/plugins/TrackCleanerESProducer.cc index d0a65e3b9a5a6..d5d90503ea313 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/plugins/TrackCleanerESProducer.cc +++ b/RecoTracker/PixelLowPtUtilities/plugins/TrackCleanerESProducer.cc @@ -5,7 +5,7 @@ #include "Geometry/Records/interface/TrackerTopologyRcd.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/TrackCleaner.h" +#include "RecoTracker/PixelLowPtUtilities/interface/TrackCleaner.h" class TrackCleanerESProducer : public edm::ESProducer { public: diff --git a/RecoPixelVertexing/PixelLowPtUtilities/plugins/TrackFitterProducer.cc b/RecoTracker/PixelLowPtUtilities/plugins/TrackFitterProducer.cc similarity index 94% rename from RecoPixelVertexing/PixelLowPtUtilities/plugins/TrackFitterProducer.cc rename to RecoTracker/PixelLowPtUtilities/plugins/TrackFitterProducer.cc index 73d61351507da..86ca8b92d9458 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/plugins/TrackFitterProducer.cc +++ b/RecoTracker/PixelLowPtUtilities/plugins/TrackFitterProducer.cc @@ -10,8 +10,8 @@ #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitter.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/TrackFitter.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelFitter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/TrackFitter.h" #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" diff --git a/RecoPixelVertexing/PixelLowPtUtilities/plugins/TrackListCombiner.cc b/RecoTracker/PixelLowPtUtilities/plugins/TrackListCombiner.cc similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/plugins/TrackListCombiner.cc rename to RecoTracker/PixelLowPtUtilities/plugins/TrackListCombiner.cc diff --git a/RecoPixelVertexing/PixelLowPtUtilities/plugins/TrackListCombiner.h b/RecoTracker/PixelLowPtUtilities/plugins/TrackListCombiner.h similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/plugins/TrackListCombiner.h rename to RecoTracker/PixelLowPtUtilities/plugins/TrackListCombiner.h diff --git a/RecoPixelVertexing/PixelLowPtUtilities/plugins/modules.cc b/RecoTracker/PixelLowPtUtilities/plugins/modules.cc similarity index 72% rename from RecoPixelVertexing/PixelLowPtUtilities/plugins/modules.cc rename to RecoTracker/PixelLowPtUtilities/plugins/modules.cc index a98f4ab787056..9da6cb389acc9 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/plugins/modules.cc +++ b/RecoTracker/PixelLowPtUtilities/plugins/modules.cc @@ -17,15 +17,15 @@ DEFINE_FWK_MODULE(PixelVertexProducerClusters); DEFINE_FWK_MODULE(TrackListCombiner); // Generator -#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayers.h" -#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayersFactory.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/PixelTripletLowPtGenerator.h" +#include "RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayers.h" +#include "RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayersFactory.h" +#include "RecoTracker/PixelLowPtUtilities/interface/PixelTripletLowPtGenerator.h" DEFINE_EDM_PLUGIN(HitTripletGeneratorFromPairAndLayersFactory, PixelTripletLowPtGenerator, "PixelTripletLowPtGenerator"); // Seed -//#include "RecoPixelVertexing/PixelLowPtUtilities/interface/SeedProducer.h" +//#include "RecoTracker/PixelLowPtUtilities/interface/SeedProducer.h" //DEFINE_FWK_MODULE(SeedProducer); // TrajectoryFilter @@ -33,15 +33,15 @@ DEFINE_EDM_PLUGIN(HitTripletGeneratorFromPairAndLayersFactory, #include "FWCore/ParameterSet/interface/ValidatedPluginMacros.h" #include "TrackingTools/TrajectoryFiltering/interface/TrajectoryFilterFactory.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeTrajectoryFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterShapeTrajectoryFilter.h" DEFINE_EDM_VALIDATED_PLUGIN(TrajectoryFilterFactory, ClusterShapeTrajectoryFilter, "ClusterShapeTrajectoryFilter"); // the seed comparitor to remove seeds on incompatible angle/cluster compatibility -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/LowPtClusterShapeSeedComparitor.h" +#include "RecoTracker/PixelLowPtUtilities/interface/LowPtClusterShapeSeedComparitor.h" #include "RecoTracker/TkSeedingLayers/interface/SeedComparitorFactory.h" DEFINE_EDM_PLUGIN(SeedComparitorFactory, LowPtClusterShapeSeedComparitor, "LowPtClusterShapeSeedComparitor"); -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/StripSubClusterShapeTrajectoryFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/StripSubClusterShapeTrajectoryFilter.h" DEFINE_EDM_VALIDATED_PLUGIN(TrajectoryFilterFactory, StripSubClusterShapeTrajectoryFilter, "StripSubClusterShapeTrajectoryFilter"); diff --git a/RecoPixelVertexing/PixelLowPtUtilities/python/AllPixelTracks_cfi.py b/RecoTracker/PixelLowPtUtilities/python/AllPixelTracks_cfi.py similarity index 85% rename from RecoPixelVertexing/PixelLowPtUtilities/python/AllPixelTracks_cfi.py rename to RecoTracker/PixelLowPtUtilities/python/AllPixelTracks_cfi.py index 7d5e3a2f76948..aefac8e1770d3 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/python/AllPixelTracks_cfi.py +++ b/RecoTracker/PixelLowPtUtilities/python/AllPixelTracks_cfi.py @@ -1,9 +1,9 @@ import FWCore.ParameterSet.Config as cms -from RecoPixelVertexing.PixelLowPtUtilities.clusterShapeTrackFilter_cfi import clusterShapeTrackFilter -from RecoPixelVertexing.PixelLowPtUtilities.trackFitter_cfi import trackFitter -from RecoPixelVertexing.PixelLowPtUtilities.trackCleaner_cfi import trackCleaner -import RecoPixelVertexing.PixelTrackFitting.pixelTracks_cfi as _mod +from RecoTracker.PixelLowPtUtilities.clusterShapeTrackFilter_cfi import clusterShapeTrackFilter +from RecoTracker.PixelLowPtUtilities.trackFitter_cfi import trackFitter +from RecoTracker.PixelLowPtUtilities.trackCleaner_cfi import trackCleaner +import RecoTracker.PixelTrackFitting.pixelTracks_cfi as _mod ########################## # The base for all steps diff --git a/RecoPixelVertexing/PixelLowPtUtilities/python/ClusterShapeExtractor_cfi.py b/RecoTracker/PixelLowPtUtilities/python/ClusterShapeExtractor_cfi.py similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/python/ClusterShapeExtractor_cfi.py rename to RecoTracker/PixelLowPtUtilities/python/ClusterShapeExtractor_cfi.py diff --git a/RecoPixelVertexing/PixelLowPtUtilities/python/ClusterShapeHitFilterESProducer_cfi.py b/RecoTracker/PixelLowPtUtilities/python/ClusterShapeHitFilterESProducer_cfi.py similarity index 54% rename from RecoPixelVertexing/PixelLowPtUtilities/python/ClusterShapeHitFilterESProducer_cfi.py rename to RecoTracker/PixelLowPtUtilities/python/ClusterShapeHitFilterESProducer_cfi.py index 34dffaef6a2bc..bc06b7bafa98e 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/python/ClusterShapeHitFilterESProducer_cfi.py +++ b/RecoTracker/PixelLowPtUtilities/python/ClusterShapeHitFilterESProducer_cfi.py @@ -1,21 +1,21 @@ import FWCore.ParameterSet.Config as cms -from RecoPixelVertexing.PixelLowPtUtilities.clusterShapeHitFilterESProducer_cfi import clusterShapeHitFilterESProducer +from RecoTracker.PixelLowPtUtilities.clusterShapeHitFilterESProducer_cfi import clusterShapeHitFilterESProducer ClusterShapeHitFilterESProducer = clusterShapeHitFilterESProducer.clone(ComponentName = 'ClusterShapeHitFilter', - PixelShapeFile = 'RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase0.par', - PixelShapeFileL1 = 'RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase0.par', + PixelShapeFile = 'RecoTracker/PixelLowPtUtilities/data/pixelShapePhase0.par', + PixelShapeFileL1 = 'RecoTracker/PixelLowPtUtilities/data/pixelShapePhase0.par', clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutNone')), isPhase2 = False) from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel phase1Pixel.toModify(ClusterShapeHitFilterESProducer, - PixelShapeFile = 'RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase1_noL1.par', - PixelShapeFileL1 = 'RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase1_loose.par', + PixelShapeFile = 'RecoTracker/PixelLowPtUtilities/data/pixelShapePhase1_noL1.par', + PixelShapeFileL1 = 'RecoTracker/PixelLowPtUtilities/data/pixelShapePhase1_loose.par', ) from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker phase2_tracker.toModify(ClusterShapeHitFilterESProducer, isPhase2 = True, - PixelShapeFile = 'RecoPixelVertexing/PixelLowPtUtilities/data/ITShapePhase2_all.par', - PixelShapeFileL1 = 'RecoPixelVertexing/PixelLowPtUtilities/data/ITShapePhase2_all.par', + PixelShapeFile = 'RecoTracker/PixelLowPtUtilities/data/ITShapePhase2_all.par', + PixelShapeFileL1 = 'RecoTracker/PixelLowPtUtilities/data/ITShapePhase2_all.par', ) diff --git a/RecoPixelVertexing/PixelLowPtUtilities/python/ClusterShapeTrajectoryFilter_cfi.py b/RecoTracker/PixelLowPtUtilities/python/ClusterShapeTrajectoryFilter_cfi.py similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/python/ClusterShapeTrajectoryFilter_cfi.py rename to RecoTracker/PixelLowPtUtilities/python/ClusterShapeTrajectoryFilter_cfi.py diff --git a/RecoPixelVertexing/PixelLowPtUtilities/python/LowPtClusterShapeSeedComparitor_cfi.py b/RecoTracker/PixelLowPtUtilities/python/LowPtClusterShapeSeedComparitor_cfi.py similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/python/LowPtClusterShapeSeedComparitor_cfi.py rename to RecoTracker/PixelLowPtUtilities/python/LowPtClusterShapeSeedComparitor_cfi.py diff --git a/RecoPixelVertexing/PixelLowPtUtilities/python/MinBiasCkfTrajectoryFilter_cfi.py b/RecoTracker/PixelLowPtUtilities/python/MinBiasCkfTrajectoryFilter_cfi.py similarity index 78% rename from RecoPixelVertexing/PixelLowPtUtilities/python/MinBiasCkfTrajectoryFilter_cfi.py rename to RecoTracker/PixelLowPtUtilities/python/MinBiasCkfTrajectoryFilter_cfi.py index 53fdfaf69e4ea..8af186ddb904b 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/python/MinBiasCkfTrajectoryFilter_cfi.py +++ b/RecoTracker/PixelLowPtUtilities/python/MinBiasCkfTrajectoryFilter_cfi.py @@ -6,8 +6,8 @@ minimumNumberOfHits = 3, minPt = 0.075 ) -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeTrajectoryFilter_cfi import * +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +from RecoTracker.PixelLowPtUtilities.ClusterShapeTrajectoryFilter_cfi import * # Composite filter MinBiasCkfTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CompositeTrajectoryFilter_block.clone( diff --git a/RecoPixelVertexing/PixelLowPtUtilities/python/PixelMedianVertices_cfi.py b/RecoTracker/PixelLowPtUtilities/python/PixelMedianVertices_cfi.py similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/python/PixelMedianVertices_cfi.py rename to RecoTracker/PixelLowPtUtilities/python/PixelMedianVertices_cfi.py diff --git a/RecoPixelVertexing/PixelLowPtUtilities/python/StripSubClusterShapeFilter_cfi.py b/RecoTracker/PixelLowPtUtilities/python/StripSubClusterShapeFilter_cfi.py similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/python/StripSubClusterShapeFilter_cfi.py rename to RecoTracker/PixelLowPtUtilities/python/StripSubClusterShapeFilter_cfi.py diff --git a/RecoPixelVertexing/PixelLowPtUtilities/python/StripSubClusterShapeSeedFilter_cfi.py b/RecoTracker/PixelLowPtUtilities/python/StripSubClusterShapeSeedFilter_cfi.py similarity index 72% rename from RecoPixelVertexing/PixelLowPtUtilities/python/StripSubClusterShapeSeedFilter_cfi.py rename to RecoTracker/PixelLowPtUtilities/python/StripSubClusterShapeSeedFilter_cfi.py index f825b300d2e2d..3cef7d6f85ee1 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/python/StripSubClusterShapeSeedFilter_cfi.py +++ b/RecoTracker/PixelLowPtUtilities/python/StripSubClusterShapeSeedFilter_cfi.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms -from RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeFilter_cfi import StripSubClusterShapeFilterParams +from RecoTracker.PixelLowPtUtilities.StripSubClusterShapeFilter_cfi import StripSubClusterShapeFilterParams StripSubClusterShapeSeedFilter = cms.PSet( StripSubClusterShapeFilterParams, ComponentName = cms.string('StripSubClusterShapeSeedFilter'), diff --git a/RecoPixelVertexing/PixelLowPtUtilities/python/StripSubClusterShapeTrajectoryFilter_cfi.py b/RecoTracker/PixelLowPtUtilities/python/StripSubClusterShapeTrajectoryFilter_cfi.py similarity index 86% rename from RecoPixelVertexing/PixelLowPtUtilities/python/StripSubClusterShapeTrajectoryFilter_cfi.py rename to RecoTracker/PixelLowPtUtilities/python/StripSubClusterShapeTrajectoryFilter_cfi.py index 9a52de899184b..275101d25687d 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/python/StripSubClusterShapeTrajectoryFilter_cfi.py +++ b/RecoTracker/PixelLowPtUtilities/python/StripSubClusterShapeTrajectoryFilter_cfi.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms -from RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeFilter_cfi import StripSubClusterShapeFilterParams +from RecoTracker.PixelLowPtUtilities.StripSubClusterShapeFilter_cfi import StripSubClusterShapeFilterParams StripSubClusterShapeTrajectoryFilter = cms.PSet( StripSubClusterShapeFilterParams, ComponentType = cms.string('StripSubClusterShapeTrajectoryFilter'), diff --git a/RecoPixelVertexing/PixelLowPtUtilities/python/TrackSeeds_cfi.py b/RecoTracker/PixelLowPtUtilities/python/TrackSeeds_cfi.py similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/python/TrackSeeds_cfi.py rename to RecoTracker/PixelLowPtUtilities/python/TrackSeeds_cfi.py diff --git a/RecoPixelVertexing/PixelLowPtUtilities/src/ClusterShape.cc b/RecoTracker/PixelLowPtUtilities/src/ClusterShape.cc similarity index 97% rename from RecoPixelVertexing/PixelLowPtUtilities/src/ClusterShape.cc rename to RecoTracker/PixelLowPtUtilities/src/ClusterShape.cc index 4f760837bfb1c..c2896ef1973f6 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/src/ClusterShape.cc +++ b/RecoTracker/PixelLowPtUtilities/src/ClusterShape.cc @@ -1,5 +1,5 @@ -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShape.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterData.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterShape.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterData.h" #include "Geometry/CommonDetUnit/interface/PixelGeomDetUnit.h" #include "Geometry/CommonTopologies/interface/PixelTopology.h" diff --git a/RecoPixelVertexing/PixelLowPtUtilities/src/ClusterShapeHitFilter.cc b/RecoTracker/PixelLowPtUtilities/src/ClusterShapeHitFilter.cc similarity index 98% rename from RecoPixelVertexing/PixelLowPtUtilities/src/ClusterShapeHitFilter.cc rename to RecoTracker/PixelLowPtUtilities/src/ClusterShapeHitFilter.cc index 0c75589a92575..12c2a8a0f24be 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/src/ClusterShapeHitFilter.cc +++ b/RecoTracker/PixelLowPtUtilities/src/ClusterShapeHitFilter.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/Framework/interface/ESHandle.h" @@ -96,7 +96,7 @@ void ClusterShapeHitFilter::loadPixelLimits(std::string const& file, PixelLimits /*****************************************************************************/ void ClusterShapeHitFilter::loadStripLimits() { // Load strip - edm::FileInPath fileInPath("RecoPixelVertexing/PixelLowPtUtilities/data/stripShape.par"); + edm::FileInPath fileInPath("RecoTracker/PixelLowPtUtilities/data/stripShape.par"); ifstream inFile(fileInPath.fullPath().c_str()); while (inFile.eof() == false) { diff --git a/RecoPixelVertexing/PixelLowPtUtilities/src/ClusterShapeTrackFilter.cc b/RecoTracker/PixelLowPtUtilities/src/ClusterShapeTrackFilter.cc similarity index 93% rename from RecoPixelVertexing/PixelLowPtUtilities/src/ClusterShapeTrackFilter.cc rename to RecoTracker/PixelLowPtUtilities/src/ClusterShapeTrackFilter.cc index 4c4663b055bf9..8fac8ef088855 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/src/ClusterShapeTrackFilter.cc +++ b/RecoTracker/PixelLowPtUtilities/src/ClusterShapeTrackFilter.cc @@ -6,10 +6,10 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "Geometry/CommonDetUnit/interface/GeomDet.h" #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeTrackFilter.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/HitInfo.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/CircleFromThreePoints.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterShapeTrackFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/HitInfo.h" +#include "RecoTracker/PixelTrackFitting/interface/CircleFromThreePoints.h" inline float sqr(float x) { return x * x; } diff --git a/RecoPixelVertexing/PixelLowPtUtilities/src/ClusterShapeTrajectoryFilter.cc b/RecoTracker/PixelLowPtUtilities/src/ClusterShapeTrajectoryFilter.cc similarity index 97% rename from RecoPixelVertexing/PixelLowPtUtilities/src/ClusterShapeTrajectoryFilter.cc rename to RecoTracker/PixelLowPtUtilities/src/ClusterShapeTrajectoryFilter.cc index a7265dd47c8dc..cf0e768f641ce 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/src/ClusterShapeTrajectoryFilter.cc +++ b/RecoTracker/PixelLowPtUtilities/src/ClusterShapeTrajectoryFilter.cc @@ -1,8 +1,8 @@ // VI January 2012: needs to be migrated to use cluster directly -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeTrajectoryFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterShapeTrajectoryFilter.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" diff --git a/RecoPixelVertexing/PixelLowPtUtilities/src/HitInfo.cc b/RecoTracker/PixelLowPtUtilities/src/HitInfo.cc similarity index 96% rename from RecoPixelVertexing/PixelLowPtUtilities/src/HitInfo.cc rename to RecoTracker/PixelLowPtUtilities/src/HitInfo.cc index 026ba1c792ddb..a75d9c9449fa4 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/src/HitInfo.cc +++ b/RecoTracker/PixelLowPtUtilities/src/HitInfo.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/HitInfo.h" +#include "RecoTracker/PixelLowPtUtilities/interface/HitInfo.h" #include "DataFormats/TrackerCommon/interface/TrackerTopology.h" #include "Geometry/Records/interface/IdealGeometryRecord.h" diff --git a/RecoPixelVertexing/PixelLowPtUtilities/src/LowPtClusterShapeSeedComparitor.cc b/RecoTracker/PixelLowPtUtilities/src/LowPtClusterShapeSeedComparitor.cc similarity index 95% rename from RecoPixelVertexing/PixelLowPtUtilities/src/LowPtClusterShapeSeedComparitor.cc rename to RecoTracker/PixelLowPtUtilities/src/LowPtClusterShapeSeedComparitor.cc index 4d94e060da5bb..d6dac104a188b 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/src/LowPtClusterShapeSeedComparitor.cc +++ b/RecoTracker/PixelLowPtUtilities/src/LowPtClusterShapeSeedComparitor.cc @@ -11,9 +11,9 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Utilities/interface/ESInputTag.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/HitInfo.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/LowPtClusterShapeSeedComparitor.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/CircleFromThreePoints.h" +#include "RecoTracker/PixelLowPtUtilities/interface/HitInfo.h" +#include "RecoTracker/PixelLowPtUtilities/interface/LowPtClusterShapeSeedComparitor.h" +#include "RecoTracker/PixelTrackFitting/interface/CircleFromThreePoints.h" #include "RecoTracker/TkSeedingLayers/interface/SeedingHitSet.h" namespace { diff --git a/RecoPixelVertexing/PixelLowPtUtilities/src/PixelTripletLowPtGenerator.cc b/RecoTracker/PixelLowPtUtilities/src/PixelTripletLowPtGenerator.cc similarity index 96% rename from RecoPixelVertexing/PixelLowPtUtilities/src/PixelTripletLowPtGenerator.cc rename to RecoTracker/PixelLowPtUtilities/src/PixelTripletLowPtGenerator.cc index 20a8c8f086c69..839f6e084793a 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/src/PixelTripletLowPtGenerator.cc +++ b/RecoTracker/PixelLowPtUtilities/src/PixelTripletLowPtGenerator.cc @@ -1,7 +1,7 @@ -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/PixelTripletLowPtGenerator.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ThirdHitPrediction.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/TripletFilter.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/HitInfo.h" +#include "RecoTracker/PixelLowPtUtilities/interface/PixelTripletLowPtGenerator.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ThirdHitPrediction.h" +#include "RecoTracker/PixelLowPtUtilities/interface/TripletFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/HitInfo.h" #include "RecoTracker/TkMSParametrization/interface/PixelRecoPointRZ.h" #include "RecoTracker/TkHitPairs/interface/HitPairGeneratorFromLayerPair.h" diff --git a/RecoPixelVertexing/PixelLowPtUtilities/src/StripSubClusterShapeTrajectoryFilter.cc b/RecoTracker/PixelLowPtUtilities/src/StripSubClusterShapeTrajectoryFilter.cc similarity index 99% rename from RecoPixelVertexing/PixelLowPtUtilities/src/StripSubClusterShapeTrajectoryFilter.cc rename to RecoTracker/PixelLowPtUtilities/src/StripSubClusterShapeTrajectoryFilter.cc index 7172daaaf35ce..de333a956d6bf 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/src/StripSubClusterShapeTrajectoryFilter.cc +++ b/RecoTracker/PixelLowPtUtilities/src/StripSubClusterShapeTrajectoryFilter.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/StripSubClusterShapeTrajectoryFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/StripSubClusterShapeTrajectoryFilter.h" #include #include @@ -20,7 +20,7 @@ #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" #include "Geometry/Records/interface/TrackerTopologyRcd.h" #include "MagneticField/Engine/interface/MagneticField.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" #include "RecoTracker/Record/interface/CkfComponentsRecord.h" #include "RecoTracker/MeasurementDet/interface/MeasurementTrackerEvent.h" #include "TrackingTools/PatternTools/interface/TempTrajectory.h" diff --git a/RecoPixelVertexing/PixelLowPtUtilities/src/ThirdHitPrediction.cc b/RecoTracker/PixelLowPtUtilities/src/ThirdHitPrediction.cc similarity index 98% rename from RecoPixelVertexing/PixelLowPtUtilities/src/ThirdHitPrediction.cc rename to RecoTracker/PixelLowPtUtilities/src/ThirdHitPrediction.cc index abedbe9373ef0..511c09be11851 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/src/ThirdHitPrediction.cc +++ b/RecoTracker/PixelLowPtUtilities/src/ThirdHitPrediction.cc @@ -1,7 +1,7 @@ #include "DataFormats/GeometryVector/interface/GlobalPoint.h" #include "MagneticField/Engine/interface/MagneticField.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ThirdHitPrediction.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/CircleFromThreePoints.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ThirdHitPrediction.h" +#include "RecoTracker/PixelTrackFitting/interface/CircleFromThreePoints.h" #include "RecoTracker/TkMSParametrization/interface/MultipleScatteringParametrisationMaker.h" #include "RecoTracker/TkMSParametrization/interface/MultipleScatteringParametrisation.h" #include "TrackingTools/DetLayers/interface/BarrelDetLayer.h" diff --git a/RecoPixelVertexing/PixelLowPtUtilities/src/TrackCleaner.cc b/RecoTracker/PixelLowPtUtilities/src/TrackCleaner.cc similarity index 98% rename from RecoPixelVertexing/PixelLowPtUtilities/src/TrackCleaner.cc rename to RecoTracker/PixelLowPtUtilities/src/TrackCleaner.cc index ec72e9cfe6bbc..8279d56fa5f0e 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/src/TrackCleaner.cc +++ b/RecoTracker/PixelLowPtUtilities/src/TrackCleaner.cc @@ -1,5 +1,5 @@ -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/TrackCleaner.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/HitInfo.h" +#include "RecoTracker/PixelLowPtUtilities/interface/TrackCleaner.h" +#include "RecoTracker/PixelLowPtUtilities/interface/HitInfo.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" diff --git a/RecoPixelVertexing/PixelLowPtUtilities/src/TrackFitter.cc b/RecoTracker/PixelLowPtUtilities/src/TrackFitter.cc similarity index 95% rename from RecoPixelVertexing/PixelLowPtUtilities/src/TrackFitter.cc rename to RecoTracker/PixelLowPtUtilities/src/TrackFitter.cc index 32bcadeb7478e..bad273a6af08e 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/src/TrackFitter.cc +++ b/RecoTracker/PixelLowPtUtilities/src/TrackFitter.cc @@ -12,10 +12,10 @@ #include "Geometry/CommonDetUnit/interface/GeomDetType.h" #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" #include "MagneticField/Engine/interface/MagneticField.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/TrackFitter.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/CircleFromThreePoints.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackBuilder.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/RZLine.h" +#include "RecoTracker/PixelLowPtUtilities/interface/TrackFitter.h" +#include "RecoTracker/PixelTrackFitting/interface/CircleFromThreePoints.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackBuilder.h" +#include "RecoTracker/PixelTrackFitting/interface/RZLine.h" #include "RecoTracker/TkMSParametrization/interface/PixelRecoUtilities.h" #include "TrackingTools/DetLayers/interface/DetLayer.h" #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h" diff --git a/RecoPixelVertexing/PixelLowPtUtilities/src/TripletFilter.cc b/RecoTracker/PixelLowPtUtilities/src/TripletFilter.cc similarity index 90% rename from RecoPixelVertexing/PixelLowPtUtilities/src/TripletFilter.cc rename to RecoTracker/PixelLowPtUtilities/src/TripletFilter.cc index bf067af76831b..5928b93876e42 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/src/TripletFilter.cc +++ b/RecoTracker/PixelLowPtUtilities/src/TripletFilter.cc @@ -1,7 +1,7 @@ -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/TripletFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/TripletFilter.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/HitInfo.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/HitInfo.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" diff --git a/RecoPixelVertexing/PixelLowPtUtilities/test/BuildFile.xml b/RecoTracker/PixelLowPtUtilities/test/BuildFile.xml similarity index 76% rename from RecoPixelVertexing/PixelLowPtUtilities/test/BuildFile.xml rename to RecoTracker/PixelLowPtUtilities/test/BuildFile.xml index a71b2230c00d8..62083438fabc2 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/test/BuildFile.xml +++ b/RecoTracker/PixelLowPtUtilities/test/BuildFile.xml @@ -5,16 +5,16 @@ - + - + - + diff --git a/RecoPixelVertexing/PixelLowPtUtilities/test/ClusterShapeExtractor.cc b/RecoTracker/PixelLowPtUtilities/test/ClusterShapeExtractor.cc similarity index 99% rename from RecoPixelVertexing/PixelLowPtUtilities/test/ClusterShapeExtractor.cc rename to RecoTracker/PixelLowPtUtilities/test/ClusterShapeExtractor.cc index 5751a4adc365f..301065d863792 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/test/ClusterShapeExtractor.cc +++ b/RecoTracker/PixelLowPtUtilities/test/ClusterShapeExtractor.cc @@ -22,7 +22,7 @@ #include "Geometry/CommonDetUnit/interface/GeomDetType.h" #include "Geometry/CommonDetUnit/interface/GeomDet.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" #include "TrackingTools/PatternTools/interface/Trajectory.h" diff --git a/RecoPixelVertexing/PixelLowPtUtilities/test/ClusterShapeHitFilter_t.cpp b/RecoTracker/PixelLowPtUtilities/test/ClusterShapeHitFilter_t.cpp similarity index 80% rename from RecoPixelVertexing/PixelLowPtUtilities/test/ClusterShapeHitFilter_t.cpp rename to RecoTracker/PixelLowPtUtilities/test/ClusterShapeHitFilter_t.cpp index 2a0624261d676..440c7cebea1cc 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/test/ClusterShapeHitFilter_t.cpp +++ b/RecoTracker/PixelLowPtUtilities/test/ClusterShapeHitFilter_t.cpp @@ -1,5 +1,5 @@ // ClusterShapeHitFilter test -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" #include #include @@ -7,10 +7,10 @@ namespace test { namespace ClusterShapeHitFilterTest { int test() { - const std::string use_PixelShapeFile("RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase0.par"); + const std::string use_PixelShapeFile("RecoTracker/PixelLowPtUtilities/data/pixelShapePhase0.par"); - ClusterShapeHitFilter filter("RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase0.par", - "RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase0.par"); + ClusterShapeHitFilter filter("RecoTracker/PixelLowPtUtilities/data/pixelShapePhase0.par", + "RecoTracker/PixelLowPtUtilities/data/pixelShapePhase0.par"); const float out = 10e12; const float eps = 0.01; diff --git a/RecoPixelVertexing/PixelLowPtUtilities/test/LowPtGlobalDir_t.cpp b/RecoTracker/PixelLowPtUtilities/test/LowPtGlobalDir_t.cpp similarity index 94% rename from RecoPixelVertexing/PixelLowPtUtilities/test/LowPtGlobalDir_t.cpp rename to RecoTracker/PixelLowPtUtilities/test/LowPtGlobalDir_t.cpp index 5f571ef3a8868..fc41f91cf85f4 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/test/LowPtGlobalDir_t.cpp +++ b/RecoTracker/PixelLowPtUtilities/test/LowPtGlobalDir_t.cpp @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelLowPtUtilities/src/LowPtClusterShapeSeedComparitor.cc" +#include "RecoTracker/PixelLowPtUtilities/src/LowPtClusterShapeSeedComparitor.cc" #include #ifdef OLDCODE diff --git a/RecoPixelVertexing/PixelLowPtUtilities/test/README.md b/RecoTracker/PixelLowPtUtilities/test/README.md similarity index 75% rename from RecoPixelVertexing/PixelLowPtUtilities/test/README.md rename to RecoTracker/PixelLowPtUtilities/test/README.md index aa345590696f9..6ed45b30f2887 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/test/README.md +++ b/RecoTracker/PixelLowPtUtilities/test/README.md @@ -3,7 +3,7 @@ 1. Copy the cfg file in your area ```shell - cp $CMSSW_RELEASE_BASE/src/RecoPixelVertexing/PixelLowPtUtilities/test/clusterShapeExtractor_phase* . + cp $CMSSW_RELEASE_BASE/src/RecoTracker/PixelLowPtUtilities/test/clusterShapeExtractor_phase* . ``` 2. Get the list of files from relval and substitute to those in the file in the release 3. cmsRun it: it create a root file named _clusterShape.root_ @@ -22,4 +22,4 @@ ``` 6. Analysis the resulting file using/modifing the pcsfVerify.ipynb notebook -7. to use the produced file(s) edit RecoPixelVertexing/PixelLowPtUtilities/python/ClusterShapeHitFilterESProducer_cfi.py +7. to use the produced file(s) edit RecoTracker/PixelLowPtUtilities/python/ClusterShapeHitFilterESProducer_cfi.py diff --git a/RecoPixelVertexing/PixelLowPtUtilities/test/clusterShapeExtractor_phase1_cfg.py b/RecoTracker/PixelLowPtUtilities/test/clusterShapeExtractor_phase1_cfg.py similarity index 98% rename from RecoPixelVertexing/PixelLowPtUtilities/test/clusterShapeExtractor_phase1_cfg.py rename to RecoTracker/PixelLowPtUtilities/test/clusterShapeExtractor_phase1_cfg.py index 67708d4ca202d..78095bc509433 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/test/clusterShapeExtractor_phase1_cfg.py +++ b/RecoTracker/PixelLowPtUtilities/test/clusterShapeExtractor_phase1_cfg.py @@ -115,7 +115,7 @@ process.raw2digi_step = cms.Path(process.RawToDigi) process.reconstruction_step = cms.Path(process.reconstruction_trackingOnly) process.prevalidation_step = cms.Path(process.globalPrevalidationTrackingOnly) -process.load('RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeExtractor_cfi') +process.load('RecoTracker.PixelLowPtUtilities.ClusterShapeExtractor_cfi') process.clusterShapeExtractor.noBPIX1=False process.clusterShapeExtractor_step = cms.Path(process.clusterShapeExtractor) diff --git a/RecoPixelVertexing/PixelLowPtUtilities/test/clusterShapeExtractor_phase2_cfg.py b/RecoTracker/PixelLowPtUtilities/test/clusterShapeExtractor_phase2_cfg.py similarity index 99% rename from RecoPixelVertexing/PixelLowPtUtilities/test/clusterShapeExtractor_phase2_cfg.py rename to RecoTracker/PixelLowPtUtilities/test/clusterShapeExtractor_phase2_cfg.py index 3f3d294d6a992..5a4783c30927a 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/test/clusterShapeExtractor_phase2_cfg.py +++ b/RecoTracker/PixelLowPtUtilities/test/clusterShapeExtractor_phase2_cfg.py @@ -88,7 +88,7 @@ process.L1Reco_step = cms.Path(process.L1Reco) process.reconstruction_step = cms.Path(process.reconstruction) -process.load('RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeExtractor_cfi') +process.load('RecoTracker.PixelLowPtUtilities.ClusterShapeExtractor_cfi') process.clusterShapeExtractor_step = cms.Path(process.clusterShapeExtractor) process.clusterShapeExtractor.noBPIX1=False process.schedule = cms.Schedule(process.raw2digi_step,process.L1Reco_step,process.reconstruction_step,process.clusterShapeExtractor_step) diff --git a/RecoPixelVertexing/PixelLowPtUtilities/test/pcsfVerify.ipynb b/RecoTracker/PixelLowPtUtilities/test/pcsfVerify.ipynb similarity index 100% rename from RecoPixelVertexing/PixelLowPtUtilities/test/pcsfVerify.ipynb rename to RecoTracker/PixelLowPtUtilities/test/pcsfVerify.ipynb diff --git a/RecoPixelVertexing/PixelTriplets/BuildFile.xml b/RecoTracker/PixelSeeding/BuildFile.xml similarity index 95% rename from RecoPixelVertexing/PixelTriplets/BuildFile.xml rename to RecoTracker/PixelSeeding/BuildFile.xml index 0439ea88a8213..7bc10578b4448 100644 --- a/RecoPixelVertexing/PixelTriplets/BuildFile.xml +++ b/RecoTracker/PixelSeeding/BuildFile.xml @@ -18,7 +18,7 @@ - + diff --git a/RecoPixelVertexing/PixelTriplets/interface/CACut.h b/RecoTracker/PixelSeeding/interface/CACut.h similarity index 98% rename from RecoPixelVertexing/PixelTriplets/interface/CACut.h rename to RecoTracker/PixelSeeding/interface/CACut.h index cc625b9050854..b92a03dc21fed 100644 --- a/RecoPixelVertexing/PixelTriplets/interface/CACut.h +++ b/RecoTracker/PixelSeeding/interface/CACut.h @@ -2,7 +2,7 @@ #define RecoPixelVertexing_PixelTriplets_interface_CACut_h // -*- C++ -*- // // -// // Package: RecoPixelVertexing/PixelTriplets +// // Package: RecoTracker/PixelSeeding // // Class: CACut // // // // Original Author: Karla Josefina Pena Rodriguez @@ -11,7 +11,7 @@ #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "RecoPixelVertexing/PixelTriplets/interface/CAGraph.h" +#include "RecoTracker/PixelSeeding/interface/CAGraph.h" class CACut { public: diff --git a/RecoPixelVertexing/PixelTriplets/interface/CAGraph.h b/RecoTracker/PixelSeeding/interface/CAGraph.h similarity index 100% rename from RecoPixelVertexing/PixelTriplets/interface/CAGraph.h rename to RecoTracker/PixelSeeding/interface/CAGraph.h diff --git a/RecoPixelVertexing/PixelTriplets/interface/CAHitQuadrupletGenerator.h b/RecoTracker/PixelSeeding/interface/CAHitQuadrupletGenerator.h similarity index 96% rename from RecoPixelVertexing/PixelTriplets/interface/CAHitQuadrupletGenerator.h rename to RecoTracker/PixelSeeding/interface/CAHitQuadrupletGenerator.h index f2cff74430da8..58b5f05846800 100644 --- a/RecoPixelVertexing/PixelTriplets/interface/CAHitQuadrupletGenerator.h +++ b/RecoTracker/PixelSeeding/interface/CAHitQuadrupletGenerator.h @@ -3,7 +3,7 @@ #include "RecoTracker/TkSeedingLayers/interface/SeedComparitorFactory.h" #include "RecoTracker/TkSeedingLayers/interface/SeedComparitor.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/RZLine.h" +#include "RecoTracker/PixelTrackFitting/interface/RZLine.h" #include "RecoTracker/TkSeedGenerator/interface/FastCircleFit.h" #include "RecoTracker/TkMSParametrization/interface/PixelRecoUtilities.h" #include "RecoTracker/TkMSParametrization/interface/LongitudinalBendingCorrection.h" @@ -16,8 +16,8 @@ #include "FWCore/Utilities/interface/EDGetToken.h" #include "RecoTracker/TkHitPairs/interface/IntermediateHitDoublets.h" -#include "RecoPixelVertexing/PixelTriplets/interface/OrderedHitSeeds.h" -#include "RecoPixelVertexing/PixelTriplets/interface/CACut.h" +#include "RecoTracker/PixelSeeding/interface/OrderedHitSeeds.h" +#include "RecoTracker/PixelSeeding/interface/CACut.h" class TrackingRegion; class SeedingLayerSetsHits; diff --git a/RecoPixelVertexing/PixelTriplets/interface/CAHitTripletGenerator.h b/RecoTracker/PixelSeeding/interface/CAHitTripletGenerator.h similarity index 95% rename from RecoPixelVertexing/PixelTriplets/interface/CAHitTripletGenerator.h rename to RecoTracker/PixelSeeding/interface/CAHitTripletGenerator.h index 3896e94c30579..cb2b48953ed8e 100644 --- a/RecoPixelVertexing/PixelTriplets/interface/CAHitTripletGenerator.h +++ b/RecoTracker/PixelSeeding/interface/CAHitTripletGenerator.h @@ -3,7 +3,7 @@ #include "RecoTracker/TkSeedingLayers/interface/SeedComparitorFactory.h" #include "RecoTracker/TkSeedingLayers/interface/SeedComparitor.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/RZLine.h" +#include "RecoTracker/PixelTrackFitting/interface/RZLine.h" #include "RecoTracker/TkMSParametrization/interface/PixelRecoUtilities.h" #include "RecoTracker/TkMSParametrization/interface/LongitudinalBendingCorrection.h" @@ -17,8 +17,8 @@ #include "RecoTracker/TkHitPairs/interface/IntermediateHitDoublets.h" -#include "RecoPixelVertexing/PixelTriplets/interface/OrderedHitSeeds.h" -#include "RecoPixelVertexing/PixelTriplets/interface/CACut.h" +#include "RecoTracker/PixelSeeding/interface/OrderedHitSeeds.h" +#include "RecoTracker/PixelSeeding/interface/CACut.h" class TrackingRegion; class SeedingLayerSetsHits; diff --git a/RecoPixelVertexing/PixelTriplets/interface/CircleEq.h b/RecoTracker/PixelSeeding/interface/CircleEq.h similarity index 100% rename from RecoPixelVertexing/PixelTriplets/interface/CircleEq.h rename to RecoTracker/PixelSeeding/interface/CircleEq.h diff --git a/RecoPixelVertexing/PixelTriplets/interface/CosmicHitTripletGenerator.h b/RecoTracker/PixelSeeding/interface/CosmicHitTripletGenerator.h similarity index 85% rename from RecoPixelVertexing/PixelTriplets/interface/CosmicHitTripletGenerator.h rename to RecoTracker/PixelSeeding/interface/CosmicHitTripletGenerator.h index 53271501fed23..bdc1b32541a06 100644 --- a/RecoPixelVertexing/PixelTriplets/interface/CosmicHitTripletGenerator.h +++ b/RecoTracker/PixelSeeding/interface/CosmicHitTripletGenerator.h @@ -2,8 +2,8 @@ #define CosmicHitTripletGenerator_H #include -#include "RecoPixelVertexing/PixelTriplets/interface/OrderedHitTriplets.h" -#include "RecoPixelVertexing/PixelTriplets/interface/CosmicHitTripletGeneratorFromLayerTriplet.h" +#include "RecoTracker/PixelSeeding/interface/OrderedHitTriplets.h" +#include "RecoTracker/PixelSeeding/interface/CosmicHitTripletGeneratorFromLayerTriplet.h" #include "DataFormats/Common/interface/RangeMap.h" class LayerWithHits; diff --git a/RecoPixelVertexing/PixelTriplets/interface/CosmicHitTripletGeneratorFromLayerTriplet.h b/RecoTracker/PixelSeeding/interface/CosmicHitTripletGeneratorFromLayerTriplet.h similarity index 95% rename from RecoPixelVertexing/PixelTriplets/interface/CosmicHitTripletGeneratorFromLayerTriplet.h rename to RecoTracker/PixelSeeding/interface/CosmicHitTripletGeneratorFromLayerTriplet.h index 264589063be11..976b70d9e24b0 100644 --- a/RecoPixelVertexing/PixelTriplets/interface/CosmicHitTripletGeneratorFromLayerTriplet.h +++ b/RecoTracker/PixelSeeding/interface/CosmicHitTripletGeneratorFromLayerTriplet.h @@ -1,7 +1,7 @@ #ifndef CosmicHitTripletGeneratorFromLayerTriplet_h #define CosmicHitTripletGeneratorFromLayerTriplet_h -#include "RecoPixelVertexing/PixelTriplets/interface/OrderedHitTriplets.h" +#include "RecoTracker/PixelSeeding/interface/OrderedHitTriplets.h" #include "RecoTracker/TkHitPairs/interface/LayerWithHits.h" #include "FWCore/Framework/interface/EventSetup.h" #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" diff --git a/RecoPixelVertexing/PixelTriplets/interface/CosmicLayerTriplets.h b/RecoTracker/PixelSeeding/interface/CosmicLayerTriplets.h similarity index 100% rename from RecoPixelVertexing/PixelTriplets/interface/CosmicLayerTriplets.h rename to RecoTracker/PixelSeeding/interface/CosmicLayerTriplets.h diff --git a/RecoPixelVertexing/PixelTriplets/interface/HitTripletEDProducerT.h b/RecoTracker/PixelSeeding/interface/HitTripletEDProducerT.h similarity index 98% rename from RecoPixelVertexing/PixelTriplets/interface/HitTripletEDProducerT.h rename to RecoTracker/PixelSeeding/interface/HitTripletEDProducerT.h index db514f7380585..13386e10496aa 100644 --- a/RecoPixelVertexing/PixelTriplets/interface/HitTripletEDProducerT.h +++ b/RecoTracker/PixelSeeding/interface/HitTripletEDProducerT.h @@ -14,9 +14,9 @@ #include "RecoTracker/TkHitPairs/interface/IntermediateHitDoublets.h" #include "RecoTracker/TkHitPairs/interface/RegionsSeedingHitSets.h" -#include "RecoPixelVertexing/PixelTriplets/interface/OrderedHitTriplets.h" -#include "RecoPixelVertexing/PixelTriplets/interface/IntermediateHitTriplets.h" -#include "RecoPixelVertexing/PixelTriplets/interface/LayerTriplets.h" +#include "RecoTracker/PixelSeeding/interface/OrderedHitTriplets.h" +#include "RecoTracker/PixelSeeding/interface/IntermediateHitTriplets.h" +#include "RecoTracker/PixelSeeding/interface/LayerTriplets.h" #include diff --git a/RecoPixelVertexing/PixelTriplets/interface/HitTripletGenerator.h b/RecoTracker/PixelSeeding/interface/HitTripletGenerator.h similarity index 94% rename from RecoPixelVertexing/PixelTriplets/interface/HitTripletGenerator.h rename to RecoTracker/PixelSeeding/interface/HitTripletGenerator.h index 781b1d2117029..67365348cba42 100644 --- a/RecoPixelVertexing/PixelTriplets/interface/HitTripletGenerator.h +++ b/RecoTracker/PixelSeeding/interface/HitTripletGenerator.h @@ -6,7 +6,7 @@ */ #include "RecoTracker/TkTrackingRegions/interface/OrderedHitsGenerator.h" -#include "RecoPixelVertexing/PixelTriplets/interface/OrderedHitTriplets.h" +#include "RecoTracker/PixelSeeding/interface/OrderedHitTriplets.h" #include "FWCore/Utilities/interface/RunningAverage.h" diff --git a/RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayers.h b/RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayers.h similarity index 96% rename from RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayers.h rename to RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayers.h index c978ecfaa0dd0..6d265b3fc9a0e 100644 --- a/RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayers.h +++ b/RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayers.h @@ -7,7 +7,7 @@ provided Layers */ -#include "RecoPixelVertexing/PixelTriplets/interface/OrderedHitTriplets.h" +#include "RecoTracker/PixelSeeding/interface/OrderedHitTriplets.h" #include #include "TrackingTools/TransientTrackingRecHit/interface/SeedingLayerSetsHits.h" #include "RecoTracker/TkHitPairs/interface/LayerHitMapCache.h" diff --git a/RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayersFactory.h b/RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayersFactory.h similarity index 85% rename from RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayersFactory.h rename to RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayersFactory.h index 9f5ae80b13a23..c1138e323fd5e 100644 --- a/RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayersFactory.h +++ b/RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayersFactory.h @@ -1,7 +1,7 @@ #ifndef PixelTriplets_HitTripletGeneratorFromPairAndLayersFactory_H #define PixelTriplets_HitTripletGeneratorFromPairAndLayersFactory_H -#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayers.h" +#include "RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayers.h" #include "FWCore/PluginManager/interface/PluginFactory.h" namespace edm { diff --git a/RecoPixelVertexing/PixelTriplets/interface/IntermediateHitTriplets.h b/RecoTracker/PixelSeeding/interface/IntermediateHitTriplets.h similarity index 99% rename from RecoPixelVertexing/PixelTriplets/interface/IntermediateHitTriplets.h rename to RecoTracker/PixelSeeding/interface/IntermediateHitTriplets.h index 5998bce1746e5..4dff40d078391 100644 --- a/RecoPixelVertexing/PixelTriplets/interface/IntermediateHitTriplets.h +++ b/RecoTracker/PixelSeeding/interface/IntermediateHitTriplets.h @@ -4,7 +4,7 @@ #include "RecoTracker/TkHitPairs/interface/LayerHitMapCache.h" #include "RecoTracker/TkHitPairs/interface/IntermediateHitDoublets.h" #include "TrackingTools/TransientTrackingRecHit/interface/SeedingLayerSetsHits.h" -#include "RecoPixelVertexing/PixelTriplets/interface/OrderedHitTriplets.h" +#include "RecoTracker/PixelSeeding/interface/OrderedHitTriplets.h" /** * Container of temporary information delivered from hit triplet diff --git a/RecoPixelVertexing/PixelTriplets/interface/LayerTriplets.h b/RecoTracker/PixelSeeding/interface/LayerTriplets.h similarity index 100% rename from RecoPixelVertexing/PixelTriplets/interface/LayerTriplets.h rename to RecoTracker/PixelSeeding/interface/LayerTriplets.h diff --git a/RecoPixelVertexing/PixelTriplets/interface/OrderedHitSeeds.h b/RecoTracker/PixelSeeding/interface/OrderedHitSeeds.h similarity index 100% rename from RecoPixelVertexing/PixelTriplets/interface/OrderedHitSeeds.h rename to RecoTracker/PixelSeeding/interface/OrderedHitSeeds.h diff --git a/RecoPixelVertexing/PixelTriplets/interface/OrderedHitTriplet.h b/RecoTracker/PixelSeeding/interface/OrderedHitTriplet.h similarity index 100% rename from RecoPixelVertexing/PixelTriplets/interface/OrderedHitTriplet.h rename to RecoTracker/PixelSeeding/interface/OrderedHitTriplet.h diff --git a/RecoPixelVertexing/PixelTriplets/interface/OrderedHitTriplets.h b/RecoTracker/PixelSeeding/interface/OrderedHitTriplets.h similarity index 87% rename from RecoPixelVertexing/PixelTriplets/interface/OrderedHitTriplets.h rename to RecoTracker/PixelSeeding/interface/OrderedHitTriplets.h index 85138c13fc5db..341553dc526f5 100644 --- a/RecoPixelVertexing/PixelTriplets/interface/OrderedHitTriplets.h +++ b/RecoTracker/PixelSeeding/interface/OrderedHitTriplets.h @@ -2,7 +2,7 @@ #define OrderedHitTriplets_H #include -#include "RecoPixelVertexing/PixelTriplets/interface/OrderedHitTriplet.h" +#include "RecoTracker/PixelSeeding/interface/OrderedHitTriplet.h" #include "RecoTracker/TkSeedingLayers/interface/OrderedSeedingHits.h" #include diff --git a/RecoPixelVertexing/PixelTriplets/interface/ThirdHitPredictionFromCircle.h b/RecoTracker/PixelSeeding/interface/ThirdHitPredictionFromCircle.h similarity index 100% rename from RecoPixelVertexing/PixelTriplets/interface/ThirdHitPredictionFromCircle.h rename to RecoTracker/PixelSeeding/interface/ThirdHitPredictionFromCircle.h diff --git a/RecoPixelVertexing/PixelTriplets/interface/ThirdHitRZPrediction.h b/RecoTracker/PixelSeeding/interface/ThirdHitRZPrediction.h similarity index 95% rename from RecoPixelVertexing/PixelTriplets/interface/ThirdHitRZPrediction.h rename to RecoTracker/PixelSeeding/interface/ThirdHitRZPrediction.h index a83eb0cdba172..c50a8c7a0e26e 100644 --- a/RecoPixelVertexing/PixelTriplets/interface/ThirdHitRZPrediction.h +++ b/RecoTracker/PixelSeeding/interface/ThirdHitRZPrediction.h @@ -8,7 +8,7 @@ #include -#include "RecoPixelVertexing/PixelTriplets/interface/ThirdHitRZPredictionBase.h" +#include "RecoTracker/PixelSeeding/interface/ThirdHitRZPredictionBase.h" template class ThirdHitRZPrediction : public ThirdHitRZPredictionBase { diff --git a/RecoPixelVertexing/PixelTriplets/interface/ThirdHitRZPredictionBase.h b/RecoTracker/PixelSeeding/interface/ThirdHitRZPredictionBase.h similarity index 100% rename from RecoPixelVertexing/PixelTriplets/interface/ThirdHitRZPredictionBase.h rename to RecoTracker/PixelSeeding/interface/ThirdHitRZPredictionBase.h diff --git a/RecoPixelVertexing/PixelTriplets/plugins/BrokenLineFitOnGPU.cc b/RecoTracker/PixelSeeding/plugins/BrokenLineFitOnGPU.cc similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/BrokenLineFitOnGPU.cc rename to RecoTracker/PixelSeeding/plugins/BrokenLineFitOnGPU.cc diff --git a/RecoPixelVertexing/PixelTriplets/plugins/BrokenLineFitOnGPU.cu b/RecoTracker/PixelSeeding/plugins/BrokenLineFitOnGPU.cu similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/BrokenLineFitOnGPU.cu rename to RecoTracker/PixelSeeding/plugins/BrokenLineFitOnGPU.cu diff --git a/RecoPixelVertexing/PixelTriplets/plugins/BrokenLineFitOnGPU.h b/RecoTracker/PixelSeeding/plugins/BrokenLineFitOnGPU.h similarity index 99% rename from RecoPixelVertexing/PixelTriplets/plugins/BrokenLineFitOnGPU.h rename to RecoTracker/PixelSeeding/plugins/BrokenLineFitOnGPU.h index e347b0c000dc3..7a3e938fae3ec 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/BrokenLineFitOnGPU.h +++ b/RecoTracker/PixelSeeding/plugins/BrokenLineFitOnGPU.h @@ -12,7 +12,7 @@ #include "HeterogeneousCore/CUDAUtilities/interface/cudaCheck.h" #include "HeterogeneousCore/CUDAUtilities/interface/cuda_assert.h" #include "RecoLocalTracker/SiPixelRecHits/interface/pixelCPEforGPU.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/BrokenLine.h" +#include "RecoTracker/PixelTrackFitting/interface/BrokenLine.h" #include "HelixFitOnGPU.h" diff --git a/RecoPixelVertexing/PixelTriplets/plugins/BuildFile.xml b/RecoTracker/PixelSeeding/plugins/BuildFile.xml similarity index 93% rename from RecoPixelVertexing/PixelTriplets/plugins/BuildFile.xml rename to RecoTracker/PixelSeeding/plugins/BuildFile.xml index de2a40fc8b0f0..82b80e1c55b66 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/BuildFile.xml +++ b/RecoTracker/PixelSeeding/plugins/BuildFile.xml @@ -6,7 +6,7 @@ - + diff --git a/RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletCUDA.cc b/RecoTracker/PixelSeeding/plugins/CAHitNtupletCUDA.cc similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletCUDA.cc rename to RecoTracker/PixelSeeding/plugins/CAHitNtupletCUDA.cc diff --git a/RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletEDProducerT.cc b/RecoTracker/PixelSeeding/plugins/CAHitNtupletEDProducerT.cc similarity index 95% rename from RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletEDProducerT.cc rename to RecoTracker/PixelSeeding/plugins/CAHitNtupletEDProducerT.cc index bcf8712914f41..eedd41c620796 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletEDProducerT.cc +++ b/RecoTracker/PixelSeeding/plugins/CAHitNtupletEDProducerT.cc @@ -9,7 +9,7 @@ #include "FWCore/Utilities/interface/RunningAverage.h" #include "RecoTracker/TkHitPairs/interface/RegionsSeedingHitSets.h" -#include "RecoPixelVertexing/PixelTriplets/interface/OrderedHitSeeds.h" +#include "RecoTracker/PixelSeeding/interface/OrderedHitSeeds.h" #include "RecoTracker/TkHitPairs/interface/IntermediateHitDoublets.h" namespace { @@ -106,10 +106,10 @@ void CAHitNtupletEDProducerT::produce(edm::Event& iEvent, const edm #include "FWCore/PluginManager/interface/ModuleDef.h" #include "FWCore/Framework/interface/MakerMacros.h" -#include "RecoPixelVertexing/PixelTriplets/interface/CAHitQuadrupletGenerator.h" +#include "RecoTracker/PixelSeeding/interface/CAHitQuadrupletGenerator.h" using CAHitQuadrupletEDProducer = CAHitNtupletEDProducerT; DEFINE_FWK_MODULE(CAHitQuadrupletEDProducer); -#include "RecoPixelVertexing/PixelTriplets/interface/CAHitTripletGenerator.h" +#include "RecoTracker/PixelSeeding/interface/CAHitTripletGenerator.h" using CAHitTripletEDProducer = CAHitNtupletEDProducerT; DEFINE_FWK_MODULE(CAHitTripletEDProducer); diff --git a/RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletGeneratorKernels.cc b/RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorKernels.cc similarity index 99% rename from RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletGeneratorKernels.cc rename to RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorKernels.cc index f826b1b5c89da..38ede8eb80d85 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletGeneratorKernels.cc +++ b/RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorKernels.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletGeneratorKernelsImpl.h" +#include "RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorKernelsImpl.h" #include diff --git a/RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletGeneratorKernels.cu b/RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorKernels.cu similarity index 99% rename from RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletGeneratorKernels.cu rename to RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorKernels.cu index 11f701e8aee0c..8b3d78f53401a 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletGeneratorKernels.cu +++ b/RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorKernels.cu @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletGeneratorKernelsImpl.h" +#include "RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorKernelsImpl.h" #include // #define NTUPLE_DEBUG diff --git a/RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletGeneratorKernels.h b/RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorKernels.h similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletGeneratorKernels.h rename to RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorKernels.h diff --git a/RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletGeneratorKernelsAlloc.cc b/RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorKernelsAlloc.cc similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletGeneratorKernelsAlloc.cc rename to RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorKernelsAlloc.cc diff --git a/RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletGeneratorKernelsAlloc.cu b/RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorKernelsAlloc.cu similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletGeneratorKernelsAlloc.cu rename to RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorKernelsAlloc.cu diff --git a/RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletGeneratorKernelsImpl.h b/RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorKernelsImpl.h similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletGeneratorKernelsImpl.h rename to RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorKernelsImpl.h diff --git a/RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletGeneratorOnGPU.cc b/RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorOnGPU.cc similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletGeneratorOnGPU.cc rename to RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorOnGPU.cc diff --git a/RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletGeneratorOnGPU.h b/RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorOnGPU.h similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/CAHitNtupletGeneratorOnGPU.h rename to RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorOnGPU.h diff --git a/RecoPixelVertexing/PixelTriplets/plugins/CAStructures.h b/RecoTracker/PixelSeeding/plugins/CAStructures.h similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/CAStructures.h rename to RecoTracker/PixelSeeding/plugins/CAStructures.h diff --git a/RecoPixelVertexing/PixelTriplets/plugins/CombinedHitTripletGenerator.cc b/RecoTracker/PixelSeeding/plugins/CombinedHitTripletGenerator.cc similarity index 87% rename from RecoPixelVertexing/PixelTriplets/plugins/CombinedHitTripletGenerator.cc rename to RecoTracker/PixelSeeding/plugins/CombinedHitTripletGenerator.cc index 2de7427d2e087..cb7c332e9c4b4 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/CombinedHitTripletGenerator.cc +++ b/RecoTracker/PixelSeeding/plugins/CombinedHitTripletGenerator.cc @@ -1,9 +1,9 @@ #include "CombinedHitTripletGenerator.h" #include "RecoTracker/TkHitPairs/interface/HitPairGeneratorFromLayerPair.h" -#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayers.h" -#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayersFactory.h" -#include "RecoPixelVertexing/PixelTriplets/interface/LayerTriplets.h" +#include "RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayers.h" +#include "RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayersFactory.h" +#include "RecoTracker/PixelSeeding/interface/LayerTriplets.h" #include "FWCore/Framework/interface/ConsumesCollector.h" #include "FWCore/Framework/interface/Event.h" #include "DataFormats/Common/interface/Handle.h" diff --git a/RecoPixelVertexing/PixelTriplets/plugins/CombinedHitTripletGenerator.h b/RecoTracker/PixelSeeding/plugins/CombinedHitTripletGenerator.h similarity index 94% rename from RecoPixelVertexing/PixelTriplets/plugins/CombinedHitTripletGenerator.h rename to RecoTracker/PixelSeeding/plugins/CombinedHitTripletGenerator.h index 9980eb3df06a7..a9dba4d0b5c94 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/CombinedHitTripletGenerator.h +++ b/RecoTracker/PixelSeeding/plugins/CombinedHitTripletGenerator.h @@ -8,7 +8,7 @@ #include #include -#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletGenerator.h" +#include "RecoTracker/PixelSeeding/interface/HitTripletGenerator.h" #include "RecoTracker/TkHitPairs/interface/LayerHitMapCache.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Utilities/interface/EDGetToken.h" diff --git a/RecoPixelVertexing/PixelTriplets/plugins/GPUCACell.h b/RecoTracker/PixelSeeding/plugins/GPUCACell.h similarity index 99% rename from RecoPixelVertexing/PixelTriplets/plugins/GPUCACell.h rename to RecoTracker/PixelSeeding/plugins/GPUCACell.h index 2f8ae9105ac55..18621f2443a7a 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/GPUCACell.h +++ b/RecoTracker/PixelSeeding/plugins/GPUCACell.h @@ -13,7 +13,7 @@ #include "HeterogeneousCore/CUDAUtilities/interface/SimpleVector.h" #include "HeterogeneousCore/CUDAUtilities/interface/VecArray.h" #include "HeterogeneousCore/CUDAUtilities/interface/cuda_assert.h" -#include "RecoPixelVertexing/PixelTriplets/interface/CircleEq.h" +#include "RecoTracker/PixelSeeding/interface/CircleEq.h" #include "CUDADataFormats/Track/interface/PixelTrackUtilities.h" #include "Geometry/CommonTopologies/interface/SimplePixelTopology.h" #include "CAStructures.h" diff --git a/RecoPixelVertexing/PixelTriplets/plugins/HelixFitOnGPU.cc b/RecoTracker/PixelSeeding/plugins/HelixFitOnGPU.cc similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/HelixFitOnGPU.cc rename to RecoTracker/PixelSeeding/plugins/HelixFitOnGPU.cc diff --git a/RecoPixelVertexing/PixelTriplets/plugins/HelixFitOnGPU.h b/RecoTracker/PixelSeeding/plugins/HelixFitOnGPU.h similarity index 97% rename from RecoPixelVertexing/PixelTriplets/plugins/HelixFitOnGPU.h rename to RecoTracker/PixelSeeding/plugins/HelixFitOnGPU.h index 88dc882ce5de9..88c32b44e350b 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/HelixFitOnGPU.h +++ b/RecoTracker/PixelSeeding/plugins/HelixFitOnGPU.h @@ -3,7 +3,7 @@ #include "CUDADataFormats/Track/interface/PixelTrackUtilities.h" #include "CUDADataFormats/TrackingRecHit/interface/TrackingRecHitsUtilities.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/FitResult.h" +#include "RecoTracker/PixelTrackFitting/interface/FitResult.h" #include "Geometry/CommonTopologies/interface/SimplePixelTopology.h" #include "CAStructures.h" diff --git a/RecoPixelVertexing/PixelTriplets/plugins/MatchedHitRZCorrectionFromBending.cc b/RecoTracker/PixelSeeding/plugins/MatchedHitRZCorrectionFromBending.cc similarity index 96% rename from RecoPixelVertexing/PixelTriplets/plugins/MatchedHitRZCorrectionFromBending.cc rename to RecoTracker/PixelSeeding/plugins/MatchedHitRZCorrectionFromBending.cc index 7a516291168ef..8f972391cbf14 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/MatchedHitRZCorrectionFromBending.cc +++ b/RecoTracker/PixelSeeding/plugins/MatchedHitRZCorrectionFromBending.cc @@ -4,7 +4,7 @@ #include "DataFormats/TrackerCommon/interface/TrackerTopology.h" #include "DataFormats/SiStripDetId/interface/SiStripDetId.h" #include "Geometry/Records/interface/IdealGeometryRecord.h" -#include "RecoPixelVertexing/PixelTriplets/interface/ThirdHitPredictionFromCircle.h" +#include "RecoTracker/PixelSeeding/interface/ThirdHitPredictionFromCircle.h" #include "TrackingTools/DetLayers/interface/DetLayer.h" #include "MatchedHitRZCorrectionFromBending.h" diff --git a/RecoPixelVertexing/PixelTriplets/plugins/MatchedHitRZCorrectionFromBending.h b/RecoTracker/PixelSeeding/plugins/MatchedHitRZCorrectionFromBending.h similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/MatchedHitRZCorrectionFromBending.h rename to RecoTracker/PixelSeeding/plugins/MatchedHitRZCorrectionFromBending.h diff --git a/RecoPixelVertexing/PixelTriplets/plugins/PixelTripletHLTGenerator.cc b/RecoTracker/PixelSeeding/plugins/PixelTripletHLTGenerator.cc similarity index 99% rename from RecoPixelVertexing/PixelTriplets/plugins/PixelTripletHLTGenerator.cc rename to RecoTracker/PixelSeeding/plugins/PixelTripletHLTGenerator.cc index 53373a0a65a54..685f7c0ad8010 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/PixelTripletHLTGenerator.cc +++ b/RecoTracker/PixelSeeding/plugins/PixelTripletHLTGenerator.cc @@ -1,10 +1,10 @@ -#include "RecoPixelVertexing/PixelTriplets/plugins/PixelTripletHLTGenerator.h" +#include "RecoTracker/PixelSeeding/plugins/PixelTripletHLTGenerator.h" #include "RecoTracker/TkHitPairs/interface/HitPairGeneratorFromLayerPair.h" #include "FWCore/Framework/interface/ConsumesCollector.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "ThirdHitPredictionFromInvParabola.h" -#include "RecoPixelVertexing/PixelTriplets/interface/ThirdHitRZPrediction.h" +#include "RecoTracker/PixelSeeding/interface/ThirdHitRZPrediction.h" #include "RecoTracker/TkMSParametrization/interface/PixelRecoUtilities.h" #include "ThirdHitCorrection.h" diff --git a/RecoPixelVertexing/PixelTriplets/plugins/PixelTripletHLTGenerator.h b/RecoTracker/PixelSeeding/plugins/PixelTripletHLTGenerator.h similarity index 97% rename from RecoPixelVertexing/PixelTriplets/plugins/PixelTripletHLTGenerator.h rename to RecoTracker/PixelSeeding/plugins/PixelTripletHLTGenerator.h index c92239727cd4e..67a4bff158eb7 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/PixelTripletHLTGenerator.h +++ b/RecoTracker/PixelSeeding/plugins/PixelTripletHLTGenerator.h @@ -11,7 +11,7 @@ #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" -#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayers.h" +#include "RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayers.h" #include "RecoTracker/Record/interface/TrackerMultipleScatteringRecord.h" #include "RecoTracker/TkMSParametrization/interface/MultipleScatteringParametrisationMaker.h" diff --git a/RecoPixelVertexing/PixelTriplets/plugins/PixelTripletLargeTipGenerator.cc b/RecoTracker/PixelSeeding/plugins/PixelTripletLargeTipGenerator.cc similarity index 98% rename from RecoPixelVertexing/PixelTriplets/plugins/PixelTripletLargeTipGenerator.cc rename to RecoTracker/PixelSeeding/plugins/PixelTripletLargeTipGenerator.cc index ed04211b86010..d798136a714f6 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/PixelTripletLargeTipGenerator.cc +++ b/RecoTracker/PixelSeeding/plugins/PixelTripletLargeTipGenerator.cc @@ -1,16 +1,16 @@ -#include "RecoPixelVertexing/PixelTriplets/plugins/PixelTripletLargeTipGenerator.h" +#include "RecoTracker/PixelSeeding/plugins/PixelTripletLargeTipGenerator.h" #include "RecoTracker/TkHitPairs/interface/HitPairGeneratorFromLayerPair.h" #include "FWCore/Framework/interface/ConsumesCollector.h" -#include "RecoPixelVertexing/PixelTriplets/interface/ThirdHitPredictionFromCircle.h" -#include "RecoPixelVertexing/PixelTriplets/interface/ThirdHitRZPrediction.h" +#include "RecoTracker/PixelSeeding/interface/ThirdHitPredictionFromCircle.h" +#include "RecoTracker/PixelSeeding/interface/ThirdHitRZPrediction.h" #include "RecoTracker/TkMSParametrization/interface/PixelRecoUtilities.h" #include "FWCore/Framework/interface/ConsumesCollector.h" #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" -#include "RecoPixelVertexing/PixelTriplets/plugins/ThirdHitCorrection.h" +#include "RecoTracker/PixelSeeding/plugins/ThirdHitCorrection.h" #include "RecoTracker/TkHitPairs/interface/RecHitsSortedInPhi.h" #include "MatchedHitRZCorrectionFromBending.h" diff --git a/RecoPixelVertexing/PixelTriplets/plugins/PixelTripletLargeTipGenerator.h b/RecoTracker/PixelSeeding/plugins/PixelTripletLargeTipGenerator.h similarity index 97% rename from RecoPixelVertexing/PixelTriplets/plugins/PixelTripletLargeTipGenerator.h rename to RecoTracker/PixelSeeding/plugins/PixelTripletLargeTipGenerator.h index 45da0f5fa2eb7..d87898ca4865e 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/PixelTripletLargeTipGenerator.h +++ b/RecoTracker/PixelSeeding/plugins/PixelTripletLargeTipGenerator.h @@ -13,7 +13,7 @@ #include "FWCore/Utilities/interface/ESGetToken.h" #include "Geometry/Records/interface/TrackerTopologyRcd.h" #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" -#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayers.h" +#include "RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayers.h" #include "RecoTracker/Record/interface/TrackerMultipleScatteringRecord.h" #include "RecoTracker/TkMSParametrization/interface/MultipleScatteringParametrisationMaker.h" diff --git a/RecoPixelVertexing/PixelTriplets/plugins/PixelTripletNoTipGenerator.cc b/RecoTracker/PixelSeeding/plugins/PixelTripletNoTipGenerator.cc similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/PixelTripletNoTipGenerator.cc rename to RecoTracker/PixelSeeding/plugins/PixelTripletNoTipGenerator.cc diff --git a/RecoPixelVertexing/PixelTriplets/plugins/PixelTripletNoTipGenerator.h b/RecoTracker/PixelSeeding/plugins/PixelTripletNoTipGenerator.h similarity index 95% rename from RecoPixelVertexing/PixelTriplets/plugins/PixelTripletNoTipGenerator.h rename to RecoTracker/PixelSeeding/plugins/PixelTripletNoTipGenerator.h index 160fabcbb1d19..8538612c67a92 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/PixelTripletNoTipGenerator.h +++ b/RecoTracker/PixelSeeding/plugins/PixelTripletNoTipGenerator.h @@ -3,7 +3,7 @@ #include "FWCore/Framework/interface/FrameworkfwdMostUsed.h" #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" -#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayers.h" +#include "RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayers.h" #include "RecoTracker/Record/interface/TrackerMultipleScatteringRecord.h" #include "RecoTracker/TkMSParametrization/interface/MultipleScatteringParametrisationMaker.h" diff --git a/RecoPixelVertexing/PixelTriplets/plugins/RiemannFitOnGPU.cc b/RecoTracker/PixelSeeding/plugins/RiemannFitOnGPU.cc similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/RiemannFitOnGPU.cc rename to RecoTracker/PixelSeeding/plugins/RiemannFitOnGPU.cc diff --git a/RecoPixelVertexing/PixelTriplets/plugins/RiemannFitOnGPU.cu b/RecoTracker/PixelSeeding/plugins/RiemannFitOnGPU.cu similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/RiemannFitOnGPU.cu rename to RecoTracker/PixelSeeding/plugins/RiemannFitOnGPU.cu diff --git a/RecoPixelVertexing/PixelTriplets/plugins/RiemannFitOnGPU.h b/RecoTracker/PixelSeeding/plugins/RiemannFitOnGPU.h similarity index 99% rename from RecoPixelVertexing/PixelTriplets/plugins/RiemannFitOnGPU.h rename to RecoTracker/PixelSeeding/plugins/RiemannFitOnGPU.h index 96cccf0d0cc0b..d54103a75e6ac 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/RiemannFitOnGPU.h +++ b/RecoTracker/PixelSeeding/plugins/RiemannFitOnGPU.h @@ -11,7 +11,7 @@ #include "HeterogeneousCore/CUDAUtilities/interface/cudaCheck.h" #include "HeterogeneousCore/CUDAUtilities/interface/cuda_assert.h" #include "RecoLocalTracker/SiPixelRecHits/interface/pixelCPEforGPU.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/RiemannFit.h" +#include "RecoTracker/PixelTrackFitting/interface/RiemannFit.h" #include "HelixFitOnGPU.h" diff --git a/RecoPixelVertexing/PixelTriplets/plugins/SealModule.cc b/RecoTracker/PixelSeeding/plugins/SealModule.cc similarity index 82% rename from RecoPixelVertexing/PixelTriplets/plugins/SealModule.cc rename to RecoTracker/PixelSeeding/plugins/SealModule.cc index 150c2d6783391..be627a23d431f 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/SealModule.cc +++ b/RecoTracker/PixelSeeding/plugins/SealModule.cc @@ -1,8 +1,8 @@ #include "FWCore/PluginManager/interface/ModuleDef.h" #include "FWCore/Framework/interface/MakerMacros.h" -#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayers.h" -#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayersFactory.h" +#include "RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayers.h" +#include "RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayersFactory.h" #include "PixelTripletHLTGenerator.h" DEFINE_EDM_PLUGIN(HitTripletGeneratorFromPairAndLayersFactory, PixelTripletHLTGenerator, "PixelTripletHLTGenerator"); @@ -21,7 +21,7 @@ DEFINE_EDM_PLUGIN(HitTripletGeneratorFromPairAndLayersFactory, #include "CombinedHitTripletGenerator.h" DEFINE_EDM_PLUGIN(OrderedHitsGeneratorFactory, CombinedHitTripletGenerator, "StandardHitTripletGenerator"); -#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletEDProducerT.h" +#include "RecoTracker/PixelSeeding/interface/HitTripletEDProducerT.h" using PixelTripletHLTEDProducer = HitTripletEDProducerT; DEFINE_FWK_MODULE(PixelTripletHLTEDProducer); diff --git a/RecoPixelVertexing/PixelTriplets/plugins/ThirdHitCorrection.cc b/RecoTracker/PixelSeeding/plugins/ThirdHitCorrection.cc similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/ThirdHitCorrection.cc rename to RecoTracker/PixelSeeding/plugins/ThirdHitCorrection.cc diff --git a/RecoPixelVertexing/PixelTriplets/plugins/ThirdHitCorrection.h b/RecoTracker/PixelSeeding/plugins/ThirdHitCorrection.h similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/ThirdHitCorrection.h rename to RecoTracker/PixelSeeding/plugins/ThirdHitCorrection.h diff --git a/RecoPixelVertexing/PixelTriplets/plugins/ThirdHitPredictionFromInvLine.cc b/RecoTracker/PixelSeeding/plugins/ThirdHitPredictionFromInvLine.cc similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/ThirdHitPredictionFromInvLine.cc rename to RecoTracker/PixelSeeding/plugins/ThirdHitPredictionFromInvLine.cc diff --git a/RecoPixelVertexing/PixelTriplets/plugins/ThirdHitPredictionFromInvLine.h b/RecoTracker/PixelSeeding/plugins/ThirdHitPredictionFromInvLine.h similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/ThirdHitPredictionFromInvLine.h rename to RecoTracker/PixelSeeding/plugins/ThirdHitPredictionFromInvLine.h diff --git a/RecoPixelVertexing/PixelTriplets/plugins/ThirdHitPredictionFromInvParabola.cc b/RecoTracker/PixelSeeding/plugins/ThirdHitPredictionFromInvParabola.cc similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/ThirdHitPredictionFromInvParabola.cc rename to RecoTracker/PixelSeeding/plugins/ThirdHitPredictionFromInvParabola.cc diff --git a/RecoPixelVertexing/PixelTriplets/plugins/ThirdHitPredictionFromInvParabola.h b/RecoTracker/PixelSeeding/plugins/ThirdHitPredictionFromInvParabola.h similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/ThirdHitPredictionFromInvParabola.h rename to RecoTracker/PixelSeeding/plugins/ThirdHitPredictionFromInvParabola.h diff --git a/RecoPixelVertexing/PixelTriplets/plugins/ThirdHitZPrediction.cc b/RecoTracker/PixelSeeding/plugins/ThirdHitZPrediction.cc similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/ThirdHitZPrediction.cc rename to RecoTracker/PixelSeeding/plugins/ThirdHitZPrediction.cc diff --git a/RecoPixelVertexing/PixelTriplets/plugins/ThirdHitZPrediction.h b/RecoTracker/PixelSeeding/plugins/ThirdHitZPrediction.h similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/ThirdHitZPrediction.h rename to RecoTracker/PixelSeeding/plugins/ThirdHitZPrediction.h diff --git a/RecoPixelVertexing/PixelTriplets/plugins/gpuFishbone.h b/RecoTracker/PixelSeeding/plugins/gpuFishbone.h similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/gpuFishbone.h rename to RecoTracker/PixelSeeding/plugins/gpuFishbone.h diff --git a/RecoPixelVertexing/PixelTriplets/plugins/gpuPixelDoublets.h b/RecoTracker/PixelSeeding/plugins/gpuPixelDoublets.h similarity index 96% rename from RecoPixelVertexing/PixelTriplets/plugins/gpuPixelDoublets.h rename to RecoTracker/PixelSeeding/plugins/gpuPixelDoublets.h index 740b63ac774a5..3d1e587123608 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/gpuPixelDoublets.h +++ b/RecoTracker/PixelSeeding/plugins/gpuPixelDoublets.h @@ -1,7 +1,7 @@ #ifndef RecoPixelVertexing_PixelTriplets_plugins_gpuPixelDoublets_h #define RecoPixelVertexing_PixelTriplets_plugins_gpuPixelDoublets_h -#include "RecoPixelVertexing/PixelTriplets/plugins/gpuPixelDoubletsAlgos.h" +#include "RecoTracker/PixelSeeding/plugins/gpuPixelDoubletsAlgos.h" #define CONSTANT_VAR __constant__ diff --git a/RecoPixelVertexing/PixelTriplets/plugins/gpuPixelDoubletsAlgos.h b/RecoTracker/PixelSeeding/plugins/gpuPixelDoubletsAlgos.h similarity index 100% rename from RecoPixelVertexing/PixelTriplets/plugins/gpuPixelDoubletsAlgos.h rename to RecoTracker/PixelSeeding/plugins/gpuPixelDoubletsAlgos.h diff --git a/RecoPixelVertexing/PixelTriplets/python/PixelTripletHLTGenerator_cfi.py b/RecoTracker/PixelSeeding/python/PixelTripletHLTGenerator_cfi.py similarity index 80% rename from RecoPixelVertexing/PixelTriplets/python/PixelTripletHLTGenerator_cfi.py rename to RecoTracker/PixelSeeding/python/PixelTripletHLTGenerator_cfi.py index 6cae2150b0ed4..b9d66df4eb63f 100644 --- a/RecoPixelVertexing/PixelTriplets/python/PixelTripletHLTGenerator_cfi.py +++ b/RecoTracker/PixelSeeding/python/PixelTripletHLTGenerator_cfi.py @@ -23,8 +23,8 @@ extraHitRZtolerance = 0.020 ) -import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi +import RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi PixelTripletHLTGeneratorWithFilter = PixelTripletHLTGenerator.clone( - SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone() + SeedComparitorPSet = RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone() ) diff --git a/RecoPixelVertexing/PixelTriplets/python/PixelTripletLargeTipGenerator_cfi.py b/RecoTracker/PixelSeeding/python/PixelTripletLargeTipGenerator_cfi.py similarity index 100% rename from RecoPixelVertexing/PixelTriplets/python/PixelTripletLargeTipGenerator_cfi.py rename to RecoTracker/PixelSeeding/python/PixelTripletLargeTipGenerator_cfi.py diff --git a/RecoPixelVertexing/PixelTriplets/python/PixelTripletNoTipGenerator_cfi.py b/RecoTracker/PixelSeeding/python/PixelTripletNoTipGenerator_cfi.py similarity index 100% rename from RecoPixelVertexing/PixelTriplets/python/PixelTripletNoTipGenerator_cfi.py rename to RecoTracker/PixelSeeding/python/PixelTripletNoTipGenerator_cfi.py diff --git a/RecoTracker/PixelSeeding/python/caHitQuadrupletEDProducer_cfi.py b/RecoTracker/PixelSeeding/python/caHitQuadrupletEDProducer_cfi.py new file mode 100644 index 0000000000000..7381b868d1280 --- /dev/null +++ b/RecoTracker/PixelSeeding/python/caHitQuadrupletEDProducer_cfi.py @@ -0,0 +1,4 @@ +import FWCore.ParameterSet.Config as cms +from RecoTracker.PixelSeeding.caHitQuadrupletDefaultEDProducer_cfi import caHitQuadrupletDefaultEDProducer as _caHitQuadrupletDefaultEDProducer + +caHitQuadrupletEDProducer = _caHitQuadrupletDefaultEDProducer.clone() diff --git a/RecoPixelVertexing/PixelTriplets/python/pixelTripletHLTEDProducer_cfi.py b/RecoTracker/PixelSeeding/python/pixelTripletHLTEDProducer_cfi.py similarity index 70% rename from RecoPixelVertexing/PixelTriplets/python/pixelTripletHLTEDProducer_cfi.py rename to RecoTracker/PixelSeeding/python/pixelTripletHLTEDProducer_cfi.py index f38753349beb4..78c1ef6f9d322 100644 --- a/RecoPixelVertexing/PixelTriplets/python/pixelTripletHLTEDProducer_cfi.py +++ b/RecoTracker/PixelSeeding/python/pixelTripletHLTEDProducer_cfi.py @@ -1,4 +1,4 @@ -from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducerDefault_cfi import pixelTripletHLTEDProducerDefault as _pixelTripletHLTEDProducerDefault +from RecoTracker.PixelSeeding.pixelTripletHLTEDProducerDefault_cfi import pixelTripletHLTEDProducerDefault as _pixelTripletHLTEDProducerDefault pixelTripletHLTEDProducer = _pixelTripletHLTEDProducerDefault.clone() from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU diff --git a/RecoPixelVertexing/PixelTriplets/python/pixelTripletLargeTipEDProducer_cfi.py b/RecoTracker/PixelSeeding/python/pixelTripletLargeTipEDProducer_cfi.py similarity index 81% rename from RecoPixelVertexing/PixelTriplets/python/pixelTripletLargeTipEDProducer_cfi.py rename to RecoTracker/PixelSeeding/python/pixelTripletLargeTipEDProducer_cfi.py index 55a164a1398db..bd847b43b358c 100644 --- a/RecoPixelVertexing/PixelTriplets/python/pixelTripletLargeTipEDProducer_cfi.py +++ b/RecoTracker/PixelSeeding/python/pixelTripletLargeTipEDProducer_cfi.py @@ -1,4 +1,4 @@ -from RecoPixelVertexing.PixelTriplets.pixelTripletLargeTipEDProducerDefault_cfi import pixelTripletLargeTipEDProducerDefault as _pixelTripletLargeTipEDProducerDefault +from RecoTracker.PixelSeeding.pixelTripletLargeTipEDProducerDefault_cfi import pixelTripletLargeTipEDProducerDefault as _pixelTripletLargeTipEDProducerDefault pixelTripletLargeTipEDProducer = _pixelTripletLargeTipEDProducerDefault.clone() from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU diff --git a/RecoPixelVertexing/PixelTriplets/src/CACell.h b/RecoTracker/PixelSeeding/src/CACell.h similarity index 99% rename from RecoPixelVertexing/PixelTriplets/src/CACell.h rename to RecoTracker/PixelSeeding/src/CACell.h index 223026812271c..06faa53218b9b 100644 --- a/RecoPixelVertexing/PixelTriplets/src/CACell.h +++ b/RecoTracker/PixelSeeding/src/CACell.h @@ -8,7 +8,7 @@ #include "RecoTracker/TkHitPairs/interface/RecHitsSortedInPhi.h" #include "RecoTracker/TkTrackingRegions/interface/TrackingRegion.h" #include "TrackingTools/TransientTrackingRecHit/interface/SeedingLayerSetsHits.h" -#include "RecoPixelVertexing/PixelTriplets/interface/CACut.h" +#include "RecoTracker/PixelSeeding/interface/CACut.h" class CACellStatus { public: diff --git a/RecoPixelVertexing/PixelTriplets/src/CAHitQuadrupletGenerator.cc b/RecoTracker/PixelSeeding/src/CAHitQuadrupletGenerator.cc similarity index 98% rename from RecoPixelVertexing/PixelTriplets/src/CAHitQuadrupletGenerator.cc rename to RecoTracker/PixelSeeding/src/CAHitQuadrupletGenerator.cc index 74ae6df89d754..b040982b84c56 100644 --- a/RecoPixelVertexing/PixelTriplets/src/CAHitQuadrupletGenerator.cc +++ b/RecoTracker/PixelSeeding/src/CAHitQuadrupletGenerator.cc @@ -6,11 +6,11 @@ #include "FWCore/Framework/interface/Event.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "FWCore/Utilities/interface/isFinite.h" -#include "RecoPixelVertexing/PixelTriplets/interface/CAHitQuadrupletGenerator.h" -#include "RecoPixelVertexing/PixelTriplets/interface/ThirdHitPredictionFromCircle.h" +#include "RecoTracker/PixelSeeding/interface/CAHitQuadrupletGenerator.h" +#include "RecoTracker/PixelSeeding/interface/ThirdHitPredictionFromCircle.h" #include "TrackingTools/DetLayers/interface/BarrelDetLayer.h" -#include "RecoPixelVertexing/PixelTriplets/interface/CAGraph.h" +#include "RecoTracker/PixelSeeding/interface/CAGraph.h" #include "CellularAutomaton.h" namespace { diff --git a/RecoPixelVertexing/PixelTriplets/src/CAHitTripletGenerator.cc b/RecoTracker/PixelSeeding/src/CAHitTripletGenerator.cc similarity index 97% rename from RecoPixelVertexing/PixelTriplets/src/CAHitTripletGenerator.cc rename to RecoTracker/PixelSeeding/src/CAHitTripletGenerator.cc index 8b33b5005e78b..ec3a3ad8cd325 100644 --- a/RecoPixelVertexing/PixelTriplets/src/CAHitTripletGenerator.cc +++ b/RecoTracker/PixelSeeding/src/CAHitTripletGenerator.cc @@ -6,12 +6,12 @@ #include "FWCore/Framework/interface/Event.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "FWCore/Utilities/interface/isFinite.h" -#include "RecoPixelVertexing/PixelTriplets/interface/CAHitTripletGenerator.h" -#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletGenerator.h" -#include "RecoPixelVertexing/PixelTriplets/interface/ThirdHitPredictionFromCircle.h" +#include "RecoTracker/PixelSeeding/interface/CAHitTripletGenerator.h" +#include "RecoTracker/PixelSeeding/interface/HitTripletGenerator.h" +#include "RecoTracker/PixelSeeding/interface/ThirdHitPredictionFromCircle.h" #include "TrackingTools/DetLayers/interface/BarrelDetLayer.h" -#include "RecoPixelVertexing/PixelTriplets/interface/CAGraph.h" +#include "RecoTracker/PixelSeeding/interface/CAGraph.h" #include "CellularAutomaton.h" namespace { diff --git a/RecoPixelVertexing/PixelTriplets/src/CellularAutomaton.cc b/RecoTracker/PixelSeeding/src/CellularAutomaton.cc similarity index 100% rename from RecoPixelVertexing/PixelTriplets/src/CellularAutomaton.cc rename to RecoTracker/PixelSeeding/src/CellularAutomaton.cc diff --git a/RecoPixelVertexing/PixelTriplets/src/CellularAutomaton.h b/RecoTracker/PixelSeeding/src/CellularAutomaton.h similarity index 95% rename from RecoPixelVertexing/PixelTriplets/src/CellularAutomaton.h rename to RecoTracker/PixelSeeding/src/CellularAutomaton.h index ce9731635b54d..64df98a853f56 100644 --- a/RecoPixelVertexing/PixelTriplets/src/CellularAutomaton.h +++ b/RecoTracker/PixelSeeding/src/CellularAutomaton.h @@ -7,7 +7,7 @@ #include "TrackingTools/TransientTrackingRecHit/interface/SeedingLayerSetsHits.h" #include "CACell.h" -#include "RecoPixelVertexing/PixelTriplets/interface/CAGraph.h" +#include "RecoTracker/PixelSeeding/interface/CAGraph.h" class CellularAutomaton { public: diff --git a/RecoPixelVertexing/PixelTriplets/src/CosmicHitTripletGenerator.cc b/RecoTracker/PixelSeeding/src/CosmicHitTripletGenerator.cc similarity index 91% rename from RecoPixelVertexing/PixelTriplets/src/CosmicHitTripletGenerator.cc rename to RecoTracker/PixelSeeding/src/CosmicHitTripletGenerator.cc index b9689d04956e2..5f23e16b176bd 100644 --- a/RecoPixelVertexing/PixelTriplets/src/CosmicHitTripletGenerator.cc +++ b/RecoTracker/PixelSeeding/src/CosmicHitTripletGenerator.cc @@ -1,6 +1,6 @@ -#include "RecoPixelVertexing/PixelTriplets/interface/CosmicLayerTriplets.h" +#include "RecoTracker/PixelSeeding/interface/CosmicLayerTriplets.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "RecoPixelVertexing/PixelTriplets/interface/CosmicHitTripletGenerator.h" +#include "RecoTracker/PixelSeeding/interface/CosmicHitTripletGenerator.h" #include diff --git a/RecoPixelVertexing/PixelTriplets/src/CosmicHitTripletGeneratorFromLayerTriplet.cc b/RecoTracker/PixelSeeding/src/CosmicHitTripletGeneratorFromLayerTriplet.cc similarity index 96% rename from RecoPixelVertexing/PixelTriplets/src/CosmicHitTripletGeneratorFromLayerTriplet.cc rename to RecoTracker/PixelSeeding/src/CosmicHitTripletGeneratorFromLayerTriplet.cc index e6de0ecfb7dc4..4ae7b3541041f 100644 --- a/RecoPixelVertexing/PixelTriplets/src/CosmicHitTripletGeneratorFromLayerTriplet.cc +++ b/RecoTracker/PixelSeeding/src/CosmicHitTripletGeneratorFromLayerTriplet.cc @@ -1,7 +1,7 @@ -#include "RecoPixelVertexing/PixelTriplets/interface/CosmicHitTripletGeneratorFromLayerTriplet.h" +#include "RecoTracker/PixelSeeding/interface/CosmicHitTripletGeneratorFromLayerTriplet.h" #include "RecoTracker/TkTrackingRegions/interface/TrackingRegion.h" #include "TrackingTools/DetLayers/interface/DetLayer.h" -#include "RecoPixelVertexing/PixelTriplets/interface/OrderedHitTriplets.h" +#include "RecoTracker/PixelSeeding/interface/OrderedHitTriplets.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "TrackingTools/DetLayers/interface/BarrelDetLayer.h" diff --git a/RecoPixelVertexing/PixelTriplets/src/CosmicLayerTriplets.cc b/RecoTracker/PixelSeeding/src/CosmicLayerTriplets.cc similarity index 98% rename from RecoPixelVertexing/PixelTriplets/src/CosmicLayerTriplets.cc rename to RecoTracker/PixelSeeding/src/CosmicLayerTriplets.cc index 2799a9fb26d2f..265c6ba72541c 100644 --- a/RecoPixelVertexing/PixelTriplets/src/CosmicLayerTriplets.cc +++ b/RecoTracker/PixelSeeding/src/CosmicLayerTriplets.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTriplets/interface/CosmicLayerTriplets.h" +#include "RecoTracker/PixelSeeding/interface/CosmicLayerTriplets.h" #include "RecoTracker/TkHitPairs/interface/SeedLayerPairs.h" #include "RecoTracker/TkDetLayers/interface/GeometricSearchTracker.h" diff --git a/RecoPixelVertexing/PixelTriplets/src/HitTripletGenerator.cc b/RecoTracker/PixelSeeding/src/HitTripletGenerator.cc similarity index 89% rename from RecoPixelVertexing/PixelTriplets/src/HitTripletGenerator.cc rename to RecoTracker/PixelSeeding/src/HitTripletGenerator.cc index 8aa39c41f16fe..8a10da51def45 100644 --- a/RecoPixelVertexing/PixelTriplets/src/HitTripletGenerator.cc +++ b/RecoTracker/PixelSeeding/src/HitTripletGenerator.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletGenerator.h" +#include "RecoTracker/PixelSeeding/interface/HitTripletGenerator.h" HitTripletGenerator::HitTripletGenerator(unsigned int nSize) : localRA(nSize) {} diff --git a/RecoPixelVertexing/PixelTriplets/src/HitTripletGeneratorFromPairAndLayers.cc b/RecoTracker/PixelSeeding/src/HitTripletGeneratorFromPairAndLayers.cc similarity index 91% rename from RecoPixelVertexing/PixelTriplets/src/HitTripletGeneratorFromPairAndLayers.cc rename to RecoTracker/PixelSeeding/src/HitTripletGeneratorFromPairAndLayers.cc index 6246043a7df54..4103c563d9446 100644 --- a/RecoPixelVertexing/PixelTriplets/src/HitTripletGeneratorFromPairAndLayers.cc +++ b/RecoTracker/PixelSeeding/src/HitTripletGeneratorFromPairAndLayers.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayers.h" +#include "RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayers.h" #include "RecoTracker/TkHitPairs/interface/HitPairGeneratorFromLayerPair.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" diff --git a/RecoPixelVertexing/PixelTriplets/src/HitTripletGeneratorFromPairAndLayersFactory.cc b/RecoTracker/PixelSeeding/src/HitTripletGeneratorFromPairAndLayersFactory.cc similarity index 64% rename from RecoPixelVertexing/PixelTriplets/src/HitTripletGeneratorFromPairAndLayersFactory.cc rename to RecoTracker/PixelSeeding/src/HitTripletGeneratorFromPairAndLayersFactory.cc index a17f6938daa8b..2aa12f169801e 100644 --- a/RecoPixelVertexing/PixelTriplets/src/HitTripletGeneratorFromPairAndLayersFactory.cc +++ b/RecoTracker/PixelSeeding/src/HitTripletGeneratorFromPairAndLayersFactory.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayersFactory.h" +#include "RecoTracker/PixelSeeding/interface/HitTripletGeneratorFromPairAndLayersFactory.h" #include "FWCore/PluginManager/interface/PluginFactory.h" diff --git a/RecoPixelVertexing/PixelTriplets/src/IntermediateHitTriplets.cc b/RecoTracker/PixelSeeding/src/IntermediateHitTriplets.cc similarity index 82% rename from RecoPixelVertexing/PixelTriplets/src/IntermediateHitTriplets.cc rename to RecoTracker/PixelSeeding/src/IntermediateHitTriplets.cc index 47a397565547b..b6bc54b2d60c7 100644 --- a/RecoPixelVertexing/PixelTriplets/src/IntermediateHitTriplets.cc +++ b/RecoTracker/PixelSeeding/src/IntermediateHitTriplets.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTriplets/interface/IntermediateHitTriplets.h" +#include "RecoTracker/PixelSeeding/interface/IntermediateHitTriplets.h" #include "FWCore/Utilities/interface/Exception.h" IntermediateHitTriplets::IntermediateHitTriplets(const IntermediateHitTriplets& rh) { diff --git a/RecoPixelVertexing/PixelTriplets/src/LayerTriplets.cc b/RecoTracker/PixelSeeding/src/LayerTriplets.cc similarity index 93% rename from RecoPixelVertexing/PixelTriplets/src/LayerTriplets.cc rename to RecoTracker/PixelSeeding/src/LayerTriplets.cc index 964a174728a21..ec8a462594836 100644 --- a/RecoPixelVertexing/PixelTriplets/src/LayerTriplets.cc +++ b/RecoTracker/PixelSeeding/src/LayerTriplets.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTriplets/interface/LayerTriplets.h" +#include "RecoTracker/PixelSeeding/interface/LayerTriplets.h" namespace LayerTriplets { std::vector layers(const SeedingLayerSetsHits& sets) { diff --git a/RecoPixelVertexing/PixelTriplets/src/ThirdHitPredictionFromCircle.cc b/RecoTracker/PixelSeeding/src/ThirdHitPredictionFromCircle.cc similarity index 99% rename from RecoPixelVertexing/PixelTriplets/src/ThirdHitPredictionFromCircle.cc rename to RecoTracker/PixelSeeding/src/ThirdHitPredictionFromCircle.cc index 69288cddb7978..cba2f489c0cf5 100644 --- a/RecoPixelVertexing/PixelTriplets/src/ThirdHitPredictionFromCircle.cc +++ b/RecoTracker/PixelSeeding/src/ThirdHitPredictionFromCircle.cc @@ -5,7 +5,7 @@ #include "RecoTracker/TkMSParametrization/interface/PixelRecoUtilities.h" #include "RecoTracker/TkMSParametrization/interface/PixelRecoRange.h" -#include "RecoPixelVertexing/PixelTriplets/interface/ThirdHitPredictionFromCircle.h" +#include "RecoTracker/PixelSeeding/interface/ThirdHitPredictionFromCircle.h" #include "FWCore/Utilities/interface/Likely.h" #include diff --git a/RecoPixelVertexing/PixelTriplets/src/ThirdHitRZPredictionBase.cc b/RecoTracker/PixelSeeding/src/ThirdHitRZPredictionBase.cc similarity index 95% rename from RecoPixelVertexing/PixelTriplets/src/ThirdHitRZPredictionBase.cc rename to RecoTracker/PixelSeeding/src/ThirdHitRZPredictionBase.cc index 4bacb0bf1e43c..7bb3e301d02fa 100644 --- a/RecoPixelVertexing/PixelTriplets/src/ThirdHitRZPredictionBase.cc +++ b/RecoTracker/PixelSeeding/src/ThirdHitRZPredictionBase.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTriplets/interface/ThirdHitRZPredictionBase.h" +#include "RecoTracker/PixelSeeding/interface/ThirdHitRZPredictionBase.h" #include "DataFormats/GeometryVector/interface/GlobalPoint.h" #include "TrackingTools/DetLayers/interface/BarrelDetLayer.h" #include "TrackingTools/DetLayers/interface/ForwardDetLayer.h" diff --git a/RecoPixelVertexing/PixelTriplets/src/TripletHLTGenerator.h b/RecoTracker/PixelSeeding/src/TripletHLTGenerator.h similarity index 100% rename from RecoPixelVertexing/PixelTriplets/src/TripletHLTGenerator.h rename to RecoTracker/PixelSeeding/src/TripletHLTGenerator.h diff --git a/RecoPixelVertexing/PixelTriplets/src/classes.h b/RecoTracker/PixelSeeding/src/classes.h similarity index 77% rename from RecoPixelVertexing/PixelTriplets/src/classes.h rename to RecoTracker/PixelSeeding/src/classes.h index 4f495027ac186..d226b030ec98f 100644 --- a/RecoPixelVertexing/PixelTriplets/src/classes.h +++ b/RecoTracker/PixelSeeding/src/classes.h @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTriplets/interface/IntermediateHitTriplets.h" +#include "RecoTracker/PixelSeeding/interface/IntermediateHitTriplets.h" #include "DataFormats/Common/interface/Wrapper.h" #include diff --git a/RecoPixelVertexing/PixelTriplets/src/classes_def.xml b/RecoTracker/PixelSeeding/src/classes_def.xml similarity index 100% rename from RecoPixelVertexing/PixelTriplets/src/classes_def.xml rename to RecoTracker/PixelSeeding/src/classes_def.xml diff --git a/RecoPixelVertexing/PixelTriplets/test/BuildFile.xml b/RecoTracker/PixelSeeding/test/BuildFile.xml similarity index 79% rename from RecoPixelVertexing/PixelTriplets/test/BuildFile.xml rename to RecoTracker/PixelSeeding/test/BuildFile.xml index 522b186f3351b..37e12c0ec6aed 100644 --- a/RecoPixelVertexing/PixelTriplets/test/BuildFile.xml +++ b/RecoTracker/PixelSeeding/test/BuildFile.xml @@ -5,16 +5,16 @@ - + - + - + diff --git a/RecoPixelVertexing/PixelTriplets/test/CAsizes_t.cpp b/RecoTracker/PixelSeeding/test/CAsizes_t.cpp similarity index 93% rename from RecoPixelVertexing/PixelTriplets/test/CAsizes_t.cpp rename to RecoTracker/PixelSeeding/test/CAsizes_t.cpp index 3c6be161a346f..97eae610c8670 100644 --- a/RecoPixelVertexing/PixelTriplets/test/CAsizes_t.cpp +++ b/RecoTracker/PixelSeeding/test/CAsizes_t.cpp @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTriplets/plugins/GPUCACell.h" +#include "RecoTracker/PixelSeeding/plugins/GPUCACell.h" #include "Geometry/CommonTopologies/interface/SimplePixelTopology.h" #include #include diff --git a/RecoPixelVertexing/PixelTriplets/test/CircleEq_t.cpp b/RecoTracker/PixelSeeding/test/CircleEq_t.cpp similarity index 97% rename from RecoPixelVertexing/PixelTriplets/test/CircleEq_t.cpp rename to RecoTracker/PixelSeeding/test/CircleEq_t.cpp index 504f9c144b284..569bc2971fdec 100644 --- a/RecoPixelVertexing/PixelTriplets/test/CircleEq_t.cpp +++ b/RecoTracker/PixelSeeding/test/CircleEq_t.cpp @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTriplets/interface/CircleEq.h" +#include "RecoTracker/PixelSeeding/interface/CircleEq.h" #include struct OriCircle { diff --git a/RecoPixelVertexing/PixelTriplets/test/HitTripletProducer.cc b/RecoTracker/PixelSeeding/test/HitTripletProducer.cc similarity index 100% rename from RecoPixelVertexing/PixelTriplets/test/HitTripletProducer.cc rename to RecoTracker/PixelSeeding/test/HitTripletProducer.cc diff --git a/RecoPixelVertexing/PixelTriplets/test/PixelTriplets_InvPrbl_prec.cpp b/RecoTracker/PixelSeeding/test/PixelTriplets_InvPrbl_prec.cpp similarity index 94% rename from RecoPixelVertexing/PixelTriplets/test/PixelTriplets_InvPrbl_prec.cpp rename to RecoTracker/PixelSeeding/test/PixelTriplets_InvPrbl_prec.cpp index ee7edba8619ca..062ec29f0080a 100644 --- a/RecoPixelVertexing/PixelTriplets/test/PixelTriplets_InvPrbl_prec.cpp +++ b/RecoTracker/PixelSeeding/test/PixelTriplets_InvPrbl_prec.cpp @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTriplets/plugins/ThirdHitPredictionFromInvParabola.cc" +#include "RecoTracker/PixelSeeding/plugins/ThirdHitPredictionFromInvParabola.cc" #include #include diff --git a/RecoPixelVertexing/PixelTriplets/test/PixelTriplets_InvPrbl_t.cpp b/RecoTracker/PixelSeeding/test/PixelTriplets_InvPrbl_t.cpp similarity index 98% rename from RecoPixelVertexing/PixelTriplets/test/PixelTriplets_InvPrbl_t.cpp rename to RecoTracker/PixelSeeding/test/PixelTriplets_InvPrbl_t.cpp index e11f5bb408aec..5044e0c6080bd 100644 --- a/RecoPixelVertexing/PixelTriplets/test/PixelTriplets_InvPrbl_t.cpp +++ b/RecoTracker/PixelSeeding/test/PixelTriplets_InvPrbl_t.cpp @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTriplets/plugins/ThirdHitPredictionFromInvParabola.cc" +#include "RecoTracker/PixelSeeding/plugins/ThirdHitPredictionFromInvParabola.cc" #include #include "DataFormats/GeometryVector/interface/GlobalVector.h" diff --git a/RecoPixelVertexing/PixelTriplets/test/fastDPHI_t.cpp b/RecoTracker/PixelSeeding/test/fastDPHI_t.cpp similarity index 100% rename from RecoPixelVertexing/PixelTriplets/test/fastDPHI_t.cpp rename to RecoTracker/PixelSeeding/test/fastDPHI_t.cpp diff --git a/RecoPixelVertexing/PixelTriplets/test/trip_cfg.py b/RecoTracker/PixelSeeding/test/trip_cfg.py similarity index 100% rename from RecoPixelVertexing/PixelTriplets/test/trip_cfg.py rename to RecoTracker/PixelSeeding/test/trip_cfg.py diff --git a/RecoPixelVertexing/PixelTrackFitting/BuildFile.xml b/RecoTracker/PixelTrackFitting/BuildFile.xml similarity index 100% rename from RecoPixelVertexing/PixelTrackFitting/BuildFile.xml rename to RecoTracker/PixelTrackFitting/BuildFile.xml diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/BrokenLine.h b/RecoTracker/PixelTrackFitting/interface/BrokenLine.h similarity index 99% rename from RecoPixelVertexing/PixelTrackFitting/interface/BrokenLine.h rename to RecoTracker/PixelTrackFitting/interface/BrokenLine.h index fbcac4c07836f..ef898be6c8db9 100644 --- a/RecoPixelVertexing/PixelTrackFitting/interface/BrokenLine.h +++ b/RecoTracker/PixelTrackFitting/interface/BrokenLine.h @@ -3,7 +3,7 @@ #include -#include "RecoPixelVertexing/PixelTrackFitting/interface/FitUtils.h" +#include "RecoTracker/PixelTrackFitting/interface/FitUtils.h" namespace brokenline { diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/CircleFromThreePoints.h b/RecoTracker/PixelTrackFitting/interface/CircleFromThreePoints.h similarity index 100% rename from RecoPixelVertexing/PixelTrackFitting/interface/CircleFromThreePoints.h rename to RecoTracker/PixelTrackFitting/interface/CircleFromThreePoints.h diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/FitResult.h b/RecoTracker/PixelTrackFitting/interface/FitResult.h similarity index 100% rename from RecoPixelVertexing/PixelTrackFitting/interface/FitResult.h rename to RecoTracker/PixelTrackFitting/interface/FitResult.h diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/FitUtils.h b/RecoTracker/PixelTrackFitting/interface/FitUtils.h similarity index 99% rename from RecoPixelVertexing/PixelTrackFitting/interface/FitUtils.h rename to RecoTracker/PixelTrackFitting/interface/FitUtils.h index 2fe74f53a7bd2..a1cb2d1c7eac1 100644 --- a/RecoPixelVertexing/PixelTrackFitting/interface/FitUtils.h +++ b/RecoTracker/PixelTrackFitting/interface/FitUtils.h @@ -3,7 +3,7 @@ #include "DataFormats/Math/interface/choleskyInversion.h" #include "HeterogeneousCore/CUDAUtilities/interface/cuda_assert.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/FitResult.h" +#include "RecoTracker/PixelTrackFitting/interface/FitResult.h" namespace riemannFit { diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/KFBasedPixelFitter.h b/RecoTracker/PixelTrackFitting/interface/KFBasedPixelFitter.h similarity index 97% rename from RecoPixelVertexing/PixelTrackFitting/interface/KFBasedPixelFitter.h rename to RecoTracker/PixelTrackFitting/interface/KFBasedPixelFitter.h index 2f64047386149..c630d399326bc 100644 --- a/RecoPixelVertexing/PixelTrackFitting/interface/KFBasedPixelFitter.h +++ b/RecoTracker/PixelTrackFitting/interface/KFBasedPixelFitter.h @@ -1,7 +1,7 @@ #ifndef KFBasedPixelFitter_H #define KFBasedPixelFitter_H -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterBase.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelFitterBase.h" #include "Geometry/CommonDetUnit/interface/GeomDet.h" #include "TrackingTools/TransientTrackingRecHit/interface/TValidTrackingRecHit.h" diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/PixelFitter.h b/RecoTracker/PixelTrackFitting/interface/PixelFitter.h similarity index 88% rename from RecoPixelVertexing/PixelTrackFitting/interface/PixelFitter.h rename to RecoTracker/PixelTrackFitting/interface/PixelFitter.h index dfc6b5cc19140..fb30232fb465c 100644 --- a/RecoPixelVertexing/PixelTrackFitting/interface/PixelFitter.h +++ b/RecoTracker/PixelTrackFitting/interface/PixelFitter.h @@ -1,7 +1,7 @@ #ifndef RecoPixelVertexing_PixelTrackFitting_PixelFitter_H #define RecoPixelVertexing_PixelTrackFitting_PixelFitter_H -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterBase.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelFitterBase.h" #include diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterBase.h b/RecoTracker/PixelTrackFitting/interface/PixelFitterBase.h similarity index 100% rename from RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterBase.h rename to RecoTracker/PixelTrackFitting/interface/PixelFitterBase.h diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterByConformalMappingAndLine.h b/RecoTracker/PixelTrackFitting/interface/PixelFitterByConformalMappingAndLine.h similarity index 94% rename from RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterByConformalMappingAndLine.h rename to RecoTracker/PixelTrackFitting/interface/PixelFitterByConformalMappingAndLine.h index 4e2e94398203c..75b1890686d8e 100644 --- a/RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterByConformalMappingAndLine.h +++ b/RecoTracker/PixelTrackFitting/interface/PixelFitterByConformalMappingAndLine.h @@ -1,7 +1,7 @@ #ifndef PixelFitterByConformalMappingAndLine_H #define PixelFitterByConformalMappingAndLine_H -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterBase.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelFitterBase.h" #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h" #include "RecoTracker/TkTrackingRegions/interface/TrackingRegion.h" #include "DataFormats/TrackReco/interface/Track.h" diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterByHelixProjections.h b/RecoTracker/PixelTrackFitting/interface/PixelFitterByHelixProjections.h similarity index 93% rename from RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterByHelixProjections.h rename to RecoTracker/PixelTrackFitting/interface/PixelFitterByHelixProjections.h index ab84d268f036f..7f202647dc22a 100644 --- a/RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterByHelixProjections.h +++ b/RecoTracker/PixelTrackFitting/interface/PixelFitterByHelixProjections.h @@ -1,7 +1,7 @@ #ifndef PixelFitterByHelixProjections_H #define PixelFitterByHelixProjections_H -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterBase.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelFitterBase.h" #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h" #include "RecoTracker/TkTrackingRegions/interface/TrackingRegion.h" #include "DataFormats/TrackReco/interface/Track.h" diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/PixelNtupletsFitter.h b/RecoTracker/PixelTrackFitting/interface/PixelNtupletsFitter.h similarity index 92% rename from RecoPixelVertexing/PixelTrackFitting/interface/PixelNtupletsFitter.h rename to RecoTracker/PixelTrackFitting/interface/PixelNtupletsFitter.h index 28d83745bfc2e..ce1b7b5894779 100644 --- a/RecoPixelVertexing/PixelTrackFitting/interface/PixelNtupletsFitter.h +++ b/RecoTracker/PixelTrackFitting/interface/PixelNtupletsFitter.h @@ -6,7 +6,7 @@ #include "DataFormats/TrackReco/interface/Track.h" #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterBase.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelFitterBase.h" #include "RecoTracker/TkTrackingRegions/interface/TrackingRegion.h" class PixelNtupletsFitter final : public PixelFitterBase { diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackBuilder.h b/RecoTracker/PixelTrackFitting/interface/PixelTrackBuilder.h similarity index 100% rename from RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackBuilder.h rename to RecoTracker/PixelTrackFitting/interface/PixelTrackBuilder.h diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackCleaner.h b/RecoTracker/PixelTrackFitting/interface/PixelTrackCleaner.h similarity index 92% rename from RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackCleaner.h rename to RecoTracker/PixelTrackFitting/interface/PixelTrackCleaner.h index 3bb8dbe968d88..867a31e3e48b4 100644 --- a/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackCleaner.h +++ b/RecoTracker/PixelTrackFitting/interface/PixelTrackCleaner.h @@ -8,7 +8,7 @@ Discards reconstructed tracks that reflects one real track. #include "TrackingTools/TrajectoryFiltering/interface/TrajectoryFilter.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/TracksWithHits.h" +#include "RecoTracker/PixelTrackFitting/interface/TracksWithHits.h" #include class PixelTrackCleaner { diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackCleanerBySharedHits.h b/RecoTracker/PixelTrackFitting/interface/PixelTrackCleanerBySharedHits.h similarity index 84% rename from RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackCleanerBySharedHits.h rename to RecoTracker/PixelTrackFitting/interface/PixelTrackCleanerBySharedHits.h index 17672ac397fe6..ce0d2ae9cb83c 100644 --- a/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackCleanerBySharedHits.h +++ b/RecoTracker/PixelTrackFitting/interface/PixelTrackCleanerBySharedHits.h @@ -5,8 +5,8 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "DataFormats/TrackReco/interface/TrackFwd.h" #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/TracksWithHits.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackCleaner.h" +#include "RecoTracker/PixelTrackFitting/interface/TracksWithHits.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackCleaner.h" #include #include diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackCleanerWrapper.h b/RecoTracker/PixelTrackFitting/interface/PixelTrackCleanerWrapper.h similarity index 92% rename from RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackCleanerWrapper.h rename to RecoTracker/PixelTrackFitting/interface/PixelTrackCleanerWrapper.h index 3f0aa83558e5f..b4ae5102316c2 100644 --- a/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackCleanerWrapper.h +++ b/RecoTracker/PixelTrackFitting/interface/PixelTrackCleanerWrapper.h @@ -1,8 +1,8 @@ #ifndef RecoPixelVertexing_PixelTrackFitting_PixelTrackCleanerWrapper_H #define RecoPixelVertexing_PixelTrackFitting_PixelTrackCleanerWrapper_H -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackCleaner.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/TracksWithHits.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackCleaner.h" +#include "RecoTracker/PixelTrackFitting/interface/TracksWithHits.h" #include "DataFormats/TrackerCommon/interface/TrackerTopology.h" #include diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackErrorParam.h b/RecoTracker/PixelTrackFitting/interface/PixelTrackErrorParam.h similarity index 100% rename from RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackErrorParam.h rename to RecoTracker/PixelTrackFitting/interface/PixelTrackErrorParam.h diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilter.h b/RecoTracker/PixelTrackFitting/interface/PixelTrackFilter.h similarity index 87% rename from RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilter.h rename to RecoTracker/PixelTrackFitting/interface/PixelTrackFilter.h index 936446c360d13..741233cc6bc81 100644 --- a/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilter.h +++ b/RecoTracker/PixelTrackFitting/interface/PixelTrackFilter.h @@ -1,7 +1,7 @@ #ifndef RecoPixelVertexing_PixelTrackFitting_PixelTrackFilter_H #define RecoPixelVertexing_PixelTrackFitting_PixelTrackFilter_H -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilterBase.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackFilterBase.h" #include diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilterBase.h b/RecoTracker/PixelTrackFitting/interface/PixelTrackFilterBase.h similarity index 100% rename from RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilterBase.h rename to RecoTracker/PixelTrackFitting/interface/PixelTrackFilterBase.h diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilterByKinematics.h b/RecoTracker/PixelTrackFitting/interface/PixelTrackFilterByKinematics.h similarity index 90% rename from RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilterByKinematics.h rename to RecoTracker/PixelTrackFitting/interface/PixelTrackFilterByKinematics.h index 8a2b7c4324ec8..fd8f54b729766 100644 --- a/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilterByKinematics.h +++ b/RecoTracker/PixelTrackFitting/interface/PixelTrackFilterByKinematics.h @@ -1,7 +1,7 @@ #ifndef PixelTrackFitting_PixelTrackFilterByKinematics_H #define PixelTrackFitting_PixelTrackFilterByKinematics_H -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilterBase.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackFilterBase.h" namespace edm { class ParameterSet; diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackReconstruction.h b/RecoTracker/PixelTrackFitting/interface/PixelTrackReconstruction.h similarity index 87% rename from RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackReconstruction.h rename to RecoTracker/PixelTrackFitting/interface/PixelTrackReconstruction.h index 427e118a86491..ca56ed34bf2c9 100644 --- a/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackReconstruction.h +++ b/RecoTracker/PixelTrackFitting/interface/PixelTrackReconstruction.h @@ -4,8 +4,8 @@ #include "FWCore/Framework/interface/ConsumesCollector.h" #include "FWCore/Framework/interface/FrameworkfwdMostUsed.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/TracksWithHits.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackCleaner.h" +#include "RecoTracker/PixelTrackFitting/interface/TracksWithHits.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackCleaner.h" #include "FWCore/Utilities/interface/EDGetToken.h" diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/RZLine.h b/RecoTracker/PixelTrackFitting/interface/RZLine.h similarity index 100% rename from RecoPixelVertexing/PixelTrackFitting/interface/RZLine.h rename to RecoTracker/PixelTrackFitting/interface/RZLine.h diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/RiemannFit.h b/RecoTracker/PixelTrackFitting/interface/RiemannFit.h similarity index 99% rename from RecoPixelVertexing/PixelTrackFitting/interface/RiemannFit.h rename to RecoTracker/PixelTrackFitting/interface/RiemannFit.h index 7e411e6110179..22fb4e6ffa824 100644 --- a/RecoPixelVertexing/PixelTrackFitting/interface/RiemannFit.h +++ b/RecoTracker/PixelTrackFitting/interface/RiemannFit.h @@ -1,7 +1,7 @@ #ifndef RecoPixelVertexing_PixelTrackFitting_interface_RiemannFit_h #define RecoPixelVertexing_PixelTrackFitting_interface_RiemannFit_h -#include "RecoPixelVertexing/PixelTrackFitting/interface/FitUtils.h" +#include "RecoTracker/PixelTrackFitting/interface/FitUtils.h" namespace riemannFit { diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/TracksWithHits.h b/RecoTracker/PixelTrackFitting/interface/TracksWithHits.h similarity index 100% rename from RecoPixelVertexing/PixelTrackFitting/interface/TracksWithHits.h rename to RecoTracker/PixelTrackFitting/interface/TracksWithHits.h diff --git a/RecoPixelVertexing/PixelTrackFitting/plugins/BuildFile.xml b/RecoTracker/PixelTrackFitting/plugins/BuildFile.xml similarity index 82% rename from RecoPixelVertexing/PixelTrackFitting/plugins/BuildFile.xml rename to RecoTracker/PixelTrackFitting/plugins/BuildFile.xml index 3534d5537078a..d28dad5793a66 100644 --- a/RecoPixelVertexing/PixelTrackFitting/plugins/BuildFile.xml +++ b/RecoTracker/PixelTrackFitting/plugins/BuildFile.xml @@ -2,7 +2,7 @@ - + diff --git a/RecoPixelVertexing/PixelTrackFitting/plugins/KFBasedPixelFitterProducer.cc b/RecoTracker/PixelTrackFitting/plugins/KFBasedPixelFitterProducer.cc similarity index 96% rename from RecoPixelVertexing/PixelTrackFitting/plugins/KFBasedPixelFitterProducer.cc rename to RecoTracker/PixelTrackFitting/plugins/KFBasedPixelFitterProducer.cc index 483708cefc5cd..d04ae70a852fd 100644 --- a/RecoPixelVertexing/PixelTrackFitting/plugins/KFBasedPixelFitterProducer.cc +++ b/RecoTracker/PixelTrackFitting/plugins/KFBasedPixelFitterProducer.cc @@ -9,8 +9,8 @@ #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitter.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/KFBasedPixelFitter.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelFitter.h" +#include "RecoTracker/PixelTrackFitting/interface/KFBasedPixelFitter.h" #include "DataFormats/BeamSpot/interface/BeamSpot.h" #include "TrackingTools/Records/interface/TransientRecHitRecord.h" diff --git a/RecoPixelVertexing/PixelTrackFitting/plugins/PixelFitterByConformalMappingAndLineProducer.cc b/RecoTracker/PixelTrackFitting/plugins/PixelFitterByConformalMappingAndLineProducer.cc similarity index 95% rename from RecoPixelVertexing/PixelTrackFitting/plugins/PixelFitterByConformalMappingAndLineProducer.cc rename to RecoTracker/PixelTrackFitting/plugins/PixelFitterByConformalMappingAndLineProducer.cc index ad9f319a71742..0eef6ba92058b 100644 --- a/RecoPixelVertexing/PixelTrackFitting/plugins/PixelFitterByConformalMappingAndLineProducer.cc +++ b/RecoTracker/PixelTrackFitting/plugins/PixelFitterByConformalMappingAndLineProducer.cc @@ -9,8 +9,8 @@ #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitter.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterByConformalMappingAndLine.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelFitter.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelFitterByConformalMappingAndLine.h" #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h" #include "TrackingTools/Records/interface/TransientRecHitRecord.h" diff --git a/RecoPixelVertexing/PixelTrackFitting/plugins/PixelFitterByHelixProjectionsProducer.cc b/RecoTracker/PixelTrackFitting/plugins/PixelFitterByHelixProjectionsProducer.cc similarity index 93% rename from RecoPixelVertexing/PixelTrackFitting/plugins/PixelFitterByHelixProjectionsProducer.cc rename to RecoTracker/PixelTrackFitting/plugins/PixelFitterByHelixProjectionsProducer.cc index 1755f911f4207..f17e09c92ec51 100644 --- a/RecoPixelVertexing/PixelTrackFitting/plugins/PixelFitterByHelixProjectionsProducer.cc +++ b/RecoTracker/PixelTrackFitting/plugins/PixelFitterByHelixProjectionsProducer.cc @@ -9,8 +9,8 @@ #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitter.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterByHelixProjections.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelFitter.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelFitterByHelixProjections.h" #include "MagneticField/Engine/interface/MagneticField.h" #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" diff --git a/RecoPixelVertexing/PixelTrackFitting/plugins/PixelNtupletsFitterProducer.cc b/RecoTracker/PixelTrackFitting/plugins/PixelNtupletsFitterProducer.cc similarity index 92% rename from RecoPixelVertexing/PixelTrackFitting/plugins/PixelNtupletsFitterProducer.cc rename to RecoTracker/PixelTrackFitting/plugins/PixelNtupletsFitterProducer.cc index f8483e1efd755..433fa8dff0eac 100644 --- a/RecoPixelVertexing/PixelTrackFitting/plugins/PixelNtupletsFitterProducer.cc +++ b/RecoTracker/PixelTrackFitting/plugins/PixelNtupletsFitterProducer.cc @@ -8,8 +8,8 @@ #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "MagneticField/Engine/interface/MagneticField.h" #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitter.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelNtupletsFitter.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelFitter.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelNtupletsFitter.h" #include "RecoTracker/TkMSParametrization/interface/PixelRecoUtilities.h" class PixelNtupletsFitterProducer : public edm::global::EDProducer<> { diff --git a/RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackCleanerBySharedHitsESProducer.cc b/RecoTracker/PixelTrackFitting/plugins/PixelTrackCleanerBySharedHitsESProducer.cc similarity index 94% rename from RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackCleanerBySharedHitsESProducer.cc rename to RecoTracker/PixelTrackFitting/plugins/PixelTrackCleanerBySharedHitsESProducer.cc index eb5bca5e98e7b..c9da060df918e 100644 --- a/RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackCleanerBySharedHitsESProducer.cc +++ b/RecoTracker/PixelTrackFitting/plugins/PixelTrackCleanerBySharedHitsESProducer.cc @@ -2,7 +2,7 @@ #include "FWCore/Framework/interface/ModuleFactory.h" #include "FWCore/Framework/interface/ESProducer.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackCleanerBySharedHits.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackCleanerBySharedHits.h" class PixelTrackCleanerBySharedHitsESProducer : public edm::ESProducer { public: diff --git a/RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackDumpCUDA.cc b/RecoTracker/PixelTrackFitting/plugins/PixelTrackDumpCUDA.cc similarity index 100% rename from RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackDumpCUDA.cc rename to RecoTracker/PixelTrackFitting/plugins/PixelTrackDumpCUDA.cc diff --git a/RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackFilterByKinematicsProducer.cc b/RecoTracker/PixelTrackFitting/plugins/PixelTrackFilterByKinematicsProducer.cc similarity index 93% rename from RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackFilterByKinematicsProducer.cc rename to RecoTracker/PixelTrackFitting/plugins/PixelTrackFilterByKinematicsProducer.cc index 4b9e9cbf8510e..6c5a83949b6c9 100644 --- a/RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackFilterByKinematicsProducer.cc +++ b/RecoTracker/PixelTrackFitting/plugins/PixelTrackFilterByKinematicsProducer.cc @@ -8,8 +8,8 @@ #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilter.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilterByKinematics.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackFilter.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackFilterByKinematics.h" class PixelTrackFilterByKinematicsProducer : public edm::global::EDProducer<> { public: diff --git a/RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackProducer.cc b/RecoTracker/PixelTrackFitting/plugins/PixelTrackProducer.cc similarity index 96% rename from RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackProducer.cc rename to RecoTracker/PixelTrackFitting/plugins/PixelTrackProducer.cc index 79f45a6ad3d79..880dcc784380c 100644 --- a/RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackProducer.cc +++ b/RecoTracker/PixelTrackFitting/plugins/PixelTrackProducer.cc @@ -15,7 +15,7 @@ #include "Geometry/Records/interface/TrackerTopologyRcd.h" #include "FWCore/Framework/interface/stream/EDProducer.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackReconstruction.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackReconstruction.h" #include "Geometry/Records/interface/TrackerTopologyRcd.h" #include "storeTracks.h" diff --git a/RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackProducerFromSoA.cc b/RecoTracker/PixelTrackFitting/plugins/PixelTrackProducerFromSoA.cc similarity index 99% rename from RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackProducerFromSoA.cc rename to RecoTracker/PixelTrackFitting/plugins/PixelTrackProducerFromSoA.cc index f5f006454125b..f82c4bac74c73 100644 --- a/RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackProducerFromSoA.cc +++ b/RecoTracker/PixelTrackFitting/plugins/PixelTrackProducerFromSoA.cc @@ -24,7 +24,7 @@ #include "TrackingTools/AnalyticalJacobians/interface/JacobianLocalToCurvilinear.h" #include "TrackingTools/TrajectoryParametrization/interface/GlobalTrajectoryParameters.h" #include "TrackingTools/TrajectoryParametrization/interface/CurvilinearTrajectoryError.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/FitUtils.h" +#include "RecoTracker/PixelTrackFitting/interface/FitUtils.h" #include "CUDADataFormats/Common/interface/HostProduct.h" #include "CUDADataFormats/SiPixelCluster/interface/gpuClusteringConstants.h" diff --git a/RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackSoAFromCUDA.cc b/RecoTracker/PixelTrackFitting/plugins/PixelTrackSoAFromCUDA.cc similarity index 100% rename from RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackSoAFromCUDA.cc rename to RecoTracker/PixelTrackFitting/plugins/PixelTrackSoAFromCUDA.cc diff --git a/RecoPixelVertexing/PixelTrackFitting/plugins/storeTracks.h b/RecoTracker/PixelTrackFitting/plugins/storeTracks.h similarity index 97% rename from RecoPixelVertexing/PixelTrackFitting/plugins/storeTracks.h rename to RecoTracker/PixelTrackFitting/plugins/storeTracks.h index 25635cb2a6f38..964a946010f98 100644 --- a/RecoPixelVertexing/PixelTrackFitting/plugins/storeTracks.h +++ b/RecoTracker/PixelTrackFitting/plugins/storeTracks.h @@ -10,7 +10,7 @@ #include "DataFormats/TrackReco/interface/TrackFwd.h" #include "DataFormats/TrackReco/interface/TrackExtra.h" #include "DataFormats/Common/interface/OrphanHandle.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/TracksWithHits.h" +#include "RecoTracker/PixelTrackFitting/interface/TracksWithHits.h" #include "DataFormats/TrackerCommon/interface/TrackerTopology.h" #include "Geometry/Records/interface/TrackerTopologyRcd.h" diff --git a/RecoPixelVertexing/PixelTrackFitting/python/PixelTracks_cff.py b/RecoTracker/PixelTrackFitting/python/PixelTracks_cff.py similarity index 77% rename from RecoPixelVertexing/PixelTrackFitting/python/PixelTracks_cff.py rename to RecoTracker/PixelTrackFitting/python/PixelTracks_cff.py index 7aeb0e80c60b0..05340f69ea2fe 100644 --- a/RecoPixelVertexing/PixelTrackFitting/python/PixelTracks_cff.py +++ b/RecoTracker/PixelTrackFitting/python/PixelTracks_cff.py @@ -11,17 +11,17 @@ ) from RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi import * from RecoTracker.TkSeedingLayers.TTRHBuilderWithoutAngle4PixelTriplets_cfi import * -from RecoPixelVertexing.PixelTrackFitting.pixelFitterByHelixProjections_cfi import pixelFitterByHelixProjections -from RecoPixelVertexing.PixelTrackFitting.pixelNtupletsFitter_cfi import pixelNtupletsFitter -from RecoPixelVertexing.PixelTrackFitting.pixelTrackFilterByKinematics_cfi import pixelTrackFilterByKinematics -from RecoPixelVertexing.PixelTrackFitting.pixelTrackCleanerBySharedHits_cfi import pixelTrackCleanerBySharedHits -from RecoPixelVertexing.PixelTrackFitting.pixelTracks_cfi import pixelTracks as _pixelTracks +from RecoTracker.PixelTrackFitting.pixelFitterByHelixProjections_cfi import pixelFitterByHelixProjections +from RecoTracker.PixelTrackFitting.pixelNtupletsFitter_cfi import pixelNtupletsFitter +from RecoTracker.PixelTrackFitting.pixelTrackFilterByKinematics_cfi import pixelTrackFilterByKinematics +from RecoTracker.PixelTrackFitting.pixelTrackCleanerBySharedHits_cfi import pixelTrackCleanerBySharedHits +from RecoTracker.PixelTrackFitting.pixelTracks_cfi import pixelTracks as _pixelTracks from RecoTracker.TkTrackingRegions.globalTrackingRegion_cfi import globalTrackingRegion as _globalTrackingRegion from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpot_cfi import globalTrackingRegionFromBeamSpot as _globalTrackingRegionFromBeamSpot from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer -from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * -import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi +from RecoTracker.PixelSeeding.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer +from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +import RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi from RecoTracker.FinalTrackSelectors.trackAlgoPriorityOrder_cfi import trackAlgoPriorityOrder # Eras @@ -74,7 +74,7 @@ pixelTracksHitTriplets = _pixelTripletHLTEDProducer.clone( doublets = "pixelTracksHitDoublets", produceSeedingHitSets = True, - SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone( + SeedComparitorPSet = RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone( clusterShapeCacheSrc = "siPixelClusterShapeCachePreSplitting" ) ) @@ -91,8 +91,8 @@ # "Patatrack" pixel ntuplets, fishbone cleaning, Broken Line fit, and density-based vertex reconstruction from Configuration.ProcessModifiers.pixelNtupletFit_cff import pixelNtupletFit -from RecoPixelVertexing.PixelTriplets.caHitNtupletCUDAPhase1_cfi import caHitNtupletCUDAPhase1 as _pixelTracksCUDA -from RecoPixelVertexing.PixelTriplets.caHitNtupletCUDAPhase2_cfi import caHitNtupletCUDAPhase2 as _pixelTracksCUDAPhase2 +from RecoTracker.PixelSeeding.caHitNtupletCUDAPhase1_cfi import caHitNtupletCUDAPhase1 as _pixelTracksCUDA +from RecoTracker.PixelSeeding.caHitNtupletCUDAPhase2_cfi import caHitNtupletCUDAPhase2 as _pixelTracksCUDAPhase2 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker @@ -112,8 +112,8 @@ ) # convert the pixel tracks from SoA to legacy format -from RecoPixelVertexing.PixelTrackFitting.pixelTrackProducerFromSoAPhase1_cfi import pixelTrackProducerFromSoAPhase1 as _pixelTrackProducerFromSoA -from RecoPixelVertexing.PixelTrackFitting.pixelTrackProducerFromSoAPhase2_cfi import pixelTrackProducerFromSoAPhase2 as _pixelTrackProducerFromSoAPhase2 +from RecoTracker.PixelTrackFitting.pixelTrackProducerFromSoAPhase1_cfi import pixelTrackProducerFromSoAPhase1 as _pixelTrackProducerFromSoA +from RecoTracker.PixelTrackFitting.pixelTrackProducerFromSoAPhase2_cfi import pixelTrackProducerFromSoAPhase2 as _pixelTrackProducerFromSoAPhase2 pixelNtupletFit.toReplaceWith(pixelTracks, _pixelTrackProducerFromSoA.clone( pixelRecHitLegacySrc = "siPixelRecHitsPreSplitting", @@ -146,8 +146,8 @@ ) # SwitchProducer providing the pixel tracks in SoA format on the CPU -from RecoPixelVertexing.PixelTrackFitting.pixelTrackSoAFromCUDAPhase1_cfi import pixelTrackSoAFromCUDAPhase1 as _pixelTracksSoA -from RecoPixelVertexing.PixelTrackFitting.pixelTrackSoAFromCUDAPhase2_cfi import pixelTrackSoAFromCUDAPhase2 as _pixelTracksSoAPhase2 +from RecoTracker.PixelTrackFitting.pixelTrackSoAFromCUDAPhase1_cfi import pixelTrackSoAFromCUDAPhase1 as _pixelTracksSoA +from RecoTracker.PixelTrackFitting.pixelTrackSoAFromCUDAPhase2_cfi import pixelTrackSoAFromCUDAPhase2 as _pixelTracksSoAPhase2 gpu.toModify(pixelTracksSoA, # transfer the pixel tracks in SoA format to the host diff --git a/RecoPixelVertexing/PixelTrackFitting/python/pixelFitterByHelixProjections_cfi.py b/RecoTracker/PixelTrackFitting/python/pixelFitterByHelixProjections_cfi.py similarity index 68% rename from RecoPixelVertexing/PixelTrackFitting/python/pixelFitterByHelixProjections_cfi.py rename to RecoTracker/PixelTrackFitting/python/pixelFitterByHelixProjections_cfi.py index c9b786e026fda..ffe24a786f600 100644 --- a/RecoPixelVertexing/PixelTrackFitting/python/pixelFitterByHelixProjections_cfi.py +++ b/RecoTracker/PixelTrackFitting/python/pixelFitterByHelixProjections_cfi.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel -from RecoPixelVertexing.PixelTrackFitting.pixelFitterByHelixProjectionsDefault_cfi import pixelFitterByHelixProjectionsDefault +from RecoTracker.PixelTrackFitting.pixelFitterByHelixProjectionsDefault_cfi import pixelFitterByHelixProjectionsDefault pixelFitterByHelixProjections = pixelFitterByHelixProjectionsDefault.clone() diff --git a/RecoTracker/PixelTrackFitting/python/pixelNtupletsFitter_cfi.py b/RecoTracker/PixelTrackFitting/python/pixelNtupletsFitter_cfi.py new file mode 100644 index 0000000000000..af02ba473e54e --- /dev/null +++ b/RecoTracker/PixelTrackFitting/python/pixelNtupletsFitter_cfi.py @@ -0,0 +1,6 @@ +import FWCore.ParameterSet.Config as cms + +from RecoTracker.PixelTrackFitting.pixelNtupletsFitterDefault_cfi import pixelNtupletsFitterDefault + +pixelNtupletsFitter = pixelNtupletsFitterDefault.clone() + diff --git a/RecoPixelVertexing/PixelTrackFitting/src/CircleFromThreePoints.cc b/RecoTracker/PixelTrackFitting/src/CircleFromThreePoints.cc similarity index 96% rename from RecoPixelVertexing/PixelTrackFitting/src/CircleFromThreePoints.cc rename to RecoTracker/PixelTrackFitting/src/CircleFromThreePoints.cc index 1ab00fdaaa993..d67bd423d131b 100644 --- a/RecoPixelVertexing/PixelTrackFitting/src/CircleFromThreePoints.cc +++ b/RecoTracker/PixelTrackFitting/src/CircleFromThreePoints.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTrackFitting/interface/CircleFromThreePoints.h" +#include "RecoTracker/PixelTrackFitting/interface/CircleFromThreePoints.h" CircleFromThreePoints::CircleFromThreePoints(const GlobalPoint& inner, const GlobalPoint& mid, diff --git a/RecoPixelVertexing/PixelTrackFitting/src/ConformalMappingFit.cc b/RecoTracker/PixelTrackFitting/src/ConformalMappingFit.cc similarity index 100% rename from RecoPixelVertexing/PixelTrackFitting/src/ConformalMappingFit.cc rename to RecoTracker/PixelTrackFitting/src/ConformalMappingFit.cc diff --git a/RecoPixelVertexing/PixelTrackFitting/src/ConformalMappingFit.h b/RecoTracker/PixelTrackFitting/src/ConformalMappingFit.h similarity index 100% rename from RecoPixelVertexing/PixelTrackFitting/src/ConformalMappingFit.h rename to RecoTracker/PixelTrackFitting/src/ConformalMappingFit.h diff --git a/RecoPixelVertexing/PixelTrackFitting/src/ES_PixelTrackCleaner.cc b/RecoTracker/PixelTrackFitting/src/ES_PixelTrackCleaner.cc similarity index 53% rename from RecoPixelVertexing/PixelTrackFitting/src/ES_PixelTrackCleaner.cc rename to RecoTracker/PixelTrackFitting/src/ES_PixelTrackCleaner.cc index 2f926573dcb51..7ed95ea6a2e54 100644 --- a/RecoPixelVertexing/PixelTrackFitting/src/ES_PixelTrackCleaner.cc +++ b/RecoTracker/PixelTrackFitting/src/ES_PixelTrackCleaner.cc @@ -1,3 +1,3 @@ -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackCleaner.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackCleaner.h" #include "FWCore/Utilities/interface/typelookup.h" TYPELOOKUP_DATA_REG(PixelTrackCleaner); diff --git a/RecoPixelVertexing/PixelTrackFitting/src/KFBasedPixelFitter.cc b/RecoTracker/PixelTrackFitting/src/KFBasedPixelFitter.cc similarity index 98% rename from RecoPixelVertexing/PixelTrackFitting/src/KFBasedPixelFitter.cc rename to RecoTracker/PixelTrackFitting/src/KFBasedPixelFitter.cc index e58dfa0efbf0a..0175f9e1f344d 100644 --- a/RecoPixelVertexing/PixelTrackFitting/src/KFBasedPixelFitter.cc +++ b/RecoTracker/PixelTrackFitting/src/KFBasedPixelFitter.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTrackFitting/interface/KFBasedPixelFitter.h" +#include "RecoTracker/PixelTrackFitting/interface/KFBasedPixelFitter.h" #include "FWCore/Framework/interface/Event.h" @@ -19,7 +19,7 @@ #include "RecoTracker/TkTrackingRegions/interface/TrackingRegion.h" #include "RecoTracker/TkMSParametrization/interface/PixelRecoUtilities.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/CircleFromThreePoints.h" +#include "RecoTracker/PixelTrackFitting/interface/CircleFromThreePoints.h" #include "DataFormats/BeamSpot/interface/BeamSpot.h" diff --git a/RecoPixelVertexing/PixelTrackFitting/src/ParabolaFit.cc b/RecoTracker/PixelTrackFitting/src/ParabolaFit.cc similarity index 100% rename from RecoPixelVertexing/PixelTrackFitting/src/ParabolaFit.cc rename to RecoTracker/PixelTrackFitting/src/ParabolaFit.cc diff --git a/RecoPixelVertexing/PixelTrackFitting/src/ParabolaFit.h b/RecoTracker/PixelTrackFitting/src/ParabolaFit.h similarity index 100% rename from RecoPixelVertexing/PixelTrackFitting/src/ParabolaFit.h rename to RecoTracker/PixelTrackFitting/src/ParabolaFit.h diff --git a/RecoPixelVertexing/PixelTrackFitting/src/PixelFitterByConformalMappingAndLine.cc b/RecoTracker/PixelTrackFitting/src/PixelFitterByConformalMappingAndLine.cc similarity index 94% rename from RecoPixelVertexing/PixelTrackFitting/src/PixelFitterByConformalMappingAndLine.cc rename to RecoTracker/PixelTrackFitting/src/PixelFitterByConformalMappingAndLine.cc index f4bc223207620..3bdb2477f230c 100644 --- a/RecoPixelVertexing/PixelTrackFitting/src/PixelFitterByConformalMappingAndLine.cc +++ b/RecoTracker/PixelTrackFitting/src/PixelFitterByConformalMappingAndLine.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterByConformalMappingAndLine.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelFitterByConformalMappingAndLine.h" #include "DataFormats/GeometryVector/interface/GlobalPoint.h" #include "DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h" @@ -16,8 +16,8 @@ #include "Geometry/CommonDetUnit/interface/GeomDetType.h" #include "ConformalMappingFit.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackBuilder.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/RZLine.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackBuilder.h" +#include "RecoTracker/PixelTrackFitting/interface/RZLine.h" #include "RecoTracker/TkMSParametrization/interface/PixelRecoUtilities.h" #include "RecoTracker/TkMSParametrization/interface/LongitudinalBendingCorrection.h" diff --git a/RecoPixelVertexing/PixelTrackFitting/src/PixelFitterByHelixProjections.cc b/RecoTracker/PixelTrackFitting/src/PixelFitterByHelixProjections.cc similarity index 94% rename from RecoPixelVertexing/PixelTrackFitting/src/PixelFitterByHelixProjections.cc rename to RecoTracker/PixelTrackFitting/src/PixelFitterByHelixProjections.cc index 10205acb77d7e..a52482f460033 100644 --- a/RecoPixelVertexing/PixelTrackFitting/src/PixelFitterByHelixProjections.cc +++ b/RecoTracker/PixelTrackFitting/src/PixelFitterByHelixProjections.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterByHelixProjections.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelFitterByHelixProjections.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Framework/interface/EventSetup.h" @@ -23,10 +23,10 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/RZLine.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/CircleFromThreePoints.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackBuilder.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackErrorParam.h" +#include "RecoTracker/PixelTrackFitting/interface/RZLine.h" +#include "RecoTracker/PixelTrackFitting/interface/CircleFromThreePoints.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackBuilder.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackErrorParam.h" #include "DataFormats/GeometryVector/interface/Pi.h" #include "DataFormats/TrackerCommon/interface/TrackerTopology.h" diff --git a/RecoPixelVertexing/PixelTrackFitting/src/PixelNtupletsFitter.cc b/RecoTracker/PixelTrackFitting/src/PixelNtupletsFitter.cc similarity index 89% rename from RecoPixelVertexing/PixelTrackFitting/src/PixelNtupletsFitter.cc rename to RecoTracker/PixelTrackFitting/src/PixelNtupletsFitter.cc index 9bc1663ff041d..054230046a17f 100644 --- a/RecoPixelVertexing/PixelTrackFitting/src/PixelNtupletsFitter.cc +++ b/RecoTracker/PixelTrackFitting/src/PixelNtupletsFitter.cc @@ -10,11 +10,11 @@ #include "Geometry/CommonDetUnit/interface/GeomDet.h" #include "Geometry/CommonDetUnit/interface/GeomDetType.h" #include "MagneticField/Engine/interface/MagneticField.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/BrokenLine.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelNtupletsFitter.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackBuilder.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackErrorParam.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/RiemannFit.h" +#include "RecoTracker/PixelTrackFitting/interface/BrokenLine.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelNtupletsFitter.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackBuilder.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackErrorParam.h" +#include "RecoTracker/PixelTrackFitting/interface/RiemannFit.h" #include "RecoTracker/TkMSParametrization/interface/PixelRecoUtilities.h" using namespace std; diff --git a/RecoPixelVertexing/PixelTrackFitting/src/PixelTrackBuilder.cc b/RecoTracker/PixelTrackFitting/src/PixelTrackBuilder.cc similarity index 99% rename from RecoPixelVertexing/PixelTrackFitting/src/PixelTrackBuilder.cc rename to RecoTracker/PixelTrackFitting/src/PixelTrackBuilder.cc index 63ddf6fcfc717..29f4f049cab5f 100644 --- a/RecoPixelVertexing/PixelTrackFitting/src/PixelTrackBuilder.cc +++ b/RecoTracker/PixelTrackFitting/src/PixelTrackBuilder.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackBuilder.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackBuilder.h" #include "DataFormats/GeometrySurface/interface/LocalError.h" #include "DataFormats/GeometrySurface/interface/BoundPlane.h" diff --git a/RecoPixelVertexing/PixelTrackFitting/src/PixelTrackCleanerBySharedHits.cc b/RecoTracker/PixelTrackFitting/src/PixelTrackCleanerBySharedHits.cc similarity index 97% rename from RecoPixelVertexing/PixelTrackFitting/src/PixelTrackCleanerBySharedHits.cc rename to RecoTracker/PixelTrackFitting/src/PixelTrackCleanerBySharedHits.cc index 47b0127a3c169..23815e94da691 100644 --- a/RecoPixelVertexing/PixelTrackFitting/src/PixelTrackCleanerBySharedHits.cc +++ b/RecoTracker/PixelTrackFitting/src/PixelTrackCleanerBySharedHits.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackCleanerBySharedHits.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackCleanerBySharedHits.h" #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h" #include "DataFormats/TrackReco/interface/Track.h" diff --git a/RecoPixelVertexing/PixelTrackFitting/src/PixelTrackErrorParam.cc b/RecoTracker/PixelTrackFitting/src/PixelTrackErrorParam.cc similarity index 98% rename from RecoPixelVertexing/PixelTrackFitting/src/PixelTrackErrorParam.cc rename to RecoTracker/PixelTrackFitting/src/PixelTrackErrorParam.cc index f67fd1f464511..8703a9c0c2320 100644 --- a/RecoPixelVertexing/PixelTrackFitting/src/PixelTrackErrorParam.cc +++ b/RecoTracker/PixelTrackFitting/src/PixelTrackErrorParam.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackErrorParam.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackErrorParam.h" #include #include diff --git a/RecoPixelVertexing/PixelTrackFitting/src/PixelTrackFilterByKinematics.cc b/RecoTracker/PixelTrackFitting/src/PixelTrackFilterByKinematics.cc similarity index 95% rename from RecoPixelVertexing/PixelTrackFitting/src/PixelTrackFilterByKinematics.cc rename to RecoTracker/PixelTrackFitting/src/PixelTrackFilterByKinematics.cc index 216df2ce7451a..915ed62fedfe0 100644 --- a/RecoPixelVertexing/PixelTrackFitting/src/PixelTrackFilterByKinematics.cc +++ b/RecoTracker/PixelTrackFitting/src/PixelTrackFilterByKinematics.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilterByKinematics.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackFilterByKinematics.h" #include "DataFormats/TrackReco/interface/Track.h" #include "DataFormats/TrackReco/interface/TrackBase.h" diff --git a/RecoPixelVertexing/PixelTrackFitting/src/PixelTrackReconstruction.cc b/RecoTracker/PixelTrackFitting/src/PixelTrackReconstruction.cc similarity index 92% rename from RecoPixelVertexing/PixelTrackFitting/src/PixelTrackReconstruction.cc rename to RecoTracker/PixelTrackFitting/src/PixelTrackReconstruction.cc index 93d587cfe3c76..f7559796eaf59 100644 --- a/RecoPixelVertexing/PixelTrackFitting/src/PixelTrackReconstruction.cc +++ b/RecoTracker/PixelTrackFitting/src/PixelTrackReconstruction.cc @@ -8,10 +8,10 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitter.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackCleanerWrapper.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilter.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackReconstruction.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelFitter.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackCleanerWrapper.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackFilter.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackReconstruction.h" #include "RecoTracker/TkHitPairs/interface/RegionsSeedingHitSets.h" #include "RecoTracker/TkTrackingRegions/interface/TrackingRegion.h" diff --git a/RecoPixelVertexing/PixelTrackFitting/src/classes.h b/RecoTracker/PixelTrackFitting/src/classes.h similarity index 67% rename from RecoPixelVertexing/PixelTrackFitting/src/classes.h rename to RecoTracker/PixelTrackFitting/src/classes.h index 124894e7c8d74..302b07b735a9b 100644 --- a/RecoPixelVertexing/PixelTrackFitting/src/classes.h +++ b/RecoTracker/PixelTrackFitting/src/classes.h @@ -1,5 +1,5 @@ -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitter.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilter.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelFitter.h" +#include "RecoTracker/PixelTrackFitting/interface/PixelTrackFilter.h" #include "DataFormats/Common/interface/Wrapper.h" namespace RecoPixelVertexing_PixelTrackFitting { diff --git a/RecoPixelVertexing/PixelTrackFitting/src/classes_def.xml b/RecoTracker/PixelTrackFitting/src/classes_def.xml similarity index 100% rename from RecoPixelVertexing/PixelTrackFitting/src/classes_def.xml rename to RecoTracker/PixelTrackFitting/src/classes_def.xml diff --git a/RecoPixelVertexing/PixelTrackFitting/test/BuildFile.xml b/RecoTracker/PixelTrackFitting/test/BuildFile.xml similarity index 97% rename from RecoPixelVertexing/PixelTrackFitting/test/BuildFile.xml rename to RecoTracker/PixelTrackFitting/test/BuildFile.xml index e524dd6d68d77..012a9a02c7bef 100644 --- a/RecoPixelVertexing/PixelTrackFitting/test/BuildFile.xml +++ b/RecoTracker/PixelTrackFitting/test/BuildFile.xml @@ -11,7 +11,7 @@ - + diff --git a/RecoPixelVertexing/PixelTrackFitting/test/PixelTrackFits.cc b/RecoTracker/PixelTrackFitting/test/PixelTrackFits.cc similarity index 99% rename from RecoPixelVertexing/PixelTrackFitting/test/PixelTrackFits.cc rename to RecoTracker/PixelTrackFitting/test/PixelTrackFits.cc index e5a652e9d43f8..a6dde0733895b 100644 --- a/RecoPixelVertexing/PixelTrackFitting/test/PixelTrackFits.cc +++ b/RecoTracker/PixelTrackFitting/test/PixelTrackFits.cc @@ -11,9 +11,9 @@ #include #ifdef USE_BL -#include "RecoPixelVertexing/PixelTrackFitting/interface/BrokenLine.h" +#include "RecoTracker/PixelTrackFitting/interface/BrokenLine.h" #else -#include "RecoPixelVertexing/PixelTrackFitting/interface/RiemannFit.h" +#include "RecoTracker/PixelTrackFitting/interface/RiemannFit.h" #endif using namespace std; diff --git a/RecoPixelVertexing/PixelTrackFitting/test/PixelTrackTest.cc b/RecoTracker/PixelTrackFitting/test/PixelTrackTest.cc similarity index 100% rename from RecoPixelVertexing/PixelTrackFitting/test/PixelTrackTest.cc rename to RecoTracker/PixelTrackFitting/test/PixelTrackTest.cc diff --git a/RecoPixelVertexing/PixelTrackFitting/test/RZLine_catch2.cc b/RecoTracker/PixelTrackFitting/test/RZLine_catch2.cc similarity index 98% rename from RecoPixelVertexing/PixelTrackFitting/test/RZLine_catch2.cc rename to RecoTracker/PixelTrackFitting/test/RZLine_catch2.cc index d757159165fb2..10c3cd8b3279b 100644 --- a/RecoPixelVertexing/PixelTrackFitting/test/RZLine_catch2.cc +++ b/RecoTracker/PixelTrackFitting/test/RZLine_catch2.cc @@ -1,7 +1,7 @@ #define CATCH_CONFIG_MAIN #include #include -#include "RecoPixelVertexing/PixelTrackFitting/interface/RZLine.h" +#include "RecoTracker/PixelTrackFitting/interface/RZLine.h" TEST_CASE("test RZLine", "[RZLine]") { SECTION("Constructors") { diff --git a/RecoPixelVertexing/PixelTrackFitting/test/testEigenGPU.cu b/RecoTracker/PixelTrackFitting/test/testEigenGPU.cu similarity index 98% rename from RecoPixelVertexing/PixelTrackFitting/test/testEigenGPU.cu rename to RecoTracker/PixelTrackFitting/test/testEigenGPU.cu index d5eba9be26594..e03e39a2ab511 100644 --- a/RecoPixelVertexing/PixelTrackFitting/test/testEigenGPU.cu +++ b/RecoTracker/PixelTrackFitting/test/testEigenGPU.cu @@ -7,9 +7,9 @@ #include "HeterogeneousCore/CUDAUtilities/interface/requireDevices.h" #ifdef USE_BL -#include "RecoPixelVertexing/PixelTrackFitting/interface/BrokenLine.h" +#include "RecoTracker/PixelTrackFitting/interface/BrokenLine.h" #else -#include "RecoPixelVertexing/PixelTrackFitting/interface/RiemannFit.h" +#include "RecoTracker/PixelTrackFitting/interface/RiemannFit.h" #endif #include "test_common.h" diff --git a/RecoPixelVertexing/PixelTrackFitting/test/testEigenGPUNoFit.cu b/RecoTracker/PixelTrackFitting/test/testEigenGPUNoFit.cu similarity index 100% rename from RecoPixelVertexing/PixelTrackFitting/test/testEigenGPUNoFit.cu rename to RecoTracker/PixelTrackFitting/test/testEigenGPUNoFit.cu diff --git a/RecoPixelVertexing/PixelTrackFitting/test/testEigenJacobian.cpp b/RecoTracker/PixelTrackFitting/test/testEigenJacobian.cpp similarity index 98% rename from RecoPixelVertexing/PixelTrackFitting/test/testEigenJacobian.cpp rename to RecoTracker/PixelTrackFitting/test/testEigenJacobian.cpp index a8e040fa0df38..e2567d2d042db 100644 --- a/RecoPixelVertexing/PixelTrackFitting/test/testEigenJacobian.cpp +++ b/RecoTracker/PixelTrackFitting/test/testEigenJacobian.cpp @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelTrackFitting/interface/FitUtils.h" +#include "RecoTracker/PixelTrackFitting/interface/FitUtils.h" #include using riemannFit::Matrix5d; diff --git a/RecoPixelVertexing/PixelTrackFitting/test/testFits.cpp b/RecoTracker/PixelTrackFitting/test/testFits.cpp similarity index 97% rename from RecoPixelVertexing/PixelTrackFitting/test/testFits.cpp rename to RecoTracker/PixelTrackFitting/test/testFits.cpp index 7c0dab3be3e00..20b37ab6ecf51 100644 --- a/RecoPixelVertexing/PixelTrackFitting/test/testFits.cpp +++ b/RecoTracker/PixelTrackFitting/test/testFits.cpp @@ -4,9 +4,9 @@ #include #ifdef USE_BL -#include "RecoPixelVertexing/PixelTrackFitting/interface/BrokenLine.h" +#include "RecoTracker/PixelTrackFitting/interface/BrokenLine.h" #else -#include "RecoPixelVertexing/PixelTrackFitting/interface/RiemannFit.h" +#include "RecoTracker/PixelTrackFitting/interface/RiemannFit.h" #endif #include "test_common.h" diff --git a/RecoPixelVertexing/PixelTrackFitting/test/test_cfg.py b/RecoTracker/PixelTrackFitting/test/test_cfg.py similarity index 94% rename from RecoPixelVertexing/PixelTrackFitting/test/test_cfg.py rename to RecoTracker/PixelTrackFitting/test/test_cfg.py index 7ee9aa7547317..ea24e6d9e7d9b 100644 --- a/RecoPixelVertexing/PixelTrackFitting/test/test_cfg.py +++ b/RecoTracker/PixelTrackFitting/test/test_cfg.py @@ -31,8 +31,8 @@ process.load("RecoTracker.Configuration.RecoTracker_cff") from RecoTracker.Configuration.RecoTracker_cff import * process.load('RecoLocalTracker/Configuration/RecoLocalTracker_cff') -process.load("RecoPixelVertexing.PixelTrackFitting.PixelTracks_cff") -from RecoPixelVertexing.PixelTrackFitting.PixelTracks_cff import * +process.load("RecoTracker.PixelTrackFitting.PixelTracks_cff") +from RecoTracker.PixelTrackFitting.PixelTracks_cff import * BBlock = cms.PSet( diff --git a/RecoPixelVertexing/PixelTrackFitting/test/test_common.h b/RecoTracker/PixelTrackFitting/test/test_common.h similarity index 100% rename from RecoPixelVertexing/PixelTrackFitting/test/test_common.h rename to RecoTracker/PixelTrackFitting/test/test_common.h diff --git a/RecoPixelVertexing/PixelVertexFinding/BuildFile.xml b/RecoTracker/PixelVertexFinding/BuildFile.xml similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/BuildFile.xml rename to RecoTracker/PixelVertexFinding/BuildFile.xml diff --git a/RecoPixelVertexing/PixelVertexFinding/interface/Cluster1DCleaner.h b/RecoTracker/PixelVertexFinding/interface/Cluster1DCleaner.h similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/interface/Cluster1DCleaner.h rename to RecoTracker/PixelVertexFinding/interface/Cluster1DCleaner.h diff --git a/RecoPixelVertexing/PixelVertexFinding/interface/Cluster1DMerger.h b/RecoTracker/PixelVertexFinding/interface/Cluster1DMerger.h similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/interface/Cluster1DMerger.h rename to RecoTracker/PixelVertexFinding/interface/Cluster1DMerger.h diff --git a/RecoPixelVertexing/PixelVertexFinding/interface/DivisiveClusterizer1D.h b/RecoTracker/PixelVertexFinding/interface/DivisiveClusterizer1D.h similarity index 98% rename from RecoPixelVertexing/PixelVertexFinding/interface/DivisiveClusterizer1D.h rename to RecoTracker/PixelVertexFinding/interface/DivisiveClusterizer1D.h index 0bcbc94dbc70a..011798af2f7a9 100644 --- a/RecoPixelVertexing/PixelVertexFinding/interface/DivisiveClusterizer1D.h +++ b/RecoTracker/PixelVertexFinding/interface/DivisiveClusterizer1D.h @@ -4,8 +4,8 @@ #include "CommonTools/Clustering1D/interface/Clusterizer1D.h" //#include "CommonTools/Clustering1D/interface/Cluster1DMerger.h" //#include "CommonTools/Clustering1D/interface/Cluster1DCleaner.h" -#include "RecoPixelVertexing/PixelVertexFinding/interface/Cluster1DMerger.h" -#include "RecoPixelVertexing/PixelVertexFinding/interface/Cluster1DCleaner.h" +#include "RecoTracker/PixelVertexFinding/interface/Cluster1DMerger.h" +#include "RecoTracker/PixelVertexFinding/interface/Cluster1DCleaner.h" #include "CommonTools/Clustering1D/interface/TrivialWeightEstimator.h" #include "CommonTools/Clustering1D/interface/Clusterizer1DCommons.h" diff --git a/RecoPixelVertexing/PixelVertexFinding/interface/DivisiveVertexFinder.h b/RecoTracker/PixelVertexFinding/interface/DivisiveVertexFinder.h similarity index 90% rename from RecoPixelVertexing/PixelVertexFinding/interface/DivisiveVertexFinder.h rename to RecoTracker/PixelVertexFinding/interface/DivisiveVertexFinder.h index cfcf849aa6eb3..0f1dfb226a920 100644 --- a/RecoPixelVertexing/PixelVertexFinding/interface/DivisiveVertexFinder.h +++ b/RecoTracker/PixelVertexFinding/interface/DivisiveVertexFinder.h @@ -1,6 +1,6 @@ #ifndef RecoPixelVertexing_DivisiveVertexFinder_h #define RecoPixelVertexing_DivisiveVertexFinder_h -/** \class DivisiveVertexFinder DivisiveVertexFinder.h RecoPixelVertexing/PixelVertexFinding/interface/DivisiveVertexFinder.h +/** \class DivisiveVertexFinder DivisiveVertexFinder.h RecoTracker/PixelVertexFinding/interface/DivisiveVertexFinder.h Description: Fits a primary vertex in 1D (z) using the "divisive method" @@ -27,9 +27,9 @@ #include "DataFormats/TrackReco/interface/Track.h" #include "DataFormats/TrackReco/interface/TrackFwd.h" //#include "CommonTools/Clustering1D/interface/DivisiveClusterizer1D.h" -#include "RecoPixelVertexing/PixelVertexFinding/interface/DivisiveClusterizer1D.h" +#include "RecoTracker/PixelVertexFinding/interface/DivisiveClusterizer1D.h" -#include "RecoPixelVertexing/PixelVertexFinding/interface/PVClusterComparer.h" +#include "RecoTracker/PixelVertexFinding/interface/PVClusterComparer.h" class DivisiveVertexFinder { public: diff --git a/RecoPixelVertexing/PixelVertexFinding/interface/FindPeakFastPV.h b/RecoTracker/PixelVertexFinding/interface/FindPeakFastPV.h similarity index 95% rename from RecoPixelVertexing/PixelVertexFinding/interface/FindPeakFastPV.h rename to RecoTracker/PixelVertexFinding/interface/FindPeakFastPV.h index 7a5cbe488d0f7..e2fd02f6ac807 100644 --- a/RecoPixelVertexing/PixelVertexFinding/interface/FindPeakFastPV.h +++ b/RecoTracker/PixelVertexFinding/interface/FindPeakFastPV.h @@ -1,6 +1,6 @@ #ifndef RecoPixelVertexing_FindPeakFastPV_h #define RecoPixelVertexing_FindPeakFastPV_h -/** \class FindPeakFastPV FindPeakFastPV.h RecoPixelVertexing/PixelVertexFinding/FindPeakFastPV.h +/** \class FindPeakFastPV FindPeakFastPV.h RecoTracker/PixelVertexFinding/FindPeakFastPV.h * Given *zProjections* and *zWeights* find the peak of width *m_zClusterWidth*. * Use only values with *zWeights*>*m_weightCut*. * Look near *oldVertex* within *m_zClusterSearchArea*. diff --git a/RecoPixelVertexing/PixelVertexFinding/interface/PVCluster.h b/RecoTracker/PixelVertexFinding/interface/PVCluster.h similarity index 76% rename from RecoPixelVertexing/PixelVertexFinding/interface/PVCluster.h rename to RecoTracker/PixelVertexFinding/interface/PVCluster.h index f565c6b5d5b36..c87728c1ec97a 100644 --- a/RecoPixelVertexing/PixelVertexFinding/interface/PVCluster.h +++ b/RecoTracker/PixelVertexFinding/interface/PVCluster.h @@ -1,10 +1,10 @@ #ifndef PixelVertexFinding_PVCluster_h #define PixelVertexFinding_PVCluster_h -/** \class PVCluster PVCluster.h RecoPixelVertexing/PixelVertexFinding/PVCluster.h +/** \class PVCluster PVCluster.h RecoTracker/PixelVertexFinding/PVCluster.h * A simple collection of tracks that represents a physical clustering * of charged particles, ie a vertex, in one dimension. This * (typedef) class is used by the Pixel standalone vertex finding - * classes found in RecoPixelVertexing/PixelVertexFinding. + * classes found in RecoTracker/PixelVertexFinding. * * \author Aaron Dominguez (UNL) */ diff --git a/RecoPixelVertexing/PixelVertexFinding/interface/PVClusterComparer.h b/RecoTracker/PixelVertexFinding/interface/PVClusterComparer.h similarity index 91% rename from RecoPixelVertexing/PixelVertexFinding/interface/PVClusterComparer.h rename to RecoTracker/PixelVertexFinding/interface/PVClusterComparer.h index 9f78d5c661a61..6fb0a4222b772 100644 --- a/RecoPixelVertexing/PixelVertexFinding/interface/PVClusterComparer.h +++ b/RecoTracker/PixelVertexFinding/interface/PVClusterComparer.h @@ -1,7 +1,7 @@ #ifndef RecoPixelVertexing_PVClusterComparer_h #define RecoPixelVertexing_PVClusterComparer_h /** \class PVClusterComparer PVClusterComparer.h - * RecoPixelVertexing/PixelVertexFinding/PVClusterComparer.h + * RecoTracker/PixelVertexFinding/PVClusterComparer.h * This helper class is used to sort the collection of vertexes by * sumPt. It is used in DivisiveVertexFinder. The sum of the squares * of the pT is only done for tracks with pT>2.5 GeV. If the pT>10 @@ -10,7 +10,7 @@ * * \author Aaron Dominguez (UNL) */ -#include "RecoPixelVertexing/PixelVertexFinding/interface/PVCluster.h" +#include "RecoTracker/PixelVertexFinding/interface/PVCluster.h" #include "DataFormats/VertexReco/interface/Vertex.h" class PVClusterComparer { diff --git a/RecoPixelVertexing/PixelVertexFinding/interface/PVPositionBuilder.h b/RecoTracker/PixelVertexFinding/interface/PVPositionBuilder.h similarity index 91% rename from RecoPixelVertexing/PixelVertexFinding/interface/PVPositionBuilder.h rename to RecoTracker/PixelVertexFinding/interface/PVPositionBuilder.h index 31626bdc03f8b..d84f8101568bc 100644 --- a/RecoPixelVertexing/PixelVertexFinding/interface/PVPositionBuilder.h +++ b/RecoTracker/PixelVertexFinding/interface/PVPositionBuilder.h @@ -1,6 +1,6 @@ #ifndef RecoPixelVertexing_PVPositionBuilder_h #define RecoPixelVertexing_PVPositionBuilder_h -/** \class PVPositionBuilder PVPositionBuilder.h RecoPixelVertexing/PixelVertexFinding/PVPositionBuilder.h +/** \class PVPositionBuilder PVPositionBuilder.h RecoTracker/PixelVertexFinding/PVPositionBuilder.h * This helper class calculates the average Z position of a collection of * tracks. You have the option of calculating the straight average, * or making a weighted average using the error of the Z of the tracks. This diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/BuildFile.xml b/RecoTracker/PixelVertexFinding/plugins/BuildFile.xml similarity index 95% rename from RecoPixelVertexing/PixelVertexFinding/plugins/BuildFile.xml rename to RecoTracker/PixelVertexFinding/plugins/BuildFile.xml index 21aae99fe749c..d330676889f26 100644 --- a/RecoPixelVertexing/PixelVertexFinding/plugins/BuildFile.xml +++ b/RecoTracker/PixelVertexFinding/plugins/BuildFile.xml @@ -21,7 +21,7 @@ - + diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/FastPrimaryVertexProducer.cc b/RecoTracker/PixelVertexFinding/plugins/FastPrimaryVertexProducer.cc similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/plugins/FastPrimaryVertexProducer.cc rename to RecoTracker/PixelVertexFinding/plugins/FastPrimaryVertexProducer.cc diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/FastPrimaryVertexWithWeightsProducer.cc b/RecoTracker/PixelVertexFinding/plugins/FastPrimaryVertexWithWeightsProducer.cc similarity index 99% rename from RecoPixelVertexing/PixelVertexFinding/plugins/FastPrimaryVertexWithWeightsProducer.cc rename to RecoTracker/PixelVertexFinding/plugins/FastPrimaryVertexWithWeightsProducer.cc index d4717f13c3ddc..8117c55d01e0d 100644 --- a/RecoPixelVertexing/PixelVertexFinding/plugins/FastPrimaryVertexWithWeightsProducer.cc +++ b/RecoTracker/PixelVertexFinding/plugins/FastPrimaryVertexWithWeightsProducer.cc @@ -47,7 +47,7 @@ #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" #include "RecoLocalTracker/Records/interface/TkPixelCPERecord.h" -#include "RecoPixelVertexing/PixelVertexFinding/interface/FindPeakFastPV.h" +#include "RecoTracker/PixelVertexFinding/interface/FindPeakFastPV.h" #include "FWCore/Utilities/interface/InputTag.h" diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/JetVertexChecker.cc b/RecoTracker/PixelVertexFinding/plugins/JetVertexChecker.cc similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/plugins/JetVertexChecker.cc rename to RecoTracker/PixelVertexFinding/plugins/JetVertexChecker.cc diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexCollectionTrimmer.cc b/RecoTracker/PixelVertexFinding/plugins/PixelVertexCollectionTrimmer.cc similarity index 96% rename from RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexCollectionTrimmer.cc rename to RecoTracker/PixelVertexFinding/plugins/PixelVertexCollectionTrimmer.cc index b62137d1f0836..f36d5c74bc324 100644 --- a/RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexCollectionTrimmer.cc +++ b/RecoTracker/PixelVertexFinding/plugins/PixelVertexCollectionTrimmer.cc @@ -14,7 +14,7 @@ #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "FWCore/Utilities/interface/Exception.h" -#include "RecoPixelVertexing/PixelVertexFinding/interface/PVClusterComparer.h" +#include "RecoTracker/PixelVertexFinding/interface/PVClusterComparer.h" class PixelVertexCollectionTrimmer : public edm::stream::EDProducer<> { public: @@ -102,7 +102,7 @@ void PixelVertexCollectionTrimmer::fillDescriptions(edm::ConfigurationDescriptio PVcomparerPSet.add("track_chi2_max", 99999.)->setComment("max track chi2"); PVcomparerPSet.add("track_prob_min", -1.)->setComment("min track prob"); desc.add("PVcomparer", PVcomparerPSet) - ->setComment("from RecoPixelVertexing/PixelVertexFinding/python/PVClusterComparer_cfi.py"); + ->setComment("from RecoTracker/PixelVertexFinding/python/PVClusterComparer_cfi.py"); descriptions.add("hltPixelVertexCollectionTrimmer", desc); } diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexProducer.cc b/RecoTracker/PixelVertexFinding/plugins/PixelVertexProducer.cc similarity index 99% rename from RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexProducer.cc rename to RecoTracker/PixelVertexFinding/plugins/PixelVertexProducer.cc index 70500531eae26..5cc3eb7bd7759 100644 --- a/RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexProducer.cc +++ b/RecoTracker/PixelVertexFinding/plugins/PixelVertexProducer.cc @@ -33,7 +33,7 @@ #include "DataFormats/VertexReco/interface/Vertex.h" #include "DataFormats/VertexReco/interface/VertexFwd.h" #include "DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h" -#include "RecoPixelVertexing/PixelVertexFinding/interface/DivisiveVertexFinder.h" +#include "RecoTracker/PixelVertexFinding/interface/DivisiveVertexFinder.h" #include #include #include diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexProducerCUDA.cc b/RecoTracker/PixelVertexFinding/plugins/PixelVertexProducerCUDA.cc similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexProducerCUDA.cc rename to RecoTracker/PixelVertexFinding/plugins/PixelVertexProducerCUDA.cc diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexProducerFromSoA.cc b/RecoTracker/PixelVertexFinding/plugins/PixelVertexProducerFromSoA.cc similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexProducerFromSoA.cc rename to RecoTracker/PixelVertexFinding/plugins/PixelVertexProducerFromSoA.cc diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexSoAFromCUDA.cc b/RecoTracker/PixelVertexFinding/plugins/PixelVertexSoAFromCUDA.cc similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexSoAFromCUDA.cc rename to RecoTracker/PixelVertexFinding/plugins/PixelVertexSoAFromCUDA.cc diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexWorkSpaceSoADevice.h b/RecoTracker/PixelVertexFinding/plugins/PixelVertexWorkSpaceSoADevice.h similarity index 90% rename from RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexWorkSpaceSoADevice.h rename to RecoTracker/PixelVertexFinding/plugins/PixelVertexWorkSpaceSoADevice.h index 223c3d7e94785..ebb9c1c88c848 100644 --- a/RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexWorkSpaceSoADevice.h +++ b/RecoTracker/PixelVertexFinding/plugins/PixelVertexWorkSpaceSoADevice.h @@ -3,7 +3,7 @@ #include "CUDADataFormats/Common/interface/PortableDeviceCollection.h" #include "CUDADataFormats/Vertex/interface/ZVertexUtilities.h" -#include "RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexWorkSpaceUtilities.h" +#include "RecoTracker/PixelVertexFinding/plugins/PixelVertexWorkSpaceUtilities.h" template class PixelVertexWorkSpaceSoADevice : public cms::cuda::PortableDeviceCollection> { diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexWorkSpaceSoAHost.h b/RecoTracker/PixelVertexFinding/plugins/PixelVertexWorkSpaceSoAHost.h similarity index 91% rename from RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexWorkSpaceSoAHost.h rename to RecoTracker/PixelVertexFinding/plugins/PixelVertexWorkSpaceSoAHost.h index 6c424fcec8a30..a9229395744e3 100644 --- a/RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexWorkSpaceSoAHost.h +++ b/RecoTracker/PixelVertexFinding/plugins/PixelVertexWorkSpaceSoAHost.h @@ -3,7 +3,7 @@ #include "CUDADataFormats/Common/interface/PortableHostCollection.h" #include "CUDADataFormats/Vertex/interface/ZVertexUtilities.h" -#include "RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexWorkSpaceUtilities.h" +#include "RecoTracker/PixelVertexFinding/plugins/PixelVertexWorkSpaceUtilities.h" template class PixelVertexWorkSpaceSoAHost : public cms::cuda::PortableHostCollection> { diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexWorkSpaceUtilities.h b/RecoTracker/PixelVertexFinding/plugins/PixelVertexWorkSpaceUtilities.h similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexWorkSpaceUtilities.h rename to RecoTracker/PixelVertexFinding/plugins/PixelVertexWorkSpaceUtilities.h diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/gpuClusterTracksByDensity.h b/RecoTracker/PixelVertexFinding/plugins/gpuClusterTracksByDensity.h similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/plugins/gpuClusterTracksByDensity.h rename to RecoTracker/PixelVertexFinding/plugins/gpuClusterTracksByDensity.h diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/gpuClusterTracksDBSCAN.h b/RecoTracker/PixelVertexFinding/plugins/gpuClusterTracksDBSCAN.h similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/plugins/gpuClusterTracksDBSCAN.h rename to RecoTracker/PixelVertexFinding/plugins/gpuClusterTracksDBSCAN.h diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/gpuClusterTracksIterative.h b/RecoTracker/PixelVertexFinding/plugins/gpuClusterTracksIterative.h similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/plugins/gpuClusterTracksIterative.h rename to RecoTracker/PixelVertexFinding/plugins/gpuClusterTracksIterative.h diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/gpuFitVertices.h b/RecoTracker/PixelVertexFinding/plugins/gpuFitVertices.h similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/plugins/gpuFitVertices.h rename to RecoTracker/PixelVertexFinding/plugins/gpuFitVertices.h diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/gpuSortByPt2.h b/RecoTracker/PixelVertexFinding/plugins/gpuSortByPt2.h similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/plugins/gpuSortByPt2.h rename to RecoTracker/PixelVertexFinding/plugins/gpuSortByPt2.h diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/gpuSplitVertices.h b/RecoTracker/PixelVertexFinding/plugins/gpuSplitVertices.h similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/plugins/gpuSplitVertices.h rename to RecoTracker/PixelVertexFinding/plugins/gpuSplitVertices.h diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/gpuVertexFinder.cc b/RecoTracker/PixelVertexFinding/plugins/gpuVertexFinder.cc similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/plugins/gpuVertexFinder.cc rename to RecoTracker/PixelVertexFinding/plugins/gpuVertexFinder.cc diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/gpuVertexFinder.cu b/RecoTracker/PixelVertexFinding/plugins/gpuVertexFinder.cu similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/plugins/gpuVertexFinder.cu rename to RecoTracker/PixelVertexFinding/plugins/gpuVertexFinder.cu diff --git a/RecoPixelVertexing/PixelVertexFinding/plugins/gpuVertexFinder.h b/RecoTracker/PixelVertexFinding/plugins/gpuVertexFinder.h similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/plugins/gpuVertexFinder.h rename to RecoTracker/PixelVertexFinding/plugins/gpuVertexFinder.h diff --git a/RecoPixelVertexing/PixelVertexFinding/python/PVClusterComparer_cfi.py b/RecoTracker/PixelVertexFinding/python/PVClusterComparer_cfi.py similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/python/PVClusterComparer_cfi.py rename to RecoTracker/PixelVertexFinding/python/PVClusterComparer_cfi.py diff --git a/RecoTracker/PixelVertexFinding/python/PixelVertexes_cff.py b/RecoTracker/PixelVertexFinding/python/PixelVertexes_cff.py new file mode 100644 index 0000000000000..0f344e8578037 --- /dev/null +++ b/RecoTracker/PixelVertexFinding/python/PixelVertexes_cff.py @@ -0,0 +1,3 @@ +import FWCore.ParameterSet.Config as cms + +from RecoTracker.PixelVertexFinding.PixelVertexes_cfi import * diff --git a/RecoPixelVertexing/PixelVertexFinding/python/PixelVertexes_cfi.py b/RecoTracker/PixelVertexFinding/python/PixelVertexes_cfi.py similarity index 88% rename from RecoPixelVertexing/PixelVertexFinding/python/PixelVertexes_cfi.py rename to RecoTracker/PixelVertexFinding/python/PixelVertexes_cfi.py index 903c2a894ff86..0735fa41109e9 100644 --- a/RecoPixelVertexing/PixelVertexFinding/python/PixelVertexes_cfi.py +++ b/RecoTracker/PixelVertexFinding/python/PixelVertexes_cfi.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms -from RecoPixelVertexing.PixelVertexFinding.PVClusterComparer_cfi import * +from RecoTracker.PixelVertexFinding.PVClusterComparer_cfi import * pixelVertices = cms.EDProducer("PixelVertexProducer", WtAverage = cms.bool(True), diff --git a/RecoPixelVertexing/PixelVertexFinding/python/fastPrimaryVertexProducer_cfi.py b/RecoTracker/PixelVertexFinding/python/fastPrimaryVertexProducer_cfi.py similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/python/fastPrimaryVertexProducer_cfi.py rename to RecoTracker/PixelVertexFinding/python/fastPrimaryVertexProducer_cfi.py diff --git a/RecoPixelVertexing/PixelVertexFinding/src/DivisiveVertexFinder.cc b/RecoTracker/PixelVertexFinding/src/DivisiveVertexFinder.cc similarity index 95% rename from RecoPixelVertexing/PixelVertexFinding/src/DivisiveVertexFinder.cc rename to RecoTracker/PixelVertexFinding/src/DivisiveVertexFinder.cc index 0769e500b190c..2f4ac048593f5 100644 --- a/RecoPixelVertexing/PixelVertexFinding/src/DivisiveVertexFinder.cc +++ b/RecoTracker/PixelVertexFinding/src/DivisiveVertexFinder.cc @@ -1,6 +1,6 @@ -#include "RecoPixelVertexing/PixelVertexFinding/interface/DivisiveVertexFinder.h" -#include "RecoPixelVertexing/PixelVertexFinding/interface/PVPositionBuilder.h" -#include "RecoPixelVertexing/PixelVertexFinding/interface/PVCluster.h" +#include "RecoTracker/PixelVertexFinding/interface/DivisiveVertexFinder.h" +#include "RecoTracker/PixelVertexFinding/interface/PVPositionBuilder.h" +#include "RecoTracker/PixelVertexFinding/interface/PVCluster.h" #include "DataFormats/GeometryCommonDetAlgo/interface/Measurement1D.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/Utilities/interface/isFinite.h" diff --git a/RecoPixelVertexing/PixelVertexFinding/src/PVClusterComparer.cc b/RecoTracker/PixelVertexFinding/src/PVClusterComparer.cc similarity index 97% rename from RecoPixelVertexing/PixelVertexFinding/src/PVClusterComparer.cc rename to RecoTracker/PixelVertexFinding/src/PVClusterComparer.cc index 56afb5d2dcdd4..f16727d810ffa 100644 --- a/RecoPixelVertexing/PixelVertexFinding/src/PVClusterComparer.cc +++ b/RecoTracker/PixelVertexFinding/src/PVClusterComparer.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelVertexFinding/interface/PVClusterComparer.h" +#include "RecoTracker/PixelVertexFinding/interface/PVClusterComparer.h" #include "DataFormats/TrackReco/interface/Track.h" #include "DataFormats/TrackReco/interface/TrackFwd.h" diff --git a/RecoPixelVertexing/PixelVertexFinding/src/PVPositionBuilder.cc b/RecoTracker/PixelVertexFinding/src/PVPositionBuilder.cc similarity index 94% rename from RecoPixelVertexing/PixelVertexFinding/src/PVPositionBuilder.cc rename to RecoTracker/PixelVertexFinding/src/PVPositionBuilder.cc index b87692f576dc4..38507a0942ff0 100644 --- a/RecoPixelVertexing/PixelVertexFinding/src/PVPositionBuilder.cc +++ b/RecoTracker/PixelVertexFinding/src/PVPositionBuilder.cc @@ -1,4 +1,4 @@ -#include "RecoPixelVertexing/PixelVertexFinding/interface/PVPositionBuilder.h" +#include "RecoTracker/PixelVertexFinding/interface/PVPositionBuilder.h" #include /// Constructor does nothing since this class has no data diff --git a/RecoPixelVertexing/PixelVertexFinding/test/BuildFile.xml b/RecoTracker/PixelVertexFinding/test/BuildFile.xml similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/test/BuildFile.xml rename to RecoTracker/PixelVertexFinding/test/BuildFile.xml diff --git a/RecoPixelVertexing/PixelVertexFinding/test/PixelTrackRoot.cc b/RecoTracker/PixelVertexFinding/test/PixelTrackRoot.cc similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/test/PixelTrackRoot.cc rename to RecoTracker/PixelVertexFinding/test/PixelTrackRoot.cc diff --git a/RecoPixelVertexing/PixelVertexFinding/test/PixelTrackRoot.h b/RecoTracker/PixelVertexFinding/test/PixelTrackRoot.h similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/test/PixelTrackRoot.h rename to RecoTracker/PixelVertexFinding/test/PixelTrackRoot.h diff --git a/RecoPixelVertexing/PixelVertexFinding/test/PixelVertexTest.cc b/RecoTracker/PixelVertexFinding/test/PixelVertexTest.cc similarity index 98% rename from RecoPixelVertexing/PixelVertexFinding/test/PixelVertexTest.cc rename to RecoTracker/PixelVertexFinding/test/PixelVertexTest.cc index afeb45daddcb4..a8c3dc6f729d0 100644 --- a/RecoPixelVertexing/PixelVertexFinding/test/PixelVertexTest.cc +++ b/RecoTracker/PixelVertexFinding/test/PixelVertexTest.cc @@ -21,8 +21,8 @@ //#include "SimDataFormats/HepMCProduct/interface/HepMCProduct.h" -#include "RecoPixelVertexing/PixelVertexFinding/interface/PVPositionBuilder.h" -#include "RecoPixelVertexing/PixelVertexFinding/interface/PVClusterComparer.h" +#include "RecoTracker/PixelVertexFinding/interface/PVPositionBuilder.h" +#include "RecoTracker/PixelVertexFinding/interface/PVClusterComparer.h" #include "MagneticField/Engine/interface/MagneticField.h" #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" diff --git a/RecoPixelVertexing/PixelVertexFinding/test/VertexFinder_t.h b/RecoTracker/PixelVertexFinding/test/VertexFinder_t.h similarity index 94% rename from RecoPixelVertexing/PixelVertexFinding/test/VertexFinder_t.h rename to RecoTracker/PixelVertexFinding/test/VertexFinder_t.h index ff3048c03f6a4..9d7494ae2036a 100644 --- a/RecoPixelVertexing/PixelVertexFinding/test/VertexFinder_t.h +++ b/RecoTracker/PixelVertexFinding/test/VertexFinder_t.h @@ -15,22 +15,22 @@ #include "CUDADataFormats/Vertex/interface/ZVertexSoAHeterogeneousHost.h" #include "CUDADataFormats/Vertex/interface/ZVertexSoAHeterogeneousDevice.h" -#include "RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexWorkSpaceUtilities.h" -#include "RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexWorkSpaceSoAHost.h" -#include "RecoPixelVertexing/PixelVertexFinding/plugins/PixelVertexWorkSpaceSoADevice.h" +#include "RecoTracker/PixelVertexFinding/plugins/PixelVertexWorkSpaceUtilities.h" +#include "RecoTracker/PixelVertexFinding/plugins/PixelVertexWorkSpaceSoAHost.h" +#include "RecoTracker/PixelVertexFinding/plugins/PixelVertexWorkSpaceSoADevice.h" #ifdef USE_DBSCAN -#include "RecoPixelVertexing/PixelVertexFinding/plugins/gpuClusterTracksDBSCAN.h" +#include "RecoTracker/PixelVertexFinding/plugins/gpuClusterTracksDBSCAN.h" #define CLUSTERIZE gpuVertexFinder::clusterTracksDBSCAN #elif USE_ITERATIVE -#include "RecoPixelVertexing/PixelVertexFinding/plugins/gpuClusterTracksIterative.h" +#include "RecoTracker/PixelVertexFinding/plugins/gpuClusterTracksIterative.h" #define CLUSTERIZE gpuVertexFinder::clusterTracksIterative #else -#include "RecoPixelVertexing/PixelVertexFinding/plugins/gpuClusterTracksByDensity.h" +#include "RecoTracker/PixelVertexFinding/plugins/gpuClusterTracksByDensity.h" #define CLUSTERIZE gpuVertexFinder::clusterTracksByDensityKernel #endif -#include "RecoPixelVertexing/PixelVertexFinding/plugins/gpuFitVertices.h" -#include "RecoPixelVertexing/PixelVertexFinding/plugins/gpuSortByPt2.h" -#include "RecoPixelVertexing/PixelVertexFinding/plugins/gpuSplitVertices.h" +#include "RecoTracker/PixelVertexFinding/plugins/gpuFitVertices.h" +#include "RecoTracker/PixelVertexFinding/plugins/gpuSortByPt2.h" +#include "RecoTracker/PixelVertexFinding/plugins/gpuSplitVertices.h" #ifdef ONE_KERNEL #ifdef __CUDACC__ diff --git a/RecoPixelVertexing/PixelVertexFinding/test/cpuVertexFinder_t.cpp b/RecoTracker/PixelVertexFinding/test/cpuVertexFinder_t.cpp similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/test/cpuVertexFinder_t.cpp rename to RecoTracker/PixelVertexFinding/test/cpuVertexFinder_t.cpp diff --git a/RecoPixelVertexing/PixelVertexFinding/test/gpuVertexFinder_t.cu b/RecoTracker/PixelVertexFinding/test/gpuVertexFinder_t.cu similarity index 100% rename from RecoPixelVertexing/PixelVertexFinding/test/gpuVertexFinder_t.cu rename to RecoTracker/PixelVertexFinding/test/gpuVertexFinder_t.cu diff --git a/RecoTracker/SpecialSeedGenerators/BuildFile.xml b/RecoTracker/SpecialSeedGenerators/BuildFile.xml index 28b4e0df7caca..d4d17a24513ad 100644 --- a/RecoTracker/SpecialSeedGenerators/BuildFile.xml +++ b/RecoTracker/SpecialSeedGenerators/BuildFile.xml @@ -13,7 +13,7 @@ - + diff --git a/RecoTracker/SpecialSeedGenerators/interface/GenericTripletGenerator.h b/RecoTracker/SpecialSeedGenerators/interface/GenericTripletGenerator.h index 85142f9574cf0..f381926822886 100644 --- a/RecoTracker/SpecialSeedGenerators/interface/GenericTripletGenerator.h +++ b/RecoTracker/SpecialSeedGenerators/interface/GenericTripletGenerator.h @@ -8,7 +8,7 @@ #include "RecoTracker/TkTrackingRegions/interface/OrderedHitsGenerator.h" #include "RecoTracker/TkTrackingRegions/interface/TrackingRegion.h" -#include "RecoPixelVertexing/PixelTriplets/interface/OrderedHitTriplets.h" +#include "RecoTracker/PixelSeeding/interface/OrderedHitTriplets.h" #include "RecoTracker/TkSeedingLayers/interface/OrderedSeedingHits.h" #include "TrackingTools/TransientTrackingRecHit/interface/SeedingLayerSetsHits.h" diff --git a/RecoTracker/SpecialSeedGenerators/interface/SeedGeneratorForCosmics.h b/RecoTracker/SpecialSeedGenerators/interface/SeedGeneratorForCosmics.h index b9d5ddcd994bc..ef286e5ec516a 100644 --- a/RecoTracker/SpecialSeedGenerators/interface/SeedGeneratorForCosmics.h +++ b/RecoTracker/SpecialSeedGenerators/interface/SeedGeneratorForCosmics.h @@ -21,7 +21,7 @@ #include "TrackingTools/KalmanUpdators/interface/KFUpdator.h" #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h" #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h" -#include "RecoPixelVertexing/PixelTriplets/interface/CosmicHitTripletGenerator.h" +#include "RecoTracker/PixelSeeding/interface/CosmicHitTripletGenerator.h" class PixelSeedLayerPairs; class GeometricSearchTracker; class TrackerRecoGeometryRecord; diff --git a/RecoTracker/SpecialSeedGenerators/interface/SimpleCosmicBONSeeder.h b/RecoTracker/SpecialSeedGenerators/interface/SimpleCosmicBONSeeder.h index ec2051908399a..378d48c6240a5 100644 --- a/RecoTracker/SpecialSeedGenerators/interface/SimpleCosmicBONSeeder.h +++ b/RecoTracker/SpecialSeedGenerators/interface/SimpleCosmicBONSeeder.h @@ -22,7 +22,7 @@ #include "MagneticField/Engine/interface/MagneticField.h" #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" -#include "RecoPixelVertexing/PixelTriplets/interface/OrderedHitTriplets.h" +#include "RecoTracker/PixelSeeding/interface/OrderedHitTriplets.h" #include "RecoTracker/TkTrackingRegions/interface/GlobalTrackingRegion.h" #include "RecoTracker/TkSeedGenerator/interface/FastCircle.h" #include "RecoTracker/TkSeedGenerator/interface/FastHelix.h" diff --git a/RecoTracker/SpecialSeedGenerators/src/SeedGeneratorForCosmics.cc b/RecoTracker/SpecialSeedGenerators/src/SeedGeneratorForCosmics.cc index f22625e1cef7b..a0d152cb3d7ad 100644 --- a/RecoTracker/SpecialSeedGenerators/src/SeedGeneratorForCosmics.cc +++ b/RecoTracker/SpecialSeedGenerators/src/SeedGeneratorForCosmics.cc @@ -1,6 +1,6 @@ #include "RecoTracker/SpecialSeedGenerators/interface/SeedGeneratorForCosmics.h" #include "RecoTracker/TkHitPairs/interface/CosmicLayerPairs.h" -#include "RecoPixelVertexing/PixelTriplets/interface/CosmicLayerTriplets.h" +#include "RecoTracker/PixelSeeding/interface/CosmicLayerTriplets.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/Utilities/interface/isFinite.h" #include "TrackingTools/Records/interface/TransientRecHitRecord.h" diff --git a/RecoTracker/TkSeedGenerator/plugins/BuildFile.xml b/RecoTracker/TkSeedGenerator/plugins/BuildFile.xml index 034890698cdc7..5999fef50b346 100644 --- a/RecoTracker/TkSeedGenerator/plugins/BuildFile.xml +++ b/RecoTracker/TkSeedGenerator/plugins/BuildFile.xml @@ -26,9 +26,9 @@ - - - + + + diff --git a/RecoTracker/TkSeedGenerator/plugins/CombinedMultiHitGenerator.cc b/RecoTracker/TkSeedGenerator/plugins/CombinedMultiHitGenerator.cc index a38c6730b4aff..0cdee3123dce1 100644 --- a/RecoTracker/TkSeedGenerator/plugins/CombinedMultiHitGenerator.cc +++ b/RecoTracker/TkSeedGenerator/plugins/CombinedMultiHitGenerator.cc @@ -3,7 +3,7 @@ #include "RecoTracker/TkHitPairs/interface/HitPairGeneratorFromLayerPair.h" #include "RecoTracker/TkSeedGenerator/interface/MultiHitGeneratorFromPairAndLayers.h" #include "RecoTracker/TkSeedGenerator/interface/MultiHitGeneratorFromPairAndLayersFactory.h" -#include "RecoPixelVertexing/PixelTriplets/interface/LayerTriplets.h" +#include "RecoTracker/PixelSeeding/interface/LayerTriplets.h" #include "FWCore/Framework/interface/ConsumesCollector.h" #include "FWCore/Framework/interface/Event.h" #include "DataFormats/Common/interface/Handle.h" diff --git a/RecoTracker/TkSeedGenerator/plugins/MultiHitFromChi2EDProducer.cc b/RecoTracker/TkSeedGenerator/plugins/MultiHitFromChi2EDProducer.cc index 3385be3523457..7eef51b99537a 100644 --- a/RecoTracker/TkSeedGenerator/plugins/MultiHitFromChi2EDProducer.cc +++ b/RecoTracker/TkSeedGenerator/plugins/MultiHitFromChi2EDProducer.cc @@ -11,7 +11,7 @@ #include "RecoTracker/TkHitPairs/interface/IntermediateHitDoublets.h" #include "RecoTracker/TkHitPairs/interface/RegionsSeedingHitSets.h" #include "DataFormats/Common/interface/OwnVector.h" -#include "RecoPixelVertexing/PixelTriplets/interface/LayerTriplets.h" +#include "RecoTracker/PixelSeeding/interface/LayerTriplets.h" #include "MultiHitGeneratorFromChi2.h" class MultiHitFromChi2EDProducer : public edm::stream::EDProducer<> { diff --git a/RecoTracker/TkSeedGenerator/plugins/MultiHitGeneratorFromChi2.cc b/RecoTracker/TkSeedGenerator/plugins/MultiHitGeneratorFromChi2.cc index d3b927a9ef4bb..8109cb8110581 100644 --- a/RecoTracker/TkSeedGenerator/plugins/MultiHitGeneratorFromChi2.cc +++ b/RecoTracker/TkSeedGenerator/plugins/MultiHitGeneratorFromChi2.cc @@ -1,8 +1,8 @@ #include "RecoTracker/TkSeedGenerator/plugins/MultiHitGeneratorFromChi2.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" -#include "RecoPixelVertexing/PixelTriplets/interface/ThirdHitPredictionFromCircle.h" -#include "RecoPixelVertexing/PixelTriplets/interface/ThirdHitRZPrediction.h" +#include "RecoTracker/PixelSeeding/interface/ThirdHitPredictionFromCircle.h" +#include "RecoTracker/PixelSeeding/interface/ThirdHitRZPrediction.h" #include "FWCore/Utilities/interface/ESInputTag.h" #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" @@ -12,7 +12,7 @@ #include "CommonTools/RecoAlgos/interface/KDTreeLinkerAlgo.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/RZLine.h" +#include "RecoTracker/PixelTrackFitting/interface/RZLine.h" #include "RecoTracker/TkSeedGenerator/interface/FastHelix.h" #include "DataFormats/SiStripDetId/interface/StripSubdetector.h" #include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h" diff --git a/RecoTracker/TkSeedGenerator/plugins/MultiHitGeneratorFromChi2.h b/RecoTracker/TkSeedGenerator/plugins/MultiHitGeneratorFromChi2.h index 35bb6dff11967..51b1da1bba305 100644 --- a/RecoTracker/TkSeedGenerator/plugins/MultiHitGeneratorFromChi2.h +++ b/RecoTracker/TkSeedGenerator/plugins/MultiHitGeneratorFromChi2.h @@ -15,7 +15,7 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Utilities/interface/ESGetToken.h" #include "RecoTracker/TkSeedGenerator/interface/MultiHitGeneratorFromPairAndLayers.h" -#include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" +#include "RecoTracker/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h" #include "RecoTracker/Record/interface/CkfComponentsRecord.h" #include "RecoTracker/TransientTrackingRecHit/interface/TkTransientTrackingRecHitBuilder.h" #include "TrackingTools/Records/interface/TransientRecHitRecord.h" diff --git a/RecoTracker/TkSeedGenerator/plugins/SeedProducerFromSoA.cc b/RecoTracker/TkSeedGenerator/plugins/SeedProducerFromSoA.cc index 11e865a7732da..09728bd43c104 100644 --- a/RecoTracker/TkSeedGenerator/plugins/SeedProducerFromSoA.cc +++ b/RecoTracker/TkSeedGenerator/plugins/SeedProducerFromSoA.cc @@ -22,7 +22,7 @@ #include "Geometry/Records/interface/TrackerTopologyRcd.h" #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/FitUtils.h" +#include "RecoTracker/PixelTrackFitting/interface/FitUtils.h" #include "TrackingTools/AnalyticalJacobians/interface/JacobianLocalToCurvilinear.h" #include "TrackingTools/MaterialEffects/interface/PropagatorWithMaterial.h" #include "TrackingTools/Records/interface/TrackingComponentsRecord.h" diff --git a/RecoTracker/TkSeedGenerator/python/GlobalSeedsFromTriplets_cff.py b/RecoTracker/TkSeedGenerator/python/GlobalSeedsFromTriplets_cff.py index 96c9ef1461aa1..c70ca81e0d88e 100644 --- a/RecoTracker/TkSeedGenerator/python/GlobalSeedsFromTriplets_cff.py +++ b/RecoTracker/TkSeedGenerator/python/GlobalSeedsFromTriplets_cff.py @@ -9,8 +9,8 @@ from RecoTracker.TkSeedingLayers.TTRHBuilderWithoutAngle4MixedPairs_cfi import * from RecoTracker.TkSeedingLayers.MixedLayerTriplets_cfi import * from RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi import * -from RecoPixelVertexing.PixelTriplets.PixelTripletHLTGenerator_cfi import * -#from RecoPixelVertexing.PixelTriplets.PixelTripletLargeTipGenerator_cfi import * +from RecoTracker.PixelSeeding.PixelTripletHLTGenerator_cfi import * +#from RecoTracker.PixelSeeding.PixelTripletLargeTipGenerator_cfi import * import RecoTracker.TkSeedGenerator.SeedGeneratorFromRegionHitsEDProducer_cfi globalSeedsFromTriplets = RecoTracker.TkSeedGenerator.SeedGeneratorFromRegionHitsEDProducer_cfi.seedGeneratorFromRegionHitsEDProducer.clone( diff --git a/RecoTracker/TkSeedGenerator/python/SeedGeneratorFromProtoTracksEDProducer_cff.py b/RecoTracker/TkSeedGenerator/python/SeedGeneratorFromProtoTracksEDProducer_cff.py index ea31ffb10ea69..2a20576a15793 100644 --- a/RecoTracker/TkSeedGenerator/python/SeedGeneratorFromProtoTracksEDProducer_cff.py +++ b/RecoTracker/TkSeedGenerator/python/SeedGeneratorFromProtoTracksEDProducer_cff.py @@ -9,7 +9,7 @@ from RecoTracker.TransientTrackingRecHit.TransientTrackingRecHitBuilder_cfi import * from RecoTracker.TkSeedingLayers.TTRHBuilderWithoutAngle4PixelTriplets_cfi import * from RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi import * -from RecoPixelVertexing.PixelTrackFitting.pixelTracks_cfi import pixelTracks +from RecoTracker.PixelTrackFitting.pixelTracks_cfi import pixelTracks from RecoTracker.TkSeedGenerator.SeedGeneratorFromProtoTracksEDProducer_cfi import * pixelTTRHBuilderWithoutAngle = ttrhbwr.clone( StripCPE = 'Fake', diff --git a/Validation/RecoTrack/plugins/BuildFile.xml b/Validation/RecoTrack/plugins/BuildFile.xml index b0284ed3f3618..089a3c17ed76b 100644 --- a/Validation/RecoTrack/plugins/BuildFile.xml +++ b/Validation/RecoTrack/plugins/BuildFile.xml @@ -20,7 +20,7 @@ - + diff --git a/Validation/RecoTrack/plugins/TrackingNtuple.cc b/Validation/RecoTrack/plugins/TrackingNtuple.cc index 9a60ce7c7e442..16a1ddecca341 100644 --- a/Validation/RecoTrack/plugins/TrackingNtuple.cc +++ b/Validation/RecoTrack/plugins/TrackingNtuple.cc @@ -48,7 +48,7 @@ #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h" #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h" #include "TrackingTools/TrajectoryState/interface/TrajectoryStateTransform.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/RZLine.h" +#include "RecoTracker/PixelTrackFitting/interface/RZLine.h" #include "TrackingTools/PatternTools/interface/TSCBLBuilderNoMaterial.h" #include "TrackingTools/TrajectoryState/interface/PerigeeConversions.h" From a7e417897841c2e736fa1ee386f2c24921af7d99 Mon Sep 17 00:00:00 2001 From: mmusich Date: Wed, 15 Mar 2023 09:22:26 +0100 Subject: [PATCH 053/233] code-format in RecoTracker/PixelVertexFinding/ --- .../PixelVertexFinding/test/PixelTrackRoot.cc | 147 ++++++++-------- .../PixelVertexFinding/test/PixelTrackRoot.h | 1 - .../test/PixelVertexTest.cc | 157 +++++++++--------- 3 files changed, 147 insertions(+), 158 deletions(-) diff --git a/RecoTracker/PixelVertexFinding/test/PixelTrackRoot.cc b/RecoTracker/PixelVertexFinding/test/PixelTrackRoot.cc index d673938982908..6f2696608921d 100644 --- a/RecoTracker/PixelVertexFinding/test/PixelTrackRoot.cc +++ b/RecoTracker/PixelVertexFinding/test/PixelTrackRoot.cc @@ -21,16 +21,17 @@ class PixelTrackRoot : public edm::EDAnalyzer { public: explicit PixelTrackRoot(const edm::ParameterSet& conf); ~PixelTrackRoot(); - virtual void beginJob() { } + virtual void beginJob() {} virtual void analyze(const edm::Event& ev, const edm::EventSetup& es); - virtual void endJob() { } + virtual void endJob() {} void book(); void store(); + private: - TFile *rootfile; - TTree *tthtree; + TFile* rootfile; + TTree* tthtree; int Event; - static const int numMaxTrks=100; + static const int numMaxTrks = 100; int CMNumTrk; float CMTrkVtx[numMaxTrks]; float CMTrkPt[numMaxTrks]; @@ -48,96 +49,88 @@ class PixelTrackRoot : public edm::EDAnalyzer { float SiTrkIP[numMaxTrks]; }; -PixelTrackRoot::PixelTrackRoot(const edm::ParameterSet& conf) -{ - rootfile = new TFile("pixel_parameters.root","RECREATE"); - tthtree = new TTree("T","pixTracTestCP"); +PixelTrackRoot::PixelTrackRoot(const edm::ParameterSet& conf) { + rootfile = new TFile("pixel_parameters.root", "RECREATE"); + tthtree = new TTree("T", "pixTracTestCP"); book(); - edm::LogInfo("PixelTrackRoot")<<" CTOR"; + edm::LogInfo("PixelTrackRoot") << " CTOR"; } -PixelTrackRoot::~PixelTrackRoot() -{ +PixelTrackRoot::~PixelTrackRoot() { rootfile->cd(); tthtree->Write(); rootfile->Close(); delete rootfile; - edm::LogInfo("PixelTrackRoot")<<" DTOR"; + edm::LogInfo("PixelTrackRoot") << " DTOR"; } -void PixelTrackRoot::analyze( - const edm::Event& ev, const edm::EventSetup& es) -{ +void PixelTrackRoot::analyze(const edm::Event& ev, const edm::EventSetup& es) { typedef reco::TrackCollection::const_iterator IT; edm::Handle trackCollection1; - ev.getByLabel("tracks1",trackCollection1); + ev.getByLabel("tracks1", trackCollection1); const reco::TrackCollection tracks1 = *(trackCollection1.product()); - CMNumTrk= tracks1.size(); - Event=ev.id().event(); - int i =0; - for (IT it=tracks1.begin(); it!=tracks1.end(); it++){ -// myfillCM(*it); - CMTrkP[i]=it->p(); - CMTrkVtx[i]=10*(it->vertex().z()); - CMTrkPt[i]=it->pt(); - CMTrkIP[i]=it->dz(); - i++; + CMNumTrk = tracks1.size(); + Event = ev.id().event(); + int i = 0; + for (IT it = tracks1.begin(); it != tracks1.end(); it++) { + // myfillCM(*it); + CMTrkP[i] = it->p(); + CMTrkVtx[i] = 10 * (it->vertex().z()); + CMTrkPt[i] = it->pt(); + CMTrkIP[i] = it->dz(); + i++; } - i=0; - edm::Handle trackCollection2; - ev.getByLabel("tracks2",trackCollection2); - const reco::TrackCollection tracks2 = *(trackCollection2.product()); + i = 0; + edm::Handle trackCollection2; + ev.getByLabel("tracks2", trackCollection2); + const reco::TrackCollection tracks2 = *(trackCollection2.product()); HPNumTrk = tracks2.size(); - for (IT it=tracks2.begin(); it!=tracks2.end(); it++) { -//myfillHP(*it); -// store(); - HPTrkP[i]=it->p(); - HPTrkVtx[i]=10*(it->vertex().z()); - HPTrkPt[i]=it->pt(); - HPTrkIP[i]=it->dz(); - i++; - } - i=0; + for (IT it = tracks2.begin(); it != tracks2.end(); it++) { + //myfillHP(*it); + // store(); + HPTrkP[i] = it->p(); + HPTrkVtx[i] = 10 * (it->vertex().z()); + HPTrkPt[i] = it->pt(); + HPTrkIP[i] = it->dz(); + i++; + } + i = 0; edm::Handle silTracks; - ev.getByLabel("trackp",silTracks); - const reco::TrackCollection SiliconTrks = *(silTracks.product()); -// std::cout << "Silicon Tracks Size: "<< SiliconTrks.size()<p(); - SiTrkVtx[i]=10*(it->vertex().z()); - SiTrkPt[i]=it->pt(); - SiTrkIP[i]=it->dz(); - i++; - } + for (IT it = SiliconTrks.begin(); it != SiliconTrks.end(); it++) { + //myfillHP(*it); + // store(); + SiTrkP[i] = it->p(); + SiTrkVtx[i] = 10 * (it->vertex().z()); + SiTrkPt[i] = it->pt(); + SiTrkIP[i] = it->dz(); + i++; + } -store(); + store(); } -void PixelTrackRoot::book() -{ - tthtree->Branch("Event",&Event,"Event/I"); - tthtree->Branch("CMNumTracks", &CMNumTrk,"CMNumTrk/I"); - tthtree->Branch("CMTrackVtx", &CMTrkVtx,"CMTrkVtx[CMNumTrk]/F"); - tthtree->Branch("CMTrkPT", &CMTrkPt,"CMTrkPt[CMNumTrk]/F"); - tthtree->Branch("CMTrkMomentum", &CMTrkP,"CMTrkP[CMNumTrk]/F"); - tthtree->Branch("CMTrkImpactParam",&CMTrkIP,"CMTrkIP[CMNumTrk]/F"); - tthtree->Branch("HPNumTracks", &HPNumTrk,"HPNumTrk/I"); - tthtree->Branch("HPTrackVtx", &HPTrkVtx,"HPTrkVtx[HPNumTrk]/F"); - tthtree->Branch("HPTrkPT", &HPTrkPt,"HPTrkPt[HPNumTrk]/F"); - tthtree->Branch("HPTrkMomentum", &HPTrkP,"HPTrkP[HPNumTrk]/F"); - tthtree->Branch("TrkImpactParam",&HPTrkIP,"HPTrkIP[HPNumTrk]/F"); - tthtree->Branch("SiNumTracks", &SiNumTrk,"SiNumTrk/I"); - tthtree->Branch("SiTrackVtx", &SiTrkVtx,"SiTrkVtx[SiNumTrk]/F"); - tthtree->Branch("SiTrkPT", &SiTrkPt,"SiTrkPt[SiNumTrk]/F"); - tthtree->Branch("SiTrkMomentum", &SiTrkP,"SiTrkP[SiNumTrk]/F"); - tthtree->Branch("SiTrkImpactParam",&SiTrkIP,"SiTrkIP[SiNumTrk]/F"); - +void PixelTrackRoot::book() { + tthtree->Branch("Event", &Event, "Event/I"); + tthtree->Branch("CMNumTracks", &CMNumTrk, "CMNumTrk/I"); + tthtree->Branch("CMTrackVtx", &CMTrkVtx, "CMTrkVtx[CMNumTrk]/F"); + tthtree->Branch("CMTrkPT", &CMTrkPt, "CMTrkPt[CMNumTrk]/F"); + tthtree->Branch("CMTrkMomentum", &CMTrkP, "CMTrkP[CMNumTrk]/F"); + tthtree->Branch("CMTrkImpactParam", &CMTrkIP, "CMTrkIP[CMNumTrk]/F"); + tthtree->Branch("HPNumTracks", &HPNumTrk, "HPNumTrk/I"); + tthtree->Branch("HPTrackVtx", &HPTrkVtx, "HPTrkVtx[HPNumTrk]/F"); + tthtree->Branch("HPTrkPT", &HPTrkPt, "HPTrkPt[HPNumTrk]/F"); + tthtree->Branch("HPTrkMomentum", &HPTrkP, "HPTrkP[HPNumTrk]/F"); + tthtree->Branch("TrkImpactParam", &HPTrkIP, "HPTrkIP[HPNumTrk]/F"); + tthtree->Branch("SiNumTracks", &SiNumTrk, "SiNumTrk/I"); + tthtree->Branch("SiTrackVtx", &SiTrkVtx, "SiTrkVtx[SiNumTrk]/F"); + tthtree->Branch("SiTrkPT", &SiTrkPt, "SiTrkPt[SiNumTrk]/F"); + tthtree->Branch("SiTrkMomentum", &SiTrkP, "SiTrkP[SiNumTrk]/F"); + tthtree->Branch("SiTrkImpactParam", &SiTrkIP, "SiTrkIP[SiNumTrk]/F"); } -void PixelTrackRoot::store(){ -tthtree->Fill(); -} - +void PixelTrackRoot::store() { tthtree->Fill(); } + DEFINE_FWK_MODULE(PixelTrackRoot); diff --git a/RecoTracker/PixelVertexFinding/test/PixelTrackRoot.h b/RecoTracker/PixelVertexFinding/test/PixelTrackRoot.h index 0c39fba8278b1..27ac456938fb3 100644 --- a/RecoTracker/PixelVertexFinding/test/PixelTrackRoot.h +++ b/RecoTracker/PixelVertexFinding/test/PixelTrackRoot.h @@ -11,4 +11,3 @@ #include #include #include - diff --git a/RecoTracker/PixelVertexFinding/test/PixelVertexTest.cc b/RecoTracker/PixelVertexFinding/test/PixelVertexTest.cc index a8c3dc6f729d0..56b6953d4abd5 100644 --- a/RecoTracker/PixelVertexFinding/test/PixelVertexTest.cc +++ b/RecoTracker/PixelVertexFinding/test/PixelVertexTest.cc @@ -49,22 +49,23 @@ class PixelVertexTest : public edm::EDAnalyzer { virtual void beginJob(); virtual void analyze(const edm::Event& ev, const edm::EventSetup& es); virtual void endJob(); + private: - edm::ParameterSet conf_; + edm::ParameterSet conf_; // How noisy should I be int verbose_; // Tree of simple vars for testing resolution eff etc - TTree *t_; - TFile *f_; + TTree* t_; + TFile* f_; int ntrk_; - static const int maxtrk_=1000; + static const int maxtrk_ = 1000; double pt_[maxtrk_]; double z0_[maxtrk_]; double errz0_[maxtrk_]; // double tanl_[maxtrk_]; double theta_[maxtrk_]; int nvtx_; - static const int maxvtx_=15; + static const int maxvtx_ = 15; double vz_[maxvtx_]; double vzwt_[maxvtx_]; double errvz_[maxvtx_]; @@ -83,104 +84,97 @@ class PixelVertexTest : public edm::EDAnalyzer { double vzkal_[maxvtx_]; }; -PixelVertexTest::PixelVertexTest(const edm::ParameterSet& conf) - : conf_(conf),t_(0),f_(0) -{ - edm::LogInfo("PixelVertexTest")<<" CTOR"; +PixelVertexTest::PixelVertexTest(const edm::ParameterSet& conf) : conf_(conf), t_(0), f_(0) { + edm::LogInfo("PixelVertexTest") << " CTOR"; } -PixelVertexTest::~PixelVertexTest() -{ - edm::LogInfo("PixelVertexTest")<<" DTOR"; +PixelVertexTest::~PixelVertexTest() { + edm::LogInfo("PixelVertexTest") << " DTOR"; delete f_; // delete t_; } void PixelVertexTest::beginJob() { // How noisy? - verbose_ = conf_.getUntrackedParameter("Verbosity",0); + verbose_ = conf_.getUntrackedParameter("Verbosity", 0); // Make my little tree - std::string file = conf_.getUntrackedParameter("OutputTree","mytree.root"); - const char* cwd= gDirectory->GetPath(); - f_ = new TFile(file.c_str(),"RECREATE"); - t_ = new TTree("t","Pixel Vertex Testing"); - t_->Branch("nvtx",&nvtx_,"nvtx/I"); - t_->Branch("vz",vz_,"vz[nvtx]/D"); - t_->Branch("errvz",errvz_,"errvz[nvtx]/D"); - t_->Branch("vzwt",vzwt_,"vzwt[nvtx]/D"); - t_->Branch("errvzwt",errvzwt_,"errvzwt[nvtx]/D"); - t_->Branch("nvtx2",&nvtx2_,"nvtx2/I"); - t_->Branch("vz2",vz2_,"vz2[nvtx2]/D"); - t_->Branch("trk2avg",trk2avg_,"trk2avg[nvtx2]/D"); - t_->Branch("errvz2",errvz2_,"errvz2[nvtx2]/D"); - t_->Branch("ntrk2",ntrk2_,"ntrk2[nvtx2]/I"); - t_->Branch("sumpt2",sumpt2_,"sumpt2[nvtx2]/D"); - t_->Branch("ntrk",&ntrk_,"ntrk/I"); - t_->Branch("pt",pt_,"pt[ntrk]/D"); - t_->Branch("z0",z0_,"z0[ntrk]/D"); - t_->Branch("errz0",errz0_,"errz0[ntrk]/D"); + std::string file = conf_.getUntrackedParameter("OutputTree", "mytree.root"); + const char* cwd = gDirectory->GetPath(); + f_ = new TFile(file.c_str(), "RECREATE"); + t_ = new TTree("t", "Pixel Vertex Testing"); + t_->Branch("nvtx", &nvtx_, "nvtx/I"); + t_->Branch("vz", vz_, "vz[nvtx]/D"); + t_->Branch("errvz", errvz_, "errvz[nvtx]/D"); + t_->Branch("vzwt", vzwt_, "vzwt[nvtx]/D"); + t_->Branch("errvzwt", errvzwt_, "errvzwt[nvtx]/D"); + t_->Branch("nvtx2", &nvtx2_, "nvtx2/I"); + t_->Branch("vz2", vz2_, "vz2[nvtx2]/D"); + t_->Branch("trk2avg", trk2avg_, "trk2avg[nvtx2]/D"); + t_->Branch("errvz2", errvz2_, "errvz2[nvtx2]/D"); + t_->Branch("ntrk2", ntrk2_, "ntrk2[nvtx2]/I"); + t_->Branch("sumpt2", sumpt2_, "sumpt2[nvtx2]/D"); + t_->Branch("ntrk", &ntrk_, "ntrk/I"); + t_->Branch("pt", pt_, "pt[ntrk]/D"); + t_->Branch("z0", z0_, "z0[ntrk]/D"); + t_->Branch("errz0", errz0_, "errz0[ntrk]/D"); // t_->Branch("tanl",tanl_,"tanl[ntrk]/D"); - t_->Branch("theta",theta_,"theta[ntrk]/D"); - t_->Branch("simx",&simx_,"simx/D"); - t_->Branch("simy",&simy_,"simy/D"); - t_->Branch("simz",&simz_,"simz/D"); - t_->Branch("vxkal",vxkal_,"vxkal[nvtx2]/D"); - t_->Branch("vykal",vykal_,"vykal[nvtx2]/D"); - t_->Branch("vzkal",vzkal_,"vzkal[nvtx2]/D"); + t_->Branch("theta", theta_, "theta[ntrk]/D"); + t_->Branch("simx", &simx_, "simx/D"); + t_->Branch("simy", &simy_, "simy/D"); + t_->Branch("simz", &simz_, "simz/D"); + t_->Branch("vxkal", vxkal_, "vxkal[nvtx2]/D"); + t_->Branch("vykal", vykal_, "vykal[nvtx2]/D"); + t_->Branch("vzkal", vzkal_, "vzkal[nvtx2]/D"); gDirectory->cd(cwd); } -void PixelVertexTest::analyze( - const edm::Event& ev, const edm::EventSetup& es) -{ - cout <<"*** PixelVertexTest, analyze event: " << ev.id() << endl; +void PixelVertexTest::analyze(const edm::Event& ev, const edm::EventSetup& es) { + cout << "*** PixelVertexTest, analyze event: " << ev.id() << endl; edm::ESHandle field; es.get().get(field); - edm::InputTag simG4 = conf_.getParameter( "simG4" ); + edm::InputTag simG4 = conf_.getParameter("simG4"); edm::Handle simVtcs; - ev.getByLabel( simG4, simVtcs); + ev.getByLabel(simG4, simVtcs); if (verbose_ > 0) { - cout << "simulated vertices: "<< simVtcs->size() << std::endl; + cout << "simulated vertices: " << simVtcs->size() << std::endl; } -// simx_ = (simVtcs->size() > 0) ? (*simVtcs)[0].position().x()/10 : -9999.0; -// simy_ = (simVtcs->size() > 0) ? (*simVtcs)[0].position().y()/10 : -9999.0; -// simz_ = (simVtcs->size() > 0) ? (*simVtcs)[0].position().z()/10 : -9999.0; -// No longer need to convert from mm as of version 1_2_0 + // simx_ = (simVtcs->size() > 0) ? (*simVtcs)[0].position().x()/10 : -9999.0; + // simy_ = (simVtcs->size() > 0) ? (*simVtcs)[0].position().y()/10 : -9999.0; + // simz_ = (simVtcs->size() > 0) ? (*simVtcs)[0].position().z()/10 : -9999.0; + // No longer need to convert from mm as of version 1_2_0 simx_ = (simVtcs->size() > 0) ? (*simVtcs)[0].position().x() : -9999.0; simy_ = (simVtcs->size() > 0) ? (*simVtcs)[0].position().y() : -9999.0; simz_ = (simVtcs->size() > 0) ? (*simVtcs)[0].position().z() : -9999.0; if (verbose_ > 1) { - for (int i=0; isize(); i++) { - std::cout << (*simVtcs)[i].parentIndex() << ": " << (*simVtcs)[i].position().x() << ", " << (*simVtcs)[i].position().y() << ", " << (*simVtcs)[i].position().z() << "; "; + for (int i = 0; i < simVtcs->size(); i++) { + std::cout << (*simVtcs)[i].parentIndex() << ": " << (*simVtcs)[i].position().x() << ", " + << (*simVtcs)[i].position().y() << ", " << (*simVtcs)[i].position().z() << "; "; } std::cout << "\n" << std::endl; } - edm::Handle trackCollection; std::string trackCollName = conf_.getParameter("TrackCollection"); - ev.getByLabel(trackCollName,trackCollection); + ev.getByLabel(trackCollName, trackCollection); const reco::TrackCollection tracks = *(trackCollection.product()); reco::TrackRefVector trks; if (verbose_ > 0) { std::cout << *(trackCollection.provenance()) << std::endl; - cout << "Reconstructed "<< tracks.size() << " tracks" << std::endl; + cout << "Reconstructed " << tracks.size() << " tracks" << std::endl; } - ntrk_=0; - for (unsigned int i=0; i 0) { - cout << "\tmomentum: " << tracks[i].momentum() - << "\tPT: " << tracks[i].pt()<< endl; - cout << "\tvertex: " << tracks[i].vertex() - << "\tZ0: " << tracks[i].dz() << " +- " << tracks[i].dzError() << endl; - cout << "\tcharge: " << tracks[i].charge()<< endl; + cout << "\tmomentum: " << tracks[i].momentum() << "\tPT: " << tracks[i].pt() << endl; + cout << "\tvertex: " << tracks[i].vertex() << "\tZ0: " << tracks[i].dz() << " +- " << tracks[i].dzError() << endl; + cout << "\tcharge: " << tracks[i].charge() << endl; } - trks.push_back( reco::TrackRef(trackCollection, i) ); + trks.push_back(reco::TrackRef(trackCollection, i)); // Fill ntuple vars if (ntrk_ < maxtrk_) { pt_[ntrk_] = tracks[i].pt(); @@ -191,9 +185,10 @@ void PixelVertexTest::analyze( theta_[ntrk_] = tracks[i].theta(); ntrk_++; } - if (verbose_ > 0) cout <<"------------------------------------------------"< 0) + cout << "------------------------------------------------" << endl; } - PVPositionBuilder pos; + PVPositionBuilder pos; nvtx_ = 0; vz_[nvtx_] = pos.average(trks).value(); errvz_[nvtx_] = pos.average(trks).error(); @@ -202,58 +197,60 @@ void PixelVertexTest::analyze( nvtx_++; if (verbose_ > 0) { std::cout << "The average z-position of these tracks is " << vz_[0] << " +- " << errvz_[0] << std::endl; - std::cout << "The weighted average z-position of these tracks is " << vzwt_[0] << " +- " << errvzwt_[0] << std::endl; + std::cout << "The weighted average z-position of these tracks is " << vzwt_[0] << " +- " << errvzwt_[0] + << std::endl; } // NOW let's see if my vertex producer did a darn thing... edm::Handle vertexCollection; - ev.getByLabel("pixelVertices",vertexCollection); + ev.getByLabel("pixelVertices", vertexCollection); const reco::VertexCollection vertexes = *(vertexCollection.product()); if (verbose_ > 0) { std::cout << *(vertexCollection.provenance()) << std::endl; - cout << "Reconstructed "<< vertexes.size() << " vertexes" << std::endl; + cout << "Reconstructed " << vertexes.size() << " vertexes" << std::endl; } nvtx2_ = vertexes.size(); PVClusterComparer vcompare; - for (int i=0; i 0) { vector t_tks; - for (int i=0; i0) std::cout << "Kalman Position: " << reco::Vertex::Point(tv.position()) << std::endl; + if (verbose_ > 0) + std::cout << "Kalman Position: " << reco::Vertex::Point(tv.position()) << std::endl; vxkal_[i] = tv.position().x(); vykal_[i] = tv.position().y(); vzkal_[i] = tv.position().z(); } } - - // Finally, fill the tree with the above values t_->Fill(); } void PixelVertexTest::endJob() { - if (t_) t_->Print(); + if (t_) + t_->Print(); if (f_) { f_->Print(); f_->Write(); From 1ecd5da77549aad482bb4c12e3fd18ea3fc8e258 Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Wed, 15 Mar 2023 17:00:22 +0100 Subject: [PATCH 054/233] save decommissioned taggers for older Nano eras and infer new PNet nodes for Run-2 UL --- .../NanoAOD/python/jetsAK4_CHS_cff.py | 14 ++++- .../NanoAOD/python/jetsAK4_Puppi_cff.py | 2 +- PhysicsTools/NanoAOD/python/jetsAK8_cff.py | 53 ++++++++++++++++--- PhysicsTools/NanoAOD/python/nano_cff.py | 12 +++++ 4 files changed, 71 insertions(+), 10 deletions(-) diff --git a/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py b/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py index 23bde64545221..9acfe2b28254c 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py @@ -181,6 +181,19 @@ btagCSVV2 = Var("bDiscriminator('pfCombinedInclusiveSecondaryVertexV2BJetTags')",float,doc=" pfCombinedInclusiveSecondaryVertexV2 b-tag discriminator (aka CSVV2)",precision=10) ) +(run3_nanoAOD_122 | run3_nanoAOD_124).toModify( + # New ParticleNet trainings are not available in MiniAOD until Run3 13X + jetTable.variables, + btagPNetB = None, + btagPNetCvL = None, + btagPNetCvB = None, + btagPNetQvG = None, + btagPNetTauVJet = None, + PNetRegPtRawCorr = None, + PNetRegPtRawCorrNeutrino = None, + PNetRegPtRawRes = None +) + bjetNN = cms.EDProducer("BJetEnergyRegressionMVA", backend = cms.string("ONNX"), batch_eval = cms.bool(True), @@ -325,7 +338,6 @@ pileupJetIdNano, algos = _chsalgos_106X_UL16APV ) - ############################################################## ## DeepInfoAK4CHS:Start ## - To be used in nanoAOD_customizeCommon() in nano_cff.py diff --git a/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py b/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py index 8c62ea45a5864..b9fa94a5d7c66 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py @@ -110,7 +110,7 @@ ) ) -from PhysicsTools.NanoAOD.nano_eras_cff import run2_nanoAOD_ANY +from PhysicsTools.NanoAOD.nano_eras_cff import run2_nanoAOD_ANY,run3_nanoAOD_122,run3_nanoAOD_124 run2_nanoAOD_ANY.toModify( jetPuppiTable.variables, btagCSVV2 = Var("bDiscriminator('pfCombinedInclusiveSecondaryVertexV2BJetTags')",float,doc=" pfCombinedInclusiveSecondaryVertexV2 b-tag discriminator (aka CSVV2)",precision=10) diff --git a/PhysicsTools/NanoAOD/python/jetsAK8_cff.py b/PhysicsTools/NanoAOD/python/jetsAK8_cff.py index 2a9ee5c8a49ee..0c9b8e4e91e04 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK8_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK8_cff.py @@ -110,14 +110,6 @@ particleNet_QCD1HF = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD1hf')",float,doc="ParticleNet tagger QCD 1 HF (b/c) score",precision=10), particleNet_QCD0HF = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD0hf')",float,doc="ParticleNet tagger QCD 0 HF (b/c) score",precision=10), particleNet_massCorr = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:masscorr')",float,doc="ParticleNet mass regression, relative correction to JEC-corrected jet mass (no softdrop)",precision=10), - particleNet_Xbb = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHbb')",float,doc="ParticleNet tagger raw X->bb score. For X->bb vs QCD tagging, use Xbb/(Xbb+QCD)",precision=10), - particleNet_Xcc = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHcc')",float,doc="ParticleNet tagger raw X->cc score. For X->cc vs QCD tagging, use Xcc/(Xcc+QCD)",precision=10), - particleNet_Xqq = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHqq')",float,doc="ParticleNet tagger raw X->qq (uds) score. For X->qq vs QCD tagging, use Xqq/(Xqq+QCD). For W vs QCD tagging, use (Xcc+Xqq)/(Xcc+Xqq+QCD)",precision=10), - particleNet_Xgg = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHgg')",float,doc="ParticleNet tagger raw X->gg score. For X->gg vs QCD tagging, use Xgg/(Xgg+QCD)",precision=10), - particleNet_Xtt = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHtt')",float,doc="ParticleNet tagger raw X->tau_h tau_h score. For X->tau_h tau_h vs QCD tagging, use Xtt/(Xtt+QCD)",precision=10), - particleNet_Xtm = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHtm')",float,doc="ParticleNet tagger raw X-> mu tau_h score. For X->mu tau_h vs QCD tagging, use Xtm/(Xtm+QCD)",precision=10), - particleNet_Xte = Var("bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probHte')",float,doc="ParticleNet tagger raw X-> e tau_h score. For X->e tau_h vs QCD tagging, use Xte/(Xte+QCD)",precision=10), - # explicitly combine tagger vs. QCD scores, for convenience particleNet_XbbVsQCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HbbvsQCD')",float,doc="ParticleNet X->bb vs. QCD score: Xbb/(Xbb+QCD)",precision=10), particleNet_XccVsQCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HccvsQCD')",float,doc="ParticleNet X->cc vs. QCD score: Xcc/(Xcc+QCD)",precision=10), particleNet_XqqVsQCD = Var("bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HqqvsQCD')",float,doc="ParticleNet X->qq (uds) vs. QCD score: Xqq/(Xqq+QCD)",precision=10), @@ -142,6 +134,51 @@ fatJetTable.variables, btagCSVV2 = Var("bDiscriminator('pfCombinedInclusiveSecondaryVertexV2BJetTags')",float,doc=" pfCombinedInclusiveSecondaryVertexV2 b-tag discriminator (aka CSVV2)",precision=10) ) +(run3_nanoAOD_122 | run3_nanoAOD_124).toModify( + # New ParticleNet trainings are not available in MiniAOD until Run3 13X + fatJetTable.variables, + particleNet_QCD = None, + particleNet_QCD2HF = None, + particleNet_QCD1HF = None, + particleNet_QCD0HF = None, + particleNet_massCorr = None, + particleNet_XbbVsQCD = None, + particleNet_XccVsQCD = None, + particleNet_XqqVsQCD = None, + particleNet_XggVsQCD = None, + particleNet_XttVsQCD = None, + particleNet_XtmVsQCD = None, + particleNet_XteVsQCD = None, +) + +(run2_nanoAOD_106Xv2 | run3_nanoAOD_122 | run3_nanoAOD_124).toModify( + fatJetTable.variables, + + # Restore taggers that were decommisionned for Run-3 + deepTag_TvsQCD = Var("bDiscriminator('pfDeepBoostedDiscriminatorsJetTags:TvsQCD')",float,doc="DeepBoostedJet tagger top vs QCD discriminator",precision=10), + deepTag_WvsQCD = Var("bDiscriminator('pfDeepBoostedDiscriminatorsJetTags:WvsQCD')",float,doc="DeepBoostedJet tagger W vs QCD discriminator",precision=10), + deepTag_ZvsQCD = Var("bDiscriminator('pfDeepBoostedDiscriminatorsJetTags:ZvsQCD')",float,doc="DeepBoostedJet tagger Z vs QCD discriminator",precision=10), + deepTag_H = Var("bDiscriminator('pfDeepBoostedJetTags:probHbb')+bDiscriminator('pfDeepBoostedJetTags:probHcc')+bDiscriminator('pfDeepBoostedJetTags:probHqqqq')",float,doc="DeepBoostedJet tagger H(bb,cc,4q) sum",precision=10), + deepTag_QCD = Var("bDiscriminator('pfDeepBoostedJetTags:probQCDbb')+bDiscriminator('pfDeepBoostedJetTags:probQCDcc')+bDiscriminator('pfDeepBoostedJetTags:probQCDb')+bDiscriminator('pfDeepBoostedJetTags:probQCDc')+bDiscriminator('pfDeepBoostedJetTags:probQCDothers')",float,doc="DeepBoostedJet tagger QCD(bb,cc,b,c,others) sum",precision=10), + deepTag_QCDothers = Var("bDiscriminator('pfDeepBoostedJetTags:probQCDothers')",float,doc="DeepBoostedJet tagger QCDothers value",precision=10), + deepTagMD_TvsQCD = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:TvsQCD')",float,doc="Mass-decorrelated DeepBoostedJet tagger top vs QCD discriminator",precision=10), + deepTagMD_WvsQCD = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:WvsQCD')",float,doc="Mass-decorrelated DeepBoostedJet tagger W vs QCD discriminator",precision=10), + deepTagMD_ZvsQCD = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:ZvsQCD')",float,doc="Mass-decorrelated DeepBoostedJet tagger Z vs QCD discriminator",precision=10), + deepTagMD_ZHbbvsQCD = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:ZHbbvsQCD')",float,doc="Mass-decorrelated DeepBoostedJet tagger Z/H->bb vs QCD discriminator",precision=10), + deepTagMD_ZbbvsQCD = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:ZbbvsQCD')",float,doc="Mass-decorrelated DeepBoostedJet tagger Z->bb vs QCD discriminator",precision=10), + deepTagMD_HbbvsQCD = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:HbbvsQCD')",float,doc="Mass-decorrelated DeepBoostedJet tagger H->bb vs QCD discriminator",precision=10), + deepTagMD_ZHccvsQCD = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:ZHccvsQCD')",float,doc="Mass-decorrelated DeepBoostedJet tagger Z/H->cc vs QCD discriminator",precision=10), + deepTagMD_H4qvsQCD = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:H4qvsQCD')",float,doc="Mass-decorrelated DeepBoostedJet tagger H->4q vs QCD discriminator",precision=10), + deepTagMD_bbvsLight = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:bbvsLight')",float,doc="Mass-decorrelated DeepBoostedJet tagger Z/H/gluon->bb vs light flavour discriminator",precision=10), + deepTagMD_ccvsLight = Var("bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:ccvsLight')",float,doc="Mass-decorrelated DeepBoostedJet tagger Z/H/gluon->cc vs light flavour discriminator",precision=10), + particleNetLegacy_mass = Var("bDiscriminator('pfParticleNetMassRegressionJetTags:mass')",float,doc="ParticleNet Legacy Run-2 mass regression",precision=10), + particleNetLegacy_Xbb = Var("bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probXbb')",float,doc="Mass-decorrelated ParticleNet Legacy Run-2 tagger raw X->bb score. For X->bb vs QCD tagging, use Xbb/(Xbb+QCD)",precision=10), + particleNetLegacy_Xcc = Var("bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probXcc')",float,doc="Mass-decorrelated ParticleNet Legacy Run-2 tagger raw X->cc score. For X->cc vs QCD tagging, use Xcc/(Xcc+QCD)",precision=10), + particleNetLegacy_Xqq = Var("bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probXqq')",float,doc="Mass-decorrelated ParticleNet Legacy Run-2 tagger raw X->qq (uds) score. For X->qq vs QCD tagging, use Xqq/(Xqq+QCD). For W vs QCD tagging, use (Xcc+Xqq)/(Xcc+Xqq+QCD)",precision=10), + particleNetLegacy_QCD = Var("bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probQCDbb')+bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probQCDcc')+bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probQCDb')+bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probQCDc')+bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probQCDothers')",float,doc="Mass-decorrelated ParticleNet Legacy Run-2 tagger raw QCD score",precision=10), + + +) ############################################################## ## DeepInfoAK8:Start diff --git a/PhysicsTools/NanoAOD/python/nano_cff.py b/PhysicsTools/NanoAOD/python/nano_cff.py index 01b40bdf1b7af..3a6ffa17fb1aa 100644 --- a/PhysicsTools/NanoAOD/python/nano_cff.py +++ b/PhysicsTools/NanoAOD/python/nano_cff.py @@ -155,6 +155,17 @@ def nanoAOD_customizeCommon(process): process = nanoAOD_activateVID(process) + # Include new ParticleNet trainings for Run-2 UL + run2_nanoAOD_106Xv2.toModify( + nanoAOD_addDeepInfoAK4CHS_switch, nanoAOD_addParticleNet_switch=True, + ) + run2_nanoAOD_106Xv2.toModify( + nanoAOD_addDeepInfoAK4_switch, nanoAOD_addParticleNet_switch=True, + ) + run2_nanoAOD_106Xv2.toModify( + nanoAOD_addDeepInfoAK8_switch, nanoAOD_addParticleNet_switch=True + ) + # This function is defined in jetsAK4_Puppi_cff.py process = nanoAOD_addDeepInfoAK4(process, addParticleNet=nanoAOD_addDeepInfoAK4_switch.nanoAOD_addParticleNet_switch @@ -177,6 +188,7 @@ def nanoAOD_customizeCommon(process): jecPayload=nanoAOD_addDeepInfoAK8_switch.jecPayload ) + nanoAOD_tau_switch = cms.PSet( idsToAdd = cms.vstring() ) From 71d3b02b69a650bfe8395c2cc4c368013a2678b3 Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Wed, 15 Mar 2023 17:03:12 +0100 Subject: [PATCH 055/233] also remove new PNet AK4 nodes for PUPPI jets eras 12_2/4 --- PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py b/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py index b9fa94a5d7c66..c4834f088113b 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py @@ -116,6 +116,19 @@ btagCSVV2 = Var("bDiscriminator('pfCombinedInclusiveSecondaryVertexV2BJetTags')",float,doc=" pfCombinedInclusiveSecondaryVertexV2 b-tag discriminator (aka CSVV2)",precision=10) ) +(run3_nanoAOD_122 | run3_nanoAOD_124).toModify( + # New ParticleNet trainings are not available in MiniAOD until Run3 13X + jetPuppiTable.variables, + btagPNetB = None, + btagPNetCvL = None, + btagPNetCvB = None, + btagPNetQvG = None, + btagPNetTauVJet = None, + PNetRegPtRawCorr = None, + PNetRegPtRawCorrNeutrino = None, + PNetRegPtRawRes = None +) + #jets are not as precise as muons jetPuppiTable.variables.pt.precision=10 From 4ceeb26b42de073d49fc70ebbd0f63cba6b34ef0 Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Wed, 15 Mar 2023 17:07:38 +0100 Subject: [PATCH 056/233] remove extra space --- PhysicsTools/NanoAOD/python/nano_cff.py | 1 - 1 file changed, 1 deletion(-) diff --git a/PhysicsTools/NanoAOD/python/nano_cff.py b/PhysicsTools/NanoAOD/python/nano_cff.py index 3a6ffa17fb1aa..328ec10831de7 100644 --- a/PhysicsTools/NanoAOD/python/nano_cff.py +++ b/PhysicsTools/NanoAOD/python/nano_cff.py @@ -188,7 +188,6 @@ def nanoAOD_customizeCommon(process): jecPayload=nanoAOD_addDeepInfoAK8_switch.jecPayload ) - nanoAOD_tau_switch = cms.PSet( idsToAdd = cms.vstring() ) From 2a0d4b198e01b2a99b280f68f50e2727d90895c4 Mon Sep 17 00:00:00 2001 From: qianying guo Date: Thu, 16 Mar 2023 11:45:04 +0100 Subject: [PATCH 057/233] update the format --- .../MuonDPG/plugins/GEMTnPEfficiencyTask.cc | 437 ++++++++++-------- 1 file changed, 235 insertions(+), 202 deletions(-) diff --git a/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc b/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc index a10a8d2aaf005..d4a6cb4aa4a48 100644 --- a/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc +++ b/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc @@ -51,66 +51,119 @@ void GEMTnPEfficiencyTask::bookHistograms(DQMStore::IBooker& iBooker, auto baseDir = topFolder() + "Task/"; iBooker.setCurrentFolder(baseDir); - MonitorElement* me_GEM_pass_Ch_region = iBooker.book2D("GEM_nPassingProbe_Ch_region", "GEM_nPassingProbe_Ch_region", 2, -1.5, 1.5, 36, 1, 37); - MonitorElement* me_GEM_fail_Ch_region = iBooker.book2D("GEM_nFailingProbe_Ch_region", "GEM_nFailingProbe_Ch_region", 2, -1.5, 1.5, 36, 1, 37); - MonitorElement* me_GEM_pass_Ch_region_GE1 = iBooker.book2D("GEM_nPassingProbe_Ch_region_GE1", "GEM_nPassingProbe_Ch_region_GE1", 4, 0, 4, 36, 1, 37); - MonitorElement* me_GEM_fail_Ch_region_GE1 = iBooker.book2D("GEM_nFailingProbe_Ch_region_GE1", "GEM_nFailingProbe_Ch_region_GE1", 4, 0, 4, 36, 1, 37); - MonitorElement* me_GEM_pass_Ch_region_GE1_NoL = iBooker.book2D("GEM_nPassingProbe_Ch_region_GE1_NoL", "GEM_nPassingProbe_Ch_region_GE1_NoL", 2, 0, 2, 36, 1, 37); - MonitorElement* me_GEM_fail_Ch_region_GE1_NoL = iBooker.book2D("GEM_nFailingProbe_Ch_region_GE1_NoL", "GEM_nFailingProbe_Ch_region_GE1_NoL", 2, 0, 2, 36, 1, 37); - MonitorElement* me_GEM_pass_Ch_eta = iBooker.book2D("GEM_nPassingProbe_Ch_eta", "GEM_nPassingProbe_Ch_eta", 24, 0, 2.4, 36, 1, 37); - MonitorElement* me_GEM_fail_Ch_eta = iBooker.book2D("GEM_nFailingProbe_Ch_eta", "GEM_nFailingProbe_Ch_eta", 24, 0, 2.4, 36, 1, 37); - MonitorElement* me_GEM_pass_Ch_phi = iBooker.book2D("GEM_nPassingProbe_Ch_phi", "GEM_nPassingProbe_Ch_phi", 20, -TMath::Pi(), TMath::Pi(), 36, 1, 37); - MonitorElement* me_GEM_fail_Ch_phi = iBooker.book2D("GEM_nFailingProbe_Ch_phi", "GEM_nFailingProbe_Ch_phi", 20, -TMath::Pi(), TMath::Pi(), 36, 1, 37); - MonitorElement* me_GEM_pass_allCh_1D = iBooker.book1D("GEM_nPassingProbe_allCh_1D", "GEM_nPassingProbe_allCh_1D", 2, -1.5, 1.5); - MonitorElement* me_GEM_fail_allCh_1D = iBooker.book1D("GEM_nFailingProbe_allCh_1D", "GEM_nFailingProbe_allCh_1D", 2, -1.5, 1.5); - MonitorElement* me_GEM_pass_chamber_1D = iBooker.book1D("GEM_nPassingProbe_chamber_1D", "GEM_nPassingProbe_chamber_1D", 36, 1, 37); - MonitorElement* me_GEM_fail_chamber_1D = iBooker.book1D("GEM_nFailingProbe_chamber_1D", "GEM_nFailingProbe_chamber_1D", 36, 1, 37); - MonitorElement* me_GEM_pass_chamber_p1_1D = iBooker.book1D("GEM_nPassingProbe_chamber_p1_1D", "GEM_nPassingProbe_chamber_p1_1D", 36, 1, 37); - MonitorElement* me_GEM_fail_chamber_p1_1D = iBooker.book1D("GEM_nFailingProbe_chamber_p1_1D", "GEM_nFailingProbe_chamber_p1_1D", 36, 1, 37); - MonitorElement* me_GEM_pass_chamber_p2_1D = iBooker.book1D("GEM_nPassingProbe_chamber_p2_1D", "GEM_nPassingProbe_chamber_p2_1D", 36, 1, 37); - MonitorElement* me_GEM_fail_chamber_p2_1D = iBooker.book1D("GEM_nFailingProbe_chamber_p2_1D", "GEM_nFailingProbe_chamber_p2_1D", 36, 1, 37); - MonitorElement* me_GEM_pass_chamber_n1_1D = iBooker.book1D("GEM_nPassingProbe_chamber_n1_1D", "GEM_nPassingProbe_chamber_n1_1D", 36, 1, 37); - MonitorElement* me_GEM_fail_chamber_n1_1D = iBooker.book1D("GEM_nFailingProbe_chamber_n1_1D", "GEM_nFailingProbe_chamber_n1_1D", 36, 1, 37); - MonitorElement* me_GEM_pass_chamber_n2_1D = iBooker.book1D("GEM_nPassingProbe_chamber_n2_1D", "GEM_nPassingProbe_chamber_n2_1D", 36, 1, 37); - MonitorElement* me_GEM_fail_chamber_n2_1D = iBooker.book1D("GEM_nFailingProbe_chamber_n2_1D", "GEM_nFailingProbe_chamber_n2_1D", 36, 1, 37); + MonitorElement* me_GEM_pass_Ch_region = + iBooker.book2D("GEM_nPassingProbe_Ch_region", "GEM_nPassingProbe_Ch_region", 2, -1.5, 1.5, 36, 1, 37); + MonitorElement* me_GEM_fail_Ch_region = + iBooker.book2D("GEM_nFailingProbe_Ch_region", "GEM_nFailingProbe_Ch_region", 2, -1.5, 1.5, 36, 1, 37); + MonitorElement* me_GEM_pass_Ch_region_GE1 = + iBooker.book2D("GEM_nPassingProbe_Ch_region_GE1", "GEM_nPassingProbe_Ch_region_GE1", 4, 0, 4, 36, 1, 37); + MonitorElement* me_GEM_fail_Ch_region_GE1 = + iBooker.book2D("GEM_nFailingProbe_Ch_region_GE1", "GEM_nFailingProbe_Ch_region_GE1", 4, 0, 4, 36, 1, 37); + MonitorElement* me_GEM_pass_Ch_region_GE1_NoL = + iBooker.book2D("GEM_nPassingProbe_Ch_region_GE1_NoL", "GEM_nPassingProbe_Ch_region_GE1_NoL", 2, 0, 2, 36, 1, 37); + MonitorElement* me_GEM_fail_Ch_region_GE1_NoL = + iBooker.book2D("GEM_nFailingProbe_Ch_region_GE1_NoL", "GEM_nFailingProbe_Ch_region_GE1_NoL", 2, 0, 2, 36, 1, 37); + MonitorElement* me_GEM_pass_Ch_eta = + iBooker.book2D("GEM_nPassingProbe_Ch_eta", "GEM_nPassingProbe_Ch_eta", 24, 0, 2.4, 36, 1, 37); + MonitorElement* me_GEM_fail_Ch_eta = + iBooker.book2D("GEM_nFailingProbe_Ch_eta", "GEM_nFailingProbe_Ch_eta", 24, 0, 2.4, 36, 1, 37); + MonitorElement* me_GEM_pass_Ch_phi = + iBooker.book2D("GEM_nPassingProbe_Ch_phi", "GEM_nPassingProbe_Ch_phi", 20, -TMath::Pi(), TMath::Pi(), 36, 1, 37); + MonitorElement* me_GEM_fail_Ch_phi = + iBooker.book2D("GEM_nFailingProbe_Ch_phi", "GEM_nFailingProbe_Ch_phi", 20, -TMath::Pi(), TMath::Pi(), 36, 1, 37); + MonitorElement* me_GEM_pass_allCh_1D = + iBooker.book1D("GEM_nPassingProbe_allCh_1D", "GEM_nPassingProbe_allCh_1D", 2, -1.5, 1.5); + MonitorElement* me_GEM_fail_allCh_1D = + iBooker.book1D("GEM_nFailingProbe_allCh_1D", "GEM_nFailingProbe_allCh_1D", 2, -1.5, 1.5); + MonitorElement* me_GEM_pass_chamber_1D = + iBooker.book1D("GEM_nPassingProbe_chamber_1D", "GEM_nPassingProbe_chamber_1D", 36, 1, 37); + MonitorElement* me_GEM_fail_chamber_1D = + iBooker.book1D("GEM_nFailingProbe_chamber_1D", "GEM_nFailingProbe_chamber_1D", 36, 1, 37); + MonitorElement* me_GEM_pass_chamber_p1_1D = + iBooker.book1D("GEM_nPassingProbe_chamber_p1_1D", "GEM_nPassingProbe_chamber_p1_1D", 36, 1, 37); + MonitorElement* me_GEM_fail_chamber_p1_1D = + iBooker.book1D("GEM_nFailingProbe_chamber_p1_1D", "GEM_nFailingProbe_chamber_p1_1D", 36, 1, 37); + MonitorElement* me_GEM_pass_chamber_p2_1D = + iBooker.book1D("GEM_nPassingProbe_chamber_p2_1D", "GEM_nPassingProbe_chamber_p2_1D", 36, 1, 37); + MonitorElement* me_GEM_fail_chamber_p2_1D = + iBooker.book1D("GEM_nFailingProbe_chamber_p2_1D", "GEM_nFailingProbe_chamber_p2_1D", 36, 1, 37); + MonitorElement* me_GEM_pass_chamber_n1_1D = + iBooker.book1D("GEM_nPassingProbe_chamber_n1_1D", "GEM_nPassingProbe_chamber_n1_1D", 36, 1, 37); + MonitorElement* me_GEM_fail_chamber_n1_1D = + iBooker.book1D("GEM_nFailingProbe_chamber_n1_1D", "GEM_nFailingProbe_chamber_n1_1D", 36, 1, 37); + MonitorElement* me_GEM_pass_chamber_n2_1D = + iBooker.book1D("GEM_nPassingProbe_chamber_n2_1D", "GEM_nPassingProbe_chamber_n2_1D", 36, 1, 37); + MonitorElement* me_GEM_fail_chamber_n2_1D = + iBooker.book1D("GEM_nFailingProbe_chamber_n2_1D", "GEM_nFailingProbe_chamber_n2_1D", 36, 1, 37); // MonitorElement* me_GEM_pass_pt_1D = iBooker.book1D("GEM_nPassingProbe_pt_1D", "GEM_nPassingProbe_pt_1D", 20, 0, 100); MonitorElement* me_GEM_fail_pt_1D = iBooker.book1D("GEM_nFailingProbe_pt_1D", "GEM_nFailingProbe_pt_1D", 20, 0, 100); - MonitorElement* me_GEM_pass_eta_1D = iBooker.book1D("GEM_nPassingProbe_eta_1D", "GEM_nPassingProbe_eta_1D", 24, 0, 2.4); - MonitorElement* me_GEM_fail_eta_1D = iBooker.book1D("GEM_nFailingProbe_eta_1D", "GEM_nFailingProbe_eta_1D", 24, 0, 2.4); - MonitorElement* me_GEM_pass_phi_1D = iBooker.book1D("GEM_nPassingProbe_phi_1D", "GEM_nPassingProbe_phi_1D", 20, -TMath::Pi(), TMath::Pi()); - MonitorElement* me_GEM_fail_phi_1D = iBooker.book1D("GEM_nFailingProbe_phi_1D", "GEM_nFailingProbe_phi_1D", 20, -TMath::Pi(), TMath::Pi()); -/// - MonitorElement* me_GEM_pass_pt_p1_1D = iBooker.book1D("GEM_nPassingProbe_pt_p1_1D", "GEM_nPassingProbe_pt_p1_1D", 20, 0, 100); - MonitorElement* me_GEM_fail_pt_p1_1D = iBooker.book1D("GEM_nFailingProbe_pt_p1_1D", "GEM_nFailingProbe_pt_p1_1D", 20, 0, 100); - MonitorElement* me_GEM_pass_eta_p1_1D = iBooker.book1D("GEM_nPassingProbe_eta_p1_1D", "GEM_nPassingProbe_eta_p1_1D", 24, 0, 2.4); - MonitorElement* me_GEM_fail_eta_p1_1D = iBooker.book1D("GEM_nFailingProbe_eta_p1_1D", "GEM_nFailingProbe_eta_p1_1D", 24, 0, 2.4); - MonitorElement* me_GEM_pass_phi_p1_1D = iBooker.book1D("GEM_nPassingProbe_phi_p1_1D", "GEM_nPassingProbe_phi_p1_1D", 20, -TMath::Pi(), TMath::Pi()); - MonitorElement* me_GEM_fail_phi_p1_1D = iBooker.book1D("GEM_nFailingProbe_phi_p1_1D", "GEM_nFailingProbe_phi_p1_1D", 20, -TMath::Pi(), TMath::Pi()); - MonitorElement* me_GEM_pass_pt_p2_1D = iBooker.book1D("GEM_nPassingProbe_pt_p2_1D", "GEM_nPassingProbe_pt_p2_1D", 20, 0, 100); - MonitorElement* me_GEM_fail_pt_p2_1D = iBooker.book1D("GEM_nFailingProbe_pt_p2_1D", "GEM_nFailingProbe_pt_p2_1D", 20, 0, 100); - MonitorElement* me_GEM_pass_eta_p2_1D = iBooker.book1D("GEM_nPassingProbe_eta_p2_1D", "GEM_nPassingProbe_eta_p2_1D", 24, 0, 2.4); - MonitorElement* me_GEM_fail_eta_p2_1D = iBooker.book1D("GEM_nFailingProbe_eta_p2_1D", "GEM_nFailingProbe_eta_p2_1D", 24, 0, 2.4); - MonitorElement* me_GEM_pass_phi_p2_1D = iBooker.book1D("GEM_nPassingProbe_phi_p2_1D", "GEM_nPassingProbe_phi_p2_1D", 20, -TMath::Pi(), TMath::Pi()); - MonitorElement* me_GEM_fail_phi_p2_1D = iBooker.book1D("GEM_nFailingProbe_phi_p2_1D", "GEM_nFailingProbe_phi_p2_1D", 20, -TMath::Pi(), TMath::Pi()); - MonitorElement* me_GEM_pass_pt_n1_1D = iBooker.book1D("GEM_nPassingProbe_pt_n1_1D", "GEM_nPassingProbe_pt_n1_1D", 20, 0, 100); - MonitorElement* me_GEM_fail_pt_n1_1D = iBooker.book1D("GEM_nFailingProbe_pt_n1_1D", "GEM_nFailingProbe_pt_n1_1D", 20, 0, 100); - MonitorElement* me_GEM_pass_eta_n1_1D = iBooker.book1D("GEM_nPassingProbe_eta_n1_1D", "GEM_nPassingProbe_eta_n1_1D", 24, 0, 2.4); - MonitorElement* me_GEM_fail_eta_n1_1D = iBooker.book1D("GEM_nFailingProbe_eta_n1_1D", "GEM_nFailingProbe_eta_n1_1D", 24, 0, 2.4); - MonitorElement* me_GEM_pass_phi_n1_1D = iBooker.book1D("GEM_nPassingProbe_phi_n1_1D", "GEM_nPassingProbe_phi_n1_1D", 20, -TMath::Pi(), TMath::Pi()); - MonitorElement* me_GEM_fail_phi_n1_1D = iBooker.book1D("GEM_nFailingProbe_phi_n1_1D", "GEM_nFailingProbe_phi_n1_1D", 20, -TMath::Pi(), TMath::Pi()); - MonitorElement* me_GEM_pass_pt_n2_1D = iBooker.book1D("GEM_nPassingProbe_pt_n2_1D", "GEM_nPassingProbe_pt_n2_1D", 20, 0, 100); - MonitorElement* me_GEM_fail_pt_n2_1D = iBooker.book1D("GEM_nFailingProbe_pt_n2_1D", "GEM_nFailingProbe_pt_n2_1D", 20, 0, 100); - MonitorElement* me_GEM_pass_eta_n2_1D = iBooker.book1D("GEM_nPassingProbe_eta_n2_1D", "GEM_nPassingProbe_eta_n2_1D", 24, 0, 2.4); - MonitorElement* me_GEM_fail_eta_n2_1D = iBooker.book1D("GEM_nFailingProbe_eta_n2_1D", "GEM_nFailingProbe_eta_n2_1D", 24, 0, 2.4); - MonitorElement* me_GEM_pass_phi_n2_1D = iBooker.book1D("GEM_nPassingProbe_phi_n2_1D", "GEM_nPassingProbe_phi_n2_1D", 20, -TMath::Pi(), TMath::Pi()); - MonitorElement* me_GEM_fail_phi_n2_1D = iBooker.book1D("GEM_nFailingProbe_phi_n2_1D", "GEM_nFailingProbe_phi_n2_1D", 20, -TMath::Pi(), TMath::Pi()); -//// - MonitorElement* me_ME0_pass_chamber_1D = iBooker.book1D("ME0_nPassingProbe_chamber_1D", "ME0_nPassingProbe_chamber_1D", 18, 1, 19); - MonitorElement* me_ME0_fail_chamber_1D = iBooker.book1D("ME0_nFailingProbe_chamber_1D", "ME0_nFailingProbe_chamber_1D", 18, 1, 19); - MonitorElement* me_GEM_pass_Ch_region_layer_phase2 = iBooker.book2D("GEM_nPassingProbe_Ch_region_layer_phase2", "GEM_nPassingProbe_Ch_region_layer_phase2", 10, 0, 10, 36, 1, 37); - MonitorElement* me_GEM_fail_Ch_region_layer_phase2 = iBooker.book2D("GEM_nFailingProbe_Ch_region_layer_phase2", "GEM_nFailingProbe_Ch_region_layer_phase2", 10, 0, 10, 36, 1, 37); - + MonitorElement* me_GEM_pass_eta_1D = + iBooker.book1D("GEM_nPassingProbe_eta_1D", "GEM_nPassingProbe_eta_1D", 24, 0, 2.4); + MonitorElement* me_GEM_fail_eta_1D = + iBooker.book1D("GEM_nFailingProbe_eta_1D", "GEM_nFailingProbe_eta_1D", 24, 0, 2.4); + MonitorElement* me_GEM_pass_phi_1D = + iBooker.book1D("GEM_nPassingProbe_phi_1D", "GEM_nPassingProbe_phi_1D", 20, -TMath::Pi(), TMath::Pi()); + MonitorElement* me_GEM_fail_phi_1D = + iBooker.book1D("GEM_nFailingProbe_phi_1D", "GEM_nFailingProbe_phi_1D", 20, -TMath::Pi(), TMath::Pi()); + /// + MonitorElement* me_GEM_pass_pt_p1_1D = + iBooker.book1D("GEM_nPassingProbe_pt_p1_1D", "GEM_nPassingProbe_pt_p1_1D", 20, 0, 100); + MonitorElement* me_GEM_fail_pt_p1_1D = + iBooker.book1D("GEM_nFailingProbe_pt_p1_1D", "GEM_nFailingProbe_pt_p1_1D", 20, 0, 100); + MonitorElement* me_GEM_pass_eta_p1_1D = + iBooker.book1D("GEM_nPassingProbe_eta_p1_1D", "GEM_nPassingProbe_eta_p1_1D", 24, 0, 2.4); + MonitorElement* me_GEM_fail_eta_p1_1D = + iBooker.book1D("GEM_nFailingProbe_eta_p1_1D", "GEM_nFailingProbe_eta_p1_1D", 24, 0, 2.4); + MonitorElement* me_GEM_pass_phi_p1_1D = + iBooker.book1D("GEM_nPassingProbe_phi_p1_1D", "GEM_nPassingProbe_phi_p1_1D", 20, -TMath::Pi(), TMath::Pi()); + MonitorElement* me_GEM_fail_phi_p1_1D = + iBooker.book1D("GEM_nFailingProbe_phi_p1_1D", "GEM_nFailingProbe_phi_p1_1D", 20, -TMath::Pi(), TMath::Pi()); + MonitorElement* me_GEM_pass_pt_p2_1D = + iBooker.book1D("GEM_nPassingProbe_pt_p2_1D", "GEM_nPassingProbe_pt_p2_1D", 20, 0, 100); + MonitorElement* me_GEM_fail_pt_p2_1D = + iBooker.book1D("GEM_nFailingProbe_pt_p2_1D", "GEM_nFailingProbe_pt_p2_1D", 20, 0, 100); + MonitorElement* me_GEM_pass_eta_p2_1D = + iBooker.book1D("GEM_nPassingProbe_eta_p2_1D", "GEM_nPassingProbe_eta_p2_1D", 24, 0, 2.4); + MonitorElement* me_GEM_fail_eta_p2_1D = + iBooker.book1D("GEM_nFailingProbe_eta_p2_1D", "GEM_nFailingProbe_eta_p2_1D", 24, 0, 2.4); + MonitorElement* me_GEM_pass_phi_p2_1D = + iBooker.book1D("GEM_nPassingProbe_phi_p2_1D", "GEM_nPassingProbe_phi_p2_1D", 20, -TMath::Pi(), TMath::Pi()); + MonitorElement* me_GEM_fail_phi_p2_1D = + iBooker.book1D("GEM_nFailingProbe_phi_p2_1D", "GEM_nFailingProbe_phi_p2_1D", 20, -TMath::Pi(), TMath::Pi()); + MonitorElement* me_GEM_pass_pt_n1_1D = + iBooker.book1D("GEM_nPassingProbe_pt_n1_1D", "GEM_nPassingProbe_pt_n1_1D", 20, 0, 100); + MonitorElement* me_GEM_fail_pt_n1_1D = + iBooker.book1D("GEM_nFailingProbe_pt_n1_1D", "GEM_nFailingProbe_pt_n1_1D", 20, 0, 100); + MonitorElement* me_GEM_pass_eta_n1_1D = + iBooker.book1D("GEM_nPassingProbe_eta_n1_1D", "GEM_nPassingProbe_eta_n1_1D", 24, 0, 2.4); + MonitorElement* me_GEM_fail_eta_n1_1D = + iBooker.book1D("GEM_nFailingProbe_eta_n1_1D", "GEM_nFailingProbe_eta_n1_1D", 24, 0, 2.4); + MonitorElement* me_GEM_pass_phi_n1_1D = + iBooker.book1D("GEM_nPassingProbe_phi_n1_1D", "GEM_nPassingProbe_phi_n1_1D", 20, -TMath::Pi(), TMath::Pi()); + MonitorElement* me_GEM_fail_phi_n1_1D = + iBooker.book1D("GEM_nFailingProbe_phi_n1_1D", "GEM_nFailingProbe_phi_n1_1D", 20, -TMath::Pi(), TMath::Pi()); + MonitorElement* me_GEM_pass_pt_n2_1D = + iBooker.book1D("GEM_nPassingProbe_pt_n2_1D", "GEM_nPassingProbe_pt_n2_1D", 20, 0, 100); + MonitorElement* me_GEM_fail_pt_n2_1D = + iBooker.book1D("GEM_nFailingProbe_pt_n2_1D", "GEM_nFailingProbe_pt_n2_1D", 20, 0, 100); + MonitorElement* me_GEM_pass_eta_n2_1D = + iBooker.book1D("GEM_nPassingProbe_eta_n2_1D", "GEM_nPassingProbe_eta_n2_1D", 24, 0, 2.4); + MonitorElement* me_GEM_fail_eta_n2_1D = + iBooker.book1D("GEM_nFailingProbe_eta_n2_1D", "GEM_nFailingProbe_eta_n2_1D", 24, 0, 2.4); + MonitorElement* me_GEM_pass_phi_n2_1D = + iBooker.book1D("GEM_nPassingProbe_phi_n2_1D", "GEM_nPassingProbe_phi_n2_1D", 20, -TMath::Pi(), TMath::Pi()); + MonitorElement* me_GEM_fail_phi_n2_1D = + iBooker.book1D("GEM_nFailingProbe_phi_n2_1D", "GEM_nFailingProbe_phi_n2_1D", 20, -TMath::Pi(), TMath::Pi()); + //// + MonitorElement* me_ME0_pass_chamber_1D = + iBooker.book1D("ME0_nPassingProbe_chamber_1D", "ME0_nPassingProbe_chamber_1D", 18, 1, 19); + MonitorElement* me_ME0_fail_chamber_1D = + iBooker.book1D("ME0_nFailingProbe_chamber_1D", "ME0_nFailingProbe_chamber_1D", 18, 1, 19); + MonitorElement* me_GEM_pass_Ch_region_layer_phase2 = iBooker.book2D( + "GEM_nPassingProbe_Ch_region_layer_phase2", "GEM_nPassingProbe_Ch_region_layer_phase2", 10, 0, 10, 36, 1, 37); + MonitorElement* me_GEM_fail_Ch_region_layer_phase2 = iBooker.book2D( + "GEM_nFailingProbe_Ch_region_layer_phase2", "GEM_nFailingProbe_Ch_region_layer_phase2", 10, 0, 10, 36, 1, 37); me_GEM_pass_allCh_1D->setBinLabel(1, "GE-11", 1); me_GEM_pass_allCh_1D->setBinLabel(2, "GE11", 1); @@ -159,7 +212,7 @@ void GEMTnPEfficiencyTask::bookHistograms(DQMStore::IBooker& iBooker, me_GEM_pass_phi_1D->setAxisTitle("Number of passing probes", 2); me_GEM_fail_phi_1D->setAxisTitle("#phi", 1); me_GEM_fail_phi_1D->setAxisTitle("Number of failing probes", 2); - + me_GEM_pass_pt_p1_1D->setAxisTitle("P_{T}", 1); me_GEM_pass_pt_p1_1D->setAxisTitle("Number of passing probes", 2); me_GEM_fail_pt_p1_1D->setAxisTitle("P_{T}", 1); @@ -222,7 +275,7 @@ void GEMTnPEfficiencyTask::bookHistograms(DQMStore::IBooker& iBooker, me_GEM_fail_Ch_region->setBinLabel(1, "GE-11", 1); me_GEM_fail_Ch_region->setBinLabel(2, "GE11", 1); - for (int i=1; i<37; ++i){ + for (int i = 1; i < 37; ++i) { me_GEM_fail_Ch_region->setBinLabel(i, std::to_string(i), 2); } me_GEM_fail_Ch_region->setAxisTitle("Chamber", 2); @@ -230,7 +283,7 @@ void GEMTnPEfficiencyTask::bookHistograms(DQMStore::IBooker& iBooker, me_GEM_pass_Ch_region->setBinLabel(1, "GE-11", 1); me_GEM_pass_Ch_region->setBinLabel(2, "GE11", 1); - for (int i=1; i<37; ++i){ + for (int i = 1; i < 37; ++i) { me_GEM_pass_Ch_region->setBinLabel(i, std::to_string(i), 2); } me_GEM_pass_Ch_region->setAxisTitle("Chamber", 2); @@ -240,7 +293,7 @@ void GEMTnPEfficiencyTask::bookHistograms(DQMStore::IBooker& iBooker, me_GEM_fail_Ch_region_GE1->setBinLabel(2, "GE-1/1_L1", 1); me_GEM_fail_Ch_region_GE1->setBinLabel(3, "GE1/1_L1", 1); me_GEM_fail_Ch_region_GE1->setBinLabel(4, "GE1/1_L2", 1); - for (int i=1; i<37; ++i){ + for (int i = 1; i < 37; ++i) { me_GEM_fail_Ch_region_GE1->setBinLabel(i, std::to_string(i), 2); } me_GEM_fail_Ch_region_GE1->setAxisTitle("Chamber", 2); @@ -250,7 +303,7 @@ void GEMTnPEfficiencyTask::bookHistograms(DQMStore::IBooker& iBooker, me_GEM_pass_Ch_region_GE1->setBinLabel(2, "GE-1/1_L1", 1); me_GEM_pass_Ch_region_GE1->setBinLabel(3, "GE1/1_L1", 1); me_GEM_pass_Ch_region_GE1->setBinLabel(4, "GE1/1_L2", 1); - for (int i=1; i<37; ++i){ + for (int i = 1; i < 37; ++i) { me_GEM_pass_Ch_region_GE1->setBinLabel(i, std::to_string(i), 2); } me_GEM_pass_Ch_region_GE1->setAxisTitle("Chamber", 2); @@ -258,7 +311,7 @@ void GEMTnPEfficiencyTask::bookHistograms(DQMStore::IBooker& iBooker, me_GEM_fail_Ch_region_GE1_NoL->setBinLabel(1, "GE-1", 1); me_GEM_fail_Ch_region_GE1_NoL->setBinLabel(2, "GE+1", 1); - for (int i=1; i<37; ++i){ + for (int i = 1; i < 37; ++i) { me_GEM_fail_Ch_region_GE1_NoL->setBinLabel(i, std::to_string(i), 2); } me_GEM_fail_Ch_region_GE1_NoL->setAxisTitle("Chamber", 2); @@ -266,46 +319,46 @@ void GEMTnPEfficiencyTask::bookHistograms(DQMStore::IBooker& iBooker, me_GEM_pass_Ch_region_GE1_NoL->setBinLabel(1, "GE-1", 1); me_GEM_pass_Ch_region_GE1_NoL->setBinLabel(2, "GE+1", 1); - for (int i=1; i<37; ++i){ + for (int i = 1; i < 37; ++i) { me_GEM_pass_Ch_region_GE1_NoL->setBinLabel(i, std::to_string(i), 2); } me_GEM_pass_Ch_region_GE1_NoL->setAxisTitle("Chamber", 2); me_GEM_pass_Ch_region_GE1_NoL->setAxisTitle("Number of passing probes", 3); - for (int i=1; i<37; ++i){ + for (int i = 1; i < 37; ++i) { me_GEM_fail_Ch_eta->setBinLabel(i, std::to_string(i), 2); } me_GEM_fail_Ch_eta->setAxisTitle("#eta", 1); me_GEM_fail_Ch_eta->setAxisTitle("Chamber", 2); me_GEM_fail_Ch_eta->setAxisTitle("Number of failing probes", 3); - for (int i=1; i<37; ++i){ + for (int i = 1; i < 37; ++i) { me_GEM_pass_Ch_eta->setBinLabel(i, std::to_string(i), 2); } me_GEM_pass_Ch_eta->setAxisTitle("#eta", 1); me_GEM_pass_Ch_eta->setAxisTitle("Chamber", 2); me_GEM_pass_Ch_eta->setAxisTitle("Number of passing probes", 3); - for (int i=1; i<37; ++i){ + for (int i = 1; i < 37; ++i) { me_GEM_fail_Ch_phi->setBinLabel(i, std::to_string(i), 2); } me_GEM_fail_Ch_phi->setAxisTitle("#phi", 1); me_GEM_fail_Ch_phi->setAxisTitle("Chamber", 2); me_GEM_fail_Ch_phi->setAxisTitle("Number of failing probes", 3); - for (int i=1; i<37; ++i){ + for (int i = 1; i < 37; ++i) { me_GEM_pass_Ch_phi->setBinLabel(i, std::to_string(i), 2); } me_GEM_pass_Ch_phi->setAxisTitle("#phi", 1); me_GEM_pass_Ch_phi->setAxisTitle("Chamber", 2); me_GEM_pass_Ch_phi->setAxisTitle("Number of passing probes", 3); - for (int i=1; i<19; ++i){ + for (int i = 1; i < 19; ++i) { me_ME0_pass_chamber_1D->setBinLabel(i, std::to_string(i), 1); } me_ME0_pass_chamber_1D->setAxisTitle("Chamber", 1); me_ME0_pass_chamber_1D->setAxisTitle("Number of passing probes", 2); - for (int i=1; i<19; ++i){ + for (int i = 1; i < 19; ++i) { me_ME0_fail_chamber_1D->setBinLabel(i, std::to_string(i), 1); } me_ME0_fail_chamber_1D->setAxisTitle("Chamber", 1); @@ -321,7 +374,7 @@ void GEMTnPEfficiencyTask::bookHistograms(DQMStore::IBooker& iBooker, me_GEM_fail_Ch_region_layer_phase2->setBinLabel(8, "GE1/1_L2", 1); me_GEM_fail_Ch_region_layer_phase2->setBinLabel(9, "GE2/1_L1", 1); me_GEM_fail_Ch_region_layer_phase2->setBinLabel(10, "GE2/1_L2", 1); - for (int i=1; i<37; ++i){ + for (int i = 1; i < 37; ++i) { me_GEM_fail_Ch_region_layer_phase2->setBinLabel(i, std::to_string(i), 2); } me_GEM_fail_Ch_region_layer_phase2->setAxisTitle("Chamber", 2); @@ -338,7 +391,7 @@ void GEMTnPEfficiencyTask::bookHistograms(DQMStore::IBooker& iBooker, me_GEM_pass_Ch_region_layer_phase2->setBinLabel(9, "GE2/1_L1", 1); me_GEM_pass_Ch_region_layer_phase2->setBinLabel(10, "GE2/1_L2", 1); - for (int i=1; i<37; ++i){ + for (int i = 1; i < 37; ++i) { me_GEM_pass_Ch_region_layer_phase2->setBinLabel(i, std::to_string(i), 2); } me_GEM_pass_Ch_region_layer_phase2->setAxisTitle("Chamber", 2); @@ -482,22 +535,22 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu GEMDetId chId(chambMatch.id.rawId()); - int roll = chId.roll(); - int region = chId.region(); - int station = chId.station(); - int layer = chId.layer(); - int chamber = chId.chamber(); - float pt = (*muons).at(i).pt(); - float eta = (*muons).at(i).eta(); - float phi = (*muons).at(i).phi(); + int roll = chId.roll(); + int region = chId.region(); + int station = chId.station(); + int layer = chId.layer(); + int chamber = chId.chamber(); + float pt = (*muons).at(i).pt(); + float eta = (*muons).at(i).eta(); + float phi = (*muons).at(i).phi(); //reco::MuonSegmentMatch closest_matchedSegment; reco::MuonGEMHitMatch closest_matchedHit; double smallestDx = 99999.; double matched_GEMHit_x = 99999.; - //for (auto& seg : chambMatch.gemMatches) { - for (auto& gemHit : chambMatch.gemHitMatches) { + //for (auto& seg : chambMatch.gemMatches) { + for (auto& gemHit : chambMatch.gemHitMatches) { float dx = std::abs(chambMatch.x - gemHit.x); if (dx < smallestDx) { smallestDx = dx; @@ -511,7 +564,7 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu reco::MuonSegmentMatch closest_matchedSegment; double smallestDx_seg = 99999.; - for (auto& seg : chambMatch.gemMatches) { + for (auto& seg : chambMatch.gemMatches) { float dx_seg = std::abs(chambMatch.x - seg.x); if (dx_seg < smallestDx_seg) { smallestDx_seg = dx_seg; @@ -523,7 +576,7 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu m_histos.find("GEMhit_x")->second->Fill(matched_GEMHit_x); m_histos.find("Cham_x")->second->Fill(chambMatch.x); m_histos.find("GEMseg_dx")->second->Fill(smallestDx_seg); - if (station==2) { + if (station == 2) { m_histos.find("GEMhit_dx_GE2")->second->Fill(smallestDx); m_histos.find("GEMhit_x_GE2")->second->Fill(matched_GEMHit_x); m_histos.find("Cham_x_GE2")->second->Fill(chambMatch.x); @@ -543,27 +596,26 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu //probe_GEM_dx.push_back(smallestDx_seg); //probe_GEM_dx_seg.push_back(smallestDx_seg); - if (station==0) - { - reco::MuonSegmentMatch closest_matchedSegment_ME0; - double smallestDx_ME0 = 99999.; - for (auto& seg : chambMatch.gemMatches) { - float dx = std::abs(chambMatch.x - seg.x); - if (dx < smallestDx_ME0) { - smallestDx_ME0 = dx; - closest_matchedSegment_ME0 = seg; - } + if (station == 0) { + reco::MuonSegmentMatch closest_matchedSegment_ME0; + double smallestDx_ME0 = 99999.; + for (auto& seg : chambMatch.gemMatches) { + float dx = std::abs(chambMatch.x - seg.x); + if (dx < smallestDx_ME0) { + smallestDx_ME0 = dx; + closest_matchedSegment_ME0 = seg; } - ME0_stationMatching = ME0_stationMatching | (1 << (station-1)); - probe_ME0_region.push_back(region); - probe_ME0_roll.push_back(roll); - probe_ME0_sta.push_back(station); - probe_ME0_lay.push_back(layer); - probe_ME0_chamber.push_back(chamber); - probe_ME0_pt.push_back(pt); - probe_ME0_eta.push_back(eta); - probe_ME0_phi.push_back(phi); - probe_ME0_dx.push_back(smallestDx_ME0); + } + ME0_stationMatching = ME0_stationMatching | (1 << (station - 1)); + probe_ME0_region.push_back(region); + probe_ME0_roll.push_back(roll); + probe_ME0_sta.push_back(station); + probe_ME0_lay.push_back(layer); + probe_ME0_chamber.push_back(chamber); + probe_ME0_pt.push_back(pt); + probe_ME0_eta.push_back(eta); + probe_ME0_phi.push_back(phi); + probe_ME0_dx.push_back(smallestDx_ME0); } } } else @@ -615,35 +667,31 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu //Loop over ME0 matches unsigned nME0_matches = probe_coll_ME0_region.at(i).size(); - for(unsigned j=0; jsecond->Fill(ME0_chamber); - if (ME0_region<0) - m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(4, ME0_chamber); - else if (ME0_region>0) - m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(5, ME0_chamber); - } - else - { + if (ME0_region < 0) + m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(4, ME0_chamber); + else if (ME0_region > 0) + m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(5, ME0_chamber); + } else { m_histos.find("ME0_nFailingProbe_chamber_1D")->second->Fill(ME0_chamber); - if (ME0_region<0) - m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(4, ME0_chamber); - else if (ME0_region>0) - m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(5, ME0_chamber); + if (ME0_region < 0) + m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(4, ME0_chamber); + else if (ME0_region > 0) + m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(5, ME0_chamber); } } } @@ -652,80 +700,72 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu //Loop over GEM matches unsigned nGEM_matches = probe_coll_GEM_region.at(i).size(); for (unsigned j = 0; j < nGEM_matches; ++j) { - //GEM variables int GEM_region = probe_coll_GEM_region.at(i).at(j); - int GEM_sta = probe_coll_GEM_sta.at(i).at(j); - int GEM_lay = probe_coll_GEM_lay.at(i).at(j); + int GEM_sta = probe_coll_GEM_sta.at(i).at(j); + int GEM_lay = probe_coll_GEM_lay.at(i).at(j); int GEM_chamber = probe_coll_GEM_chamber.at(i).at(j); - float GEM_pt = probe_coll_GEM_pt.at(i).at(j); - float GEM_dx = probe_coll_GEM_dx.at(i).at(j); - float GEM_eta = probe_coll_GEM_eta.at(i).at(j); - float GEM_phi = probe_coll_GEM_phi.at(i).at(j); - + float GEM_pt = probe_coll_GEM_pt.at(i).at(j); + float GEM_dx = probe_coll_GEM_dx.at(i).at(j); + float GEM_eta = probe_coll_GEM_eta.at(i).at(j); + float GEM_phi = probe_coll_GEM_phi.at(i).at(j); //Fill GEM plots - if ( ((GEM_matchPatt & (1<<(GEM_sta-1))) != 0) && GEM_sta!=0) //avoids 0 station matching + if (((GEM_matchPatt & (1 << (GEM_sta - 1))) != 0) && GEM_sta != 0) //avoids 0 station matching { - if (GEM_dx < m_dxCut) - { - if (GEM_region==1 && GEM_lay==0 && GEM_sta==2 && GEM_chamber==16) continue; //exclude GE2 ch16 of Run3 + if (GEM_dx < m_dxCut) { + if (GEM_region == 1 && GEM_lay == 0 && GEM_sta == 2 && GEM_chamber == 16) + continue; //exclude GE2 ch16 of Run3 m_histos.find("GEM_nPassingProbe_Ch_region")->second->Fill(GEM_region, GEM_chamber); m_histos.find("GEM_nPassingProbe_Ch_eta")->second->Fill(abs(GEM_eta), GEM_chamber); m_histos.find("GEM_nPassingProbe_Ch_phi")->second->Fill(GEM_phi, GEM_chamber); m_histos.find("GEM_nPassingProbe_allCh_1D")->second->Fill(GEM_region); m_histos.find("GEM_nPassingProbe_chamber_1D")->second->Fill(GEM_chamber); - if(GEM_region<0) - { - if (GEM_sta==2 and GEM_lay==2) - m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(0, GEM_chamber); - if (GEM_sta==2 and GEM_lay==1) - m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(1, GEM_chamber); - if (GEM_sta==1 and GEM_lay==2) - m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(2, GEM_chamber); - if (GEM_sta==1 and GEM_lay==1) - m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(3, GEM_chamber); - } - if(GEM_region>0) - { - if (GEM_sta==1 and GEM_lay==1) - m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(6, GEM_chamber); - if (GEM_sta==1 and GEM_lay==2) - m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(7, GEM_chamber); - if (GEM_sta==2 and GEM_lay==1) - m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(8, GEM_chamber); - if (GEM_sta==2 and GEM_lay==2) - m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(9, GEM_chamber); + if (GEM_region < 0) { + if (GEM_sta == 2 and GEM_lay == 2) + m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(0, GEM_chamber); + if (GEM_sta == 2 and GEM_lay == 1) + m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(1, GEM_chamber); + if (GEM_sta == 1 and GEM_lay == 2) + m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(2, GEM_chamber); + if (GEM_sta == 1 and GEM_lay == 1) + m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(3, GEM_chamber); } - if(GEM_region==-1 && GEM_sta==1){ - m_histos.find("GEM_nPassingProbe_Ch_region_GE1_NoL")->second->Fill(0, GEM_chamber); + if (GEM_region > 0) { + if (GEM_sta == 1 and GEM_lay == 1) + m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(6, GEM_chamber); + if (GEM_sta == 1 and GEM_lay == 2) + m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(7, GEM_chamber); + if (GEM_sta == 2 and GEM_lay == 1) + m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(8, GEM_chamber); + if (GEM_sta == 2 and GEM_lay == 2) + m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(9, GEM_chamber); } - else if (GEM_region==1 && GEM_sta==1){ - m_histos.find("GEM_nPassingProbe_Ch_region_GE1_NoL")->second->Fill(1, GEM_chamber); + if (GEM_region == -1 && GEM_sta == 1) { + m_histos.find("GEM_nPassingProbe_Ch_region_GE1_NoL")->second->Fill(0, GEM_chamber); + } else if (GEM_region == 1 && GEM_sta == 1) { + m_histos.find("GEM_nPassingProbe_Ch_region_GE1_NoL")->second->Fill(1, GEM_chamber); } - if(GEM_region==1 && GEM_lay==1 && GEM_sta==1){ + if (GEM_region == 1 && GEM_lay == 1 && GEM_sta == 1) { m_histos.find("GEM_nPassingProbe_chamber_p1_1D")->second->Fill(GEM_chamber); m_histos.find("GEM_nPassingProbe_Ch_region_GE1")->second->Fill(2, GEM_chamber); m_histos.find("GEM_nPassingProbe_pt_p1_1D")->second->Fill(GEM_pt); m_histos.find("GEM_nPassingProbe_eta_p1_1D")->second->Fill(abs(GEM_eta)); m_histos.find("GEM_nPassingProbe_phi_p1_1D")->second->Fill(GEM_phi); - } - else if(GEM_region==1 && GEM_lay==2 && GEM_sta==1){ + } else if (GEM_region == 1 && GEM_lay == 2 && GEM_sta == 1) { m_histos.find("GEM_nPassingProbe_chamber_p2_1D")->second->Fill(GEM_chamber); m_histos.find("GEM_nPassingProbe_Ch_region_GE1")->second->Fill(3, GEM_chamber); m_histos.find("GEM_nPassingProbe_pt_p2_1D")->second->Fill(GEM_pt); m_histos.find("GEM_nPassingProbe_eta_p2_1D")->second->Fill(abs(GEM_eta)); m_histos.find("GEM_nPassingProbe_phi_p2_1D")->second->Fill(GEM_phi); - } - else if(GEM_region==-1 && GEM_lay==1 && GEM_sta==1){ + } else if (GEM_region == -1 && GEM_lay == 1 && GEM_sta == 1) { m_histos.find("GEM_nPassingProbe_chamber_n1_1D")->second->Fill(GEM_chamber); m_histos.find("GEM_nPassingProbe_Ch_region_GE1")->second->Fill(1, GEM_chamber); m_histos.find("GEM_nPassingProbe_pt_n1_1D")->second->Fill(GEM_pt); m_histos.find("GEM_nPassingProbe_eta_n1_1D")->second->Fill(abs(GEM_eta)); m_histos.find("GEM_nPassingProbe_phi_n1_1D")->second->Fill(GEM_phi); - } - else if(GEM_region==-1 && GEM_lay==2 && GEM_sta==1){ + } else if (GEM_region == -1 && GEM_lay == 2 && GEM_sta == 1) { m_histos.find("GEM_nPassingProbe_chamber_n2_1D")->second->Fill(GEM_chamber); m_histos.find("GEM_nPassingProbe_Ch_region_GE1")->second->Fill(0, GEM_chamber); m_histos.find("GEM_nPassingProbe_pt_n2_1D")->second->Fill(GEM_pt); @@ -735,66 +775,59 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu m_histos.find("GEM_nPassingProbe_pt_1D")->second->Fill(GEM_pt); m_histos.find("GEM_nPassingProbe_eta_1D")->second->Fill(abs(GEM_eta)); m_histos.find("GEM_nPassingProbe_phi_1D")->second->Fill(GEM_phi); - } - else - { - if (GEM_region==1 && GEM_lay==0 && GEM_sta==2 && GEM_chamber==16) continue; + } else { + if (GEM_region == 1 && GEM_lay == 0 && GEM_sta == 2 && GEM_chamber == 16) + continue; m_histos.find("GEM_nFailingProbe_Ch_region")->second->Fill(GEM_region, GEM_chamber); m_histos.find("GEM_nFailingProbe_Ch_eta")->second->Fill(abs(GEM_eta), GEM_chamber); m_histos.find("GEM_nFailingProbe_Ch_phi")->second->Fill(GEM_phi, GEM_chamber); m_histos.find("GEM_nFailingProbe_allCh_1D")->second->Fill(GEM_region); m_histos.find("GEM_nFailingProbe_chamber_1D")->second->Fill(GEM_chamber); - if(GEM_region<0) - { - if (GEM_sta==2 and GEM_lay==2) - m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(0, GEM_chamber); - if (GEM_sta==2 and GEM_lay==1) - m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(1, GEM_chamber); - if (GEM_sta==1 and GEM_lay==2) - m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(2, GEM_chamber); - if (GEM_sta==1 and GEM_lay==1) - m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(3, GEM_chamber); + if (GEM_region < 0) { + if (GEM_sta == 2 and GEM_lay == 2) + m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(0, GEM_chamber); + if (GEM_sta == 2 and GEM_lay == 1) + m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(1, GEM_chamber); + if (GEM_sta == 1 and GEM_lay == 2) + m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(2, GEM_chamber); + if (GEM_sta == 1 and GEM_lay == 1) + m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(3, GEM_chamber); } - if(GEM_region>0) - { - if (GEM_sta==1 and GEM_lay==1) - m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(6, GEM_chamber); - if (GEM_sta==1 and GEM_lay==2) - m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(7, GEM_chamber); - if (GEM_sta==2 and GEM_lay==1) - m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(8, GEM_chamber); - if (GEM_sta==2 and GEM_lay==2) - m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(9, GEM_chamber); + if (GEM_region > 0) { + if (GEM_sta == 1 and GEM_lay == 1) + m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(6, GEM_chamber); + if (GEM_sta == 1 and GEM_lay == 2) + m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(7, GEM_chamber); + if (GEM_sta == 2 and GEM_lay == 1) + m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(8, GEM_chamber); + if (GEM_sta == 2 and GEM_lay == 2) + m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(9, GEM_chamber); } - if(GEM_region==-1 && GEM_sta==1){ - m_histos.find("GEM_nFailingProbe_Ch_region_GE1_NoL")->second->Fill(0, GEM_chamber); - } - else if (GEM_region==1 && GEM_sta==1){ - m_histos.find("GEM_nFailingProbe_Ch_region_GE1_NoL")->second->Fill(1, GEM_chamber); + if (GEM_region == -1 && GEM_sta == 1) { + m_histos.find("GEM_nFailingProbe_Ch_region_GE1_NoL")->second->Fill(0, GEM_chamber); + } else if (GEM_region == 1 && GEM_sta == 1) { + m_histos.find("GEM_nFailingProbe_Ch_region_GE1_NoL")->second->Fill(1, GEM_chamber); } // - if(GEM_region==1 && GEM_lay==1 && GEM_sta==1){ + if (GEM_region == 1 && GEM_lay == 1 && GEM_sta == 1) { m_histos.find("GEM_nFailingProbe_chamber_p1_1D")->second->Fill(GEM_chamber); m_histos.find("GEM_nFailingProbe_Ch_region_GE1")->second->Fill(2, GEM_chamber); m_histos.find("GEM_nFailingProbe_pt_p1_1D")->second->Fill(GEM_pt); m_histos.find("GEM_nFailingProbe_eta_p1_1D")->second->Fill(abs(GEM_eta)); m_histos.find("GEM_nFailingProbe_phi_p1_1D")->second->Fill(GEM_phi); - } - else if(GEM_region==1 && GEM_lay==2 && GEM_sta==1){ + } else if (GEM_region == 1 && GEM_lay == 2 && GEM_sta == 1) { m_histos.find("GEM_nFailingProbe_chamber_p2_1D")->second->Fill(GEM_chamber); m_histos.find("GEM_nFailingProbe_Ch_region_GE1")->second->Fill(3, GEM_chamber); m_histos.find("GEM_nFailingProbe_pt_p2_1D")->second->Fill(GEM_pt); m_histos.find("GEM_nFailingProbe_eta_p2_1D")->second->Fill(abs(GEM_eta)); m_histos.find("GEM_nFailingProbe_phi_p2_1D")->second->Fill(GEM_phi); - } - else if(GEM_region==-1 && GEM_lay==1 && GEM_sta==1){ + } else if (GEM_region == -1 && GEM_lay == 1 && GEM_sta == 1) { m_histos.find("GEM_nFailingProbe_chamber_n1_1D")->second->Fill(GEM_chamber); m_histos.find("GEM_nFailingProbe_Ch_region_GE1")->second->Fill(1, GEM_chamber); m_histos.find("GEM_nFailingProbe_pt_n1_1D")->second->Fill(GEM_pt); m_histos.find("GEM_nFailingProbe_eta_n1_1D")->second->Fill(abs(GEM_eta)); m_histos.find("GEM_nFailingProbe_phi_n1_1D")->second->Fill(GEM_phi); - } - else if(GEM_region==-1 && GEM_lay==2 && GEM_sta==1){ + } else if (GEM_region == -1 && GEM_lay == 2 && GEM_sta == 1) { m_histos.find("GEM_nFailingProbe_chamber_n2_1D")->second->Fill(GEM_chamber); m_histos.find("GEM_nFailingProbe_Ch_region_GE1")->second->Fill(0, GEM_chamber); m_histos.find("GEM_nFailingProbe_pt_n2_1D")->second->Fill(GEM_pt); From 254a42875caca745ff277cfff5f1d3c23d2c5f45 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Thu, 16 Mar 2023 12:06:22 +0100 Subject: [PATCH 058/233] Link cmsRunJE with jemalloc-prof version of jemalloc lib --- FWCore/Framework/bin/BuildFile.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FWCore/Framework/bin/BuildFile.xml b/FWCore/Framework/bin/BuildFile.xml index 91d3ad46257ea..f43941037c7c1 100644 --- a/FWCore/Framework/bin/BuildFile.xml +++ b/FWCore/Framework/bin/BuildFile.xml @@ -59,7 +59,7 @@ - + From 6d4780d82332cad16b2679477cac209e9a815652 Mon Sep 17 00:00:00 2001 From: John Hakala Date: Wed, 22 Feb 2023 17:55:10 -0600 Subject: [PATCH 059/233] squash 2: initial implementation of component method for ecal barrel digi and waveform simulation --- .../interface/EcalTrivialConditionRetriever.h | 8 ++ .../src/EcalTrivialConditionRetriever.cc | 46 ++++++++ CondCore/EcalPlugins/plugins/BuildFile.xml | 6 ++ .../EcalSimComponentShape_PayloadInspector.cc | 102 ++++++++++++++++++ CondCore/EcalPlugins/src/plugin.cc | 4 + CondCore/Utilities/plugins/Module_2XML.cc | 1 + CondCore/Utilities/src/CondFormats.h | 1 + .../interface/EcalSimComponentShapeRcd.h | 6 ++ .../src/EcalSimComponentShapeRcd.cc | 4 + .../interface/EcalSimComponentShape.h | 18 ++++ .../EcalObjects/src/EcalSimComponentShape.cc | 1 + .../src/T_EventSetup_EcalSimComponentShape.cc | 3 + CondFormats/EcalObjects/src/classes.h | 1 + CondFormats/EcalObjects/src/classes_def.xml | 6 ++ CondFormats/EcalObjects/src/headers.h | 1 + .../test/testSerializationEcalObjects.cpp | 1 + CondTools/Ecal/interface/EcalDBCopy.h | 3 + CondTools/Ecal/interface/XMLTags.h | 1 + .../copySimComponentShapeFromFiles_cfg.py | 63 +++++++++++ CondTools/Ecal/src/EcalDBCopy.cc | 9 ++ .../python/Modifier_run3_ecal_devel_cff.py | 4 + .../StandardSequences/python/Eras.py | 1 + DataFormats/EcalDigi/interface/EcalTimeDigi.h | 6 ++ DataFormats/EcalDigi/src/EcalTimeDigi.cc | 14 ++- DataFormats/EcalDigi/src/classes_def.xml | 3 +- .../python/SimCalorimetry_EventContent_cff.py | 6 ++ .../EcalSimAlgos/interface/ComponentShape.h | 34 ++++++ .../interface/ComponentShapeCollection.h | 39 +++++++ .../interface/ComponentSimParameterMap.h | 38 +++++++ .../EcalSimAlgos/interface/EBHitResponse.h | 15 ++- .../EcalSimAlgos/interface/EBHitResponse.icc | 46 ++++++-- .../EcalSimAlgos/interface/EcalHitResponse.h | 1 + .../EcalSimAlgos/interface/EcalShapeBase.h | 6 +- .../interface/EcalTimeMapDigitizer.h | 22 +++- .../EcalSimAlgos/src/ComponentShape.cc | 33 ++++++ .../src/ComponentShapeCollection.cc | 56 ++++++++++ .../src/ComponentSimParameterMap.cc | 31 ++++++ .../EcalSimAlgos/src/EcalShapeBase.cc | 14 ++- .../EcalSimAlgos/src/EcalTimeMapDigitizer.cc | 67 +++++++++--- .../interface/EcalDigiProducer.h | 12 +++ .../interface/EcalDigiProducer_Ph2.h | 12 +++ .../interface/EcalTimeDigiProducer.h | 4 +- .../python/componentDigiParameters_cff.py | 10 ++ .../python/ecalTimeDigiParameters_cff.py | 3 +- .../EcalSimProducers/src/EcalDigiProducer.cc | 96 ++++++++++++++++- .../src/EcalDigiProducer_Ph2.cc | 90 +++++++++++++++- .../src/EcalTimeDigiProducer.cc | 21 +++- .../MixingModule/python/digitizers_cfi.py | 5 + .../python/ecalDigitizer_Ph2_cfi.py | 2 + .../MixingModule/python/ecalDigitizer_cfi.py | 2 + 50 files changed, 922 insertions(+), 56 deletions(-) create mode 100644 CondCore/EcalPlugins/plugins/EcalSimComponentShape_PayloadInspector.cc create mode 100644 CondFormats/DataRecord/interface/EcalSimComponentShapeRcd.h create mode 100644 CondFormats/DataRecord/src/EcalSimComponentShapeRcd.cc create mode 100644 CondFormats/EcalObjects/interface/EcalSimComponentShape.h create mode 100644 CondFormats/EcalObjects/src/EcalSimComponentShape.cc create mode 100644 CondFormats/EcalObjects/src/T_EventSetup_EcalSimComponentShape.cc create mode 100644 CondTools/Ecal/python/copySimComponentShapeFromFiles_cfg.py create mode 100644 Configuration/Eras/python/Modifier_run3_ecal_devel_cff.py create mode 100644 SimCalorimetry/EcalSimAlgos/interface/ComponentShape.h create mode 100644 SimCalorimetry/EcalSimAlgos/interface/ComponentShapeCollection.h create mode 100644 SimCalorimetry/EcalSimAlgos/interface/ComponentSimParameterMap.h create mode 100644 SimCalorimetry/EcalSimAlgos/src/ComponentShape.cc create mode 100644 SimCalorimetry/EcalSimAlgos/src/ComponentShapeCollection.cc create mode 100644 SimCalorimetry/EcalSimAlgos/src/ComponentSimParameterMap.cc create mode 100644 SimCalorimetry/EcalSimProducers/python/componentDigiParameters_cff.py diff --git a/CalibCalorimetry/EcalTrivialCondModules/interface/EcalTrivialConditionRetriever.h b/CalibCalorimetry/EcalTrivialCondModules/interface/EcalTrivialConditionRetriever.h index 0f9e0c6f9b804..7c8e8b322b140 100644 --- a/CalibCalorimetry/EcalTrivialCondModules/interface/EcalTrivialConditionRetriever.h +++ b/CalibCalorimetry/EcalTrivialCondModules/interface/EcalTrivialConditionRetriever.h @@ -107,6 +107,9 @@ #include "CondFormats/EcalObjects/interface/EcalSamplesCorrelation.h" #include "CondFormats/DataRecord/interface/EcalSamplesCorrelationRcd.h" +#include "CondFormats/EcalObjects/interface/EcalSimComponentShape.h" +#include "CondFormats/DataRecord/interface/EcalSimComponentShapeRcd.h" + #include "CondFormats/EcalObjects/interface/EcalSimPulseShape.h" #include "CondFormats/DataRecord/interface/EcalSimPulseShapeRcd.h" @@ -144,6 +147,8 @@ class EcalTrivialConditionRetriever : public edm::ESProducer, public edm::EventS const EcalIntercalibConstantsRcd&); virtual std::unique_ptr getIntercalibConstantsMCFromConfiguration( const EcalIntercalibConstantsMCRcd&); + virtual std::unique_ptr getEcalSimComponentShapeFromConfiguration( + const EcalSimComponentShapeRcd&); virtual std::unique_ptr getEcalSimPulseShapeFromConfiguration(const EcalSimPulseShapeRcd&); virtual std::unique_ptr getIntercalibErrorsFromConfiguration(const EcalIntercalibErrorsRcd&); virtual std::unique_ptr getTimeCalibConstantsFromConfiguration( @@ -349,6 +354,7 @@ class EcalTrivialConditionRetriever : public edm::ESProducer, public edm::EventS std::string EBSimPulseShapeFile_; std::string EESimPulseShapeFile_; std::string APDSimPulseShapeFile_; + std::vector EBSimComponentShapeFiles_; int nTDCbins_; @@ -381,12 +387,14 @@ class EcalTrivialConditionRetriever : public edm::ESProducer, public edm::EventS bool producedEcalAlignmentEB_; bool producedEcalAlignmentEE_; bool producedEcalAlignmentES_; + bool producedEcalSimComponentShape_; bool producedEcalSimPulseShape_; bool producedEcalPFRecHitThresholds_; bool getEBAlignmentFromFile_; bool getEEAlignmentFromFile_; bool getESAlignmentFromFile_; + bool getSimComponentShapeFromFile_; bool getSimPulseShapeFromFile_; bool getLaserAlphaFromFileEB_; diff --git a/CalibCalorimetry/EcalTrivialCondModules/src/EcalTrivialConditionRetriever.cc b/CalibCalorimetry/EcalTrivialCondModules/src/EcalTrivialConditionRetriever.cc index 7f5417392a83e..838d1f8b39b8b 100644 --- a/CalibCalorimetry/EcalTrivialCondModules/src/EcalTrivialConditionRetriever.cc +++ b/CalibCalorimetry/EcalTrivialCondModules/src/EcalTrivialConditionRetriever.cc @@ -341,6 +341,18 @@ other solution : change this dataPath name to work directly in afs, ex. : findingRecord(); } + // sim component shape + getSimComponentShapeFromFile_ = ps.getUntrackedParameter("getSimComponentShapeFromFile", false); + producedEcalSimComponentShape_ = ps.getUntrackedParameter("producedEcalSimComponentShape", true); + std::vector vComponentShapes; + EBSimComponentShapeFiles_ = + ps.getUntrackedParameter >("EBSimComponentShapeFiles", vComponentShapes); + + if (producedEcalSimComponentShape_) { // user asks to produce constants + setWhatProduced(this, &EcalTrivialConditionRetriever::getEcalSimComponentShapeFromConfiguration); + findingRecord(); + } + // sim pulse shape getSimPulseShapeFromFile_ = ps.getUntrackedParameter("getSimPulseShapeFromFile", false); producedEcalSimPulseShape_ = ps.getUntrackedParameter("producedEcalSimPulseShape", true); @@ -3544,3 +3556,37 @@ std::unique_ptr EcalTrivialConditionRetriever::getEcalSimPuls return result; } + +std::unique_ptr EcalTrivialConditionRetriever::getEcalSimComponentShapeFromConfiguration( + const EcalSimComponentShapeRcd&) { + auto result = std::make_unique(); + + // save time interval to be used for the pulse shape + result->time_interval = sim_pulse_shape_TI_; + + // containers to store the shape info + std::vector > EBshapes; + + // --- get the shapes from the user provided txt files + if (!EBSimComponentShapeFiles_.empty()) { + int iShape(0); + for (auto filename : EBSimComponentShapeFiles_) { + std::ifstream shapeEBFile; + EBshapes.emplace_back(); + shapeEBFile.open(EBSimComponentShapeFiles_[iShape].c_str()); + float ww; + while (shapeEBFile >> ww) + EBshapes[iShape].push_back(ww); + shapeEBFile.close(); + ++iShape; + } + } + + // --- save threshold + result->barrel_thresh = sim_pulse_shape_EB_thresh_; + + // --- copy + copy(EBshapes.begin(), EBshapes.end(), back_inserter(result->barrel_shapes)); + + return result; +} diff --git a/CondCore/EcalPlugins/plugins/BuildFile.xml b/CondCore/EcalPlugins/plugins/BuildFile.xml index b6ebee2d60261..31e9a03f94a6c 100644 --- a/CondCore/EcalPlugins/plugins/BuildFile.xml +++ b/CondCore/EcalPlugins/plugins/BuildFile.xml @@ -282,6 +282,12 @@ + + + + + + diff --git a/CondCore/EcalPlugins/plugins/EcalSimComponentShape_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalSimComponentShape_PayloadInspector.cc new file mode 100644 index 0000000000000..fbb2e0a2e64ef --- /dev/null +++ b/CondCore/EcalPlugins/plugins/EcalSimComponentShape_PayloadInspector.cc @@ -0,0 +1,102 @@ +#include "CondCore/Utilities/interface/PayloadInspectorModule.h" +#include "CondCore/Utilities/interface/PayloadInspector.h" +#include "CondCore/EcalPlugins/plugins/EcalDrawUtils.h" + +// the data format of the condition to be inspected +#include "CondFormats/EcalObjects/interface/EcalSimComponentShape.h" + +#include "TProfile.h" +#include "TCanvas.h" +#include "TStyle.h" +#include "TLine.h" +#include "TLatex.h" +#include "TMarker.h" + +#include + +namespace { + /******************************************** + profile of ECAL SimComponentShape for 1 IOV + ********************************************/ + class EcalSimComponentShapeProfile : public cond::payloadInspector::PlotImage { + public: + EcalSimComponentShapeProfile() + : cond::payloadInspector::PlotImage("ECAL SimComponentShape - Profile ") { + setSingleIov(true); + } + + bool fill(const std::vector > &iovs) override { + auto iov = iovs.front(); + std::shared_ptr payload = fetchPayload(std::get<1>(iov)); + unsigned int run = std::get<0>(iov); + std::vector profiles; + std::vector EBnbins; + std::vector EBxmaxs; + double EBth; + int iShape = 0; + if (payload.get()) { + EBth = (*payload).barrel_thresh; + double time = (*payload).time_interval; + std::vector > EBshapes = (*payload).barrel_shapes; + char nameBuffer[50]; + for (auto EBshape : EBshapes) { + EBnbins.push_back(EBshape.size()); + EBxmaxs.push_back(EBnbins[iShape] * time); + sprintf(nameBuffer, "EBComponentShape_%d", iShape); + profiles.push_back(new TProfile(nameBuffer, "", EBnbins[iShape], 0, EBxmaxs[iShape])); + for (int s = 0; s < EBnbins[iShape]; s++) { + double val = EBshape[s]; + profiles[iShape]->Fill(s, val); + } + ++iShape; + } + } // if payload.get() + else + return false; + + // gStyle->SetPalette(1); + gStyle->SetOptStat(0); + gStyle->SetPalette(kThermometer); + TCanvas canvas("ESPS", "ESPS", 1000, 500); + TLatex t1; + t1.SetNDC(); + t1.SetTextAlign(26); + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("Sim Component Shapes, IOV %i", run)); + + TPad *pad = new TPad("p_0", "p_0", 0.0, 0.0, 1.0, 0.95); + pad->Draw(); + pad->cd(); + iShape = 0; + for (auto profile : profiles) { + if (iShape == 0) { + profile->SetXTitle("time (ns)"); + profile->SetYTitle("normalized amplitude (ADC#)"); + profile->GetXaxis()->SetRangeUser(0., 275.); + profile->GetYaxis()->SetRangeUser(0., 1.25); + } + profile->SetMarkerColor(TColor::GetPalette().At(10 * iShape)); + profile->SetLineColor(TColor::GetPalette().At(10 * iShape)); + profile->SetMarkerStyle(20); + profile->SetMarkerSize(.25); + if (iShape == 0) { + profile->Draw(""); + } else { + profile->Draw("SAME"); + } + ++iShape; + } + pad->BuildLegend(.7, .225, .85, .8); + t1.SetTextAlign(12); + t1.DrawLatex(0.4, 0.85, Form("EB component shapes, threshold %f", EBth)); + + std::string ImageName(m_imageFileName); + canvas.SaveAs(ImageName.c_str()); + return true; + } // fill method + }; + +} // namespace + +// Register the classes as boost python plugin +PAYLOAD_INSPECTOR_MODULE(EcalSimComponentShape) { PAYLOAD_INSPECTOR_CLASS(EcalSimComponentShapeProfile); } diff --git a/CondCore/EcalPlugins/src/plugin.cc b/CondCore/EcalPlugins/src/plugin.cc index 3472afa007f91..fe753ac848cfe 100644 --- a/CondCore/EcalPlugins/src/plugin.cc +++ b/CondCore/EcalPlugins/src/plugin.cc @@ -170,6 +170,9 @@ #include "CondFormats/EcalObjects/interface/EcalSimPulseShape.h" #include "CondFormats/DataRecord/interface/EcalSimPulseShapeRcd.h" +#include "CondFormats/EcalObjects/interface/EcalSimComponentShape.h" +#include "CondFormats/DataRecord/interface/EcalSimComponentShapeRcd.h" + #include "CondFormats/EcalObjects/interface/EcalMustacheSCParameters.h" #include "CondFormats/DataRecord/interface/EcalMustacheSCParametersRcd.h" #include "CondFormats/EcalObjects/interface/EcalSCDynamicDPhiParameters.h" @@ -201,6 +204,7 @@ REGISTER_PLUGIN(EcalClusterEnergyCorrectionParametersRcd, EcalFunParams); REGISTER_PLUGIN(EcalClusterEnergyCorrectionObjectSpecificParametersRcd, EcalFunParams); REGISTER_PLUGIN(EcalSimPulseShapeRcd, EcalSimPulseShape); +REGISTER_PLUGIN(EcalSimComponentShapeRcd, EcalSimComponentShape); REGISTER_PLUGIN(EcalMappingElectronicsRcd, EcalCondObjectContainer); diff --git a/CondCore/Utilities/plugins/Module_2XML.cc b/CondCore/Utilities/plugins/Module_2XML.cc index 545686d069e15..09e00aebbc052 100644 --- a/CondCore/Utilities/plugins/Module_2XML.cc +++ b/CondCore/Utilities/plugins/Module_2XML.cc @@ -96,6 +96,7 @@ PAYLOAD_2XML_MODULE(pluginUtilities_payload2xml) { PAYLOAD_2XML_CLASS(EcalSRSettings); PAYLOAD_2XML_CLASS(EcalSampleMask); PAYLOAD_2XML_CLASS(EcalSamplesCorrelation); + PAYLOAD_2XML_CLASS(EcalSimComponentShape); PAYLOAD_2XML_CLASS(EcalSimPulseShape); PAYLOAD_2XML_CLASS(EcalTBWeights); PAYLOAD_2XML_CLASS(EcalTPGFineGrainEBGroup); diff --git a/CondCore/Utilities/src/CondFormats.h b/CondCore/Utilities/src/CondFormats.h index bc70211ada4f7..a5d2b7a5730d1 100644 --- a/CondCore/Utilities/src/CondFormats.h +++ b/CondCore/Utilities/src/CondFormats.h @@ -206,6 +206,7 @@ #include "CondFormats/EcalObjects/interface/EcalTPGOddWeightIdMap.h" #include "CondFormats/EcalObjects/interface/EcalTPGTPMode.h" #include "CondFormats/EcalObjects/interface/EcalWeightXtalGroups.h" +#include "CondFormats/EcalObjects/interface/EcalSimComponentShape.h" #include "CondFormats/EcalObjects/interface/EcalSimPulseShape.h" #include "CondFormats/Common/interface/FileBlob.h" //#include "CondFormats/GeometryObjects/interface/GeometryFile.h" diff --git a/CondFormats/DataRecord/interface/EcalSimComponentShapeRcd.h b/CondFormats/DataRecord/interface/EcalSimComponentShapeRcd.h new file mode 100644 index 0000000000000..bba86593c334f --- /dev/null +++ b/CondFormats/DataRecord/interface/EcalSimComponentShapeRcd.h @@ -0,0 +1,6 @@ +#ifndef CondFormats_DataRecord_EcalSimComponentShapeRcd_h +#define CondFormats_DataRecord_EcalSimComponentShapeRcd_h + +#include "FWCore/Framework/interface/EventSetupRecordImplementation.h" +class EcalSimComponentShapeRcd : public edm::eventsetup::EventSetupRecordImplementation {}; +#endif diff --git a/CondFormats/DataRecord/src/EcalSimComponentShapeRcd.cc b/CondFormats/DataRecord/src/EcalSimComponentShapeRcd.cc new file mode 100644 index 0000000000000..83277a3deea31 --- /dev/null +++ b/CondFormats/DataRecord/src/EcalSimComponentShapeRcd.cc @@ -0,0 +1,4 @@ +#include "CondFormats/DataRecord/interface/EcalSimComponentShapeRcd.h" +#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h" + +EVENTSETUP_RECORD_REG(EcalSimComponentShapeRcd); diff --git a/CondFormats/EcalObjects/interface/EcalSimComponentShape.h b/CondFormats/EcalObjects/interface/EcalSimComponentShape.h new file mode 100644 index 0000000000000..c83826fac6706 --- /dev/null +++ b/CondFormats/EcalObjects/interface/EcalSimComponentShape.h @@ -0,0 +1,18 @@ +#ifndef CondFormats_EcalObjects_EcalSimComponentShape_hh +#define CondFormats_EcalObjects_EcalSimComponentShape_hh + +#include "CondFormats/Serialization/interface/Serializable.h" +#include + +class EcalSimComponentShape { +public: + EcalSimComponentShape() = default; + + std::vector > barrel_shapes; // there is no need to getters/setters, just access data directly + + double barrel_thresh; + float time_interval; // time interval of the shape + + COND_SERIALIZABLE; +}; +#endif diff --git a/CondFormats/EcalObjects/src/EcalSimComponentShape.cc b/CondFormats/EcalObjects/src/EcalSimComponentShape.cc new file mode 100644 index 0000000000000..d2e135d5b6c93 --- /dev/null +++ b/CondFormats/EcalObjects/src/EcalSimComponentShape.cc @@ -0,0 +1 @@ +#include "CondFormats/EcalObjects/interface/EcalSimComponentShape.h" diff --git a/CondFormats/EcalObjects/src/T_EventSetup_EcalSimComponentShape.cc b/CondFormats/EcalObjects/src/T_EventSetup_EcalSimComponentShape.cc new file mode 100644 index 0000000000000..45311ac73475c --- /dev/null +++ b/CondFormats/EcalObjects/src/T_EventSetup_EcalSimComponentShape.cc @@ -0,0 +1,3 @@ +#include "CondFormats/EcalObjects/interface/EcalSimComponentShape.h" +#include "FWCore/Utilities/interface/typelookup.h" +TYPELOOKUP_DATA_REG(EcalSimComponentShape); diff --git a/CondFormats/EcalObjects/src/classes.h b/CondFormats/EcalObjects/src/classes.h index f35fcf033ea60..cf9e4896a0f2b 100644 --- a/CondFormats/EcalObjects/src/classes.h +++ b/CondFormats/EcalObjects/src/classes.h @@ -67,6 +67,7 @@ #include "CondFormats/EcalObjects/interface/EcalTPGSpike.h" #include "CondFormats/EcalObjects/interface/EcalSRSettings.h" #include "CondFormats/EcalObjects/interface/EcalSimPulseShape.h" +#include "CondFormats/EcalObjects/interface/EcalSimComponentShape.h" #include "CondFormats/EcalObjects/interface/EcalMustacheSCParameters.h" #include "CondFormats/EcalObjects/interface/EcalSCDynamicDPhiParameters.h" //ECAL PH2: diff --git a/CondFormats/EcalObjects/src/classes_def.xml b/CondFormats/EcalObjects/src/classes_def.xml index ea50b1da79b67..a6895cbdf9f58 100644 --- a/CondFormats/EcalObjects/src/classes_def.xml +++ b/CondFormats/EcalObjects/src/classes_def.xml @@ -296,6 +296,12 @@ + + + + + + diff --git a/CondFormats/EcalObjects/src/headers.h b/CondFormats/EcalObjects/src/headers.h index 11b173bbaec83..380d009737fc6 100644 --- a/CondFormats/EcalObjects/src/headers.h +++ b/CondFormats/EcalObjects/src/headers.h @@ -6,6 +6,7 @@ #include "CondFormats/EcalObjects/interface/EcalPulseSymmCovariances.h" #include "CondFormats/EcalObjects/interface/EcalPFRecHitThresholds.h" #include "CondFormats/EcalObjects/interface/EcalSimPulseShape.h" +#include "CondFormats/EcalObjects/interface/EcalSimComponentShape.h" #include "CondFormats/EcalObjects/interface/EcalMustacheSCParameters.h" #include "CondFormats/EcalObjects/interface/EcalSCDynamicDPhiParameters.h" #include "CondFormats/EcalObjects/interface/EcalTPGWeightGroup.h" diff --git a/CondFormats/EcalObjects/test/testSerializationEcalObjects.cpp b/CondFormats/EcalObjects/test/testSerializationEcalObjects.cpp index 014d131cc0878..37ea922a0ebca 100644 --- a/CondFormats/EcalObjects/test/testSerializationEcalObjects.cpp +++ b/CondFormats/EcalObjects/test/testSerializationEcalObjects.cpp @@ -86,6 +86,7 @@ int main() { testSerialization(); testSerialization(); testSerialization(); + testSerialization(); testSerialization(); testSerialization(); testSerialization(); diff --git a/CondTools/Ecal/interface/EcalDBCopy.h b/CondTools/Ecal/interface/EcalDBCopy.h index 69a3d65bf7ff9..e133d84ff189d 100644 --- a/CondTools/Ecal/interface/EcalDBCopy.h +++ b/CondTools/Ecal/interface/EcalDBCopy.h @@ -43,6 +43,7 @@ class EcalLaserAPDPNRatios; class Alignments; class EcalTimeOffsetConstant; class EcalSampleMask; +class EcalSimComponentShape; class EcalSimPulseShape; class EcalTimeBiasCorrections; class EcalSamplesCorrelation; @@ -79,6 +80,7 @@ class EEAlignmentRcd; class ESAlignmentRcd; class EcalTimeOffsetConstantRcd; class EcalSampleMaskRcd; +class EcalSimComponentShapeRcd; class EcalSimPulseShapeRcd; class EcalTimeBiasCorrectionsRcd; class EcalSamplesCorrelationRcd; @@ -134,6 +136,7 @@ class EcalDBCopy : public edm::one::EDAnalyzer<> { edm::ESGetToken esAlignmentToken_; edm::ESGetToken ecalTimeOffsetConstantToken_; edm::ESGetToken ecalSampleMaskToken_; + edm::ESGetToken ecalSimComponentShapeToken_; edm::ESGetToken ecalSimPulseShapeToken_; edm::ESGetToken ecalTimeBiasCorrectionsToken_; edm::ESGetToken ecalSamplesCorrelationToken_; diff --git a/CondTools/Ecal/interface/XMLTags.h b/CondTools/Ecal/interface/XMLTags.h index 383e360b18d76..8f55f8d44f382 100644 --- a/CondTools/Ecal/interface/XMLTags.h +++ b/CondTools/Ecal/interface/XMLTags.h @@ -57,6 +57,7 @@ namespace xuti { const std::string rms1_tag("rms_x1"); const std::string PulseShapes_tag("EcalPulseShapes"); + const std::string SimComponentShape_tag("EcalSimComponentShape"); const std::string SimPulseShape_tag("EcalSimPulseShape"); const std::string sample0_tag("sample_0"); const std::string sample1_tag("sample_1"); diff --git a/CondTools/Ecal/python/copySimComponentShapeFromFiles_cfg.py b/CondTools/Ecal/python/copySimComponentShapeFromFiles_cfg.py new file mode 100644 index 0000000000000..fb77a34c2fcf9 --- /dev/null +++ b/CondTools/Ecal/python/copySimComponentShapeFromFiles_cfg.py @@ -0,0 +1,63 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("TEST") +process.load("CalibCalorimetry.EcalTrivialCondModules.EcalTrivialCondRetriever_cfi") +process.EcalTrivialConditionRetriever.producedEcalSimComponentShape = cms.untracked.bool(True) +process.EcalTrivialConditionRetriever.getSimComponentShapeFromFile = cms.untracked.bool(True) ### if set False hadrdcoded shapes will be loaded by default + + +### phase II Pulse Shapes +process.EcalTrivialConditionRetriever.sim_component_shape_TI = cms.untracked.double(1) +process.EcalTrivialConditionRetriever.sim_component_shape_EB_thresh = cms.double(0.00013) +fileNames = [f"EB_SimComponentShape_PhaseI_depth{i}.txt" for i in range(0,23)] +#fileNames = [f"EB_SimComponentShape_PhaseII_depth{i}.txt" for i in range(0,23)] +process.EcalTrivialConditionRetriever.EBSimComponentShapeFiles = cms.untracked.vstring(fileNames) + + +process.load("CondCore.CondDB.CondDB_cfi") +#process.CondDBCommon.connect = 'oracle://cms_orcon_prod/CMS_COND_31X_ECAL' +#process.CondDBCommon.DBParameters.authenticationPath = '/nfshome0/popcondev/conddb' +process.CondDB.connect = 'sqlite_file:EBSimComponentShape_PhaseI.db' +#process.CondDB.connect = 'sqlite_file:EBSimComponentShape_PhaseII.db' + +process.MessageLogger = cms.Service("MessageLogger", + cerr = cms.untracked.PSet( + enable = cms.untracked.bool(False) + ), + cout = cms.untracked.PSet( + enable = cms.untracked.bool(True) + ), + debugModules = cms.untracked.vstring('*') +) + +process.source = cms.Source("EmptyIOVSource", + firstValue = cms.uint64(1), + lastValue = cms.uint64(1), + timetype = cms.string('runnumber'), + interval = cms.uint64(1) +) + +process.PoolDBOutputService = cms.Service("PoolDBOutputService", + process.CondDB, + toPut = cms.VPSet( + cms.PSet( + record = cms.string('EcalSimComponentShapeRcd'), + tag = cms.string('EcalSimComponentShape_PhaseI') + #tag = cms.string('EcalSimComponentShape_PhaseII') + ) + ) +) + +process.dbCopy = cms.EDAnalyzer("EcalDBCopy", + timetype = cms.string('runnumber'), + toCopy = cms.VPSet( + cms.PSet( + record = cms.string('EcalSimComponentShapeRcd'), + container = cms.string('EcalSimComponentShape') + ) + ) +) + +process.prod = cms.EDAnalyzer("EcalTrivialObjectAnalyzer") + +process.p = cms.Path(process.prod*process.dbCopy) diff --git a/CondTools/Ecal/src/EcalDBCopy.cc b/CondTools/Ecal/src/EcalDBCopy.cc index 587c6172a03c2..992757e14c323 100644 --- a/CondTools/Ecal/src/EcalDBCopy.cc +++ b/CondTools/Ecal/src/EcalDBCopy.cc @@ -51,6 +51,8 @@ #include "CondFormats/EcalObjects/interface/EcalSamplesCorrelation.h" #include "CondFormats/DataRecord/interface/EcalSamplesCorrelationRcd.h" +#include "CondFormats/EcalObjects/interface/EcalSimComponentShape.h" +#include "CondFormats/DataRecord/interface/EcalSimComponentShapeRcd.h" #include "CondFormats/EcalObjects/interface/EcalSimPulseShape.h" #include "CondFormats/DataRecord/interface/EcalSimPulseShapeRcd.h" @@ -91,6 +93,7 @@ EcalDBCopy::EcalDBCopy(const edm::ParameterSet& iConfig) esAlignmentToken_(esConsumes()), ecalTimeOffsetConstantToken_(esConsumes()), ecalSampleMaskToken_(esConsumes()), + ecalSimComponentShapeToken_(esConsumes()), ecalSimPulseShapeToken_(esConsumes()), ecalTimeBiasCorrectionsToken_(esConsumes()), ecalSamplesCorrelationToken_(esConsumes()) { @@ -182,6 +185,8 @@ bool EcalDBCopy::shouldCopy(const edm::EventSetup& evtSetup, const std::string& cacheID = evtSetup.get().cacheIdentifier(); } else if (container == "EcalTimeBiasCorrections") { cacheID = evtSetup.get().cacheIdentifier(); + } else if (container == "EcalSimComponentShape") { + cacheID = evtSetup.get().cacheIdentifier(); } else if (container == "EcalSimPulseShape") { cacheID = evtSetup.get().cacheIdentifier(); } else if (container == "EcalSamplesCorrelation") { @@ -364,6 +369,10 @@ void EcalDBCopy::copyToDB(const edm::EventSetup& evtSetup, const std::string& co edm::LogInfo("EcalDBCopy") << "sample mask pointer is: " << &obj << std::endl; dbOutput->createOneIOV(obj, dbOutput->beginOfTime(), recordName); + } else if (container == "EcalSimComponentShape") { + const auto& obj = evtSetup.getData(ecalSimComponentShapeToken_); + dbOutput->createOneIOV(obj, dbOutput->beginOfTime(), recordName); + } else if (container == "EcalSimPulseShape") { const auto& obj = evtSetup.getData(ecalSimPulseShapeToken_); dbOutput->createOneIOV(obj, dbOutput->beginOfTime(), recordName); diff --git a/Configuration/Eras/python/Modifier_run3_ecal_devel_cff.py b/Configuration/Eras/python/Modifier_run3_ecal_devel_cff.py new file mode 100644 index 0000000000000..48d4436487bcd --- /dev/null +++ b/Configuration/Eras/python/Modifier_run3_ecal_devel_cff.py @@ -0,0 +1,4 @@ +import FWCore.ParameterSet.Config as cms + +run3_ecal_devel = cms.Modifier() + diff --git a/Configuration/StandardSequences/python/Eras.py b/Configuration/StandardSequences/python/Eras.py index d3d5de80dd970..de49f65893322 100644 --- a/Configuration/StandardSequences/python/Eras.py +++ b/Configuration/StandardSequences/python/Eras.py @@ -80,6 +80,7 @@ def __init__(self): 'run2_miniAOD_80XLegacy','run2_miniAOD_94XFall17', 'run2_nanoAOD_106Xv2', 'run3_nanoAOD_122', 'run3_nanoAOD_124', + 'run3_ecal_devel', 'hcalHardcodeConditions', 'hcalSkipPacker', 'run2_HLTconditions_2016','run2_HLTconditions_2017','run2_HLTconditions_2018', 'bParking'] diff --git a/DataFormats/EcalDigi/interface/EcalTimeDigi.h b/DataFormats/EcalDigi/interface/EcalTimeDigi.h index 9fb2a629d3199..88e40a6482ffb 100644 --- a/DataFormats/EcalDigi/interface/EcalTimeDigi.h +++ b/DataFormats/EcalDigi/interface/EcalTimeDigi.h @@ -15,6 +15,7 @@ class EcalTimeDigi { void swap(EcalTimeDigi& rh) { std::swap(id_, rh.id_); std::swap(size_, rh.size_); + std::swap(waveform_, rh.waveform_); std::swap(data_, rh.data_); } @@ -25,16 +26,21 @@ class EcalTimeDigi { const float& sample(unsigned int i) const { return data_[i]; } void setSize(unsigned int size); + void setWaveform(float* waveform); void setSample(unsigned int i, const float sam) { data_[i] = sam; } void setSampleOfInterest(int i) { sampleOfInterest_ = i; } /// Gets the BX==0 sample. If =-1 then it means that only OOT hits are present int sampleOfInterest() const { return sampleOfInterest_; } + std::vector waveform() const { return waveform_; } + + static const unsigned int WAVEFORMSAMPLES = 250; private: DetId id_; unsigned int size_; int sampleOfInterest_; + std::vector waveform_; std::vector data_; }; diff --git a/DataFormats/EcalDigi/src/EcalTimeDigi.cc b/DataFormats/EcalDigi/src/EcalTimeDigi.cc index 973de476f31c7..3e0dfe72a82d7 100644 --- a/DataFormats/EcalDigi/src/EcalTimeDigi.cc +++ b/DataFormats/EcalDigi/src/EcalTimeDigi.cc @@ -2,11 +2,12 @@ namespace { constexpr unsigned int MAXSAMPLES = 10; -} +} // namespace -EcalTimeDigi::EcalTimeDigi() : id_(0), size_(0), sampleOfInterest_(-1), data_(MAXSAMPLES) {} +EcalTimeDigi::EcalTimeDigi() : id_(0), size_(0), sampleOfInterest_(-1), waveform_(WAVEFORMSAMPLES), data_(MAXSAMPLES) {} -EcalTimeDigi::EcalTimeDigi(const DetId& id) : id_(id), size_(0), sampleOfInterest_(-1), data_(MAXSAMPLES) {} +EcalTimeDigi::EcalTimeDigi(const DetId& id) + : id_(id), size_(0), sampleOfInterest_(-1), waveform_(WAVEFORMSAMPLES), data_(MAXSAMPLES) {} void EcalTimeDigi::setSize(unsigned int size) { if (size > MAXSAMPLES) @@ -15,3 +16,10 @@ void EcalTimeDigi::setSize(unsigned int size) { size_ = size; data_.resize(size_); } + +void EcalTimeDigi::setWaveform(float* waveform) { + waveform_.resize(WAVEFORMSAMPLES); + for (uint i(0); i != WAVEFORMSAMPLES; ++i) { + waveform_[i] = waveform[i]; + } +} diff --git a/DataFormats/EcalDigi/src/classes_def.xml b/DataFormats/EcalDigi/src/classes_def.xml index 5f365f96523b4..7893cc71b2bf2 100644 --- a/DataFormats/EcalDigi/src/classes_def.xml +++ b/DataFormats/EcalDigi/src/classes_def.xml @@ -53,7 +53,8 @@ - + + diff --git a/SimCalorimetry/Configuration/python/SimCalorimetry_EventContent_cff.py b/SimCalorimetry/Configuration/python/SimCalorimetry_EventContent_cff.py index 96df64f343601..722afe99fc13e 100644 --- a/SimCalorimetry/Configuration/python/SimCalorimetry_EventContent_cff.py +++ b/SimCalorimetry/Configuration/python/SimCalorimetry_EventContent_cff.py @@ -44,6 +44,12 @@ run2_common.toModify( SimCalorimetryFEVTDEBUG.outputCommands, func=lambda outputCommands: outputCommands.append('keep *_simHcalUnsuppressedDigis_*_*') ) run2_common.toModify( SimCalorimetryRAW.outputCommands, func=lambda outputCommands: outputCommands.append('keep *_simHcalUnsuppressedDigis_*_*') ) +from Configuration.Eras.Modifier_run3_ecal_devel_cff import run3_ecal_devel +run3_ecal_devel.toModify(SimCalorimetryFEVTDEBUG.outputCommands, func=lambda outputCommands: outputCommands.append('keep *_mix_EBTimeDigi_*') ) +run3_ecal_devel.toModify(SimCalorimetryRAW.outputCommands, func=lambda outputCommands: outputCommands.append('keep *_mix_EBTimeDigi_*') ) +run3_ecal_devel.toModify(SimCalorimetryFEVTDEBUG.outputCommands, func=lambda outputCommands: outputCommands.append('keep EBDigiCollection_simEcalUnsuppressedDigis_*_*') ) +run3_ecal_devel.toModify(SimCalorimetryRAW.outputCommands, func=lambda outputCommands: outputCommands.append('keep EBDigiCollection_simEcalUnsuppressedDigis_*_*') ) + from Configuration.Eras.Modifier_phase2_ecal_devel_cff import phase2_ecal_devel phase2_ecal_devel.toModify(SimCalorimetryFEVTDEBUG.outputCommands, func=lambda outputCommands: outputCommands.append('keep *_ecal*_*_*') ) diff --git a/SimCalorimetry/EcalSimAlgos/interface/ComponentShape.h b/SimCalorimetry/EcalSimAlgos/interface/ComponentShape.h new file mode 100644 index 0000000000000..c93c0fadd06e5 --- /dev/null +++ b/SimCalorimetry/EcalSimAlgos/interface/ComponentShape.h @@ -0,0 +1,34 @@ +#ifndef SimCalorimetry_EcalSimAlgos_ComponentShape_h +#define SimCalorimetry_EcalSimAlgos_ComponentShape_h + +#include "FWCore/Framework/interface/ConsumesCollector.h" +#include "SimCalorimetry/EcalSimAlgos/interface/EcalShapeBase.h" +#include "CondFormats/EcalObjects/interface/EcalSimComponentShape.h" +#include "CondFormats/DataRecord/interface/EcalSimComponentShapeRcd.h" + +class ComponentShape : public EcalShapeBase { +public: + // useDB = false + ComponentShape(int shapeIndex) : EcalShapeBase(false), shapeIndex_(shapeIndex) { buildMe(nullptr, false); } + // useDB = true, buildMe is executed when setEventSetup and DB conditions are available + ComponentShape(int shapeIndex, edm::ESGetToken espsToken) + : EcalShapeBase(true), espsToken_(espsToken), shapeIndex_(shapeIndex) {} + + // override EcalShapeBase timeToRise, so that it does not align component shapes to same peaking time + double timeToRise() const override; + +protected: + void fillShape(float& time_interval, + double& m_thresh, + EcalShapeBase::DVec& aVec, + const edm::EventSetup* es) const override; + +private: + edm::ESGetToken espsToken_; + int shapeIndex_; + static constexpr double kTimeToRise = 16.; //used for timeToRise + // 16 nanoseconds ~aligns the phase II component + // sim to the default with the current setup +}; + +#endif diff --git a/SimCalorimetry/EcalSimAlgos/interface/ComponentShapeCollection.h b/SimCalorimetry/EcalSimAlgos/interface/ComponentShapeCollection.h new file mode 100644 index 0000000000000..3d84eb505cd79 --- /dev/null +++ b/SimCalorimetry/EcalSimAlgos/interface/ComponentShapeCollection.h @@ -0,0 +1,39 @@ +#ifndef SimCalorimetry_EcalSimAlgos_ComponentShapeCollection_h +#define SimCalorimetry_EcalSimAlgos_ComponentShapeCollection_h + +#include "FWCore/Framework/interface/ConsumesCollector.h" +#include "SimCalorimetry/EcalSimAlgos/interface/EcalShapeBase.h" +#include "SimCalorimetry/EcalSimAlgos/interface/ComponentShape.h" + +class ComponentShapeCollection { +public: + ComponentShapeCollection(bool useDBShape, edm::ConsumesCollector iC) + : m_useDBShape(useDBShape), m_thresh(0.0), espsToken_(iC.esConsumes()) { + fillCollection(iC); + } + ComponentShapeCollection(edm::ConsumesCollector iC) : ComponentShapeCollection(true, iC) {} + ComponentShapeCollection(bool useDBShape) : m_useDBShape(useDBShape), m_thresh(0.0) { fillCollection(useDBShape); } + + ~ComponentShapeCollection() {} + + void setEventSetup(const edm::EventSetup& evtSetup); + + const std::shared_ptr at(int depthIndex) const; + static int toDepthBin(int index); + static int maxDepthBin(); + +protected: + void buildMe(const edm::EventSetup* es = nullptr); + void fillCollection(bool useDBShape); + void fillCollection(edm::ConsumesCollector iC); + + bool m_useDBShape; + double m_thresh; + +private: + const static int m_nDepthBins = 23; // dictated by SimG4CMS/Calo/src/ECalSD.cc, 230 mm / 10 mm + edm::ESGetToken espsToken_; + std::shared_ptr m_shapeArr[m_nDepthBins]; +}; + +#endif diff --git a/SimCalorimetry/EcalSimAlgos/interface/ComponentSimParameterMap.h b/SimCalorimetry/EcalSimAlgos/interface/ComponentSimParameterMap.h new file mode 100644 index 0000000000000..f0b551b12b5c9 --- /dev/null +++ b/SimCalorimetry/EcalSimAlgos/interface/ComponentSimParameterMap.h @@ -0,0 +1,38 @@ +#ifndef SimCalorimetry_EcalSimAlgos_ComponentSimParameterMap_h +#define SimCalorimetry_EcalSimAlgos_ComponentSimParameterMap_h + +#include "SimCalorimetry/CaloSimAlgos/interface/CaloVSimParameterMap.h" +#include "SimCalorimetry/CaloSimAlgos/interface/CaloSimParameters.h" + +class ComponentSimParameterMap : public CaloVSimParameterMap { +public: + ComponentSimParameterMap(); + ComponentSimParameterMap(bool addToBarrel, + bool separateDigi, + double simHitToPhotoelectronsBarrel, + double simHitToPhotoelectronsEndcap, + double photoelectronsToAnalogBarrel, + double photoelectronsToAnalogEndcap, + double samplingFactor, + double timePhase, + int readoutFrameSize, + int binOfMaximum, + bool doPhotostatistics, + bool syncPhase); + /// dtor + ~ComponentSimParameterMap() override {} + + /// return the sim parameters relative to the right subdet + const CaloSimParameters& simParameters(const DetId& id) const override; + bool addToBarrel() const { return m_addToBarrel; } + bool separateDigi() const { return m_separateDigi; } + +private: + bool m_addToBarrel; + bool m_separateDigi; + + /// EB + CaloSimParameters theComponentParameters; +}; + +#endif diff --git a/SimCalorimetry/EcalSimAlgos/interface/EBHitResponse.h b/SimCalorimetry/EcalSimAlgos/interface/EBHitResponse.h index 22407557bcbce..22060eaf46940 100644 --- a/SimCalorimetry/EcalSimAlgos/interface/EBHitResponse.h +++ b/SimCalorimetry/EcalSimAlgos/interface/EBHitResponse.h @@ -3,10 +3,12 @@ #include "CalibFormats/CaloObjects/interface/CaloTSamples.h" #include "SimCalorimetry/EcalSimAlgos/interface/EcalHitResponse.h" +#include "SimCalorimetry/EcalSimAlgos/interface/ComponentShapeCollection.h" #include "CondFormats/EcalObjects/interface/EcalIntercalibConstantsMC.h" #include "DataFormats/EcalDigi/interface/EcalConstants.h" class APDSimParameters; +class ComponentSimParameterMap; namespace CLHEP { class HepRandomEngine; @@ -26,8 +28,11 @@ class EBHitResponseImpl : public EcalHitResponse { EBHitResponseImpl(const CaloVSimParameterMap* parameterMap, const CaloVShape* shape, bool apdOnly, + bool doComponent, const APDSimParameters* apdPars = nullptr, - const CaloVShape* apdShape = nullptr); + const CaloVShape* apdShape = nullptr, + const ComponentSimParameterMap* componentPars = nullptr, + const ComponentShapeCollection* componentShapes = nullptr); ~EBHitResponseImpl() override; @@ -62,6 +67,8 @@ class EBHitResponseImpl : public EcalHitResponse { void putAPDSignal(const DetId& detId, double npe, double time); + void putComponentSignal(const DetId& detId, double npe, double time); + void putAnalogSignal(const PCaloHit& inputHit, CLHEP::HepRandomEngine*) override; private: @@ -81,13 +88,19 @@ class EBHitResponseImpl : public EcalHitResponse { const APDSimParameters* apdParameters() const; const CaloVShape* apdShape() const; + const ComponentSimParameterMap* componentParameters() const; + const ComponentShapeCollection* shapes() const; + double apdSignalAmplitude(const PCaloHit& hit, CLHEP::HepRandomEngine*) const; void findIntercalibConstant(const DetId& detId, double& icalconst) const; const bool m_apdOnly; + const bool m_isComponentShapeBased; const APDSimParameters* m_apdPars; const CaloVShape* m_apdShape; + const ComponentSimParameterMap* m_componentPars; + const ComponentShapeCollection* m_componentShapes; const EcalIntercalibConstantsMC* m_intercal; std::vector m_timeOffVec; diff --git a/SimCalorimetry/EcalSimAlgos/interface/EBHitResponse.icc b/SimCalorimetry/EcalSimAlgos/interface/EBHitResponse.icc index 83487bb635314..1fcfaa61f7659 100644 --- a/SimCalorimetry/EcalSimAlgos/interface/EBHitResponse.icc +++ b/SimCalorimetry/EcalSimAlgos/interface/EBHitResponse.icc @@ -1,5 +1,7 @@ #include "SimCalorimetry/EcalSimAlgos/interface/EBHitResponse.h" +#include "SimCalorimetry/EcalSimAlgos/interface/ComponentShapeCollection.h" #include "SimCalorimetry/EcalSimAlgos/interface/APDSimParameters.h" +#include "SimCalorimetry/EcalSimAlgos/interface/ComponentSimParameterMap.h" #include "SimCalorimetry/CaloSimAlgos/interface/CaloVSimParameterMap.h" #include "SimCalorimetry/CaloSimAlgos/interface/CaloSimParameters.h" #include "SimCalorimetry/CaloSimAlgos/interface/CaloVHitFilter.h" @@ -18,15 +20,21 @@ template EBHitResponseImpl::EBHitResponseImpl(const CaloVSimParameterMap* parameterMap, const CaloVShape* shape, bool apdOnly, + bool doComponent, const APDSimParameters* apdPars, - const CaloVShape* apdShape) + const CaloVShape* apdShape, + const ComponentSimParameterMap* componentPars, + const ComponentShapeCollection* componentShapes) : EcalHitResponse(parameterMap, shape), m_apdOnly(apdOnly), + m_isComponentShapeBased(doComponent), m_apdPars(apdPars), m_apdShape(apdShape), + m_componentPars(componentPars), + m_componentShapes(componentShapes), m_timeOffVec(kNOffsets, apdParameters()->timeOffset()), pcub(nullptr == apdPars ? 0 : apdParameters()->nonlParms()[0]), pqua(nullptr == apdPars ? 0 : apdParameters()->nonlParms()[1]), @@ -77,6 +85,12 @@ const CaloVShape* EBHitResponseImpl::apdShape() const { return m_apdShape; } +template +const ComponentShapeCollection* EBHitResponseImpl::shapes() const { + assert(nullptr != m_componentShapes); + return m_componentShapes; +} + template void EBHitResponseImpl::putAPDSignal(const DetId& detId, double npe, double time) { const CaloSimParameters& parameters(*params(detId)); @@ -119,18 +133,30 @@ void EBHitResponseImpl::putAnalogSignal(const PCaloHit& hit, CLHEP::He } const double jitter(time - timeOfFlight(detId)); - - const double tzero = (shape()->timeToRise() + parameters.timePhase() - jitter - - kSamplePeriod * (parameters.binOfMaximum() - phaseShift())); - double binTime(tzero); - EcalSamples& result(*findSignal(detId)); - const unsigned int rsize(result.size()); - for (unsigned int bin(0); bin != rsize; ++bin) { - result[bin] += (*shape())(binTime)*signal; - binTime += kSamplePeriod; + if (!m_isComponentShapeBased) { + const double tzero = (shape()->timeToRise() + parameters.timePhase() - jitter - + kSamplePeriod * (parameters.binOfMaximum() - phaseShift())); + double binTime(tzero); + + for (unsigned int bin(0); bin != rsize; ++bin) { + result[bin] += (*shape())(binTime)*signal; + binTime += kSamplePeriod; + } + } else { + if (ComponentShapeCollection::toDepthBin(hit.depth()) <= ComponentShapeCollection::maxDepthBin()) { + const double tzero = + (shapes()->at(hit.depth())->timeToRise() + m_componentPars->simParameters(detId).timePhase() - jitter - + kSamplePeriod * (parameters.binOfMaximum() - phaseShift())); + double binTime(tzero); + + for (unsigned int bin(0); bin != rsize; ++bin) { + result[bin] += (*(shapes()->at(hit.depth())))(binTime)*signal; + binTime += kSamplePeriod; + } + } } } diff --git a/SimCalorimetry/EcalSimAlgos/interface/EcalHitResponse.h b/SimCalorimetry/EcalSimAlgos/interface/EcalHitResponse.h index c8433ba932c5b..7bedeb3f7325e 100644 --- a/SimCalorimetry/EcalSimAlgos/interface/EcalHitResponse.h +++ b/SimCalorimetry/EcalSimAlgos/interface/EcalHitResponse.h @@ -9,6 +9,7 @@ #include "CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbService.h" #include "DataFormats/Provenance/interface/Timestamp.h" #include "DataFormats/EcalDigi/interface/EcalConstants.h" +#include "SimCalorimetry/EcalSimAlgos/interface/ComponentShapeCollection.h" #include #include diff --git a/SimCalorimetry/EcalSimAlgos/interface/EcalShapeBase.h b/SimCalorimetry/EcalSimAlgos/interface/EcalShapeBase.h index 6feb103cfd007..cdb82c6c35420 100644 --- a/SimCalorimetry/EcalSimAlgos/interface/EcalShapeBase.h +++ b/SimCalorimetry/EcalSimAlgos/interface/EcalShapeBase.h @@ -39,13 +39,13 @@ class EcalShapeBase : public CaloVShape { double derivative(double time) const; // appears to not be used anywhere - void m_shape_print(const char* fileName); - void setEventSetup(const edm::EventSetup& evtSetup); + void m_shape_print(const char* fileName) const; + void setEventSetup(const edm::EventSetup& evtSetup, bool normalize = true); protected: unsigned int timeIndex(double aTime) const; - void buildMe(const edm::EventSetup* = nullptr); + void buildMe(const edm::EventSetup* = nullptr, bool normalize = true); virtual void fillShape(float& time_interval, double& m_thresh, diff --git a/SimCalorimetry/EcalSimAlgos/interface/EcalTimeMapDigitizer.h b/SimCalorimetry/EcalSimAlgos/interface/EcalTimeMapDigitizer.h index c271e426fb8e5..ba138a9267f78 100644 --- a/SimCalorimetry/EcalSimAlgos/interface/EcalTimeMapDigitizer.h +++ b/SimCalorimetry/EcalSimAlgos/interface/EcalTimeMapDigitizer.h @@ -13,18 +13,22 @@ #include "DataFormats/EcalDetId/interface/EcalSubdetector.h" #include "CalibFormats/CaloObjects/interface/CaloTSamplesBase.h" #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h" +#include "SimCalorimetry/EcalSimAlgos/interface/ComponentShapeCollection.h" class CaloSubdetectorGeometry; class EcalTimeMapDigitizer { public: struct time_average { - static const unsigned short time_average_capacity = 10; + static const unsigned short time_average_capacity = 10; // this corresponds to the number of BX + static const unsigned short waveform_capacity = EcalTimeDigi::WAVEFORMSAMPLES; // this will give a waveform with + static constexpr double waveform_granularity = 1.; // a granularity of 1ns - DetId id; + const DetId id; float average_time[time_average_capacity]; unsigned int nhits[time_average_capacity]; float tot_energy[time_average_capacity]; + float waveform[waveform_capacity]; time_average(const DetId& myId) : id(myId) { for (unsigned int i(0); i < time_average_capacity; ++i) { @@ -32,6 +36,9 @@ class EcalTimeMapDigitizer { nhits[i] = 0; tot_energy[i] = 0; } + for (unsigned int i(0); i < waveform_capacity; ++i) { + waveform[i] = 0; + } }; void calculateAverage() { @@ -49,6 +56,9 @@ class EcalTimeMapDigitizer { nhits[i] = 0; tot_energy[i] = 0; } + for (unsigned int i(0); i < waveform_capacity; ++i) { + waveform[i] = 0; + } }; bool zero() { @@ -66,7 +76,7 @@ class EcalTimeMapDigitizer { typedef std::vector VecInd; - explicit EcalTimeMapDigitizer(EcalSubdetector myDet); + explicit EcalTimeMapDigitizer(EcalSubdetector myDet, ComponentShapeCollection* componentShapes); virtual ~EcalTimeMapDigitizer(); @@ -74,6 +84,8 @@ class EcalTimeMapDigitizer { void setGeometry(const CaloSubdetectorGeometry* geometry); + void setEventSetup(const edm::EventSetup& eventSetup); + void initializeMap(); void run(EcalTimeDigiCollection& output); @@ -127,10 +139,14 @@ class EcalTimeMapDigitizer { int m_timeLayerId; + ComponentShapeCollection* m_ComponentShapes; + const CaloSubdetectorGeometry* m_geometry; double timeOfFlight(const DetId& detId, int layer) const; + const ComponentShapeCollection* shapes() const; + std::vector m_vSam; VecInd m_index; diff --git a/SimCalorimetry/EcalSimAlgos/src/ComponentShape.cc b/SimCalorimetry/EcalSimAlgos/src/ComponentShape.cc new file mode 100644 index 0000000000000..01dc92036692b --- /dev/null +++ b/SimCalorimetry/EcalSimAlgos/src/ComponentShape.cc @@ -0,0 +1,33 @@ +#include + +#include "SimCalorimetry/EcalSimAlgos/interface/ComponentShape.h" + +void ComponentShape::fillShape(float& time_interval, + double& m_thresh, + EcalShapeBase::DVec& aVec, + const edm::EventSetup* es) const { + if (m_useDBShape) { + if (es == nullptr) { + throw cms::Exception("[ComponentShape] DB conditions are not available, const edm::EventSetup* es == nullptr "); + } + auto const& esps = es->getData(espsToken_); + + //barrel_shapes elements are vectors of floats, to save space in db + aVec = std::vector(esps.barrel_shapes.at(shapeIndex_).begin(), esps.barrel_shapes.at(shapeIndex_).end()); + time_interval = esps.time_interval; + m_thresh = esps.barrel_thresh; + } + + else { // fill with dummy values, since this code is only reached before the actual digi simulation + m_thresh = 0.00013; + time_interval = 1.0; + aVec.reserve(500); + for (unsigned int i(0); i != 500; ++i) + aVec.push_back(0.0); + } +} + +double ComponentShape::timeToRise() const { + return kTimeToRise; +} // hardcoded rather than computed because + // components need relative time shifts diff --git a/SimCalorimetry/EcalSimAlgos/src/ComponentShapeCollection.cc b/SimCalorimetry/EcalSimAlgos/src/ComponentShapeCollection.cc new file mode 100644 index 0000000000000..b75a4900fbe42 --- /dev/null +++ b/SimCalorimetry/EcalSimAlgos/src/ComponentShapeCollection.cc @@ -0,0 +1,56 @@ +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "SimCalorimetry/EcalSimAlgos/interface/ComponentShapeCollection.h" + +// #define component_shape_debug 1 +void ComponentShapeCollection::setEventSetup(const edm::EventSetup& evtSetup) { +#ifdef component_shape_debug + std::cout << "ComponentShapeCollection::setEventSetup called " << std::endl; +#endif + buildMe(&evtSetup); + for (int i = 0; i < m_nDepthBins; ++i) { + m_shapeArr[i]->setEventSetup(evtSetup, false); + } +} + +void ComponentShapeCollection::buildMe(const edm::EventSetup* evtSetup) { +#ifdef component_shape_debug + std::cout << "ComponentShapeCollection::buildMe called " << std::endl; +#endif + fillCollection(m_useDBShape); +}; + +void ComponentShapeCollection::fillCollection(edm::ConsumesCollector iC) { +#ifdef component_shape_debug + std::cout << "ComponentShapeCollection::fillCollection(edm::ConsumesCollector iC) called " << std::endl; +#endif + //m_shapeArr->clear(); + for (int i = 0; i < m_nDepthBins; ++i) { + m_shapeArr[i] = std::make_shared(i, espsToken_); + } +} + +void ComponentShapeCollection::fillCollection(bool useDBShape = false) { +#ifdef component_shape_debug + std::cout << "ComponentShapeCollection::fillCollection(bool useDBShape) called " << std::endl; +#endif + //m_shapeArr->clear(); + if (useDBShape) { + for (int i = 0; i < m_nDepthBins; ++i) { + m_shapeArr[i] = std::make_shared(i, espsToken_); + } + } else { + for (int i = 0; i < m_nDepthBins; ++i) { + m_shapeArr[i] = std::make_shared(i); + } + } +} + +const std::shared_ptr ComponentShapeCollection::at(int depthIndex) const { + if (0 > toDepthBin(depthIndex) || toDepthBin(depthIndex) > m_nDepthBins - 1) + throw cms::Exception("ComponentShape:: invalid depth requested"); + return m_shapeArr[toDepthBin(depthIndex)]; +} + +int ComponentShapeCollection::toDepthBin(int index) { return index >> 3; } + +int ComponentShapeCollection::maxDepthBin() { return m_nDepthBins - 1; } diff --git a/SimCalorimetry/EcalSimAlgos/src/ComponentSimParameterMap.cc b/SimCalorimetry/EcalSimAlgos/src/ComponentSimParameterMap.cc new file mode 100644 index 0000000000000..a10a411dd8651 --- /dev/null +++ b/SimCalorimetry/EcalSimAlgos/src/ComponentSimParameterMap.cc @@ -0,0 +1,31 @@ +#include "SimCalorimetry/EcalSimAlgos/interface/ComponentSimParameterMap.h" +#include "DataFormats/DetId/interface/DetId.h" +#include "DataFormats/EcalDetId/interface/EcalSubdetector.h" +#include + +ComponentSimParameterMap::ComponentSimParameterMap(bool addToBarrel, + bool separateDigi, + double simHitToPhotoelectronsBarrel, + double simHitToPhotoelectronsEndcap, + double photoelectronsToAnalogBarrel, + double photoelectronsToAnalogEndcap, + double samplingFactor, + double timePhase, + int readoutFrameSize, + int binOfMaximum, + bool doPhotostatistics, + bool syncPhase) + : m_addToBarrel(addToBarrel), + m_separateDigi(separateDigi), + theComponentParameters(simHitToPhotoelectronsBarrel, + photoelectronsToAnalogBarrel, + samplingFactor, + timePhase, + readoutFrameSize, + binOfMaximum, + doPhotostatistics, + syncPhase) {} + +const CaloSimParameters& ComponentSimParameterMap::simParameters(const DetId& detId) const { + return theComponentParameters; +} diff --git a/SimCalorimetry/EcalSimAlgos/src/EcalShapeBase.cc b/SimCalorimetry/EcalSimAlgos/src/EcalShapeBase.cc index b608d388b0b09..80ac6b9e8eb0b 100644 --- a/SimCalorimetry/EcalSimAlgos/src/EcalShapeBase.cc +++ b/SimCalorimetry/EcalSimAlgos/src/EcalShapeBase.cc @@ -16,7 +16,7 @@ EcalShapeBase::EcalShapeBase(bool useDBShape) m_timeOfMax(0.0), m_thresh(0.0) {} -void EcalShapeBase::setEventSetup(const edm::EventSetup& evtSetup) { buildMe(&evtSetup); } +void EcalShapeBase::setEventSetup(const edm::EventSetup& evtSetup, bool normalize) { buildMe(&evtSetup, normalize); } double EcalShapeBase::timeOfThr() const { return m_firstTimeOverThreshold; } @@ -26,7 +26,7 @@ double EcalShapeBase::timeToRise() const { return timeOfMax() - timeOfThr(); } double EcalShapeBase::threshold() const { return m_thresh; } -void EcalShapeBase::buildMe(const edm::EventSetup* evtSetup) { +void EcalShapeBase::buildMe(const edm::EventSetup* evtSetup, bool normalize) { DVec shapeArray; float time_interval = 0; @@ -49,8 +49,10 @@ void EcalShapeBase::buildMe(const edm::EventSetup* evtSetup) { const double maxelt(1.e-5 < maxel ? maxel : 1); - for (unsigned int i(0); i != shapeArray.size(); ++i) { - shapeArray[i] = shapeArray[i] / maxelt; + if (normalize) { + for (unsigned int i(0); i != shapeArray.size(); ++i) { + shapeArray[i] = shapeArray[i] / maxelt; + } } const double thresh(threshold() / maxelt); @@ -119,10 +121,12 @@ double EcalShapeBase::derivative(double aTime) const { return (m_denseArraySize == index ? 0 : m_deriv[index]); } -void EcalShapeBase::m_shape_print(const char* fileName) { +void EcalShapeBase::m_shape_print(const char* fileName) const { std::ofstream fs; fs.open(fileName); + fs << "{\n"; for (auto i : m_shape) fs << "vec.push_back(" << i << ");\n"; + fs << "}\n"; fs.close(); } diff --git a/SimCalorimetry/EcalSimAlgos/src/EcalTimeMapDigitizer.cc b/SimCalorimetry/EcalSimAlgos/src/EcalTimeMapDigitizer.cc index bfdbb01bd7e89..62800f8ee5461 100644 --- a/SimCalorimetry/EcalSimAlgos/src/EcalTimeMapDigitizer.cc +++ b/SimCalorimetry/EcalSimAlgos/src/EcalTimeMapDigitizer.cc @@ -20,12 +20,14 @@ #include -//#define ecal_time_debug 1 +// #define ecal_time_debug 1 +// #define waveform_debug 1 const float EcalTimeMapDigitizer::MIN_ENERGY_THRESHOLD = 5e-5; //50 KeV threshold to consider a valid hit in the timing detector -EcalTimeMapDigitizer::EcalTimeMapDigitizer(EcalSubdetector myDet) : m_subDet(myDet), m_geometry(nullptr) { +EcalTimeMapDigitizer::EcalTimeMapDigitizer(EcalSubdetector myDet, ComponentShapeCollection* componentShapes) + : m_subDet(myDet), m_ComponentShapes(componentShapes), m_geometry(nullptr) { // edm::Service rng ; // if ( !rng.isAvailable() ) // { @@ -38,15 +40,12 @@ EcalTimeMapDigitizer::EcalTimeMapDigitizer(EcalSubdetector myDet) : m_subDet(myD // m_RandGauss = new CLHEP::RandGaussQ( rng->getEngine() ) ; unsigned int size = 0; - DetId detId(0); //Initialize the map if (myDet == EcalBarrel) { size = EBDetId::kSizeForDenseIndexing; - detId = EBDetId::detIdFromDenseIndex(0); } else if (myDet == EcalEndcap) { size = EEDetId::kSizeForDenseIndexing; - detId = EEDetId::detIdFromDenseIndex(0); } else edm::LogError("TimeDigiError") << "[EcalTimeMapDigitizer]::ERROR::This subdetector " << myDet << " is not implemented"; @@ -55,11 +54,16 @@ EcalTimeMapDigitizer::EcalTimeMapDigitizer(EcalSubdetector myDet) : m_subDet(myD assert(m_minBunch <= 0); m_vSam.reserve(size); + m_index.reserve(size); for (unsigned int i(0); i != size; ++i) { // m_vSam.emplace_back(CaloGenericDetId( detId.det(), detId.subdetId(), i ) , // m_maxBunch-m_minBunch+1, abs(m_minBunch) ); - m_vSam.emplace_back(TimeSamples(CaloGenericDetId(detId.det(), detId.subdetId(), i))); + if (myDet == EcalBarrel) { + m_vSam.push_back(TimeSamples((DetId)(EBDetId::detIdFromDenseIndex(i)))); + } else { + m_vSam.push_back(TimeSamples((DetId)(EEDetId::detIdFromDenseIndex(i)))); + } } edm::LogInfo("TimeDigiInfo") << "[EcalTimeDigitizer]::Subdetector " << m_subDet << "::Reserved size for time digis " @@ -81,15 +85,13 @@ void EcalTimeMapDigitizer::add(const std::vector& hits, int bunchCross if (edm::isNotFinite((*it).time())) continue; - //Just consider only the hits belonging to the specified time layer - int depth2 = (((*it).depth() >> PCaloHit::kEcalDepthOffset) & PCaloHit::kEcalDepthMask); - - if (depth2 != m_timeLayerId) - continue; - if ((*it).energy() < MIN_ENERGY_THRESHOLD) //apply a minimal cut on the hit energy continue; + //Old behavior: Just consider only the hits belonging to the specified time layer + //int depth2 = (((*it).depth() >> PCaloHit::kEcalDepthOffset) & PCaloHit::kEcalDepthMask); + //I think things make more sense if we allow all depths -- JCH + const DetId detId((*it).id()); double time = (*it).time(); @@ -99,7 +101,28 @@ void EcalTimeMapDigitizer::add(const std::vector& hits, int bunchCross TimeSamples& result(*findSignal(detId)); + if (nullptr != m_ComponentShapes) { + // for now we have waveform_granularity = 1., 10 BX, and waveform capacity 250 -- we want to start at 25*bunchCrossing and go to the end of waveform capacity + double binTime(0); + for (unsigned int bin(0); bin != result.waveform_capacity; ++bin) { + if (ComponentShapeCollection::toDepthBin((*it).depth()) <= ComponentShapeCollection::maxDepthBin()) { + result.waveform[bin] += + (*(shapes()->at((*it).depth())))(binTime - jitter - 25 * (bunchCrossing - m_minBunch)) * (*it).energy(); + } +#ifdef waveform_debug + else { + std::cout << "strange depth found: " << ComponentShapeCollection::toDepthBin((*it).depth()) << std::endl; + } // note: understand what these depths mean +#endif + binTime += result.waveform_granularity; + } + } + //here fill the result for the given bunch crossing + + // i think this is obsolete now that there is a real MTD + //if (depth2 != m_timeLayerId) + // continue; result.average_time[bunchCrossing - m_minBunch] += jitter * (*it).energy(); result.tot_energy[bunchCrossing - m_minBunch] += (*it).energy(); result.nhits[bunchCrossing - m_minBunch]++; @@ -134,8 +157,7 @@ void EcalTimeMapDigitizer::blankOutUsedSamples() // blank out previously used e vSamAll(m_index[i])->setZero(); } - m_index.erase(m_index.begin(), // done and make ready to start over - m_index.end()); + m_index.clear(); // done and make ready to start over } void EcalTimeMapDigitizer::finalizeHits() { @@ -165,6 +187,17 @@ void EcalTimeMapDigitizer::initializeMap() { blankOutUsedSamples(); } +void EcalTimeMapDigitizer::setEventSetup(const edm::EventSetup& eventSetup) { + if (nullptr != m_ComponentShapes) + m_ComponentShapes->setEventSetup(eventSetup); + else + throw cms::Exception( + "[EcalTimeMapDigitizer] setEventSetup was called, but this should only be called when componentWaveform is " + "activated by cfg parameter"); +} + +const ComponentShapeCollection* EcalTimeMapDigitizer::shapes() const { return m_ComponentShapes; } + void EcalTimeMapDigitizer::run(EcalTimeDigiCollection& output) { #ifdef ecal_time_debug std::cout << "[EcalTimeMapDigitizer]::Finalizing hits and fill output collection" << std::endl; @@ -184,6 +217,8 @@ void EcalTimeMapDigitizer::run(EcalTimeDigiCollection& output) { #endif output.push_back(Digi(vSamAll(m_index[i])->id)); + if (nullptr != m_ComponentShapes) + output.back().setWaveform(vSamAll(m_index[i])->waveform); unsigned int nTimeHits = 0; float timeHits[vSamAll(m_index[i])->time_average_capacity]; @@ -227,8 +262,8 @@ double EcalTimeMapDigitizer::timeOfFlight(const DetId& detId, int layer) const { //not using the layer yet auto cellGeometry(m_geometry->getGeometry(detId)); assert(nullptr != cellGeometry); - GlobalPoint layerPos = - (cellGeometry)->getPosition(double(layer) + 0.5); //depth in mm in the middle of the layer position + GlobalPoint layerPos = (cellGeometry)->getPosition(); + //(cellGeometry)->getPosition(double(layer) + 0.5); //depth in mm in the middle of the layer position // JCH : I am not sure this is doing what it's supposed to, probably unimplemented since CaloCellGeometry returns the same value regardless of this double return layerPos.mag() * cm / c_light; } diff --git a/SimCalorimetry/EcalSimProducers/interface/EcalDigiProducer.h b/SimCalorimetry/EcalSimProducers/interface/EcalDigiProducer.h index 7d7f019fc966f..28cb92e3bbc72 100644 --- a/SimCalorimetry/EcalSimProducers/interface/EcalDigiProducer.h +++ b/SimCalorimetry/EcalSimProducers/interface/EcalDigiProducer.h @@ -25,6 +25,7 @@ #include "FWCore/Framework/interface/ProducesCollector.h" #include "Geometry/Records/interface/CaloGeometryRecord.h" #include "SimCalorimetry/EcalSimAlgos/interface/APDShape.h" +#include "SimCalorimetry/EcalSimAlgos/interface/ComponentShapeCollection.h" #include "SimCalorimetry/EcalSimAlgos/interface/EBShape.h" #include "SimCalorimetry/EcalSimAlgos/interface/EEShape.h" #include "SimCalorimetry/EcalSimAlgos/interface/EcalElectronicsSim.h" @@ -49,6 +50,7 @@ typedef CaloTDigitizer ESOldDigitizer; class ESDigitizer; class APDSimParameters; +class ComponentSimParameterMap; class EEHitResponse; class ESHitResponse; class CaloHitResponse; @@ -110,6 +112,7 @@ class EcalDigiProducer : public DigiAccumulatorMixMod { void checkCalibrations(const edm::Event &event, const edm::EventSetup &eventSetup); APDShape m_APDShape; + ComponentShapeCollection m_ComponentShapes; EBShape m_EBShape; EEShape m_EEShape; ESShape m_ESShape; // no const because gain must be set @@ -138,6 +141,7 @@ class EcalDigiProducer : public DigiAccumulatorMixMod { bool m_useLCcorrection; const bool m_apdSeparateDigi; + const bool m_componentSeparateDigi; const double m_EBs25notCont; const double m_EEs25notCont; @@ -151,8 +155,13 @@ class EcalDigiProducer : public DigiAccumulatorMixMod { const std::string m_apdDigiTag; std::unique_ptr m_apdParameters; + const std::string m_componentDigiTag; + std::unique_ptr m_componentParameters; + std::unique_ptr m_APDResponse; + std::unique_ptr m_ComponentResponse; + protected: std::unique_ptr m_EBResponse; std::unique_ptr m_EEResponse; @@ -175,6 +184,7 @@ class EcalDigiProducer : public DigiAccumulatorMixMod { std::unique_ptr m_ESDigitizer; std::unique_ptr m_APDDigitizer; + std::unique_ptr m_ComponentDigitizer; std::unique_ptr m_BarrelDigitizer; std::unique_ptr m_EndcapDigitizer; @@ -186,6 +196,8 @@ class EcalDigiProducer : public DigiAccumulatorMixMod { std::unique_ptr m_APDElectronicsSim; std::unique_ptr m_APDCoder; + std::unique_ptr m_ComponentElectronicsSim; + std::unique_ptr m_ComponentCoder; const CaloGeometry *m_Geometry; diff --git a/SimCalorimetry/EcalSimProducers/interface/EcalDigiProducer_Ph2.h b/SimCalorimetry/EcalSimProducers/interface/EcalDigiProducer_Ph2.h index bd1bf4ef189e0..30ab4dbd325be 100644 --- a/SimCalorimetry/EcalSimProducers/interface/EcalDigiProducer_Ph2.h +++ b/SimCalorimetry/EcalSimProducers/interface/EcalDigiProducer_Ph2.h @@ -2,6 +2,7 @@ #define SimCalorimetry_EcalSimProducers_EcalDigiProducer_Ph2_h #include "SimCalorimetry/EcalSimAlgos/interface/APDShape.h" +#include "SimCalorimetry/EcalSimAlgos/interface/ComponentShapeCollection.h" #include "SimCalorimetry/EcalSimAlgos/interface/EBShape.h" #include "DataFormats/Math/interface/Error.h" #include "FWCore/Framework/interface/ProducesCollector.h" @@ -26,6 +27,7 @@ #include class APDSimParameters; +class ComponentSimParameterMap; class CaloHitResponse; class EcalSimParameterMap; class EcalLiteDTUCoder; @@ -88,6 +90,7 @@ class EcalDigiProducer_Ph2 : public DigiAccumulatorMixMod { void checkCalibrations(const edm::Event& event, const edm::EventSetup& eventSetup); APDShape m_APDShape; + ComponentShapeCollection m_ComponentShapes; EBShape m_EBShape; const std::string m_EBdigiCollection; @@ -96,6 +99,7 @@ class EcalDigiProducer_Ph2 : public DigiAccumulatorMixMod { bool m_useLCcorrection; const bool m_apdSeparateDigi; + const bool m_componentSeparateDigi; const double m_EBs25notCont; @@ -108,8 +112,13 @@ class EcalDigiProducer_Ph2 : public DigiAccumulatorMixMod { const std::string m_apdDigiTag; std::unique_ptr m_apdParameters; + const std::string m_componentDigiTag; + std::unique_ptr m_componentParameters; + std::unique_ptr m_APDResponse; + std::unique_ptr m_ComponentResponse; + protected: std::unique_ptr m_EBResponse; @@ -120,6 +129,7 @@ class EcalDigiProducer_Ph2 : public DigiAccumulatorMixMod { const edm::EDGetTokenT> m_HitsEBToken; std::unique_ptr m_APDDigitizer; + std::unique_ptr m_ComponentDigitizer; std::unique_ptr m_BarrelDigitizer; std::unique_ptr m_ElectronicsSim; @@ -128,6 +138,8 @@ class EcalDigiProducer_Ph2 : public DigiAccumulatorMixMod { typedef CaloTSamples EcalSamples_Ph2; std::unique_ptr> m_APDElectronicsSim; std::unique_ptr m_APDCoder; + std::unique_ptr> m_ComponentElectronicsSim; + std::unique_ptr m_ComponentCoder; const CaloGeometry* m_Geometry; diff --git a/SimCalorimetry/EcalSimProducers/interface/EcalTimeDigiProducer.h b/SimCalorimetry/EcalSimProducers/interface/EcalTimeDigiProducer.h index dd4b85bc31c93..4aa12c341084a 100644 --- a/SimCalorimetry/EcalSimProducers/interface/EcalTimeDigiProducer.h +++ b/SimCalorimetry/EcalSimProducers/interface/EcalTimeDigiProducer.h @@ -11,6 +11,7 @@ #include "FWCore/Utilities/interface/EDGetToken.h" #include "Geometry/Records/interface/CaloGeometryRecord.h" #include "SimCalorimetry/EcalSimAlgos/interface/EcalDigitizerTraits.h" +#include "SimCalorimetry/EcalSimAlgos/interface/ComponentShapeCollection.h" #include "SimDataFormats/CaloHit/interface/PCaloHit.h" #include "SimGeneral/MixingModule/interface/DigiAccumulatorMixMod.h" @@ -55,7 +56,8 @@ class EcalTimeDigiProducer : public DigiAccumulatorMixMod { private: int m_timeLayerEB; const CaloGeometry *m_Geometry; - + const bool m_componentWaveform; + ComponentShapeCollection *m_ComponentShapes = nullptr; EcalTimeMapDigitizer *m_BarrelDigitizer; }; diff --git a/SimCalorimetry/EcalSimProducers/python/componentDigiParameters_cff.py b/SimCalorimetry/EcalSimProducers/python/componentDigiParameters_cff.py new file mode 100644 index 0000000000000..c0cc379c4542e --- /dev/null +++ b/SimCalorimetry/EcalSimProducers/python/componentDigiParameters_cff.py @@ -0,0 +1,10 @@ +import FWCore.ParameterSet.Config as cms + +component_digi_parameters = cms.PSet( + componentDigiTag = cms.string("Component"), + componentTimeTag = cms.string("Component"), + componentSeparateDigi = cms.bool(False), + componentAddToBarrel = cms.bool(False), + componentTimePhase = cms.double(0.), + +) diff --git a/SimCalorimetry/EcalSimProducers/python/ecalTimeDigiParameters_cff.py b/SimCalorimetry/EcalSimProducers/python/ecalTimeDigiParameters_cff.py index 538128ce0096b..9413074d206b8 100644 --- a/SimCalorimetry/EcalSimProducers/python/ecalTimeDigiParameters_cff.py +++ b/SimCalorimetry/EcalSimProducers/python/ecalTimeDigiParameters_cff.py @@ -6,5 +6,6 @@ EBtimeDigiCollection = cms.string('EBTimeDigi'), EEtimeDigiCollection = cms.string('EETimeDigi'), timeLayerBarrel = cms.int32(7), - timeLayerEndcap = cms.int32(3) + timeLayerEndcap = cms.int32(3), + componentWaveform = cms.bool(False) ) diff --git a/SimCalorimetry/EcalSimProducers/src/EcalDigiProducer.cc b/SimCalorimetry/EcalSimProducers/src/EcalDigiProducer.cc index a2d0ec9246a7d..f8449a0b66c2b 100644 --- a/SimCalorimetry/EcalSimProducers/src/EcalDigiProducer.cc +++ b/SimCalorimetry/EcalSimProducers/src/EcalDigiProducer.cc @@ -4,6 +4,7 @@ #include "FWCore/Framework/interface/Event.h" #include "SimCalorimetry/CaloSimAlgos/interface/CaloHitResponse.h" #include "SimCalorimetry/EcalSimAlgos/interface/APDSimParameters.h" +#include "SimCalorimetry/EcalSimAlgos/interface/ComponentSimParameterMap.h" #include "SimCalorimetry/EcalSimAlgos/interface/EBHitResponse.h" #include "SimCalorimetry/EcalSimAlgos/interface/EEHitResponse.h" #include "SimCalorimetry/EcalSimAlgos/interface/ESElectronicsSim.h" @@ -40,6 +41,9 @@ EcalDigiProducer::EcalDigiProducer(const edm::ParameterSet ¶ms, if (m_apdSeparateDigi) producesCollector.produces(m_apdDigiTag); + if (m_componentSeparateDigi) + producesCollector.produces(m_componentDigiTag); + producesCollector.produces(m_EBdigiCollection); producesCollector.produces(m_EEdigiCollection); producesCollector.produces(m_ESdigiCollection); @@ -49,6 +53,7 @@ EcalDigiProducer::EcalDigiProducer(const edm::ParameterSet ¶ms, EcalDigiProducer::EcalDigiProducer(const edm::ParameterSet ¶ms, edm::ConsumesCollector &iC) : DigiAccumulatorMixMod(), m_APDShape(iC), + m_ComponentShapes(iC), m_EBShape(iC), m_EEShape(iC), m_ESShape(), @@ -67,6 +72,7 @@ EcalDigiProducer::EcalDigiProducer(const edm::ParameterSet ¶ms, edm::Consume m_geometryToken(iC.esConsumes()), m_useLCcorrection(params.getUntrackedParameter("UseLCcorrection")), m_apdSeparateDigi(params.getParameter("apdSeparateDigi")), + m_componentSeparateDigi(params.getParameter("componentSeparateDigi")), m_EBs25notCont(params.getParameter("EBs25notContainment")), m_EEs25notCont(params.getParameter("EEs25notContainment")), @@ -94,16 +100,51 @@ EcalDigiProducer::EcalDigiProducer(const edm::ParameterSet ¶ms, edm::Consume m_apdDigiTag, params.getParameter>("apdNonlParms"))), - m_APDResponse( - !m_apdSeparateDigi - ? nullptr - : new EBHitResponse(m_ParameterMap.get(), &m_EBShape, true, m_apdParameters.get(), &m_APDShape)), + m_componentDigiTag(params.getParameter("componentDigiTag")), + m_componentParameters( + std::make_unique(params.getParameter("componentAddToBarrel"), + m_componentSeparateDigi, + params.getParameter("simHitToPhotoelectronsBarrel"), + 0, // endcap parameters not needed + params.getParameter("photoelectronsToAnalogBarrel"), + 0, + params.getParameter("samplingFactor"), + params.getParameter("componentTimePhase"), + m_readoutFrameSize, + params.getParameter("binOfMaximum"), + params.getParameter("doPhotostatistics"), + params.getParameter("syncPhase"))), + + m_APDResponse(!m_apdSeparateDigi ? nullptr + : new EBHitResponse(m_ParameterMap.get(), + &m_EBShape, + true, + false, + m_apdParameters.get(), + &m_APDShape, + m_componentParameters.get(), + &m_ComponentShapes)), + + m_ComponentResponse(!m_componentSeparateDigi + ? nullptr + : std::make_unique( + m_ParameterMap.get(), + &m_EBShape, + false, + true, + m_apdParameters.get(), + &m_APDShape, + m_componentParameters.get(), + &m_ComponentShapes)), // check if that false is correct // TODO HERE JCH m_EBResponse(new EBHitResponse(m_ParameterMap.get(), &m_EBShape, false, // barrel + false, // normal non-component shape based m_apdParameters.get(), - &m_APDShape)), + &m_APDShape, + m_componentParameters.get(), + &m_ComponentShapes)), m_EEResponse(new EEHitResponse(m_ParameterMap.get(), &m_EEShape)), m_ESResponse(new ESHitResponse(m_ParameterMap.get(), &m_ESShape)), @@ -130,6 +171,7 @@ EcalDigiProducer::EcalDigiProducer(const edm::ParameterSet ¶ms, edm::Consume : new ESDigitizer(m_ESResponse.get(), m_ESElectronicsSimFast.get(), m_addESNoise)), m_APDDigitizer(nullptr), + m_ComponentDigitizer(nullptr), m_BarrelDigitizer(nullptr), m_EndcapDigitizer(nullptr), m_ElectronicsSim(nullptr), @@ -249,6 +291,20 @@ EcalDigiProducer::EcalDigiProducer(const edm::ParameterSet ¶ms, edm::Consume m_APDDigitizer = std::make_unique(m_APDResponse.get(), m_APDElectronicsSim.get(), false); } + if (m_componentSeparateDigi) { + m_ComponentCoder = std::make_unique(addNoise, + m_PreMix1, + m_EBCorrNoise[0].get(), + m_EECorrNoise[0].get(), + m_EBCorrNoise[1].get(), + m_EECorrNoise[1].get(), + m_EBCorrNoise[2].get(), + m_EECorrNoise[2].get()); + m_ComponentElectronicsSim = std::make_unique( + m_ParameterMap.get(), m_ComponentCoder.get(), applyConstantTerm, rmsConstantTerm); + m_ComponentDigitizer = + std::make_unique(m_ComponentResponse.get(), m_ComponentElectronicsSim.get(), addNoise); + } if (m_doEB) { m_BarrelDigitizer = std::make_unique(m_EBResponse.get(), m_ElectronicsSim.get(), addNoise); @@ -272,6 +328,9 @@ void EcalDigiProducer::initializeEvent(edm::Event const &event, edm::EventSetup if (m_apdSeparateDigi) { m_APDDigitizer->initializeHits(); } + if (m_componentSeparateDigi) { + m_ComponentDigitizer->initializeHits(); + } } if (m_doEE) { m_EndcapDigitizer->initializeHits(); @@ -295,6 +354,9 @@ void EcalDigiProducer::accumulateCaloHits(HitsHandle const &ebHandle, if (m_apdSeparateDigi) { m_APDDigitizer->add(*ebHandle.product(), bunchCrossing, randomEngine_); } + if (m_componentSeparateDigi) { + m_ComponentDigitizer->add(*ebHandle.product(), bunchCrossing, randomEngine_); + } } if (m_doEE && eeHandle.isValid()) { @@ -316,6 +378,7 @@ void EcalDigiProducer::accumulate(edm::Event const &e, edm::EventSetup const &ev if (m_doEB) { m_EBShape.setEventSetup(eventSetup); m_APDShape.setEventSetup(eventSetup); + m_ComponentShapes.setEventSetup(eventSetup); } const edm::Handle> &eeHandle = e.getHandle(m_HitsEEToken_); @@ -356,6 +419,8 @@ void EcalDigiProducer::accumulate(PileUpEventPrincipal const &e, void EcalDigiProducer::finalizeEvent(edm::Event &event, edm::EventSetup const &eventSetup) { // Step B: Create empty output std::unique_ptr apdResult(!m_apdSeparateDigi || !m_doEB ? nullptr : new EBDigiCollection()); + std::unique_ptr componentResult(!m_componentSeparateDigi || !m_doEB ? nullptr + : new EBDigiCollection()); std::unique_ptr barrelResult(new EBDigiCollection()); std::unique_ptr endcapResult(new EEDigiCollection()); std::unique_ptr preshowerResult(new ESDigiCollection()); @@ -372,6 +437,10 @@ void EcalDigiProducer::finalizeEvent(edm::Event &event, edm::EventSetup const &e m_APDDigitizer->run(*apdResult, randomEngine_); edm::LogInfo("DigiInfo") << "APD Digis: " << apdResult->size(); } + if (m_componentSeparateDigi) { + m_ComponentDigitizer->run(*componentResult, randomEngine_); + edm::LogInfo("DigiInfo") << "Component Digis: " << componentResult->size(); + } } if (m_doEE) { @@ -394,6 +463,9 @@ void EcalDigiProducer::finalizeEvent(edm::Event &event, edm::EventSetup const &e } event.put(std::move(barrelResult), m_EBdigiCollection); + if (m_componentSeparateDigi) { + event.put(std::move(componentResult), m_componentDigiTag); + } event.put(std::move(endcapResult), m_EEdigiCollection); event.put(std::move(preshowerResult), m_ESdigiCollection); @@ -412,6 +484,8 @@ void EcalDigiProducer::beginLuminosityBlock(edm::LuminosityBlock const &lumi, ed if (m_doEB) { if (nullptr != m_APDResponse) m_APDResponse->initialize(engine); + if (nullptr != m_ComponentResponse) + m_ComponentResponse->initialize(engine); m_EBResponse->initialize(engine); } } @@ -424,6 +498,8 @@ void EcalDigiProducer::checkCalibrations(const edm::Event &event, const edm::Eve m_Coder->setPedestals(pedestals); if (nullptr != m_APDCoder) m_APDCoder->setPedestals(pedestals); + if (nullptr != m_ComponentCoder) + m_ComponentCoder->setPedestals(pedestals); // Ecal Intercalibration Constants const EcalIntercalibConstantsMC *ical = &eventSetup.getData(m_icalToken); @@ -431,10 +507,14 @@ void EcalDigiProducer::checkCalibrations(const edm::Event &event, const edm::Eve m_Coder->setIntercalibConstants(ical); if (nullptr != m_APDCoder) m_APDCoder->setIntercalibConstants(ical); + if (nullptr != m_ComponentCoder) + m_ComponentCoder->setIntercalibConstants(ical); m_EBResponse->setIntercal(ical); if (nullptr != m_APDResponse) m_APDResponse->setIntercal(ical); + if (nullptr != m_ComponentResponse) + m_ComponentResponse->setIntercal(ical); // Ecal LaserCorrection Constants const EcalLaserDbService *laser = &eventSetup.getData(m_laserToken); @@ -455,6 +535,8 @@ void EcalDigiProducer::checkCalibrations(const edm::Event &event, const edm::Eve m_Coder->setGainRatios(gr); if (nullptr != m_APDCoder) m_APDCoder->setGainRatios(gr); + if (nullptr != m_ComponentCoder) + m_ComponentCoder->setGainRatios(gr); EcalMGPAGainRatio *defaultRatios = new EcalMGPAGainRatio(); @@ -487,6 +569,8 @@ void EcalDigiProducer::checkCalibrations(const edm::Event &event, const edm::Eve m_Coder->setFullScaleEnergy(EBscale, EEscale); if (nullptr != m_APDCoder) m_APDCoder->setFullScaleEnergy(EBscale, EEscale); + if (nullptr != m_ComponentCoder) + m_ComponentCoder->setFullScaleEnergy(EBscale, EEscale); if (m_doES) { // ES condition objects @@ -523,6 +607,8 @@ void EcalDigiProducer::updateGeometry() { if (m_doEB) { if (nullptr != m_APDResponse) m_APDResponse->setGeometry(m_Geometry->getSubdetectorGeometry(DetId::Ecal, EcalBarrel)); + if (nullptr != m_ComponentResponse) + m_ComponentResponse->setGeometry(m_Geometry->getSubdetectorGeometry(DetId::Ecal, EcalBarrel)); m_EBResponse->setGeometry(m_Geometry->getSubdetectorGeometry(DetId::Ecal, EcalBarrel)); } if (m_doEE) { diff --git a/SimCalorimetry/EcalSimProducers/src/EcalDigiProducer_Ph2.cc b/SimCalorimetry/EcalSimProducers/src/EcalDigiProducer_Ph2.cc index 99b820d1c9fb9..6fb2e9947fcc4 100644 --- a/SimCalorimetry/EcalSimProducers/src/EcalDigiProducer_Ph2.cc +++ b/SimCalorimetry/EcalSimProducers/src/EcalDigiProducer_Ph2.cc @@ -4,6 +4,7 @@ #include "SimCalorimetry/CaloSimAlgos/interface/CaloHitResponse.h" #include "SimCalorimetry/EcalSimAlgos/interface/EcalSimParameterMap.h" #include "SimCalorimetry/EcalSimAlgos/interface/APDSimParameters.h" +#include "SimCalorimetry/EcalSimAlgos/interface/ComponentSimParameterMap.h" #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h" #include "SimCalorimetry/EcalSimAlgos/interface/EcalLiteDTUCoder.h" #include "Geometry/CaloGeometry/interface/CaloGeometry.h" @@ -47,6 +48,9 @@ EcalDigiProducer_Ph2::EcalDigiProducer_Ph2(const edm::ParameterSet& params, if (m_apdSeparateDigi) producesCollector.produces(m_apdDigiTag); + if (m_componentSeparateDigi) + producesCollector.produces(m_componentDigiTag); + producesCollector.produces(m_EBdigiCollection); } @@ -54,6 +58,7 @@ EcalDigiProducer_Ph2::EcalDigiProducer_Ph2(const edm::ParameterSet& params, EcalDigiProducer_Ph2::EcalDigiProducer_Ph2(const edm::ParameterSet& params, edm::ConsumesCollector& iC) : DigiAccumulatorMixMod(), m_APDShape(iC), + m_ComponentShapes(iC), m_EBShape(iC), m_EBdigiCollection(params.getParameter("EBdigiCollectionPh2")), @@ -61,6 +66,7 @@ EcalDigiProducer_Ph2::EcalDigiProducer_Ph2(const edm::ParameterSet& params, edm: m_hitsProducerTag(params.getParameter("hitsProducer")), m_useLCcorrection(params.getUntrackedParameter("UseLCcorrection")), m_apdSeparateDigi(params.getParameter("apdSeparateDigi")), + m_componentSeparateDigi(params.getParameter("componentSeparateDigi")), m_EBs25notCont(params.getParameter("EBs25notContainment")), @@ -88,22 +94,56 @@ EcalDigiProducer_Ph2::EcalDigiProducer_Ph2(const edm::ParameterSet& params, edm: m_apdDigiTag, params.getParameter>("apdNonlParms"))), - m_APDResponse(!m_apdSeparateDigi - ? nullptr - : std::make_unique( - m_ParameterMap.get(), &m_EBShape, true, m_apdParameters.get(), &m_APDShape)), + m_componentDigiTag(params.getParameter("componentDigiTag")), + m_componentParameters( + std::make_unique(params.getParameter("componentAddToBarrel"), + m_componentSeparateDigi, + params.getParameter("simHitToPhotoelectronsBarrel"), + 0, // endcap parameters not needed + params.getParameter("photoelectronsToAnalogBarrel"), + 0, + params.getParameter("samplingFactor"), + params.getParameter("componentTimePhase"), + m_readoutFrameSize, + params.getParameter("binOfMaximum"), + params.getParameter("doPhotostatistics"), + params.getParameter("syncPhase"))), + + m_APDResponse(!m_apdSeparateDigi ? nullptr + : std::make_unique(m_ParameterMap.get(), + &m_EBShape, + true, + false, + m_apdParameters.get(), + &m_APDShape, + m_componentParameters.get(), + &m_ComponentShapes)), + + m_ComponentResponse(!m_componentSeparateDigi ? nullptr + : std::make_unique(m_ParameterMap.get(), + &m_EBShape, + false, + true, + m_apdParameters.get(), + &m_APDShape, + m_componentParameters.get(), + &m_ComponentShapes)), m_EBResponse(std::make_unique(m_ParameterMap.get(), &m_EBShape, false, // barrel + false, // not component-based m_apdParameters.get(), - &m_APDShape)), + &m_APDShape, + m_componentParameters.get(), + &m_ComponentShapes)), m_PreMix1(params.getParameter("EcalPreMixStage1")), m_PreMix2(params.getParameter("EcalPreMixStage2")), m_HitsEBToken(iC.consumes>(edm::InputTag(m_hitsProducerTag, "EcalHitsEB"))), m_APDDigitizer(nullptr), + m_ComponentDigitizer(nullptr), m_BarrelDigitizer(nullptr), m_ElectronicsSim(nullptr), m_Coder(nullptr), @@ -167,6 +207,14 @@ EcalDigiProducer_Ph2::EcalDigiProducer_Ph2(const edm::ParameterSet& params, edm: m_APDDigitizer = std::make_unique(m_APDResponse.get(), m_APDElectronicsSim.get(), false); } + if (m_componentSeparateDigi) { + m_ComponentCoder = + std::make_unique(addNoise, m_PreMix1, m_EBCorrNoise[0].get(), m_EBCorrNoise[1].get()); + m_ComponentElectronicsSim = std::make_unique( + m_ParameterMap.get(), m_ComponentCoder.get(), applyConstantTerm, rmsConstantTerm); + m_ComponentDigitizer = + std::make_unique(m_ComponentResponse.get(), m_ComponentElectronicsSim.get(), addNoise); + } m_BarrelDigitizer = std::make_unique(m_EBResponse.get(), m_ElectronicsSim.get(), addNoise); } @@ -184,6 +232,9 @@ void EcalDigiProducer_Ph2::initializeEvent(edm::Event const& event, edm::EventSe if (m_apdSeparateDigi) { m_APDDigitizer->initializeHits(); } + if (m_componentSeparateDigi) { + m_ComponentDigitizer->initializeHits(); + } } void EcalDigiProducer_Ph2::accumulateCaloHits(HitsHandle const& ebHandle, int bunchCrossing) { @@ -193,6 +244,9 @@ void EcalDigiProducer_Ph2::accumulateCaloHits(HitsHandle const& ebHandle, int bu if (m_apdSeparateDigi) { m_APDDigitizer->add(*ebHandle.product(), bunchCrossing, randomEngine_); } + if (m_componentSeparateDigi) { + m_ComponentDigitizer->add(*ebHandle.product(), bunchCrossing, randomEngine_); + } } } @@ -201,6 +255,7 @@ void EcalDigiProducer_Ph2::accumulate(edm::Event const& e, edm::EventSetup const m_EBShape.setEventSetup(eventSetup); m_APDShape.setEventSetup(eventSetup); + m_ComponentShapes.setEventSetup(eventSetup); const edm::Handle>& ebHandle = e.getHandle(m_HitsEBToken); accumulateCaloHits(ebHandle, 0); @@ -221,10 +276,14 @@ void EcalDigiProducer_Ph2::accumulate(PileUpEventPrincipal const& e, void EcalDigiProducer_Ph2::finalizeEvent(edm::Event& event, edm::EventSetup const& eventSetup) { // Step B: Create empty output std::unique_ptr apdResult(nullptr); + std::unique_ptr componentResult(nullptr); std::unique_ptr barrelResult = std::make_unique(); if (m_apdSeparateDigi) { apdResult = std::make_unique(); } + if (m_componentSeparateDigi) { + componentResult = std::make_unique(); + } // run the algorithm m_BarrelDigitizer->run(*barrelResult, randomEngine_); @@ -236,10 +295,17 @@ void EcalDigiProducer_Ph2::finalizeEvent(edm::Event& event, edm::EventSetup cons m_APDDigitizer->run(*apdResult, randomEngine_); edm::LogInfo("DigiInfo") << "APD Digis: " << apdResult->size(); } + if (m_componentSeparateDigi) { + m_ComponentDigitizer->run(*componentResult, randomEngine_); + edm::LogInfo("DigiInfo") << "Component Digis: " << componentResult->size(); + } // Step D: Put outputs into event event.put(std::move(barrelResult), m_EBdigiCollection); + if (m_componentSeparateDigi) { + event.put(std::move(componentResult), m_componentDigiTag); + } randomEngine_ = nullptr; // to prevent access outside event } @@ -255,6 +321,8 @@ void EcalDigiProducer_Ph2::beginLuminosityBlock(edm::LuminosityBlock const& lumi if (nullptr != m_APDResponse) m_APDResponse->initialize(engine); + if (nullptr != m_ComponentResponse) + m_ComponentResponse->initialize(engine); m_EBResponse->initialize(engine); } @@ -265,6 +333,8 @@ void EcalDigiProducer_Ph2::checkCalibrations(const edm::Event& event, const edm: m_Coder->setPedestals(pedestals); if (nullptr != m_APDCoder) m_APDCoder->setPedestals(pedestals); + if (nullptr != m_ComponentCoder) + m_ComponentCoder->setPedestals(pedestals); // Ecal Intercalibration Constants auto ical = &eventSetup.getData(icalToken_); @@ -272,10 +342,14 @@ void EcalDigiProducer_Ph2::checkCalibrations(const edm::Event& event, const edm: m_Coder->setIntercalibConstants(ical); if (nullptr != m_APDCoder) m_APDCoder->setIntercalibConstants(ical); + if (nullptr != m_ComponentCoder) + m_ComponentCoder->setIntercalibConstants(ical); m_EBResponse->setIntercal(ical); if (nullptr != m_APDResponse) m_APDResponse->setIntercal(ical); + if (nullptr != m_ComponentResponse) + m_ComponentResponse->setIntercal(ical); // Ecal LaserCorrection Constants auto laser = &eventSetup.getData(laserToken_); @@ -291,6 +365,8 @@ void EcalDigiProducer_Ph2::checkCalibrations(const edm::Event& event, const edm: m_Coder->setGainRatios(ecalPh2::gains[0] / ecalPh2::gains[1]); if (nullptr != m_APDCoder) m_APDCoder->setGainRatios(ecalPh2::gains[0] / ecalPh2::gains[1]); + if (nullptr != m_ComponentCoder) + m_ComponentCoder->setGainRatios(ecalPh2::gains[0] / ecalPh2::gains[1]); const double EBscale((agc->getEBValue()) * ecalPh2::gains[1] * (ecalPh2::MAXADC)*m_EBs25notCont); @@ -301,6 +377,8 @@ void EcalDigiProducer_Ph2::checkCalibrations(const edm::Event& event, const edm: m_Coder->setFullScaleEnergy(EBscale); if (nullptr != m_APDCoder) m_APDCoder->setFullScaleEnergy(EBscale); + if (nullptr != m_ComponentCoder) + m_ComponentCoder->setFullScaleEnergy(EBscale); } void EcalDigiProducer_Ph2::checkGeometry(const edm::EventSetup& eventSetup) { @@ -317,6 +395,8 @@ void EcalDigiProducer_Ph2::checkGeometry(const edm::EventSetup& eventSetup) { void EcalDigiProducer_Ph2::updateGeometry() { if (nullptr != m_APDResponse) m_APDResponse->setGeometry(m_Geometry->getSubdetectorGeometry(DetId::Ecal, EcalBarrel)); + if (nullptr != m_ComponentResponse) + m_ComponentResponse->setGeometry(m_Geometry->getSubdetectorGeometry(DetId::Ecal, EcalBarrel)); m_EBResponse->setGeometry(m_Geometry->getSubdetectorGeometry(DetId::Ecal, EcalBarrel)); } diff --git a/SimCalorimetry/EcalSimProducers/src/EcalTimeDigiProducer.cc b/SimCalorimetry/EcalSimProducers/src/EcalTimeDigiProducer.cc index dcc10bcef7e9a..e5d833233d138 100644 --- a/SimCalorimetry/EcalSimProducers/src/EcalTimeDigiProducer.cc +++ b/SimCalorimetry/EcalSimProducers/src/EcalTimeDigiProducer.cc @@ -22,10 +22,13 @@ EcalTimeDigiProducer::EcalTimeDigiProducer(const edm::ParameterSet ¶ms, m_hitsProducerTokenEB(sumes.consumes>(m_hitsProducerTagEB)), m_geometryToken(sumes.esConsumes()), m_timeLayerEB(params.getParameter("timeLayerBarrel")), - m_Geometry(nullptr) { + m_Geometry(nullptr), + m_componentWaveform(params.getParameter("componentWaveform")) { producesCollector.produces(m_EBdigiCollection); - m_BarrelDigitizer = new EcalTimeMapDigitizer(EcalBarrel); + if (m_componentWaveform) + m_ComponentShapes = new ComponentShapeCollection(sumes); + m_BarrelDigitizer = new EcalTimeMapDigitizer(EcalBarrel, m_ComponentShapes); #ifdef EDM_ML_DEBUG edm::LogVerbatim("TimeDigiInfo") << "[EcalTimeDigiProducer]::Create EB " << m_EBdigiCollection @@ -42,6 +45,14 @@ void EcalTimeDigiProducer::initializeEvent(edm::Event const &event, edm::EventSe // checkCalibrations( event, eventSetup ); // here the methods to clean the maps m_BarrelDigitizer->initializeMap(); + if (m_componentWaveform) { + m_ComponentShapes->setEventSetup(eventSetup); + m_BarrelDigitizer->setEventSetup(eventSetup); + } +#ifdef EDM_ML_DEBUG + if (m_componentWaveform) + m_ComponentShapes->test(); +#endif } void EcalTimeDigiProducer::accumulateCaloHits(HitsHandle const &ebHandle, int bunchCrossing) { @@ -60,6 +71,9 @@ void EcalTimeDigiProducer::accumulate(edm::Event const &e, edm::EventSetup const edm::LogVerbatim("TimeDigiInfo") << "[EcalTimeDigiProducer]::Accumulate Hits HS event"; #endif + if (m_componentWaveform) { + m_BarrelDigitizer->setEventSetup(eventSetup); + } accumulateCaloHits(ebHandle, 0); } @@ -72,6 +86,9 @@ void EcalTimeDigiProducer::accumulate(PileUpEventPrincipal const &e, #ifdef EDM_ML_DEBUG edm::LogVerbatim("TimeDigiInfo") << "[EcalTimeDigiProducer]::Accumulate Hits for BC " << e.bunchCrossing(); #endif + if (m_componentWaveform) { + m_BarrelDigitizer->setEventSetup(eventSetup); + } accumulateCaloHits(ebHandle, e.bunchCrossing()); } diff --git a/SimGeneral/MixingModule/python/digitizers_cfi.py b/SimGeneral/MixingModule/python/digitizers_cfi.py index 3a7bb207f0239..64b221c900909 100644 --- a/SimGeneral/MixingModule/python/digitizers_cfi.py +++ b/SimGeneral/MixingModule/python/digitizers_cfi.py @@ -76,6 +76,11 @@ phase2_timing.toModify( theDigitizers, ecalTime = ecalTimeDigitizer.clone() ) +from SimGeneral.MixingModule.ecalTimeDigitizer_cfi import ecalTimeDigitizer +from Configuration.Eras.Modifier_run3_ecal_devel_cff import run3_ecal_devel +run3_ecal_devel.toModify( theDigitizers, + ecalTime = ecalTimeDigitizer.clone() ) + from SimFastTiming.Configuration.SimFastTiming_cff import mtdDigitizer from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer phase2_timing_layer.toModify( theDigitizers, diff --git a/SimGeneral/MixingModule/python/ecalDigitizer_Ph2_cfi.py b/SimGeneral/MixingModule/python/ecalDigitizer_Ph2_cfi.py index 27cd2c54e1567..ec465ac5cdec8 100644 --- a/SimGeneral/MixingModule/python/ecalDigitizer_Ph2_cfi.py +++ b/SimGeneral/MixingModule/python/ecalDigitizer_Ph2_cfi.py @@ -2,6 +2,7 @@ from SimCalorimetry.EcalSimProducers.ecalDigiParameters_Ph2_cff import * from SimCalorimetry.EcalSimProducers.apdSimParameters_cff import * +from SimCalorimetry.EcalSimProducers.componentDigiParameters_cff import * from SimCalorimetry.EcalSimProducers.ecalSimParameterMap_cff import * from SimCalorimetry.EcalSimProducers.ecalElectronicsSim_Ph2_cff import * from SimCalorimetry.EcalSimProducers.ecalNotContainmentSim_cff import * @@ -11,6 +12,7 @@ ecalDigitizer_Ph2 = cms.PSet( ecal_digi_parameters, apd_sim_parameters, + component_digi_parameters, ecal_electronics_sim, ecal_cosmics_sim, ecal_sim_parameter_map_ph2, diff --git a/SimGeneral/MixingModule/python/ecalDigitizer_cfi.py b/SimGeneral/MixingModule/python/ecalDigitizer_cfi.py index bc87cb6cf33c8..a23451af1df6c 100644 --- a/SimGeneral/MixingModule/python/ecalDigitizer_cfi.py +++ b/SimGeneral/MixingModule/python/ecalDigitizer_cfi.py @@ -2,6 +2,7 @@ from SimCalorimetry.EcalSimProducers.ecalDigiParameters_cff import * from SimCalorimetry.EcalSimProducers.apdSimParameters_cff import * +from SimCalorimetry.EcalSimProducers.componentDigiParameters_cff import * from SimCalorimetry.EcalSimProducers.ecalSimParameterMap_cff import * from SimCalorimetry.EcalSimProducers.ecalElectronicsSim_cff import * from SimCalorimetry.EcalSimProducers.esElectronicsSim_cff import * @@ -12,6 +13,7 @@ ecalDigitizer = cms.PSet( ecal_digi_parameters, apd_sim_parameters, + component_digi_parameters, ecal_electronics_sim, ecal_cosmics_sim, ecal_sim_parameter_map, From 4bbb8184499919aee31abd2d05da16a9afa1c806 Mon Sep 17 00:00:00 2001 From: Sunil Date: Fri, 17 Mar 2023 04:51:47 +0100 Subject: [PATCH 060/233] reverting back to run3_data_relval for making rereco GT default in relvals --- Configuration/PyReleaseValidation/python/relval_steps.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 8fade2509f051..617b95a27f705 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -2502,7 +2502,7 @@ def lhegensim2018ml(fragment,howMuch): '--era':'Run3', '--customise':'Configuration/DataProcessing/RecoTLR.customisePostEra_Run3'},dataReco]) -steps['RECODR3_reHLT']=merge([{'--conditions':'auto:run3_data_prompt_relval', '--hltProcess':'reHLT'},steps['RECODR3']]) +steps['RECODR3_reHLT']=merge([{'--conditions':'auto:run3_data_relval', '--hltProcess':'reHLT'},steps['RECODR3']]) steps['RECODR3Splash']=merge([{'-n': 2, '-s': 'RAW2DIGI,L1Reco,RECO,PAT,ALCA:SiStripCalZeroBias+SiStripCalMinBias+TkAlMinBias+EcalESAlign,DQM:@standardDQMFakeHLT+@miniAODDQM' @@ -2535,7 +2535,7 @@ def lhegensim2018ml(fragment,howMuch): '--data':'', '--era':'Run3', '--scenario':'pp', - '--conditions':'auto:run3_data_prompt_relval', + '--conditions':'auto:run3_data_relval', '--hltProcess':'reHLT'} if 'Cosmics' in s: steps['SKIM'+s.upper()+'RUN3_reHLT']['--scenario'] = 'cosmics' @@ -3336,7 +3336,7 @@ def gen2021HiMix(fragment,howMuch): steps['HARVESTDCRUN2']=merge([{'--conditions':'auto:run2_data','--era':'Run2_2016'},steps['HARVESTDC']]) steps['HARVESTDR3'] = merge([{'--conditions':'auto:run3_data','--era':'Run3'}, steps['HARVESTD']]) -steps['HARVESTDR3_reHLT'] = merge([{'--conditions':'auto:run3_data_prompt_relval','--hltProcess':'reHLT','-s':'HARVESTING:@standardDQM+@miniAODDQM'}, steps['HARVESTDR3']]) +steps['HARVESTDR3_reHLT'] = merge([{'--conditions':'auto:run3_data_relval','--hltProcess':'reHLT','-s':'HARVESTING:@standardDQM+@miniAODDQM'}, steps['HARVESTDR3']]) steps['HARVESTD2021MB_reHLT'] = merge([{'-s':'HARVESTING:@commonSiStripZeroBias+@ExtraHLT+@miniAODDQM'}, steps['HARVESTDR3_reHLT'] ]) steps['HARVESTD2021ZB_reHLT'] = merge([{'-s':'HARVESTING:@rerecoZeroBias+@ExtraHLT+@miniAODDQM'}, steps['HARVESTDR3_reHLT'] ]) steps['HARVESTD2021HLTPhy_reHLT'] = merge([{'-s':'HARVESTING:@commonReduced+@miniAODDQM'}, steps['HARVESTDR3_reHLT'] ]) From 525aadc59fcf231ea004c75a2b2569fe0b343438 Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Fri, 17 Mar 2023 11:13:33 +0100 Subject: [PATCH 061/233] update DQM plots --- .../NanoAOD/python/jetsAK4_CHS_cff.py | 9 ++++- .../NanoAOD/python/jetsAK4_Puppi_cff.py | 11 ++++-- PhysicsTools/NanoAOD/python/jetsAK8_cff.py | 15 +++++++- PhysicsTools/NanoAOD/python/nanoDQM_cff.py | 34 +++++++++++++++++++ PhysicsTools/NanoAOD/python/nano_cff.py | 12 +------ 5 files changed, 66 insertions(+), 15 deletions(-) diff --git a/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py b/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py index 9acfe2b28254c..2d4113339fa7a 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py @@ -374,7 +374,14 @@ def nanoAOD_addDeepInfoAK4CHS(process,addDeepBTag,addDeepFlavour,addParticleNet) nanoAOD_addDeepInfoAK4CHS_switch = cms.PSet( nanoAOD_addDeepBTag_switch = cms.untracked.bool(False), nanoAOD_addDeepFlavourTag_switch = cms.untracked.bool(False), - nanoAOD_addParticleNet_switch = cms.untracked.bool(False), + nanoAOD_addParticleNet_switch = cms.untracked.bool(False) +) + +# Add new ParticleNet nodes to 106Xv2 MINIAOD +# (b/c tagging, q vs. g, flavor-aware jet pT regression, tau ID + reco.) +run2_nanoAOD_106Xv2.toModify( + nanoAOD_addDeepInfoAK4CHS_switch, + nanoAOD_addParticleNet_switch = True ) ################################################ diff --git a/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py b/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py index c4834f088113b..fc1f244e407a0 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py @@ -1,6 +1,7 @@ import FWCore.ParameterSet.Config as cms from PhysicsTools.NanoAOD.common_cff import * +from PhysicsTools.NanoAOD.nano_eras_cff import * from PhysicsTools.NanoAOD.simpleCandidateFlatTableProducer_cfi import simpleCandidateFlatTableProducer ##################### User floats producers, selectors ########################## @@ -110,7 +111,6 @@ ) ) -from PhysicsTools.NanoAOD.nano_eras_cff import run2_nanoAOD_ANY,run3_nanoAOD_122,run3_nanoAOD_124 run2_nanoAOD_ANY.toModify( jetPuppiTable.variables, btagCSVV2 = Var("bDiscriminator('pfCombinedInclusiveSecondaryVertexV2BJetTags')",float,doc=" pfCombinedInclusiveSecondaryVertexV2 b-tag discriminator (aka CSVV2)",precision=10) @@ -160,7 +160,14 @@ def nanoAOD_addDeepInfoAK4(process,addParticleNet): return process nanoAOD_addDeepInfoAK4_switch = cms.PSet( - nanoAOD_addParticleNet_switch = cms.untracked.bool(False), + nanoAOD_addParticleNet_switch = cms.untracked.bool(False) +) + +# Add new ParticleNet nodes to 106Xv2 MINIAOD +# (b/c tagging, q vs. g, flavor-aware jet pT regression, tau ID + reco.) +run2_nanoAOD_106Xv2.toModify( + nanoAOD_addDeepInfoAK4_switch, + nanoAOD_addParticleNet_switch = True ) ################################################ diff --git a/PhysicsTools/NanoAOD/python/jetsAK8_cff.py b/PhysicsTools/NanoAOD/python/jetsAK8_cff.py index 0c9b8e4e91e04..1853578af98f3 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK8_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK8_cff.py @@ -185,7 +185,7 @@ ## - To be used in nanoAOD_customizeCommon() in nano_cff.py ############################################################### from PhysicsTools.PatAlgos.tools.jetTools import updateJetCollection -def nanoAOD_addDeepInfoAK8(process, addDeepBTag, addDeepBoostedJet, addDeepDoubleX, addDeepDoubleXV2, addParticleNet, jecPayload): +def nanoAOD_addDeepInfoAK8(process, addDeepBTag, addDeepBoostedJet, addDeepDoubleX, addDeepDoubleXV2, addParticleNetMassLegacy, addParticleNet, jecPayload): _btagDiscriminators=[] if addDeepBTag: print("Updating process to run DeepCSV btag to AK8 jets") @@ -198,6 +198,9 @@ def nanoAOD_addDeepInfoAK8(process, addDeepBTag, addDeepBoostedJet, addDeepDoubl print("Updating process to run ParticleNet joint classification and mass regression") from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK8_cff import _pfParticleNetFromMiniAODAK8JetTagsAll as pfParticleNetFromMiniAODAK8JetTagsAll _btagDiscriminators += pfParticleNetFromMiniAODAK8JetTagsAll + if addParticleNetMassLegacy: + from RecoBTag.ONNXRuntime.pfParticleNet_cff import _pfParticleNetMassRegressionOutputs + _btagDiscriminators += _pfParticleNetMassRegressionOutputs if addDeepDoubleX: print("Updating process to run DeepDoubleX on datasets before 104X") _btagDiscriminators += ['pfDeepDoubleBvLJetTags:probHbb', \ @@ -234,9 +237,19 @@ def nanoAOD_addDeepInfoAK8(process, addDeepBTag, addDeepBoostedJet, addDeepDoubl nanoAOD_addDeepDoubleX_switch = cms.untracked.bool(False), nanoAOD_addDeepDoubleXV2_switch = cms.untracked.bool(False), nanoAOD_addParticleNet_switch = cms.untracked.bool(False), + nanoAOD_addParticleNetMassLegacy_switch = cms.untracked.bool(False), jecPayload = cms.untracked.string('AK8PFPuppi') ) + +# ParticleNet legacy jet tagger is already in 106Xv2 MINIAOD, +# add PartlceNet legacy mass regression and new combined tagger + mass regression +run2_nanoAOD_106Xv2.toModify( + nanoAOD_addDeepInfoAK8_switch, + nanoAOD_addParticleNet_switch = True, + nanoAOD_addParticleNetMassLegacy_switch = True +) + ################################################ ## DeepInfoAK8:End ################################################# diff --git a/PhysicsTools/NanoAOD/python/nanoDQM_cff.py b/PhysicsTools/NanoAOD/python/nanoDQM_cff.py index 64bb86ad31a22..fe67de257cc02 100644 --- a/PhysicsTools/NanoAOD/python/nanoDQM_cff.py +++ b/PhysicsTools/NanoAOD/python/nanoDQM_cff.py @@ -62,8 +62,29 @@ def _match(name): _FatJet_Run2_plots.append(plot) _FatJet_Run2_plots.extend([ Plot1D('btagCSVV2', 'btagCSVV2', 20, -1, 1, ' pfCombinedInclusiveSecondaryVertexV2 b-tag discriminator (aka CSVV2)'), + Plot1D('deepTagMD_H4qvsQCD', 'deepTagMD_H4qvsQCD', 20, 0, 1, 'Mass-decorrelated DeepBoostedJet tagger H->4q vs QCD discriminator'), + Plot1D('deepTagMD_HbbvsQCD', 'deepTagMD_HbbvsQCD', 20, 0, 1, 'Mass-decorrelated DeepBoostedJet tagger H->bb vs QCD discriminator'), + Plot1D('deepTagMD_TvsQCD', 'deepTagMD_TvsQCD', 20, 0, 1, 'Mass-decorrelated DeepBoostedJet tagger top vs QCD discriminator'), + Plot1D('deepTagMD_WvsQCD', 'deepTagMD_WvsQCD', 20, 0, 1, 'Mass-decorrelated DeepBoostedJet tagger W vs QCD discriminator'), + Plot1D('deepTagMD_ZHbbvsQCD', 'deepTagMD_ZHbbvsQCD', 20, 0, 1, 'Mass-decorrelated DeepBoostedJet tagger Z/H->bb vs QCD discriminator'), + Plot1D('deepTagMD_ZHccvsQCD', 'deepTagMD_ZHccvsQCD', 20, 0, 1, 'Mass-decorrelated DeepBoostedJet tagger Z/H->cc vs QCD discriminator'), + Plot1D('deepTagMD_ZbbvsQCD', 'deepTagMD_ZbbvsQCD', 20, 0, 1, 'Mass-decorrelated DeepBoostedJet tagger Z->bb vs QCD discriminator'), + Plot1D('deepTagMD_ZvsQCD', 'deepTagMD_ZvsQCD', 20, 0, 1, 'Mass-decorrelated DeepBoostedJet tagger Z vs QCD discriminator'), + Plot1D('deepTagMD_bbvsLight', 'deepTagMD_bbvsLight', 20, 0, 1, 'Mass-decorrelated DeepBoostedJet tagger Z/H/gluon->bb vs light flavour discriminator'), + Plot1D('deepTagMD_ccvsLight', 'deepTagMD_ccvsLight', 20, 0, 1, 'Mass-decorrelated DeepBoostedJet tagger Z/H/gluon->cc vs light flavour discriminator'), + Plot1D('deepTag_H', 'deepTag_H', 20, 0, 1, 'DeepBoostedJet tagger H(bb,cc,4q) sum'), + Plot1D('deepTag_QCD', 'deepTag_QCD', 20, 0, 1, 'DeepBoostedJet tagger QCD(bb,cc,b,c,others) sum'), + Plot1D('deepTag_QCDothers', 'deepTag_QCDothers', 20, 0, 1, 'DeepBoostedJet tagger QCDothers value'), + Plot1D('deepTag_TvsQCD', 'deepTag_TvsQCD', 20, 0, 1, 'DeepBoostedJet tagger top vs QCD discriminator'), + Plot1D('deepTag_WvsQCD', 'deepTag_WvsQCD', 20, 0, 1, 'DeepBoostedJet tagger W vs QCD discriminator'), + Plot1D('deepTag_ZvsQCD', 'deepTag_ZvsQCD', 20, 0, 1, 'DeepBoostedJet tagger Z vs QCD discriminator'), ]) +_FatJet_EarlyRun3_plots = cms.VPSet() +for plot in _FatJet_Run2_plots: + if 'particleNet_' not in plot.name.value() and 'btagCSVV2' not in plot.name.value(): + _FatJet_EarlyRun3_plots.append(plot) + _Jet_Run2_plots = cms.VPSet() for plot in nanoDQM.vplots.Jet.plots: _Jet_Run2_plots.append(plot) @@ -71,6 +92,11 @@ def _match(name): Plot1D('btagCSVV2', 'btagCSVV2', 20, -1, 1, ' pfCombinedInclusiveSecondaryVertexV2 b-tag discriminator (aka CSVV2)'), ]) +_Jet_EarlyRun3_plots = cms.VPSet() +for plot in nanoDQM.vplots.Jet.plots: + if 'PNet' not in plot.name.value(): + _Jet_EarlyRun3_plots.append(plot) + _SubJet_Run2_plots = cms.VPSet() for plot in nanoDQM.vplots.SubJet.plots: _SubJet_Run2_plots.append(plot) @@ -89,6 +115,14 @@ def _match(name): plots = _SubJet_Run2_plots ) +(run3_nanoAOD_122 | run3_nanoAOD_124).toModify( + nanoDQM.vplots.FatJet, + plots = _FatJet_EarlyRun3_plots +).toModify( + nanoDQM.vplots.Jet, + plots = _Jet_EarlyRun3_plots +) + ## MC nanoDQMMC = nanoDQM.clone() nanoDQMMC.vplots.Electron.sels.Prompt = cms.string("genPartFlav == 1") diff --git a/PhysicsTools/NanoAOD/python/nano_cff.py b/PhysicsTools/NanoAOD/python/nano_cff.py index 328ec10831de7..3d17aba920cc4 100644 --- a/PhysicsTools/NanoAOD/python/nano_cff.py +++ b/PhysicsTools/NanoAOD/python/nano_cff.py @@ -154,17 +154,6 @@ def nanoAOD_activateVID(process): def nanoAOD_customizeCommon(process): process = nanoAOD_activateVID(process) - - # Include new ParticleNet trainings for Run-2 UL - run2_nanoAOD_106Xv2.toModify( - nanoAOD_addDeepInfoAK4CHS_switch, nanoAOD_addParticleNet_switch=True, - ) - run2_nanoAOD_106Xv2.toModify( - nanoAOD_addDeepInfoAK4_switch, nanoAOD_addParticleNet_switch=True, - ) - run2_nanoAOD_106Xv2.toModify( - nanoAOD_addDeepInfoAK8_switch, nanoAOD_addParticleNet_switch=True - ) # This function is defined in jetsAK4_Puppi_cff.py process = nanoAOD_addDeepInfoAK4(process, @@ -184,6 +173,7 @@ def nanoAOD_customizeCommon(process): addDeepBoostedJet=nanoAOD_addDeepInfoAK8_switch.nanoAOD_addDeepBoostedJet_switch, addDeepDoubleX=nanoAOD_addDeepInfoAK8_switch.nanoAOD_addDeepDoubleX_switch, addDeepDoubleXV2=nanoAOD_addDeepInfoAK8_switch.nanoAOD_addDeepDoubleXV2_switch, + addParticleNetMassLegacy=nanoAOD_addDeepInfoAK8_switch.nanoAOD_addParticleNetMassLegacy_switch, addParticleNet=nanoAOD_addDeepInfoAK8_switch.nanoAOD_addParticleNet_switch, jecPayload=nanoAOD_addDeepInfoAK8_switch.jecPayload ) From 61e61f4890315bfac6f28af28a97534282985279 Mon Sep 17 00:00:00 2001 From: Stephane Cooperstein Date: Fri, 17 Mar 2023 11:33:12 +0100 Subject: [PATCH 062/233] don't run PNet AK4 on PUPPI for Run-2 --- PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py | 7 ------- PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py | 7 ------- PhysicsTools/NanoAOD/python/nano_cff.py | 4 ++++ 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py b/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py index 2d4113339fa7a..68b1d3676daff 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py @@ -377,13 +377,6 @@ def nanoAOD_addDeepInfoAK4CHS(process,addDeepBTag,addDeepFlavour,addParticleNet) nanoAOD_addParticleNet_switch = cms.untracked.bool(False) ) -# Add new ParticleNet nodes to 106Xv2 MINIAOD -# (b/c tagging, q vs. g, flavor-aware jet pT regression, tau ID + reco.) -run2_nanoAOD_106Xv2.toModify( - nanoAOD_addDeepInfoAK4CHS_switch, - nanoAOD_addParticleNet_switch = True -) - ################################################ ## DeepInfoAK4CHS:End ################################################# diff --git a/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py b/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py index fc1f244e407a0..807cfa6aacd1f 100644 --- a/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py +++ b/PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py @@ -163,13 +163,6 @@ def nanoAOD_addDeepInfoAK4(process,addParticleNet): nanoAOD_addParticleNet_switch = cms.untracked.bool(False) ) -# Add new ParticleNet nodes to 106Xv2 MINIAOD -# (b/c tagging, q vs. g, flavor-aware jet pT regression, tau ID + reco.) -run2_nanoAOD_106Xv2.toModify( - nanoAOD_addDeepInfoAK4_switch, - nanoAOD_addParticleNet_switch = True -) - ################################################ ## DeepInfoAK4CHS:End ################################################# diff --git a/PhysicsTools/NanoAOD/python/nano_cff.py b/PhysicsTools/NanoAOD/python/nano_cff.py index 3d17aba920cc4..1cdb74086e498 100644 --- a/PhysicsTools/NanoAOD/python/nano_cff.py +++ b/PhysicsTools/NanoAOD/python/nano_cff.py @@ -155,6 +155,10 @@ def nanoAOD_customizeCommon(process): process = nanoAOD_activateVID(process) + run2_nanoAOD_106Xv2.toModify( + nanoAOD_addDeepInfoAK4CHS_switch, nanoAOD_addParticleNet_switch=True, + ) + # This function is defined in jetsAK4_Puppi_cff.py process = nanoAOD_addDeepInfoAK4(process, addParticleNet=nanoAOD_addDeepInfoAK4_switch.nanoAOD_addParticleNet_switch From 07830f09339fb7e306325b77444d1dafddf8322f Mon Sep 17 00:00:00 2001 From: John Hakala Date: Fri, 17 Mar 2023 16:11:46 -0500 Subject: [PATCH 063/233] add fix for D96 relvals --- Configuration/PyReleaseValidation/python/relval_steps.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 8fade2509f051..e00d5ad719458 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -3816,6 +3816,7 @@ def gen2021HiMix(fragment,howMuch): defaultDataSets['2026D76']='CMSSW_12_0_0_pre4-113X_mcRun4_realistic_v7_2026D76noPU-v' defaultDataSets['2026D77']='CMSSW_12_1_0_pre2-113X_mcRun4_realistic_v7_2026D77noPU-v' defaultDataSets['2026D88']='CMSSW_12_3_0_pre5-123X_mcRun4_realistic_v4_2026D88noPU-v' +defaultDataSets['2026D96']='CMSSW_13_1_0_pre1-130X_mcRun4_realistic_v2_2026D96noPU-v' puDataSets = {} for key, value in defaultDataSets.items(): puDataSets[key+'PU'] = value From 73d171a0ee442d4c926217fa7bc47453f8e0bc0c Mon Sep 17 00:00:00 2001 From: Norraphat Date: Thu, 9 Mar 2023 09:17:28 +0100 Subject: [PATCH 064/233] update short matrix to D95 --- .../PyReleaseValidation/python/relval_2026.py | 2 ++ .../PyReleaseValidation/scripts/runTheMatrix.py | 12 +++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_2026.py b/Configuration/PyReleaseValidation/python/relval_2026.py index 254b71a6313ea..f2f8d9a24eda8 100644 --- a/Configuration/PyReleaseValidation/python/relval_2026.py +++ b/Configuration/PyReleaseValidation/python/relval_2026.py @@ -36,6 +36,8 @@ #CloseByPGun for HGCAL numWFIB.extend([20896.0]) #CE_E_Front_120um D88 numWFIB.extend([20900.0]) #CE_H_Coarse_Scint D88 +numWFIB.extend([23696.0]) #CE_E_Front_120um D95 +numWFIB.extend([23700.0]) #CE_H_Coarse_Scint D95 for numWF in numWFIB: workflows[numWF] = _upgrade_workflows[numWF] diff --git a/Configuration/PyReleaseValidation/scripts/runTheMatrix.py b/Configuration/PyReleaseValidation/scripts/runTheMatrix.py index e9ce275bbbbda..f614a31db60d0 100755 --- a/Configuration/PyReleaseValidation/scripts/runTheMatrix.py +++ b/Configuration/PyReleaseValidation/scripts/runTheMatrix.py @@ -97,13 +97,11 @@ def runSelected(opt): 13234.0, #2021 ttbar fastsim 13434.0, #2021 ttbar PU fastsim 12434.0, #2023 ttbar - 20834.0, #2026D88 ttbar (2022 new baseline) - 20834.75, #2026D88 ttbar with HLT75e33 - 20834.76, #2026D88 ttbar with HLT75e33 in the same step as DIGI+L1 - #20834.911, #2026D88 ttbar DD4hep XML - 21034.999, #2026D88 ttbar premixing stage1+stage2, PU50 - 20896.0, #CE_E_Front_120um D88 - 20900.0, #CE_H_Coarse_Scint D88 + 23634.0, #2026D95 ttbar (2023 new baseline) + #23634.911, #2026D95 ttbar DD4hep XML + 23834.999, #2026D88 ttbar premixing stage1+stage2, PU50 + 23696.0, #CE_E_Front_120um D95 + 23700.0, #CE_H_Coarse_Scint D95 23234.0, #2026D94 ttbar (exercise with HFNose) 25202.0, #2016 ttbar UP15 PU 250202.181, #2018 ttbar stage1 + stage2 premix From 9e6e124147b371090985e1a88914c7199fef66e4 Mon Sep 17 00:00:00 2001 From: Norraphat Date: Thu, 9 Mar 2023 09:24:20 +0100 Subject: [PATCH 065/233] fix typo --- Configuration/PyReleaseValidation/scripts/runTheMatrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Configuration/PyReleaseValidation/scripts/runTheMatrix.py b/Configuration/PyReleaseValidation/scripts/runTheMatrix.py index f614a31db60d0..91162e6b70e92 100755 --- a/Configuration/PyReleaseValidation/scripts/runTheMatrix.py +++ b/Configuration/PyReleaseValidation/scripts/runTheMatrix.py @@ -99,7 +99,7 @@ def runSelected(opt): 12434.0, #2023 ttbar 23634.0, #2026D95 ttbar (2023 new baseline) #23634.911, #2026D95 ttbar DD4hep XML - 23834.999, #2026D88 ttbar premixing stage1+stage2, PU50 + 23834.999, #2026D95 ttbar premixing stage1+stage2, PU50 23696.0, #CE_E_Front_120um D95 23700.0, #CE_H_Coarse_Scint D95 23234.0, #2026D94 ttbar (exercise with HFNose) From 9b0c6ef78b4ae54ea235f2f04e3b167e4c277015 Mon Sep 17 00:00:00 2001 From: Norraphat Date: Thu, 9 Mar 2023 11:13:49 +0100 Subject: [PATCH 066/233] update relval 2026 --- Configuration/PyReleaseValidation/python/relval_2026.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Configuration/PyReleaseValidation/python/relval_2026.py b/Configuration/PyReleaseValidation/python/relval_2026.py index f2f8d9a24eda8..7236be16a0a66 100644 --- a/Configuration/PyReleaseValidation/python/relval_2026.py +++ b/Configuration/PyReleaseValidation/python/relval_2026.py @@ -26,7 +26,9 @@ numWFIB.extend([22434.0]) #2026D92 numWFIB.extend([22834.0]) #2026D93 numWFIB.extend([23234.0]) #2026D94 -numWFIB.extend([23634.0]) #2026D95 +numWFIB.extend([23634.0,23634.103]) #2026D95 (NoPU, with aging) +numWFIB.extend([23634.5,23634.9,23634.501,23634.502]) #2026D95 pixelTrackingOnly, vector hits, Patatrack local reconstruction on CPU, Patatrack local reconstruction on GPU +numWFIB.extend([23834.99,23834.999]) #2026D95 premixing combined stage1+stage2 (ttbar+PU200, ttbar+PU50 for PR test) numWFIB.extend([24034.0]) #2026D96 numWFIB.extend([24434.0]) #2026D97 numWFIB.extend([24834.0]) #2026D98 From 9fc7f833cc8f1cb595c4cccd567e6511fb44ff36 Mon Sep 17 00:00:00 2001 From: Norraphat Date: Sat, 11 Mar 2023 21:26:57 +0100 Subject: [PATCH 067/233] fix --- Configuration/PyReleaseValidation/python/relval_2026.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Configuration/PyReleaseValidation/python/relval_2026.py b/Configuration/PyReleaseValidation/python/relval_2026.py index 7236be16a0a66..470b52d5c7cb8 100644 --- a/Configuration/PyReleaseValidation/python/relval_2026.py +++ b/Configuration/PyReleaseValidation/python/relval_2026.py @@ -27,7 +27,7 @@ numWFIB.extend([22834.0]) #2026D93 numWFIB.extend([23234.0]) #2026D94 numWFIB.extend([23634.0,23634.103]) #2026D95 (NoPU, with aging) -numWFIB.extend([23634.5,23634.9,23634.501,23634.502]) #2026D95 pixelTrackingOnly, vector hits, Patatrack local reconstruction on CPU, Patatrack local reconstruction on GPU +numWFIB.extend([23634.5,23634.9]) #2026D95 pixelTrackingOnly, vector hits numWFIB.extend([23834.99,23834.999]) #2026D95 premixing combined stage1+stage2 (ttbar+PU200, ttbar+PU50 for PR test) numWFIB.extend([24034.0]) #2026D96 numWFIB.extend([24434.0]) #2026D97 From 99f7acb1e348118be9ef0b43e13470c1ff6da3ac Mon Sep 17 00:00:00 2001 From: Norraphat Date: Sat, 18 Mar 2023 16:01:19 +0100 Subject: [PATCH 068/233] rebase+update pu D95 --- Configuration/PyReleaseValidation/python/relval_2026.py | 5 +++-- Configuration/PyReleaseValidation/python/relval_steps.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_2026.py b/Configuration/PyReleaseValidation/python/relval_2026.py index 470b52d5c7cb8..726eb236ac0bc 100644 --- a/Configuration/PyReleaseValidation/python/relval_2026.py +++ b/Configuration/PyReleaseValidation/python/relval_2026.py @@ -16,7 +16,6 @@ numWFIB = [] numWFIB.extend([20034.0]) #2026D86 numWFIB.extend([20834.0,20834.911,20834.103]) #2026D88 DDD XML, DD4hep XML, aging -numWFIB.extend([20834.75,20834.76]) #2026D88 with HLT75e33 after RECO, HLTe33 with the same step with Digi+L1 numWFIB.extend([21061.97]) #2026D88 premixing stage1 (NuGun+PU) numWFIB.extend([20834.5,20834.9,20834.501,20834.502]) #2026D88 pixelTrackingOnly, vector hits, Patatrack local reconstruction on CPU, Patatrack local reconstruction on GPU numWFIB.extend([21034.99,21034.999]) #2026D88 premixing combined stage1+stage2 (ttbar+PU200, ttbar+PU50 for PR test) @@ -26,9 +25,11 @@ numWFIB.extend([22434.0]) #2026D92 numWFIB.extend([22834.0]) #2026D93 numWFIB.extend([23234.0]) #2026D94 -numWFIB.extend([23634.0,23634.103]) #2026D95 (NoPU, with aging) +numWFIB.extend([23634.0,23634.911,23634.103]) #2026D95 DDD XML, DD4hep XML, aging +numWFIB.extend([23861.97]) #2026D95 premixing stage1 (NuGun+PU) numWFIB.extend([23634.5,23634.9]) #2026D95 pixelTrackingOnly, vector hits numWFIB.extend([23834.99,23834.999]) #2026D95 premixing combined stage1+stage2 (ttbar+PU200, ttbar+PU50 for PR test) +numWFIB.extend([23634.21,23834.21,23834.9921]) #2026D95 prodlike, prodlike PU, prodlike premix stage1+stage2 numWFIB.extend([24034.0]) #2026D96 numWFIB.extend([24434.0]) #2026D97 numWFIB.extend([24834.0]) #2026D98 diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 0c94d2faa4b42..c01046c2c5070 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -3816,6 +3816,7 @@ def gen2021HiMix(fragment,howMuch): defaultDataSets['2026D76']='CMSSW_12_0_0_pre4-113X_mcRun4_realistic_v7_2026D76noPU-v' defaultDataSets['2026D77']='CMSSW_12_1_0_pre2-113X_mcRun4_realistic_v7_2026D77noPU-v' defaultDataSets['2026D88']='CMSSW_12_3_0_pre5-123X_mcRun4_realistic_v4_2026D88noPU-v' +defaultDataSets['2026D95']='CMSSW_13_1_0_pre1-130X_mcRun4_realistic_v2_2026D95noPU-v' puDataSets = {} for key, value in defaultDataSets.items(): puDataSets[key+'PU'] = value From f8529507fddd952df2d070cc7a811ef2b13286d0 Mon Sep 17 00:00:00 2001 From: ChuyuanLiu Date: Sun, 19 Mar 2023 21:39:58 -0400 Subject: [PATCH 069/233] fix axis title offset in tracking validation plots --- .../RecoTrack/python/plotting/plotting.py | 26 ++----------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/Validation/RecoTrack/python/plotting/plotting.py b/Validation/RecoTrack/python/plotting/plotting.py index ad98e23ee62ba..c1c74c39ae021 100644 --- a/Validation/RecoTrack/python/plotting/plotting.py +++ b/Validation/RecoTrack/python/plotting/plotting.py @@ -1243,16 +1243,7 @@ def __init__(self, pad, bounds, zmax, nrows, xbinlabels=None, xbinlabelsize=None self._frame = _drawFrame(pad, bounds, zmax, xbinlabels, xbinlabelsize, xbinlabeloption, ybinlabels) yoffsetFactor = 1 - xoffsetFactor = 1 - if nrows == 2: - yoffsetFactor *= 2 - xoffsetFactor *= 2 - elif nrows >= 5: - yoffsetFactor *= 1.5 - xoffsetFactor *= 1.5 - elif nrows >= 3: - yoffsetFactor *= 4 - xoffsetFactor *= 3 + xoffsetFactor = 0 self._frame.GetYaxis().SetTitleOffset(self._frame.GetYaxis().GetTitleOffset()*yoffsetFactor) self._frame.GetXaxis().SetTitleOffset(self._frame.GetXaxis().GetTitleOffset()*xoffsetFactor) @@ -1325,20 +1316,7 @@ def __init__(self, pad, bounds, zmax, ratioBounds, ratioFactor, nrows, xbinlabel self._frame.GetXaxis().SetTitleSize(0) yoffsetFactor = ratioFactor - divisionPoint = 1-1/ratioFactor - xoffsetFactor = 1/divisionPoint #* 0.6 - - if nrows == 1: - xoffsetFactor *= 0.6 - elif nrows == 2: - yoffsetFactor *= 2 - xoffsetFactor *= 1.5 - elif nrows == 3: - yoffsetFactor *= 4 - xoffsetFactor *= 2.3 - elif nrows >= 4: - yoffsetFactor *= 5 - xoffsetFactor *= 3 + xoffsetFactor = 0 self._frame.GetYaxis().SetTitleOffset(self._frameRatio.GetYaxis().GetTitleOffset()*yoffsetFactor) self._frameRatio.GetYaxis().SetLabelSize(int(self._frameRatio.GetYaxis().GetLabelSize()*0.8)) From 4c8c60a1d8a8880cff2f741ab632e788d168a652 Mon Sep 17 00:00:00 2001 From: qianying guo Date: Mon, 20 Mar 2023 11:47:42 +0100 Subject: [PATCH 070/233] issue fixed by comments and suggestions --- .../MuonDPG/plugins/GEMTnPEfficiencyTask.cc | 47 +++++++++---------- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc b/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc index d4a6cb4aa4a48..f69a9a0054dc7 100644 --- a/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc +++ b/DQMOffline/MuonDPG/plugins/GEMTnPEfficiencyTask.cc @@ -11,7 +11,6 @@ #include "DataFormats/MuonReco/interface/MuonSegmentMatch.h" #include "DataFormats/MuonReco/interface/MuonGEMHitMatch.h" -#include "DataFormats/Math/interface/deltaPhi.h" #include "DQMOffline/MuonDPG/interface/BaseTnPEfficiencyTask.h" @@ -525,7 +524,7 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu std::vector probe_ME0_dx; uint8_t ME0_stationMatching = 0; - float gem_matched = false; // fill detailed plots only for probes matching GEM + bool gem_matched = false; // fill detailed plots only for probes matching GEM for (const auto& chambMatch : (*muons).at(i).matches()) { // look in GEMs @@ -535,21 +534,19 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu GEMDetId chId(chambMatch.id.rawId()); - int roll = chId.roll(); - int region = chId.region(); - int station = chId.station(); - int layer = chId.layer(); - int chamber = chId.chamber(); - float pt = (*muons).at(i).pt(); - float eta = (*muons).at(i).eta(); - float phi = (*muons).at(i).phi(); + const int roll = chId.roll(); + const int region = chId.region(); + const int station = chId.station(); + const int layer = chId.layer(); + const int chamber = chId.chamber(); + const float pt = (*muons).at(i).pt(); + const float eta = (*muons).at(i).eta(); + const float phi = (*muons).at(i).phi(); - //reco::MuonSegmentMatch closest_matchedSegment; reco::MuonGEMHitMatch closest_matchedHit; double smallestDx = 99999.; double matched_GEMHit_x = 99999.; - //for (auto& seg : chambMatch.gemMatches) { for (auto& gemHit : chambMatch.gemHitMatches) { float dx = std::abs(chambMatch.x - gemHit.x); if (dx < smallestDx) { @@ -559,8 +556,6 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu } } - ////////// - reco::MuonSegmentMatch closest_matchedSegment; double smallestDx_seg = 99999.; @@ -724,21 +719,21 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu if (GEM_region < 0) { if (GEM_sta == 2 and GEM_lay == 2) m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(0, GEM_chamber); - if (GEM_sta == 2 and GEM_lay == 1) + else if (GEM_sta == 2 and GEM_lay == 1) m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(1, GEM_chamber); - if (GEM_sta == 1 and GEM_lay == 2) + else if (GEM_sta == 1 and GEM_lay == 2) m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(2, GEM_chamber); - if (GEM_sta == 1 and GEM_lay == 1) + else if (GEM_sta == 1 and GEM_lay == 1) m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(3, GEM_chamber); } if (GEM_region > 0) { if (GEM_sta == 1 and GEM_lay == 1) m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(6, GEM_chamber); - if (GEM_sta == 1 and GEM_lay == 2) + else if (GEM_sta == 1 and GEM_lay == 2) m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(7, GEM_chamber); - if (GEM_sta == 2 and GEM_lay == 1) + else if (GEM_sta == 2 and GEM_lay == 1) m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(8, GEM_chamber); - if (GEM_sta == 2 and GEM_lay == 2) + else if (GEM_sta == 2 and GEM_lay == 2) m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(9, GEM_chamber); } if (GEM_region == -1 && GEM_sta == 1) { @@ -786,21 +781,21 @@ void GEMTnPEfficiencyTask::analyze(const edm::Event& event, const edm::EventSetu if (GEM_region < 0) { if (GEM_sta == 2 and GEM_lay == 2) m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(0, GEM_chamber); - if (GEM_sta == 2 and GEM_lay == 1) + else if (GEM_sta == 2 and GEM_lay == 1) m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(1, GEM_chamber); - if (GEM_sta == 1 and GEM_lay == 2) + else if (GEM_sta == 1 and GEM_lay == 2) m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(2, GEM_chamber); - if (GEM_sta == 1 and GEM_lay == 1) + else if (GEM_sta == 1 and GEM_lay == 1) m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(3, GEM_chamber); } if (GEM_region > 0) { if (GEM_sta == 1 and GEM_lay == 1) m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(6, GEM_chamber); - if (GEM_sta == 1 and GEM_lay == 2) + else if (GEM_sta == 1 and GEM_lay == 2) m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(7, GEM_chamber); - if (GEM_sta == 2 and GEM_lay == 1) + else if (GEM_sta == 2 and GEM_lay == 1) m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(8, GEM_chamber); - if (GEM_sta == 2 and GEM_lay == 2) + else if (GEM_sta == 2 and GEM_lay == 2) m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(9, GEM_chamber); } if (GEM_region == -1 && GEM_sta == 1) { From 6800714a20a98fabd1ce8d695406bc4c4ed0733e Mon Sep 17 00:00:00 2001 From: vmilosev Date: Mon, 20 Mar 2023 13:22:14 +0100 Subject: [PATCH 071/233] Fixing the usage of the anti-ele discr if they do not exist. --- .../L1Trigger/interface/L1TTauOffline.h | 3 + .../L1Trigger/python/L1TTauOffline_cfi.py | 2 +- DQMOffline/L1Trigger/src/L1TTauOffline.cc | 69 +++++++++++++------ 3 files changed, 53 insertions(+), 21 deletions(-) diff --git a/DQMOffline/L1Trigger/interface/L1TTauOffline.h b/DQMOffline/L1Trigger/interface/L1TTauOffline.h index 4ec3b54f5d51e..4465cfb31f04b 100644 --- a/DQMOffline/L1Trigger/interface/L1TTauOffline.h +++ b/DQMOffline/L1Trigger/interface/L1TTauOffline.h @@ -172,6 +172,9 @@ class L1TTauOffline : public DQMEDAnalyzer { std::vector m_trigIndices; + //V.M. 16.3.2023. Temporary variable for checking the anti-ele discriminator + bool m_AntiEleExists; + // Histograms MonitorElement* h_nVertex_; MonitorElement* h_tagAndProbeMass_; diff --git a/DQMOffline/L1Trigger/python/L1TTauOffline_cfi.py b/DQMOffline/L1Trigger/python/L1TTauOffline_cfi.py index 1d3dc9bc1ad17..78363620fd3e8 100644 --- a/DQMOffline/L1Trigger/python/L1TTauOffline_cfi.py +++ b/DQMOffline/L1Trigger/python/L1TTauOffline_cfi.py @@ -31,7 +31,7 @@ l1tInputTag = cms.untracked.InputTag("caloStage2Digis:Tau"), vtxInputTag = cms.untracked.InputTag("offlinePrimaryVertices"), bsInputTag = cms.untracked.InputTag("offlineBeamSpot"), - triggerNames = cms.untracked.vstring("HLT_IsoMu18_v*","HLT_IsoMu20_v*","HLT_IsoMu22_v*","HLT_IsoMu24_v*","HLT_IsoMu27_v*"), + triggerNames = cms.untracked.vstring("HLT_IsoMu18_v*","HLT_IsoMu20_v*","HLT_IsoMu22_v*","HLT_IsoMu24_v*","HLT_IsoMu27_v*", "HLT_IsoMu30_v*"), trigInputTag = cms.untracked.InputTag("hltTriggerSummaryAOD", "", "HLT"), trigProcess = cms.untracked.string("HLT"), trigProcess_token = cms.untracked.InputTag("TriggerResults","","HLT"), diff --git a/DQMOffline/L1Trigger/src/L1TTauOffline.cc b/DQMOffline/L1Trigger/src/L1TTauOffline.cc index 5faf7ef570bf1..e772641d9302b 100644 --- a/DQMOffline/L1Trigger/src/L1TTauOffline.cc +++ b/DQMOffline/L1Trigger/src/L1TTauOffline.cc @@ -533,10 +533,23 @@ bool L1TTauOffline::matchHlt(edm::Handle const& triggerEv trigger::TriggerObjectCollection trigObjs = triggerEvent->getObjects(); - for (auto trigIndexIt = m_trigIndices.begin(); trigIndexIt != m_trigIndices.end(); ++trigIndexIt) { - const vector moduleLabels(m_hltConfig.moduleLabels(*trigIndexIt)); - const unsigned moduleIndex = m_hltConfig.size((*trigIndexIt)) - 2; + vector::const_iterator trigIndexIt = m_trigIndices.begin(); + vector::const_iterator trigIndexEnd = m_trigIndices.end(); + for (; trigIndexIt != trigIndexEnd; ++trigIndexIt) { + const vector moduleLabels(m_hltConfig.moduleLabels(*trigIndexIt)); + // V.M. 2023.03.08 Same issue as in the L1TMuonDQMOffline.cc - some modules are behind hltBoolEnd, but we want the last one before the "hltBoolEnd" + unsigned int moduleIndex = 999999; + for (int ii = 0; ii < int(moduleLabels.size()); ii++) { + if (moduleLabels[ii] == "hltBoolEnd") { + moduleIndex = ii - 1; + break; + } + } + if (moduleIndex == 999999) { + edm::LogError("L1TMuonDQMOffline") << "Found no module label in trigger " << (*trigIndexIt) << endl; + continue; + } const unsigned hltFilterIndex = triggerEvent->filterIndex(InputTag(moduleLabels[moduleIndex], "", trigProcess_)); if (hltFilterIndex < triggerEvent->sizeFilters()) { @@ -553,7 +566,6 @@ bool L1TTauOffline::matchHlt(edm::Handle const& triggerEv } } } - return (matchDeltaR < m_MaxHltTauDR); } @@ -634,28 +646,32 @@ void L1TTauOffline::getProbeTaus(const edm::Event& iEvent, edm::Handle antimu; iEvent.getByToken(AntiMuInputTag_, antimu); if (!antimu.isValid()) { - edm::LogWarning("L1TTauOffline") << "invalid collection: reco::PFTauDiscriminator " << std::endl; + edm::LogWarning("L1TTauOffline") << "invalid collection: reco::PFTauDiscriminator anti-mu" << std::endl; return; } edm::Handle dmf; iEvent.getByToken(DecayModeFindingInputTag_, dmf); if (!dmf.isValid()) { - edm::LogWarning("L1TTauOffline") << "invalid collection: reco::PFTauDiscriminator " << std::endl; + edm::LogWarning("L1TTauOffline") << "invalid collection: reco::PFTauDiscriminator decay mode finding input" << std::endl; return; } + + m_AntiEleExists = true; edm::Handle antiele; iEvent.getByToken(AntiEleInputTag_, antiele); if (!antiele.isValid()) { - edm::LogWarning("L1TTauOffline") << "invalid collection: reco::PFTauDiscriminator " << std::endl; - return; + //edm::LogWarning("L1TTauOffline") << "invalid collection: reco::PFTauDiscriminator anti-ele" << std::endl; + //V.M. 16.3.2023. Bypassing the return option for now, as the anti-ele discr. is not available. + m_AntiEleExists = false; + //return; } edm::Handle comb3T; iEvent.getByToken(comb3TInputTag_, comb3T); if (!comb3T.isValid()) { - edm::LogWarning("L1TTauOffline") << "invalid collection: reco::PFTauDiscriminator " << std::endl; + edm::LogWarning("L1TTauOffline") << "invalid collection: reco::PFTauDiscriminator comb3T" << std::endl; return; } @@ -678,13 +694,15 @@ void L1TTauOffline::getProbeTaus(const edm::Event& iEvent, } } { - const edm::Provenance* prov = antiele.provenance(); - const std::vector psetsFromProvenance = - edm::parameterSet(prov->stable(), iEvent.processHistory()) - .getParameter>("workingPoints"); - for (uint i = 0; i < psetsFromProvenance.size(); i++) { - if (psetsFromProvenance[i] == AntiEleWP_) - AntiEleWPIndex_ = i; + if (m_AntiEleExists){ + const edm::Provenance* prov = antiele.provenance(); + const std::vector psetsFromProvenance = + edm::parameterSet(prov->stable(), iEvent.processHistory()) + .getParameter>("workingPoints"); + for (uint i = 0; i < psetsFromProvenance.size(); i++) { + if (psetsFromProvenance[i] == AntiEleWP_) + AntiEleWPIndex_ = i; + } } } { @@ -708,18 +726,29 @@ void L1TTauOffline::getProbeTaus(const edm::Event& iEvent, edm::LogWarning("L1TTauOffline") << "This offline tau has no antimu discriminator, skipping" << std::endl; continue; } - if ((*antiele)[tauCandidate].workingPoints.empty()) { - edm::LogWarning("L1TTauOffline") << "This offline tau has no antiele discriminator, skipping" << std::endl; - continue; + if (m_AntiEleExists){ + if ((*antiele)[tauCandidate].workingPoints.empty()) { + edm::LogWarning("L1TTauOffline") << "This offline tau has no antiele discriminator, skipping" << std::endl; + continue; + } } if ((*comb3T)[tauCandidate].workingPoints.empty()) { edm::LogWarning("L1TTauOffline") << "This offline tau has no comb3T discriminator, skipping" << std::endl; continue; } + bool antiele_condition = true; + + if (m_AntiEleExists) antiele_condition = (*antiele)[tauCandidate].workingPoints[AntiEleWPIndex_]; + + bool anti_mu = (*antimu)[tauCandidate].workingPoints[AntiMuWPIndex_]; + bool dmf_test = ((*dmf)[tauCandidate] > 0.5); + bool comb3T_test = (*comb3T)[tauCandidate].workingPoints[comb3TWPIndex_]; + bool tau_pt_test = (fabs(tauIt->charge()) == 1 && fabs(tauIt->eta()) < 2.1 && tauIt->pt() > 20 ); if (fabs(tauIt->charge()) == 1 && fabs(tauIt->eta()) < 2.1 && tauIt->pt() > 20 && (*antimu)[tauCandidate].workingPoints[AntiMuWPIndex_] && - (*antiele)[tauCandidate].workingPoints[AntiEleWPIndex_] && (*dmf)[tauCandidate] > 0.5 && + antiele_condition && + (*dmf)[tauCandidate] > 0.5 && (*comb3T)[tauCandidate].workingPoints[comb3TWPIndex_]) { if (mymu.DeltaR(mytau) > 0.5 && (mymu + mytau).M() > 40 && (mymu + mytau).M() < 80 && m_TightMuons[0]->charge() * tauIt->charge() < 0) { From 35b8c17799a005a93c8aa9eb8255478234085016 Mon Sep 17 00:00:00 2001 From: Dan Riley Date: Mon, 4 Oct 2021 09:45:28 -0400 Subject: [PATCH 072/233] GPU SiStripClusterizer (squashed) --- CUDADataFormats/SiStripCluster/BuildFile.xml | 10 + .../interface/SiStripClustersCUDA.h | 62 ++ .../SiStripCluster/src/SiStripClustersCUDA.cc | 49 ++ CUDADataFormats/SiStripCluster/src/classes.h | 8 + .../SiStripCluster/src/classes_def.xml | 6 + CalibFormats/SiStripObjects/BuildFile.xml | 3 + .../SiStripClusterizerConditionsGPU.h | 126 ++++ .../src/EventSetup_Registration.cc | 3 + .../src/SiStripClusterizerConditionsGPU.cc | 84 +++ .../interface/SiStripClustersSOA.h | 25 + .../interface/SiStripClustersSOABase.h | 55 ++ .../SiStripCluster/interface/SiStripTypes.h | 19 + .../SiStripCluster/src/SiStripClustersSOA.cc | 12 + DataFormats/SiStripCluster/src/classes.h | 1 + .../SiStripCluster/src/classes_def.xml | 5 + .../SiStripClusterizer/BuildFile.xml | 1 - .../SiStripClusterizer/plugins/BuildFile.xml | 6 +- .../plugins/ChannelLocsGPU.cc | 59 ++ .../plugins/ChannelLocsGPU.h | 136 ++++ .../plugins/ClustersFromRawProducerGPU.cc | 199 ++++++ ...StripClusterizerConditionsGPUESProducer.cc | 62 ++ .../plugins/SiStripClustersFromSOA.cc | 97 +++ .../plugins/SiStripClustersSOAtoHost.cc | 79 +++ .../plugins/SiStripRawToClusterGPUKernel.cc | 179 +++++ .../plugins/SiStripRawToClusterGPUKernel.cu | 618 ++++++++++++++++++ .../plugins/SiStripRawToClusterGPUKernel.h | 78 +++ .../plugins/StripDataView.cuh | 28 + .../python/SiStripClusterizerOnDemand_cfi.py | 52 +- .../python/customizeStripClustersFromRaw.py | 24 + .../SiStripClusterizer/test/BuildFile.xml | 1 + 30 files changed, 2077 insertions(+), 10 deletions(-) create mode 100644 CUDADataFormats/SiStripCluster/BuildFile.xml create mode 100644 CUDADataFormats/SiStripCluster/interface/SiStripClustersCUDA.h create mode 100644 CUDADataFormats/SiStripCluster/src/SiStripClustersCUDA.cc create mode 100644 CUDADataFormats/SiStripCluster/src/classes.h create mode 100644 CUDADataFormats/SiStripCluster/src/classes_def.xml create mode 100644 CalibFormats/SiStripObjects/interface/SiStripClusterizerConditionsGPU.h create mode 100644 CalibFormats/SiStripObjects/src/SiStripClusterizerConditionsGPU.cc create mode 100644 DataFormats/SiStripCluster/interface/SiStripClustersSOA.h create mode 100644 DataFormats/SiStripCluster/interface/SiStripClustersSOABase.h create mode 100644 DataFormats/SiStripCluster/interface/SiStripTypes.h create mode 100644 DataFormats/SiStripCluster/src/SiStripClustersSOA.cc create mode 100644 RecoLocalTracker/SiStripClusterizer/plugins/ChannelLocsGPU.cc create mode 100644 RecoLocalTracker/SiStripClusterizer/plugins/ChannelLocsGPU.h create mode 100644 RecoLocalTracker/SiStripClusterizer/plugins/ClustersFromRawProducerGPU.cc create mode 100644 RecoLocalTracker/SiStripClusterizer/plugins/SiStripClusterizerConditionsGPUESProducer.cc create mode 100644 RecoLocalTracker/SiStripClusterizer/plugins/SiStripClustersFromSOA.cc create mode 100644 RecoLocalTracker/SiStripClusterizer/plugins/SiStripClustersSOAtoHost.cc create mode 100644 RecoLocalTracker/SiStripClusterizer/plugins/SiStripRawToClusterGPUKernel.cc create mode 100644 RecoLocalTracker/SiStripClusterizer/plugins/SiStripRawToClusterGPUKernel.cu create mode 100644 RecoLocalTracker/SiStripClusterizer/plugins/SiStripRawToClusterGPUKernel.h create mode 100644 RecoLocalTracker/SiStripClusterizer/plugins/StripDataView.cuh create mode 100644 RecoLocalTracker/SiStripClusterizer/python/customizeStripClustersFromRaw.py diff --git a/CUDADataFormats/SiStripCluster/BuildFile.xml b/CUDADataFormats/SiStripCluster/BuildFile.xml new file mode 100644 index 0000000000000..5e401d215c4eb --- /dev/null +++ b/CUDADataFormats/SiStripCluster/BuildFile.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/CUDADataFormats/SiStripCluster/interface/SiStripClustersCUDA.h b/CUDADataFormats/SiStripCluster/interface/SiStripClustersCUDA.h new file mode 100644 index 0000000000000..dc426a2d1e44b --- /dev/null +++ b/CUDADataFormats/SiStripCluster/interface/SiStripClustersCUDA.h @@ -0,0 +1,62 @@ +#ifndef CUDADataFormats_SiStripCluster_interface_SiStripClustersCUDA_h +#define CUDADataFormats_SiStripCluster_interface_SiStripClustersCUDA_h + +#include "DataFormats/SiStripCluster/interface/SiStripClustersSOABase.h" +#include "HeterogeneousCore/CUDAUtilities/interface/device_unique_ptr.h" +#include "HeterogeneousCore/CUDAUtilities/interface/host_unique_ptr.h" +#include "HeterogeneousCore/CUDAUtilities/interface/cudaCompat.h" + +namespace cms { + template + using observer_ptr = T *; +} + +#include + +class SiStripClustersCUDADevice : public SiStripClustersSOABase { +public: + SiStripClustersCUDADevice() = default; + explicit SiStripClustersCUDADevice(size_t maxClusters, int clustersPerStrip, cudaStream_t stream); + ~SiStripClustersCUDADevice() override = default; + + SiStripClustersCUDADevice(const SiStripClustersCUDADevice &) = delete; + SiStripClustersCUDADevice &operator=(const SiStripClustersCUDADevice &) = delete; + SiStripClustersCUDADevice(SiStripClustersCUDADevice &&) = default; + SiStripClustersCUDADevice &operator=(SiStripClustersCUDADevice &&) = default; + + struct DeviceView { + uint32_t *clusterIndex_; + uint32_t *clusterSize_; + uint8_t *clusterADCs_; + stripgpu::detId_t *clusterDetId_; + stripgpu::stripId_t *firstStrip_; + bool *trueCluster_; + float *barycenter_; + float *charge_; + uint32_t nClusters_; + }; + + DeviceView *view() const { return view_d.get(); } + int nClustersHost() const { return nClusters_h; } + int *nClustersHostPtr() { return &nClusters_h; } + +private: + cms::cuda::device::unique_ptr view_d; // "me" pointer + int nClusters_h; +}; + +class SiStripClustersCUDAHost : public SiStripClustersSOABase { +public: + SiStripClustersCUDAHost() = default; + explicit SiStripClustersCUDAHost(const SiStripClustersCUDADevice &clusters_d, + int clustersPerStrip, + cudaStream_t stream); + ~SiStripClustersCUDAHost() override = default; + + SiStripClustersCUDAHost(const SiStripClustersCUDAHost &) = delete; + SiStripClustersCUDAHost &operator=(const SiStripClustersCUDAHost &) = delete; + SiStripClustersCUDAHost(SiStripClustersCUDAHost &&) = default; + SiStripClustersCUDAHost &operator=(SiStripClustersCUDAHost &&) = default; +}; + +#endif diff --git a/CUDADataFormats/SiStripCluster/src/SiStripClustersCUDA.cc b/CUDADataFormats/SiStripCluster/src/SiStripClustersCUDA.cc new file mode 100644 index 0000000000000..ff64229608038 --- /dev/null +++ b/CUDADataFormats/SiStripCluster/src/SiStripClustersCUDA.cc @@ -0,0 +1,49 @@ +#include "CUDADataFormats/SiStripCluster/interface/SiStripClustersCUDA.h" +#include "HeterogeneousCore/CUDAUtilities/interface/copyAsync.h" + +SiStripClustersCUDADevice::SiStripClustersCUDADevice(size_t maxClusters, int clustersPerStrip, cudaStream_t stream) { + clusterIndex_ = cms::cuda::make_device_unique(maxClusters, stream); + clusterSize_ = cms::cuda::make_device_unique(maxClusters, stream); + clusterADCs_ = cms::cuda::make_device_unique(maxClusters * clustersPerStrip, stream); + clusterDetId_ = cms::cuda::make_device_unique(maxClusters, stream); + firstStrip_ = cms::cuda::make_device_unique(maxClusters, stream); + trueCluster_ = cms::cuda::make_device_unique(maxClusters, stream); + barycenter_ = cms::cuda::make_device_unique(maxClusters, stream); + charge_ = cms::cuda::make_device_unique(maxClusters, stream); + + auto view = cms::cuda::make_host_unique(stream); + view->clusterIndex_ = clusterIndex_.get(); + view->clusterSize_ = clusterSize_.get(); + view->clusterADCs_ = clusterADCs_.get(); + view->clusterDetId_ = clusterDetId_.get(); + view->firstStrip_ = firstStrip_.get(); + view->trueCluster_ = trueCluster_.get(); + view->barycenter_ = barycenter_.get(); + view->charge_ = charge_.get(); + + view_d = cms::cuda::make_device_unique(stream); + cms::cuda::copyAsync(view_d, view, stream); +} + +SiStripClustersCUDAHost::SiStripClustersCUDAHost(const SiStripClustersCUDADevice& clusters_d, + int clustersPerStrip, + cudaStream_t stream) { + nClusters_ = clusters_d.nClustersHost(); + clusterIndex_ = cms::cuda::make_host_unique(nClusters_, stream); + clusterSize_ = cms::cuda::make_host_unique(nClusters_, stream); + clusterADCs_ = cms::cuda::make_host_unique(nClusters_ * clustersPerStrip, stream); + clusterDetId_ = cms::cuda::make_host_unique(nClusters_, stream); + firstStrip_ = cms::cuda::make_host_unique(nClusters_, stream); + trueCluster_ = cms::cuda::make_host_unique(nClusters_, stream); + barycenter_ = cms::cuda::make_host_unique(nClusters_, stream); + charge_ = cms::cuda::make_host_unique(nClusters_, stream); + + cms::cuda::copyAsync(clusterIndex_, clusters_d.clusterIndex(), nClusters_, stream); + cms::cuda::copyAsync(clusterSize_, clusters_d.clusterSize(), nClusters_, stream); + cms::cuda::copyAsync(clusterADCs_, clusters_d.clusterADCs(), nClusters_ * clustersPerStrip, stream); + cms::cuda::copyAsync(clusterDetId_, clusters_d.clusterDetId(), nClusters_, stream); + cms::cuda::copyAsync(firstStrip_, clusters_d.firstStrip(), nClusters_, stream); + cms::cuda::copyAsync(trueCluster_, clusters_d.trueCluster(), nClusters_, stream); + cms::cuda::copyAsync(barycenter_, clusters_d.barycenter(), nClusters_, stream); + cms::cuda::copyAsync(charge_, clusters_d.charge(), nClusters_, stream); +} diff --git a/CUDADataFormats/SiStripCluster/src/classes.h b/CUDADataFormats/SiStripCluster/src/classes.h new file mode 100644 index 0000000000000..b38f397dee067 --- /dev/null +++ b/CUDADataFormats/SiStripCluster/src/classes.h @@ -0,0 +1,8 @@ +#ifndef CUDADataFormats_SiStripCluster_classes_h +#define CUDADataFormats_SiStripCluster_classes_h + +#include "CUDADataFormats/Common/interface/Product.h" +#include "CUDADataFormats/SiStripCluster/interface/SiStripClustersCUDA.h" +#include "DataFormats/Common/interface/Wrapper.h" + +#endif diff --git a/CUDADataFormats/SiStripCluster/src/classes_def.xml b/CUDADataFormats/SiStripCluster/src/classes_def.xml new file mode 100644 index 0000000000000..3c2f3ab27c620 --- /dev/null +++ b/CUDADataFormats/SiStripCluster/src/classes_def.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/CalibFormats/SiStripObjects/BuildFile.xml b/CalibFormats/SiStripObjects/BuildFile.xml index 325f0aa1bcb9f..83c3901a34f13 100644 --- a/CalibFormats/SiStripObjects/BuildFile.xml +++ b/CalibFormats/SiStripObjects/BuildFile.xml @@ -2,6 +2,9 @@ + + + diff --git a/CalibFormats/SiStripObjects/interface/SiStripClusterizerConditionsGPU.h b/CalibFormats/SiStripObjects/interface/SiStripClusterizerConditionsGPU.h new file mode 100644 index 0000000000000..0b6bed13fe35a --- /dev/null +++ b/CalibFormats/SiStripObjects/interface/SiStripClusterizerConditionsGPU.h @@ -0,0 +1,126 @@ +#ifndef CalibFormats_SiStripObjects_SiStripClusterizerConditionsGPU_h +#define CalibFormats_SiStripObjects_SiStripClusterizerConditionsGPU_h + +#include "HeterogeneousCore/CUDAUtilities/interface/cudaCompat.h" +#include "HeterogeneousCore/CUDACore/interface/ESProduct.h" +#include "DataFormats/SiStripCluster/interface/SiStripTypes.h" + +class SiStripQuality; +class SiStripGain; +class SiStripNoises; + +namespace stripgpu { + static constexpr int kStripsPerChannel = 256; + static constexpr int kFedFirst = 50; + static constexpr int kFedLast = 489; + static constexpr int kFedCount = kFedLast - kFedFirst + 1; + static constexpr int kChannelCount = 96; + static constexpr int kApvCount = 2 * kChannelCount; + static constexpr int kStripsPerFed = kChannelCount * kStripsPerChannel; + + __host__ __device__ inline fedId_t fedIndex(fedId_t fed) { return fed - kFedFirst; } + __host__ __device__ inline stripId_t stripIndex(fedCh_t channel, stripId_t strip) { + return channel * kStripsPerChannel + (strip % kStripsPerChannel); + } + __host__ __device__ inline stripId_t apvIndex(fedCh_t channel, stripId_t strip) { + return channel * kStripsPerChannel + (strip % kStripsPerChannel) / 128; + } +} // namespace stripgpu + +class SiStripClusterizerConditionsGPU { +public: + class DetToFed { + public: + DetToFed(stripgpu::detId_t detid, stripgpu::APVPair_t ipair, stripgpu::fedId_t fedid, stripgpu::fedCh_t fedch) + : detid_(detid), ipair_(ipair), fedid_(fedid), fedch_(fedch) {} + stripgpu::detId_t detID() const { return detid_; } + stripgpu::APVPair_t pair() const { return ipair_; } + stripgpu::fedId_t fedID() const { return fedid_; } + stripgpu::fedCh_t fedCh() const { return fedch_; } + + private: + stripgpu::detId_t detid_; + stripgpu::APVPair_t ipair_; + stripgpu::fedId_t fedid_; + stripgpu::fedCh_t fedch_; + }; + using DetToFeds = std::vector; + + struct Data { + static constexpr std::uint16_t badBit = 1 << 15; + + __host__ __device__ void setStrip(stripgpu::fedId_t fed, + stripgpu::fedCh_t channel, + stripgpu::stripId_t strip, + std::uint16_t noise, + float gain, + bool bad) { + gain_[stripgpu::fedIndex(fed)][stripgpu::apvIndex(channel, strip)] = gain; + noise_[stripgpu::fedIndex(fed)][stripgpu::stripIndex(channel, strip)] = noise; + if (bad) { + noise_[stripgpu::fedIndex(fed)][stripgpu::stripIndex(channel, strip)] |= badBit; + } + } + + __host__ __device__ void setInvThickness(stripgpu::fedId_t fed, stripgpu::fedCh_t channel, float invthick) { + invthick_[stripgpu::fedIndex(fed)][channel] = invthick; + } + + __host__ __device__ stripgpu::detId_t detID(stripgpu::fedId_t fed, stripgpu::fedCh_t channel) const { + return detID_[stripgpu::fedIndex(fed)][channel]; + } + + __host__ __device__ stripgpu::APVPair_t iPair(stripgpu::fedId_t fed, stripgpu::fedCh_t channel) const { + return iPair_[stripgpu::fedIndex(fed)][channel]; + } + + __host__ __device__ float invthick(stripgpu::fedId_t fed, stripgpu::fedCh_t channel) const { + return invthick_[stripgpu::fedIndex(fed)][channel]; + } + + __host__ __device__ float noise(stripgpu::fedId_t fed, stripgpu::fedCh_t channel, stripgpu::stripId_t strip) const { + return 0.1 * (noise_[stripgpu::fedIndex(fed)][stripgpu::stripIndex(channel, strip)] & !badBit); + } + + __host__ __device__ float gain(stripgpu::fedId_t fed, stripgpu::fedCh_t channel, stripgpu::stripId_t strip) const { + return gain_[stripgpu::fedIndex(fed)][stripgpu::apvIndex(channel, strip)]; + } + + __host__ __device__ bool bad(stripgpu::fedId_t fed, stripgpu::fedCh_t channel, stripgpu::stripId_t strip) const { + return badBit == (noise_[stripgpu::fedIndex(fed)][stripgpu::stripIndex(channel, strip)] & badBit); + } + + alignas(128) float gain_[stripgpu::kFedCount][stripgpu::kApvCount]; + alignas(128) float invthick_[stripgpu::kFedCount][stripgpu::kChannelCount]; + alignas(128) std::uint16_t noise_[stripgpu::kFedCount][stripgpu::kStripsPerFed]; + alignas(128) stripgpu::detId_t detID_[stripgpu::kFedCount][stripgpu::kChannelCount]; + alignas(128) stripgpu::APVPair_t iPair_[stripgpu::kFedCount][stripgpu::kChannelCount]; + }; + + SiStripClusterizerConditionsGPU(const SiStripQuality& quality, const SiStripGain* gains, const SiStripNoises& noises); + ~SiStripClusterizerConditionsGPU(); + + // Function to return the actual payload on the memory of the current device + Data const* getGPUProductAsync(cudaStream_t stream) const; + + const DetToFeds& detToFeds() const { return detToFeds_; } + +private: + // Holds the data in pinned CPU memory + Data* conditions_ = nullptr; + + // Helper struct to hold all information that has to be allocated and + // deallocated per device + struct GPUData { + // Destructor should free all member pointers + ~GPUData(); + Data* conditionsDevice = nullptr; + }; + + // Helper that takes care of complexity of transferring the data to + // multiple devices + cms::cuda::ESProduct gpuData_; + DetToFeds detToFeds_; +}; + +#endif diff --git a/CalibFormats/SiStripObjects/src/EventSetup_Registration.cc b/CalibFormats/SiStripObjects/src/EventSetup_Registration.cc index ddf7a0ffb914f..f16361785f310 100644 --- a/CalibFormats/SiStripObjects/src/EventSetup_Registration.cc +++ b/CalibFormats/SiStripObjects/src/EventSetup_Registration.cc @@ -23,3 +23,6 @@ TYPELOOKUP_DATA_REG(SiStripQuality); #include "CalibFormats/SiStripObjects/interface/SiStripClusterizerConditions.h" TYPELOOKUP_DATA_REG(SiStripClusterizerConditions); + +#include "CalibFormats/SiStripObjects/interface/SiStripClusterizerConditionsGPU.h" +TYPELOOKUP_DATA_REG(SiStripClusterizerConditionsGPU); diff --git a/CalibFormats/SiStripObjects/src/SiStripClusterizerConditionsGPU.cc b/CalibFormats/SiStripObjects/src/SiStripClusterizerConditionsGPU.cc new file mode 100644 index 0000000000000..29c33a8ed911f --- /dev/null +++ b/CalibFormats/SiStripObjects/src/SiStripClusterizerConditionsGPU.cc @@ -0,0 +1,84 @@ +#include "HeterogeneousCore/CUDAUtilities/interface/device_unique_ptr.h" + +#include "CondFormats/SiStripObjects/interface/SiStripNoises.h" +#include "CalibFormats/SiStripObjects/interface/SiStripGain.h" +#include "CalibFormats/SiStripObjects/interface/SiStripDetCabling.h" +#include "CalibFormats/SiStripObjects/interface/SiStripQuality.h" +#include "CalibFormats/SiStripObjects/interface/SiStripClusterizerConditionsGPU.h" + +#include "DataFormats/SiStripCluster/interface/SiStripClusterTools.h" + +SiStripClusterizerConditionsGPU::SiStripClusterizerConditionsGPU(const SiStripQuality& quality, + const SiStripGain* gains, + const SiStripNoises& noises) { + cudaCheck(cudaMallocHost(&conditions_, sizeof(Data))); + detToFeds_.clear(); + + // connected: map> + // map of KEY=detid DATA=vector of apvs, maximum 6 APVs per detector module : + const auto& connected = quality.cabling()->connected(); + // detCabling: map + // map of KEY=detid DATA=vector + const auto& detCabling = quality.cabling()->getDetCabling(); + + for (const auto& conn : connected) { + const auto det = conn.first; + if (!quality.IsModuleBad(det)) { + const auto detConn_it = detCabling.find(det); + + if (detCabling.end() != detConn_it) { + for (const auto& chan : (*detConn_it).second) { + if (chan && chan->fedId() && chan->isConnected()) { + const auto detID = chan->detId(); + const auto fedID = chan->fedId(); + const auto fedCh = chan->fedCh(); + const auto iPair = chan->apvPairNumber(); + + detToFeds_.emplace_back(detID, iPair, fedID, fedCh); + + conditions_->detID_[stripgpu::fedIndex(fedID)][fedCh] = detID; + conditions_->iPair_[stripgpu::fedIndex(fedID)][fedCh] = iPair; + conditions_->setInvThickness(fedID, fedCh, siStripClusterTools::sensorThicknessInverse(detID)); + + auto offset = 256 * iPair; + + for (auto strip = 0; strip < 256; ++strip) { + const auto gainRange = gains->getRange(det); + + const auto detstrip = strip + offset; + const std::uint16_t noise = SiStripNoises::getRawNoise(detstrip, noises.getRange(det)); + const auto gain = SiStripGain::getStripGain(detstrip, gainRange); + const auto bad = quality.IsStripBad(quality.getRange(det), detstrip); + + // gain is actually stored per-APV, not per-strip + conditions_->setStrip(fedID, fedCh, strip, noise, gain, bad); + } + } + } + } + } + } + + std::sort(detToFeds_.begin(), detToFeds_.end(), [](const DetToFed& a, const DetToFed& b) { + return a.detID() < b.detID() || (a.detID() == b.detID() && a.pair() < b.pair()); + }); +} + +SiStripClusterizerConditionsGPU::~SiStripClusterizerConditionsGPU() { + if (nullptr != conditions_) { + cudaCheck(cudaFreeHost(conditions_)); + } +} + +SiStripClusterizerConditionsGPU::Data const* SiStripClusterizerConditionsGPU::getGPUProductAsync( + cudaStream_t stream) const { + auto const& data = gpuData_.dataForCurrentDeviceAsync(stream, [this](GPUData& data, cudaStream_t stream) { + // Allocate the payload object on the device memory. + cudaCheck(cudaMalloc(&data.conditionsDevice, sizeof(Data))); + cudaCheck(cudaMemcpyAsync(data.conditionsDevice, conditions_, sizeof(Data), cudaMemcpyDefault, stream)); + }); + // Returns the payload object on the memory of the current device + return data.conditionsDevice; +} + +SiStripClusterizerConditionsGPU::GPUData::~GPUData() { cudaCheck(cudaFree(conditionsDevice)); } diff --git a/DataFormats/SiStripCluster/interface/SiStripClustersSOA.h b/DataFormats/SiStripCluster/interface/SiStripClustersSOA.h new file mode 100644 index 0000000000000..b277d365da38c --- /dev/null +++ b/DataFormats/SiStripCluster/interface/SiStripClustersSOA.h @@ -0,0 +1,25 @@ +#ifndef DataFormats_SiStripCluster_interface_SiStripClustersSOA_h +#define DataFormats_SiStripCluster_interface_SiStripClustersSOA_h + +#include "DataFormats/SiStripCluster/interface/SiStripClustersSOABase.h" + +#include + +namespace detail { + template + using unique_ptr = typename std::unique_ptr; +} + +class SiStripClustersSOA : public SiStripClustersSOABase { +public: + SiStripClustersSOA() = default; + explicit SiStripClustersSOA(size_t maxClusters, int clustersPerStrip); + ~SiStripClustersSOA() override = default; + + SiStripClustersSOA(const SiStripClustersSOA &) = delete; + SiStripClustersSOA &operator=(const SiStripClustersSOA &) = delete; + SiStripClustersSOA(SiStripClustersSOA &&) = default; + SiStripClustersSOA &operator=(SiStripClustersSOA &&) = default; +}; + +#endif diff --git a/DataFormats/SiStripCluster/interface/SiStripClustersSOABase.h b/DataFormats/SiStripCluster/interface/SiStripClustersSOABase.h new file mode 100644 index 0000000000000..dc97f262ad155 --- /dev/null +++ b/DataFormats/SiStripCluster/interface/SiStripClustersSOABase.h @@ -0,0 +1,55 @@ +#ifndef DataFormats_SiStripCluster_interface_SiStripClustersSOABase_ +#define DataFormats_SiStripCluster_interface_SiStripClustersSOABase_ + +#include "DataFormats/SiStripCluster/interface/SiStripTypes.h" + +#include +#include + +template