Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-12-01 23:40:43

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 def customisePostLS1_Common(process):
0004 
0005     # deal with L1 Emulation separately
0006     from L1Trigger.L1TCommon.customsPostLS1 import customiseSimL1EmulatorForStage1
0007     process = customiseSimL1EmulatorForStage1(process)
0008 
0009     # deal with CSC separately
0010     from SLHCUpgradeSimulations.Configuration.muonCustoms import customise_csc_PostLS1
0011     process = customise_csc_PostLS1(process)
0012 
0013     # deal with FastSim separately
0014     from SLHCUpgradeSimulations.Configuration.fastSimCustoms import customise_fastSimPostLS1
0015     process = customise_fastSimPostLS1(process)
0016 
0017     # all the rest
0018     if hasattr(process,'g4SimHits'):
0019         process = customise_Sim(process)
0020     if hasattr(process,'DigiToRaw'):
0021         process = customise_DigiToRaw(process)
0022     if hasattr(process,'RawToDigi'):
0023         process = customise_RawToDigi(process)
0024     if hasattr(process,'reconstruction'):
0025         process = customise_Reco(process)
0026     if hasattr(process,'digitisation_step') or ( hasattr(process,'mix') and hasattr(process.mix,'digitizers')):
0027         process = customise_Digi_Common(process)
0028     if hasattr(process,'L1simulation_step'):
0029         process = customise_L1Emulator(process)
0030     if hasattr(process,'dqmoffline_step'):
0031         process = customise_DQM(process)
0032     if hasattr(process,'dqmHarvesting'):
0033         process = customise_harvesting(process)
0034     if hasattr(process,'validation_step'):
0035         process = customise_Validation(process)
0036     if hasattr(process,'datamixing_step'):
0037         process = customise_DataMix(process)
0038 
0039     return process
0040 
0041 
0042 def customisePostLS1(process,displayDeprecationWarning=True):
0043     if displayDeprecationWarning :
0044         print("""
0045         #
0046         # -- Warning! You are using a deprecated customisation function. --
0047         #
0048         # It will probably run fine, but the customisations you are getting may be out of date.
0049         # You should update your configuration file by
0050         #   If using cmsDriver:
0051         #       1) remove the "--customise SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1" option
0052         #       2) add the option "--era Run2_25ns" 
0053         #   If using a pre-made configuration file:
0054         #       1) remove or comment out the "process = customisePostLS1(process)" line.
0055         #       2) add "from Configuration.Eras.Era_Run2_25ns_cff import Run2_25ns" to the TOP of the config file (above
0056         #          the process declaration).
0057         #       3) add "Run2_25ns" as a parameter to the process object, e.g. "process = cms.Process('HLT',Run2_25ns)" 
0058         #
0059         # There is more information at https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideCmsDriverEras
0060         #
0061         """)
0062     # common customisation
0063     process = customisePostLS1_Common(process)
0064 
0065     # 25ns specific customisation
0066     if hasattr(process,'digitisation_step'):
0067         process = customise_Digi_25ns(process)
0068     if hasattr(process,'dqmoffline_step'):
0069         process = customise_DQM_25ns(process)
0070 
0071     return process
0072 
0073 
0074 def customisePostLS1_lowPU(process):
0075 
0076     # common customisations
0077     process = customisePostLS1_Common(process)
0078 
0079     # 50ns specific customisation
0080     if hasattr(process,'digitisation_step'):
0081         process = customise_Digi_50ns(process)
0082 
0083     return process
0084 
0085 
0086 def customisePostLS1_50ns(process,displayDeprecationWarning=True):
0087     if displayDeprecationWarning :
0088         print("""
0089         #
0090         # -- Warning! You are using a deprecated customisation function. --
0091         #
0092         # It will probably run fine, but the customisations you are getting may be out of date.
0093         # You should update your configuration file by
0094         #   If using cmsDriver:
0095         #       1) remove the "--customise SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_50ns" option
0096         #       2) add the option "--era Run2_50ns"
0097         #   If using a pre-made configuration file:
0098         #       1) remove or comment out the "process = customisePostLS1_50ns(process)" line.
0099         #       2) add "from Configuration.Eras.Era_Run2_50ns_cff import Run2_50ns" to the TOP of the config file (above
0100         #          the process declaration).
0101         #       3) add "Run2_50ns" as a parameter to the process object, e.g. "process = cms.Process('HLT',Run2_50ns)"
0102         #
0103         # There is more information at https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideCmsDriverEras
0104         #
0105         """)
0106 
0107     # common customisations
0108     process = customisePostLS1_Common(process)
0109 
0110     # 50ns specific customisation
0111     if hasattr(process,'digitisation_step'):
0112         process = customise_Digi_50ns(process)
0113 
0114     return process
0115 
0116 
0117 def customisePostLS1_HI(process,displayDeprecationWarning=True):
0118     if displayDeprecationWarning :
0119         print("""
0120         #
0121         # -- Warning! You are using a deprecated customisation function. --
0122         #
0123         # It will probably run fine, but the customisations you are getting may be out of date.
0124         # You should update your configuration file by
0125         #   If using cmsDriver:
0126         #       1) remove the "--customise SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_HI" option
0127         #       2) add the option "--era Run2_HI"
0128         #   If using a pre-made configuration file:
0129         #       1) remove or comment out the "process = customisePostLS1_HI(process)" line.
0130         #       2) add "from Configuration.Eras.Era_Run2_HI_cff import Run2_HI" to the TOP of the config file (above
0131         #          the process declaration).
0132         #       3) add "Run2_HI" as a parameter to the process object, e.g. "process = cms.Process('HLT',Run2_HI)"
0133         #
0134         # There is more information at https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideCmsDriverEras
0135         #
0136         """)
0137 
0138     # common customisation
0139     process = customisePostLS1_Common(process)
0140 
0141     # HI Specific additional customizations:
0142     from L1Trigger.L1TCommon.customsPostLS1 import customiseSimL1EmulatorForPostLS1_Additional_HI
0143     process = customiseSimL1EmulatorForPostLS1_Additional_HI(process)
0144 
0145     # HI L1Menu:
0146     #from L1Trigger.Configuration.customise_overwriteL1Menu import L1Menu_CollisionsHeavyIons2015_v0
0147     #process = L1Menu_CollisionsHeavyIons2015_v0(process)
0148 
0149     return process
0150 
0151 def digiEventContent(process):
0152     #extend the event content
0153 
0154     alist=['RAWDEBUG','FEVTDEBUG','FEVTDEBUGHLT','GENRAW','RAWSIMHLT','FEVT']
0155     for a in alist:
0156         b = a + 'output'
0157         if hasattr(process,b):
0158             getattr(process,b).outputCommands.append('keep *_simMuonCSCDigis_*_*')
0159             getattr(process,b).outputCommands.append('keep *_simMuonRPCDigis_*_*')
0160             getattr(process,b).outputCommands.append('keep *_simHcalUnsuppressedDigis_*_*')
0161 
0162     return process
0163 
0164 
0165 def customise_DQM(process):
0166     #process.dqmoffline_step.remove(process.jetMETAnalyzer)
0167     # Turn off flag of gangedME11a
0168     process.l1tCsctf.gangedME11a = cms.untracked.bool(False)
0169     # Turn off "low bias voltage" region in HCAL noise filters
0170     if hasattr(process,'HBHENoiseFilterResultProducer'):
0171         process.HBHENoiseFilterResultProducer.IgnoreTS4TS5ifJetInLowBVRegion = cms.bool(False)
0172     return process
0173 
0174 
0175 def customise_DQM_25ns(process):
0176     #Empty place-holder
0177     # Switch to Stage1 Digi
0178     process.load("L1Trigger.L1TCommon.l1tRawToDigi_cfi")
0179     process.load("L1Trigger.L1TCommon.caloStage1LegacyFormatDigis_cfi")
0180     if hasattr(process, 'RawToDigi'):
0181         process.L1RawToDigiSeq = cms.Sequence(process.gctDigis+process.caloStage1Digis+process.caloStage1LegacyFormatDigis)
0182         process.RawToDigi.replace(process.gctDigis, process.L1RawToDigiSeq)
0183 
0184     process.load('DQMOffline.L1Trigger.L1TriggerDqmOffline_cff')
0185     if hasattr(process, 'l1tMonitorStage1Online'):
0186         process.l1tRct.rctSource = 'caloStage1Digis'
0187         process.l1tRctfromRCT.rctSource = 'rctDigis'
0188         process.l1tPUM.regionSource = cms.InputTag("rctDigis")
0189         process.l1tStage1Layer2.stage1_layer2_ = cms.bool(True)
0190         process.l1tStage1Layer2.gctCentralJetsSource = cms.InputTag("caloStage1LegacyFormatDigis","cenJets")
0191         process.l1tStage1Layer2.gctForwardJetsSource = cms.InputTag("caloStage1LegacyFormatDigis","forJets")
0192         process.l1tStage1Layer2.gctTauJetsSource = cms.InputTag("caloStage1LegacyFormatDigis","tauJets")
0193         process.l1tStage1Layer2.gctIsoTauJetsSource = cms.InputTag("caloStage1LegacyFormatDigis","isoTauJets")
0194         process.l1tStage1Layer2.gctEnergySumsSource = cms.InputTag("caloStage1LegacyFormatDigis")
0195         process.l1tStage1Layer2.gctIsoEmSource = cms.InputTag("caloStage1LegacyFormatDigis","isoEm")
0196         process.l1tStage1Layer2.gctNonIsoEmSource = cms.InputTag("caloStage1LegacyFormatDigis","nonIsoEm")
0197         process.dqmL1ExtraParticlesStage1.etTotalSource = 'caloStage1LegacyFormatDigis'
0198         process.dqmL1ExtraParticlesStage1.nonIsolatedEmSource = 'caloStage1LegacyFormatDigis:nonIsoEm'
0199         process.dqmL1ExtraParticlesStage1.etMissSource = 'caloStage1LegacyFormatDigis'
0200         process.dqmL1ExtraParticlesStage1.htMissSource = 'caloStage1LegacyFormatDigis'
0201         process.dqmL1ExtraParticlesStage1.forwardJetSource = 'caloStage1LegacyFormatDigis:forJets'
0202         process.dqmL1ExtraParticlesStage1.centralJetSource = 'caloStage1LegacyFormatDigis:cenJets'
0203         process.dqmL1ExtraParticlesStage1.tauJetSource = 'caloStage1LegacyFormatDigis:tauJets'
0204         process.dqmL1ExtraParticlesStage1.isolatedEmSource = 'caloStage1LegacyFormatDigis:isoEm'
0205         process.dqmL1ExtraParticlesStage1.etHadSource = 'caloStage1LegacyFormatDigis'
0206         process.dqmL1ExtraParticlesStage1.hfRingEtSumsSource = 'caloStage1LegacyFormatDigis'
0207         process.dqmL1ExtraParticlesStage1.hfRingBitCountsSource = 'caloStage1LegacyFormatDigis'
0208         process.l1ExtraDQMStage1.stage1_layer2_ = cms.bool(True)
0209         process.l1ExtraDQMStage1.L1ExtraIsoTauJetSource_ = cms.InputTag("dqmL1ExtraParticlesStage1", "IsoTau")
0210 
0211     if hasattr(process, 'l1Stage1HwValEmulatorMonitor'):    
0212         process.l1TdeRCT.rctSourceData = 'caloStage1Digis'
0213         process.l1TdeRCTfromRCT.rctSourceData = 'rctDigis'
0214         process.l1compareforstage1.GCTsourceData = cms.InputTag("caloStage1LegacyFormatDigis")
0215         process.l1compareforstage1.GCTsourceEmul = cms.InputTag("valCaloStage1LegacyFormatDigis")
0216         process.l1compareforstage1.stage1_layer2_ = cms.bool(True)
0217         process.valStage1GtDigis.GctInputTag = 'caloStage1LegacyFormatDigis'
0218         
0219     return process
0220 
0221 
0222 def customise_Validation(process):
0223     #process.validation_step.remove(process.PixelTrackingRecHitsValid)
0224     # We don't run the HLT
0225     #process.validation_step.remove(process.HLTSusyExoVal)
0226     #process.validation_step.remove(process.hltHiggsValidator)
0227     return process
0228 
0229 
0230 def customise_Sim(process):
0231     # enable 2015 HF shower library
0232     process.g4SimHits.HFShowerLibrary.FileName = 'SimG4CMS/Calo/data/HFShowerLibrary_npmt_noatt_eta4_16en_v4.root'
0233     return process
0234 
0235 def customise_Digi_Common(process):
0236     process = digiEventContent(process)
0237     if hasattr(process,'mix') and hasattr(process.mix,'digitizers'):
0238         if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'ho'):
0239             process.mix.digitizers.hcal.ho.photoelectronsToAnalog = cms.vdouble([4.0]*16)
0240             process.mix.digitizers.hcal.ho.siPMCode = cms.int32(1)
0241             process.mix.digitizers.hcal.ho.pixels = cms.int32(2500)
0242             process.mix.digitizers.hcal.ho.doSiPMSmearing = cms.bool(False)
0243         if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'hf1'):
0244             process.mix.digitizers.hcal.hf1.samplingFactor = cms.double(0.60)
0245         if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'hf2'):
0246             process.mix.digitizers.hcal.hf2.samplingFactor = cms.double(0.60)
0247     return process
0248 
0249 def customise_DataMix(process):
0250     if hasattr(process,'mixData'):
0251         if hasattr(process.mixData,'ho'):
0252             process.mixData.ho.photoelectronsToAnalog = cms.vdouble([4.0]*16)
0253             process.mixData.ho.siPMCode = cms.int32(1)
0254             process.mixData.ho.pixels = cms.int32(2500)
0255             process.mixData.ho.doSiPMSmearing = cms.bool(False)
0256         if hasattr(process.mixData,'hf1'):
0257             process.mixData.hf1.samplingFactor = cms.double(0.60)
0258         if hasattr(process.mixData,'hf2'):
0259             process.mixData.hf2.samplingFactor = cms.double(0.60)
0260     return process
0261 
0262 
0263 def customise_Digi_50ns(process):
0264     if hasattr(process,'mix') and hasattr(process.mix,'digitizers'):
0265         if hasattr(process.mix.digitizers,'pixel'):
0266             # pixel dynamic inefficency - 13TeV - 50ns case
0267             process.mix.digitizers.pixel.theInstLumiScaleFactor = cms.double(246.4)
0268             process.mix.digitizers.pixel.theLadderEfficiency_BPix1 = cms.vdouble(
0269                 0.979259,
0270                 0.976677,
0271                 0.979259,
0272                 0.976677,
0273                 0.979259,
0274                 0.976677,
0275                 0.979259,
0276                 0.976677,
0277                 0.979259,
0278                 0.976677,
0279                 0.979259,
0280                 0.976677,
0281                 0.979259,
0282                 0.976677,
0283                 0.979259,
0284                 0.976677,
0285                 0.979259,
0286                 0.976677,
0287                 0.979259,
0288                 0.976677,
0289             )
0290             process.mix.digitizers.pixel.theLadderEfficiency_BPix2 = cms.vdouble(
0291                 0.994321,
0292                 0.993944,
0293                 0.994321,
0294                 0.993944,
0295                 0.994321,
0296                 0.993944,
0297                 0.994321,
0298                 0.993944,
0299                 0.994321,
0300                 0.993944,
0301                 0.994321,
0302                 0.993944,
0303                 0.994321,
0304                 0.993944,
0305                 0.994321,
0306                 0.993944,
0307                 0.994321,
0308                 0.993944,
0309                 0.994321,
0310                 0.993944,
0311                 0.994321,
0312                 0.993944,
0313                 0.994321,
0314                 0.993944,
0315                 0.994321,
0316                 0.993944,
0317                 0.994321,
0318                 0.993944,
0319                 0.994321,
0320                 0.993944,
0321                 0.994321,
0322                 0.993944,
0323             )
0324             process.mix.digitizers.pixel.theLadderEfficiency_BPix3 = cms.vdouble(
0325                 0.996787,
0326                 0.996945,
0327                 0.996787,
0328                 0.996945,
0329                 0.996787,
0330                 0.996945,
0331                 0.996787,
0332                 0.996945,
0333                 0.996787,
0334                 0.996945,
0335                 0.996787,
0336                 0.996945,
0337                 0.996787,
0338                 0.996945,
0339                 0.996787,
0340                 0.996945,
0341                 0.996787,
0342                 0.996945,
0343                 0.996787,
0344                 0.996945,
0345                 0.996787,
0346                 0.996945,
0347                 0.996787,
0348                 0.996945,
0349                 0.996787,
0350                 0.996945,
0351                 0.996787,
0352                 0.996945,
0353                 0.996787,
0354                 0.996945,
0355                 0.996787,
0356                 0.996945,
0357                 0.996787,
0358                 0.996945,
0359                 0.996787,
0360                 0.996945,
0361                 0.996787,
0362                 0.996945,
0363                 0.996787,
0364                 0.996945,
0365                 0.996787,
0366                 0.996945,
0367                 0.996787,
0368                 0.996945,
0369             )
0370     if hasattr(process,'mixData'):
0371             # pixel dynamic inefficency - 13TeV - 50ns case
0372         process.mixData.theInstLumiScaleFactor = cms.double(246.4)
0373         process.mixData.theLadderEfficiency_BPix1 = cms.vdouble(
0374                 0.979259,
0375                 0.976677,
0376                 0.979259,
0377                 0.976677,
0378                 0.979259,
0379                 0.976677,
0380                 0.979259,
0381                 0.976677,
0382                 0.979259,
0383                 0.976677,
0384                 0.979259,
0385                 0.976677,
0386                 0.979259,
0387                 0.976677,
0388                 0.979259,
0389                 0.976677,
0390                 0.979259,
0391                 0.976677,
0392                 0.979259,
0393                 0.976677,
0394             )
0395         process.mixData.theLadderEfficiency_BPix2 = cms.vdouble(
0396                 0.994321,
0397                 0.993944,
0398                 0.994321,
0399                 0.993944,
0400                 0.994321,
0401                 0.993944,
0402                 0.994321,
0403                 0.993944,
0404                 0.994321,
0405                 0.993944,
0406                 0.994321,
0407                 0.993944,
0408                 0.994321,
0409                 0.993944,
0410                 0.994321,
0411                 0.993944,
0412                 0.994321,
0413                 0.993944,
0414                 0.994321,
0415                 0.993944,
0416                 0.994321,
0417                 0.993944,
0418                 0.994321,
0419                 0.993944,
0420                 0.994321,
0421                 0.993944,
0422                 0.994321,
0423                 0.993944,
0424                 0.994321,
0425                 0.993944,
0426                 0.994321,
0427                 0.993944,
0428             )
0429         process.mixData.theLadderEfficiency_BPix3 = cms.vdouble(
0430                 0.996787,
0431                 0.996945,
0432                 0.996787,
0433                 0.996945,
0434                 0.996787,
0435                 0.996945,
0436                 0.996787,
0437                 0.996945,
0438                 0.996787,
0439                 0.996945,
0440                 0.996787,
0441                 0.996945,
0442                 0.996787,
0443                 0.996945,
0444                 0.996787,
0445                 0.996945,
0446                 0.996787,
0447                 0.996945,
0448                 0.996787,
0449                 0.996945,
0450                 0.996787,
0451                 0.996945,
0452                 0.996787,
0453                 0.996945,
0454                 0.996787,
0455                 0.996945,
0456                 0.996787,
0457                 0.996945,
0458                 0.996787,
0459                 0.996945,
0460                 0.996787,
0461                 0.996945,
0462                 0.996787,
0463                 0.996945,
0464                 0.996787,
0465                 0.996945,
0466                 0.996787,
0467                 0.996945,
0468                 0.996787,
0469                 0.996945,
0470                 0.996787,
0471                 0.996945,
0472                 0.996787,
0473                 0.996945,
0474             )
0475     return process
0476 
0477 
0478 def customise_Digi_25ns(process):
0479     if hasattr(process,'mix') and hasattr(process.mix,'digitizers'):
0480         if hasattr(process.mix.digitizers,'pixel'):
0481             # pixel dynamic inefficency - 13TeV - 25ns case
0482             process.mix.digitizers.pixel.theInstLumiScaleFactor = cms.double(364)
0483             process.mix.digitizers.pixel.theLadderEfficiency_BPix1 = cms.vdouble(
0484                 1,
0485                 1,
0486                 1,
0487                 1,
0488                 1,
0489                 1,
0490                 1,
0491                 1,
0492                 1,
0493                 1,
0494                 1,
0495                 1,
0496                 1,
0497                 1,
0498                 1,
0499                 1,
0500                 1,
0501                 1,
0502                 1,
0503                 1,
0504             )
0505             process.mix.digitizers.pixel.theLadderEfficiency_BPix2 = cms.vdouble(
0506                 1,
0507                 1,
0508                 1,
0509                 1,
0510                 1,
0511                 1,
0512                 1,
0513                 1,
0514                 1,
0515                 1,
0516                 1,
0517                 1,
0518                 1,
0519                 1,
0520                 1,
0521                 1,
0522                 1,
0523                 1,
0524                 1,
0525                 1,
0526                 1,
0527                 1,
0528                 1,
0529                 1,
0530                 1,
0531                 1,
0532                 1,
0533                 1,
0534                 1,
0535                 1,
0536                 1,
0537                 1,
0538             )
0539             process.mix.digitizers.pixel.theLadderEfficiency_BPix3 = cms.vdouble(
0540                 1,
0541                 1,
0542                 1,
0543                 1,
0544                 1,
0545                 1,
0546                 1,
0547                 1,
0548                 1,
0549                 1,
0550                 1,
0551                 1,
0552                 1,
0553                 1,
0554                 1,
0555                 1,
0556                 1,
0557                 1,
0558                 1,
0559                 1,
0560                 1,
0561                 1,
0562                 1,
0563                 1,
0564                 1,
0565                 1,
0566                 1,
0567                 1,
0568                 1,
0569                 1,
0570                 1,
0571                 1,
0572                 1,
0573                 1,
0574                 1,
0575                 1,
0576                 1,
0577                 1,
0578                 1,
0579                 1,
0580                 1,
0581                 1,
0582                 1,
0583                 1,
0584             )
0585             process.mix.digitizers.pixel.theModuleEfficiency_BPix1 = cms.vdouble(
0586                 1,
0587                 1,
0588                 1,
0589                 1,
0590             )
0591             process.mix.digitizers.pixel.theModuleEfficiency_BPix2 = cms.vdouble(
0592                 1,
0593                 1,
0594                 1,
0595                 1,
0596                 )
0597             process.mix.digitizers.pixel.theModuleEfficiency_BPix3 = cms.vdouble(
0598                 1,
0599                 1,
0600                 1,
0601                 1,
0602             )
0603             process.mix.digitizers.pixel.thePUEfficiency_BPix1 = cms.vdouble(
0604                  1.00023,
0605                 -3.18350e-06,
0606                  5.08503e-10,
0607                 -6.79785e-14,
0608             )
0609             process.mix.digitizers.pixel.thePUEfficiency_BPix2 = cms.vdouble(
0610                  9.99974e-01,
0611                 -8.91313e-07,
0612                  5.29196e-12,
0613                 -2.28725e-15,
0614             )
0615             process.mix.digitizers.pixel.thePUEfficiency_BPix3 = cms.vdouble(
0616                  1.00005,
0617                 -6.59249e-07,
0618                  2.75277e-11,
0619                 -1.62683e-15,
0620             )
0621     if hasattr(process,'mixData'):
0622             # pixel dynamic inefficency - 13TeV - 25ns case
0623         process.mixData.theInstLumiScaleFactor = cms.double(364)
0624         process.mixData.theLadderEfficiency_BPix1 = cms.vdouble(
0625                 1,
0626                 1,
0627                 1,
0628                 1,
0629                 1,
0630                 1,
0631                 1,
0632                 1,
0633                 1,
0634                 1,
0635                 1,
0636                 1,
0637                 1,
0638                 1,
0639                 1,
0640                 1,
0641                 1,
0642                 1,
0643                 1,
0644                 1,
0645             )
0646         process.mixData.theLadderEfficiency_BPix2 = cms.vdouble(
0647                 1,
0648                 1,
0649                 1,
0650                 1,
0651                 1,
0652                 1,
0653                 1,
0654                 1,
0655                 1,
0656                 1,
0657                 1,
0658                 1,
0659                 1,
0660                 1,
0661                 1,
0662                 1,
0663                 1,
0664                 1,
0665                 1,
0666                 1,
0667                 1,
0668                 1,
0669                 1,
0670                 1,
0671                 1,
0672                 1,
0673                 1,
0674                 1,
0675                 1,
0676                 1,
0677                 1,
0678                 1,
0679             )
0680         process.mixData.theLadderEfficiency_BPix3 = cms.vdouble(
0681                 1,
0682                 1,
0683                 1,
0684                 1,
0685                 1,
0686                 1,
0687                 1,
0688                 1,
0689                 1,
0690                 1,
0691                 1,
0692                 1,
0693                 1,
0694                 1,
0695                 1,
0696                 1,
0697                 1,
0698                 1,
0699                 1,
0700                 1,
0701                 1,
0702                 1,
0703                 1,
0704                 1,
0705                 1,
0706                 1,
0707                 1,
0708                 1,
0709                 1,
0710                 1,
0711                 1,
0712                 1,
0713                 1,
0714                 1,
0715                 1,
0716                 1,
0717                 1,
0718                 1,
0719                 1,
0720                 1,
0721                 1,
0722                 1,
0723                 1,
0724                 1,
0725             )
0726         process.mixData.theModuleEfficiency_BPix1 = cms.vdouble(
0727                 1,
0728                 1,
0729                 1,
0730                 1,
0731             )
0732         process.mixData.theModuleEfficiency_BPix2 = cms.vdouble(
0733                 1,
0734                 1,
0735                 1,
0736                 1,
0737                 )
0738         process.mixData.theModuleEfficiency_BPix3 = cms.vdouble(
0739                 1,
0740                 1,
0741                 1,
0742                 1,
0743             )
0744         process.mixData.thePUEfficiency_BPix1 = cms.vdouble(
0745                  1.00023,
0746                 -3.18350e-06,
0747                  5.08503e-10,
0748                 -6.79785e-14,
0749             )
0750         process.mixData.thePUEfficiency_BPix2 = cms.vdouble(
0751                  9.99974e-01,
0752                 -8.91313e-07,
0753                  5.29196e-12,
0754                 -2.28725e-15,
0755             )
0756         process.mixData.thePUEfficiency_BPix3 = cms.vdouble(
0757                  1.00005,
0758                 -6.59249e-07,
0759                  2.75277e-11,
0760                 -1.62683e-15,
0761             )
0762     return process
0763 
0764 
0765 def customise_L1Emulator(process):
0766     return process
0767 
0768 
0769 def customise_RawToDigi(process):
0770     if hasattr(process,'gtEvmDigis'):
0771         process.RawToDigi.remove(process.gtEvmDigis)
0772     return process
0773 
0774 
0775 def customise_DigiToRaw(process):
0776     return process
0777 
0778 
0779 def customise_Reco(process):
0780     #lowering HO threshold with SiPM
0781     if hasattr(process,'particleFlowRecHitHO'):
0782         for prod in process.particleFlowRecHitHO.producers:
0783             prod.qualityTests = cms.VPSet(
0784                 cms.PSet(
0785                     name = cms.string("PFRecHitQTestThreshold"),
0786                     threshold = cms.double(0.05) # new threshold for SiPM HO
0787                     ),
0788                 cms.PSet(
0789                     name = cms.string("PFRecHitQTestHCALChannel"),
0790                     maxSeverities      = cms.vint32(11),
0791                     cleaningThresholds = cms.vdouble(0.0),
0792                     flags              = cms.vstring('Standard')
0793                     )
0794                 )
0795 
0796     #Lower Thresholds also for Clusters!!!    
0797 
0798         for p in process.particleFlowClusterHO.seedFinder.thresholdsByDetector:
0799             p.seedingThreshold = cms.double(0.08)
0800 
0801         for p in process.particleFlowClusterHO.initialClusteringStep.thresholdsByDetector:
0802             p.gatheringThreshold = cms.double(0.05)
0803 
0804         for p in process.particleFlowClusterHO.pfClusterBuilder.recHitEnergyNorms:
0805             p.recHitEnergyNorm = cms.double(0.05)
0806 
0807         process.particleFlowClusterHO.pfClusterBuilder.positionCalc.logWeightDenominator = cms.double(0.05)
0808         process.particleFlowClusterHO.pfClusterBuilder.allCellsPositionCalc.logWeightDenominator = cms.double(0.05)
0809 
0810     # Muon reconstruction do not exclude bad chambers
0811     if hasattr(process, 'muonDetIdAssociator'):
0812         process.muonDetIdAssociator.includeBadChambers = cms.bool(True)
0813 
0814     return process
0815 
0816 
0817 def customise_harvesting(process):
0818     #process.dqmHarvesting.remove(process.dataCertificationJetMET)
0819     #process.dqmHarvesting.remove(process.sipixelEDAClient)
0820     #process.dqmHarvesting.remove(process.sipixelCertification)
0821     return (process)        
0822 
0823 
0824 def recoOutputCustoms(process):
0825 
0826     alist=['AODSIM','RECOSIM','FEVTSIM','FEVTDEBUG','FEVTDEBUGHLT','RECODEBUG','RAWRECOSIMHLT','RAWRECODEBUGHLT']
0827     for a in alist:
0828         b = a + 'output'
0829         if hasattr(process,b):
0830             getattr(process,b).outputCommands.append('keep *_simMuonCSCDigis_*_*')
0831             getattr(process,b).outputCommands.append('keep *_simMuonRPCDigis_*_*')
0832             getattr(process,b).outputCommands.append('keep *_simHcalUnsuppressedDigis_*_*')
0833             getattr(process,b).outputCommands.append('keep *_rawDataCollector_*_*')
0834     return process