File indexing completed on 2023-03-17 11:25:43
0001
0002
0003
0004
0005
0006
0007 set output = dbfile
0008
0009 set scaleTIB = 1.28
0010 set scaleTID = 1.28
0011 set scaleTOB = 1.09
0012 set scaleTEC = 1.13
0013
0014 set Slope = 51.0
0015 set Quote = 630.0
0016
0017
0018
0019 set SlopeTIB = `echo "scale=1; ${Slope}/${scaleTIB}" | bc`
0020 set SlopeTID = `echo "scale=1; ${Slope}/${scaleTID}" | bc`
0021 set SlopeTOB = `echo "scale=1; ${Slope}/${scaleTOB}" | bc`
0022 set SlopeTEC = `echo "scale=1; ${Slope}/${scaleTEC}" | bc`
0023
0024 set QuoteTIB = `echo "scale=1; ${Quote}/${scaleTIB}" | bc`
0025 set QuoteTID = `echo "scale=1; ${Quote}/${scaleTID}" | bc`
0026 set QuoteTOB = `echo "scale=1; ${Quote}/${scaleTOB}" | bc`
0027 set QuoteTEC = `echo "scale=1; ${Quote}/${scaleTEC}" | bc`
0028
0029 echo TIB $SlopeTIB $QuoteTIB
0030 echo TID $SlopeTID $QuoteTID
0031 echo TOB $SlopeTOB $QuoteTOB
0032 echo TEC $SlopeTEC $QuoteTEC
0033
0034
0035
0036
0037 echo creating files ${output}.db and ${output}_cfg.py
0038
0039 setenv SCRAM_ARCH slc5_ia32_gcc434
0040 eval `scramv1 runtime -csh`
0041
0042 if (-e ${output}.db) rm ${output}.db
0043 $CMSSW_RELEASE_BASE/src/CondTools/SiStrip/scripts/CreatingTables.sh sqlite_file:${output}.db a a
0044
0045 if (-e ${output}_cfg.py) rm ${output}_cfg.py
0046 cat <<EOF > ${output}_cfg.py
0047 import FWCore.ParameterSet.Config as cms
0048
0049 process = cms.Process("NOISEGAINBUILDER")
0050 process.MessageLogger = cms.Service("MessageLogger",
0051 threshold = cms.untracked.string('INFO'),
0052 destinations = cms.untracked.vstring('cout')
0053 )
0054
0055 process.source = cms.Source("EmptySource",
0056 numberEventsInRun = cms.untracked.uint32(1),
0057 firstRun = cms.untracked.uint32(128408)
0058 )
0059
0060 process.maxEvents = cms.untracked.PSet(
0061 input = cms.untracked.int32(1)
0062 )
0063
0064 process.poolDBESSource = cms.ESSource("PoolDBESSource",
0065 BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
0066 DBParameters = cms.PSet(
0067 messageLevel = cms.untracked.int32(2),
0068 authenticationPath = cms.untracked.string('/afs/cern.ch/cms/DB/conddb')
0069 ),
0070 timetype = cms.untracked.string('runnumber'),
0071
0072 connect = cms.string('sqlite_file:dbfile_gainFromData.db'),
0073 toGet = cms.VPSet(cms.PSet(
0074 record = cms.string('SiStripApvGainRcd'),
0075
0076 tag = cms.string('SiStripApvGain_default')
0077
0078 ))
0079 )
0080
0081 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0082 BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
0083 DBParameters = cms.PSet(
0084 authenticationPath = cms.untracked.string('/afs/cern.ch/cms/DB/conddb')
0085 ),
0086 timetype = cms.untracked.string('runnumber'),
0087 connect = cms.string('sqlite_file:dbfile.db'),
0088 toPut = cms.VPSet(cms.PSet(
0089 record = cms.string('SiStripNoisesRcd'),
0090 tag = cms.string('SiStripNoiseNormalizedWithIdealGain')
0091 ))
0092 )
0093
0094 process.load('Configuration.Geometry.GeometryExtended_cff')
0095 process.TrackerTopologyEP = cms.ESProducer("TrackerTopologyEP")
0096 process.load("Geometry.TrackerGeometryBuilder.trackerParameters_cfi")
0097 process.load("Geometry.TrackerGeometryBuilder.trackerGeometry_cfi")
0098 process.trackerGeometry.applyAlignment = False
0099
0100 from SimTracker.SiStripDigitizer.SiStripDigi_cfi import *
0101 process.prod = cms.EDAnalyzer("SiStripNoiseNormalizedWithApvGainBuilder",
0102 printDebug = cms.untracked.uint32(5),
0103 file = cms.untracked.FileInPath('CalibTracker/SiStripCommon/data/SiStripDetInfo.dat'),
0104
0105 StripLengthMode = cms.bool(True),
0106
0107
0108
0109
0110
0111
0112 NoiseStripLengthSlopeTIB = cms.vdouble(${SlopeTIB}, ${SlopeTIB}, ${SlopeTIB}, ${SlopeTIB}),
0113 NoiseStripLengthQuoteTIB = cms.vdouble(${QuoteTIB}, ${QuoteTIB}, ${QuoteTIB}, ${QuoteTIB}),
0114
0115 NoiseStripLengthSlopeTID = cms.vdouble(${SlopeTID}, ${SlopeTID}, ${SlopeTID}),
0116 NoiseStripLengthQuoteTID = cms.vdouble(${QuoteTID}, ${QuoteTID}, ${QuoteTID}),
0117
0118 NoiseStripLengthSlopeTOB = cms.vdouble(${SlopeTOB}, ${SlopeTOB}, ${SlopeTOB}, ${SlopeTOB}, ${SlopeTOB}, ${SlopeTOB}),
0119 NoiseStripLengthQuoteTOB = cms.vdouble(${QuoteTOB}, ${QuoteTOB}, ${QuoteTOB}, ${QuoteTOB}, ${QuoteTOB}, ${QuoteTOB}),
0120
0121 NoiseStripLengthSlopeTEC = cms.vdouble(${SlopeTEC}, ${SlopeTEC}, ${SlopeTEC}, ${SlopeTEC}, ${SlopeTEC}, ${SlopeTEC}, ${SlopeTEC}),
0122 NoiseStripLengthQuoteTEC = cms.vdouble(${QuoteTEC}, ${QuoteTEC}, ${QuoteTEC}, ${QuoteTEC}, ${QuoteTEC}, ${QuoteTEC}, ${QuoteTEC}),
0123
0124
0125 electronPerAdc = simSiStripDigis.electronPerAdcDec,
0126
0127
0128
0129 MeanNoiseTIB = cms.vdouble(4.0, 4.0, 4.0, 4.0),
0130 SigmaNoiseTIB = cms.vdouble(0.5, 0.5, 0.5, 0.5),
0131
0132 MeanNoiseTID = cms.vdouble(4.0, 4.0, 4.0),
0133 SigmaNoiseTID = cms.vdouble(0.5, 0.5, 0.5),
0134
0135 MeanNoiseTOB = cms.vdouble(4.0, 4.0, 4.0, 4.0, 4.0, 4.0),
0136 SigmaNoiseTOB = cms.vdouble(0.5, 0.5, 0.5, 0.5, 0.5, 0.5),
0137
0138 MeanNoiseTEC = cms.vdouble(4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0),
0139 SigmaNoiseTEC = cms.vdouble(0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5),
0140
0141 MinPositiveNoise = cms.double(0.1)
0142 )
0143
0144 process.p = cms.Path(process.prod)
0145 EOF
0146
0147 cmsRun ${output}_cfg.py