/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Alignment/HIPAlignmentAlgorithm/python/common_cff_py.txt
326 строк
12 KB
lk11235
Update common_cff_py.txt
27 авг 2023, 19:58
Не верифицирован
27 авг 2023, 19:58
db7ec98
Код
Авторство
О чём код?
import FWCore.ParameterSet.Config as cms process = cms.Process("Alignment") process.load("Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi") process.load("RecoTracker.FinalTrackSelectors.TrackerTrackHitFilter_cff") process.load("RecoTracker.TrackProducer.TrackRefitters_cff") process.load("RecoVertex.BeamSpotProducer.BeamSpot_cff") process.load('Configuration.Geometry.GeometryRecoDB_cff') #Tracker from RecoTracker.GeometryESProducer.TrackerRecoGeometryESProducer_cfi import * #Muon from Geometry.MuonNumbering.muonNumberingInitialization_cfi import * from RecoMuon.DetLayers.muonDetLayerGeometry_cfi import * # Alignment from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import * from Geometry.CSCGeometryBuilder.idealForDigiCscGeometry_cff import * from Geometry.DTGeometryBuilder.idealForDigiDtGeometry_cff import * process.load("Configuration.StandardSequences.MagneticField_cff") # loading the alignment producer process.load("Alignment.CommonAlignmentProducer.AlignmentProducer_cff") # loading DB constants process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") process.GlobalTag.globaltag = "{FILL GT HERE}" process.load("FWCore.MessageService.MessageLogger_cfi") process.MessageLogger.cerr.FwkReport.reportEvery = 10000 # configure the database file - use survey one for default from CondCore.CondDB.CondDB_cfi import * process.GlobalTag.toGet = cms.VPSet( # cms.PSet(record = cms.string('TrackerAlignmentRcd'), # tag = cms.string('Alignments'), # connect = cms.string('sqlite_file:/afs/cern.ch/work/u/usarica/scratch-dimuon3/CMSSW_8_0_20/src/Alignment/HIPAlignmentAlgorithm/hp30112016_all_v2/alignments_iter2.db') # ), # # cms.PSet(record = cms.string('TrackerSurfaceDeformationRcd'), # tag = cms.string('TrackerSurfaceDeformations_2015-EOY_v1_RunD'), # connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') # ), # # cms.PSet(record = cms.string('TrackerAlignmentErrorExtendedRcd'), # tag = cms.string('TrackerIdealGeometryErrorsExtended210_mc'), # connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') # ), # # cms.PSet(record = cms.string('SiPixelTemplateDBObjectRcd'), # tag = cms.string('SiPixelTemplateDBObject_phase1_38T_2018_v2'), # connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS'), # ), ) process.AlignmentProducer.applyDbAlignment = True process.AlignmentProducer.checkDbAlignmentValidity=False process.AlignmentProducer.algoConfig.multiIOV=True process.AlignmentProducer.algoConfig.IOVrange=cms.vuint32(<iovs>) # TEC disk 1-9 in +z half : 470311204,470327588,470343972,470360388,470376772,470393156,470409572,470425956,470442372 # TEC disk 1-9 in -z half : 470049060,470065444,470081828,470098244,470114628,470131012,470147428,470163812,470180228 # angle cut : degrees-65,70,75,80 ; rads-1.134,1.222,1.309,1.396 ; sin-0.9,0.95,0.97,0.99 # angle cut : rad 1.33 1.35, 1.37 #process.AlignmentProducer.algoConfig.setScanDet = cms.vdouble(1,0,20) #detector ID (1=all det), start,step process.AlignmentProducer.algoConfig.monitorConfig.fillTrackMonitoring = cms.bool(False) process.AlignmentProducer.algoConfig.monitorConfig.fillTrackHitMonitoring = cms.bool(False) # Apply reweighting process.AlignmentProducer.algoConfig.UseReweighting=cms.bool(True) # Turned on for collectors to behave properly process.AlignmentProducer.algoConfig.ReweightPerAlignable=cms.bool(True) # One needs to specify the DataType; otherwise everything will be multiplied by 1 process.AlignmentProducer.algoConfig.UniformEta=cms.bool(False) # Turned off, not needed in collection jobs process.AlignmentProducer.algoConfig.Weight=cms.double(1) # Apply surface deformations, determined through batchHippy SurfDefFlag = <SURFDEFOPT> # See Alignment/CommonAlignmentParametrization/src/AlignmentParametersFactory.cc::parametersType for the second string process.AlignmentProducer.ParameterBuilder.parameterTypes = cms.vstring( 'SelectorRigid,RigidBody', 'SelectorBowed,BowedSurface', 'SelectorTwoBowed,TwoBowedSurfaces', ) SelectorRigidAlignables = [] SelectorBowedAlignables = [] SelectorTwoBowedAlignables = [] ### Set parameters to align (all modules in this example) if SurfDefFlag: SelectorBowedAlignables.extend([ # "TrackerP1PXBModule,111111 111", # "TrackerP1PXECModule,110111 111", # "TrackerTIBModuleUnit,111111 111", # "TrackerTIDModuleUnit,100111 111", # "TrackerTECModuleUnit,100111 111,tecSingleSens", ]) SelectorTwoBowedAlignables.extend([ # "TrackerTOBModuleUnit,100111 111 100111 111", # "TrackerTECModuleUnit,100111 111 100111 111,tecDoubleSens", ]) SelectorRigidAlignables.extend([ # "TrackerP1PXBModule,111111", # "TrackerP1PXBLadder,111111", # "TrackerP1PXBLayer,111111", # "TrackerP1PXBHalfBarrel,111111", # "TrackerP1PXBBarrel,111111", # "TrackerP1PXECModule,110111", # "TrackerP1PXECPanel,111111", # "TrackerP1PXECBlade,111111", # "TrackerP1PXECHalfDisk,111111", # "TrackerP1PXECHalfCylinder,111111", # "TrackerP1PXECEndcap,111111", # "TrackerTIBModuleUnit,101111", # "TrackerTIBModule,111111", # "TrackerTIBString,111111", # "TrackerTIBSurface,111111", # "TrackerTIBHalfShell,111111", # "TrackerTIBLayer,111111", # "TrackerTIBHalfBarrel,111111", # "TrackerTIBBarrel,111111", # "TrackerTIDModuleUnit,100111", # "TrackerTIDModule,100111", # "TrackerTIDSide,111111", # "TrackerTIDRing,111111", # "TrackerTIDDisk,111111", # "TrackerTIDEndcap,111111", # "TrackerTOBModuleUnit,100111", # "TrackerTOBModule,100111", # "TrackerTOBRod,111111", # "TrackerTOBLayer,111111", # "TrackerTOBHalfBarrel,111111", # "TrackerTOBBarrel,111111", # "TrackerTECModuleUnit,100111", # "TrackerTECModule,100111", # "TrackerTECRing,111111", # "TrackerTECPetal,111111", # "TrackerTECSide,111111", # "TrackerTECDisk,110111", # "TrackerTECEndcap,001000", # "TIDDets,001000,endCapDS", # "TIDDets,001000,endCapSS", # "TECDets,111111,endCapDS", # "TECDets,111111,endCapSS", # "TECDets,111111,TECRing1", # "TECDets,111111,TECRing2", # "TECDets,111111,TECRing3", # "TECDets,111111,TECRing4", # "TECDets,111111,TECRing5", # "TECDets,111111,TECRing6", # "TECDets,111111,TECRing7", ]) # Filter SelectorRigidAlignables SelectorNonRigidAlignables = SelectorBowedAlignables+SelectorTwoBowedAlignables tmprigidalignables=[] for sra in SelectorRigidAlignables: tmpstrsra = sra.split(',')[0] tmpstrsrafound=False for snra in SelectorNonRigidAlignables: tmpstrsnra = snra.split(',')[0] tmpstrsrafound = (tmpstrsra == tmpstrsnra) if tmpstrsrafound: break if not tmpstrsrafound: tmprigidalignables.append(sra) else: print("{} is already in the non-rigid alignables list. Omitting it in the rigid structures to align.".format(tmpstrsra)) SelectorRigidAlignables = tmprigidalignables process.AlignmentProducer.ParameterBuilder.SelectorBowed = cms.PSet( alignParams = cms.vstring(SelectorBowedAlignables), tecSingleSens = cms.PSet( tecDetId = cms.PSet( ringRanges = cms.vint32(1,4) ) ), ) process.AlignmentProducer.ParameterBuilder.SelectorTwoBowed = cms.PSet( alignParams = cms.vstring(SelectorTwoBowedAlignables), tecDoubleSens = cms.PSet( tecDetId = cms.PSet( ringRanges = cms.vint32(5,7) ) ), ) process.AlignmentProducer.ParameterBuilder.SelectorRigid = cms.PSet( alignParams = cms.vstring(SelectorRigidAlignables), endCapSS = cms.PSet( phiRanges = cms.vdouble(), rRanges = cms.vdouble(40.0, 60.0, 75.0, 999.0), etaRanges = cms.vdouble(), yRanges = cms.vdouble(), xRanges = cms.vdouble(), zRanges = cms.vdouble() ), endCapDS = cms.PSet( phiRanges = cms.vdouble(), rRanges = cms.vdouble(0.0, 40.0, 60.0, 75.0), etaRanges = cms.vdouble(), yRanges = cms.vdouble(), xRanges = cms.vdouble(), zRanges = cms.vdouble() ), TECRing1 = cms.PSet( phiRanges = cms.vdouble(), rRanges = cms.vdouble(20,30), etaRanges = cms.vdouble(), yRanges = cms.vdouble(), xRanges = cms.vdouble(), zRanges = cms.vdouble() ), TECRing2 = cms.PSet( phiRanges = cms.vdouble(), rRanges = cms.vdouble(30,40), etaRanges = cms.vdouble(), yRanges = cms.vdouble(), xRanges = cms.vdouble(), zRanges = cms.vdouble() ), TECRing3 = cms.PSet( phiRanges = cms.vdouble(), rRanges = cms.vdouble(40,50), etaRanges = cms.vdouble(), yRanges = cms.vdouble(), xRanges = cms.vdouble(), zRanges = cms.vdouble() ), TECRing4 = cms.PSet( phiRanges = cms.vdouble(), rRanges = cms.vdouble(50,60), etaRanges = cms.vdouble(), yRanges = cms.vdouble(), xRanges = cms.vdouble(), zRanges = cms.vdouble() ), TECRing5 = cms.PSet( phiRanges = cms.vdouble(), rRanges = cms.vdouble(65,75), etaRanges = cms.vdouble(), yRanges = cms.vdouble(), xRanges = cms.vdouble(), zRanges = cms.vdouble() ), TECRing6 = cms.PSet( phiRanges = cms.vdouble(), rRanges = cms.vdouble(80,90), etaRanges = cms.vdouble(), yRanges = cms.vdouble(), xRanges = cms.vdouble(), zRanges = cms.vdouble() ), TECRing7 = cms.PSet( phiRanges = cms.vdouble(), rRanges = cms.vdouble(95,105), etaRanges = cms.vdouble(), yRanges = cms.vdouble(), xRanges = cms.vdouble(), zRanges = cms.vdouble() ), TOBscan = cms.PSet( phiRanges = cms.vdouble(), rRanges = cms.vdouble(82,90), etaRanges = cms.vdouble(), yRanges = cms.vdouble(), xRanges = cms.vdouble(), zRanges = cms.vdouble(90,110) ), ) process.AlignmentProducer.algoConfig.maxRelParameterError=-1. process.AlignmentProducer.algoConfig.maxAllowedHitPull=-1. process.AlignmentProducer.algoConfig.minimumNumberOfHits=100 process.AlignmentProducer.algoConfig.applyCutsPerComponent = cms.bool(False) # Overrides settings above for the specified detectors process.AlignmentProducer.algoConfig.cutsPerComponent = cms.VPSet( cms.PSet( Selector = process.AlignmentProducer.ParameterBuilder.SelectorRigid, minRelParError = cms.double(0), maxRelParError = cms.double(-1), # -1 for no cut minNHits = cms.int32(30), maxHitPull = cms.double(-1), # -1 for no cut applyPixelProbCut = cms.bool(False), usePixelProbXYOrProbQ = cms.bool(False), minPixelProbXY = cms.double(0), maxPixelProbXY = cms.double(1), minPixelProbQ = cms.double(0), maxPixelProbQ = cms.double(1), ), cms.PSet( Selector = process.AlignmentProducer.ParameterBuilder.SelectorBowed, minRelParError = cms.double(0), maxRelParError = cms.double(-1), # -1 for no cut minNHits = cms.int32(30), maxHitPull = cms.double(-1), # -1 for no cut applyPixelProbCut = cms.bool(False), usePixelProbXYOrProbQ = cms.bool(False), minPixelProbXY = cms.double(0), maxPixelProbXY = cms.double(1), minPixelProbQ = cms.double(0), maxPixelProbQ = cms.double(1), ), cms.PSet( Selector = process.AlignmentProducer.ParameterBuilder.SelectorTwoBowed, minRelParError = cms.double(0), maxRelParError = cms.double(-1), # -1 for no cut minNHits = cms.int32(30), maxHitPull = cms.double(-1), # -1 for no cut applyPixelProbCut = cms.bool(False), usePixelProbXYOrProbQ = cms.bool(False), minPixelProbXY = cms.double(0), maxPixelProbXY = cms.double(1), minPixelProbQ = cms.double(0), maxPixelProbQ = cms.double(1), ), )