Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:35:10

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("HitEff")
0004 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0005 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0006 
0007 from Configuration.AlCa.GlobalTag import GlobalTag
0008 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_data', '')  
0009 
0010 RunNumberBegin = 315252
0011 RunNumberEnd = 315252
0012 #RunNumberBegin = 325310
0013 #RunNumberEnd = 325310
0014 
0015 process.source = cms.Source("EmptyIOVSource",
0016   firstValue = cms.uint64(RunNumberBegin),
0017   lastValue = cms.uint64(RunNumberEnd),
0018   timetype = cms.string('runnumber'),
0019   interval = cms.uint64(1)
0020 )
0021 
0022 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1))
0023 
0024 InputFilePath =  'root://cms-xrd-global.cern.ch///eos/cms/store/group/dpg_tracker_strip/comm_tracker/Strip/Calibration/calibrationtree/GR18/calibTree_'
0025 InputFilePathEnd = '.root'
0026 
0027 FileName1 = InputFilePath + str(RunNumberBegin) + InputFilePathEnd
0028 #FileName2 = InputFilePath + str(RunNumberEnd) + InputFilePathEnd
0029 
0030 process.SiStripHitEff = cms.EDAnalyzer("SiStripHitResolFromCalibTree",
0031     CalibTreeFilenames = cms.untracked.vstring(FileName1),
0032     Threshold         = cms.double(0.2),
0033     nModsMin          = cms.int32(25),
0034     doSummary         = cms.int32(0),
0035     #ResXSig           = cms.untracked.double(5),
0036     SinceAppendMode   = cms.bool(True),
0037     IOVMode           = cms.string('Run'),
0038     Record            = cms.string('SiStripBadStrip'),
0039     doStoreOnDB       = cms.bool(True),
0040     BadModulesFile    = cms.untracked.string("BadModules_input.txt"),   # default "" no input
0041     AutoIneffModTagging = cms.untracked.bool(True),   # default true, automatic limit for each layer to identify inefficient modules
0042     ClusterMatchingMethod  = cms.untracked.int32(4),     # default 0  case0,1,2,3,4
0043     ClusterTrajDist   = cms.untracked.double(64),   # default 64
0044     StripsApvEdge     = cms.untracked.double(10),   # default 10  
0045     UseOnlyHighPurityTracks = cms.untracked.bool(True), # default True
0046     SpaceBetweenTrains = cms.untracked.int32(25),   # default 25
0047     UseCommonMode     = cms.untracked.bool(False),  # default False
0048     ShowEndcapSides   = cms.untracked.bool(True),  # default True
0049     ShowRings         = cms.untracked.bool(True),  # default False
0050     ShowTOB6TEC9      = cms.untracked.bool(False),  # default False
0051     ShowOnlyGoodModules = cms.untracked.bool(False),  # default False
0052     TkMapMin          = cms.untracked.double(0.95), # default 0.90
0053     EffPlotMin        = cms.untracked.double(0.90), # default 0.90
0054     Title             = cms.string(' Hit Efficiency ')
0055 )
0056 
0057 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0058     BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
0059     DBParameters = cms.PSet(
0060         authenticationPath = cms.untracked.string('/afs/cern.ch/cms/DB/conddb')
0061     ),
0062     timetype = cms.untracked.string('runnumber'),
0063     connect = cms.string('sqlite_file:dbfile.db'),
0064     toPut = cms.VPSet(cms.PSet(
0065         record = cms.string('SiStripBadStrip'),
0066         tag = cms.string('SiStripHitEffBadModules')
0067     ))
0068 )
0069 
0070 UnitString = "strip unit"
0071 #UnitString = "cm"
0072 
0073 if UnitString == "cm":
0074     RootFileEnding = "_CM.root"
0075 elif UnitString == "strip unit":
0076     RootFileEnding = "_StripUnit.root"
0077 else:
0078     print('ERROR: Unit must be cm or strip unit')   
0079 
0080 RootFileBeginning = "SiStripHitEffHistos_run_"
0081 RootFileName = RootFileBeginning + str(RunNumberBegin) + "_" + str(RunNumberEnd) + RootFileEnding
0082 
0083 process.TFileService = cms.Service("TFileService",
0084         fileName = cms.string(RootFileName)  
0085 )
0086 
0087 process.allPath = cms.Path(process.SiStripHitEff)
0088