![]() |
|
|||
File indexing completed on 2023-03-17 10:39:34
0001 # last update on $Date: 2009/07/17 14:17:33 $ by $Author: kaschube $ 0002 0003 import FWCore.ParameterSet.Config as cms 0004 0005 process = cms.Process("Alignment") 0006 0007 process.options = cms.untracked.PSet( 0008 Rethrow = cms.untracked.vstring("ProductNotFound") # do not accept this exception 0009 ) 0010 0011 # initialize MessageLogger 0012 # process.load("FWCore.MessageLogger.MessageLogger_cfi") 0013 # This whole mess does not really work - I do not get rid of FwkReport and TrackProducer info... 0014 process.MessageLogger = cms.Service("MessageLogger", 0015 cerr = cms.untracked.PSet( 0016 enable = cms.untracked.bool(False) 0017 ), 0018 files = cms.untracked.PSet( 0019 alignment = cms.untracked.PSet( 0020 Alignment = cms.untracked.PSet( 0021 limit = cms.untracked.int32(-1) 0022 ), 0023 DEBUG = cms.untracked.PSet( 0024 limit = cms.untracked.int32(-1) 0025 ), 0026 ERROR = cms.untracked.PSet( 0027 limit = cms.untracked.int32(-1) 0028 ), 0029 INFO = cms.untracked.PSet( 0030 limit = cms.untracked.int32(10) 0031 ), 0032 LogicError = cms.untracked.PSet( 0033 limit = cms.untracked.int32(-1) 0034 ), 0035 WARNING = cms.untracked.PSet( 0036 limit = cms.untracked.int32(10) 0037 ), 0038 enableStatistics = cms.untracked.bool(True), 0039 threshold = cms.untracked.string('DEBUG') 0040 ) 0041 ) 0042 ) 0043 0044 # initialize magnetic field 0045 process.load("Configuration.StandardSequences.MagneticField_cff") 0046 #process.load("Configuration.StandardSequences.MagneticField_0T_cff") 0047 0048 # ideal geometry and interface 0049 process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi") 0050 process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi") 0051 # for Muon: process.load("Geometry.MuonNumbering.muonNumberingInitialization_cfi") 0052 0053 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") 0054 process.GlobalTag.globaltag = 'MC_31X_V3::All' #'IDEAL_V12::All' # 'CRAFT_ALL_V11::All' # 'IDEAL_30X::All' # take your favourite 0055 0056 # using database file 0057 from CondCore.DBCommon.CondDBSetup_cfi import * 0058 process.trackerAlignment = cms.ESSource("PoolDBESSource", 0059 CondDBSetup, 0060 # connect = cms.string("sqlite_file:/afs/cern.ch/user/k/kaschube/cms/CMSSW_2_2_10/src/LasReader/TestProducer/alignments_MP.db"), 0061 # connect = cms.string("frontier://FrontierProd/CMS_COND_21X_ALIGNMENT"), 0062 connect = cms.string("frontier://FrontierProd/CMS_COND_31X_FROM21X"), 0063 toGet = cms.VPSet(cms.PSet(record = cms.string("TrackerAlignmentRcd"), 0064 tag = cms.string("TrackerGeometry_v5_offline")), #"Alignments" 0065 cms.PSet(record = cms.string("TrackerAlignmentErrorExtendedRcd"), 0066 tag = cms.string("TrackerGeometryErrors_v5_offline")) #"AlignmentErrorsExtended" 0067 ) 0068 ) 0069 process.es_prefer_trackerAlignment = cms.ESPrefer("PoolDBESSource","trackerAlignment") 0070 #del process.es_prefer_GlobalTag 0071 0072 process.load("RecoVertex.BeamSpotProducer.BeamSpot_cfi") 0073 0074 # track selection for alignment 0075 process.load("Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi") 0076 process.AlignmentTrackSelector.src = 'ALCARECOTkAlMinBias' #'generalTracks' ## ALCARECOTkAlMuonIsolated # adjust to input file 0077 process.AlignmentTrackSelector.ptMin = 2. 0078 process.AlignmentTrackSelector.etaMin = -5. 0079 process.AlignmentTrackSelector.etaMax = 5. 0080 process.AlignmentTrackSelector.nHitMin = 9 0081 process.AlignmentTrackSelector.chi2nMax = 100. 0082 # some further possibilities 0083 #process.AlignmentTrackSelector.applyNHighestPt = True 0084 #process.AlignmentTrackSelector.nHighestPt = 2 0085 #process.AlignmentTrackSelector.applyChargeCheck = True 0086 #process.AlignmentTrackSelector.minHitChargeStrip = 50. 0087 # needs RECO files: 0088 #process.AlignmentTrackSelector.applyIsolationCut = True 0089 #process.AlignmentTrackSelector.minHitIsolation = 0.8 0090 0091 0092 # refitting 0093 process.load("RecoTracker.TrackProducer.TrackRefitters_cff") 0094 # In the following use 0095 # TrackRefitter (normal tracks), TrackRefitterP5 (cosmics) or TrackRefitterBHM (beam halo) 0096 process.TrackRefitter.src = 'AlignmentTrackSelector' 0097 process.TrackRefitter.TrajectoryInEvent = True 0098 # beam halo propagation needs larger phi changes going from one TEC to another 0099 #process.MaterialPropagator.MaxDPhi = 1000. 0100 # the following for refitting with analytical propagator (maybe for CRUZET?) 0101 #process.load("TrackingTools.KalmanUpdators.KFUpdatorESProducer_cfi") 0102 #process.load("TrackingTools.KalmanUpdators.Chi2MeasurementEstimatorESProducer_cfi") 0103 #process.load("TrackingTools.TrackFitters.KFTrajectoryFitter_cfi") 0104 #process.load("TrackingTools.TrackFitters.KFTrajectorySmoother_cfi") 0105 #process.load("TrackingTools.TrackFitters.KFFittingSmoother_cfi") 0106 #process.load("TrackingTools.GeomPropagators.AnalyticalPropagator_cfi") 0107 #process.load("TrackingTools.KalmanUpdators.Chi2MeasurementEstimatorESProducer_cfi") 0108 #process.TrackRefitter.Propagator = "AnalyticalPropagator" 0109 #process.KFTrajectoryFitter.Propagator = "AnalyticalPropagator" 0110 #process.KFTrajectorySmoother.Propagator = "AnalyticalPropagator" 0111 ## Not to loose hits/tracks, we might want to open the allowed chi^2 contribution for single hits: 0112 ##process.Chi2MeasurementEstimator.MaxChi2 = 50. # untested, default 30 0113 #process.load("RecoLocalTracker.SiStripRecHitConverter.StripCPEfromTrackAngle_cfi") 0114 #process.load("RecoLocalTracker.SiStripRecHitConverter.SiStripRecHitMatcher_cfi") 0115 #process.load("RecoTracker.TransientTrackingRecHit.TransientTrackingRecHitBuilder_cfi") 0116 ## end refitting with analytical propagator 0117 0118 0119 # Alignment producer 0120 process.load("Alignment.CommonAlignmentProducer.AlignmentProducer_cff") 0121 0122 process.AlignmentProducer.ParameterBuilder.Selector = cms.PSet( 0123 alignParams = cms.vstring( 0124 # 'PixelHalfBarrels,rrrrrr', 0125 # 'PXEndCaps,111111', 0126 # 'TrackerTOBHalfBarrel,111111', 0127 # 'TrackerTIBHalfBarrel,111111', 0128 # 'TrackerTECEndcap,111111', 0129 # 'TrackerTIDEndcap,111111', 0130 # 'PixelDets,111001', 0131 # 'BarrelDetsDS,111001', 0132 # 'TECDets,111001,endCapDS', 0133 # 'TIDDets,111001,endCapDS', 0134 # 'BarrelDetsSS,101001', 0135 # 'TECDets,101001,endCapSS', 0136 # 'TIDDets,101001,endCapSS' 0137 # 0138 # very simple scenario for testing 0139 # # 6 parameters for larger structures 0140 # 'PixelHalfBarrels,ffffff', 0141 # 'PXEndCaps,111111', 0142 # 'TrackerTOBHalfBarrel,111111', 0143 # 'TrackerTIBHalfBarrel,111111', 0144 # 'TrackerTECEndcap,ffffff', 0145 # 'TrackerTIDEndcap,ffffff' 0146 # 0147 #'TrackerTPBHalfBarrel,rrrrrr', 0148 #'TrackerTPEEndcap,rrrrrr', 0149 #'TrackerTIBHalfBarrel,110111', 0150 'TrackerTIBHalfBarrel,ff0fff,zIsNeg', # not yet enough fixed d.o.f. ... 0151 'TrackerTIBHalfBarrel,110111,zIsPos', 0152 'TrackerTOBHalfBarrel,110111', 0153 #'TrackerTECEndcap,111111', 0154 #'TIBSSLayers,110111', 0155 #'TIBDSLayers,111111', 0156 #'TOBSSLayers,110111', 0157 #'TOBDSLayers,111111', 0158 #'TECLayers,111111' 0159 0160 'TrackerTECDisk,110001'#, 0161 # 'TrackerTECEndcap,ff0fff' 0162 # 'TrackerTECDiskLayers11,ff0fff', 0163 # 'TrackerTECDiskLayers28,110111', 0164 # 'TrackerTECDiskLayers99,ff0fff' 0165 0166 ), 0167 endCapSS = cms.PSet( 0168 phiRanges = cms.vdouble(), 0169 rRanges = cms.vdouble(40.0, 60.0, 75.0, 999.0), 0170 etaRanges = cms.vdouble(), 0171 yRanges = cms.vdouble(), 0172 xRanges = cms.vdouble(), 0173 zRanges = cms.vdouble() 0174 ), 0175 endCapDS = cms.PSet( 0176 phiRanges = cms.vdouble(), 0177 rRanges = cms.vdouble(0.0, 40.0, 60.0, 75.0), 0178 etaRanges = cms.vdouble(), 0179 yRanges = cms.vdouble(), 0180 xRanges = cms.vdouble(), 0181 zRanges = cms.vdouble() 0182 ), 0183 zIsPos = cms.PSet(phiRanges = cms.vdouble(), 0184 rRanges = cms.vdouble(), 0185 etaRanges = cms.vdouble(), 0186 yRanges = cms.vdouble(), 0187 xRanges = cms.vdouble(), 0188 zRanges = cms.vdouble(-99999., 0.) 0189 ), 0190 zIsNeg = cms.PSet(phiRanges = cms.vdouble(), 0191 rRanges = cms.vdouble(), 0192 etaRanges = cms.vdouble(), 0193 yRanges = cms.vdouble(), 0194 xRanges = cms.vdouble(), 0195 zRanges = cms.vdouble(0, 99999.) 0196 ) 0197 ) 0198 0199 # LAS first test misalignment 0200 #process.AlignmentProducer.MisalignmentScenario = cms.PSet( 0201 #saveToDbase = cms.untracked.bool(False), 0202 #setRotations = cms.bool(True), 0203 #setTranslations = cms.bool(True), 0204 #seed = cms.int32(121212), 0205 #distribution = cms.string('gaussian'), 0206 #setError = cms.bool(True), 0207 0208 # TECs = cms.PSet( 0209 # TECsDisks = cms.PSet( 0210 # dZlocal = cms.double(0.0), 0211 # phiXlocal = cms.double(0.0), 0212 # dYlocal = cms.double(0.05), 0213 # phiZlocal = cms.double(0.001), 0214 # dXlocal = cms.double(0.05)#, 0215 # phiYlocal = cms.double(0.0) 0216 # )#, 0217 # TECDisk5 = cms.PSet( # from TrackerNoKnowledgeScenario 0218 # dZlocal = cms.double(0.0112), 0219 # phiXlocal = cms.double(0.0002), 0220 # dYlocal = cms.double(0.01), 0221 # phiZlocal = cms.double(0.0001), 0222 # dXlocal = cms.double(0.01)#, 0223 # phiYlocal = cms.double(0.0001) 0224 # ) 0225 # TECDisk2_3_4_5_6_7_8 = cms.PSet( 0226 # dZlocal = cms.double(0.0112), 0227 # phiZlocal = cms.double(0.0001), 0228 # dXlocal = cms.double(0.0112), 0229 # phiXlocal = cms.double(0.0002), 0230 # dYlocal = cms.double(0.0206), 0231 # phiYlocal = cms.double(0.0001) 0232 # ) 0233 # ) 0234 #) 0235 0236 #process.AlignmentProducer.doMuon = True # to align muon system 0237 process.AlignmentProducer.doMisalignmentScenario = True # False 0238 # If the above is true, you might want to choose the scenario: 0239 #from Alignment.TrackerAlignment.Scenarios_cff import * 0240 #process.AlignmentProducer.MisalignmentScenario = TrackerSurveyLASOnlyScenario 0241 process.AlignmentProducer.applyDbAlignment = True # neither globalTag nor trackerAlignment 0242 # monitor not strictly needed: 0243 #process.TFileService = cms.Service("TFileService", fileName = cms.string("histograms.root")) 0244 #process.AlignmentProducer.monitorConfig = cms.PSet(monitors = cms.untracked.vstring ("AlignmentMonitorGeneric"), 0245 # AlignmentMonitorGeneric = cms.untracked.PSet() 0246 # ) 0247 0248 process.AlignmentProducer.algoConfig = cms.PSet( 0249 process.MillePedeAlignmentAlgorithm 0250 ) 0251 0252 #from Alignment.MillePedeAlignmentAlgorithm.PresigmaScenarios_cff import * 0253 #process.AlignmentProducer.algoConfig.pedeSteerer.Presigmas.extend(TrackerShortTermPresigmas.Presigmas) 0254 process.AlignmentProducer.algoConfig.mode = 'full' # 'full' # 'mille' # 'pede' # 'pedeSteer' 0255 process.AlignmentProducer.algoConfig.mergeBinaryFiles = cms.vstring() 0256 process.AlignmentProducer.algoConfig.monitorFile = cms.untracked.string("millePedeMonitor.root") 0257 process.AlignmentProducer.algoConfig.binaryFile = cms.string("milleBinaryISN.dat") 0258 #process.AlignmentProducer.algoConfig.TrajectoryFactory = process.BzeroReferenceTrajectoryFactory 0259 # ...OR TwoBodyDecayTrajectoryFactory OR ... 0260 #process.AlignmentProducer.algoConfig.max2Dcorrelation = 2. # to switch off 0261 #process.AlignmentProducer.algoConfig.fileDir = '/tmp/flucke' 0262 #process.AlignmentProducer.algoConfig.pedeReader.fileDir = './' 0263 #process.AlignmentProducer.algoConfig.treeFile = 'treeFile_lasFirst.root' 0264 ##default is sparsGMRES <method> n(iter) Delta(F) 0265 process.AlignmentProducer.algoConfig.pedeSteerer.method = 'diagonalisation 6 0.8' 0266 process.AlignmentProducer.algoConfig.pedeSteerer.options = cms.vstring( 0267 'hugecut 500.0', 0268 'entries 1' #, 'pedeSteerHierarchy_tecdisks.txt' 0269 #'chisqcut 20.0 4.5' # ,'outlierdownweighting 3' #,'dwfractioncut 0.1' 0270 #'bandwidth 6' 0271 ) 0272 #process.AlignmentProducer.algoConfig.pedeSteerer.steerFileDebug = True 0273 #process.AlignmentProducer.algoConfig.pedeSteerer.minHieraConstrCoeff = 0. 0274 #process.AlignmentProducer.algoConfig.pedeSteerer.minHieraParPerConstr = 1 0275 0276 0277 process.source = cms.Source("PoolSource", 0278 skipEvents = cms.untracked.uint32(0), 0279 fileNames = cms.untracked.vstring( 0280 #"file:aFile.root" #"rfio:/castor/cern.ch/cms/store/..." 0281 #"file:/afs/cern.ch/user/k/kaschube/cms/CMSSW_2_2_10/src/Alignment/LaserAlignment/tkLasBeams_dataCRAFT.root" 0282 "file:/afs/cern.ch/user/f/flucke/cms/CMSSW/CMSSW_3_1_0_pre10/src/tkLasBeams_3_1_X.root" 0283 # old: tkLasBeams_dataCRAFT.root; new, bad: tkLasBeams_CRAFT_2_2_9.root 0284 ) 0285 ) 0286 0287 #process.source = cms.Source("EmptySource") 0288 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) ) 0289 0290 process.load("Alignment.LaserAlignment.TkLasBeamFitter_cfi") 0291 process.AlignmentProducer.tkLasBeamTag = "TkLasBeamFitter" 0292 0293 0294 process.p = cms.Path(process.offlineBeamSpot 0295 *process.TkLasBeamFitter 0296 #*process.AlignmentTrackSelector 0297 #*process.TrackRefitter 0298 ) 0299 0300 #--- SAVE ALIGNMENT CONSTANTS TO DB -------------------------------- 0301 # Default in MPS is saving as alignment_MP.db. Uncomment next line not to save them. 0302 # For a standalone (non-MPS) run, uncomment also the PoolDBOutputService part. 0303 #process.AlignmentProducer.saveToDB = True 0304 ##process.AlignmentProducer.saveApeToDB = True # no sense: Millepede does not set it! 0305 #from CondCore.DBCommon.CondDBSetup_cfi import * 0306 #process.PoolDBOutputService = cms.Service( 0307 # "PoolDBOutputService", 0308 # CondDBSetup, 0309 # timetype = cms.untracked.string('runnumber'), 0310 # connect = cms.string('sqlite_file:TkAlignment.db'), 0311 # toPut = cms.VPSet(cms.PSet( 0312 # record = cms.string('TrackerAlignmentRcd'), 0313 # tag = cms.string('testTag') 0314 # )#, 0315 # # cms.PSet( 0316 # # record = cms.string('TrackerAlignmentErrorExtendedRcd'), 0317 # # tag = cms.string('testTagAPE') # needed is saveApeToDB = True 0318 # #) 0319 # ) 0320 # ) 0321 # MPS needs next line as placeholder for pede _cfg.py: 0322 #MILLEPEDEBLOCK 0323
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.2.1 LXR engine. The LXR team |
![]() ![]() |