Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:14:03

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process('GETGBR')
0004 
0005 process.load('Configuration.StandardSequences.Services_cff')
0006 process.load('FWCore.MessageService.MessageLogger_cfi')
0007 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0008 process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff')
0009 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0010 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0011 
0012 process.maxEvents = cms.untracked.PSet(
0013     input = cms.untracked.int32(-1)
0014 )
0015 
0016 # Input source
0017 process.source = cms.Source("PoolSource",
0018                             fileNames = cms.untracked.vstring('/store/data/Run2015D/DoubleEG/MINIAOD/PromptReco-v4/000/258/159/00000/027612B0-306C-E511-BD47-02163E014496.root'),
0019                             )
0020 
0021 from Configuration.AlCa.GlobalTag import GlobalTag
0022 process.GlobalTag = GlobalTag(process.GlobalTag, '74X_dataRun2_Prompt_v4', '')
0023 
0024 process.selectedPhotons = cms.EDFilter("PATPhotonSelector",
0025                                        src = cms.InputTag("slimmedPhotons"),
0026                                        cut = cms.string("pt > 8 && chargedHadronIso()/pt < 0.3"),
0027                                        )
0028 
0029 process.load('EgammaAnalysis.ElectronTools.calibratedPhotonsRun2_cfi')
0030 process.calibratedPatPhotons.photons = "selectedPhotons"
0031 
0032 process.zeeUncalib = cms.EDProducer("CandViewShallowCloneCombiner",
0033                                     decay = cms.string("selectedPhotons@+ selectedPhotons@-"),
0034                                     checkCharge = cms.bool(False),                                    
0035                                     cut   = cms.string("min(daughter(0).pt,daughter(1).pt) > 15 && mass > 50"),
0036                                     )
0037 
0038 process.zeeCalib = process.zeeUncalib.clone(
0039     decay = cms.string("calibratedPatPhotons@+ calibratedPatPhotons@-"),
0040     )
0041 
0042 process.zeeUncalibTree = cms.EDFilter("ProbeTreeProducer",
0043                                       src = cms.InputTag("zeeUncalib"),
0044                                       variables = cms.PSet(
0045         mass = cms.string("mass"),
0046         #        reco::Photon::P4type::regression2
0047 
0048         #0286     float getCorrectedEnergy( P4type type) const;
0049         #0287     float getCorrectedEnergyError( P4type type) const ;
0050         #massErr = cms.string("0.5 * mass * sqrt( pow( daughter(0).masterClone.getCorrectedEnergyError(3) / daughter(0).masterClone.p4().P(), 2 ) + "+
0051         #                     "pow( daughter(0).masterClone.getCorrectedEnergyError(3) / daughter(0).masterClone.p4().P(), 2 ) ) "),
0052         l1pt = cms.string("daughter(0).pt"),
0053         l2pt = cms.string("daughter(1).pt"),
0054         l1eta = cms.string("daughter(0).eta"),
0055         l2eta = cms.string("daughter(1).eta"),
0056         ),
0057                                       flags = cms.PSet(),
0058                                       )
0059 
0060 process.zeeCalibTree = process.zeeUncalibTree.clone(
0061     src = cms.InputTag("zeeCalib"),
0062     )
0063 
0064 process.path = cms.Path(process.selectedPhotons + process.calibratedPatPhotons +
0065                         process.zeeUncalib + process.zeeUncalibTree +
0066                         process.zeeCalib + process.zeeCalibTree
0067                         )
0068 
0069 process.TFileService = cms.Service("TFileService", fileName = cms.string("plots_photons.root"))
0070 
0071 
0072 #process.out = cms.OutputModule("PoolOutputModule",
0073 #                               outputCommands = cms.untracked.vstring('keep *_*_*_GETGBR'),
0074 #                               #    fileName = cms.untracked.string('CandidateZ_newEscale.root')
0075 #                               fileName = cms.untracked.string('testMC.root')
0076 #                               )
0077 #
0078 #process.end = cms.EndPath(process.out)