Skip to content

Commit

Permalink
Merge branch 'master' into CMSSW_14_2_X_hybridTauAtMini
Browse files Browse the repository at this point in the history
  • Loading branch information
mbluj authored Oct 8, 2024
2 parents fc5d678 + d8f3e55 commit 18885f8
Show file tree
Hide file tree
Showing 49 changed files with 164 additions and 321 deletions.
3 changes: 0 additions & 3 deletions Configuration/Eras/python/Modifier_run3_nanoAOD_122_cff.py

This file was deleted.

3 changes: 0 additions & 3 deletions Configuration/Eras/python/Modifier_run3_nanoAOD_124_cff.py

This file was deleted.

2 changes: 1 addition & 1 deletion Configuration/StandardSequences/python/Eras.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def __init__(self):
'trackingPhase2PU140','highBetaStar_2018',
'tracker_apv_vfp30_2016', 'pf_badHcalMitigationOff',
'run2_nanoAOD_106Xv2',
'run3_nanoAOD_122', 'run3_nanoAOD_124', 'run3_nanoAOD_pre142X',
'run3_nanoAOD_pre142X',
'run3_ecal_devel',
'run3_upc',
'hcalHardcodeConditions', 'hcalSkipPacker',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@


DQMOffline_SecondStep_PrePOG_Express = cms.Sequence( DQMOffline_SecondStepTracking *
DQMOffline_SecondStepMUO *
#DQMOffline_SecondStepMUO *
#DQMOffline_SecondStepEGamma *
DQMOffline_SecondStepTrigger *
DQMOffline_SecondStepBTag *
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/Configuration/python/DQMOffline_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@


DQMOfflinePrePOGExpress = cms.Sequence( DQMOfflineTracking *
DQMOfflineMUO *
#DQMOfflineMUO *
#DQMOfflineJetMET *
#DQMOfflineEGamma *
DQMOfflineTrigger *
Expand Down
5 changes: 3 additions & 2 deletions Geometry/ForwardGeometry/src/ZdcTopology.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ bool ZdcTopology::isExcluded(const HcalZDCDetId& id) const {
exed = excludeRPD_;
break;
default:
exed = false;
exed = true;
}

// check the entire list
Expand Down Expand Up @@ -167,7 +167,6 @@ bool ZdcTopology::validRaw(const HcalZDCDetId& id) const {
ok = false;
else if (id.channel() <= 0)
ok = false;
//else if (!(id.section() == HcalZDCDetId::EM || id.section() == HcalZDCDetId::HAD || id.section() == HcalZDCDetId::LUM))
else if (!(id.section() == HcalZDCDetId::EM || id.section() == HcalZDCDetId::HAD ||
id.section() == HcalZDCDetId::LUM || id.section() == HcalZDCDetId::RPD))
ok = false;
Expand All @@ -179,6 +178,8 @@ bool ZdcTopology::validRaw(const HcalZDCDetId& id) const {
ok = false;
else if (id.section() == HcalZDCDetId::RPD && id.channel() > HcalZDCDetId::kDepRPD)
ok = false;
else if (id.section() == HcalZDCDetId::Unknown)
ok = false;
return ok;
}

Expand Down
2 changes: 1 addition & 1 deletion IORawData/DTCommissioning/plugins/DTNewROS8FileReader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ int DTNewROS8FileReader::fillRawData(Event& e,
//2.- Get the HEADER ============================================================================
int datahead[numberEventHeadWords];
for (int iih = 0; iih < numberEventHeadWords; iih++) {
nread = inputFile.read(dataPointer<int>(&datahead[iih]), ros8WordLenght);
inputFile.read(dataPointer<int>(&datahead[iih]), ros8WordLenght);
}

//3.- ROS DATA & 4.- PU DATA (Trigger) =======================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,7 @@ bool PixelSLinkDataInputSource::setRunAndEventInfo(edm::EventID &id,
// create product (raw data)
buffers = std::make_unique<FEDRawDataCollection>();

// uint32_t currenteventnumber = (m_data >> 32)&0x00ffffff;
uint32_t eventnumber = (m_data >> 32) & 0x00ffffff;
uint32_t eventnumber;

do {
std::vector<uint64_t> buffer;
Expand Down
1 change: 0 additions & 1 deletion JetMETCorrections/MCJet/bin/ReadTree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ int main(int argc, char **argv) {
if (cut_ptmin && cut_dR && cut_njets) {
ind_pt = getBin(ptGen, pt_vec);
ind_eta = getBin(etaJet, eta_vec);
resp = 0.;
if (UseRatioForResponse && ptGen > 0)
resp = ptJet / ptGen;
else
Expand Down
3 changes: 1 addition & 2 deletions OnlineDB/EcalCondDB/src/FEConfigLUTGroupDat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ void FEConfigLUTGroupDat::fetchData(map<EcalLogicID, FEConfigLUTGroupDat>* fillM

int nrows = 1024;

int igold = -1;
int ig = igold;
int ig = -1;

while (rset->next()) {
ig = rset->getInt(1);
Expand Down
9 changes: 0 additions & 9 deletions PhysicsTools/NanoAOD/python/boostedTaus_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,3 @@
boostedTauTask = cms.Task(finalBoostedTaus)
boostedTauTablesTask = cms.Task(boostedTauTable)
boostedTauMCTask = cms.Task(boostedTausMCMatchLepTauForTable,boostedTausMCMatchHadTauForTable,boostedTauMCTable)

#remove boosted tau from previous eras
(run3_nanoAOD_122).toReplaceWith(
boostedTauTask,cms.Task()
).toReplaceWith(
boostedTauTablesTask,cms.Task()
).toReplaceWith(
boostedTauMCTask,cms.Task()
)
11 changes: 0 additions & 11 deletions PhysicsTools/NanoAOD/python/custom_btv_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,17 +496,6 @@ def add_BTV(process, addAK4=False, addAK8=False, scheme="btvSF"):
get_ParticleNetAK4_outputs(),
#get_ParticleTransformerAK4_outputs(),# removed in 2024
))

# disable the ParT branches in default jetPuppi table
from PhysicsTools.NanoAOD.nano_eras_cff import run3_nanoAOD_122, run3_nanoAOD_124
(run3_nanoAOD_122 | run3_nanoAOD_124).toModify(
process.jetPuppiTable.variables,
btagRobustParTAK4B = None,
btagRobustParTAK4CvL = None,
btagRobustParTAK4CvB = None,
btagRobustParTAK4QG = None,
)


# from Run3 onwards, always set storeAK4Truth to True for MC
process.customAK4ConstituentsForDeepJetTable = cms.EDProducer("PatJetDeepJetTableProducer",
Expand Down
2 changes: 1 addition & 1 deletion PhysicsTools/NanoAOD/python/globals_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
zbins = cms.vdouble( [0.0,1.7,2.6,3.0,3.5,4.2,5.2,6.0,7.5,9.0,12.0] ),
savePtHatMax = cms.bool(True),
)
(run2_nanoAOD_ANY | run3_nanoAOD_122 | run3_nanoAOD_124).toModify(
(run2_nanoAOD_ANY).toModify(
puTable, savePtHatMax=False
)

Expand Down
18 changes: 0 additions & 18 deletions PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,24 +170,6 @@
hfEmEF = None
)

(run3_nanoAOD_122 | run3_nanoAOD_124).toModify(
jetTable.variables,
# New ParticleNet trainings are not available in MiniAOD until Run3 13X
btagPNetB = None,
btagPNetCvL = None,
btagPNetCvB = None,
btagPNetQvG = None,
btagPNetTauVJet = None,
PNetRegPtRawCorr = None,
PNetRegPtRawCorrNeutrino = None,
PNetRegPtRawRes = None,
# Remove for V11 and earlier Run3 versions
chMultiplicity = None,
neMultiplicity = None,
hfHEF = None,
hfEmEF = None
)

bjetNN = cms.EDProducer("BJetEnergyRegressionMVA",
backend = cms.string("ONNX"),
batch_eval = cms.bool(True),
Expand Down
18 changes: 0 additions & 18 deletions PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,24 +117,6 @@
btagDeepCvB = Var("?bDiscriminator('pfDeepCSVJetTags:probc')>=0?bDiscriminator('pfDeepCSVJetTags:probc')/(bDiscriminator('pfDeepCSVJetTags:probc')+bDiscriminator('pfDeepCSVJetTags:probb')+bDiscriminator('pfDeepCSVJetTags:probbb')):-1",float,doc="DeepCSV c vs b+bb discriminator",precision=10)
)

(run3_nanoAOD_122 | run3_nanoAOD_124).toModify(
jetPuppiTable.variables,
# New ParticleNet trainings are not available in MiniAOD until Run3 13X
btagPNetB = None,
btagPNetCvL = None,
btagPNetCvB = None,
btagPNetQvG = None,
btagPNetTauVJet = None,
PNetRegPtRawCorr = None,
PNetRegPtRawCorrNeutrino = None,
PNetRegPtRawRes = None,
# Remove for V11 and earlier Run3 versions
chMultiplicity = None,
neMultiplicity = None,
hfHEF = None,
hfEmEF = None
)

run3_nanoAOD_pre142X.toModify(
jetPuppiTable.variables,
puIdDisc = None,
Expand Down
29 changes: 2 additions & 27 deletions PhysicsTools/NanoAOD/python/jetsAK8_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,33 +115,8 @@
neEmEF = None,
muEF = None
)
(run3_nanoAOD_122 | run3_nanoAOD_124).toModify(
fatJetTable.variables,
# New ParticleNet trainings are not available in MiniAOD until Run3 13X
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,
particleNet_WVsQCD = None,
# Remove for V11 and earlier versions
chMultiplicity = None,
neMultiplicity = None,
chHEF = None,
neHEF = None,
chEmEF = None,
neEmEF = None,
muEF = None
)

(run2_nanoAOD_106Xv2 | run3_nanoAOD_122 | run3_nanoAOD_124).toModify(
(run2_nanoAOD_106Xv2).toModify(
fatJetTable.variables,
# Restore taggers that were decommisionned for Run-3
btagDeepB = Var("?(bDiscriminator('pfDeepCSVJetTags:probb')+bDiscriminator('pfDeepCSVJetTags:probbb'))>=0?bDiscriminator('pfDeepCSVJetTags:probb')+bDiscriminator('pfDeepCSVJetTags:probbb'):-1",float,doc="DeepCSV b+bb tag discriminator",precision=10),
Expand Down Expand Up @@ -264,7 +239,7 @@ def nanoAOD_addDeepInfoAK8(process, addDeepBTag, addDeepBoostedJet, addDeepDoubl
btagCSVV2 = Var("bDiscriminator('pfCombinedInclusiveSecondaryVertexV2BJetTags')",float,doc=" pfCombinedInclusiveSecondaryVertexV2 b-tag discriminator (aka CSVV2)",precision=10)
)

(run2_nanoAOD_106Xv2 | run3_nanoAOD_122 | run3_nanoAOD_124).toModify(
(run2_nanoAOD_106Xv2).toModify(
subJetTable.variables,
area = None,
)
Expand Down
39 changes: 1 addition & 38 deletions PhysicsTools/NanoAOD/python/nanoDQM_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,20 +188,6 @@ def _match(name):
Plot1D('particleNetLegacy_QCD', 'particleNetLegacy_QCD', 20, 0, 1, 'ParticleNet Legacy Run-2 QCD score'),
])

_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() \
and 'Multiplicity' not in plot.name.value() and 'EF' not in plot.name.value():
_FatJet_EarlyRun3_plots.append(plot)
_FatJet_EarlyRun3_plots.extend([
Plot1D('btagDeepB', 'btagDeepB', 20, -1, 1, 'Deep B+BB btag discriminator'),
Plot1D('btagHbb', 'btagHbb', 20, -1, 1, 'Higgs to BB tagger discriminator'),
Plot1D('btagCMVA', 'btagCMVA', 20, -1, 1, 'CMVA V2 btag discriminator'),
Plot1D('btagDDBvLV2', 'btagDDBvLV2', 20, 0, 1, 'DeepDoubleX V2(mass-decorrelated) discriminator for H(Z)->bb vs QCD'),
Plot1D('btagDDCvBV2', 'btagDDCvBV2', 20, 0, 1, 'DeepDoubleX V2 (mass-decorrelated) discriminator for H(Z)->cc vs H(Z)->bb'),
Plot1D('btagDDCvLV2', 'btagDDCvLV2', 20, 0, 1, 'DeepDoubleX V2 (mass-decorrelated) discriminator for H(Z)->cc vs QCD'),
])

_Jet_Run2_plots = cms.VPSet()
for plot in nanoDQM.vplots.Jet.plots:
_Jet_Run2_plots.append(plot)
Expand All @@ -215,13 +201,6 @@ def _match(name):
Plot1D('btagDeepCvB', 'btagDeepCvB', 20, -1, 1, 'DeepCSV c vs b+bb discriminator'),
Plot1D('btagDeepCvL', 'btagDeepCvL', 20, -1, 1, 'DeepCSV c vs udsg discriminator')
])

_Jet_EarlyRun3_plots = cms.VPSet()
for plot in nanoDQM.vplots.Jet.plots:
if 'PNet' not in plot.name.value() and 'Multiplicity' not in plot.name.value() \
and 'hfHEF' not in plot.name.value() and 'hfEmEF' not in plot.name.value():
_Jet_EarlyRun3_plots.append(plot)

_Jet_pre142X_plots = cms.VPSet()
for plot in nanoDQM.vplots.Jet.plots:
if 'puIdDisc' not in plot.name.value():
Expand All @@ -233,10 +212,6 @@ def _match(name):
_SubJet_Run2_plots.extend([
Plot1D('btagCSVV2', 'btagCSVV2', 20, -1, 1, ' pfCombinedInclusiveSecondaryVertexV2 b-tag discriminator (aka CSVV2)'),
])
_SubJet_EarlyRun3_plots = cms.VPSet()
for plot in nanoDQM.vplots.SubJet.plots:
if 'area' not in plot.name.value():
_SubJet_EarlyRun3_plots.append(plot)

_SubJet_pre142X_plots = cms.VPSet()
for plot in nanoDQM.vplots.SubJet.plots:
Expand All @@ -256,18 +231,6 @@ def _match(name):
nanoDQM.vplots.SubJet,
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
).toModify(
nanoDQM.vplots.SubJet,
plots = _SubJet_EarlyRun3_plots
)

run3_nanoAOD_pre142X.toModify(
nanoDQM.vplots.Jet,
plots = _Jet_pre142X_plots
Expand All @@ -281,7 +244,7 @@ def _match(name):
if 'pthatmax' not in plot.name.value():
_Pileup_pre13X_plots.append(plot)

(run2_nanoAOD_ANY | run3_nanoAOD_122 | run3_nanoAOD_124).toModify(
(run2_nanoAOD_ANY).toModify(
nanoDQM.vplots.Pileup,
plots = _Pileup_pre13X_plots
)
Expand Down
18 changes: 3 additions & 15 deletions PhysicsTools/NanoAOD/python/nano_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@
linkedObjects, jets="finalJets"
)

# boosted taus don't exist in 122X MINI
run3_nanoAOD_122.toModify(
linkedObjects, boostedTaus=None,
)

from PhysicsTools.NanoAOD.lhcInfoProducer_cfi import lhcInfoProducer
lhcInfoTable = lhcInfoProducer.clone()
(~run3_common).toModify(
Expand Down Expand Up @@ -214,13 +209,6 @@ def nanoAOD_customizeCommon(process):
nanoAOD_addUnifiedParTAK4Tag_switch=True,
)

# enable rerun of PNet for CHS jets for early run3 eras
# (it is rerun for run2 within jet tasks while is not needed for newer
# run3 eras as it is present in miniAOD)
(run3_nanoAOD_122 | run3_nanoAOD_124).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,
Expand Down Expand Up @@ -253,16 +241,16 @@ def nanoAOD_customizeCommon(process):
addUParTInfo = cms.bool(False),
addPNet = cms.bool(False)
)
(run2_nanoAOD_106Xv2 | run3_nanoAOD_122).toModify(
(run2_nanoAOD_106Xv2).toModify(
nanoAOD_tau_switch, idsToAdd = ["deepTau2018v2p5"]
).toModify(
process, lambda p : nanoAOD_addTauIds(p, nanoAOD_tau_switch.idsToAdd.value())
)

# Add Unified Tagger for CHS jets (PNet) for Run 2 and early Run 3 eras,
# Add Unified Tagger for CHS jets (PNet) for Run 2 era,
# but don't add Unified Tagger for PUPPI jets (as different PUPPI tune
# and base jet algorithm)
(run3_nanoAOD_122 | run3_nanoAOD_124 | run2_nanoAOD_106Xv2).toModify(
(run2_nanoAOD_106Xv2).toModify(
nanoAOD_tau_switch, addPNet = True
)
# Add Unified Taggers for Run 3 pre 142X (pre v15) era (Unified taggers
Expand Down
2 changes: 0 additions & 2 deletions PhysicsTools/NanoAOD/python/nano_eras_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016

from Configuration.Eras.Modifier_run3_common_cff import run3_common
from Configuration.Eras.Modifier_run3_nanoAOD_122_cff import run3_nanoAOD_122
from Configuration.Eras.Modifier_run3_nanoAOD_124_cff import run3_nanoAOD_124
from Configuration.Eras.Modifier_run3_nanoAOD_pre142X_cff import run3_nanoAOD_pre142X
from Configuration.Eras.Modifier_run3_jme_Winter22runsBCDEprompt_cff import run3_jme_Winter22runsBCDEprompt

Expand Down
Loading

0 comments on commit 18885f8

Please sign in to comment.