CMS 3D CMS Logo

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