Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-01 22:52:09

0001 import FWCore.ParameterSet.Config as cms
0002 import sys
0003 
0004 
0005 print("Starting CSCTF Data 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 = "AnaDataHists.root"
0015 
0016 process.source = cms.Source("PoolSource",
0017     fileNames = cms.untracked.vstring()
0018 )
0019 
0020 process.source.fileNames.extend([
0021 #High PU Run
0022 "/store/data/Run2011B/L1MuHPF/RAW/v1/000/178/208/FEAA124F-7EF3-E011-9208-003048673374.root",
0023 "/store/data/Run2011B/L1MuHPF/RAW/v1/000/178/208/FE03EB11-5DF3-E011-B717-003048F117EC.root",
0024 "/store/data/Run2011B/L1MuHPF/RAW/v1/000/178/208/FAB7E40D-76F3-E011-8566-BCAEC53296FF.root",
0025 "/store/data/Run2011B/L1MuHPF/RAW/v1/000/178/208/FA1E6192-81F3-E011-B876-BCAEC53296FF.root",
0026 "/store/data/Run2011B/L1MuHPF/RAW/v1/000/178/208/FA085011-7FF3-E011-9DE3-003048D2BC4C.root",
0027 "/store/data/Run2011B/L1MuHPF/RAW/v1/000/178/208/F8A8B8E4-86F3-E011-BC5A-BCAEC53296F7.root",
0028 "/store/data/Run2011B/L1MuHPF/RAW/v1/000/178/208/F8A32D30-80F3-E011-9CCE-001D09F24489.root",
0029 "/store/data/Run2011B/L1MuHPF/RAW/v1/000/178/208/F86797FF-7DF3-E011-AC73-003048F024FE.root",
0030 "/store/data/Run2011B/L1MuHPF/RAW/v1/000/178/208/F6C69A11-7FF3-E011-A256-001D09F24EAC.root",
0031 "/store/data/Run2011B/L1MuHPF/RAW/v1/000/178/208/F62BF6A4-7BF3-E011-8A47-E0CB4E4408E3.root",
0032 "/store/data/Run2011B/L1MuHPF/RAW/v1/000/178/208/F491E355-60F3-E011-9860-0030486780E6.root"
0033 ])
0034 
0035 # Event Setup
0036 ##############
0037 process.load("Configuration.StandardSequences.Services_cff")
0038 process.load("Configuration.StandardSequences.MagneticField_cff")
0039 process.load("Configuration.StandardSequences.GeometryDB_cff")
0040 process.load("EventFilter.CSCTFRawToDigi.csctfunpacker_cfi")
0041 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0042 process.GlobalTag.globaltag ='GR_R_43_V3'
0043 
0044 # L1 Emulator
0045 #############PtEffStatsFilename
0046 process.load("Configuration.StandardSequences.SimL1Emulator_cff")
0047 
0048 
0049 #prints out Alex's Firmware debugging output
0050 #process.simCsctfTrackDigis.SectorProcessor.isCoreVerbose = True
0051 
0052 #process.simCsctfTrackDigis.SectorProcessor.initializeFromPSet = True
0053 
0054 #Configurable options when PSet is True
0055 #process.simCsctfTrackDigis.SectorProcessor.mindetap = cms.uint32(4)
0056 #process.simCsctfTrackDigis.SectorProcessor.mindphip = cms.uint32(128)
0057 #process.simCsctfTrackDigis.SectorProcessor.straightp = cms.uint32(60)
0058 #process.simCsctfTrackDigis.SectorProcessor.curvedp = cms.uint32(200)
0059 #process.simCsctfTrackDigis.SectorProcessor.firmwareSP = cms.uint32(20110204)
0060 #process.simCsctfTrackDigis.SectorProcessor.EtaWindows = cms.vuint32(4,4,4,4,4,4,4)
0061 
0062 
0063 # CSCTFEfficiency Analyzer
0064 # defualt values
0065 process.cscTFEfficiency = cms.EDAnalyzer('CSCTFEfficiency',
0066   inputTag = cms.untracked.InputTag("csctfunpacker"),
0067   MinPtSim = cms.untracked.double(2.0),
0068   MaxPtSim = cms.untracked.double(500.0),
0069   MinEtaSim = cms.untracked.double(0.9),
0070   MaxEtaSim = cms.untracked.double(2.4),
0071   MinPtTF = cms.untracked.double(-1),
0072   MinQualityTF = cms.untracked.double(2),
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(140.5),
0078   BinsPtHist = cms.untracked.double(70),
0079   SaveHistImages = cms.untracked.bool(False),
0080   SingleMuSample = cms.untracked.bool(False),
0081   NoRefTracks = cms.untracked.bool(True),
0082   StatsFilename = cms.untracked.string("/dev/null"),
0083   PtEffStatsFilename = cms.untracked.string("/dev/null"),
0084   type_of_data = cms.untracked.int32(0)
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 
0096 #=Controls the cut values for TF track selection
0097 
0098 #process.cscTFEfficiency.MinQualityTF = 2
0099 
0100 #=Use False to run Simulated Data or True for Real Data
0101 #process.cscTFEfficiency.InputData = True
0102 
0103 #=Controls the maximum R value for matching
0104 #process.cscTFEfficiency.MaxMatchR = 0.5
0105 
0106 #=Controls minimum value on x-axis of PT Hist
0107 #process.cscTFEfficiency.MinPtHist = -0.5
0108 
0109 #=Controls maximum value on x-axis of PT Hist
0110 #process.cscTFEfficiency.MaxPtHist = 20.5
0111 
0112 #=Controls the number of bins used to create the PT Hist
0113 #process.cscTFEfficiency.BinsPtHist = 21
0114 
0115 #=Controls the name of the statistics file output
0116 #process.cscTFEfficiency.StatsFilename = statName
0117 
0118 #=Controls output of validation histogram images:
0119 #process.cscTFEfficiency.SaveHistImages = False
0120 
0121 #=Controls Ghost Validation Counting (Default False):
0122 #process.cscTFEfficiency.SingleMuSample = True 
0123 
0124 #=Controls ghost selection method. Use quality "Q" or match value "R" as metric 
0125     #=Best candidate is considered real track, others considered ghosts. 
0126     #=Default Q
0127 #process.cscTFEfficiency.GhostLoseParam = "R"
0128 
0129 #=Controls the name of the output file for the Pt Efficiency Stats
0130 #process.cscTFEfficiency.PtEffStatsFilename = PtEffStatsName
0131 
0132 process.TFileService = cms.Service("TFileService",
0133     fileName = cms.string(
0134         fileOutName
0135 ))
0136 
0137 process.FEVT = cms.OutputModule("PoolOutputModule",
0138     fileName = cms.untracked.string("testAnaData.root"),
0139     outputCommands = cms.untracked.vstring( 
0140         "keep *"
0141     )
0142 )
0143 
0144 process.p = cms.Path(process.csctfunpacker*process.cscTFEfficiency)
0145 
0146 #to create testEfff.root
0147 #process.outpath = cms.EndPath(process.FEVT)
0148 
0149