Skip to content

Commit

Permalink
Merge pull request #37961 from antoniovagnerini/fixes2MillePedeAlgorithm
Browse files Browse the repository at this point in the history
fixing minHieraParPerConstr and python3 compatibility for validation …
  • Loading branch information
cmsbuild authored May 17, 2022
2 parents a3ba80f + 789aab6 commit 6bd45e5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
# AlignmentProducer.ParameterBuilder.Selector, cf. Twiki page SWGuideMillepedeIIAlgorithm.
Presigmas = cms.VPSet(),
minHieraConstrCoeff = cms.double(1.e-10), # min abs value of coeff. in hierarchy constr.
minHieraParPerConstr = cms.uint32(2), # ignore hierarchy constraints with less params
minHieraParPerConstr = cms.uint32(1), # ignore hierarchy constraints with less params
constrPrecision = cms.uint32(10), # precision for writing constraints to text file. Default is 6 and can be setup with constrPrecision = cms.uint32(0)
# specify additional steering files
additionalSteerFiles = cms.vstring(), # obsolete - can be given as entries in 'options'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ def plot(MillePedeUser, alignables, mode, struct, parentPlot, config):

# count entries which are not shown anymore
# bin 1 to begin of histogram
for j in range(1, numberOfBins / 2 - binShift):
for j in range(1, numberOfBins // 2 - binShift):
plot.hiddenEntries[i] += plot.histo[i].GetBinContent(j)
# from the end of shown bins to the end of histogram
for j in range(numberOfBins / 2 + binShift, plot.histo[i].GetNbinsX()):
for j in range(numberOfBins // 2 + binShift, plot.histo[i].GetNbinsX()):
plot.hiddenEntries[i] += plot.histo[i].GetBinContent(j)

# merge bins, ca. 100 should be visible in the resulting plot
Expand All @@ -128,8 +128,8 @@ def plot(MillePedeUser, alignables, mode, struct, parentPlot, config):
# set view range. it is important to note that the number of bins have changed with the rebinning
# the total number and the number of shift must be
# corrected with / mergeNumberBins
plot.histo[i].GetXaxis().SetRange(int(numberOfBins / (2 * mergeNumberBins) - binShift /
mergeNumberBins), int(numberOfBins / (2 * mergeNumberBins) + binShift / mergeNumberBins))
plot.histo[i].GetXaxis().SetRange(int(numberOfBins // (2 * mergeNumberBins) - binShift /
mergeNumberBins), int(numberOfBins // (2 * mergeNumberBins) + binShift / mergeNumberBins))

# save copy
plots[subStructNumber] = plot
Expand Down
1 change: 1 addition & 0 deletions Alignment/MillePedeAlignmentAlgorithm/scripts/mps_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@
#$mOutSize = `nsls -l $mssDir | grep $milleOut | head -1 | awk '{print \$5}'`;
#$mOutSize = `cmsLs -l $mssDir | grep $milleOut | head -1 | awk '{print \$2}'`;
mOutSize = 0
#print(">>>eoslsoutput:", eoslsoutput, " \ttype(eoslsoutput):", type(eoslsoutput))
for line in eoslsoutput:
if milleOut in line:
columns = line.split()
Expand Down
1 change: 1 addition & 0 deletions Alignment/MillePedeAlignmentAlgorithm/scripts/mps_fire.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ def write_HTCondor_submit_file_mille(path, script, lib, proxy_path=None):
shell=True).decode()
except subprocess.CalledProcessError as e:
result = "" # -> check for successful job submission will fail
#print(' '+result, end=' ')
print(result)
result = result.strip()

Expand Down

0 comments on commit 6bd45e5

Please sign in to comment.