Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # load era modifier to run on 2022 data
0004 from Configuration.Eras.Modifier_ctpps_2022_cff import ctpps_2022
0005 
0006 process = cms.Process( 'TEST',ctpps_2022)
0007 
0008 # command  line options
0009 import FWCore.ParameterSet.VarParsing as VarParsing
0010 options = VarParsing.VarParsing('analysis')
0011 options.register('runNo',
0012                 1,
0013                 VarParsing.VarParsing.multiplicity.singleton,
0014                 VarParsing.VarParsing.varType.int,
0015                 "Run number")
0016 options.parseArguments()
0017 
0018 run_no = options.runNo
0019 
0020 # LHCInfo plotter
0021 process.load('Validation.CTPPS.ctppsLHCInfoPlotter_cfi')
0022 process.ctppsLHCInfoPlotter.outputFile = f"alcareco_lhc_info_prompt_{run_no}.root"
0023 
0024 # Load geometry from DB
0025 process.load("Geometry.VeryForwardGeometry.geometryRPFromDB_cfi")
0026 
0027 # track distribution plotter
0028 process.ctppsTrackDistributionPlotter = cms.EDAnalyzer("CTPPSTrackDistributionPlotter",
0029   tagTracks = cms.InputTag("ctppsLocalTrackLiteProducerAlCaRecoProducer"),
0030 
0031   rpId_45_F = cms.uint32(23),
0032   rpId_45_N = cms.uint32(3),
0033   rpId_56_N = cms.uint32(103),
0034   rpId_56_F = cms.uint32(123),
0035 
0036   outputFile = cms.string(f"alcareco_tracks_prompt_{run_no}.root")
0037 )
0038 
0039 # reconstruction plotter
0040 process.ctppsProtonReconstructionPlotter = cms.EDAnalyzer("CTPPSProtonReconstructionPlotter",
0041   tagTracks = cms.InputTag("ctppsLocalTrackLiteProducerAlCaRecoProducer"),
0042   tagRecoProtonsSingleRP = cms.InputTag("ctppsProtonsAlCaRecoProducer", "singleRP"),
0043   tagRecoProtonsMultiRP = cms.InputTag("ctppsProtonsAlCaRecoProducer", "multiRP"),
0044 
0045   rpId_45_F = cms.uint32(23),
0046   rpId_45_N = cms.uint32(3),
0047   rpId_56_N = cms.uint32(103),
0048   rpId_56_F = cms.uint32(123),
0049 
0050   outputFile = cms.string(f"alcareco_protons_prompt_{run_no}.root")
0051 )
0052 
0053 process.p = cms.Path(
0054   process.ctppsLHCInfoPlotter
0055   * process.ctppsTrackDistributionPlotter
0056   * process.ctppsProtonReconstructionPlotter
0057 )
0058 
0059 process.options = cms.PSet(
0060     wantSummary = cms.untracked.bool( True ),
0061 )
0062 
0063 # load GT
0064 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0065 from Configuration.AlCa.GlobalTag import GlobalTag
0066 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run3_data_prompt')
0067 
0068 process.source = cms.Source( 'PoolSource',
0069     fileNames = cms.untracked.vstring(
0070         options.inputFiles,
0071     ),
0072     inputCommands = cms.untracked.vstring(
0073         'keep *'
0074     )
0075 )
0076 
0077 # limit the number of events to be processed
0078 process.maxEvents = cms.untracked.PSet(
0079     input = cms.untracked.int32( -1 )
0080 )