Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:25:14

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # This object is used to make configuration changes for different running
0004 # scenarios, in this case for Run 2. See the code at the end of the
0005 # SiPixelSimBlock definition.
0006 
0007 def _modifyPixelDigitizerForPhase1Pixel( digitizer ) :
0008     """
0009     Function that modifies the pixel digitiser for the Phase 1 pixel detector.
0010     
0011     First argument is the pixelDigitizer object.
0012     """
0013     #use default switches, new analog respnse, d.k. 2/16
0014     #digitizer.MissCalibrate = False
0015     #digitizer.LorentzAngle_DB = False
0016     #digitizer.killModules = False
0017     #digitizer.useDB = False
0018     #digitizer.DeadModules_DB = False
0019     digitizer.NumPixelBarrel = cms.int32(4)
0020     digitizer.NumPixelEndcap = cms.int32(3)
0021     digitizer.ThresholdInElectrons_FPix = cms.double(2000.0)
0022     digitizer.ThresholdInElectrons_BPix = cms.double(2000.0)
0023     digitizer.ThresholdInElectrons_BPix_L1 = cms.double(3000.0)
0024     digitizer.ThresholdInElectrons_BPix_L2 = cms.double(2600.0)
0025     digitizer.FPix_SignalResponse_p0 = cms.double(0.00171)
0026     digitizer.FPix_SignalResponse_p1 = cms.double(0.711)
0027     digitizer.FPix_SignalResponse_p2 = cms.double(203.)
0028     digitizer.FPix_SignalResponse_p3 = cms.double(148.)
0029     digitizer.BPix_SignalResponse_p0 = cms.double(0.00171)
0030     digitizer.BPix_SignalResponse_p1 = cms.double(0.711)
0031     digitizer.BPix_SignalResponse_p2 = cms.double(203.)
0032     digitizer.BPix_SignalResponse_p3 = cms.double(148.)
0033     # gains and offsets are ints in the Clusterizer, so round to the same value
0034     digitizer.ElectronsPerVcal           = cms.double(47)   # L2-4: 47  +- 4.7
0035     digitizer.ElectronsPerVcal_L1        = cms.double(50)   # L1:   49.6 +- 2.6
0036     digitizer.ElectronsPerVcal_Offset    = cms.double(-60)  # L2-4: -60 +- 130
0037     digitizer.ElectronsPerVcal_L1_Offset = cms.double(-670) # L1:   -670 +- 220
0038     digitizer.UseReweighting = cms.bool(True)
0039     digitizer.KillBadFEDChannels = cms.bool(True)
0040 
0041 def _modifyPixelDigitizerForRun3( digitizer ):
0042 
0043     digitizer.ThresholdInElectrons_FPix = cms.double(1600.0)
0044     digitizer.ThresholdInElectrons_BPix = cms.double(1600.0)
0045     digitizer.ThresholdInElectrons_BPix_L1 = cms.double(2000.0)
0046     digitizer.ThresholdInElectrons_BPix_L2 = cms.double(1600.0)
0047 
0048 SiPixelSimBlock = cms.PSet(
0049     SiPixelQualityLabel = cms.string(''),
0050     KillBadFEDChannels = cms.bool(False),
0051     UseReweighting = cms.bool(False),
0052     applyLateReweighting = cms.bool(False),
0053     store_SimHitEntryExitPoints = cms.bool(False),
0054     PrintClusters = cms.bool(False),
0055     PrintTemplates = cms.bool(False),
0056     DoPixelAging = cms.bool(False),
0057     ReadoutNoiseInElec = cms.double(350.0),
0058     deltaProductionCut = cms.double(0.03),
0059     RoutList = cms.vstring(
0060         'TrackerHitsPixelBarrelLowTof', 
0061         'TrackerHitsPixelBarrelHighTof', 
0062         'TrackerHitsPixelEndcapLowTof', 
0063         'TrackerHitsPixelEndcapHighTof'),
0064     OffsetSmearing = cms.double(0.0),
0065     ThresholdInElectrons_FPix = cms.double(3000.0), 
0066     ThresholdInElectrons_BPix = cms.double(3500.0),
0067     ThresholdInElectrons_BPix_L1 = cms.double(3500.0),
0068     ThresholdInElectrons_BPix_L2 = cms.double(3500.0),
0069     AddThresholdSmearing = cms.bool(True),
0070     ThresholdSmearing_FPix = cms.double(210.0),
0071     ThresholdSmearing_BPix = cms.double(245.0),
0072     ThresholdSmearing_BPix_L1 = cms.double(245.0),
0073     ThresholdSmearing_BPix_L2 = cms.double(245.0),
0074     NoiseInElectrons = cms.double(175.0),
0075     MissCalibrate = cms.bool(True),
0076     MissCalInLateCR = cms.bool(True),
0077     FPix_SignalResponse_p0 = cms.double(0.0043),
0078     FPix_SignalResponse_p1 = cms.double(1.31),
0079     FPix_SignalResponse_p2 = cms.double(93.6),
0080     FPix_SignalResponse_p3 = cms.double(134.6),
0081     BPix_SignalResponse_p0 = cms.double(0.0035),
0082     BPix_SignalResponse_p1 = cms.double(1.23),
0083     BPix_SignalResponse_p2 = cms.double(97.4),
0084     BPix_SignalResponse_p3 = cms.double(126.5),
0085     ElectronsPerVcal = cms.double(65.5),
0086     ElectronsPerVcal_L1 = cms.double(65.5),
0087     ElectronsPerVcal_Offset = cms.double(-414.0),
0088     ElectronsPerVcal_L1_Offset = cms.double(-414.0),
0089     ElectronPerAdc = cms.double(135.0),
0090     TofUpperCut = cms.double(12.5),
0091     AdcFullScale = cms.int32(255),
0092     AdcFullScLateCR = cms.int32(255),
0093     TofLowerCut = cms.double(-12.5),
0094     TanLorentzAnglePerTesla_FPix = cms.double(0.106),
0095     TanLorentzAnglePerTesla_BPix = cms.double(0.106),
0096     AddNoisyPixels = cms.bool(True),
0097     Alpha2Order = cms.bool(True),
0098     AddPixelInefficiency = cms.bool(True),
0099     AddNoise = cms.bool(True),
0100     ChargeVCALSmearing = cms.bool(True),
0101     GainSmearing = cms.double(0.0),
0102     PixGeometryType = cms.string('idealForDigi'),                           
0103     useDB = cms.bool(False),
0104     LorentzAngle_DB = cms.bool(True),
0105     DeadModules_DB = cms.bool(True),
0106     killModules = cms.bool(True),
0107     NumPixelBarrel = cms.int32(3),
0108     NumPixelEndcap = cms.int32(2),
0109 ###    DeadModules = cms.VPSet()
0110 )
0111 
0112 # activate charge reweighing for 2016 pixel detector (UL 2016)
0113 from Configuration.Eras.Modifier_pixel_2016_cff import pixel_2016
0114 pixel_2016.toModify(SiPixelSimBlock,UseReweighting=True)
0115 
0116 #
0117 # Apply the changes for the different Run 2 running scenarios
0118 #
0119 from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel
0120 phase1Pixel.toModify( SiPixelSimBlock, func=_modifyPixelDigitizerForPhase1Pixel )
0121 
0122 # use Label 'forDigitizer' for years >= 2018
0123 from CalibTracker.SiPixelESProducers.SiPixelQualityESProducer_cfi import siPixelQualityESProducer
0124 from Configuration.Eras.Modifier_run2_SiPixel_2018_cff import run2_SiPixel_2018
0125 run2_SiPixel_2018.toModify(siPixelQualityESProducer,siPixelQualityLabel = 'forDigitizer',)
0126 run2_SiPixel_2018.toModify(SiPixelSimBlock, SiPixelQualityLabel = 'forDigitizer',)
0127 
0128 # change the digitizer threshold for Run3
0129 # - new layer1 installed: expected improvement in timing alignment of L1 and L2
0130 # - update the rest of the detector to 1600e 
0131 
0132 from Configuration.Eras.Modifier_run3_common_cff import run3_common
0133 run3_common.toModify(SiPixelSimBlock, func=_modifyPixelDigitizerForRun3)
0134 
0135 from Configuration.ProcessModifiers.premix_stage1_cff import premix_stage1
0136 premix_stage1.toModify(SiPixelSimBlock,
0137     AddNoise = True,
0138     AddNoisyPixels = False,
0139     AddPixelInefficiency = False, #done in second step
0140     KillBadFEDChannels = False, #done in second step
0141 )
0142 
0143 # Threshold in electrons are the Official CRAFT09 numbers:
0144 # FPix(smearing)/BPix(smearing) = 2480(160)/2730(200)
0145 
0146 #DEAD MODULES LIST: NEW LIST AFTER 2009 PIXEL REPAIRS
0147 # https://twiki.cern.ch/twiki/bin/view/CMS/SiPixelQualityHistory
0148 ######Barrel
0149 #Bad Module: 302055940 errorType 2 BadRocs=ff00
0150 #Bad Module: 302059800 errorType 0 BadRocs=ffff
0151 #BmI_SEC3_LYR2_LDR5F_MOD3 -- 302121992, "TBM-A"
0152 #####Forward
0153 #Bad Module: 352453892 errorType 0 BadRocs=ffff
0154 #BmO_DISK1_BLD9_PNL2 -- 344014340, 344014344, 344014348
0155 #Barrel 
0156 #302187268, "none" (ROC 6) 
0157