diff --git a/CalibTracker/SiStripHitEfficiency/plugins/SiStripHitEffFromCalibTree.cc b/CalibTracker/SiStripHitEfficiency/plugins/SiStripHitEffFromCalibTree.cc index cf0bb46a04362..e6df2a4f834b1 100644 --- a/CalibTracker/SiStripHitEfficiency/plugins/SiStripHitEffFromCalibTree.cc +++ b/CalibTracker/SiStripHitEfficiency/plugins/SiStripHitEffFromCalibTree.cc @@ -152,6 +152,7 @@ class SiStripHitEffFromCalibTree : public ConditionDBWriter { float tkMapMin_; float effPlotMin_; TString title_; + bool storeModEff_; unsigned int nTEClayers; @@ -159,8 +160,14 @@ class SiStripHitEffFromCalibTree : public ConditionDBWriter { TH1F* instLumiHisto; TH1F* PUHisto; + TH1F* bxHisto_cutOnTracks; + TH1F* instLumiHisto_cutOnTracks; + TH1F* PUHisto_cutOnTracks; + // for association of informations of the hitEff tree and the event infos tree map, array > eventInfos; + // for using events after number of tracks cut + map, bool> event_used; vector hits[23]; vector HotColdMaps; @@ -215,6 +222,7 @@ SiStripHitEffFromCalibTree::SiStripHitEffFromCalibTree(const edm::ParameterSet& tkMapMin_ = conf.getUntrackedParameter("TkMapMin", 0.9); effPlotMin_ = conf.getUntrackedParameter("EffPlotMin", 0.9); title_ = conf.getParameter("Title"); + storeModEff_ = conf.getUntrackedParameter("StoreModuleEff", false); detInfo_ = SiStripDetInfoFileReader::read(fileInPath_.fullPath()); nTEClayers = 9; // number of wheels @@ -259,7 +267,11 @@ void SiStripHitEffFromCalibTree::algoAnalyze(const edm::Event& e, const edm::Eve bxHisto = fs->make("bx", "bx", 3600, 0, 3600); instLumiHisto = fs->make("instLumi", "inst. lumi.", 250, 0, 25000); - PUHisto = fs->make("PU", "PU", 200, 0, 200); + PUHisto = fs->make("PU", "PU", 300, 0, 300); + + bxHisto_cutOnTracks = fs->make("bx_cutOnTracks", "bx", 3600, 0, 3600); + instLumiHisto_cutOnTracks = fs->make("instLumi_cutOnTracks", "inst. lumi.", 250, 0, 25000); + PUHisto_cutOnTracks = fs->make("PU_cutOnTracks", "PU", 300, 0, 300); for (int l = 0; l < 35; l++) { goodlayertotal[l] = 0; @@ -354,6 +366,7 @@ void SiStripHitEffFromCalibTree::algoAnalyze(const edm::Event& e, const edm::Eve PUHisto->Fill(PU); eventInfos[make_pair(run, evt)] = array{{(double)bx, instLumi, PU}}; + event_used[make_pair(run, evt)] = false; } } @@ -388,6 +401,7 @@ void SiStripHitEffFromCalibTree::algoAnalyze(const edm::Event& e, const edm::Eve LOGPRINT << "Successfully loaded analyze function with " << nevents << " events!\n"; map, array >::iterator itEventInfos; + map, bool>::iterator itEventUsed; //Loop through all of the events for (int j = 0; j < nevents; j++) { @@ -430,6 +444,10 @@ void SiStripHitEffFromCalibTree::algoAnalyze(const edm::Event& e, const edm::Eve instLumi = InstLumiLf->GetValue(); // branch not filled by default if (PULf != nullptr) PU = PULf->GetValue(); // branch not filled by default + // Mark new event + itEventUsed = event_used.find(make_pair(run, evt)); + if (itEventUsed == event_used.end()) + event_used[make_pair(run, evt)] = false; } int CM = -100; if (useCM_) @@ -445,6 +463,18 @@ void SiStripHitEffFromCalibTree::algoAnalyze(const edm::Event& e, const edm::Eve } } + // Fill event info for events from the anEff tree + // They can differ from the eventInfo tree due to an optional cut on the #tracks when filling the anEff tree + itEventUsed = event_used.find(make_pair(run, evt)); + if (itEventUsed != event_used.end()) { + if (itEventUsed->second == false) { + bxHisto_cutOnTracks->Fill(bx); + instLumiHisto_cutOnTracks->Fill(instLumi); + PUHisto_cutOnTracks->Fill(PU); + itEventUsed->second = true; + } + } + //We have two things we want to do, both an XY color plot, and the efficiency measurement //First, ignore anything that isn't in acceptance and isn't good quality @@ -1004,6 +1034,22 @@ void SiStripHitEffFromCalibTree::makeHotColdMaps() { void SiStripHitEffFromCalibTree::makeTKMap(bool autoTagging = false) { LOGPRINT << "Entering TKMap generation!\n"; + + TTree* tree = nullptr; + unsigned int t_DetId, t_found, t_total; + unsigned char t_layer; + bool t_isTaggedIneff; + float t_threshold; + if (storeModEff_) { + tree = fs->make("ModEff", "ModEff"); + tree->Branch("DetId", &t_DetId, "DetId/i"); + tree->Branch("Layer", &t_layer, "Layer/b"); + tree->Branch("FoundHits", &t_found, "FoundHits/i"); + tree->Branch("AllHits", &t_total, "AllHits/i"); + tree->Branch("IsTaggedIneff", &t_isTaggedIneff, "IsTaggedIneff/O"); + tree->Branch("TagThreshold", &t_threshold, "TagThreshold/F"); + } + tkmap = new TrackerMap(" Detector Inefficiency "); tkmapbad = new TrackerMap(" Inefficient Modules "); tkmapeff = new TrackerMap(title_.Data()); @@ -1052,6 +1098,16 @@ void SiStripHitEffFromCalibTree::makeTKMap(bool autoTagging = false) { } } + if (storeModEff_) { + t_DetId = ih.first; + t_layer = i; + t_found = mynum; + t_total = myden; + t_isTaggedIneff = false; + t_threshold = 0; + tree->Fill(); + } + //Put any module into the TKMap tkmap->fill(ih.first, 1. - myeff); tkmapeff->fill(ih.first, myeff); @@ -1089,9 +1145,11 @@ void SiStripHitEffFromCalibTree::makeTKMap(bool autoTagging = false) { //We have a bad module, put it in the list! BadModules[ih.first] = myeff; tkmapbad->fillc(ih.first, 255, 0, 0); + t_isTaggedIneff = true; } else { //Fill the bad list with empty results for every module tkmapbad->fillc(ih.first, 255, 255, 255); + t_isTaggedIneff = false; } if (myeff_up < layer_min_eff + 0.08) // printing message also for modules slighly above (8%) the limit LOGPRINT << "Layer " << i << " (" << ::layerName(i, showRings_, nTEClayers) << ") module " << ih.first @@ -1100,6 +1158,15 @@ void SiStripHitEffFromCalibTree::makeTKMap(bool autoTagging = false) { LOGPRINT << "Layer " << i << " (" << ::layerName(i, showRings_, nTEClayers) << ") module " << ih.first << " layer " << i << " is under occupancy at " << myden; } + + if (storeModEff_) { + t_DetId = ih.first; + t_layer = i; + t_found = mynum; + t_total = myden; + t_threshold = layer_min_eff; + tree->Fill(); + } } } } @@ -1109,6 +1176,8 @@ void SiStripHitEffFromCalibTree::makeTKMap(bool autoTagging = false) { tkmapnum->save(true, 0, 0, "SiStripHitEffTKMapNum.png"); tkmapden->save(true, 0, 0, "SiStripHitEffTKMapDen.png"); LOGPRINT << "Finished TKMap Generation\n"; + if (storeModEff_) + LOGPRINT << "Modules efficiencies stored in tree\n"; } void SiStripHitEffFromCalibTree::makeSQLite() { @@ -1369,6 +1438,7 @@ void SiStripHitEffFromCalibTree::makeSummary() { leg->Draw("same"); c7->SaveAs("Summary.png"); + c7->SaveAs("Summary.C"); } void SiStripHitEffFromCalibTree::makeSummaryVsBx() { diff --git a/CondTools/RunInfo/plugins/LHCInfoPerFillPopConAnalyzer.cc b/CondTools/RunInfo/plugins/LHCInfoPerFillPopConAnalyzer.cc index 4757ae0ce420e..ac9ef730a5e6a 100644 --- a/CondTools/RunInfo/plugins/LHCInfoPerFillPopConAnalyzer.cc +++ b/CondTools/RunInfo/plugins/LHCInfoPerFillPopConAnalyzer.cc @@ -164,8 +164,8 @@ namespace theLHCInfoPerFillImpl { bool comparePayloads(const LHCInfoPerFill& rhs, const LHCInfoPerFill& lhs) { if (rhs.fillNumber() != lhs.fillNumber() || rhs.delivLumi() != lhs.delivLumi() || rhs.recLumi() != lhs.recLumi() || rhs.instLumi() != lhs.instLumi() || rhs.instLumiError() != lhs.instLumiError() || - rhs.lhcState() != rhs.lhcState() || rhs.lhcComment() != rhs.lhcComment() || - rhs.ctppsStatus() != rhs.ctppsStatus()) { + rhs.lhcState() != lhs.lhcState() || rhs.lhcComment() != lhs.lhcComment() || + rhs.ctppsStatus() != lhs.ctppsStatus()) { return false; } return true; diff --git a/CondTools/RunInfo/src/LHCInfoPopConSourceHandler.cc b/CondTools/RunInfo/src/LHCInfoPopConSourceHandler.cc index 0a3dd4a221eb2..b5c334dd2240a 100644 --- a/CondTools/RunInfo/src/LHCInfoPopConSourceHandler.cc +++ b/CondTools/RunInfo/src/LHCInfoPopConSourceHandler.cc @@ -562,15 +562,15 @@ namespace LHCInfoImpl { return false; if (rhs.instLumiError() != lhs.instLumiError()) return false; - if (rhs.crossingAngle() != rhs.crossingAngle()) + if (rhs.crossingAngle() != lhs.crossingAngle()) return false; - if (rhs.betaStar() != rhs.betaStar()) + if (rhs.betaStar() != lhs.betaStar()) return false; - if (rhs.lhcState() != rhs.lhcState()) + if (rhs.lhcState() != lhs.lhcState()) return false; - if (rhs.lhcComment() != rhs.lhcComment()) + if (rhs.lhcComment() != lhs.lhcComment()) return false; - if (rhs.ctppsStatus() != rhs.ctppsStatus()) + if (rhs.ctppsStatus() != lhs.ctppsStatus()) return false; return true; } diff --git a/Configuration/AlCa/python/autoCond.py b/Configuration/AlCa/python/autoCond.py index 3439a16c6bb6b..4191236c839c1 100644 --- a/Configuration/AlCa/python/autoCond.py +++ b/Configuration/AlCa/python/autoCond.py @@ -31,12 +31,12 @@ 'run2_data_promptlike_hi' : '124X_dataRun2_PromptLike_HI_v1', # GlobalTag with fixed snapshot time for Run2 HLT RelVals: customizations to run with fixed L1 Menu 'run2_hlt_relval' : '123X_dataRun2_HLT_relval_v3', - # GlobalTag for Run3 HLT: identical to the online GT (130X_dataRun3_HLT_v2) but with snapshot at 2023-06-14 12:00:00 (UTC) - 'run3_hlt' : '130X_dataRun3_HLT_frozen_v3', - # GlobalTag for Run3 data relvals (express GT) - identical to 130X_dataRun3_Express_v3 but with snapshot at 2023-06-14 12:00:00 (UTC) - 'run3_data_express' : '130X_dataRun3_Express_frozen_v3', - # GlobalTag for Run3 data relvals (prompt GT) - identical to 130X_dataRun3_Prompt_v4 but with snapshot at 2023-06-14 12:00:00 (UTC) - 'run3_data_prompt' : '130X_dataRun3_Prompt_frozen_v3', + # GlobalTag for Run3 HLT: identical to the online GT (130X_dataRun3_HLT_v2) but with snapshot at 2023-07-25 12:00:00 (UTC) + 'run3_hlt' : '130X_dataRun3_HLT_frozen_v4', + # GlobalTag for Run3 data relvals (express GT) - identical to 130X_dataRun3_Express_v3 but with snapshot at 2023-07-25 12:00:00 (UTC) + 'run3_data_express' : '130X_dataRun3_Express_frozen_v4', + # GlobalTag for Run3 data relvals (prompt GT) - identical to 130X_dataRun3_Prompt_v4 but with snapshot at 2023-07-25 12:00:00 (UTC) + 'run3_data_prompt' : '130X_dataRun3_Prompt_frozen_v4', # GlobalTag for Run3 offline data reprocessing - snapshot at 2023-05-09 15:38:20 (UTC) 'run3_data' : '130X_dataRun3_v2', # GlobalTag for MC production with perfectly aligned and calibrated detector for Phase1 2017 (and 0,0,~0-centred beamspot) @@ -76,9 +76,9 @@ # GlobalTag for MC production with perfectly aligned and calibrated detector for Phase1 2023 'phase1_2023_design' : '131X_mcRun3_2023_design_v7', # GlobalTag for MC production with realistic conditions for Phase1 2023 - 'phase1_2023_realistic' : '131X_mcRun3_2023_realistic_v8', + 'phase1_2023_realistic' : '131X_mcRun3_2023_realistic_v9', # GlobalTag for MC production (cosmics) with realistic conditions for Phase1 2023, Strip tracker in DECO mode - 'phase1_2023_cosmics' : '131X_mcRun3_2023cosmics_realistic_deco_v8', + 'phase1_2023_cosmics' : '131X_mcRun3_2023cosmics_realistic_deco_v9', # GlobalTag for MC production (cosmics) with perfectly aligned and calibrated detector for Phase1 2023, Strip tracker in DECO mode 'phase1_2023_cosmics_design' : '131X_mcRun3_2023cosmics_design_deco_v7', # GlobalTag for MC production with realistic conditions for Phase1 2023 detector for Heavy Ion diff --git a/Configuration/Eras/python/Era_Run3_2023_FastSim_cff.py b/Configuration/Eras/python/Era_Run3_2023_FastSim_cff.py new file mode 100644 index 0000000000000..620e986f2c303 --- /dev/null +++ b/Configuration/Eras/python/Era_Run3_2023_FastSim_cff.py @@ -0,0 +1,6 @@ +import FWCore.ParameterSet.Config as cms + +from Configuration.Eras.Era_Run3_2023_cff import Run3_2023 +from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM + +Run3_2023_FastSim = Run3_2023.copyAndExclude([run3_GEM]) diff --git a/Configuration/PyReleaseValidation/python/relval_standard.py b/Configuration/PyReleaseValidation/python/relval_standard.py index 357422a1f8396..a60038c15d4b5 100644 --- a/Configuration/PyReleaseValidation/python/relval_standard.py +++ b/Configuration/PyReleaseValidation/python/relval_standard.py @@ -498,22 +498,22 @@ workflows[140.076] = ['',['RunEGamma2022E','HLTDR3_2022','RECONANORUN3_reHLT','HARVESTRUN3']] workflows[140.077] = ['',['RunTau2022E','HLTDR3_2022','RECONANORUN3_reHLT','HARVESTRUN3']] workflows[140.078] = ['',['RunMuonEG2022E','HLTDR3_2022','RECONANORUN3_reHLT','HARVESTRUN3']] -### run3 (2023) skims ### -workflows[140.104] = ['',['RunZeroBias2022D','HLTDR3_2022','RECONANORUN3_reHLT','SKIMZEROBIASRUN3_reHLT']] -workflows[140.105] = ['',['RunBTagMu2022D','HLTDR3_2023','RECONANORUN3_reHLT','SKIMBTAGMURUN3_reHLT']] -workflows[140.106] = ['',['RunJetMET2022D','HLTDR3_2023','RECONANORUN3_reHLT','SKIMJETMET0RUN3_reHLT']] -workflows[140.107] = ['',['RunDisplacedJet2022D','HLTDR3_2023','RECONANORUN3_reHLT','SKIMDISPLACEDJETRUN3_reHLT']] -workflows[140.109] = ['',['RunEGamma2022D','HLTDR3_2023','RECONANORUN3_reHLT','SKIMEGAMMA0RUN3_reHLT']] -workflows[140.110] = ['',['RunTau2022D','HLTDR3_2023','RECONANORUN3_reHLT','SKIMTAURUN3_reHLT']] -workflows[140.111] = ['',['RunMuon2022D','HLTDR3_2023','RECONANORUN3_reHLT','SKIMMUON0RUN3_reHLT']] -workflows[140.112] = ['',['RunMuonEG2022D','HLTDR3_2023','RECONANORUN3_reHLT','SKIMMUONEGRUN3_reHLT']] -workflows[140.113] = ['',['RunNoBPTX2022D','HLTDR3_2023','RECONANORUN3_reHLT','SKIMNOBPTXRUN3_reHLT']] -workflows[140.114] = ['',['RunHcalNZS2022D','HLTDR3_2023','RECONANORUN3_reHLT','SKIMHCALNZSRUN3_reHLT']] -workflows[140.115] = ['',['RunHLTPhysics2022D','HLTDR3_2023','RECONANORUN3_reHLT','SKIMHLTPHYSICSRUN3_reHLT']] -workflows[140.116] = ['',['RunCommissioning2022D','HLTDR3_2023','RECONANORUN3_reHLT','SKIMCOMMISSIONINGRUN3_reHLT']] -workflows[140.117] = ['',['RunCosmics2022D','HLTDR3_2023','RECOCOSMRUN3_reHLT','SKIMCOSMICSRUN3_reHLT']] -#workflows[140.118] = ['',['RunParkingBPH2022B','HLTDR3_2023','RECONANORUN3_reHLT','SKIMPARKINGBPHRUN3_reHLT']] + +### run3 (2022) skims ### +workflows[140.101] = ['',['RunZeroBias2022D','HLTDR3_2022','SKIMZEROBIASRUN3_reHLT_2022','HARVESTRUN3_ZB']] +workflows[140.102] = ['',['RunBTagMu2022D','HLTDR3_2022','SKIMBTAGMURUN3_reHLT_2022','HARVESTRUN3']] +workflows[140.103] = ['',['RunJetMET2022D','HLTDR3_2022','SKIMJETMET0RUN3_reHLT_2022','HARVESTRUN3']] +workflows[140.104] = ['',['RunDisplacedJet2022D','HLTDR3_2022','SKIMDISPLACEDJETRUN3_reHLT_2022','HARVESTRUN3']] +workflows[140.105] = ['',['RunEGamma2022D','HLTDR3_2022','SKIMEGAMMA0RUN3_reHLT_2022','HARVESTRUN3']] +workflows[140.106] = ['',['RunTau2022D','HLTDR3_2022','SKIMTAURUN3_reHLT_2022','HARVESTRUN3']] +workflows[140.107] = ['',['RunMuon2022D','HLTDR3_2022','SKIMMUON0RUN3_reHLT_2022','HARVESTRUN3']] +workflows[140.108] = ['',['RunMuonEG2022D','HLTDR3_2022','SKIMMUONEGRUN3_reHLT_2022','HARVESTRUN3']] +workflows[140.109] = ['',['RunNoBPTX2022D','HLTDR3_2022','SKIMNOBPTXRUN3_reHLT_2022','HARVESTRUN3']] +workflows[140.110] = ['',['RunHcalNZS2022D','HLTDR3_2022','SKIMHCALNZSRUN3_reHLT_2022','HARVESTRUN3']] +workflows[140.111] = ['',['RunHLTPhysics2022D','HLTDR3_2022','SKIMHLTPHYSICSRUN3_reHLT_2022','HARVESTRUN3']] +workflows[140.112] = ['',['RunCommissioning2022D','HLTDR3_2022','SKIMCOMMISSIONINGRUN3_reHLT_2022','HARVESTRUN3']] +workflows[140.113] = ['',['RunCosmics2022D','HLTDR3_2022','SKIMCOSMICSRUN3_reHLT_2022','HARVESTRUN3_COS']] ### run3 (2023) ### workflows[141.001] = ['',['RunMuon2023B','HLTDR3_2023B','RECONANORUN3_reHLT_2023B','HARVESTRUN3_2023B']] @@ -551,6 +551,22 @@ workflows[141.049] = ['',['RunParkingDoubleMuonLowMass2023D','HLTDR3_2023','RECONANORUN3_reHLT_2023','HARVESTRUN3_2023']] +### run3 (2023) skims ### +workflows[141.101] = ['',['RunZeroBias2023C','HLTDR3_2023','SKIMZEROBIASRUN3_reHLT_2023','HARVESTRUN3_ZB_2023']] +workflows[141.102] = ['',['RunBTagMu2023C','HLTDR3_2023','SKIMBTAGMURUN3_reHLT_2023','HARVESTRUN3_2023']] +workflows[141.103] = ['',['RunJetMET2023C','HLTDR3_2023','SKIMJETMET0RUN3_reHLT_2023','HARVESTRUN3_2023']] +workflows[141.104] = ['',['RunDisplacedJet2023C','HLTDR3_2023','SKIMDISPLACEDJETRUN3_reHLT_2023','HARVESTRUN3_2023']] +workflows[141.105] = ['',['RunEGamma2023C','HLTDR3_2023','SKIMEGAMMA0RUN3_reHLT_2023','HARVESTRUN3_2023']] +workflows[141.106] = ['',['RunTau2023C','HLTDR3_2023','SKIMTAURUN3_reHLT_2023','HARVESTRUN3_2023']] +workflows[141.107] = ['',['RunMuon2023C','HLTDR3_2023','SKIMMUON0RUN3_reHLT_2023','HARVESTRUN3_2023']] +workflows[141.108] = ['',['RunMuonEG2023C','HLTDR3_2023','SKIMMUONEGRUN3_reHLT_2023','HARVESTRUN3_2023']] +workflows[141.109] = ['',['RunNoBPTX2023C','HLTDR3_2023','SKIMNOBPTXRUN3_reHLT_2023','HARVESTRUN3_2023']] +workflows[141.110] = ['',['RunHcalNZS2023C','HLTDR3_2023','SKIMHCALNZSRUN3_reHLT_2023','HARVESTRUN3_2023']] +workflows[141.111] = ['',['RunHLTPhysics2023C','HLTDR3_2023','SKIMHLTPHYSICSRUN3_reHLT_2023','HARVESTRUN3_2023']] +workflows[141.112] = ['',['RunCommissioning2023C','HLTDR3_2023','SKIMCOMMISSIONINGRUN3_reHLT_2023','HARVESTRUN3_2023']] +workflows[141.113] = ['',['RunCosmics2023C','HLTDR3_2023','SKIMCOSMICSRUN3_reHLT_2023','HARVESTRUN3_COS_2023']] +workflows[141.114] = ['',['RunParkingDoubleMuonLowMass2023C','HLTDR3_2023','SKIMPARKINGDOUBLEMUONLOWMASS0RUN3_reHLT_2023','HARVESTRUN3_2023']] + ### fastsim ### workflows[5.1] = ['TTbarFS', ['TTbarFS','HARVESTFS']] workflows[5.2] = ['SingleMuPt10FS', ['SingleMuPt10FS','HARVESTFS']] diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 1ce92559e428b..93a2a8098b108 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -588,7 +588,12 @@ steps['RunMuon2023C']={'INPUT':InputInfo(dataSet='/Muon0/Run2023C-v1/RAW',label='2023C',events=100000,location='STD', ls=Run2023C)} steps['RunZeroBias2023C']={'INPUT':InputInfo(dataSet='/ZeroBias/Run2023C-v1/RAW',label='2023C',events=100000,location='STD', ls=Run2023C)} steps['RunBTagMu2023C']={'INPUT':InputInfo(dataSet='/BTagMu/Run2023C-v1/RAW',label='2023C',events=100000,location='STD', ls=Run2023C)} +steps['RunNoBPTX2023C']={'INPUT':InputInfo(dataSet='/NoBPTX/Run2023C-v1/RAW',label='2023C',events=100000,location='STD', ls=Run2023C)} +steps['RunHcalNZS2023C']={'INPUT':InputInfo(dataSet='/HcalNZS/Run2023C-v1/RAW',label='2023C',events=100000,location='STD', ls=Run2023C)} +steps['RunHLTPhysics2023C']={'INPUT':InputInfo(dataSet='/HLTPhysics/Run2023C-v1/RAW',label='2023C',events=100000,location='STD', ls=Run2023C)} +steps['RunCommissioning2023C']={'INPUT':InputInfo(dataSet='/Commissioning/Run2023C-v1/RAW',label='2023C',events=100000,location='STD', ls=Run2023C)} steps['RunJetMET2023C']={'INPUT':InputInfo(dataSet='/JetMET1/Run2023C-v1/RAW',label='2023C',events=100000,location='STD', ls=Run2023C)} +steps['RunCosmics2023C']={'INPUT':InputInfo(dataSet='/Cosmics/Run2023C-v1/RAW',label='2023C',events=100000,location='STD', ls=Run2023C)} steps['RunDisplacedJet2023C']={'INPUT':InputInfo(dataSet='/DisplacedJet/Run2023C-v1/RAW',label='2023C',events=100000,location='STD', ls=Run2023C)} steps['RunEGamma2023C']={'INPUT':InputInfo(dataSet='/EGamma1/Run2023C-v1/RAW',label='2023C',events=100000,location='STD', ls=Run2023C)} steps['RunTau2023C']={'INPUT':InputInfo(dataSet='/Tau/Run2023C-v1/RAW',label='2023C',events=100000,location='STD', ls=Run2023C)} @@ -606,7 +611,6 @@ steps['RunMuonEG2023D']={'INPUT':InputInfo(dataSet='/MuonEG/Run2023D-v1/RAW',label='2023D',events=100000,location='STD', ls=Run2023D)} steps['RunParkingDoubleMuonLowMass2023D']={'INPUT':InputInfo(dataSet='/ParkingDoubleMuonLowMass0/Run2023D-v1/RAW',label='2023D',events=100000,location='STD', ls=Run2023D)} - # Highstat HLTPhysics Run2015DHS=selectedLS([258712,258713,258714,258741,258742,258745,258749,258750,259626,259637,259683,259685,259686,259721,259809,259810,259818,259820,259821,259822,259862,259890,259891]) steps['RunHLTPhy2015DHS']={'INPUT':InputInfo(dataSet='/HLTPhysics/Run2015D-v1/RAW',label='2015DHS',events=100000,location='STD', ls=Run2015DHS)} @@ -2607,17 +2611,6 @@ def lhegensim2018ml(fragment,howMuch): '-s':'RECO:bunchSpacingProducer+ecalMultiFitUncalibRecHitTask+ecalCalibratedRecHitTask', '--customise':'Calibration/EcalCalibAlgos/EcalPhiSymRecoSequence_cff'},dataReco]) -# Run-3 skims -for s in autoSkim.keys(): - steps['SKIM'+s.upper()+'RUN3_reHLT'] = {'-s':'SKIM:%s'%(autoSkim[s]), - '--data':'', - '--era':'Run3', - '--scenario':'pp', - '--conditions':'auto:run3_data_relval', - '--hltProcess':'reHLT'} - if 'Cosmics' in s: - steps['SKIM'+s.upper()+'RUN3_reHLT']['--scenario'] = 'cosmics' - # step1 gensim for HI mixing step1Up2018HiMixDefaults = merge ([{'--beamspot':'MatchHI', '--pileup':'HiMixGEN', '--scenario':'HeavyIons'},hiDefaults2018_ppReco,PUHI,step1Up2018HiProdDefaults]) def gen2018HiMix(fragment,howMuch): @@ -2915,6 +2908,25 @@ def gen2022HiMix(fragment,howMuch): steps['RECONANORUN3_ZB_reHLT_2023B']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,PAT,NANO,DQM:@rerecoZeroBias+@miniAODDQM+@nanoAODDQM'},steps['RECONANORUN3_reHLT_2023B']]) steps['RECONANORUN3_ZB_reHLT_2023']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,PAT,NANO,DQM:@rerecoZeroBias+@miniAODDQM+@nanoAODDQM'},steps['RECONANORUN3_reHLT_2023']]) +# Run-3 2022 skim +for s in autoSkim.keys(): + + if 'ZeroBias' in s: + steps['SKIM'+s.upper()+'RUN3_reHLT_2022'] = merge([{'-s':'RAW2DIGI,L1Reco,RECO,SKIM:%s,PAT,NANO,DQM:@rerecoZeroBiasFakeHLT+@miniAODDQM+@nanoAODDQM'%(autoSkim[s])},steps['RECONANORUN3_reHLT']]) + elif 'Cosmics' in s: + steps['SKIM'+s.upper()+'RUN3_reHLT_2022'] = merge([{'--scenario':'cosmics', '-s':'RAW2DIGI,L1Reco,RECO,SKIM:%s,DQM'%(autoSkim[s]), '--datatier':'RECO,DQMIO', '--eventcontent':'RECO,DQM'},steps['RECONANORUN3_reHLT']]) + else: + steps['SKIM'+s.upper()+'RUN3_reHLT_2022'] = merge([{'-s':'RAW2DIGI,L1Reco,RECO,SKIM:%s,PAT,NANO,DQM:@standardDQMFakeHLT+@miniAODDQM+@nanoAODDQM'%(autoSkim[s])},steps['RECONANORUN3_reHLT']]) + +# Run-3 2023 skim +for s in autoSkim.keys(): + + if 'ZeroBias' in s: + steps['SKIM'+s.upper()+'RUN3_reHLT_2023'] = merge([{'-s':'RAW2DIGI,L1Reco,RECO,SKIM:%s,PAT,NANO,DQM:@rerecoZeroBias+@miniAODDQM+@nanoAODDQM'%(autoSkim[s])},steps['RECONANORUN3_reHLT_2023']]) + elif 'Cosmics' in s: + steps['SKIM'+s.upper()+'RUN3_reHLT_2023'] = merge([{'--scenario':'cosmics', '-s':'RAW2DIGI,L1Reco,RECO,SKIM:%s,DQM'%(autoSkim[s]), '--datatier':'RECO,DQMIO', '--eventcontent':'RECO,DQM'},steps['RECONANORUN3_reHLT_2023']]) + else: + steps['SKIM'+s.upper()+'RUN3_reHLT_2023'] = merge([{'-s':'RAW2DIGI,L1Reco,RECO,SKIM:%s,PAT,NANO,DQM:@standardDQM+@miniAODDQM+@nanoAODDQM'%(autoSkim[s])},steps['RECONANORUN3_reHLT_2023']]) # mask away - to be removed once we'll migrate the matrix to be fully unscheduled for RECO step #steps['RECOmAOD']=merge([step3DefaultsUnsch]) @@ -3540,10 +3552,12 @@ def gen2022HiMix(fragment,howMuch): steps['HARVESTRUN3']=merge([{'--data':'', '-s':'HARVESTING:@standardDQMFakeHLT+@miniAODDQM+@nanoAODDQM','--era':'Run3'},steps['HARVESTDRUN3']]) steps['HARVESTRUN3_ZB']=merge([{'--data':'', '-s':'HARVESTING:@rerecoZeroBiasFakeHLT+@miniAODDQM+@nanoAODDQM','--era':'Run3'},steps['HARVESTDRUN3']]) +steps['HARVESTRUN3_COS']=merge([{'--data':'', '--scenario':'cosmics', '--era':'Run3', '-s':'HARVESTING:dqmHarvesting'},steps['HARVESTDRUN3']]) steps['HARVESTRUN3_2023']=merge([{'--era':'Run3_2023', '-s':'HARVESTING:@standardDQM+@miniAODDQM+@nanoAODDQM'},steps['HARVESTRUN3']]) steps['HARVESTRUN3_2023B']=merge([{'--era':'Run3', '-s':'HARVESTING:@standardDQM+@miniAODDQM+@nanoAODDQM'},steps['HARVESTRUN3']]) steps['HARVESTRUN3_ZB_2023B']=merge([{'--era':'Run3', '-s':'HARVESTING:@rerecoZeroBias+@miniAODDQM+@nanoAODDQM'},steps['HARVESTRUN3']]) steps['HARVESTRUN3_ZB_2023']=merge([{'--era':'Run3_2023', '-s':'HARVESTING:@rerecoZeroBias+@miniAODDQM+@nanoAODDQM'},steps['HARVESTRUN3']]) +steps['HARVESTRUN3_COS_2023']=merge([{'--scenario':'cosmics', '--era':'Run3_2023', '-s':'HARVESTING:dqmHarvesting'},steps['HARVESTRUN3']]) steps['HARVESTRUN3_pixelTrackingOnly'] = merge([ {'-s':'HARVESTING:@pixelTrackingOnlyDQM'}, steps['HARVESTRUN3'] ]) steps['HARVESTRUN3_ECALOnly'] = merge([ {'-s':'HARVESTING:@ecal'}, steps['HARVESTRUN3'] ]) diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index 6810f4fadb8b1..95187e1c975c1 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -2524,7 +2524,7 @@ def condition(self, fragment, stepList, key, hasHarvest): 'Geom' : 'DB:Extended', 'GT' : 'auto:phase1_2023_realistic', 'HLTmenu': '@relval2023', - 'Era' : 'Run3_FastSim', + 'Era' : 'Run3_2023_FastSim', 'BeamSpot': 'Realistic25ns13p6TeVEarly2023Collision', 'ScenToRun' : ['Gen','FastSimRun3','HARVESTFastRun3'], }, diff --git a/Configuration/Skimming/python/autoSkim.py b/Configuration/Skimming/python/autoSkim.py index 5d5b8dae2ee7c..610501b1031c6 100644 --- a/Configuration/Skimming/python/autoSkim.py +++ b/Configuration/Skimming/python/autoSkim.py @@ -5,8 +5,8 @@ 'DisplacedJet' : 'EXODisplacedJet+EXODelayedJet+EXODTCluster+EXOLLPJetHCAL+LogError+LogErrorMonitor', 'JetMET0' : 'JetHTJetPlusHOFilter+EXOHighMET+EXODelayedJetMET+EXODisappTrk+LogError+LogErrorMonitor', 'JetMET1' : 'JetHTJetPlusHOFilter+EXOHighMET+EXODelayedJetMET+EXODisappTrk+LogError+LogErrorMonitor', - 'EGamma0':'ZElectron+WElectron+EXOMONOPOLE+EXODisappTrk+LogError+LogErrorMonitor', - 'EGamma1':'ZElectron+WElectron+EXOMONOPOLE+EXODisappTrk+LogError+LogErrorMonitor', + 'EGamma0':'ZElectron+WElectron+EXOMONOPOLE+EXODisappTrk+IsoPhotonEB+LogError+LogErrorMonitor', + 'EGamma1':'ZElectron+WElectron+EXOMONOPOLE+EXODisappTrk+IsoPhotonEB+LogError+LogErrorMonitor', 'Tau' : 'EXODisappTrk+LogError+LogErrorMonitor', 'Muon0' : 'ZMu+EXODisappTrk+EXOCSCCluster+EXODisappMuon+LogError+LogErrorMonitor', 'Muon1' : 'ZMu+EXODisappTrk+EXOCSCCluster+EXODisappMuon+LogError+LogErrorMonitor', diff --git a/Configuration/StandardSequences/python/Eras.py b/Configuration/StandardSequences/python/Eras.py index 9b1fc2834eacb..a0127e776977b 100644 --- a/Configuration/StandardSequences/python/Eras.py +++ b/Configuration/StandardSequences/python/Eras.py @@ -41,6 +41,7 @@ def __init__(self): 'Run3_dd4hep', 'Run3_DDD', 'Run3_FastSim', + 'Run3_2023_FastSim', 'Phase2', 'Phase2C9', 'Phase2C10', diff --git a/DPGAnalysis/Skims/python/WElectronSkim_cff.py b/DPGAnalysis/Skims/python/WElectronSkim_cff.py index 1d31286b028d0..139c6fb9e4836 100644 --- a/DPGAnalysis/Skims/python/WElectronSkim_cff.py +++ b/DPGAnalysis/Skims/python/WElectronSkim_cff.py @@ -104,10 +104,21 @@ hltTags = cms.untracked.string( HLTPath ), triggerEventTag = cms.untracked.InputTag("hltTriggerSummaryAOD","",HLTProcessName), triggerResultsTag = cms.untracked.InputTag("TriggerResults","",HLTProcessName), - stageL1Trigger = cms.uint32(1) + stageL1Trigger = cms.uint32(1), + # Stage-1 L1T inputs + l1GtRecordInputTag = cms.InputTag('gtDigis'), + l1GtReadoutRecordInputTag = cms.InputTag('gtDigis'), ) from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger -stage2L1Trigger.toModify(PassingHLT, stageL1Trigger = 2) +stage2L1Trigger.toModify(PassingHLT, + stageL1Trigger = 2, + # Stage-2 L1T inputs + l1tAlgBlkInputTag = cms.InputTag('gtStage2Digis'), + l1tExtBlkInputTag = cms.InputTag('gtStage2Digis'), + # remove Stage-1 L1T inputs + l1GtRecordInputTag = None, + l1GtReadoutRecordInputTag = None, +) ## _____ ____ __ _ _ _ _ ## |_ _|_ _ __ _ | _ \ ___ / _(_)_ __ (_) |_(_) ___ _ __ diff --git a/EventFilter/CTPPSRawToDigi/interface/CTPPSPixelDataFormatter.h b/EventFilter/CTPPSRawToDigi/interface/CTPPSPixelDataFormatter.h index 1f8d0d0b89b2f..993d1683342d4 100644 --- a/EventFilter/CTPPSRawToDigi/interface/CTPPSPixelDataFormatter.h +++ b/EventFilter/CTPPSRawToDigi/interface/CTPPSPixelDataFormatter.h @@ -42,6 +42,8 @@ #include "EventFilter/CTPPSRawToDigi/interface/ElectronicIndex.h" #include "FWCore/Utilities/interface/typedefs.h" +#include "EventFilter/CTPPSRawToDigi/interface/CTPPSPixelErrorSummary.h" + #include #include #include @@ -65,7 +67,7 @@ class CTPPSPixelDataFormatter { typedef std::unordered_map Digis; - CTPPSPixelDataFormatter(std::map const& mapping); + CTPPSPixelDataFormatter(std::map const& mapping, CTPPSPixelErrorSummary&); void setErrorStatus(bool theErrorStatus); @@ -94,6 +96,8 @@ class CTPPSPixelDataFormatter { return a.id < b.id || (a.id == b.id && a.roc < b.roc); } + void printErrorSummary() const { m_ErrorSummary.printSummary(); } + private: int m_WordCounter; @@ -113,6 +117,7 @@ class CTPPSPixelDataFormatter { int m_allDetDigis; int m_hasDetDigis; CTPPSPixelIndices m_Indices; + CTPPSPixelErrorSummary& m_ErrorSummary; }; #endif diff --git a/EventFilter/CTPPSRawToDigi/interface/CTPPSPixelErrorSummary.h b/EventFilter/CTPPSRawToDigi/interface/CTPPSPixelErrorSummary.h new file mode 100644 index 0000000000000..9c314cc3d1ba8 --- /dev/null +++ b/EventFilter/CTPPSRawToDigi/interface/CTPPSPixelErrorSummary.h @@ -0,0 +1,21 @@ +#ifndef EventFilter_CTPPSRawToDigi_CTPPSPixelErrorSummary +#define EventFilter_CTPPSRawToDigi_CTPPSPixelErrorSummary + +#include +#include + +class CTPPSPixelErrorSummary { +public: + CTPPSPixelErrorSummary(const std::string& category, const std::string& name, bool debug = false) + : m_debug(debug), m_category(category), m_name(name) {} + + void add(const std::string& message, const std::string& details = ""); + void printSummary() const; + +private: + bool m_debug; + std::string m_category; + std::string m_name; + std::map m_errors; +}; +#endif diff --git a/EventFilter/CTPPSRawToDigi/interface/CTPPSPixelRawToDigi.h b/EventFilter/CTPPSRawToDigi/interface/CTPPSPixelRawToDigi.h index 679638680fec1..a119bd3be4ea9 100644 --- a/EventFilter/CTPPSRawToDigi/interface/CTPPSPixelRawToDigi.h +++ b/EventFilter/CTPPSRawToDigi/interface/CTPPSPixelRawToDigi.h @@ -15,6 +15,7 @@ #include "CondFormats/DataRecord/interface/CTPPSPixelDAQMappingRcd.h" #include "CondFormats/PPSObjects/interface/CTPPSPixelDAQMapping.h" +#include "EventFilter/CTPPSRawToDigi/interface/CTPPSPixelErrorSummary.h" #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h" #include "FWCore/Framework/interface/ConsumesCollector.h" @@ -30,6 +31,8 @@ class CTPPSPixelRawToDigi : public edm::stream::EDProducer<> { /// get data, convert to digis attach againe to Event void produce(edm::Event&, const edm::EventSetup&) override; + void endStream() override; + private: edm::ParameterSet config_; @@ -43,6 +46,8 @@ class CTPPSPixelRawToDigi : public edm::stream::EDProducer<> { std::string mappingLabel_; + CTPPSPixelErrorSummary eSummary_; + bool includeErrors_; bool isRun3_; }; diff --git a/EventFilter/CTPPSRawToDigi/plugins/CTPPSPixelDigiToRaw.cc b/EventFilter/CTPPSRawToDigi/plugins/CTPPSPixelDigiToRaw.cc index 2f2409c179fa1..4f51f4de5f134 100644 --- a/EventFilter/CTPPSRawToDigi/plugins/CTPPSPixelDigiToRaw.cc +++ b/EventFilter/CTPPSRawToDigi/plugins/CTPPSPixelDigiToRaw.cc @@ -52,6 +52,7 @@ Description: [one line class summary] #include "CondFormats/DataRecord/interface/CTPPSPixelDAQMappingRcd.h" #include "CondFormats/PPSObjects/interface/CTPPSPixelDAQMapping.h" #include "CondFormats/PPSObjects/interface/CTPPSPixelFramePosition.h" +#include "EventFilter/CTPPSRawToDigi/interface/CTPPSPixelErrorSummary.h" #include "FWCore/PluginManager/interface/ModuleDef.h" #include "FWCore/Framework/interface/MakerMacros.h" @@ -82,6 +83,7 @@ class CTPPSPixelDigiToRaw : public edm::stream::EDProducer<> { edm::ESGetToken tCTPPSPixelDAQMapping_; std::vector v_iDdet2fed_; CTPPSPixelFramePosition fPos_; + CTPPSPixelErrorSummary eSummary_; bool isRun3_; }; @@ -101,7 +103,8 @@ CTPPSPixelDigiToRaw::CTPPSPixelDigiToRaw(const edm::ParameterSet& iConfig) allDigiCounter_(0), allWordCounter_(0), debug_(false), - mappingLabel_(iConfig.getParameter("mappingLabel")) { + mappingLabel_(iConfig.getParameter("mappingLabel")), + eSummary_("CTPPSPixelDataFormatter", "[ctppsPixelRawToDigi]", false) { //register your products tCTPPSPixelDigi_ = consumes>(iConfig.getParameter("InputLabel")); tCTPPSPixelDAQMapping_ = esConsumes(); @@ -145,7 +148,7 @@ void CTPPSPixelDigiToRaw::produce(edm::Event& iEvent, const edm::EventSetup& iSe p.second.iD, p.second.roc, p.first.getROC(), p.first.getFEDId(), p.first.getChannelIdx()}); fedIds_ = mapping->fedIds(); - CTPPSPixelDataFormatter formatter(mapping->ROCMapping); + CTPPSPixelDataFormatter formatter(mapping->ROCMapping, eSummary_); // create product (raw data) auto buffers = std::make_unique(); diff --git a/EventFilter/CTPPSRawToDigi/plugins/CTPPSPixelRawToDigi.cc b/EventFilter/CTPPSRawToDigi/plugins/CTPPSPixelRawToDigi.cc index 9856c37e728cf..972732c703f08 100644 --- a/EventFilter/CTPPSRawToDigi/plugins/CTPPSPixelRawToDigi.cc +++ b/EventFilter/CTPPSRawToDigi/plugins/CTPPSPixelRawToDigi.cc @@ -22,7 +22,8 @@ using namespace std; CTPPSPixelRawToDigi::CTPPSPixelRawToDigi(const edm::ParameterSet& conf) - : config_(conf) + : config_(conf), + eSummary_("CTPPSPixelDataFormatter", "[ctppsPixelRawToDigi]", edm::isDebugEnabled()) { FEDRawDataCollection_ = consumes(config_.getParameter("inputLabel")); @@ -76,7 +77,7 @@ void CTPPSPixelRawToDigi::produce(edm::Event& ev, const edm::EventSetup& es) { fedIds_ = mapping->fedIds(); - CTPPSPixelDataFormatter formatter(mapping->ROCMapping); + CTPPSPixelDataFormatter formatter(mapping->ROCMapping, eSummary_); formatter.setErrorStatus(includeErrors_); bool errorsInEvent = false; @@ -121,4 +122,6 @@ void CTPPSPixelRawToDigi::produce(edm::Event& ev, const edm::EventSetup& es) { } } +void CTPPSPixelRawToDigi::endStream() { eSummary_.printSummary(); } + DEFINE_FWK_MODULE(CTPPSPixelRawToDigi); diff --git a/EventFilter/CTPPSRawToDigi/src/CTPPSPixelDataFormatter.cc b/EventFilter/CTPPSRawToDigi/src/CTPPSPixelDataFormatter.cc index f3cdd52e924e4..b276d540c5590 100644 --- a/EventFilter/CTPPSRawToDigi/src/CTPPSPixelDataFormatter.cc +++ b/EventFilter/CTPPSRawToDigi/src/CTPPSPixelDataFormatter.cc @@ -37,8 +37,13 @@ namespace { } // namespace -CTPPSPixelDataFormatter::CTPPSPixelDataFormatter(std::map const& mapping) - : m_WordCounter(0), m_Mapping(mapping) { +CTPPSPixelDataFormatter::CTPPSPixelDataFormatter(std::map const& mapping, + CTPPSPixelErrorSummary& eSummary) + : m_WordCounter(0), + m_Mapping(mapping), + m_ErrorSummary(eSummary) + +{ int s32 = sizeof(Word32); int s64 = sizeof(Word64); int s8 = sizeof(char); @@ -166,14 +171,16 @@ void CTPPSPixelDataFormatter::interpretRawData( if (mit == m_Mapping.end()) { if (nlink >= maxLinkIndex) { m_ErrorCheck.conversionError(fedId, iD, InvalidLinkId, ww, errors); - edm::LogError("CTPPSPixelDataFormatter") << " Invalid linkId "; + + m_ErrorSummary.add("Invalid linkId", ""); } else if ((nroc - 1) >= maxRocIndex) { m_ErrorCheck.conversionError(fedId, iD, InvalidROCId, ww, errors); - edm::LogError("CTPPSPixelDataFormatter") - << " Invalid ROC Id " << convroc << " in nlink " << nlink << " of FED " << fedId << " in DetId " << iD; + m_ErrorSummary.add("Invalid ROC", + fmt::format("Id {0}, in link {1}, of FED {2} in DetId {3}", convroc, nlink, fedId, iD)); + } else { m_ErrorCheck.conversionError(fedId, iD, Unknown, ww, errors); - edm::LogError("CTPPSPixelDataFormatter") << " Error unknown "; + m_ErrorSummary.add("Error unknown"); } skipROC = true; // skipping roc due to mapping errors continue; @@ -201,19 +208,32 @@ void CTPPSPixelDataFormatter::interpretRawData( int row = (ww >> m_ROW_shift) & m_ROW_mask; if (!isRun3 && (dcol < min_Dcol || dcol > max_Dcol || pxid < min_Pixid || pxid > max_Pixid)) { - edm::LogError("CTPPSPixelDataFormatter") - << " unphysical dcol and/or pxid " - << "fedId=" << fedId << " nllink=" << nlink << " convroc=" << convroc << " adc=" << adc << " dcol=" << dcol - << " pxid=" << pxid << " detId=" << iD; + m_ErrorSummary.add( + "unphysical dcol and/or pxid", + fmt::format("fedId= {0}, nllink= {1}, convroc= {2}, adc= {3}, dcol= {4}, pxid= {5}, detId= {6}", + fedId, + nlink, + convroc, + adc, + dcol, + pxid, + iD)); m_ErrorCheck.conversionError(fedId, iD, InvalidPixelId, ww, errors); continue; } if (isRun3 && (col < min_COL || col > max_COL || row < min_ROW || row > max_ROW)) { - edm::LogError("CTPPSPixelDataFormatter") << " unphysical col and/or row " - << "fedId=" << fedId << " nllink=" << nlink << " convroc=" << convroc - << " adc=" << adc << " col=" << col << " row=" << row << " detId=" << iD; + m_ErrorSummary.add("unphysical col and/or row", + fmt::format("fedId= {0}, nllink= {1}, convroc= {2}, adc= {3}, col= {4}, row= {5}, detId= {6}", + fedId, + nlink, + convroc, + adc, + col, + row, + iD)); + m_ErrorCheck.conversionError(fedId, iD, InvalidPixelId, ww, errors); continue; diff --git a/EventFilter/CTPPSRawToDigi/src/CTPPSPixelErrorSummary.cc b/EventFilter/CTPPSRawToDigi/src/CTPPSPixelErrorSummary.cc new file mode 100644 index 0000000000000..dc968ed0bc1a5 --- /dev/null +++ b/EventFilter/CTPPSRawToDigi/src/CTPPSPixelErrorSummary.cc @@ -0,0 +1,31 @@ +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "EventFilter/CTPPSRawToDigi/interface/CTPPSPixelErrorSummary.h" +#include +#include + +void CTPPSPixelErrorSummary::add(const std::string& message, const std::string& details) { + const auto eIt = m_errors.find(message); + if (eIt == m_errors.end()) { + m_errors.emplace(message, 1); + edm::LogError(m_category) << message << ": " << details + << (m_debug ? "" + : "\nNote: further warnings of this type will be suppressed (this can be " + "changed by enabling debugging printout)"); + } else { + ++(eIt->second); + if (m_debug) { + edm::LogError(m_category) << message << ": " << details; + } + } +} + +void CTPPSPixelErrorSummary::printSummary() const { + if (!m_errors.empty()) { + std::stringstream message; + message << m_name << " errors:"; + for (const auto& warnAndCount : m_errors) { + message << std::endl << warnAndCount.first << " (" << warnAndCount.second << ")"; + } + edm::LogError(m_category) << message.str(); + } +} diff --git a/EventFilter/EcalRawToDigi/plugins/UnpackGPU.cu b/EventFilter/EcalRawToDigi/plugins/UnpackGPU.cu index b80831e104f84..2ba5c508c588b 100644 --- a/EventFilter/EcalRawToDigi/plugins/UnpackGPU.cu +++ b/EventFilter/EcalRawToDigi/plugins/UnpackGPU.cu @@ -272,32 +272,57 @@ namespace ecal { // get the next channel coordinates uint32_t nchannels = (block_length - 1) / 3; + bool bad_block = false; + __shared__ uint32_t ch_with_bad_block; // 1 threads per channel in this block for (uint32_t ich = 0; ich < nchannels; ich += NTHREADS) { auto const i_to_access = ich + threadIdx.x; - // threads outside of the range -> leave the loop - if (i_to_access >= nchannels) - break; + if (i_to_access == 0) { + ch_with_bad_block = std::numeric_limits::max(); + } - // inc the channel's counter and get the pos where to store - auto const wdata = current_tower_block[1 + i_to_access * 3]; - uint8_t const stripid = wdata & 0x7; - uint8_t const xtalid = (wdata >> 4) & 0x7; + // make sure the shared memory is initialised for all threads + __syncthreads(); - // check if the stripid and xtalid are in the allowed range and if not skip the rest of the block - if (stripid < ElectronicsIdGPU::MIN_STRIPID || stripid > ElectronicsIdGPU::MAX_STRIPID || - xtalid < ElectronicsIdGPU::MIN_XTALID || xtalid > ElectronicsIdGPU::MAX_XTALID) { - break; - } - if (ich > 0 || threadIdx.x > 0) { - // check if the stripid has increased or that the xtalid has increased from the previous data word. If not something is wrong and the rest of the block is skipped. - auto const prev_i_to_access = ich + threadIdx.x - 1; - auto const prevwdata = current_tower_block[1 + prev_i_to_access * 3]; - uint8_t const laststripid = prevwdata & 0x7; - uint8_t const lastxtalid = (prevwdata >> 4) & 0x7; - if ((stripid == laststripid && xtalid <= lastxtalid) || (stripid < laststripid)) { - break; + uint64_t wdata; + uint8_t stripid; + uint8_t xtalid; + + // threads must be inside the range (no break here because of __syncthreads() afterwards) + if (i_to_access < nchannels && i_to_access < ch_with_bad_block) { + // inc the channel's counter and get the pos where to store + wdata = current_tower_block[1 + i_to_access * 3]; + stripid = wdata & 0x7; + xtalid = (wdata >> 4) & 0x7; + + // check if the stripid and xtalid are in the allowed range and if not skip the rest of the block + if (stripid < ElectronicsIdGPU::MIN_STRIPID || stripid > ElectronicsIdGPU::MAX_STRIPID || + xtalid < ElectronicsIdGPU::MIN_XTALID || xtalid > ElectronicsIdGPU::MAX_XTALID) { + bad_block = true; } + if (i_to_access > 0) { + // check if the stripid has increased or that the xtalid has increased from the previous data word. If not something is wrong and the rest of the block is skipped. + auto const prev_i_to_access = i_to_access - 1; + auto const prevwdata = current_tower_block[1 + prev_i_to_access * 3]; + uint8_t const laststripid = prevwdata & 0x7; + uint8_t const lastxtalid = (prevwdata >> 4) & 0x7; + if ((stripid == laststripid && xtalid <= lastxtalid) || (stripid < laststripid)) { + bad_block = true; + } + } + } + + // check if this thread has the lowest bad block + if (bad_block && i_to_access < ch_with_bad_block) { + atomicMin(&ch_with_bad_block, i_to_access); + } + + // make sure that all threads that have to have set the ch_with_bad_block shared memory + __syncthreads(); + + // threads outside of the range or bad block detected in this thread or one working on a lower block -> stop this loop iteration here + if (i_to_access >= nchannels || i_to_access >= ch_with_bad_block) { + continue; } ElectronicsIdGPU eid{fed2dcc(fed), ttid, stripid, xtalid}; diff --git a/GeneratorInterface/Pythia8Interface/plugins/EmissionVetoHook1.cc b/GeneratorInterface/Pythia8Interface/plugins/EmissionVetoHook1.cc index 342ba7c2d149d..23f59946d1bee 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/EmissionVetoHook1.cc +++ b/GeneratorInterface/Pythia8Interface/plugins/EmissionVetoHook1.cc @@ -442,7 +442,7 @@ bool EmissionVetoHook1::doVetoFSREmission(int, const Pythia8::Event &e, int iSys return false; // only use for outside resonance vetos in combination with bb4l:FSREmission:veto - if (!inResonance && settingsPtr->flag("POWHEG:bb4l:FSREmission:veto") == 1) + if (inResonance && settingsPtr->flag("POWHEG:bb4l:FSREmission:veto") == 1) return false; // If we already have accepted 'vetoCount' emissions in a row, do nothing diff --git a/HeterogeneousCore/AlpakaInterface/interface/CachingAllocator.h b/HeterogeneousCore/AlpakaInterface/interface/CachingAllocator.h index dfda1ee3d7e24..e42c0df623f1d 100644 --- a/HeterogeneousCore/AlpakaInterface/interface/CachingAllocator.h +++ b/HeterogeneousCore/AlpakaInterface/interface/CachingAllocator.h @@ -82,9 +82,7 @@ namespace cms::alpakatools { * - the `Queue` type can be either `Sync` _or_ `Async` on any allocation. */ - template and alpaka::isQueue>> + template class CachingAllocator { public: #ifdef ALPAKA_ACC_GPU_CUDA_ENABLED @@ -106,6 +104,8 @@ namespace cms::alpakatools { using Buffer = alpaka::Buf, size_t>; // The "memory device" type can either be the same as the "synchronisation device" type, or be the host CPU. + static_assert(alpaka::isDevice, "TDev should be an alpaka Device type."); + static_assert(alpaka::isQueue, "TQueue should be an alpaka Queue type."); static_assert(std::is_same_v> or std::is_same_v, "The \"memory device\" type can either be the same as the \"synchronisation device\" type, or be the " "host CPU."); diff --git a/RecoTracker/TkTrackingRegions/plugins/PixelInactiveAreaFinder.cc b/RecoTracker/TkTrackingRegions/plugins/PixelInactiveAreaFinder.cc index 13365df6e9fed..78263d106ee29 100644 --- a/RecoTracker/TkTrackingRegions/plugins/PixelInactiveAreaFinder.cc +++ b/RecoTracker/TkTrackingRegions/plugins/PixelInactiveAreaFinder.cc @@ -559,6 +559,10 @@ PixelInactiveAreaFinder::InactiveAreas PixelInactiveAreaFinder::inactiveAreas(co // assign data to instance variables updatePixelDets(iSetup); + + // clear the list of bad pixel modules at each event! + badPixelDetsBarrel_.clear(); + badPixelDetsEndcap_.clear(); getBadPixelDets(iEvent, iSetup); //write files for plotting