Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:49:25

0001 import FWCore.ParameterSet.Config as cms
0002 from PhysicsTools.PatAlgos.tools.helpers import getPatAlgosToolsTask
0003 
0004 process = cms.Process("bphAnalysis")
0005 
0006 patAlgosToolsTask = getPatAlgosToolsTask(process)
0007 
0008 #process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
0009 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(100) )
0010 
0011 process.load("Configuration.Geometry.GeometryRecoDB_cff")
0012 process.load("Configuration.StandardSequences.MagneticField_cff")
0013 process.load('Configuration.StandardSequences.Services_cff')
0014 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0015 process.load('FWCore.MessageService.MessageLogger_cfi')
0016 process.load('Configuration.EventContent.EventContent_cff')
0017 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0018 process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff')
0019 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0020 patAlgosToolsTask.add(process.MEtoEDMConverter)
0021 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0022 process.load("TrackingTools/TransientTrack/TransientTrackBuilder_cfi")
0023 
0024 process.CandidateSelectedTracks = cms.EDProducer( "ConcreteChargedCandidateProducer",
0025                 src=cms.InputTag("oniaSelectedTracks::RECO"),
0026                 particleType=cms.string('pi+')
0027 )
0028 
0029 from PhysicsTools.PatAlgos.producersLayer1.genericParticleProducer_cfi import patGenericParticles
0030 process.patSelectedTracks = patGenericParticles.clone(src=cms.InputTag("CandidateSelectedTracks"))
0031 patAlgosToolsTask.add(process.patSelectedTracks)
0032 
0033 process.MessageLogger.cerr.FwkReport.reportEvery = 100
0034 
0035 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
0036 
0037 process.source = cms.Source("PoolSource",fileNames = cms.untracked.vstring(
0038 #
0039 ### use this to access the nearest copy of the input file, querying the catalog
0040 #
0041     '/store/data/Run2016E/Charmonium/USER/BPHSkim-PromptReco-v2/000/276/831/00000/00FD1519-714D-E611-B686-FA163E321AE0.root'
0042 ### use this to access the input file if by any reason you want to specify 
0043 ### the data server
0044 #    'root://xrootd-cms.infn.it//store/data/Run2016E/Charmonium/USER/BPHSkim-PromptReco-v2/000/276/831/00000/00FD1519-714D-E611-B686-FA163E321AE0.root'
0045 #
0046 ### use this to access an input file locally available
0047 #    'file:/...complete_file_path.../XXXX.root'
0048 ))
0049 
0050 from Configuration.AlCa.GlobalTag import GlobalTag
0051 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_data', '')
0052 
0053 from HeavyFlavorAnalysis.SpecificDecay.recoSelectForWrite_cfi import recoSelect
0054 
0055 process.bphWriteSpecificDecay = cms.EDProducer('BPHWriteSpecificDecay',
0056     pVertexLabel = cms.string('offlinePrimaryVertices::RECO'),
0057     gpCandsLabel = cms.string('patSelectedTracks'),
0058     ccCandsLabel = cms.string('onia2MuMuPAT::RECO'),
0059     oniaName = cms.string('oniaFitted'),
0060     sdName   = cms.string('kx0Cand'),
0061     ssName   = cms.string('phiCand'),
0062     buName   = cms.string('buFitted'),
0063     bdName   = cms.string('bdFitted'),
0064     bsName   = cms.string('bsFitted'),
0065     writeVertex   = cms.bool( True ),
0066     writeMomentum = cms.bool( True ),
0067     recoSelect = cms.VPSet(recoSelect)
0068 )
0069 
0070 process.out = cms.OutputModule(
0071     "PoolOutputModule",
0072     fileName = cms.untracked.string('reco.root'),
0073     outputCommands = cms.untracked.vstring(
0074       "keep *",
0075       "keep *_writeBPHSpecificDecay_*_*",
0076       "drop *_patSelectedTracks_*_*",
0077       "drop *_CandidateSelectedTracks_*_*",
0078       "drop *_TriggerResults_*_bphAnalysis",
0079       "drop *_random*_*_bphAnalysis"
0080     ),
0081 )
0082 
0083 process.p = cms.Path(
0084     process.CandidateSelectedTracks *
0085     process.bphWriteSpecificDecay
0086 )
0087 
0088 process.e = cms.EndPath(process.out, patAlgosToolsTask)