Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:01:03

0001 from FWCore.ParameterSet.Config import *
0002 
0003 process = Process("CandSelectorTest")
0004 
0005 process.include("FWCore/MessageLogger/data/MessageLogger.cfi")
0006 
0007 process.maxEvents = untracked.PSet( input = untracked.int32(10) )
0008 
0009 process.source = Source("PoolSource",
0010   fileNames = untracked.vstring("file:genevents.root")
0011 )
0012 
0013 # select the 10 particles with the larget Pt
0014 process.largestPtCands = EDProducer("LargestPtCandSelector",
0015   src = InputTag("genParticleCandidates"),
0016   maxNumber = uint32( 10 )
0017 )
0018 
0019 # select only electrons, and save a vector of references 
0020 process.electronRefs = EDProducer("PdgIdCandRefVectorSelector",
0021   src = InputTag("genParticleCandidates"),
0022   pdgId = vint32( 11 )
0023 )
0024 
0025 # select only electrons, and save clones
0026 process.electrons = EDProducer("PdgIdCandSelector",
0027   src = InputTag("genParticleCandidates"),
0028   pdgId = vint32( 11 )
0029 )
0030 
0031 # select only muons, and save a vector of references 
0032 process.muonRefs = EDProducer("PdgIdCandRefVectorSelector",
0033   src = InputTag("genParticleCandidates"),
0034   pdgId = vint32( 13 )
0035 )
0036 
0037 # select only muons, and save clones
0038 process.muons = EDProducer("PdgIdCandSelector",
0039   src = InputTag("genParticleCandidates"),
0040   pdgId = vint32( 13 )
0041 )
0042 
0043 # select only electrons within eta and Pt cuts 
0044 process.bestElectrons = EDFilter("EtaPtMinCandViewSelector",
0045   src = InputTag("electronRefs"),
0046   ptMin = double( 20 ),
0047   etaMin = double( -2.5 ),
0048   etaMax = double( 2.5 )
0049 )
0050 
0051 # make Z->e+e-
0052 process.zCands = EDProducer("CandShallowCloneCombiner",
0053   decay = string("electrons@+ electrons@-"),
0054   cut = string("20 < mass < 200")
0055 )
0056 
0057 # make exotic decay to three electron
0058 process.exoticCands = EDProducer("CandShallowCloneCombiner",
0059   decay = string("electrons@+ electrons@- electrons@+"),
0060   cut = string("20 < mass < 400")
0061 )
0062 
0063 # merge muons and electrons into leptons
0064 process.leptons = EDProducer("CandMerger",
0065   src = VInputTag("electrons", "muons")
0066 )
0067 
0068 process.out = OutputModule("PoolOutputModule",
0069   fileName = untracked.string("cands.root")
0070 )
0071 
0072 process.printEventNumber = OutputModule("AsciiOutputModule")
0073 
0074 process.select = Path(
0075   process.largestPtCands *
0076   process.electronRefs *
0077   process.electrons *
0078   process.muonRefs *
0079   process.muons *
0080   process.bestElectrons *
0081   process.leptons *
0082   process.zCands *
0083   process.exoticCands
0084 )
0085     
0086 process.ep = EndPath(
0087   process.printEventNumber *
0088   process.out
0089 )