Skip to content

Commit

Permalink
Merge branch 'cms-sw:master' into L1TK-PR-14_2_0_pre4
Browse files Browse the repository at this point in the history
  • Loading branch information
tschuh authored Jan 9, 2025
2 parents d09cf51 + 684a740 commit 40b9cfb
Show file tree
Hide file tree
Showing 2,307 changed files with 59,583 additions and 25,784 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import os
import FWCore.ParameterSet.Config as cms

Expand Down
1 change: 0 additions & 1 deletion Alignment/APEEstimation/test/SkimProducer/startSkim.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import sys
sys.path.append("../SkimProducer")
# for switching to CAF queue (condor submit)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import configparser as ConfigParser
import argparse
import shelve
Expand Down
1 change: 0 additions & 1 deletion Alignment/APEEstimation/test/autoSubmitter/helpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import re
import os
import subprocess
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import os

import FWCore.ParameterSet.Config as cms
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import os

import FWCore.ParameterSet.Config as cms
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import os

import FWCore.ParameterSet.Config as cms
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
########################################################################################
###
### Read and write APEs to and from database and ASCII files
Expand Down
1 change: 0 additions & 1 deletion Alignment/APEEstimation/test/plottingTools/trendPlotter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import ROOT
ROOT.gROOT.SetBatch(True)
from setTDRStyle import setTDRStyle
Expand Down
1 change: 0 additions & 1 deletion Alignment/APEEstimation/test/trackerTreeGenerator_cfg.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import FWCore.ParameterSet.Config as cms

import os
Expand Down
6 changes: 3 additions & 3 deletions Alignment/CocoaUtilities/src/ALIFileIn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,17 @@ ALIint ALIFileIn::getWordsInLine(std::vector<ALIstring>& wordlist) {
}
}
tt++;
} while (*tt != '\0' && stemp.length() != 0);
} while (*tt != '\0' && !stemp.empty());
ALIstring stempt(ltemp);
if (stempt.length() == 0)
if (stempt.empty())
NoWords = 0;

//--------- Read words from istr_line and write them into wordlist
// ALIint stre = 1;
for (ii = 0; ii < NoWords; ii++) {
ALIstring stemp = "";
istr_line >> stemp; //?? gives warning in Insure++
if (stemp.length() == 0)
if (stemp.empty())
break;
ALIint comment = stemp.find(ALIstring("//"));
// std::cout << "!!!COMMENT" << comment << stemp.c_str() << std::endl;
Expand Down
2 changes: 0 additions & 2 deletions Alignment/CommonAlignment/python/tools/dataset.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import print_function
from __future__ import absolute_import

import abc
import csv
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import sys
import FWCore.ParameterSet.Config as cms

Expand Down
1 change: 0 additions & 1 deletion Alignment/CommonAlignment/python/tools/utilities.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function

def cache(function):
cache = {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python3

from __future__ import print_function
import os
import sys

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python3

from __future__ import print_function

from builtins import range
import os
Expand Down
4 changes: 2 additions & 2 deletions Alignment/CommonAlignment/src/AlignableModifier.cc
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ bool AlignableModifier::modify(Alignable* alignable, const edm::ParameterSet& pS
<< "with 's' or a digit at the end.\n";
} // other PSets should now be hierarchy levels and thus be OK to ignore here
} else {
if (!error.str().length())
if (error.str().empty())
error << "Unknown parameter name(s): ";
error << " " << *iParam;
}
Expand All @@ -189,7 +189,7 @@ bool AlignableModifier::modify(Alignable* alignable, const edm::ParameterSet& pS
throw cms::Exception("BadConfig") << "Found both localZ and phiZlocal";

// Check error
if (error.str().length())
if (!error.str().empty())
throw cms::Exception("BadConfig") << error.str();

// Decode distribution
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import FWCore.ParameterSet.Config as cms

OutALCARECOPromptCalibProdSiPixelAliHLTHGC_noDrop = cms.PSet(
SelectEvents = cms.untracked.PSet(
SelectEvents = cms.vstring('pathALCARECOPromptCalibProdSiPixelAliHLTHGMinBias','pathALCARECOPromptCalibProdSiPixelAliHLTHGDiMu')
),
outputCommands = cms.untracked.vstring('keep *_SiPixelAliMillePedeFileConverterHLTHGDimuon_*_*',
'keep *_SiPixelAliMillePedeFileConverterHLTHG_*_*')
)

OutALCARECOPromptCalibProdSiPixelAliHLTHGC=OutALCARECOPromptCalibProdSiPixelAliHLTHGC_noDrop.clone()
OutALCARECOPromptCalibProdSiPixelAliHLTHGC.outputCommands.insert(0, "drop *")
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
import FWCore.ParameterSet.Config as cms

# ------------------------------------------------------------------------------
# configure a filter to run only on the events selected by TkAlZMuMu AlcaReco
from HLTrigger.HLTfilters.hltHighLevel_cfi import *
ALCARECOTkAlZMuMuFilterForSiPixelAliHLT = hltHighLevel.clone(
HLTPaths = ['pathALCARECOTkAlHLTTracksZMuMu'],
throw = True, ## dont throw on unknown path names,
TriggerResultsTag = "TriggerResults::RECO"
)

from Alignment.CommonAlignmentProducer.ALCARECOPromptCalibProdSiPixelAliHLT_cff import *
from Alignment.CommonAlignmentProducer.LSNumberFilter_cfi import *



# Ingredient: AlignmentTrackSelector
# track selector for HighPurity tracks
#-- AlignmentTrackSelector
SiPixelAliLooseSelectorHLTHGDimuon = SiPixelAliLooseSelectorHLT.clone(
src = 'ALCARECOTkAlHLTTracksZMuMu',
etaMax = 3.0,
etaMin = -3.0,
filter = True,
pMin = 8.0,
)

# track selection for alignment
SiPixelAliTrackSelectorHLTHGDimuon = SiPixelAliTrackSelectorHLT.clone(
src = 'SiPixelAliTrackFitterHLTHGDimuon',
applyMultiplicityFilter = True,
d0Max = 50.0,
d0Min = -50.0,
etaMax = 3.0,
etaMin = -3.0,
filter = True,
maxMultiplicity = 2,
minHitChargeStrip = 20.0,
minHitIsolation = 0.01,
minMultiplicity = 2,
nHighestPt = 2,
nHitMin = 10,
pMin = 3.0,
ptMin = 15.0,
TwoBodyDecaySelector = dict(applyChargeFilter = True,
applyMassrangeFilter = True,
maxXMass = 95.8,
minXMass = 85.8),
minHitsPerSubDet = dict(inPIXEL = 1)
)

# Ingredient: SiPixelAliTrackRefitter0
# refitting
SiPixelAliTrackRefitterHLTHGDimuon0 = SiPixelAliTrackRefitterHLT0.clone(
src = 'SiPixelAliLooseSelectorHLTHGDimuon'
)
SiPixelAliTrackRefitterHLTHGDimuon1 = SiPixelAliTrackRefitterHLTHGDimuon0.clone(
src = 'SiPixelAliTrackSelectorHLTHGDimuon'
)

#-- Alignment producer
SiPixelAliMilleAlignmentProducerHLTHGDimuon = SiPixelAliMilleAlignmentProducerHLT.clone(
ParameterBuilder = dict(
Selector = cms.PSet(
alignParams = cms.vstring(
"TrackerP1PXBLadder,111111",
"TrackerP1PXECPanel,111111",
)
)
),
tjTkAssociationMapTag = 'SiPixelAliTrackRefitterHLTHGDimuon1',
algoConfig = MillePedeAlignmentAlgorithm.clone(
binaryFile = 'milleBinaryHLTHGDimuon_0.dat',
treeFile = 'treeFileHLTHGDimuon.root',
monitorFile = 'millePedeMonitorHLTHGDimuon.root',
minNumHits = 8,
skipGlobalPositionRcdCheck = True,
TrajectoryFactory = cms.PSet(
AllowZeroMaterial = cms.bool(False),
Chi2Cut = cms.double(10000.0),
ConstructTsosWithErrors = cms.bool(False),
EstimatorParameters = cms.PSet(
MaxIterationDifference = cms.untracked.double(0.01),
MaxIterations = cms.untracked.int32(100),
RobustificationConstant = cms.untracked.double(1.0),
UseInvariantMass = cms.untracked.bool(True)
),
IncludeAPEs = cms.bool(False),
MaterialEffects = cms.string('LocalGBL'),
NSigmaCut = cms.double(100.0),
ParticleProperties = cms.PSet(
PrimaryMass = cms.double(91.1061),
PrimaryWidth = cms.double(1.7678),
SecondaryMass = cms.double(0.105658)
),
PropagationDirection = cms.string('alongMomentum'),
TrajectoryFactoryName = cms.string('TwoBodyDecayTrajectoryFactory'),
UseBeamSpot = cms.bool(False),
UseHitWithoutDet = cms.bool(True),
UseInvalidHits = cms.bool(True),
UseProjectedHits = cms.bool(True),
UseRefittedState = cms.bool(True)
)
)
)

# Ingredient: SiPixelAliTrackerTrackHitFilter
SiPixelAliTrackerTrackHitFilterHLTHGDimuon = SiPixelAliTrackerTrackHitFilterHLT.clone(
src = 'SiPixelAliTrackRefitterHLTHGDimuon0',
TrackAngleCut = 0.087,
minimumHits = 10,
usePixelQualityFlag = False
)

# Ingredient: SiPixelAliSiPixelAliTrackFitter
SiPixelAliTrackFitterHLTHGDimuon = SiPixelAliTrackFitterHLT.clone(
src = 'SiPixelAliTrackerTrackHitFilterHLTHGDimuon'
)

SiPixelAliMillePedeFileConverterHLTHGDimuon = cms.EDProducer(
"MillePedeFileConverter",
fileDir = cms.string(SiPixelAliMilleAlignmentProducerHLTHGDimuon.algoConfig.fileDir.value()),
inputBinaryFile = cms.string(SiPixelAliMilleAlignmentProducerHLTHGDimuon.algoConfig.binaryFile.value()),
fileBlobLabel = cms.string('')
)

seqALCARECOPromptCalibProdSiPixelAliHLTHGDiMu = cms.Sequence(
ALCARECOTkAlZMuMuFilterForSiPixelAliHLT*
LSNumberFilter*
onlineBeamSpot*
SiPixelAliLooseSelectorHLTHGDimuon*
SiPixelAliTrackRefitterHLTHGDimuon0*
SiPixelAliTrackerTrackHitFilterHLTHGDimuon*
SiPixelAliTrackFitterHLTHGDimuon*
SiPixelAliTrackSelectorHLTHGDimuon*
SiPixelAliTrackRefitterHLTHGDimuon1*
SiPixelAliMilleAlignmentProducerHLTHGDimuon*
SiPixelAliMillePedeFileConverterHLTHGDimuon
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import FWCore.ParameterSet.Config as cms

# ------------------------------------------------------------------------------
# configure a filter to run only on the events selected by TkAlMinBias AlcaReco
from HLTrigger.HLTfilters.hltHighLevel_cfi import *
ALCARECOTkAlMinBiasFilterForSiPixelAliHLTHG = hltHighLevel.clone(
HLTPaths = ['pathALCARECOTkAlHLTTracks'],
throw = True, ## dont throw on unknown path names,
TriggerResultsTag = "TriggerResults::RECO"
)

from Alignment.CommonAlignmentProducer.ALCARECOPromptCalibProdSiPixelAliHLT_cff import *
from Alignment.CommonAlignmentProducer.LSNumberFilter_cfi import *

# Ingredient: AlignmentTrackSelector
# track selector for HighPurity tracks
#-- AlignmentTrackSelector
SiPixelAliLooseSelectorHLTHG = SiPixelAliLooseSelectorHLT.clone(
src = 'ALCARECOTkAlHLTTracks',
)

# track selection for alignment
SiPixelAliTrackSelectorHLTHG = SiPixelAliTrackSelectorHLT.clone(
src = 'SiPixelAliTrackFitterHLTHG'
)

# Ingredient: SiPixelAliTrackRefitter0
# refitting
SiPixelAliTrackRefitterHLTHG0 = SiPixelAliTrackRefitterHLT0.clone(
src = 'SiPixelAliLooseSelectorHLTHG'
)
SiPixelAliTrackRefitterHLTHG1 = SiPixelAliTrackRefitterHLTHG0.clone(
src = 'SiPixelAliTrackSelectorHLTHG'
)

#-- Alignment producer
SiPixelAliMilleAlignmentProducerHLTHG = SiPixelAliMilleAlignmentProducerHLT.clone(
ParameterBuilder = dict(
Selector = cms.PSet(
alignParams = cms.vstring(
"TrackerP1PXBLadder,111111",
"TrackerP1PXECPanel,111111",
)
)
),
tjTkAssociationMapTag = 'SiPixelAliTrackRefitterHLTHG1',
algoConfig = MillePedeAlignmentAlgorithm.clone(
binaryFile = 'milleBinaryHLTHG_0.dat',
treeFile = 'treeFileHLTHG.root',
monitorFile = 'millePedeMonitorHLTHG.root'
)
)

# Ingredient: SiPixelAliTrackerTrackHitFilter
SiPixelAliTrackerTrackHitFilterHLTHG = SiPixelAliTrackerTrackHitFilterHLT.clone(
src = 'SiPixelAliTrackRefitterHLTHG0',
usePixelQualityFlag = False
)

# Ingredient: SiPixelAliSiPixelAliTrackFitter
SiPixelAliTrackFitterHLTHG = SiPixelAliTrackFitterHLT.clone(
src = 'SiPixelAliTrackerTrackHitFilterHLTHG'
)

SiPixelAliMillePedeFileConverterHLTHG = cms.EDProducer(
"MillePedeFileConverter",
fileDir = cms.string(SiPixelAliMilleAlignmentProducerHLTHG.algoConfig.fileDir.value()),
inputBinaryFile = cms.string(SiPixelAliMilleAlignmentProducerHLTHG.algoConfig.binaryFile.value()),
fileBlobLabel = cms.string('')
)

seqALCARECOPromptCalibProdSiPixelAliHLTHG = cms.Sequence(
ALCARECOTkAlMinBiasFilterForSiPixelAliHLTHG*
LSNumberFilter*
onlineBeamSpot*
SiPixelAliLooseSelectorHLTHG*
SiPixelAliTrackRefitterHLTHG0*
SiPixelAliTrackerTrackHitFilterHLTHG*
SiPixelAliTrackFitterHLTHG*
SiPixelAliTrackSelectorHLTHG*
SiPixelAliTrackRefitterHLTHG1*
SiPixelAliMilleAlignmentProducerHLTHG*
SiPixelAliMillePedeFileConverterHLTHG
)
Loading

0 comments on commit 40b9cfb

Please sign in to comment.