Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-03-03 23:53:12

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 regressionModifier106XUL = cms.PSet(
0004     modifierName = cms.string('EGRegressionModifierV3'),       
0005     rhoTag = cms.InputTag('fixedGridRhoFastjetAllTmp'),
0006     useClosestToCentreSeedCrysDef = cms.bool(False),
0007     maxRawEnergyForLowPtEBSigma = cms.double(-1), 
0008     maxRawEnergyForLowPtEESigma = cms.double(1200.),
0009     eleRegs = cms.PSet(
0010         ecalOnlyMean = cms.PSet(
0011             rangeMinLowEt = cms.double(0.2),
0012             rangeMaxLowEt = cms.double(2.0),
0013             rangeMinHighEt = cms.double(-1.),
0014             rangeMaxHighEt = cms.double(3.0),
0015             forceHighEnergyTrainingIfSaturated = cms.bool(True),
0016             lowEtHighEtBoundary = cms.double(999999.),
0017             ebLowEtForestName = cms.ESInputTag("", "electron_eb_ecalOnly_1To300_0p2To2_mean"),
0018             ebHighEtForestName = cms.ESInputTag("", "electron_eb_ECALonly"),
0019             eeLowEtForestName = cms.ESInputTag("", "electron_ee_ecalOnly_1To300_0p2To2_mean"),
0020             eeHighEtForestName = cms.ESInputTag("", "electron_ee_ECALonly"),
0021             ),
0022         ecalOnlySigma = cms.PSet(
0023             rangeMinLowEt = cms.double(0.0002),
0024             rangeMaxLowEt = cms.double(0.5),
0025             rangeMinHighEt = cms.double(0.0002),
0026             rangeMaxHighEt = cms.double(0.5),
0027             forceHighEnergyTrainingIfSaturated = cms.bool(True),
0028             lowEtHighEtBoundary = cms.double(999999.),
0029             ebLowEtForestName = cms.ESInputTag("", "electron_eb_ecalOnly_1To300_0p0002To0p5_sigma"),
0030             ebHighEtForestName = cms.ESInputTag("", "electron_eb_ECALonly_var"),
0031             eeLowEtForestName = cms.ESInputTag("", "electron_ee_ecalOnly_1To300_0p0002To0p5_sigma"),
0032             eeHighEtForestName = cms.ESInputTag("", "electron_ee_ECALonly_var"),
0033             ),
0034         epComb = cms.PSet(
0035             ecalTrkRegressionConfig = cms.PSet(
0036                 rangeMinLowEt = cms.double(0.2),
0037                 rangeMaxLowEt = cms.double(2.0),
0038                 rangeMinHighEt = cms.double(0.2),
0039                 rangeMaxHighEt = cms.double(2.0),
0040                 lowEtHighEtBoundary = cms.double(999999.),
0041                 forceHighEnergyTrainingIfSaturated = cms.bool(False),
0042                 ebLowEtForestName = cms.ESInputTag("", 'electron_eb_ecalTrk_1To300_0p2To2_mean'),
0043                 ebHighEtForestName = cms.ESInputTag("", 'electron_eb_ecalTrk_1To300_0p2To2_mean'),
0044                 eeLowEtForestName = cms.ESInputTag("", 'electron_ee_ecalTrk_1To300_0p2To2_mean'),
0045                 eeHighEtForestName = cms.ESInputTag("", 'electron_ee_ecalTrk_1To300_0p2To2_mean'),
0046                 ),
0047             ecalTrkRegressionUncertConfig = cms.PSet(
0048                 rangeMinLowEt = cms.double(0.0002),
0049                 rangeMaxLowEt = cms.double(0.5),
0050                 rangeMinHighEt = cms.double(0.0002),
0051                 rangeMaxHighEt = cms.double(0.5),
0052                 lowEtHighEtBoundary = cms.double(999999.),  
0053                 forceHighEnergyTrainingIfSaturated = cms.bool(False),
0054                 ebLowEtForestName = cms.ESInputTag("", 'electron_eb_ecalTrk_1To300_0p0002To0p5_sigma'),
0055                 ebHighEtForestName = cms.ESInputTag("", 'electron_eb_ecalTrk_1To300_0p0002To0p5_sigma'),
0056                 eeLowEtForestName = cms.ESInputTag("", 'electron_ee_ecalTrk_1To300_0p0002To0p5_sigma'),
0057                 eeHighEtForestName = cms.ESInputTag("", 'electron_ee_ecalTrk_1To300_0p0002To0p5_sigma'),
0058                 ),
0059             maxEcalEnergyForComb=cms.double(200.),
0060             minEOverPForComb=cms.double(0.025),
0061             maxEPDiffInSigmaForComb=cms.double(15.),
0062             maxRelTrkMomErrForComb=cms.double(10.),                
0063             )
0064         ),
0065     phoRegs = cms.PSet(
0066         ecalOnlyMean = cms.PSet(
0067             rangeMinLowEt = cms.double(0.2),
0068             rangeMaxLowEt = cms.double(2.0),
0069             rangeMinHighEt = cms.double(-1.),
0070             rangeMaxHighEt = cms.double(3.0),
0071             forceHighEnergyTrainingIfSaturated = cms.bool(True),
0072             lowEtHighEtBoundary = cms.double(999999.),
0073             ebLowEtForestName = cms.ESInputTag("", "photon_eb_ecalOnly_5To300_0p2To2_mean"),
0074             ebHighEtForestName = cms.ESInputTag("", "photon_eb_ECALonly"),
0075             eeLowEtForestName = cms.ESInputTag("", "photon_ee_ecalOnly_5To300_0p2To2_mean"),
0076             eeHighEtForestName = cms.ESInputTag("", "photon_ee_ECALonly"),
0077             ),
0078         ecalOnlySigma = cms.PSet(
0079             rangeMinLowEt = cms.double(0.0002),
0080             rangeMaxLowEt = cms.double(0.5),
0081             rangeMinHighEt = cms.double(0.0002),
0082             rangeMaxHighEt = cms.double(0.5),
0083             forceHighEnergyTrainingIfSaturated = cms.bool(True),
0084             lowEtHighEtBoundary = cms.double(999999.),
0085             ebLowEtForestName = cms.ESInputTag("", "photon_eb_ecalOnly_5To300_0p0002To0p5_sigma"),
0086             ebHighEtForestName = cms.ESInputTag("", "photon_eb_ECALonly_var"),
0087             eeLowEtForestName = cms.ESInputTag("", "photon_ee_ecalOnly_5To300_0p0002To0p5_sigma"),
0088             eeHighEtForestName = cms.ESInputTag("", "photon_ee_ECALonly_var"),
0089         ),
0090     )
0091 )
0092 
0093 regressionModifier103XLowPtPho = cms.PSet(
0094     modifierName = cms.string('EGRegressionModifierV3'),       
0095     rhoTag = cms.InputTag('fixedGridRhoFastjetAllTmp'),
0096     useClosestToCentreSeedCrysDef = cms.bool(False),
0097     maxRawEnergyForLowPtEBSigma = cms.double(-1), 
0098     maxRawEnergyForLowPtEESigma = cms.double(1200.),
0099     eleRegs = cms.PSet(
0100         ecalOnlyMean = cms.PSet(
0101             rangeMinLowEt = cms.double(0.2),
0102             rangeMaxLowEt = cms.double(2.0),
0103             rangeMinHighEt = cms.double(-1.),
0104             rangeMaxHighEt = cms.double(3.0),
0105             forceHighEnergyTrainingIfSaturated = cms.bool(True),
0106             lowEtHighEtBoundary = cms.double(999999.),
0107             ebLowEtForestName = cms.ESInputTag("", "electron_eb_ecalOnly_1To20_0p2To2_mean"),
0108             ebHighEtForestName = cms.ESInputTag("", "electron_eb_ECALonly"),
0109             eeLowEtForestName = cms.ESInputTag("", "electron_ee_ecalOnly_1To20_0p2To2_mean"),
0110             eeHighEtForestName = cms.ESInputTag("", "electron_ee_ECALonly"),
0111             ),
0112         ecalOnlySigma = cms.PSet(
0113             rangeMinLowEt = cms.double(0.0002),
0114             rangeMaxLowEt = cms.double(0.5),
0115             rangeMinHighEt = cms.double(0.0002),
0116             rangeMaxHighEt = cms.double(0.5),
0117             forceHighEnergyTrainingIfSaturated = cms.bool(True),
0118             lowEtHighEtBoundary = cms.double(999999.),
0119             ebLowEtForestName = cms.ESInputTag("", "electron_eb_ecalOnly_1To20_0p0002To0p5_sigma"),
0120             ebHighEtForestName = cms.ESInputTag("", "electron_eb_ECALonly_var"),
0121             eeLowEtForestName = cms.ESInputTag("", "electron_ee_ecalOnly_1To20_0p0002To0p5_sigma"),
0122             eeHighEtForestName = cms.ESInputTag("", "electron_ee_ECALonly_var"),
0123             ),
0124         epComb = cms.PSet(
0125             ecalTrkRegressionConfig = cms.PSet(
0126                 rangeMinLowEt = cms.double(0.2),
0127                 rangeMaxLowEt = cms.double(2.0),
0128                 rangeMinHighEt = cms.double(0.2),
0129                 rangeMaxHighEt = cms.double(2.0),
0130                 lowEtHighEtBoundary = cms.double(999999.),
0131                 forceHighEnergyTrainingIfSaturated = cms.bool(False),
0132                 ebLowEtForestName = cms.ESInputTag("", 'electron_eb_ecalTrk_1To20_0p2To2_mean'),
0133                 ebHighEtForestName = cms.ESInputTag("", 'electron_eb_ecalTrk_1To20_0p2To2_mean'),
0134                 eeLowEtForestName = cms.ESInputTag("", 'electron_ee_ecalTrk_1To20_0p2To2_mean'),
0135                 eeHighEtForestName = cms.ESInputTag("", 'electron_ee_ecalTrk_1To20_0p2To2_mean'),
0136                 ),
0137             ecalTrkRegressionUncertConfig = cms.PSet(
0138                 rangeMinLowEt = cms.double(0.0002),
0139                 rangeMaxLowEt = cms.double(0.5),
0140                 rangeMinHighEt = cms.double(0.0002),
0141                 rangeMaxHighEt = cms.double(0.5),
0142                 lowEtHighEtBoundary = cms.double(999999.),  
0143                 forceHighEnergyTrainingIfSaturated = cms.bool(False),
0144                 ebLowEtForestName = cms.ESInputTag("", 'electron_eb_ecalTrk_1To20_0p0002To0p5_sigma'),
0145                 ebHighEtForestName = cms.ESInputTag("", 'electron_eb_ecalTrk_1To20_0p0002To0p5_sigma'),
0146                 eeLowEtForestName = cms.ESInputTag("", 'electron_ee_ecalTrk_1To20_0p0002To0p5_sigma'),
0147                 eeHighEtForestName = cms.ESInputTag("", 'electron_ee_ecalTrk_1To20_0p0002To0p5_sigma'),
0148                 ),
0149             maxEcalEnergyForComb=cms.double(200.),
0150             minEOverPForComb=cms.double(0.025),
0151             maxEPDiffInSigmaForComb=cms.double(15.),
0152             maxRelTrkMomErrForComb=cms.double(10.),                
0153             )
0154         ),
0155     phoRegs = cms.PSet(
0156         ecalOnlyMean = cms.PSet(
0157             rangeMinLowEt = cms.double(0.2),
0158             rangeMaxLowEt = cms.double(2.0),
0159             rangeMinHighEt = cms.double(-1.),
0160             rangeMaxHighEt = cms.double(3.0),
0161             forceHighEnergyTrainingIfSaturated = cms.bool(True),
0162             lowEtHighEtBoundary = cms.double(999999.),
0163             ebLowEtForestName = cms.ESInputTag("", "photon_eb_ecalOnly_1To20_0p2To2_mean"),
0164             ebHighEtForestName = cms.ESInputTag("", "photon_eb_ECALonly"),
0165             eeLowEtForestName = cms.ESInputTag("", "photon_ee_ecalOnly_1To20_0p2To2_mean"),
0166             eeHighEtForestName = cms.ESInputTag("", "photon_ee_ECALonly"),
0167             ),
0168         ecalOnlySigma = cms.PSet(
0169             rangeMinLowEt = cms.double(0.0002),
0170             rangeMaxLowEt = cms.double(0.5),
0171             rangeMinHighEt = cms.double(0.0002),
0172             rangeMaxHighEt = cms.double(0.5),
0173             forceHighEnergyTrainingIfSaturated = cms.bool(True),
0174             lowEtHighEtBoundary = cms.double(999999.),
0175             ebLowEtForestName = cms.ESInputTag("", "photon_eb_ecalOnly_1To20_0p0002To0p5_sigma"),
0176             ebHighEtForestName = cms.ESInputTag("", "photon_eb_ECALonly_var"),
0177             eeLowEtForestName = cms.ESInputTag("", "photon_ee_ecalOnly_1To20_0p0002To0p5_sigma"),
0178             eeHighEtForestName = cms.ESInputTag("", "photon_ee_ECALonly_var"),
0179         ),
0180     )
0181 )
0182 
0183 regressionModifier94X = \
0184     cms.PSet( modifierName    = cms.string('EGRegressionModifierV2'),  
0185 
0186               rhoCollection = cms.InputTag('fixedGridRhoFastjetAllTmp'),
0187               
0188               electron_config = cms.PSet( # EB, EE
0189                 regressionKey  = cms.vstring('electron_eb_ECALonly_lowpt', 'electron_eb_ECALonly', 'electron_ee_ECALonly_lowpt', 'electron_ee_ECALonly',
0190                                              'electron_eb_ECALTRK_lowpt', 'electron_eb_ECALTRK', 'electron_ee_ECALTRK_lowpt', 'electron_ee_ECALTRK'),
0191                 uncertaintyKey = cms.vstring('electron_eb_ECALonly_lowpt_var', 'electron_eb_ECALonly_var', 'electron_ee_ECALonly_lowpt_var', 'electron_ee_ECALonly_var',
0192                                              'electron_eb_ECALTRK_lowpt_var', 'electron_eb_ECALTRK_var', 'electron_ee_ECALTRK_lowpt_var', 'electron_ee_ECALTRK_var'),
0193                                           ),
0194               
0195               photon_config   = cms.PSet( # EB, EE
0196                 regressionKey  = cms.vstring('photon_eb_ECALonly_lowpt', 'photon_eb_ECALonly', 'photon_ee_ECALonly_lowpt', 'photon_ee_ECALonly'),
0197                 uncertaintyKey = cms.vstring('photon_eb_ECALonly_lowpt_var', 'photon_eb_ECALonly_var', 'photon_ee_ECALonly_lowpt_var', 'photon_ee_ECALonly_var'),
0198                                           ),
0199 
0200               lowEnergy_ECALonlyThr = cms.double(99999.),
0201               lowEnergy_ECALTRKThr = cms.double(50.),
0202               highEnergy_ECALTRKThr = cms.double(200.),
0203               eOverP_ECALTRKThr = cms.double(0.025),
0204               epDiffSig_ECALTRKThr = cms.double(15.),
0205               epSig_ECALTRKThr = cms.double(10.),
0206               forceHighEnergyEcalTrainingIfSaturated = cms.bool(True)
0207 
0208               )
0209 
0210 
0211 regressionModifier80X = \
0212     cms.PSet( modifierName    = cms.string('EGRegressionModifierV1'),
0213               autoDetectBunchSpacing = cms.bool(True),
0214               applyExtraHighEnergyProtection = cms.bool(True),
0215               bunchSpacingTag = cms.InputTag("bunchSpacingProducer"),
0216               manualBunchSpacing = cms.int32(50),
0217               rhoCollection = cms.InputTag("fixedGridRhoFastjetAll"),
0218               vertexCollection = cms.InputTag("offlinePrimaryVertices"),
0219               electron_config = cms.PSet( # EB, EE                                                                                                                                                          
0220                                           regressionKey_25ns  = cms.vstring('gedelectron_EBCorrection_25ns', 'gedelectron_EECorrection_25ns'),
0221                                           uncertaintyKey_25ns = cms.vstring('gedelectron_EBUncertainty_25ns', 'gedelectron_EEUncertainty_25ns'),
0222                                           combinationKey_25ns   = cms.ESInputTag("", 'gedelectron_p4combination_25ns'),
0223 
0224                                           regressionKey_50ns  = cms.vstring('gedelectron_EBCorrection_50ns', 'gedelectron_EECorrection_50ns'),
0225                                           uncertaintyKey_50ns = cms.vstring('gedelectron_EBUncertainty_50ns', 'gedelectron_EEUncertainty_50ns'),
0226                                           combinationKey_50ns   = cms.ESInputTag("", 'gedelectron_p4combination_50ns'),
0227                                           ),
0228 
0229               photon_config   = cms.PSet( # EB, EE                                                                                                                                                          
0230                                           regressionKey_25ns  = cms.vstring('gedphoton_EBCorrection_25ns', 'gedphoton_EECorrection_25ns'),
0231                                           uncertaintyKey_25ns = cms.vstring('gedphoton_EBUncertainty_25ns', 'gedphoton_EEUncertainty_25ns'),
0232 
0233                                           regressionKey_50ns  = cms.vstring('gedphoton_EBCorrection_50ns', 'gedphoton_EECorrection_50ns'),
0234                                           uncertaintyKey_50ns = cms.vstring('gedphoton_EBUncertainty_50ns', 'gedphoton_EEUncertainty_50ns'),
0235                                           )
0236               )
0237 
0238 #by default we use the regression inappropriate to the main purpose of this release
0239 #life is simplier that way
0240 regressionModifier = regressionModifier94X.clone()
0241 regressionModifierRun2 = regressionModifier106XUL.clone()
0242 
0243 from Configuration.Eras.Modifier_run2_egamma_2016_cff import run2_egamma_2016
0244 from Configuration.Eras.Modifier_run2_egamma_2017_cff import run2_egamma_2017
0245 from Configuration.Eras.Modifier_run2_egamma_2018_cff import run2_egamma_2018
0246 
0247 (run2_egamma_2016 | run2_egamma_2017 | run2_egamma_2018).toReplaceWith(regressionModifier,regressionModifierRun2)
0248 
0249 regressionModifierRun3 = regressionModifierRun2.clone(
0250     eleRegs = dict(
0251         ecalOnlyMean = dict(
0252             rangeMinHighEt = 0.2,
0253             rangeMaxHighEt = 2.0
0254         )
0255     ),
0256     phoRegs = dict(
0257         ecalOnlyMean = dict(
0258             rangeMinHighEt = 0.2,
0259             rangeMaxHighEt = 2.0
0260         )
0261     )
0262 )
0263 
0264 from Configuration.Eras.Modifier_run3_egamma_cff import run3_egamma
0265 run3_egamma.toReplaceWith(regressionModifier,regressionModifierRun3)
0266 
0267 from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive
0268 egamma_lowPt_exclusive.toReplaceWith(regressionModifier,regressionModifier103XLowPtPho)