Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-02-05 23:51:49

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     usePixelExtraLiteFormat = cms.bool(False),
0054     store_SimHitEntryExitPoints = cms.bool(False),
0055     store_SimHitEntryExitPointsLite = cms.bool(False),
0056     PrintClusters = cms.bool(False),
0057     PrintTemplates = cms.bool(False),
0058     DoPixelAging = cms.bool(False),
0059     ReadoutNoiseInElec = cms.double(350.0),
0060     deltaProductionCut = cms.double(0.03),
0061     RoutList = cms.vstring(
0062         'TrackerHitsPixelBarrelLowTof', 
0063         'TrackerHitsPixelBarrelHighTof', 
0064         'TrackerHitsPixelEndcapLowTof', 
0065         'TrackerHitsPixelEndcapHighTof'),
0066     OffsetSmearing = cms.double(0.0),
0067     ThresholdInElectrons_FPix = cms.double(3000.0), 
0068     ThresholdInElectrons_BPix = cms.double(3500.0),
0069     ThresholdInElectrons_BPix_L1 = cms.double(3500.0),
0070     ThresholdInElectrons_BPix_L2 = cms.double(3500.0),
0071     AddThresholdSmearing = cms.bool(True),
0072     ThresholdSmearing_FPix = cms.double(210.0),
0073     ThresholdSmearing_BPix = cms.double(245.0),
0074     ThresholdSmearing_BPix_L1 = cms.double(245.0),
0075     ThresholdSmearing_BPix_L2 = cms.double(245.0),
0076     NoiseInElectrons = cms.double(175.0),
0077     MissCalibrate = cms.bool(True),
0078     MissCalInLateCR = cms.bool(True),
0079     FPix_SignalResponse_p0 = cms.double(0.0043),
0080     FPix_SignalResponse_p1 = cms.double(1.31),
0081     FPix_SignalResponse_p2 = cms.double(93.6),
0082     FPix_SignalResponse_p3 = cms.double(134.6),
0083     BPix_SignalResponse_p0 = cms.double(0.0035),
0084     BPix_SignalResponse_p1 = cms.double(1.23),
0085     BPix_SignalResponse_p2 = cms.double(97.4),
0086     BPix_SignalResponse_p3 = cms.double(126.5),
0087     ElectronsPerVcal = cms.double(65.5),
0088     ElectronsPerVcal_L1 = cms.double(65.5),
0089     ElectronsPerVcal_Offset = cms.double(-414.0),
0090     ElectronsPerVcal_L1_Offset = cms.double(-414.0),
0091     ElectronPerAdc = cms.double(135.0),
0092     TofUpperCut = cms.double(12.5),
0093     AdcFullScale = cms.int32(255),
0094     AdcFullScLateCR = cms.int32(255),
0095     TofLowerCut = cms.double(-12.5),
0096     TanLorentzAnglePerTesla_FPix = cms.double(0.106),
0097     TanLorentzAnglePerTesla_BPix = cms.double(0.106),
0098     AddNoisyPixels = cms.bool(True),
0099     Alpha2Order = cms.bool(True),
0100     AddPixelInefficiency = cms.bool(True),
0101     AddNoise = cms.bool(True),
0102     ChargeVCALSmearing = cms.bool(True),
0103     GainSmearing = cms.double(0.0),
0104     PixGeometryType = cms.string('idealForDigi'),                           
0105     useDB = cms.bool(False),
0106     LorentzAngle_DB = cms.bool(True),
0107     DeadModules_DB = cms.bool(True),
0108     killModules = cms.bool(True),
0109     NumPixelBarrel = cms.int32(3),
0110     NumPixelEndcap = cms.int32(2),
0111 ###    DeadModules = cms.VPSet()
0112 )
0113 
0114 # activate charge reweighing for 2016 pixel detector (UL 2016)
0115 from Configuration.Eras.Modifier_pixel_2016_cff import pixel_2016
0116 pixel_2016.toModify(SiPixelSimBlock,UseReweighting=True)
0117 
0118 #
0119 # Apply the changes for the different Run 2 running scenarios
0120 #
0121 from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel
0122 phase1Pixel.toModify( SiPixelSimBlock, func=_modifyPixelDigitizerForPhase1Pixel )
0123 
0124 # use Label 'forDigitizer' for years >= 2018
0125 from Configuration.Eras.Modifier_run2_SiPixel_2018_cff import run2_SiPixel_2018
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     killModules = False #done in second step
0142 )
0143 
0144 # Threshold in electrons are the Official CRAFT09 numbers:
0145 # FPix(smearing)/BPix(smearing) = 2480(160)/2730(200)
0146 
0147 #DEAD MODULES LIST: NEW LIST AFTER 2009 PIXEL REPAIRS
0148 # https://twiki.cern.ch/twiki/bin/view/CMS/SiPixelQualityHistory
0149 ######Barrel
0150 #Bad Module: 302055940 errorType 2 BadRocs=ff00
0151 #Bad Module: 302059800 errorType 0 BadRocs=ffff
0152 #BmI_SEC3_LYR2_LDR5F_MOD3 -- 302121992, "TBM-A"
0153 #####Forward
0154 #Bad Module: 352453892 errorType 0 BadRocs=ffff
0155 #BmO_DISK1_BLD9_PNL2 -- 344014340, 344014344, 344014348
0156 #Barrel 
0157 #302187268, "none" (ROC 6) 
0158