Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-15 22:20:48

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from RecoEgamma.PhotonIdentification.isolationCalculator_cfi import *
0004 from RecoEgamma.PhotonIdentification.mipVariable_cfi import *
0005 from RecoEgamma.PhotonIdentification.mvaHaloVariable_cfi import *
0006 from RecoEcal.EgammaClusterProducers.hybridSuperClusters_cfi import *
0007 from RecoEcal.EgammaClusterProducers.multi5x5BasicClusters_cfi import *
0008 from RecoEgamma.EgammaIsolationAlgos.egammaHBHERecHitThreshold_cff import egammaHBHERecHit
0009 
0010 from RecoEgamma.EgammaIsolationAlgos.egammaEcalPFClusterIsolationProducerRecoPhoton_cfi import egammaEcalPFClusterIsolationProducerRecoPhoton
0011 from RecoEgamma.EgammaIsolationAlgos.egammaHcalPFClusterIsolationProducerRecoPhoton_cfi import egammaHcalPFClusterIsolationProducerRecoPhoton
0012 
0013 #
0014 # producer for photons
0015 #
0016 photons = cms.EDProducer("GEDPhotonProducer",
0017     photonProducer = cms.InputTag("photonCore"),
0018     reconstructionStep = cms.string("tmp"),
0019     outputPhotonCollection = cms.string(""),
0020     pfEgammaCandidates = cms.InputTag(""),
0021     valueMapPhotons = cms.string(""),
0022     #   photonCollection = cms.string(''),
0023     regressionWeightsFromDB =   cms.bool(True),                    
0024     energyRegressionWeightsFileLocation = cms.string('/afs/cern.ch/user/b/bendavid/cmspublic/regweights/gbrph.root'),
0025     energyRegressionWeightsDBLocation = cms.string('wgbrph'), 
0026     superClusterEnergyCorrFunction =  cms.string("EcalClusterEnergyCorrection"),                  
0027     superClusterEnergyErrorFunction = cms.string("EcalClusterEnergyUncertainty"),
0028     superClusterCrackEnergyCorrFunction =  cms.string("EcalClusterCrackCorrection"),                                       
0029     photonEcalEnergyCorrFunction = cms.string("EcalClusterEnergyCorrectionObjectSpecific"),             
0030     #candidateP4type = cms.string("fromRegression"),
0031     candidateP4type = cms.string("fromEcalEnergy"),                     
0032     isolationSumsCalculatorSet = cms.PSet(isolationSumsCalculator),
0033     mipVariableSet = cms.PSet(mipVariable), 
0034     mvaBasedHaloVariableSet = cms.PSet(mvaHaloVariable), 
0035     usePrimaryVertex = cms.bool(True),
0036     primaryVertexProducer = cms.InputTag('offlinePrimaryVerticesWithBS'),
0037     posCalc_t0_endcPresh = cms.double(3.6),
0038     posCalc_logweight = cms.bool(True),
0039     posCalc_w0 = cms.double(4.2),
0040     hbheInstance = cms.string(''),
0041     posCalc_t0_endc = cms.double(6.3),
0042     barrelEcalHits = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
0043     hbheModule = cms.string('hbhereco'),
0044     endcapEcalHits = cms.InputTag("ecalRecHit","EcalRecHitsEE"),
0045     preshowerHits = cms.InputTag("ecalPreshowerRecHit","EcalRecHitsES"),
0046     runMIPTagger = cms.bool(True),
0047     runMVABasedHaloTagger = cms.bool(False),
0048     highEt  = cms.double(100.),                       
0049     minR9Barrel = cms.double(0.94),
0050     minR9Endcap = cms.double(0.95),
0051     multThresEB = cms.double(1.00),
0052     multThresEE = cms.double(1.25),
0053     hOverEConeSize = cms.double(0.15),
0054     hbheRecHits = egammaHBHERecHit.hbheRecHits,
0055     recHitEThresholdHB = egammaHBHERecHit.recHitEThresholdHB,
0056     recHitEThresholdHE = egammaHBHERecHit.recHitEThresholdHE,
0057     maxHcalRecHitSeverity = egammaHBHERecHit.maxHcalRecHitSeverity,
0058     hcalRun2EffDepth = cms.bool(False),
0059     posCalc_x0 = cms.double(0.89),
0060     posCalc_t0_barl = cms.double(7.7),
0061     minSCEtBarrel = cms.double(10.0),
0062     minSCEtEndcap = cms.double(10.0),                     
0063     maxHoverEBarrel = cms.double(0.5),
0064     maxHoverEEndcap = cms.double(0.5),
0065     ecalRecHitSumEtOffsetBarrel = cms.double(999999999),
0066     ecalRecHitSumEtSlopeBarrel = cms.double(0.),
0067     ecalRecHitSumEtOffsetEndcap = cms.double(999999999),
0068     ecalRecHitSumEtSlopeEndcap = cms.double(0.),
0069     hcalRecHitSumEtOffsetBarrel = cms.double(999999999),
0070     hcalRecHitSumEtSlopeBarrel = cms.double(0.),
0071     hcalRecHitSumEtOffsetEndcap = cms.double(999999999),
0072     hcalRecHitSumEtSlopeEndcap = cms.double(0.),
0073     nTrackSolidConeBarrel =cms.double(999999999),
0074     nTrackSolidConeEndcap =cms.double(999999999),
0075     nTrackHollowConeBarrel =cms.double(999999999),
0076     nTrackHollowConeEndcap =cms.double(999999999),
0077     trackPtSumSolidConeBarrel =cms.double(999999999),
0078     trackPtSumSolidConeEndcap =cms.double(999999999),
0079     trackPtSumHollowConeBarrel =cms.double(999999999),
0080     trackPtSumHollowConeEndcap =cms.double(999999999),
0081     sigmaIetaIetaCutBarrel=cms.double(999999999),
0082     sigmaIetaIetaCutEndcap=cms.double(999999999),
0083     posCalcParameters = cms.PSet( T0_barl      = cms.double(7.4),
0084                                   T0_endc      = cms.double(6.3),        
0085                                   T0_endcPresh = cms.double(3.6),
0086                                   LogWeighted  = cms.bool(True),
0087                                   W0           = cms.double(4.2),
0088                                   X0           = cms.double(0.89)
0089                                  ),                  
0090 
0091     RecHitFlagToBeExcludedEB = cleanedHybridSuperClusters.RecHitFlagToBeExcluded,
0092     RecHitSeverityToBeExcludedEB = cleanedHybridSuperClusters.RecHitSeverityToBeExcluded,
0093     RecHitFlagToBeExcludedEE = multi5x5BasicClustersCleaned.RecHitFlagToBeExcluded,
0094     RecHitSeverityToBeExcludedEE = cleanedHybridSuperClusters.RecHitSeverityToBeExcluded,
0095     checkHcalStatus = cms.bool(True),
0096     PhotonDNNPFid = cms.PSet(
0097         enabled = cms.bool(False),
0098         inputTensorName = cms.string("FirstLayer_input"),
0099         outputTensorName = cms.string("sequential/FinalLayer/Sigmoid"),
0100         modelsFiles = cms.vstring(
0101                                 'RecoEgamma/PhotonIdentification/data/Photon_PFID_dnn/v1/EB/EB_modelDNN.pb',
0102                                 'RecoEgamma/PhotonIdentification/data/Photon_PFID_dnn/v1/EE/EE_modelDNN.pb'),
0103         scalersFiles = cms.vstring(
0104                     'RecoEgamma/PhotonIdentification/data/Photon_PFID_dnn/v1/EB/EB_scaler.txt',
0105                     'RecoEgamma/PhotonIdentification/data/Photon_PFID_dnn/v1/EE/EE_scaler.txt'
0106         ),
0107         outputDim = cms.vuint32(1,1),
0108         useEBModelInGap = cms.bool(True)
0109     ),
0110     pfECALClusIsolCfg = cms.PSet(
0111         pfClusterProducer = egammaEcalPFClusterIsolationProducerRecoPhoton.pfClusterProducer,
0112         drMax = egammaEcalPFClusterIsolationProducerRecoPhoton.drMax,
0113         drVetoBarrel = egammaEcalPFClusterIsolationProducerRecoPhoton.drVetoBarrel,
0114         drVetoEndcap = egammaEcalPFClusterIsolationProducerRecoPhoton.drVetoEndcap,
0115         etaStripBarrel = egammaEcalPFClusterIsolationProducerRecoPhoton.etaStripBarrel,
0116         etaStripEndcap = egammaEcalPFClusterIsolationProducerRecoPhoton.etaStripEndcap,
0117         energyBarrel = egammaEcalPFClusterIsolationProducerRecoPhoton.energyBarrel,
0118         energyEndcap = egammaEcalPFClusterIsolationProducerRecoPhoton.energyEndcap
0119     ),
0120 
0121     pfHCALClusIsolCfg = cms.PSet(
0122 
0123         pfClusterProducerHCAL = egammaHcalPFClusterIsolationProducerRecoPhoton.pfClusterProducerHCAL,
0124         useHF = egammaHcalPFClusterIsolationProducerRecoPhoton.useHF,
0125         pfClusterProducerHFEM = egammaHcalPFClusterIsolationProducerRecoPhoton.pfClusterProducerHFEM,
0126         pfClusterProducerHFHAD = egammaHcalPFClusterIsolationProducerRecoPhoton.pfClusterProducerHFHAD,
0127         drMax = egammaHcalPFClusterIsolationProducerRecoPhoton.drMax,
0128         drVetoBarrel = egammaHcalPFClusterIsolationProducerRecoPhoton.drVetoBarrel,
0129         drVetoEndcap = egammaHcalPFClusterIsolationProducerRecoPhoton.drVetoEndcap,
0130         etaStripBarrel = egammaHcalPFClusterIsolationProducerRecoPhoton.etaStripBarrel,
0131         etaStripEndcap = egammaHcalPFClusterIsolationProducerRecoPhoton.etaStripEndcap,
0132         energyBarrel = egammaHcalPFClusterIsolationProducerRecoPhoton.energyBarrel,
0133         energyEndcap = egammaHcalPFClusterIsolationProducerRecoPhoton.energyEndcap,
0134         useEt = egammaHcalPFClusterIsolationProducerRecoPhoton.useEt,
0135 
0136     )
0137 
0138 )
0139 
0140 photonsHGC = photons.clone(
0141   photonProducer = 'photonCoreHGC'
0142 )
0143 
0144 islandPhotons = cms.EDProducer("PhotonProducer",
0145     photonCoreProducer = cms.InputTag("islandPhotonCore"),
0146     regressionWeightsFromDB =   cms.bool(True),
0147     energyRegressionWeightsFileLocation = cms.string('/afs/cern.ch/user/b/bendavid/cmspublic/regweights/gbrph.root'),
0148     energyRegressionWeightsDBLocation = cms.string('wgbrph'),
0149     superClusterEnergyCorrFunction =  cms.string("EcalClusterEnergyCorrection"),
0150     superClusterEnergyErrorFunction = cms.string("EcalClusterEnergyUncertainty"),
0151     superClusterCrackEnergyCorrFunction =  cms.string("EcalClusterCrackCorrection"),
0152     photonEcalEnergyCorrFunction = cms.string("EcalClusterEnergyCorrectionObjectSpecific"),
0153     candidateP4type = cms.string("fromEcalEnergy"),
0154     isolationSumsCalculatorSet = cms.PSet(isolationSumsCalculator),
0155     mipVariableSet = cms.PSet(mipVariable),
0156     usePrimaryVertex = cms.bool(True),
0157     primaryVertexProducer = cms.InputTag('offlinePrimaryVerticesWithBS'),
0158     posCalc_t0_endcPresh = cms.double(3.6),
0159     posCalc_logweight = cms.bool(True),
0160     posCalc_w0 = cms.double(4.2),
0161     hbheInstance = cms.string(''),
0162     posCalc_t0_endc = cms.double(6.3),
0163     barrelEcalHits = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
0164     hbheModule = cms.string('hbhereco'),
0165     endcapEcalHits = cms.InputTag("ecalRecHit","EcalRecHitsEE"),
0166     runMIPTagger = cms.bool(True),
0167     runMVABasedHaloTagger = cms.bool(False),
0168     highEt  = cms.double(100.),
0169     minR9Barrel = cms.double(10.0),
0170     minR9Endcap = cms.double(10.0),
0171     hOverEConeSize = cms.double(0.15),
0172     hbheRecHits = egammaHBHERecHit.hbheRecHits,
0173     recHitEThresholdHB = egammaHBHERecHit.recHitEThresholdHB,
0174     recHitEThresholdHE = egammaHBHERecHit.recHitEThresholdHE,
0175     maxHcalRecHitSeverity = egammaHBHERecHit.maxHcalRecHitSeverity,
0176     hcalRun2EffDepth = cms.bool(False),
0177     posCalc_x0 = cms.double(0.89),
0178     posCalc_t0_barl = cms.double(7.7),
0179     minSCEtBarrel = cms.double(5.0),
0180     minSCEtEndcap = cms.double(15.0),
0181     maxHoverEBarrel = cms.double(0.99),
0182     maxHoverEEndcap = cms.double(0.5),
0183     ecalRecHitSumEtOffsetBarrel = cms.double(999999999),
0184     ecalRecHitSumEtSlopeBarrel = cms.double(0.),
0185     ecalRecHitSumEtOffsetEndcap = cms.double(999999999),
0186     ecalRecHitSumEtSlopeEndcap = cms.double(0.),
0187     hcalRecHitSumEtOffsetBarrel = cms.double(999999999),
0188     hcalRecHitSumEtSlopeBarrel = cms.double(0.),
0189     hcalRecHitSumEtOffsetEndcap = cms.double(999999999),
0190     hcalRecHitSumEtSlopeEndcap = cms.double(0.),
0191     nTrackSolidConeBarrel =cms.double(999999999),
0192     nTrackSolidConeEndcap =cms.double(999999999),
0193     nTrackHollowConeBarrel =cms.double(999999999),
0194     nTrackHollowConeEndcap =cms.double(999999999),
0195     trackPtSumSolidConeBarrel =cms.double(999999999),
0196     trackPtSumSolidConeEndcap =cms.double(999999999),
0197     trackPtSumHollowConeBarrel =cms.double(999999999),
0198     trackPtSumHollowConeEndcap =cms.double(999999999),
0199     sigmaIetaIetaCutBarrel=cms.double(999999999),
0200     sigmaIetaIetaCutEndcap=cms.double(999999999),
0201     posCalcParameters = cms.PSet( T0_barl      = cms.double(7.4),
0202                                   T0_endc      = cms.double(6.3),
0203                                   T0_endcPresh = cms.double(3.6),
0204                                   LogWeighted  = cms.bool(True),
0205                                   W0           = cms.double(4.2),
0206                                   X0           = cms.double(0.89)
0207                                  ),
0208 
0209     RecHitFlagToBeExcludedEB = cleanedHybridSuperClusters.RecHitFlagToBeExcluded,
0210     RecHitSeverityToBeExcludedEB = cleanedHybridSuperClusters.RecHitSeverityToBeExcluded,
0211     RecHitFlagToBeExcludedEE = multi5x5BasicClustersCleaned.RecHitFlagToBeExcluded,
0212     RecHitSeverityToBeExcludedEE = cleanedHybridSuperClusters.RecHitSeverityToBeExcluded,
0213 )
0214 
0215 from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive
0216 egamma_lowPt_exclusive.toModify(photons,
0217                            minSCEtBarrel = 1.0, #default 10
0218                            minSCEtEndcap = 1.0) #default 10