Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:34

0001 import FWCore.ParameterSet.Config as cms
0002 import sys
0003 
0004 
0005 print("Starting CSCTF Efficiency Analyzer")
0006 process = cms.Process("CSCTFEFF")
0007 process.load("FWCore.MessageService.MessageLogger_cfi")
0008 process.MessageLogger.cerr.FwkReport.reportEvery = 1000
0009 
0010 #*****************************************************************************************************************************
0011 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10000) )
0012 #*****************************************************************************************************************************
0013 
0014 fileOutName = "EffSimHists.root"
0015 
0016 process.source = cms.Source("PoolSource",
0017     fileNames = cms.untracked.vstring()
0018 )
0019 
0020 process.source.fileNames.extend([
0021        '/store/relval/CMSSW_5_2_0_pre4/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/START52_V1-v1/0033/18FF7335-B551-E111-9992-003048FFD7D4.root',
0022        '/store/relval/CMSSW_5_2_0_pre4/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/START52_V1-v1/0033/1EAEFA31-B451-E111-91D5-002618943869.root',
0023        '/store/relval/CMSSW_5_2_0_pre4/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/START52_V1-v1/0033/3CCACBDE-BA51-E111-B9CF-00261894398A.root',
0024        '/store/relval/CMSSW_5_2_0_pre4/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/START52_V1-v1/0033/3E77FF2F-B451-E111-808B-002618FDA210.root',
0025        '/store/relval/CMSSW_5_2_0_pre4/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/START52_V1-v1/0033/724975B7-B551-E111-B6AE-003048FFD760.root',
0026        '/store/relval/CMSSW_5_2_0_pre4/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/START52_V1-v1/0033/8CA0ED33-B451-E111-8FAC-002618943964.root',
0027        '/store/relval/CMSSW_5_2_0_pre4/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/START52_V1-v1/0033/D6338531-B551-E111-AFF9-0026189438A0.root',
0028        '/store/relval/CMSSW_5_2_0_pre4/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/START52_V1-v1/0033/D6BC8E30-B551-E111-ACA4-00304867908C.root',
0029        '/store/relval/CMSSW_5_2_0_pre4/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/START52_V1-v1/0033/E6CD4B79-C051-E111-91F6-0018F3D09636.root',
0030        '/store/relval/CMSSW_5_2_0_pre4/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/START52_V1-v1/0033/F8E9A938-B651-E111-9CDF-0026189438CB.root',
0031        '/store/relval/CMSSW_5_2_0_pre4/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/START52_V1-v1/0036/1629E91E-F251-E111-B631-001A92810AE0.root'
0032 ])
0033 
0034 # Event Setup
0035 ##############
0036 process.load("Configuration.StandardSequences.Services_cff")
0037 process.load("Configuration.StandardSequences.MagneticField_cff")
0038 process.load("Configuration.StandardSequences.GeometryDB_cff")
0039 process.load("Configuration.StandardSequences.Simulation_cff")
0040 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0041 process.GlobalTag.globaltag ='START52_V1'
0042 
0043 # L1 Emulator
0044 #############PtEffStatsFilename
0045 process.load("Configuration.StandardSequences.SimL1Emulator_cff")
0046 
0047 #prints out Alex's Firmware debugging output
0048 #process.simCsctfTrackDigis.SectorProcessor.isCoreVerbose = True
0049 
0050 #process.simCsctfTrackDigis.SectorProcessor.initializeFromPSet = True
0051 
0052 #Configurable options when PSet is True
0053 #process.simCsctfTrackDigis.SectorProcessor.mindetap = cms.uint32(4)
0054 #process.simCsctfTrackDigis.SectorProcessor.mindphip = cms.uint32(128)
0055 #process.simCsctfTrackDigis.SectorProcessor.straightp = cms.uint32(60)
0056 #process.simCsctfTrackDigis.SectorProcessor.curvedp = cms.uint32(200)
0057 #process.simCsctfTrackDigis.SectorProcessor.firmwareSP = cms.uint32(20110204)
0058 #process.simCsctfTrackDigis.SectorProcessor.PTLUT.PtMethod = 28
0059 #process.simCsctfTrackDigis.SectorProcessor.EtaWindows = cms.vuint32(4,4,4,4,4,4,4)
0060 
0061 # CSCTFEfficiency Analyzer
0062 # defualt values
0063 process.cscTFEfficiency = cms.EDAnalyzer('CSCTFEfficiency',
0064   type_of_data = cms.untracked.int32(0),
0065   inputTag = cms.untracked.InputTag("simCsctfTrackDigis"),
0066   MinPtSim = cms.untracked.double(2.0),
0067   MaxPtSim = cms.untracked.double(100.0),
0068   MinEtaSim = cms.untracked.double(0.9),
0069   MaxEtaSim = cms.untracked.double(2.4),
0070   MinPtTF = cms.untracked.double(-1),
0071   MinQualityTF = cms.untracked.double(1),
0072   CutOnModes = cms.untracked.vuint32(),
0073   GhostLoseParam = cms.untracked.string("Q"),
0074   InputData = cms.untracked.bool(False),
0075   MinMatchR = cms.untracked.double(0.5),     
0076   MinPtHist = cms.untracked.double(-0.5),                           
0077   MaxPtHist = cms.untracked.double(100.5),
0078   BinsPtHist = cms.untracked.double(20),
0079   SaveHistImages = cms.untracked.bool(False),
0080   SingleMuSample = cms.untracked.bool(False),
0081   NoRefTracks = cms.untracked.bool(False),
0082   StatsFilename = cms.untracked.string("/dev/null"),
0083   PtEffStatsFilename = cms.untracked.string("/dev/null"),
0084   HistoDescription = cms.untracked.string("")
0085 )
0086 
0087 #                     Data Type Key
0088 #------------------------------------------------------------
0089 # Num  |       Name         | track source | Mode info? 
0090 #------------------------------------------------------------
0091 #  0  | L1CSCTrack          | CSCs         | yes
0092 #  1  | L1MuRegionalCand    | CSCs         | no
0093 #  2  | L1MuGMTExtendedCand | GMT          | no
0094 #process.cscTFEfficiency.type_of_data = 0
0095 #process.cscTFEfficiency.inputTag = cms.untracked.InputTag("simCsctfTrackDigis")
0096 #process.cscTFEfficiency.type_of_data = 1
0097 #process.cscTFEfficiency.inputTag = cms.untracked.InputTag("simCsctfDigis","CSC")
0098 #process.cscTFEfficiency.type_of_data = 2
0099 #process.cscTFEfficiency.inputTag = cms.untracked.InputTag("simGmtDigis")
0100 
0101 #=Controls the cut values for TF track selection
0102 
0103 #=Only Allows These Modes, if length=0, then all
0104 #process.cscTFEfficiency.CutOnModes = cms.untracked.vuint32(2,3,4)
0105 
0106 #=Adds a Description to the Upper Left of Main Plots (TLatex)
0107 #process.cscTFEfficiency.HistoDescription = "FW/PTLUT 2012"
0108 
0109 #=Use False to run Simulated Data or True for Real Data
0110 #process.cscTFEfficiency.InputData = True
0111 
0112 #=Controls the maximum R value for matching
0113 #process.cscTFEfficiency.MaxMatchR = 0.5
0114 
0115 #=Controls minimum value on x-axis of PT Hist
0116 #process.cscTFEfficiency.MinPtHist = -0.5
0117 
0118 #=Controls maximum value on x-axis of PT Hist
0119 #process.cscTFEfficiency.MaxPtHist = 20.5
0120 
0121 #=Controls the number of bins used to create the PT Hist
0122 #process.cscTFEfficiency.BinsPtHist = 21
0123 
0124 #=Controls the name of the statistics file output
0125 #process.cscTFEfficiency.StatsFilename = statName
0126 
0127 #=Controls output of validation histogram images:
0128 #process.cscTFEfficiency.SaveHistImages = False
0129 
0130 #=Controls Ghost Validation Counting (Default False):
0131 #process.cscTFEfficiency.SingleMuSample = True 
0132 
0133 #=Controls ghost selection method. Use quality "Q" or match value "R" as metric 
0134     #=Best candidate is considered real track, others considered ghosts. 
0135     #=Default Q
0136 #process.cscTFEfficiency.GhostLoseParam = "R"
0137 
0138 #=Controls the name of the output file for the Pt Efficiency Stats
0139 #process.cscTFEfficiency.PtEffStatsFilename = PtEffStatsName
0140 
0141 process.TFileService = cms.Service("TFileService",
0142     fileName = cms.string(
0143         fileOutName
0144 ))
0145 
0146 process.FEVT = cms.OutputModule("PoolOutputModule",
0147     fileName = cms.untracked.string("testEff.root"),
0148     outputCommands = cms.untracked.vstring( 
0149         "keep *"
0150     )
0151 )
0152 
0153 process.p = cms.Path(process.simCsctfTrackDigis*process.simCsctfDigis*process.cscTFEfficiency)
0154 #process.p = cms.Path(process.simCscTriggerPrimitiveDigis*process.simDtTriggerPrimitiveDigis*process.simCsctfTrackDigis*process.simCsctfDigis*process.cscTFEfficiency)
0155 
0156 #to create testEfff.root
0157 #process.outpath = cms.EndPath(process.FEVT)
0158 
0159