![]() |
|
|||
File indexing completed on 2024-04-06 11:56:38
0001 # last update on $Date: 2010/02/25 18:44:14 $ by $Author: frmeier $ 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.MessageService.MessageLogger_cfi") 0013 process.MessageLogger.files.alignment = cms.untracked.PSet( 0014 DEBUG = cms.untracked.PSet( 0015 limit = cms.untracked.int32(-1) 0016 ), 0017 INFO = cms.untracked.PSet( 0018 limit = cms.untracked.int32(5), 0019 reportEvery = cms.untracked.int32(5) 0020 ), 0021 WARNING = cms.untracked.PSet( 0022 limit = cms.untracked.int32(10) 0023 ), 0024 ERROR = cms.untracked.PSet( 0025 limit = cms.untracked.int32(-1) 0026 ), 0027 Alignment = cms.untracked.PSet( 0028 limit = cms.untracked.int32(-1), 0029 reportEvery = cms.untracked.int32(1) 0030 ), 0031 enableStatistics = cms.untracked.bool(True) 0032 ) 0033 process.MessageLogger.cerr.enable = cms.untracked.bool(False) 0034 0035 0036 0037 # initialize magnetic field 0038 process.load("Configuration.StandardSequences.MagneticField_cff") 0039 #process.load("Configuration.StandardSequences.MagneticField_0T_cff") 0040 0041 # geometry 0042 process.load("Configuration.Geometry.GeometryRecoDB_cff") 0043 #del process.CaloTopologyBuilder etc. to speed up...??? 0044 0045 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") 0046 #process.GlobalTag.globaltag = 'MC_3XY_V14::All' # take your favourite 0047 process.GlobalTag.globaltag = 'CRAFT09_R_V10::All' # take your favourite 0048 # # if alignment constants not from global tag, add this 0049 #from CondCore.DBCommon.CondDBSetup_cfi import * 0050 #process.trackerAlignment = cms.ESSource( 0051 # "PoolDBESSource", 0052 # CondDBSetup, 0053 # connect = cms.string("frontier://FrontierProd/CMS_COND_31X_ALIGNMENT"), 0054 ## connect = cms.string("frontier://FrontierPrep/CMS_COND_ALIGNMENT"), 0055 # toGet = cms.VPSet(cms.PSet(record = cms.string("TrackerAlignmentRcd"), 0056 # tag = cms.string("TrackerIdealGeometry210_mc") 0057 # ), 0058 # cms.PSet(record = cms.string("TrackerAlignmentErrorExtendedRcd"), 0059 # tag = cms.string("TrackerIdealGeometryErrors210_mc") 0060 # ) 0061 # ) 0062 # ) 0063 #process.es_prefer_trackerAlignment = cms.ESPrefer("PoolDBESSource", "trackerAlignment") 0064 ## might help for double es_prefer: del process.es_prefer_GlobalTag 0065 0066 process.load("RecoVertex.BeamSpotProducer.BeamSpot_cfi") 0067 0068 # track selection for alignment 0069 process.load("Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi") 0070 process.AlignmentTrackSelector.src = 'ALCARECOTkAlZMuMu' #MinBias' #'generalTracks' ## ALCARECOTkAlMuonIsolated # adjust to input file 0071 process.AlignmentTrackSelector.ptMin = 8. 0072 process.AlignmentTrackSelector.etaMin = -5. 0073 process.AlignmentTrackSelector.etaMax = 5. 0074 process.AlignmentTrackSelector.nHitMin = 9 0075 process.AlignmentTrackSelector.chi2nMax = 50. 0076 # some further possibilities 0077 #process.AlignmentTrackSelector.applyNHighestPt = True 0078 #process.AlignmentTrackSelector.nHighestPt = 2 0079 #process.AlignmentTrackSelector.applyChargeCheck = True 0080 #process.AlignmentTrackSelector.minHitChargeStrip = 50. 0081 # needs RECO files: 0082 #process.AlignmentTrackSelector.applyIsolationCut = True 0083 #process.AlignmentTrackSelector.minHitIsolation = 0.8 0084 0085 0086 # refitting 0087 process.load("RecoTracker.TrackProducer.TrackRefitters_cff") 0088 # In the following use 0089 # TrackRefitter (normal tracks), TrackRefitterP5 (cosmics) or TrackRefitterBHM (beam halo) 0090 process.TrackRefitter.src = 'AlignmentTrackSelector' 0091 process.TrackRefitter.TrajectoryInEvent = True 0092 # beam halo propagation needs larger phi changes going from one TEC to another 0093 #process.MaterialPropagator.MaxDPhi = 1000. 0094 # the following for refitting with analytical propagator (maybe for CRUZET?) 0095 #process.load("TrackingTools.KalmanUpdators.KFUpdatorESProducer_cfi") 0096 #process.load("TrackingTools.KalmanUpdators.Chi2MeasurementEstimatorESProducer_cfi") 0097 #process.load("TrackingTools.TrackFitters.KFTrajectoryFitter_cfi") 0098 #process.load("TrackingTools.TrackFitters.KFTrajectorySmoother_cfi") 0099 #process.load("TrackingTools.TrackFitters.KFFittingSmoother_cfi") 0100 #process.load("TrackingTools.GeomPropagators.AnalyticalPropagator_cfi") 0101 #process.load("TrackingTools.KalmanUpdators.Chi2MeasurementEstimatorESProducer_cfi") 0102 #process.TrackRefitter.Propagator = "AnalyticalPropagator" 0103 #process.KFTrajectoryFitter.Propagator = "AnalyticalPropagator" 0104 #process.KFTrajectorySmoother.Propagator = "AnalyticalPropagator" 0105 ## Not to loose hits/tracks, we might want to open the allowed chi^2 contribution for single hits: 0106 ##process.Chi2MeasurementEstimator.MaxChi2 = 50. # untested, default 30 0107 #process.load("RecoLocalTracker.SiStripRecHitConverter.StripCPEfromTrackAngle_cfi") 0108 #process.load("RecoLocalTracker.SiStripRecHitConverter.SiStripRecHitMatcher_cfi") 0109 #process.load("RecoTracker.TransientTrackingRecHit.TransientTrackingRecHitBuilder_cfi") 0110 ## end refitting with analytical propagator 0111 0112 0113 # Alignment producer 0114 process.load("Alignment.CommonAlignmentProducer.AlignmentProducer_cff") 0115 0116 process.AlignmentProducer.ParameterBuilder.Selector = cms.PSet( 0117 alignParams = cms.vstring( 0118 # 'TrackerTECPetalLayers11,fff00f', # 0119 # 'TrackerTECPetalLayers29,111001', # 0120 # 'TrackerTOBRodLayers35,101001', # 0121 # 'TrackerTOBRodLayers66,f0f00f', # 0122 # 'TrackerTOBRodDS,111001', # 0123 # 'TrackerTIDRing,111001', # 0124 # 'TrackerTIBStringSS,101001',# 0125 # 'TrackerTIBStringDS,111001',# 0126 # 'TrackerTPEHalfDisk,111111', 0127 # 'TrackerTPBLadderLayers11,ffff0f', # 0128 # 'TrackerTPBLadderLayers23,111101' # 0129 # 0130 # 'PixelHalfBarrels,rrrrrr', 0131 # 'PXEndCaps,111111', 0132 # 'TrackerTOBHalfBarrel,111111', 0133 # 'TrackerTIBHalfBarrel,111111', 0134 # 'TrackerTECEndcap,111111', 0135 # 'TrackerTIDEndcap,111111', 0136 # 'PixelDets,111001', 0137 # 'BarrelDetsDS,111001', 0138 # 'TECDets,111001,endCapDS', 0139 # 'TIDDets,111001,endCapDS', 0140 # 'BarrelDetsSS,101001', 0141 # 'TECDets,101001,endCapSS', 0142 # 'TIDDets,101001,endCapSS' 0143 # 0144 # very simple scenario for testing 0145 # # 6 parameters for larger structures 0146 'PixelHalfBarrels,ffffff', 0147 'PXEndCaps,111111', 0148 'TrackerTOBHalfBarrel,111111', 0149 'TrackerTIBHalfBarrel,111111', 0150 'TrackerTECEndcap,ffffff', 0151 'TrackerTIDEndcap,ffffff' 0152 ), 0153 endCapSS = cms.PSet( 0154 rRanges = cms.vdouble(40.0, 60.0, 75.0, 999.0) 0155 ), 0156 endCapDS = cms.PSet( 0157 rRanges = cms.vdouble(0.0, 40.0, 60.0, 75.0) 0158 ) 0159 ) 0160 #process.AlignmentProducer.doMuon = True # to align muon system 0161 process.AlignmentProducer.doMisalignmentScenario = False #True 0162 # If the above is true, you might want to choose the scenario: 0163 #from Alignment.TrackerAlignment.Scenarios_cff import * 0164 #process.AlignmentProducer.MisalignmentScenario = TrackerSurveyLASOnlyScenario 0165 process.AlignmentProducer.applyDbAlignment = True # neither globalTag nor trackerAlignment 0166 0167 # assign by reference (i.e. could change MillePedeAlignmentAlgorithm as well): 0168 process.AlignmentProducer.algoConfig = process.MillePedeAlignmentAlgorithm 0169 0170 #from Alignment.MillePedeAlignmentAlgorithm.PresigmaScenarios_cff import * 0171 #process.AlignmentProducer.algoConfig.pedeSteerer.Presigmas.extend(TrackerShortTermPresigmas.Presigmas) 0172 process.AlignmentProducer.algoConfig.mode = 'full' # 'mille' # 'pede' # 'pedeSteerer' 0173 process.AlignmentProducer.algoConfig.binaryFile = 'milleBinaryISN.dat' 0174 process.AlignmentProducer.algoConfig.treeFile = 'treeFileISN.root' 0175 0176 #process.AlignmentProducer.algoConfig.TrajectoryFactory = process.TwoBodyDecayTrajectoryFactory # BzeroReferenceTrajectoryFactory 0177 #process.AlignmentProducer.algoConfig.TrajectoryFactory.PropagationDirection = 'oppositeToMomentum' 0178 process.AlignmentProducer.algoConfig.TrajectoryFactory.MaterialEffects = 'BrokenLinesCoarse' #'BreakPoints' #'Combined', ## or "MultipleScattering" or "EnergyLoss" or "None" 0179 # ...OR TwoBodyDecayTrajectoryFactory OR ... 0180 #process.AlignmentProducer.algoConfig.max2Dcorrelation = 2. # to switch off 0181 ##default is sparsGMRES <method> n(iter) Delta(F) 0182 #process.AlignmentProducer.algoConfig.pedeSteerer.method = 'inversion 9 0.8' 0183 #process.AlignmentProducer.algoConfig.pedeSteerer.options = cms.vstring( 0184 # 'entries 100', 0185 # 'chisqcut 20.0 4.5' # ,'outlierdownweighting 3' #,'dwfractioncut 0.1' 0186 #) 0187 #process.AlignmentProducer.algoConfig.pedeSteerer.pedeCommand = '/afs/cern.ch/user/f/flucke/cms/pede/MillepedeII/pede_1GB' 0188 0189 process.source = cms.Source("EmptySource") 0190 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(0) ) 0191 0192 #process.source = cms.Source("PoolSource", 0193 # skipEvents = cms.untracked.uint32(0), 0194 # fileNames = cms.untracked.vstring( 0195 # #'/store/relval/CMSSW_3_0_0_pre2/RelValTTbar/ALCARECO/STARTUP_V7_StreamALCARECOTkAlMinBias_v2/0001/580E7A0F-1DB4-DD11-8AA8-001617DBD224.root' 0196 # # <== is a relval from CMSSW_3_0_0_pre2. 0197 # #"file:aFile.root" #"rfio:/castor/cern.ch/cms/store/..." 0198 # #'/store/mc/Summer09/MinBias/ALCARECO/MC_31X_V3_StreamTkAlMinBias-v2/0005/C2F77DDA-0292-DE11-BD6B-001731A2870D.root' 0199 # # <== from /MinBias/Summer09-MC_31X_V3_StreamTkAlMinBias-v2/ALCARECO 0200 # '/store/mc/Summer09/Zmumu/ALCARECO/MC_31X_V3_7TeV_StreamTkAlZMuMu-v1/0000/FACBA5D7-B1A2-DE11-AE4A-001E4F3F28D8.root' 0201 # # <== /Zmumu/Summer09-MC_31X_V3_7TeV_StreamTkAlZMuMu-v1/ALCARECO 0202 # #'file:/tmp/flucke/Summer09_Zmumu_ALCARECO_MC_31X_V3_7TeV_StreamTkAlZMuMu-v1_0000_FACBA5D7-B1A2-DE11-AE4A-001E4F3F28D8.root' 0203 # 0204 # ) 0205 # ) 0206 #process.source = cms.Source("EmptySource") 0207 #process.maxEvents = cms.untracked.PSet( 0208 # input = cms.untracked.int32(0) 0209 # ) 0210 0211 process.AlignmentProducer.algoConfig.surveyPixelBarrel.doSurvey = True 0212 process.AlignmentProducer.algoConfig.surveyPixelBarrel.doOutputOnStdout = True 0213 process.AlignmentProducer.algoConfig.surveyPixelBarrel.infile = cms.FileInPath("Alignment/MillePedeAlignmentAlgorithm/test/toySurveyInfo1.txt") 0214 process.AlignmentProducer.algoConfig.surveyPixelBarrel.doToySurvey = True 0215 process.AlignmentProducer.algoConfig.surveyPixelBarrel.toySurveyParameters = cms.VPSet( 0216 # Position of photo in local frame (unit: pixels in photo) 0217 cms.PSet(name = cms.string('a0'), mean = cms.double(1879.11,), sigma = cms.double(0.)), 0218 cms.PSet(name = cms.string('a1'), mean = cms.double(2476.56,), sigma = cms.double(0.)), 0219 # Scale of photo (unit: pixels per cm) 0220 cms.PSet(name = cms.string('scale'), mean = cms.double(1168.68), sigma = cms.double(0.)), 0221 # Rotation of photo in local frame (unit: rads) 0222 cms.PSet(name = cms.string('phi'), mean = cms.double(0.00887099), sigma = cms.double(0.)), 0223 # Smearing of measurements in u and v coordinate (unit: pixels in photo) 0224 cms.PSet(name = cms.string('u'), mean = cms.double(0.), sigma = cms.double(0.175)), 0225 cms.PSet(name = cms.string('v'), mean = cms.double(0.), sigma = cms.double(0.175)) 0226 ) 0227 0228 0229 process.p = cms.Path(process.offlineBeamSpot*process.AlignmentTrackSelector*process.TrackRefitter) 0230 0231 # all fits/refits with 'StripCPEgeometric' - but take about TTRHBuilder used ibn (re)fit 0232 # (works until 'StripCPEgeometric' gets default...) 0233 #process.load("RecoLocalTracker.SiStripRecHitConverter.StripCPEgeometric_cfi") 0234 #process.TTRHBuilderAngleAndTemplate.StripCPE = 'StripCPEgeometric' 0235 0236 #--- SAVE ALIGNMENT CONSTANTS TO DB -------------------------------- 0237 # Default in MPS is saving as alignment_MP.db. Uncomment next line not to save them. 0238 # For a standalone (non-MPS) run, uncomment also the PoolDBOutputService part. 0239 #process.AlignmentProducer.saveToDB = True 0240 ##process.AlignmentProducer.saveApeToDB = True # no sense: Millepede does not set it! 0241 #from CondCore.DBCommon.CondDBSetup_cfi import * 0242 #process.PoolDBOutputService = cms.Service( 0243 # "PoolDBOutputService", 0244 # CondDBSetup, 0245 # timetype = cms.untracked.string('runnumber'), 0246 # connect = cms.string('sqlite_file:TkAlignment.db'), 0247 # toPut = cms.VPSet(cms.PSet( 0248 # record = cms.string('TrackerAlignmentRcd'), 0249 # tag = cms.string('testTag') 0250 # )#, 0251 # # cms.PSet( 0252 # # record = cms.string('TrackerAlignmentErrorExtendedRcd'), 0253 # # tag = cms.string('testTagAPE') # needed is saveApeToDB = True 0254 # #) 0255 # ) 0256 # ) 0257 # MPS needs next line as placeholder for pede _cfg.py: 0258 #MILLEPEDEBLOCK 0259
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.2.1 LXR engine. The LXR team |
![]() ![]() |