Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:55

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 PixelDigitizerAlgorithmCommon = cms.PSet(
0004     ElectronPerAdc = cms.double(1500.0),
0005     ReadoutNoiseInElec = cms.double(-99.9),       # not used at the moment
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(20.),
0017     TofLowerCut = cms.double(-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     UseReweighting = cms.bool(False),
0039     EfficiencyFactors_Barrel = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999 ),
0040     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, 
0041                                            0.999, 0.999 ),#Efficiencies kept as Side2Disk1,Side1Disk1 and so on
0042     CellsToKill = cms.VPSet(),
0043     ApplyTimewalk = cms.bool(False),
0044     TimewalkModel = cms.PSet(
0045         ThresholdValues = cms.vdouble(1000, 1200, 1500, 3000),
0046         Curves = cms.VPSet(
0047             cms.PSet(
0048                 charge = cms.vdouble(1000, 1025, 1050, 1100, 1200, 1500, 2000, 6000, 10000, 15000, 20000, 30000),
0049                 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)
0050             ),
0051             cms.PSet(
0052                 charge = cms.vdouble(1200, 1225, 1250, 1500, 2000, 6000, 10000, 15000, 20000, 30000),
0053                 delay = cms.vdouble(26.28, 23.5, 21.79, 14.92, 10.27, 3.33, 1.86, 1.07, 0.66, 0.27)
0054             ),
0055             cms.PSet(
0056                 charge = cms.vdouble(1500, 1525, 1550, 1600, 2000, 6000, 10000, 15000, 20000, 30000),
0057                 delay = cms.vdouble(25.36, 23.05, 21.6, 19.56, 12.94, 3.79, 2.14, 1.26, 0.81, 0.39)
0058             ),
0059             cms.PSet(
0060                 charge = cms.vdouble(3000, 3025, 3050, 3100, 3500, 6000, 10000, 15000, 20000, 30000),
0061                 delay = cms.vdouble(25.63, 23.63, 22.35, 20.65, 14.92, 6.7, 3.68, 2.29, 1.62, 1.02)
0062             )
0063         )
0064     )
0065 )
0066 phase2TrackerDigitizer = cms.PSet(
0067 # For the Digitizer
0068     accumulatorType = cms.string("Phase2TrackerDigitizer"),
0069     hitsProducer = cms.string('g4SimHits'),
0070     ROUList = cms.vstring(
0071         'TrackerHitsPixelBarrelLowTof', 
0072         'TrackerHitsPixelBarrelHighTof', 
0073         'TrackerHitsPixelEndcapLowTof', 
0074         'TrackerHitsPixelEndcapHighTof'),
0075     GeometryType = cms.string('idealForDigi'),
0076     isOTreadoutAnalog = cms.bool(False),#set this to true if you want analog readout for OT
0077 # Common for Algos
0078     usePseudoPixel3DAlgo = cms.bool(False),
0079     premixStage1 = cms.bool(False),
0080     AlgorithmCommon = cms.PSet(
0081       DeltaProductionCut = cms.double(0.03),
0082       makeDigiSimLinks = cms.untracked.bool(True),
0083     ),
0084 # Specific parameters
0085 #Pixel Digitizer Algorithm
0086     PixelDigitizerAlgorithm   = PixelDigitizerAlgorithmCommon.clone(
0087        UseReweighting = cms.bool(False), # will be True for realistic simulations
0088     ),
0089 #Pixel-3D Digitizer Algorithm
0090     Pixel3DDigitizerAlgorithm = PixelDigitizerAlgorithmCommon.clone(
0091         SigmaCoeff = cms.double(1.80),
0092         NPColumnRadius = cms.double(4.0),
0093         OhmicColumnRadius = cms.double(4.0),
0094         NPColumnGap = cms.double(46.0),
0095         UseReweighting = cms.bool(False),  # will be True for realistic simulations
0096     ),
0097 #Pixel in PS Module
0098     PSPDigitizerAlgorithm = cms.PSet(
0099       ElectronPerAdc = cms.double(135.0),
0100       ReadoutNoiseInElec = cms.double(-99.9),       # not used at the moment
0101       ThresholdInElectrons_Barrel = cms.double(6300.), #(0.4 MIP = 0.4 * 16000 e)
0102       ThresholdInElectrons_Endcap = cms.double(6300.), #(0.4 MIP = 0.4 * 16000 e) 
0103       AddThresholdSmearing = cms.bool(False),
0104       ThresholdSmearing_Barrel = cms.double(630.0),
0105       ThresholdSmearing_Endcap = cms.double(630.0),
0106       HIPThresholdInElectrons_Barrel = cms.double(1.0e10), # very high value to avoid Over threshold bit
0107       HIPThresholdInElectrons_Endcap = cms.double(1.0e10), # very high value to avoid Over threshold bit
0108       NoiseInElectrons = cms.double(200),            # 30% of the readout noise (should be changed in future)
0109       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
0110       AdcFullScale = cms.int32(255),
0111       TofUpperCut = cms.double(12.5),
0112       TofLowerCut = cms.double(-12.5),
0113       AddNoisyPixels = cms.bool(True),
0114       Alpha2Order = cms.bool(True),         #D.B.: second order effect, does not switch off magnetic field as described
0115       AddNoise = cms.bool(True),
0116       AddXTalk = cms.bool(True),            #D.B.
0117       InterstripCoupling = cms.double(0.05),    #D.B.
0118       SigmaZero = cms.double(0.00037),          #D.B.: 3.7um spread for 300um-thick sensor, renormalized in digitizerAlgo
0119       SigmaCoeff = cms.double(1.80),        #D.B.: to be confirmed with simulations in CMSSW_6.X
0120       ClusterWidth = cms.double(3),     #D.B.: this is used as number of sigmas for charge collection (3=+-3sigmas)
0121       LorentzAngle_DB = cms.bool(True),         
0122       TanLorentzAnglePerTesla_Endcap = cms.double(0.07),
0123       TanLorentzAnglePerTesla_Barrel = cms.double(0.07),
0124       KillModules = cms.bool(False),
0125       DeadModules_DB = cms.bool(False),
0126       DeadModules = cms.VPSet(),
0127       AddInefficiency = cms.bool(False),
0128       Inefficiency_DB = cms.bool(False),                
0129       EfficiencyFactors_Barrel = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999 ),
0130       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, 
0131       0.999, 0.999 ),#Efficiencies kept as Side2Disk1,Side1Disk1 and so on
0132       CellsToKill = cms.VPSet(),
0133       BiasRailInefficiencyFlag = cms.int32(1), # Flag to decide BiasRail inefficiency : no inefficency(0) : inefficiency with optimistic(AND) scenario(1) : inefficiency with pessimistic(OR) scenario(2)
0134       UseReweighting = cms.bool(False),
0135     ),
0136 #Strip in PS module
0137     PSSDigitizerAlgorithm = cms.PSet(
0138       ElectronPerAdc = cms.double(135.0),
0139 #D.B.:the noise should be a function of strip capacitance, roughly: ReadoutNoiseInElec=500+(64*Cdet[pF]) ~= 500+(64*1.5[cm])
0140       ReadoutNoiseInElec = cms.double(-99.9),       # not used at the moment
0141       ThresholdInElectrons_Barrel = cms.double(4800.), #(0.4 MIP = 0.4 * 16000 e)
0142       ThresholdInElectrons_Endcap = cms.double(4800.), #(0.4 MIP = 0.4 * 16000 e)
0143       AddThresholdSmearing = cms.bool(False),
0144       ThresholdSmearing_Barrel = cms.double(480.0),
0145       ThresholdSmearing_Endcap = cms.double(480.0),
0146       HIPThresholdInElectrons_Barrel = cms.double(21000.), # 1.4 MIP considered as HIP
0147       HIPThresholdInElectrons_Endcap = cms.double(21000.), # 1.4 MIP considered as HIP 
0148       NoiseInElectrons = cms.double(1010), # threshold = 4800e, noise=4800e/4.75=1010 (4.75 sigma=>occupancy =1e-6)
0149       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
0150       AdcFullScale = cms.int32(255),
0151       TofUpperCut = cms.double(12.5),
0152       TofLowerCut = cms.double(-12.5),
0153       AddNoisyPixels = cms.bool(True),
0154       Alpha2Order = cms.bool(True),         #D.B.: second order effect, does not switch off magnetic field as described
0155       AddNoise = cms.bool(True),
0156       AddXTalk = cms.bool(True),            #D.B.
0157       InterstripCoupling = cms.double(0.05),    #D.B.
0158       SigmaZero = cms.double(0.00037),          #D.B.: 3.7um spread for 300um-thick sensor, renormalized in digitizerAlgo
0159       SigmaCoeff = cms.double(1.80),        #D.B.: to be confirmed with simulations in CMSSW_6.X
0160       ClusterWidth = cms.double(3),     #D.B.: this is used as number of sigmas for charge collection (3=+-3sigmas)
0161       LorentzAngle_DB = cms.bool(True),         
0162       TanLorentzAnglePerTesla_Endcap = cms.double(0.07),
0163       TanLorentzAnglePerTesla_Barrel = cms.double(0.07),
0164       KillModules = cms.bool(False),
0165       DeadModules_DB = cms.bool(False),
0166       DeadModules = cms.VPSet(),
0167       AddInefficiency = cms.bool(False),
0168       Inefficiency_DB = cms.bool(False),                
0169       EfficiencyFactors_Barrel = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999 ),
0170       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, 
0171       0.999, 0.999 ),#Efficiencies kept as Side2Disk1,Side1Disk1 and so on
0172       CellsToKill = cms.VPSet(),
0173       UseReweighting = cms.bool(False),
0174     ),
0175 #Two Strip Module
0176     SSDigitizerAlgorithm = cms.PSet(
0177       ElectronPerAdc = cms.double(135.0),
0178 #D.B.:the noise should be a function of strip capacitance, roughly: ReadoutNoiseInElec=500+(64*Cdet[pF]) ~= 500+(64*1.5[cm])
0179       ReadoutNoiseInElec = cms.double(-99.9),       # not used at the moment
0180       ThresholdInElectrons_Barrel = cms.double(6000.), 
0181       ThresholdInElectrons_Endcap = cms.double(6000.),
0182       AddThresholdSmearing = cms.bool(False),    
0183       ThresholdSmearing_Barrel = cms.double(600.0),
0184       ThresholdSmearing_Endcap = cms.double(600.0),
0185       HIPThresholdInElectrons_Barrel = cms.double(1.0e10), # very high value to avoid Over threshold bit
0186       HIPThresholdInElectrons_Endcap = cms.double(1.0e10), # very high value to avoid Over threshold bit
0187       NoiseInElectrons = cms.double(1263), # threshold = 6000e, noise=6000e/4.75=1263e (4.75 sigma=>occupancy =1e-6)
0188       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
0189       AdcFullScale = cms.int32(255),
0190       TofUpperCut = cms.double(12.5),
0191       TofLowerCut = cms.double(-12.5),
0192       AddNoisyPixels = cms.bool(True),
0193       Alpha2Order = cms.bool(True),         #D.B.: second order effect, does not switch off magnetic field as described
0194       AddNoise = cms.bool(True),
0195       AddXTalk = cms.bool(True),            #D.B.
0196       InterstripCoupling = cms.double(0.05),    #D.B.
0197       SigmaZero = cms.double(0.00037),          #D.B.: 3.7um spread for 300um-thick sensor, renormalized in digitizerAlgo
0198       SigmaCoeff = cms.double(1.80),        #D.B.: to be confirmed with simulations in CMSSW_6.X
0199       ClusterWidth = cms.double(3),     #D.B.: this is used as number of sigmas for charge collection (3=+-3sigmas)
0200       LorentzAngle_DB = cms.bool(True),         
0201       TanLorentzAnglePerTesla_Endcap = cms.double(0.07),
0202       TanLorentzAnglePerTesla_Barrel = cms.double(0.07),
0203       KillModules = cms.bool(False),
0204       DeadModules_DB = cms.bool(False),
0205       DeadModules = cms.VPSet(),
0206       AddInefficiency = cms.bool(False),
0207       Inefficiency_DB = cms.bool(False),                
0208       EfficiencyFactors_Barrel = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999 ),
0209       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, 
0210       0.999, 0.999 ),#Efficiencies kept as Side2Disk1,Side1Disk1 and so on
0211       CellsToKill = cms.VPSet(),
0212       HitDetectionMode = cms.int32(0),  # (0/1/2/3/4 => SquareWindow/SampledMode/LatchedMode/SampledOrLachedMode/HIPFindingMode)
0213       PulseShapeParameters = cms.vdouble(-3.0, 16.043703, 99.999857, 40.571650, 2.0, 1.2459094),
0214       CBCDeadTime = cms.double(0.0), # (2.7 ns deadtime in latched mode)
0215       UseReweighting = cms.bool(False),
0216     )
0217 )
0218 
0219 # For premixing stage1
0220 # - add noise as by default
0221 # - do not add noisy pixels (to be done in stage2)
0222 # - do not apply inefficiency (to be done in stage2)
0223 # - disable threshold smearing
0224 # - disable x-talk simulatiom
0225 #
0226 # For both Inner and Outer tracker
0227 # - force analog readout to get Full Charge  ADCs 
0228 # - for Inner Tracker Dual Slope signal scaling NOT used here to avoid any singal loss.
0229 #   At step 2 Dual Slope signal scaling is used as default. To keep the full precision
0230 #   ADCFull scaling is also changed to 255 for Inner Tracker
0231 # 
0232 # - 
0233 # NOTE: It is currently assumed that all sub-digitizers have the same ElectronPerAdc.
0234 from Configuration.ProcessModifiers.premix_stage1_cff import premix_stage1
0235 _premixStage1ModifyDict = dict(
0236     premixStage1 = True,
0237     PixelDigitizerAlgorithm = dict(
0238         AddNoisyPixels = False,
0239         AddInefficiency = False,
0240         AddThresholdSmearing = False,
0241         AddXTalk = False,
0242         Phase2ReadoutMode = -1,
0243         AdcFullScale = 255,
0244     ),
0245     Pixel3DDigitizerAlgorithm = dict(
0246         AddNoisyPixels = False,
0247         AddInefficiency = False,
0248         AddThresholdSmearing = False,
0249         AddXTalk = False,
0250         Phase2ReadoutMode = -1,
0251         AdcFullScale = 255,
0252     ),
0253     PSPDigitizerAlgorithm = dict(
0254         AddNoisyPixels = False,
0255         AddInefficiency = False,
0256         AddThresholdSmearing = False,
0257         AddXTalk = False,
0258         Phase2ReadoutMode = -1,
0259     ),
0260     PSSDigitizerAlgorithm = dict(
0261         AddNoisyPixels = False,
0262         AddInefficiency = False,
0263         AddThresholdSmearing = False,
0264         AddXTalk = False,
0265         Phase2ReadoutMode = -1,
0266     ),
0267     SSDigitizerAlgorithm = dict(
0268         AddNoisyPixels = False,
0269         AddInefficiency = False,
0270         AddThresholdSmearing = False,
0271         AddXTalk = False,
0272         Phase2ReadoutMode = -1,
0273     ),
0274 )
0275 
0276 premix_stage1.toModify(phase2TrackerDigitizer, **_premixStage1ModifyDict)
0277 
0278 from Configuration.ProcessModifiers.enableXTalkInPhase2Pixel_cff import enableXTalkInPhase2Pixel
0279 _enableXTalkInPhase2PixelModifyDict = dict( 
0280     PixelDigitizerAlgorithm = dict(
0281         AddXTalk = True, 
0282         Odd_row_interchannelCoupling_next_row = 0.00,
0283         Even_row_interchannelCoupling_next_row = 0.06
0284         )
0285 )
0286 
0287 enableXTalkInPhase2Pixel.toModify(phase2TrackerDigitizer, **_enableXTalkInPhase2PixelModifyDict)
0288 
0289 
0290