Skip to content

Commit

Permalink
Merge branch 'CMSSW_14_1_X' into PbPbSkims2024_141X
Browse files Browse the repository at this point in the history
  • Loading branch information
flodamas authored Oct 31, 2024
2 parents 60b4943 + 7e9ad97 commit 20891cb
Show file tree
Hide file tree
Showing 77 changed files with 32,356 additions and 9,106 deletions.
73 changes: 71 additions & 2 deletions Configuration/Geometry/python/dict2021Geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1459,6 +1459,75 @@
],
"era" : "run3_HB",
},
"C3" : {
1 : [
'Geometry/EcalCommonData/data/ebcon/2021/v1/ebcon.xml',
'Geometry/EcalCommonData/data/eecon.xml',
'Geometry/EcalCommonData/data/escon.xml',
'Geometry/EcalCommonData/data/eregalgo/2017/v1/eregalgo.xml',
'Geometry/EcalCommonData/data/ebalgo.xml',
'Geometry/EcalCommonData/data/ebrot.xml',
'Geometry/EcalCommonData/data/eefixed/2021/v1/eefixed.xml',
'Geometry/EcalCommonData/data/eehier.xml',
'Geometry/EcalCommonData/data/eealgo.xml',
'Geometry/EcalCommonData/data/esalgo.xml',
'Geometry/EcalCommonData/data/eeF.xml',
'Geometry/EcalCommonData/data/eeB.xml',
'Geometry/EcalCommonData/data/ectkcable.xml',
'Geometry/HcalCommonData/data/hcalrotations.xml',
'Geometry/HcalCommonData/data/hcal/PhaseI/hcalalgo.xml',
'Geometry/HcalCommonData/data/hcalcablealgo.xml',
'Geometry/HcalCommonData/data/hcalbarrelalgo.xml',
'Geometry/HcalCommonData/data/hcalendcap/PhaseI/hcalendcapalgo.xml',
'Geometry/HcalCommonData/data/hcalouteralgo/v1/hcalouteralgo.xml',
'Geometry/HcalCommonData/data/hcalforwardalgo.xml',
'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml',
'Geometry/HcalCommonData/data/hcalSimNumbering/2021/v1/hcalSimNumbering.xml',
'Geometry/HcalCommonData/data/hcalRecNumbering/2021/v3/hcalRecNumbering.xml',
],
3 : [
'Geometry/EcalSimData/data/ecalsens.xml',
'Geometry/HcalCommonData/data/hcalsens/2021/v2/hcalsenspmf.xml',
'Geometry/HcalSimData/data/hf.xml',
'Geometry/HcalSimData/data/hfpmt.xml',
'Geometry/HcalSimData/data/hffibrebundle.xml',
'Geometry/HcalSimData/data/CaloUtil/2021/v1/CaloUtil.xml',
],
4 : [
'Geometry/HcalSimData/data/HcalProdCuts/2021/v2/HcalProdCuts.xml',
'Geometry/EcalSimData/data/EcalProdCuts.xml',
'Geometry/EcalSimData/data/ESProdCuts.xml',
],
"sim" : [
'from Geometry.EcalCommonData.ecalSimulationParameters_cff import *',
'from Geometry.HcalCommonData.hcalDDDSimConstants_cff import *',
'from Geometry.ForwardGeometry.zdcTopologyEP_cfi import *',
],
"reco" : [
'from Geometry.CaloEventSetup.CaloTopology_cfi import *',
'from Geometry.CaloEventSetup.CaloGeometryBuilder_cfi import *',
'CaloGeometryBuilder = cms.ESProducer("CaloGeometryBuilder",',
' SelectedCalos = cms.vstring("HCAL",',
' "ZDC",',
' "EcalBarrel",',
' "EcalEndcap",',
' "EcalPreshower",',
' "TOWER",',
' )',
')',
'from Geometry.EcalAlgo.EcalGeometry_cfi import *',
'from Geometry.HcalEventSetup.HcalGeometry_cfi import *',
'from Geometry.HcalEventSetup.CaloTowerGeometry_cfi import *',
'from Geometry.HcalEventSetup.CaloTowerTopology_cfi import *',
'from Geometry.HcalCommonData.hcalDDDRecConstants_cfi import *',
'from Geometry.HcalEventSetup.hcalTopologyIdeal_cfi import *',
'from Geometry.ForwardGeometry.ForwardGeometry_cfi import *',
'from Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi import *',
'from Geometry.EcalMapping.EcalMapping_cfi import *',
'from Geometry.EcalMapping.EcalMappingRecord_cfi import *',
],
"era" : "run3_HB",
},
}

muonDict = {
Expand Down Expand Up @@ -1859,13 +1928,13 @@
allDicts = [ commonDict, trackerDict, caloDict, muonDict, forwardDict, ppsDict ]

detectorVersionDict = {
("O6","T3","C1","M1","F1","P7") : "2021",
("O6","T3","C3","M1","F1","P7") : "2021",
("O4","T4","C1","M1","F1","P7") : "2021ZeroMaterial",
("O5","T5","C1","M1","F1","P7") : "2021FlatMinus05Percent",
("O5","T6","C1","M1","F1","P7") : "2021FlatMinus10Percent",
("O5","T7","C1","M1","F1","P7") : "2021FlatPlus05Percent",
("O5","T8","C1","M1","F1","P7") : "2021FlatPlus10Percent",
("O6","T3","C1","M2","F3","P7") : "2023",
("O6","T3","C2","M2","F3","P7") : "2023",
("O4","T4","C1","M2","F2","P7") : "2023ZeroMaterial",
("O5","T5","C1","M2","F2","P7") : "2023FlatMinus05Percent",
("O5","T6","C1","M2","F2","P7") : "2023FlatMinus10Percent",
Expand Down
4 changes: 4 additions & 0 deletions Configuration/PyReleaseValidation/python/relval_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -4352,6 +4352,10 @@ def gen2024HiMix(fragment,howMuch):
defaultDataSets['2026D98']='CMSSW_13_2_0_pre1-131X_mcRun4_realistic_v5_2026D98noPU-v'
defaultDataSets['2026D110']='CMSSW_14_1_0_pre5-140X_mcRun4_realistic_v4_RegeneratedGS_2026D110_noPU-v'

## HIN
defaultDataSets['2023HIN']='CCMSSW_14_1_0-PU_140X_mcRun3_2023_realistic_HI_v4_STD_2023HIN_PU-v'
defaultDataSets['2024HIN']='CMSSW_14_1_0-PU_141X_mcRun3_2024_realistic_HI_v5_STD_2024HIN_PU-v'

puDataSets = {}
for key, value in defaultDataSets.items(): puDataSets[key+'PU'] = value
defaultDataSets.update(puDataSets)
Expand Down
2 changes: 2 additions & 0 deletions Configuration/PyReleaseValidation/scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,3 +389,5 @@ And Heavy Ion workflows:
| | | | | |
| 158.01 | RelValHydjetQ_B12_5020GeV_2018_ppReco (reMINIAOD) | phase1_2018_realistic_hi | Run2_2018_pp_on_AA | (HI MC with pp-like reco) |
| 312.0 | Pyquen_ZeemumuJets_pt10_2760GeV | phase1_2022_realistic_hi | Run3_pp_on_PbPb | PU = HiMixGEN |
| 322.0 | Pyquen_ZeemumuJets_pt10_5362GeV_2023 | phase1_2023_realistic_hi | Run3_pp_on_PbPb_2023 | PU = HiMixGEN |
| 332.0 | Pyquen_ZeemumuJets_pt10_5362GeV_2024 | phase1_2024_realistic_hi | Run3_pp_on_PbPb_2024 | PU = HiMixGEN |
6 changes: 4 additions & 2 deletions Configuration/PyReleaseValidation/scripts/runTheMatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ def runSelected(opt):
# Run2
140.56, # HIRun2018A HIHardProbes Run2_2018_pp_on_AA
## MC
312.0, # Pyquen_ZeemumuJets_pt10_2760GeV PU : HiMixGEN

# Run3
312.0, # Pyquen_ZeemumuJets_pt10_2760GeV 2022 PU : HiMixGEN
322.0, # Pyquen_ZeemumuJets_pt10_5362GeV_2023 2023 PU : HiMixGEN
332.0, # Pyquen_ZeemumuJets_pt10_5362GeV_2024 2024 PU : HiMixGEN
],
'jetmc': [5.1, 13, 15, 25, 38, 39], #MC
'metmc' : [5.1, 15, 25, 37, 38, 39], #MC
Expand Down
8 changes: 3 additions & 5 deletions Configuration/PyReleaseValidation/test/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@
environment variable CMSSW_MC_SETUP_TEST_CATCH_HLT.
-->

<!-- In CMSSW_13_0_18 the auto:phase1_2023_realistic (pre BPix) is 130X_mcRun3_2023_realistic_postBPix_v1 -->
<ifarchitecture name="el8_amd64">
<!-- Run this test for production arch of CMSSW_13_0_19_HLT release only -->
<test name="test_MC_23_setup" command="CMSSW_MC_SETUP_TEST_CATCH_HLT=0 ${CMSSW_BASE}/src/Configuration/PyReleaseValidation/test/test_mc_setup/test_MC_setup.sh auto:phase1_2023_realistic Run3_2023 2023v12 CMSSW_13_0_19_HLT 130X_mcRun3_2023_realistic_v13 Realistic25ns13p6TeVEarly2023Collision" />
<test name="test_MC_23_setup" command="CMSSW_MC_SETUP_TEST_CATCH_HLT=0 ${CMSSW_BASE}/src/Configuration/PyReleaseValidation/test/test_mc_setup/test_MC_setup.sh auto:phase1_2023_realistic Run3_2023 2023v12 CMSSW_13_0_19_HLT 130X_mcRun3_2023_realistic_HLT_forReMC_v2 Realistic25ns13p6TeVEarly2023Collision" />
</ifarchitecture>

<!-- In CMSSW_12_4_20 the auto:phase1_2022_realistic (pre EE) is 124X_mcRun3_2022_realistic_v12 -->
<ifarchitecture name="el8_amd64">
<!-- Run this test for production arch of CMSSW_12_4_21_HLT release only -->
<test name="test_MC_22_setup" command="test_mc_setup/test_MC_setup.sh auto:phase1_2022_realistic Run3 2022v14 CMSSW_12_4_21_HLT 124X_mcRun3_2022_realistic_v12 Realistic25ns13p6TeVEarly2022Collision" />
<!-- Run this test for production arch of CMSSW_12_4_22_HLT release only -->
<test name="test_MC_22_setup" command="CMSSW_MC_SETUP_TEST_CATCH_HLT=0 ${CMSSW_BASE}/src/Configuration/PyReleaseValidation/test/test_mc_setup/test_MC_setup.sh auto:phase1_2022_realistic Run3 2022v15 CMSSW_12_4_22_HLT 124X_mcRun3_2022_realistic_HLT_forReMC_v5 Realistic25ns13p6TeVEarly2022Collision" />
</ifarchitecture>

<!--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,18 @@ era=$3

#export SCRAM_ARCH=$scram_arch

echo '> Running RAW2DIGI,L1Reco,RECO,RECOSIM + PAT steps in ' $release
echo '> Running RAW2DIGI,L1Reco,RECO,RECOSIM + PAT steps reading input generated in ' $release

# Check if release matches the pattern "CMSSW_12_4_*_HLT"
if [[ $release == CMSSW_12_4_*_HLT ]]; then
echo "Release matches CMSSW_12_4_*_HLT, adding customisation for fixReading_12_4_X_Files"
customise_flag="IOPool/Input/fixReading_12_4_X_Files.fixReading_12_4_X_Files, Configuration/DataProcessing/Utils.addMonitoring"
else
customise_flag="Configuration/DataProcessing/Utils.addMonitoring"
fi

cmsDriver.py --python_filename reco.py --eventcontent AODSIM \
--customise Configuration/DataProcessing/Utils.addMonitoring \
--customise $customise_flag \
--datatier AODSIM --fileout file:step4.root \
--conditions $conditions --step RAW2DIGI,L1Reco,RECO,RECOSIM \
--geometry DB:Extended --filein file:step3.root --era $era \
Expand Down
27 changes: 27 additions & 0 deletions Configuration/Skimming/python/PbPb_HighPtJets_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import FWCore.ParameterSet.Config as cms

# HLT PU-subtracted AK4 Calo. Jet trigger, highest threshold w/ full eta coverage
import HLTrigger.HLTfilters.hltHighLevel_cfi
hltPbPbHighPtJet = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone()
hltPbPbHighPtJet.HLTPaths = ["HLT_HIPuAK4CaloJet120Eta5p1_v*"]
hltPbPbHighPtJet.throw = False
hltPbPbHighPtJet.andOr = True

# At reco, add filters kicking pT up to 300 GeV
jetPtCut = 300
jetEtaCut = 2.4
pfJetSelector = cms.EDFilter(
"EtaPtMinCandViewSelector",
src = cms.InputTag("akCs4PFJets"),
ptMin = cms.double(jetPtCut),
etaMin = cms.double(-jetEtaCut),
etaMax = cms.double(jetEtaCut)
)
pfJetFilter = cms.EDFilter(
"CandViewCountFilter",
src = cms.InputTag("pfJetSelector"),
minNumber = cms.uint32(1)
)

# PbPb High-pT Jets skim sequence
pbpbHighPtJetSkimSequence = cms.Sequence(hltPbPbHighPtJet * pfJetSelector * pfJetFilter)
15 changes: 15 additions & 0 deletions Configuration/Skimming/python/PbPb_UPC_Monopole_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import FWCore.ParameterSet.Config as cms

# HLT UPC pixel thrust trigger
import HLTrigger.HLTfilters.hltHighLevel_cfi
hltUPCMonopole = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone()
hltUPCMonopole.HLTPaths = ["HLT_HIUPC_MinPixelThrust0p8_MaxPixelCluster10000_v*"]
hltUPCMonopole.throw = False
hltUPCMonopole.andOr = True

from Configuration.Skimming.PDWG_EXOMONOPOLE_cff import EXOMonopoleSkimContent
upcMonopoleSkimContent = EXOMonopoleSkimContent.clone()
upcMonopoleSkimContent.outputCommands.append('keep FEDRawDataCollection_rawDataRepacker_*_*')

# UPC monopole skim sequence
upcMonopoleSkimSequence = cms.Sequence(hltUPCMonopole)
26 changes: 26 additions & 0 deletions Configuration/Skimming/python/Skims_PbPb_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,29 @@
)

#####################

from Configuration.Skimming.PbPb_HighPtJets_cff import *
HighPtJetsSkimPathPbPb = cms.Path( pbpbHighPtJetSkimSequence )
SKIMStreamPbPbHighPtJets = cms.FilteredStream(
responsible = 'HI PAG',
name = 'PbPbHighPtJets',
paths = (HighPtJetsSkimPathPbPb),
content = skimFEVTContent.outputCommands,
selectEvents = cms.untracked.PSet(),
dataTier = cms.untracked.string('RAW-RECO')
)

#####################

from Configuration.Skimming.PbPb_UPC_Monopole_cff import *
upcMonopoleSkimPath = cms.Path( upcMonopoleSkimSequence )
SKIMStreamUPCMonopole = cms.FilteredStream(
responsible = 'HI PAG',
name = 'UPCMonopole',
paths = (upcMonopoleSkimPath),
content = upcMonopoleSkimContent.outputCommands,
selectEvents = cms.untracked.PSet(),
dataTier = cms.untracked.string('USER')
)

#####################
6 changes: 5 additions & 1 deletion Configuration/Skimming/python/autoSkim.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@
}

# For 2024 PbPb skims
for i_split in range(20):
autoSkim[f'HIForward{i_split}'] = 'UPCMonopole+LogError+LogErrorMonitor'

# For 2023 PbPb skims
for i_split in range(60):
autoSkim[f'HIPhysicsRawPrime{i_split}'] = 'PbPbEMu+PbPbZEE+PbPbZMu+LogError+LogErrorMonitor'
autoSkim[f'HIPhysicsRawPrime{i_split}'] = 'PbPbEMu+PbPbZEE+PbPbZMu+PbPbHighPtJets+LogError+LogErrorMonitor'

autoSkimRunII = {
'BTagCSV' : 'LogError+LogErrorMonitor',
Expand Down
45 changes: 24 additions & 21 deletions DQM/BeamMonitor/plugins/AlcaBeamMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ std::shared_ptr<alcabeammonitor::BeamSpotInfo> AlcaBeamMonitor::globalBeginLumin
BeamSpot::Point apoint(spotDB->x(), spotDB->y(), spotDB->z());

BeamSpot::CovarianceMatrix matrix;
for (int i = 0; i < 7; ++i) {
for (int j = 0; j < 7; ++j) {
for (int i = 0; i < reco::BeamSpot::dimension; ++i) {
for (int j = 0; j < reco::BeamSpot::dimension; ++j) {
matrix(i, j) = spotDB->covariance(i, j);
}
}
Expand Down Expand Up @@ -296,7 +296,15 @@ void AlcaBeamMonitor::analyze(const Event& iEvent, const EventSetup& iSetup) {
//------ Primary Vertices
Handle<VertexCollection> PVCollection;
if (iEvent.getByToken(primaryVertexLabel_, PVCollection)) {
beamSpotInfo->vertices_.push_back(*PVCollection.product());
std::vector<alcabeammonitor::pvPosAndErr> vertices;
vertices.reserve(PVCollection->size());
for (const auto& pv : *PVCollection.product()) {
if (pv.isFake() || pv.tracksSize() < 10)
continue;
vertices.emplace_back(pv);
}
vertices.shrink_to_fit();
beamSpotInfo->vertices_.emplace_back(std::move(vertices));
}

if (beamSpotInfo->beamSpotMap_.find("SC") == beamSpotInfo->beamSpotMap_.end()) {
Expand Down Expand Up @@ -363,24 +371,19 @@ void AlcaBeamMonitor::globalEndLuminosityBlock(const LuminosityBlock& iLumi, con
}
}
vertexResults.clear();
for (vector<VertexCollection>::iterator itPV = beamSpotInfo->vertices_.begin();
itPV != beamSpotInfo->vertices_.end();
itPV++) {
if (!itPV->empty()) {
for (VertexCollection::const_iterator pv = itPV->begin(); pv != itPV->end(); pv++) {
if (pv->isFake() || pv->tracksSize() < 10)
continue;
if (*itV == "x") {
vertexResults.push_back(pair<double, double>(pv->x(), pv->xError()));
} else if (*itV == "y") {
vertexResults.push_back(pair<double, double>(pv->y(), pv->yError()));
} else if (*itV == "z") {
vertexResults.push_back(pair<double, double>(pv->z(), pv->zError()));
} else if (*itV != "sigmaX" && *itV != "sigmaY" && *itV != "sigmaZ") {
LogInfo("AlcaBeamMonitor") << "The histosMap_ has been built with the name " << *itV
<< " that I can't recognize!";
//assert(0);
}

for (const auto& itPV : beamSpotInfo->vertices_) {
for (const auto& pv : itPV) {
if (*itV == "x") {
vertexResults.push_back(pv.xWithError());
} else if (*itV == "y") {
vertexResults.push_back(pv.yWithError());
} else if (*itV == "z") {
vertexResults.push_back(pv.zWithError());
} else if (*itV != "sigmaX" && *itV != "sigmaY" && *itV != "sigmaZ") {
LogInfo("AlcaBeamMonitor") << "The histosMap_ has been built with the name " << *itV
<< " that I can't recognize!";
//assert(0);
}
}
}
Expand Down
20 changes: 19 additions & 1 deletion DQM/BeamMonitor/plugins/AlcaBeamMonitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
*/
// C++
#include <map>
#include <array>
#include <vector>
#include <string>
#include <utility>

// CMS
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/Event.h"
Expand All @@ -28,8 +31,23 @@ class BeamFitter;
class PVFitter;

namespace alcabeammonitor {

struct pvPosAndErr {
// Array of pairs: (value, error) for x, y, z
std::array<std::pair<double, double>, 3> data;

// Constructor initializes the array with values and errors from a reco::Vertex
pvPosAndErr(const reco::Vertex& vertex)
: data{{{vertex.x(), vertex.xError()}, {vertex.y(), vertex.yError()}, {vertex.z(), vertex.zError()}}} {}

// Accessor functions that return pairs (value, error) directly
std::pair<double, double> xWithError() const { return data[0]; }
std::pair<double, double> yWithError() const { return data[1]; }
std::pair<double, double> zWithError() const { return data[2]; }
};

struct BeamSpotInfo {
std::vector<reco::VertexCollection> vertices_;
std::vector<std::vector<pvPosAndErr>> vertices_;
typedef std::map<std::string, reco::BeamSpot> BeamSpotContainer;
BeamSpotContainer beamSpotMap_;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@

from DQMOffline.MuonDPG.cscTnPEfficiencyTask_cfi import *

from DQMOffline.Muon.CSCMonitor_cfi import cscMonitor

cscSources = cms.Sequence(dqmCSCClient +
cscTnPEfficiencyMonitor)
cscTnPEfficiencyMonitor+
cscMonitor)
Loading

0 comments on commit 20891cb

Please sign in to comment.