Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-04-18 22:24:07

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 PixelDigitizerAlgorithmCommon = cms.PSet(
0004     ElectronPerAdc = cms.double(1500.0),
0005     ReadoutNoiseInElec = cms.double(0.0),
0006     ThresholdInElectrons_Barrel = cms.double(1000.0),
0007     ThresholdInElectrons_Endcap = cms.double(1000.0),
0008     AddThresholdSmearing = cms.bool(False),
0009     ThresholdSmearing_Barrel = cms.double(0.0),
0010     ThresholdSmearing_Endcap = cms.double(0.0),
0011     HIPThresholdInElectrons_Barrel = cms.double(1.0e10), # very high value to avoid Over threshold bit
0012     HIPThresholdInElectrons_Endcap = cms.double(1.0e10), # very high value to avoid Over threshold bit
0013     NoiseInElectrons = cms.double(0.0),
0014     Phase2ReadoutMode = cms.int32(3), # Flag to decide Readout Mode :Digital(0) or Analog (linear TDR (-1), dual slope with slope parameters (+1,+2,+3,+4) with threshold subtraction
0015     AdcFullScale = cms.int32(15),
0016     TofUpperCut = cms.double(12.5),
0017     TofLowerCut = cms.double(-12.5),
0018     AddNoisyPixels = cms.bool(False),
0019     Alpha2Order = cms.bool(True),           #D.B.: second order effect, does not switch off magnetic field as described
0020     AddNoise = cms.bool(False),
0021     AddXTalk = cms.bool(False),         #D.B.
0022     InterstripCoupling = cms.double(0.0),   #D.B. # No need to be used in PixelDigitizerAlgorithm
0023     Odd_row_interchannelCoupling_next_row = cms.double(0.20),
0024     Even_row_interchannelCoupling_next_row = cms.double(0.0),
0025     Odd_column_interchannelCoupling_next_column = cms.double(0.0),
0026     Even_column_interchannelCoupling_next_column = cms.double(0.0),
0027     SigmaZero = cms.double(0.00037),        #D.B.: 3.7um spread for 300um-thick sensor, renormalized in digitizerAlgo
0028     SigmaCoeff = cms.double(0),         #S.D: setting SigmaCoeff=0 for IT-pixel
0029     ClusterWidth = cms.double(3),       #D.B.: this is used as number of sigmas for charge collection (3=+-3sigmas)
0030     LorentzAngle_DB = cms.bool(True),           
0031     TanLorentzAnglePerTesla_Endcap = cms.double(0.106),
0032     TanLorentzAnglePerTesla_Barrel = cms.double(0.106),
0033     KillModules = cms.bool(False),
0034     DeadModules_DB = cms.bool(False),
0035     DeadModules = cms.VPSet(),
0036     AddInefficiency = cms.bool(False),
0037     Inefficiency_DB = cms.bool(False),              
0038     EfficiencyFactors_Barrel = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999 ),
0039     EfficiencyFactors_Endcap = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 
0040                                            0.999, 0.999 ),#Efficiencies kept as Side2Disk1,Side1Disk1 and so on
0041     CellsToKill = cms.VPSet(),
0042     ApplyTimewalk = cms.bool(False),
0043     TimewalkModel = cms.PSet(
0044         ThresholdValues = cms.vdouble(1000, 1200, 1500, 3000),
0045         Curves = cms.VPSet(
0046             cms.PSet(
0047                 charge = cms.vdouble(1000, 1025, 1050, 1100, 1200, 1500, 2000, 6000, 10000, 15000, 20000, 30000),
0048                 delay = cms.vdouble(26.8, 23.73, 21.92, 19.46, 16.52, 12.15, 8.88, 3.03, 1.69, 0.95, 0.56, 0.19)
0049             ),
0050             cms.PSet(
0051                 charge = cms.vdouble(1200, 1225, 1250, 1500, 2000, 6000, 10000, 15000, 20000, 30000),
0052                 delay = cms.vdouble(26.28, 23.5, 21.79, 14.92, 10.27, 3.33, 1.86, 1.07, 0.66, 0.27)
0053             ),
0054             cms.PSet(
0055                 charge = cms.vdouble(1500, 1525, 1550, 1600, 2000, 6000, 10000, 15000, 20000, 30000),
0056                 delay = cms.vdouble(25.36, 23.05, 21.6, 19.56, 12.94, 3.79, 2.14, 1.26, 0.81, 0.39)
0057             ),
0058             cms.PSet(
0059                 charge = cms.vdouble(3000, 3025, 3050, 3100, 3500, 6000, 10000, 15000, 20000, 30000),
0060                 delay = cms.vdouble(25.63, 23.63, 22.35, 20.65, 14.92, 6.7, 3.68, 2.29, 1.62, 1.02)
0061             )
0062         )
0063     )
0064 )
0065 phase2TrackerDigitizer = cms.PSet(
0066 # For the Digitizer
0067     accumulatorType = cms.string("Phase2TrackerDigitizer"),
0068     hitsProducer = cms.string('g4SimHits'),
0069     ROUList = cms.vstring(
0070         'TrackerHitsPixelBarrelLowTof', 
0071         'TrackerHitsPixelBarrelHighTof', 
0072         'TrackerHitsPixelEndcapLowTof', 
0073         'TrackerHitsPixelEndcapHighTof'),
0074     GeometryType = cms.string('idealForDigi'),
0075     isOTreadoutAnalog = cms.bool(False),#set this to true if you want analog readout for OT
0076 # Common for Algos
0077     premixStage1 = cms.bool(False),
0078     AlgorithmCommon = cms.PSet(
0079       DeltaProductionCut = cms.double(0.03),
0080       makeDigiSimLinks = cms.untracked.bool(True),
0081     ),
0082 # Specific parameters
0083 #Pixel Digitizer Algorithm
0084     PixelDigitizerAlgorithm   = PixelDigitizerAlgorithmCommon.clone(),
0085 #Pixel-3D Digitizer Algorithm
0086     Pixel3DDigitizerAlgorithm = PixelDigitizerAlgorithmCommon.clone(
0087         SigmaCoeff = cms.double(1.80),
0088         NPColumnRadius = cms.double(4.0),
0089         OhmicColumnRadius = cms.double(4.0),
0090         NPColumnGap = cms.double(46.0)
0091     ),
0092 #Pixel-Bricked Digitizer Algorithm
0093     PixelBrickedDigitizerAlgorithm   = PixelDigitizerAlgorithmCommon.clone(),
0094 #Pixel in PS Module
0095     PSPDigitizerAlgorithm = cms.PSet(
0096       ElectronPerAdc = cms.double(135.0),
0097       ReadoutNoiseInElec = cms.double(200.0),#D.B.:Fill readout noise, including all readout chain, relevant for smearing
0098       ThresholdInElectrons_Barrel = cms.double(6300.), #(0.4 MIP = 0.4 * 16000 e)
0099       ThresholdInElectrons_Endcap = cms.double(6300.), #(0.4 MIP = 0.4 * 16000 e) 
0100       AddThresholdSmearing = cms.bool(True),
0101       ThresholdSmearing_Barrel = cms.double(630.0),
0102       ThresholdSmearing_Endcap = cms.double(630.0),
0103       HIPThresholdInElectrons_Barrel = cms.double(1.0e10), # very high value to avoid Over threshold bit
0104       HIPThresholdInElectrons_Endcap = cms.double(1.0e10), # very high value to avoid Over threshold bit
0105       NoiseInElectrons = cms.double(200),            # 30% of the readout noise (should be changed in future)
0106       Phase2ReadoutMode = cms.int32(0), # Flag to decide Readout Mode :Digital(0) or Analog (linear TDR (-1), dual slope with slope parameters (+1,+2,+3,+4) with threshold subtraction
0107       AdcFullScale = cms.int32(255),
0108       TofUpperCut = cms.double(12.5),
0109       TofLowerCut = cms.double(-12.5),
0110       AddNoisyPixels = cms.bool(True),
0111       Alpha2Order = cms.bool(True),         #D.B.: second order effect, does not switch off magnetic field as described
0112       AddNoise = cms.bool(True),
0113       AddXTalk = cms.bool(True),            #D.B.
0114       InterstripCoupling = cms.double(0.05),    #D.B.
0115       SigmaZero = cms.double(0.00037),          #D.B.: 3.7um spread for 300um-thick sensor, renormalized in digitizerAlgo
0116       SigmaCoeff = cms.double(1.80),        #D.B.: to be confirmed with simulations in CMSSW_6.X
0117       ClusterWidth = cms.double(3),     #D.B.: this is used as number of sigmas for charge collection (3=+-3sigmas)
0118       LorentzAngle_DB = cms.bool(True),         
0119       TanLorentzAnglePerTesla_Endcap = cms.double(0.07),
0120       TanLorentzAnglePerTesla_Barrel = cms.double(0.07),
0121       KillModules = cms.bool(False),
0122       DeadModules_DB = cms.bool(False),
0123       DeadModules = cms.VPSet(),
0124       AddInefficiency = cms.bool(False),
0125       Inefficiency_DB = cms.bool(False),                
0126       EfficiencyFactors_Barrel = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999 ),
0127       EfficiencyFactors_Endcap = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 
0128       0.999, 0.999 ),#Efficiencies kept as Side2Disk1,Side1Disk1 and so on
0129       CellsToKill = cms.VPSet(),
0130       AddBiasRailInefficiency= cms.bool(False)
0131     ),
0132 #Strip in PS module
0133     PSSDigitizerAlgorithm = cms.PSet(
0134       ElectronPerAdc = cms.double(135.0),
0135 #D.B.:the noise should be a function of strip capacitance, roughly: ReadoutNoiseInElec=500+(64*Cdet[pF]) ~= 500+(64*1.5[cm])
0136       ReadoutNoiseInElec = cms.double(700.0),#D.B.:Fill readout noise, including all readout chain, relevant for smearing
0137       ThresholdInElectrons_Barrel = cms.double(6300.), #(0.4 MIP = 0.4 * 16000 e)
0138       ThresholdInElectrons_Endcap = cms.double(6300.), #(0.4 MIP = 0.4 * 16000 e)
0139       AddThresholdSmearing = cms.bool(True),
0140       ThresholdSmearing_Barrel = cms.double(630.0),
0141       ThresholdSmearing_Endcap = cms.double(630.0),
0142       HIPThresholdInElectrons_Barrel = cms.double(21000.), # 1.4 MIP considered as HIP
0143       HIPThresholdInElectrons_Endcap = cms.double(21000.), # 1.4 MIP considered as HIP 
0144       NoiseInElectrons = cms.double(700),            # 30% of the readout noise (should be changed in future)
0145       Phase2ReadoutMode = cms.int32(0), # Flag to decide Readout Mode :Digital(0) or Analog (linear TDR (-1), dual slope with slope parameters (+1,+2,+3,+4) with threshold subtraction
0146       AdcFullScale = cms.int32(255),
0147       TofUpperCut = cms.double(12.5),
0148       TofLowerCut = cms.double(-12.5),
0149       AddNoisyPixels = cms.bool(True),
0150       Alpha2Order = cms.bool(True),         #D.B.: second order effect, does not switch off magnetic field as described
0151       AddNoise = cms.bool(True),
0152       AddXTalk = cms.bool(True),            #D.B.
0153       InterstripCoupling = cms.double(0.05),    #D.B.
0154       SigmaZero = cms.double(0.00037),          #D.B.: 3.7um spread for 300um-thick sensor, renormalized in digitizerAlgo
0155       SigmaCoeff = cms.double(1.80),        #D.B.: to be confirmed with simulations in CMSSW_6.X
0156       ClusterWidth = cms.double(3),     #D.B.: this is used as number of sigmas for charge collection (3=+-3sigmas)
0157       LorentzAngle_DB = cms.bool(True),         
0158       TanLorentzAnglePerTesla_Endcap = cms.double(0.07),
0159       TanLorentzAnglePerTesla_Barrel = cms.double(0.07),
0160       KillModules = cms.bool(False),
0161       DeadModules_DB = cms.bool(False),
0162       DeadModules = cms.VPSet(),
0163       AddInefficiency = cms.bool(False),
0164       Inefficiency_DB = cms.bool(False),                
0165       EfficiencyFactors_Barrel = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999 ),
0166       EfficiencyFactors_Endcap = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 
0167       0.999, 0.999 ),#Efficiencies kept as Side2Disk1,Side1Disk1 and so on
0168       CellsToKill = cms.VPSet()
0169     ),
0170 #Two Strip Module
0171     SSDigitizerAlgorithm = cms.PSet(
0172       ElectronPerAdc = cms.double(135.0),
0173 #D.B.:the noise should be a function of strip capacitance, roughly: ReadoutNoiseInElec=500+(64*Cdet[pF]) ~= 500+(64*1.5[cm])
0174       ReadoutNoiseInElec = cms.double(1000.0),#D.B.:Fill readout noise, including all readout chain, relevant for smearing
0175       ThresholdInElectrons_Barrel = cms.double(5800.), #D.B.: this should correspond to a threshold of 530mV    
0176       ThresholdInElectrons_Endcap = cms.double(5800.),
0177       AddThresholdSmearing = cms.bool(True),
0178       ThresholdSmearing_Barrel = cms.double(580.0),#D.B.: changed (~5mV peakToPeak --> 1.76mV rms) (was 210.0)
0179       ThresholdSmearing_Endcap = cms.double(580.0),#D.B.: changed (~5mV peakToPeak --> 1.76mV rms) (was 245.0)
0180       HIPThresholdInElectrons_Barrel = cms.double(1.0e10), # very high value to avoid Over threshold bit
0181       HIPThresholdInElectrons_Endcap = cms.double(1.0e10), # very high value to avoid Over threshold bit
0182       NoiseInElectrons = cms.double(1000),           # 30% of the readout noise (should be changed in future)
0183       Phase2ReadoutMode = cms.int32(0), # Flag to decide Readout Mode :Digital(0) or Analog (linear TDR (-1), dual slope with slope parameters (+1,+2,+3,+4) with threshold subtraction
0184       AdcFullScale = cms.int32(255),
0185       TofUpperCut = cms.double(12.5),
0186       TofLowerCut = cms.double(-12.5),
0187       AddNoisyPixels = cms.bool(True),
0188       Alpha2Order = cms.bool(True),         #D.B.: second order effect, does not switch off magnetic field as described
0189       AddNoise = cms.bool(True),
0190       AddXTalk = cms.bool(True),            #D.B.
0191       InterstripCoupling = cms.double(0.05),    #D.B.
0192       SigmaZero = cms.double(0.00037),          #D.B.: 3.7um spread for 300um-thick sensor, renormalized in digitizerAlgo
0193       SigmaCoeff = cms.double(1.80),        #D.B.: to be confirmed with simulations in CMSSW_6.X
0194       ClusterWidth = cms.double(3),     #D.B.: this is used as number of sigmas for charge collection (3=+-3sigmas)
0195       LorentzAngle_DB = cms.bool(True),         
0196       TanLorentzAnglePerTesla_Endcap = cms.double(0.07),
0197       TanLorentzAnglePerTesla_Barrel = cms.double(0.07),
0198       KillModules = cms.bool(False),
0199       DeadModules_DB = cms.bool(False),
0200       DeadModules = cms.VPSet(),
0201       AddInefficiency = cms.bool(False),
0202       Inefficiency_DB = cms.bool(False),                
0203       EfficiencyFactors_Barrel = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999 ),
0204       EfficiencyFactors_Endcap = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 
0205       0.999, 0.999 ),#Efficiencies kept as Side2Disk1,Side1Disk1 and so on
0206       CellsToKill = cms.VPSet(),
0207       HitDetectionMode = cms.int32(0),  # (0/1/2/3/4 => SquareWindow/SampledMode/LatchedMode/SampledOrLachedMode/HIPFindingMode)
0208       PulseShapeParameters = cms.vdouble(-3.0, 16.043703, 99.999857, 40.571650, 2.0, 1.2459094),
0209         CBCDeadTime = cms.double(0.0) # (2.7 ns deadtime in latched mode)
0210     )
0211 )
0212 
0213 # For premixing stage1
0214 # - add noise as by default
0215 # - do not add noisy pixels (to be done in stage2)
0216 # - do not apply inefficiency (to be done in stage2)
0217 # - disable threshold smearing
0218 #
0219 # For outer tracker
0220 # - force analog readout to get the ADCs
0221 #
0222 # NOTE: It is currently assumed that all sub-digitizers have the same ElectronPerAdc.
0223 from Configuration.ProcessModifiers.premix_stage1_cff import premix_stage1
0224 _premixStage1ModifyDict = dict(
0225     premixStage1 = True,
0226     PixelDigitizerAlgorithm = dict(
0227         AddNoisyPixels = False,
0228         AddInefficiency = False,
0229         AddThresholdSmearing = False,
0230     ),
0231     Pixel3DDigitizerAlgorithm = dict(
0232         AddNoisyPixels = False,
0233         AddInefficiency = False,
0234         AddThresholdSmearing = False,
0235     ),
0236     PSPDigitizerAlgorithm = dict(
0237         AddNoisyPixels = False,
0238         AddInefficiency = False,
0239         AddThresholdSmearing = False,
0240     ),
0241     PSSDigitizerAlgorithm = dict(
0242         AddNoisyPixels = False,
0243         AddInefficiency = False,
0244         AddThresholdSmearing = False,
0245         Phase2ReadoutMode = -1
0246     ),
0247     SSDigitizerAlgorithm = dict(
0248         AddNoisyPixels = False,
0249         AddInefficiency = False,
0250         AddThresholdSmearing = False,
0251     ),
0252 )
0253 
0254 premix_stage1.toModify(phase2TrackerDigitizer, **_premixStage1ModifyDict)
0255 
0256 from Configuration.ProcessModifiers.enableXTalkInPhase2Pixel_cff import enableXTalkInPhase2Pixel
0257 _enableXTalkInPhase2PixelModifyDict = dict( 
0258     PixelDigitizerAlgorithm = dict(
0259         AddXTalk = True, 
0260         Odd_row_interchannelCoupling_next_row = 0.00,
0261         Even_row_interchannelCoupling_next_row = 0.06
0262         )
0263 )
0264 
0265 enableXTalkInPhase2Pixel.toModify(phase2TrackerDigitizer, **_enableXTalkInPhase2PixelModifyDict)
0266 
0267 
0268