Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-07-16 22:52:33

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