CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/Alignment/HIPAlignmentAlgorithm/python/align_tpl.py

Go to the documentation of this file.
00001 import FWCore.ParameterSet.Config as cms
00002 
00003 process = cms.Process("Alignment")
00004 process.load("Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi")
00005 process.load("RecoTracker.FinalTrackSelectors.TrackerTrackHitFilter_cff")
00006 #process.load("RecoTracker.TransientTrackingRecHit.TransientTrackingRecHitBuilderWithoutRefit_cfi")
00007 process.load("RecoTracker.TrackProducer.TrackRefitters_cff")
00008 process.load("RecoVertex.BeamSpotProducer.BeamSpot_cff")
00009 
00010 
00011 # "including" common configuration <COMMON>
00012 
00013 if 'COSMICS' =='<FLAG>':
00014     process.source = cms.Source("PoolSource",
00015 #                                useCSA08Kludge = cms.untracked.bool(True),
00016                                 fileNames = cms.untracked.vstring('<FILE>')
00017                                 )
00018 else :
00019     process.source = cms.Source("PoolSource",
00020                                 #useCSA08Kludge = cms.untracked.bool(True),
00021                                 fileNames = cms.untracked.vstring('<FILE>')
00022                                 )
00023     
00024 process.load("TrackingTools.TransientTrack.TransientTrackBuilder_cfi")
00025 process.load("RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi")
00026 process.offlinePrimaryVertices.TrackLabel = cms.InputTag("TrackRefitter1")
00027 process.offlinePrimaryVertices.minNdof = cms.double(2.0)
00028 
00029 # "including" selection for this track sample <SELECTION>
00030 
00031 # parameters for HIP
00032 process.AlignmentProducer.tjTkAssociationMapTag = 'TrackRefitter2'
00033 process.AlignmentProducer.hitPrescaleMapTag= 'TkAlHitAssoMapCTF' #if this is not empty, turn on the usage of prescaled hits
00034 #process.AlignmentProducer.hitPrescaleMapTag=''
00035 process.AlignmentProducer.algoConfig.outpath = ''
00036 process.AlignmentProducer.algoConfig.uvarFile = '<PATH>/IOUserVariables.root'
00037 ###process.AlignmentProducer.algoConfig.uvarFile = './IOUserVariables.root'
00038 if 'COSMICS' =='<FLAG>':
00039     process.AlignmentProducer.algoConfig.eventPrescale= 1
00040 else :
00041     process.AlignmentProducer.algoConfig.eventPrescale= 1
00042 process.AlignmentProducer.algoConfig.fillTrackMonitoring=True
00043 process.AlignmentProducer.algoConfig.outfile =  '<PATH>/HIPAlignmentEvents.root'
00044 process.AlignmentProducer.algoConfig.outfile2 = '<PATH>/HIPAlignmentAlignables.root'
00045 process.AlignmentProducer.algoConfig.applyAPE = False
00046 
00047 
00048 #### If we are in collisions, apply selections on PhysDeclared bit, L1 trigger bits, LumiSections
00049 if 'COSMICS' !='<FLAG>':
00050 # process only some lumi sections: from LS69, run 123596 till LS 999 in event 124119 
00051     #process.source.lumisToProcess = cms.untracked.VLuminosityBlockRange('123596:69-124119:999')
00052 # do not process some other runs: in this case: skip all events from event#1 in run 124120 till last event of run 124120
00053     #process.source.eventsToSkip = cms.untracked.VEventRange('124120:1-124120:MAX')
00054 #filters on L1 trigger bits
00055     process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskTechTrigConfig_cff')
00056     process.load('HLTrigger/HLTfilters/hltLevel1GTSeed_cfi')
00057     process.hltLevel1GTSeed.L1TechTriggerSeeding = cms.bool(True)
00058     process.hltLevel1GTSeed.L1SeedsLogicalExpression = cms.string('0 AND (40 OR 41) AND NOT (36 OR 37 OR 38 OR 39) AND NOT ((42 AND (NOT 43)) OR (43 AND (NOT 42)))')
00059     process.load("RecoLocalTracker.SiStripRecHitConverter.OutOfTime_cff")
00060     process.OutOfTime.TOBlateBP=0.071
00061     process.OutOfTime.TIBlateBP=0.036
00062  
00063     process.stripLorentzAngle = cms.ESSource("PoolDBESSource",CondDBSetup,
00064                                              connect = cms.string('sqlite_file:/afs/cern.ch/user/b/benhoob/public/LorentzAngle/SiStripLorentzAngle_Deco.db'),
00065                                              toGet = cms.VPSet(cms.PSet(record = cms.string('SiStripLorentzAngleRcd'),tag =cms.string('SiStripLorentzAngle_Deco') ))
00066                                              )
00067     process.es_prefer_stripLorentzAngle = cms.ESPrefer("PoolDBESSource","stripLorentzAngle")
00068 
00069 
00070 #constraints
00071 
00072 #filter on PhysDecl bit
00073 process.skimming = cms.EDFilter("PhysDecl",
00074                                 applyfilter = cms.untracked.bool(True)
00075                                 )
00076 
00077 if 'MB' == '<FLAG>':
00078 ##USE THIS FOR SKIMMED TRACKS
00079 ###    process.p = cms.Path(process.hltLevel1GTSeed*process.skimming*process.offlineBeamSpot*process.TrackRefitter2)
00080 ##OTHERWISE USE THIS
00081     process.p = cms.Path(process.hltLevel1GTSeed*process.skimming*process.offlineBeamSpot*process.TrackRefitter1*process.TrackerTrackHitFilter*process.ctfProducerCustomised*process.AlignmentTrackSelector*process.TrackRefitter2)
00082 elif 'MBVertex'=='<FLAG>':
00083     process.pvfilter=cms.EDFilter("VertexSelector",
00084                                   filter = cms.bool(True), 
00085                                   src = cms.InputTag('offlinePrimaryVertices'),
00086                                   cut = cms.string("!isFake") 
00087                                   )
00088 ##USE THIS FOR SKIMMED TRACKS
00089 ##    process.p = cms.Path(process.hltLevel1GTSeed*process.skimming*process.offlineBeamSpot*process.TrackRefitter1*process.offlinePrimaryVertices*process.pvfilter*process.doConstraint*process.TrackRefitter2)
00090 ##OTHERWISE USE THIS
00091     process.p = cms.Path(process.hltLevel1GTSeed*process.skimming*process.offlineBeamSpot*process.TrackRefitter1*process.offlinePrimaryVertices*process.pvfilter*process.TrackerTrackHitFilter*process.ctfProducerCustomised*process.AlignmentTrackSelector*process.doConstraint*process.TrackRefitter2)
00092 elif 'COSMICS' =='<FLAG>':
00093 ##USE THIS FOR SKIMMED TRACKS
00094 ##    process.p = cms.Path(process.skimming*process.offlineBeamSpot*process.TrackRefitter1)
00095 ##OTHERWISE USE THIS
00096     process.p = cms.Path(process.skimming*process.offlineBeamSpot*process.TrackRefitter1*process.TrackerTrackHitFilter*process.ctfProducerCustomised*process.AlignmentTrackSelector*process.TrackRefitter2)
00097 else :
00098     process.p = cms.Path(process.hltLevel1GTSeed*process.skimming*process.offlineBeamSpot*process.TrackRefitter1*process.TrackerTrackHitFilter*process.ctfProducerCustomised*process.AlignmentTrackSelector*process.TrackRefitter2)