Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:46:07

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("EnergyOverMomentumTree")
0004 
0005 # initialize MessageLogger and output report
0006 process.load("FWCore.MessageService.MessageLogger_cfi")
0007 process.MessageLogger.cerr.threshold = 'ERROR'
0008 process.MessageLogger.cerr.FwkReport.reportEvery = 10000
0009 process.MessageLogger.TrackRefitter=dict()
0010 
0011 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(False) )
0012 
0013 # define input files
0014 process.source = cms.Source("PoolSource",
0015     fileNames = cms.untracked.vstring(
0016     '/store/data/Run2011A/Commissioning/ALCARECO/HcalCalIsoTrk-May10ReReco-v2/0000/FEB81703-0E7F-E011-8161-0025B3E05E00.root'
0017     )
0018 )
0019 
0020 process.maxEvents = cms.untracked.PSet(
0021     input = cms.untracked.int32(-1)
0022 )
0023 
0024 # load configuration files
0025 process.load("Configuration.StandardSequences.MagneticField_cff")
0026 process.load("Configuration.Geometry.GeometryRecoDB_cff")
0027 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0028 process.GlobalTag.globaltag = 'GR_R_42_V14::All'
0029 
0030 ## jsonFile =  'json_Apr21_May10v2_Promptv4_136035_167913.txt'
0031 ## import PhysicsTools.PythonAnalysis.LumiList as LumiList
0032 ## import FWCore.ParameterSet.Types as CfgTypes
0033 ## print "JSON used: ", jsonFile
0034 ## myLumis = LumiList.LumiList(filename = jsonFile).getCMSSWString().split(',')
0035 ## process.source.lumisToProcess = CfgTypes.untracked(CfgTypes.VLuminosityBlockRange())
0036 ## process.source.lumisToProcess.extend(myLumis)
0037 
0038 process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi")
0039 
0040 process.load("Geometry.CaloEventSetup.CaloGeometry_cff")
0041 
0042 process.load("Geometry.CaloEventSetup.CaloTopology_cfi")
0043 
0044 process.load("Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi")
0045 
0046 process.load("Geometry.TrackerGeometryBuilder.trackerGeometry_cfi")
0047 
0048 process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi")
0049 
0050 process.load("Geometry.MuonNumbering.muonNumberingInitialization_cfi")
0051 
0052 process.load("Geometry.DTGeometry.dtGeometry_cfi")
0053 
0054 process.load("Geometry.RPCGeometry.rpcGeometry_cfi")
0055 
0056 process.load("Geometry.CSCGeometry.cscGeometry_cfi")
0057 
0058 process.load("Geometry.CommonTopologies.bareGlobalTrackingGeometry_cfi")
0059 #from TrackingTools.TrackAssociator.default_cfi import *
0060 process.load("TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagator_cfi")
0061 process.load("TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagatorAny_cfi")
0062 process.load("TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagatorAlong_cfi")
0063 process.load("TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagatorOpposite_cfi")
0064 process.load("TrackingTools.TrackAssociator.DetIdAssociatorESProducer_cff")
0065 from TrackingTools.TrackAssociator.default_cfi import *
0066 #process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_noesprefer_cff")
0067 
0068 # choose geometry
0069 from CondCore.DBCommon.CondDBSetup_cfi import *
0070 process.trackerAlignment = cms.ESSource("PoolDBESSource",CondDBSetup,
0071                                         #connect = cms.string("frontier://FrontierArc/CMS_COND_31X_ALIGNMENT_AK25"),
0072                                         connect = cms.string("frontier://FrontierArc/CMS_COND_31X_ALIGNMENT_BD19"),
0073                                         toGet = cms.VPSet(cms.PSet(record = cms.string("TrackerAlignmentRcd"),
0074                                                                    tag = cms.string("TrackerAlignment_GR10_v4_offline")
0075                                                                    )## ,
0076 ##                                                           cms.PSet(record = cms.string("TrackerAlignmentErrorExtendedRcd"),
0077 ##                                                                    tag = cms.string("TrackerAlignmentErrorsExtended_GR10_v2_offline")
0078 ##                                                                    ),
0079 ##                                                           cms.PSet(record = cms.string("TrackerSurfaceDeformationRcd"),
0080 ##                                                                    tag = cms.string("Deformations")
0081 ##                                                                    )
0082                                                           )
0083                                         )
0084 process.prefer("trackerAlignment")
0085 
0086 process.load("RecoVertex.BeamSpotProducer.BeamSpot_cfi")
0087 
0088 # configure alignment track selector
0089 process.load("Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi")
0090 process.AlignmentTrackSelector.src = cms.InputTag('TkAlIsoProd:') # 'generalTracks' # trackCollection' # 'ALCARECOTkAlZMuMu' # 'ALCARECOTkAlMinBias' # adjust to input file
0091 process.AlignmentTrackSelector.ptMin = 1.
0092 process.AlignmentTrackSelector.etaMin = -5.
0093 process.AlignmentTrackSelector.etaMax = 5.
0094 process.AlignmentTrackSelector.nHitMin = 5
0095 process.AlignmentTrackSelector.chi2nMax = 100.
0096 #process.AlignmentTrackSelector.applyNHighestPt = True
0097 #process.AlignmentTrackSelector.nHighestPt = 2
0098 
0099 # configure track refitter
0100 process.load("RecoTracker.TrackProducer.TrackRefitters_cff")
0101 process.TrackRefitter.src = cms.InputTag('TkAlIsoProd:')
0102 #process.TrackRefitter.src = cms.InputTag('AlignmentTrackSelector')
0103 process.TrackRefitter.TrajectoryInEvent = True
0104 
0105 # configure tree writer
0106 TrackAssociatorParameterBlock.TrackAssociatorParameters.EERecHitCollectionLabel = cms.InputTag("IsoProd","IsoTrackEcalRecHitCollection")
0107 TrackAssociatorParameterBlock.TrackAssociatorParameters.EBRecHitCollectionLabel = cms.InputTag("IsoProd","IsoTrackEcalRecHitCollection")
0108 TrackAssociatorParameterBlock.TrackAssociatorParameters.HBHERecHitCollectionLabel = cms.InputTag("IsoProd","IsoTrackHBHERecHitCollection")
0109 TrackAssociatorParameterBlock.TrackAssociatorParameters.HORecHitCollectionLabel = cms.InputTag("IsoProd","IsoTrackHORecHitCollection")
0110 
0111 process.energyOverMomentumTree = cms.EDAnalyzer('EopTreeWriter',
0112     TrackAssociatorParameterBlock
0113 )
0114 process.energyOverMomentumTree.src = cms.InputTag('TrackRefitter')
0115 #process.energyOverMomentumTree.src = cms.InputTag('TkAlIsoProd:')
0116 
0117 process.TFileService = cms.Service("TFileService",
0118     fileName = cms.string('EopTree.root')
0119 )
0120 
0121 process.p = cms.Path(process.offlineBeamSpot*process.TrackRefitter*process.energyOverMomentumTree)
0122 #process.p = cms.Path(process.offlineBeamSpot*process.AlignmentTrackSelector*process.TrackRefitter*process.energyOverMomentumTree)