Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3syntaxupgrade #36160

Closed
wants to merge 98 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
6ce230b
Fix integer division after migration to python 3
fwyzard Jul 31, 2021
6007bdb
add refreshTime parameter to onlinebeammonitor DQM client + explanati…
francescobrivio Aug 2, 2021
0cb28ab
Merge pull request #34712 from fwyzard/fix_Validation_RecoTrack_for_p…
cmsbuild Aug 3, 2021
ef56caa
Bug fix (backport #34738) to HCAL SD class
Aug 3, 2021
444c63e
Protect HCAL GPU-related modules against empty events
fwyzard Aug 3, 2021
fa66473
move ele and photon to Task
mariadalfonso Jul 29, 2021
6429617
cleanup
mariadalfonso Jul 30, 2021
21605fc
Merge pull request #34730 from fwyzard/CUDA_fix_concurrent_EventSetup…
cmsbuild Aug 4, 2021
d089cec
Merge pull request #34726 from francescobrivio/alca-update_onlinebeam…
cmsbuild Aug 4, 2021
f811452
Merge pull request #34751 from mariadalfonso/backport_part2
cmsbuild Aug 4, 2021
10b2033
Merge pull request #34747 from bsunanda/Run3-hcx306X
cmsbuild Aug 4, 2021
c291535
Merge pull request #34741 from cms-tsg-storm/HLTmigrationTo1200pre5
cmsbuild Aug 4, 2021
29e1354
Merge pull request #34766 from thomreis/ecal-gpu-ecalout-fix
cmsbuild Aug 4, 2021
2c9cc65
Merge pull request #34743 from jshlee/GEM-newDAQStatus-12_0_0_pre3
cmsbuild Aug 4, 2021
3f7d8b5
Merge pull request #34749 from fwyzard/HCAL_GPU_modules_protect_for_e…
cmsbuild Aug 5, 2021
20c7b7a
HF SimHits timing fix 12_0_X
Aug 5, 2021
11f2a69
Merge pull request #34799 from abdoulline/EqualizeTimeShift_12_0_X
cmsbuild Aug 7, 2021
db8c328
Backport of changes in PR34606 merged into 12_1_X
veszpv Aug 10, 2021
57f13f6
Python3 fix + various improvements
ggovi Aug 12, 2021
fb3c78c
Fix the regex to match the LHE tags in mergeLHE.py
colizz Aug 13, 2021
8178f5a
Merge pull request #34851 from veszpv/PixelClusterRepairByMorphing_ba…
cmsbuild Aug 13, 2021
b001a8c
Change event number to 12 for workflow 537
colizz Aug 13, 2021
67a7f32
Add check if track angles are finite to avoid rare crash
Aug 11, 2021
10f0cad
fix miscelleanous mistakes in the all-in-one template configutations
mmusich Aug 13, 2021
7916c58
introduce python compilation time check of the configuration files pr…
mmusich Aug 13, 2021
1ef8943
Merge pull request #34877 from mmusich/miscellaneousFixesAlignmentOff…
cmsbuild Aug 16, 2021
4462af2
migrate AlignmentProducer to event consumes
mmusich Aug 16, 2021
5c0525f
Merge pull request #34845 from CTPPS/pps-alignment-global-fix
cmsbuild Aug 16, 2021
28903fd
Merge pull request #34888 from mmusich/TemplateInterpolate_isFinite_f…
cmsbuild Aug 17, 2021
3972dac
Add HCAL tag HcalRespCorrs_2021_v3.0_mc
tvami Aug 17, 2021
bd35faa
Fix radix sort test
fwyzard Aug 18, 2021
9fee873
do not produce NaNs in SiPixelActionExecutor
mmusich Aug 16, 2021
261229f
Merge pull request #34930 from fwyzard/fix_radix_sort_test_120x
cmsbuild Aug 19, 2021
0c32170
Merge pull request #34936 from mmusich/fixWf8.0comparisons_12_0_X
cmsbuild Aug 19, 2021
5eb3dd9
Merge pull request #34854 from ggovi/condcore-utilities-o2o-10-120X
cmsbuild Aug 19, 2021
3d1669c
HLT customisation for Patatrack pixel tracks and GPU offload
fwyzard Aug 19, 2021
7e07667
Merge pull request #34947 from mmusich/Alignment/CommonAlignmentProdu…
cmsbuild Aug 20, 2021
bc59305
Correct material order in DB payload
cvuosalo Aug 20, 2021
571d4a4
Clean debug line
cvuosalo Aug 20, 2021
122ff5c
Fix an issue with the track parameter digitization. Add a new functio…
Jul 21, 2021
b27b636
Merge pull request #34957 from fwyzard/HLT_customisation_for_GPU_120x
cmsbuild Aug 21, 2021
c9c01df
Restore cms::cuda::ESProduct construction without GPU
makortel Aug 20, 2021
557a7e8
Merge pull request #34949 from fwyzard/CUDA_fix_concurrent_EventSetup…
cmsbuild Aug 23, 2021
3ba9d5c
Code formatting
cvuosalo Aug 23, 2021
7bbc0d9
add dqm harvested file opening capability in legacyiohelper
sroychow Jul 23, 2021
e8e1c59
use legacy io helper in sistripofflineDQM
sroychow Jul 23, 2021
289fab5
close input file after cloning histos
sroychow Aug 20, 2021
5f864df
reset residuals mean map name for summary file creation
mmusich Aug 20, 2021
34b2f98
add unit test for SiStripDQM_OfflineTkMap
mmusich Aug 16, 2021
fe63c1e
code-format & code-check & clean-up
mmusich Aug 20, 2021
3e7c831
Merge pull request #34923 from tvami/FixHCALrespAssymetry-backport
cmsbuild Aug 25, 2021
bda431d
Validation plots for APE and bug fixes
mteroerd Aug 25, 2021
c3bf8f4
fixed some edge-cases in HLT-Patatrack customisations
missirol Aug 24, 2021
a53f448
support for PixelTracksSeq-only case in customisePixelLocalReconstruc…
missirol Aug 24, 2021
c3a3add
Merge pull request #35007 from mteroerd/ape_bugfix_1200_backport
cmsbuild Aug 26, 2021
f8a13ae
Merge pull request #34861 from colizz/dev-120X-fixWorkflow537AndFixMe…
cmsbuild Aug 26, 2021
44fd084
Merge pull request #35009 from missirol/devel_hltPatatrackCustomFunc_…
cmsbuild Aug 26, 2021
5396089
Fix on compilation issues with DMR, GC and MTS validation scripts. Ba…
TomasKello Aug 26, 2021
1c1f6d2
remove unneeded includes
mmusich Aug 27, 2021
10323b3
Merge pull request #34987 from cvuosalo/matOrdFix120
cmsbuild Aug 27, 2021
a6516bc
Merge pull request #35025 from TomasKello/fix_validation_DMR_MTS_GC_12_0
cmsbuild Aug 29, 2021
d5688d6
Enable concurrent GEN in Configuration/Generator/python (12_0_X)
colizz Aug 30, 2021
e0dff19
Fix the random segfault of RelVal workflow 573 (12_0_X)
colizz Aug 30, 2021
898b013
Better handling of timeout in FWCore/SharedMemory
Dr15Jones Aug 6, 2021
5e4077c
Make algorithm logic clearer
Dr15Jones Aug 7, 2021
472ca8a
Share code across tests
Dr15Jones Aug 8, 2021
3a1dbf7
Merge pull request #34993 from CMSTrackerDPG/fixTrackerMapsForRun3_12X
cmsbuild Aug 31, 2021
c8dbfef
Merge pull request #35076 from colizz/dev-120X-timeoutSharedMemory
cmsbuild Aug 31, 2021
a087bfe
Merge pull request #35075 from colizz/dev-120X-bacportConcurrentGenUt…
cmsbuild Sep 1, 2021
46905e0
Merge pull request #35087 from Sam-Harper/PATTriggerFullModeZeroFilte…
cmsbuild Sep 1, 2021
7ad8211
Merge pull request #34970 from aperloff/CMSSW_12_0_X-TrackWordDigitiz…
cmsbuild Sep 2, 2021
f632f2c
Temporary fix to switch off GeneralProcess for Run3
Sep 3, 2021
f56ec83
Merge pull request #35132 from fwyzard/fix_TriggerResultsFilter_skipC…
cmsbuild Sep 5, 2021
e99629b
HLT menu migration to CMSSW_12_0_0 template
Martin-Grunewald Sep 6, 2021
ec49569
Take Vladimir's suggestion
Sep 6, 2021
dc6aaef
backport
Sep 6, 2021
cf01ed0
Backport the xml files needed for a more correct Run3 geometry scenar…
Sep 6, 2021
319d80e
Provides namespace to all created solids/volumes (backport #35065)
Sep 6, 2021
58e50ae
Fix laser correction timing error
abhih1 Sep 6, 2021
f310af5
Merge pull request #35161 from cms-tsg-storm/HLTmigrationTo1200
cmsbuild Sep 7, 2021
7fd05d2
Merge pull request #35171 from abhih1/FixLaserCorr_120X
cmsbuild Sep 7, 2021
387c063
Merge pull request #35146 from bsunanda/Run3-sim109
cmsbuild Sep 7, 2021
a37f5ff
Merge pull request #35170 from bsunanda/Run3-trk08X
cmsbuild Sep 7, 2021
0aef937
Merge pull request #35166 from srimanob/120_BackportGenerateGeometryP…
cmsbuild Sep 7, 2021
597710b
Merge pull request #35169 from bsunanda/Run3-gex91X
cmsbuild Sep 7, 2021
f2546d0
Add the modified scenarios for Run3
Sep 7, 2021
45d4fab
Commit the remaining ones
Sep 8, 2021
95a265e
backport
Sep 8, 2021
503319a
backport
Sep 8, 2021
76ad1d6
Add TrackerAdditionalParametersPerDet_cfi to prevent exception
cvuosalo Sep 8, 2021
96bef46
Merge pull request #35187 from bsunanda/Run3-gex92X
cmsbuild Sep 9, 2021
92c713b
* use a shared file lock instead of exclusive lock. Only EoLS takes
smorovic Sep 9, 2021
969d782
implement filling random FED data in the fake raw data generator
smorovic Sep 9, 2021
6ee7254
code-format
smorovic Sep 9, 2021
851de30
Merge pull request #35198 from srimanob/120_AddFakeAlignmentToTracker…
cmsbuild Sep 10, 2021
e3e9504
Merge pull request #35200 from cvuosalo/addTkAddParams120
cmsbuild Sep 10, 2021
df3d5fa
Merge pull request #35221 from smorovic/dev-120X-locking-opt
cmsbuild Sep 11, 2021
34b5743
Python2 to Python3 syntax upgrade
conetthuerta Nov 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions Alignment/APEEstimation/plugins/ApeEstimatorSummary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1077,9 +1077,6 @@ void ApeEstimatorSummary::analyze(const edm::Event& iEvent, const edm::EventSetu
for (auto& i_sector : m_tkSector_) {
delete a_sectorName[i_sector.first];
}
delete sectorNameTree;
delete defaultTreeX;
delete defaultTreeY;
}

firstEvent = false;
Expand Down
12 changes: 12 additions & 0 deletions Alignment/APEEstimation/python/AlignmentTrackSelector_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
trackQualities = ["highPurity"],
)

## Filter for cosmics tracks
NoPuritySelector = Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi.AlignmentTrackSelector.clone(
applyBasicCuts = True,
filter = True,
src = 'ALCARECOTkAlMuonIsolated',
etaMin = -999.,
etaMax = 999.,
)

##
## Filters for skims
##
genSimSkimSelector = Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi.AlignmentTrackSelector.clone(
applyBasicCuts = True,
filter = True,
Expand Down
9 changes: 8 additions & 1 deletion Alignment/APEEstimation/python/TrackRefitter_38T_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
HighPuritySelector = Alignment.APEEstimation.AlignmentTrackSelector_cff.HighPuritySelector
HighPuritySelector.src = 'MuSkim'


NoPuritySelector = Alignment.APEEstimation.AlignmentTrackSelector_cff.NoPuritySelector
NoPuritySelector.src = 'MuSkim'

## SEQUENCE

Expand All @@ -33,5 +34,11 @@
TrackRefitterForApeEstimator
)

RefitterNoPuritySequence = cms.Sequence(
offlineBeamSpot*
NoPuritySelector*
TrackRefitterForApeEstimator
)



10 changes: 8 additions & 2 deletions Alignment/APEEstimation/test/autoSubmitter/autoSubmitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ def __init__(self, config, name):
self.sampleType = "MC"
else:
self.sampleType ="data1"

if "isCosmics" in dsDict:
self.isCosmics = (dsDict["isCosmics"] == "True")
else:
self.isCosmics = False

self.conditions, dummy, self.validConditions = loadConditions(dsDict)

Expand Down Expand Up @@ -205,7 +210,7 @@ def submit_jobs(self):

lastIter = (self.curIteration==self.maxIterations) and not self.alignment.isDesign

inputCommands = "sample={sample} fileNumber={fileNo} iterNumber={iterNo} lastIter={lastIter} alignRcd={alignRcd} maxEvents={maxEvents} globalTag={globalTag} measurementName={name} conditions={conditions}".format(sample=self.dataset.sampleType,fileNo="$1",iterNo=self.curIteration,lastIter=lastIter,alignRcd=alignmentNameToUse, maxEvents=self.maxEvents, globalTag=self.alignment.globalTag, name=self.name, conditions=rawFileName)
inputCommands = "sample={sample} fileNumber={fileNo} iterNumber={iterNo} lastIter={lastIter} alignRcd={alignRcd} maxEvents={maxEvents} globalTag={globalTag} measurementName={name} conditions={conditions} cosmics={cosmics}".format(sample=self.dataset.sampleType,fileNo="$1",iterNo=self.curIteration,lastIter=lastIter,alignRcd=alignmentNameToUse, maxEvents=self.maxEvents, globalTag=self.alignment.globalTag, name=self.name, conditions=rawFileName,cosmics=self.dataset.isCosmics)

from autoSubmitterTemplates import condorJobTemplate
jobFileContent = condorJobTemplate.format(base=base, inputFile="$2", inputCommands=inputCommands)
Expand Down Expand Up @@ -434,9 +439,10 @@ def run_iteration(self):
try:
self.submit_jobs()
save("measurements", measurements)
except:
except Exception as e:
# this is needed in case the scheduler goes down
print("Error submitting jobs for APE measurement {}".format(self.name))
print(e)
return

if self.status == STATE_BJOBS_WAITING:
Expand Down
2 changes: 2 additions & 0 deletions Alignment/APEEstimation/test/autoSubmitter/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ fileNames=filename.root otherFile_[1-6,8,10]_[1-2].root
maxEvents=-1
# optional, set to True for MC samples, False by default
isMC=False
# optional, set to True for cosmics samples, False by default
isCosmics=False

#define alignments like this
[alignment:alignmentObject]
Expand Down
20 changes: 13 additions & 7 deletions Alignment/APEEstimation/test/cfgTemplate/apeEstimator_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
options.register('lastIter', False, VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.bool, "Last iteration")
options.register('alignRcd','', VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "AlignmentRcd")
options.register('conditions',"None", VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "File with conditions")

options.register('cosmics', False, VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.bool, "Cosmic data set")
# get and parse the command line arguments
options.parseArguments()

Expand Down Expand Up @@ -194,7 +194,6 @@
)
)
process.es_prefer_trackerAlignmentErr = cms.ESPrefer("PoolDBESSource","myTrackerAlignmentErr")



##
Expand Down Expand Up @@ -253,11 +252,18 @@
##
## Path
##
process.p = cms.Path(
#process.TriggerSelectionSequence* # You want to use this if you want to select for triggers
process.RefitterHighPuritySequence*
process.ApeEstimatorSequence
)

if not options.cosmics:
process.p = cms.Path(
#process.TriggerSelectionSequence* # You want to use this if you want to select for triggers
process.RefitterHighPuritySequence*
process.ApeEstimatorSequence
)
else:
process.p = cms.Path(
process.RefitterNoPuritySequence* # this sequence doesn't include high purity track criteria
process.ApeEstimatorSequence
)



2 changes: 1 addition & 1 deletion Alignment/APEEstimation/test/plottingTools/drawResults.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
plot.setOutputPath(base+"/hists/workingArea/")
# label(also used as name when adding systematic errors), inputFile, color (optional, automatic by default),
# marker (optional, 20 by default, 0 is line), hitNumbers (optional, file number of hits in each sector, allData.root)
plot.addInputFile("label", "base/hists/workingArea/iter14/allData_iterationApe.root", color = ROOT.kGray+2)
plot.addInputFile("label", base+"/hists/workingArea/iter14/allData_iterationApe.root", color = ROOT.kGray+2)
plot.setGranularity(standardGranularity)
plot.draw()
21 changes: 21 additions & 0 deletions Alignment/APEEstimation/test/plottingTools/drawValidation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Implementation to draw results of an APE measurement
# to check convergence
from validationPlotter import *
from granularity import *
import ROOT
import os
try:
base = os.environ['CMSSW_BASE']+"/src/Alignment/APEEstimation"
except KeyError:
base = ""

plot = ValidationPlotter()
plot.setOutputPath(base+"/hists/workingArea/validation")
# label(also used as name when adding systematic errors), inputFile, color (optional, automatic by default),
# marker (optional, 20 by default, 0 is line)
# Multiple inputs possible, in which case the plots will be normalized
# Remember that the folder has to be either iter0 or iter15 or baseline
plot.addInputFile("mp3401", "{base}/hists/workingArea/iter15/allData.root".format(base=base),color=ROOT.kBlack)
plot.addInputFile("Design", "{base}/hists/Design/baseline/allData.root".format(base=base),color=ROOT.kRed,marker=0)
plot.setGranularity(standardGranularity)
plot.draw()
18 changes: 9 additions & 9 deletions Alignment/APEEstimation/test/plottingTools/resultPlotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ def makeHitNumbers(self, label, sectorRange, coordinate):
posX = (float(i)+0.5)/numSectors*(1-ROOT.gPad.GetLeftMargin()-ROOT.gPad.GetRightMargin())+ROOT.gPad.GetLeftMargin()
posY = (1-ROOT.gPad.GetTopMargin()-size)-1.2*size*self.numHitCounters

label = ROOT.TLatex(posX, posY, "%.2E"%(num))
label.SetNDC(True)
label.SetTextColor(self.colors[label])
label.SetTextSize(size)
label.SetTextFont(font)
label.SetTextAngle(45)
label.SetTextAlign(align)
labels.append(label)
labelTex = ROOT.TLatex(posX, posY, "%.2E"%(num))
labelTex.SetNDC(True)
labelTex.SetTextColor(self.colors[label])
labelTex.SetTextSize(size)
labelTex.SetTextFont(font)
labelTex.SetTextAngle(45)
labelTex.SetTextAlign(align)
labels.append(labelTex)
return labels

def makeHist(self, label, sectorRange, coordinate, number):
Expand Down Expand Up @@ -161,7 +161,7 @@ def draw(self):
plotNumber = 0
rangeList = self.granularity.sectors[coordinate]
for sectorRange in rangeList:
self.canvas = ROOT.TCanvas("canvas", "canvas", int(ROOT.gStyle.GetCanvasDefW()*len(list(range(sectorRange[0],sectorRange[1]+1)))/10.),ROOT.gStyle.GetCanvasDefH())
self.canvas = ROOT.TCanvas("canvas", "canvas", max(int(ROOT.gStyle.GetCanvasDefW()*len(list(range(sectorRange[0],sectorRange[1]+1)))/10.), int(ROOT.gStyle.GetCanvasDefW()/2)),ROOT.gStyle.GetCanvasDefH())
ROOT.gPad.SetRightMargin(0.10)

legend = ROOT.TLegend(0.2,0.62,0.5,0.82)
Expand Down