File indexing completed on 2024-08-06 04:43:02
0001 import sys
0002 FLOAT_MAX = 3.402823466E+38
0003
0004 import FWCore.ParameterSet.VarParsing as VarParsing
0005
0006
0007
0008
0009 options = VarParsing.VarParsing()
0010 options.register('dbFromEvent',
0011 False,
0012 VarParsing.VarParsing.multiplicity.singleton,
0013 VarParsing.VarParsing.varType.bool,
0014 "use the Event for reading the DB?")
0015 options.register('warningThreshold',
0016 1.,
0017 VarParsing.VarParsing.multiplicity.singleton,
0018 VarParsing.VarParsing.varType.float,
0019 "threshold to emit a warning")
0020 options.register('errorThreshold',
0021 3.,
0022 VarParsing.VarParsing.multiplicity.singleton,
0023 VarParsing.VarParsing.varType.float,
0024 "threshold to emit a warning")
0025 options.parseArguments()
0026
0027 import FWCore.ParameterSet.Config as cms
0028 process = cms.Process("testBeamSpotCompatibility")
0029
0030
0031
0032
0033 readFiles = cms.untracked.vstring()
0034 readFiles.extend(['/store/data/Run2023D/HLTPhysics/ALCARECO/TkAlMinBias-PromptReco-v1/000/370/580/00000/acdddb09-046c-4375-82f3-678138106ac7.root'])
0035 process.source = cms.Source("PoolSource",
0036 fileNames = readFiles ,
0037 duplicateCheckMode = cms.untracked.string('checkAllFilesOpened')
0038 )
0039
0040 process.maxEvents = cms.untracked.PSet(
0041 input = cms.untracked.int32(1)
0042 )
0043
0044 process.options = cms.untracked.PSet(
0045 wantSummary = cms.untracked.bool(False),
0046 Rethrow = cms.untracked.vstring("ProductNotFound"),
0047 fileMode = cms.untracked.string('NOMERGE')
0048 )
0049
0050
0051
0052
0053 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0054 process.MessageLogger.cerr.FwkReport.reportEvery = 1000
0055
0056 process.load("RecoVertex.BeamSpotProducer.BeamSpot_cff")
0057
0058
0059
0060
0061
0062
0063 process.load("Configuration.Geometry.GeometryDB_cff")
0064 process.load('Configuration.StandardSequences.Services_cff')
0065 process.load("Configuration.StandardSequences.MagneticField_cff")
0066 process.load("TrackingTools.TransientTrack.TransientTrackBuilder_cfi")
0067
0068
0069
0070
0071 process.load("RecoTracker.TrackProducer.TrackRefitters_cff")
0072 import RecoTracker.TrackProducer.TrackRefitters_cff
0073 process.FinalTrackRefitter = RecoTracker.TrackProducer.TrackRefitter_cfi.TrackRefitter.clone()
0074 process.FinalTrackRefitter.src = "ALCARECOTkAlMinBias"
0075 process.FinalTrackRefitter.TrajectoryInEvent = True
0076 process.FinalTrackRefitter.NavigationSchool = ''
0077 process.FinalTrackRefitter.TTRHBuilder = "WithAngleAndTemplate"
0078
0079
0080
0081
0082 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0083 from Configuration.AlCa.GlobalTag import GlobalTag
0084 process.GlobalTag = GlobalTag(process.GlobalTag, "140X_dataRun3_v4")
0085
0086 process.BeamSpotChecker = cms.EDAnalyzer("BeamSpotCompatibilityChecker",
0087 bsFromEvent = cms.InputTag("offlineBeamSpot::RECO"),
0088
0089 bsFromDB = cms.InputTag("offlineBeamSpot"),
0090 dbFromEvent = cms.bool(options.dbFromEvent),
0091 warningThr = cms.double(options.warningThreshold),
0092 errorThr = cms.double(options.errorThreshold),
0093 verbose = cms.untracked.bool(False)
0094 )
0095
0096 process.p = cms.Path(
0097
0098 process.offlineBeamSpot*
0099 process.FinalTrackRefitter*
0100 process.BeamSpotChecker)
0101
0102 print("Done")