Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:44:38

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