Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:59:57

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 import FWCore.ParameterSet.VarParsing as VarParsing
0004 options = VarParsing.VarParsing()
0005 options.register("isUnitTest",
0006                  False,
0007                  VarParsing.VarParsing.multiplicity.singleton,
0008                  VarParsing.VarParsing.varType.bool,
0009                  "are we running the unit test")
0010 options.parseArguments()
0011 
0012 process = cms.Process("CPEana")
0013 
0014 ### Standard Configurations
0015 process.load('Configuration.StandardSequences.Services_cff')
0016 process.load('Configuration.EventContent.EventContent_cff')
0017 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0018 process.load('Configuration.StandardSequences.MagneticField_cff')
0019 process.load('Configuration.StandardSequences.RawToDigi_cff')
0020 process.load('Configuration.StandardSequences.L1Reco_cff')
0021 process.load('Configuration.StandardSequences.Reconstruction_cff')
0022 
0023 ### global tag
0024 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0025 from Configuration.AlCa.GlobalTag import GlobalTag
0026 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run3_data', '')
0027 
0028 ### initialize MessageLogger and output report
0029 process.load('FWCore.MessageService.MessageLogger_cfi')   
0030 process.MessageLogger.cerr.enable = False
0031 process.MessageLogger.SiStripCPEAnalyzer =dict()  
0032 process.MessageLogger.cout = cms.untracked.PSet(
0033     enable = cms.untracked.bool(True),
0034     threshold = cms.untracked.string("INFO"),
0035     default   = cms.untracked.PSet(limit = cms.untracked.int32(0)),                       
0036     FwkReport = cms.untracked.PSet(limit = cms.untracked.int32(-1),
0037                                    reportEvery = cms.untracked.int32((10 if options.isUnitTest else 100 ))
0038                                    ),                                                      
0039     SiStripCPEAnalyzer = cms.untracked.PSet( limit = cms.untracked.int32(-1)),
0040     enableStatistics = cms.untracked.bool(True)
0041     )
0042 
0043 process.options   = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
0044 
0045 ### Events and data source
0046 
0047 if(options.isUnitTest):
0048     process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10) )
0049 else:
0050     process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
0051 
0052 process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring(
0053     "/store/express/Run2022F/StreamExpress/ALCARECO/SiStripCalMinBias-Express-v1/000/362/167/00000/ef6009e4-6857-40a1-9a55-0c702021caad.root",
0054     "/store/express/Run2022F/StreamExpress/ALCARECO/SiStripCalMinBias-Express-v1/000/362/167/00000/ef6cdbda-400c-4813-b4c7-9dfacd070e08.root",
0055     "/store/express/Run2022F/StreamExpress/ALCARECO/SiStripCalMinBias-Express-v1/000/362/167/00000/f1a88b5f-8573-403e-aa35-0ad6b57125c0.root",
0056     "/store/express/Run2022F/StreamExpress/ALCARECO/SiStripCalMinBias-Express-v1/000/362/167/00000/f1c537d0-2265-403b-84f9-dacb5a63c03f.root",
0057     "/store/express/Run2022F/StreamExpress/ALCARECO/SiStripCalMinBias-Express-v1/000/362/167/00000/f30d1b57-eda6-4836-9ed6-cd683945a1e0.root",
0058     "/store/express/Run2022F/StreamExpress/ALCARECO/SiStripCalMinBias-Express-v1/000/362/167/00000/f3c7f61d-7f6b-4021-b6c2-a15b66e3f375.root",
0059     "/store/express/Run2022F/StreamExpress/ALCARECO/SiStripCalMinBias-Express-v1/000/362/167/00000/f3e11a67-7a78-4f6e-9b9b-b7687ce16c68.root",
0060     "/store/express/Run2022F/StreamExpress/ALCARECO/SiStripCalMinBias-Express-v1/000/362/167/00000/f4250ffa-e73e-4e42-baa7-aebd8b169105.root",
0061     "/store/express/Run2022F/StreamExpress/ALCARECO/SiStripCalMinBias-Express-v1/000/362/167/00000/f4c4cb8e-5c92-49b4-9fd3-40e09c4cf48a.root",
0062     "/store/express/Run2022F/StreamExpress/ALCARECO/SiStripCalMinBias-Express-v1/000/362/167/00000/f4f5e6bd-0a16-4937-a3eb-5b76333d9c4d.root"))
0063 
0064 ### Track refitter specific stuff
0065 process.load("RecoVertex.BeamSpotProducer.BeamSpot_cff")
0066 import RecoTracker.TrackProducer.TrackRefitter_cfi
0067 import CommonTools.RecoAlgos.recoTrackRefSelector_cfi
0068 process.mytkselector = CommonTools.RecoAlgos.recoTrackRefSelector_cfi.recoTrackRefSelector.clone()
0069 process.mytkselector.src = 'ALCARECOSiStripCalMinBias'
0070 process.mytkselector.quality = ['highPurity']
0071 process.mytkselector.min3DLayer = 2
0072 process.mytkselector.ptMin = 0.5
0073 process.mytkselector.tip = 1.0
0074 process.myRefittedTracks = RecoTracker.TrackProducer.TrackRefitter_cfi.TrackRefitter.clone()
0075 process.myRefittedTracks.src= 'mytkselector'
0076 process.myRefittedTracks.NavigationSchool = ''
0077 process.myRefittedTracks.Fitter = 'FlexibleKFFittingSmoother'
0078 
0079 ### Analyzer
0080 process.SiStripCPEAnalyzer = cms.EDAnalyzer('SiStripCPEAnalyzer',
0081                                             tracks = cms.untracked.InputTag("ALCARECOSiStripCalMinBias",""),
0082                                             trajectories = cms.untracked.InputTag('myRefittedTracks'),
0083                                             association = cms.untracked.InputTag('myRefittedTracks'),
0084                                             clusters = cms.untracked.InputTag('ALCARECOSiStripCalMinBias'),
0085                                             StripCPE = cms.ESInputTag('StripCPEfromTrackAngleESProducer:StripCPEfromTrackAngle'))
0086 
0087 ### TFileService: output histogram or ntuple
0088 process.TFileService = cms.Service("TFileService",
0089                                    fileName = cms.string('histodemo.root'))
0090 
0091 ### Finally, put together the sequence
0092 process.p = cms.Path(process.offlineBeamSpot*process.mytkselector+process.myRefittedTracks+process.SiStripCPEAnalyzer)