Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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(1000) )
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.MessageLogger.cerr.FwkReport.reportEvery = 100
0025 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
0026 
0027 process.source = cms.Source("PoolSource",fileNames = cms.untracked.vstring(
0028 #
0029 ### use this to access the nearest copy of the input file, querying the catalog
0030     '/store/mc/RunIISpring15DR74/BsToJpsiPhi_BMuonFilter_TuneCUEP8M1_13TeV-pythia8-evtgen/AODSIM/Asympt25nsRaw_MCRUN2_74_V9-v1/50000/D0D90725-1D61-E511-B812-0025907277CE.root'
0031 #
0032 ### use this to access the input file if by any reason you want to specify 
0033 ### the data server
0034 #    'root://xrootd-cms.infn.it//store/mc/RunIISpring15DR74/BsToJpsiPhi_BMuonFilter_TuneCUEP8M1_13TeV-pythia8-evtgen/AODSIM/Asympt25nsRaw_MCRUN2_74_V9-v1/50000/D0D90725-1D61-E511-B812-0025907277CE.root'
0035 #
0036 ### use this to access an input file locally available
0037 #    'file:/...complete_file_path.../D0D90725-1D61-E511-B812-0025907277CE.root'
0038 ))
0039 
0040 from Configuration.AlCa.GlobalTag import GlobalTag
0041 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')
0042 
0043 process.load('PhysicsTools.PatAlgos.producersLayer1.patCandidates_cff')
0044 patAlgosToolsTask.add(process.patCandidatesTask)
0045 process.load('PhysicsTools.PatAlgos.selectionLayer1.selectedPatCandidates_cff')
0046 patAlgosToolsTask.add(process.selectedPatCandidatesTask)
0047 process.load('PhysicsTools.PatAlgos.cleaningLayer1.cleanPatCandidates_cff')
0048 patAlgosToolsTask.add(process.cleanPatCandidatesTask)
0049 
0050 process.selectedPatMuons.cut = cms.string('muonID(\"TMOneStationTight\")'
0051     ' && abs(innerTrack.dxy) < 0.3'
0052     ' && abs(innerTrack.dz)  < 20.'
0053     ' && innerTrack.hitPattern.trackerLayersWithMeasurement > 5'
0054     ' && innerTrack.hitPattern.pixelLayersWithMeasurement > 0'
0055     ' && innerTrack.quality(\"highPurity\")'
0056 )
0057 
0058 #make patTracks
0059 from PhysicsTools.PatAlgos.tools.trackTools import makeTrackCandidates
0060 makeTrackCandidates(process,
0061     label        = 'TrackCands',                  # output collection
0062     tracks       = cms.InputTag('generalTracks'), # input track collection
0063     particleType = 'pi+',                         # particle type (for assigning a mass)
0064     preselection = 'pt > 0.7',                    # preselection cut on candidates
0065     selection    = 'pt > 0.7',                    # selection on PAT Layer 1 objects
0066     isolation    = {},                            # isolations to use (set to {} for None)
0067     isoDeposits  = [],
0068     mcAs         = None                           # replicate MC match as the one used for Muons
0069 )
0070 process.patTrackCands.embedTrack = True
0071 
0072 process.testBPHRecoDecay = cms.EDAnalyzer('TestBPHRecoDecay',
0073     patMuonLabel = cms.string('selectedPatMuons'),
0074     pfCandsLabel = cms.string('particleFlow'),
0075     outDump = cms.string('dump_full.txt'),
0076     outHist = cms.string('hist_full.root')
0077 )
0078 
0079 process.p = cms.Path(
0080     process.testBPHRecoDecay,
0081     patAlgosToolsTask
0082 )