Ejemplo n.º 1
0
def Force_L1DoubleMuOpen(process):
    from HLTrigger.HLTfilters.hltHighLevelDev_cfi import hltHighLevelDev
    process.forceL1DoubleMuOpen = hltHighLevelDev.clone(
        HLTPaths=['HLT_L1DoubleMuOpen'], HLTPathsPrescales=[1])
    process.histoTriggerL1DoubleMuOpen = process.histoTrigger.clone()
    process.tagAndProbeL1DoubleMuOpen = cms.Path(
        process.tagAndProbe._seq + process.forceL1DoubleMuOpen +
        process.histoTriggerL1DoubleMuOpen)
Ejemplo n.º 2
0
# jet corrections
#process.load("JetMETCorrections.Configuration.L2L3Corrections_Summer09_7TeV_ReReco332_cff")
process.load('JetMETCorrections.Configuration.DefaultJEC_cff')
#process.load("JetMETCorrections.Configuration.L2L3Corrections_900GeV_cff")
#process.load("JetMETCorrections.Configuration.L2L3Corrections_2360GeV_cff")

# summary
process.options   = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )

process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskTechTrigConfig_cff')
from HLTrigger.HLTfilters.hltLevel1GTSeed_cfi import hltLevel1GTSeed
process.bit40OR41 = hltLevel1GTSeed.clone(L1TechTriggerSeeding = cms.bool(True), L1SeedsLogicalExpression = cms.string('40 OR 41'))

from HLTrigger.HLTfilters.hltHighLevelDev_cfi import hltHighLevelDev
process.physDecl = hltHighLevelDev.clone(HLTPaths = ['HLT_PhysicsDeclared'], HLTPathsPrescales = [1])

process.promptanaTree = cms.EDAnalyzer("PromptAnaTree",
    outputCommands = cms.untracked.vstring(
    'drop *',
    'keep *_promptanaevent_*_*',
    'keep *_promptanamet_*_*',
    'keep *_promptanatcmet_*_*',
    'keep *_promptanapfmet_*_*',
    'keep *_promptananohf_*_*',
    'keep *_promptanaic5calojet_*_*',
    #'keep *_promptanasc5calojet_*_*',
    #'keep *_promptanakt4calojet_*_*',
    'keep *_promptanaak5calojet_*_*',
    'keep *_promptanaJPTak5_*_*',
    'keep *_promptanaak5pfjet_*_*',
Ejemplo n.º 3
0
## Di-muons, all
process.dimu = cms.EDProducer("CandViewShallowCloneCombiner",
    decay = cms.string("mu4j@+ mu4j@-"),
    cut   = cms.string("mass > 2"),
)
## Di-muons, both trigger matched
process.dimutt  = process.dimu.clone(decay = "mu4jt@+ mu4jt@-")
## Di-muons, both trigger matched geometrically
process.dimuttg = process.dimu.clone(decay = "mu4jtg@+ mu4jtg@-")
process.any = cms.EDFilter("CandViewCountFilter", src = cms.InputTag("dimu"),    minNumber = cms.uint32(1))
process.tt  = cms.EDFilter("CandViewCountFilter", src = cms.InputTag("dimutt"),  minNumber = cms.uint32(1))
process.ttg = cms.EDFilter("CandViewCountFilter", src = cms.InputTag("dimuttg"), minNumber = cms.uint32(1))

## Test trigger bit
from HLTrigger.HLTfilters.hltHighLevelDev_cfi import hltHighLevelDev
process.trigBit = hltHighLevelDev.clone(HLTPaths = ['HLT_L1DoubleMuOpen'], HLTPathsPrescales = [1])

process.s = cms.Sequence(
    process.csctfDigis *
    process.muonL1MatchExtended *
    process.patMuons *
    ( process.mu4j + process.mu4jt + process.mu4jtg   ) *
    ( process.dimu + process.dimutt + process.dimuttg )
)

process.pAny = cms.Path(
    process.trigBit +
    process.s +
    process.any
)
process.source = cms.Source(
    "PoolSource",
    fileNames=cms.untracked.vstring(
        ## Produced with MuonAnalysis/Examples/test/patSkims/patMuons_mc_cfg.py
        'root://pcmssd12.cern.ch//data/gpetrucc/7TeV/inclusiveMuons/inclusiveMuons_MuHLT_MinBiasMC357_v5/tupleMC_1_1.root',
    ))

process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(-1))
process.options = cms.untracked.PSet(wantSummary=cms.untracked.bool(True))

process.TFileService = cms.Service(
    'TFileService', fileName=cms.string('inclusiveMuonPlots_MC.class.root'))

from HLTrigger.HLTfilters.hltHighLevelDev_cfi import hltHighLevelDev
reskim = hltHighLevelDev.clone(
    TriggerResultsTag=cms.InputTag('TriggerResults', '', ''))
process.recoMu = reskim.clone(HLTPaths=['skim_RecoMu'], HLTPathsPrescales=[1])
process.bscMinBias = hltHighLevelDev.clone(
    HLTPaths=['HLT_L1_BscMinBiasOR_BptxPlusORMinus'], HLTPathsPrescales=[1])
process.preFilter = cms.Sequence(process.recoMu)

## for some classifications which differ from the basic ones only for arbitration, we save only the code not the flavour
## so to get the flavour we have to use the basic one.
flavourlessClassifiers = {
    'classByHitsTMA': 'classByHitsTM',
    'classByHitsGlbPT': 'classByHitsGlb'
}


def addClassAliases(process, mainlabel, classifier, requireMB=True):
    mainmodule = getattr(process, mainlabel)
process.source = cms.Source("PoolSource",
    fileNames = cms.untracked.vstring(
        ## Produced with MuonAnalysis/Examples/test/patSkims/patMuons_data_cfg.py
        'root://pcmssd12.cern.ch//data/gpetrucc/7TeV/inclusiveMuons/inclusiveMuons_fromMay6th_v4/tupleData_42_1.root',
    )
)
for I in range(len(process.source.fileNames)): 
    process.source.fileNames[I] = process.source.fileNames[I].replace("root://pcmssd12.cern.ch//","file:/")

process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
process.options   = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )

process.TFileService = cms.Service('TFileService', fileName=cms.string('inclusiveMuonPlots_Data.root') )

from HLTrigger.HLTfilters.hltHighLevelDev_cfi import hltHighLevelDev
reskim  = hltHighLevelDev.clone(TriggerResultsTag = cms.InputTag('TriggerResults','',''))
process.recoMu     = reskim.clone(HLTPaths = ['skim_RecoMu'], HLTPathsPrescales = [1])
process.bscMinBias = hltHighLevelDev.clone(HLTPaths = ['HLT_L1_BscMinBiasOR_BptxPlusORMinus'], HLTPathsPrescales = [1])
process.preFilter = cms.Sequence(process.recoMu)

def addPlots(process, label, requireMB=True):
    module = getattr(process,label)
    ## prepare plots for full detector and for separate barrel/endcaps
    abseta = "abs(eta)"
    if label.find("standAlone") == 0: abseta = "abs(outerTrack.eta)";
    mbar   = module.clone(selection = module.selection.value() + " && "+abseta+" < 1.2");
    mec    = module.clone(selection = module.selection.value() + " && "+abseta+" > 1.2");
    setattr(process, label+"B", mbar);
    setattr(process, label+"E", mec );
    if requireMB:
        setattr(process, label+"_Plots", cms.Path(process.preFilter + process.bscMinBias + module + mbar + mec)) 
### standard includes
process.load("FWCore.MessageService.MessageLogger_cfi")
process.MessageLogger.cerr.FwkReport.reportEvery = 1000

### source
process.source = cms.Source("PoolSource",
    fileNames = cms.untracked.vstring(
        'root:://pcmssd12.cern.ch//data/gpetrucc/7TeV/hlt/MC_vecchio.root' ## doesn't actually have HLT debug inside :-(
    )
)
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )

## Apply other trigger skims (to handle with prescaled triggers)
from HLTrigger.HLTfilters.hltHighLevelDev_cfi import hltHighLevelDev
process.bit40 = hltHighLevelDev.clone(HLTPaths = ['HLT_MinBiasBSC'], HLTPathsPrescales = [1])
process.halo  = hltHighLevelDev.clone(HLTPaths = ['HLT_L1Tech_BSC_halo'], HLTPathsPrescales = [1])

## Quality filter on the muons
process.patMuons = cms.EDFilter("PATMuonSelector", src = cms.InputTag("patMuonsWithTrigger"), cut = cms.string("isGlobalMuon && muonID('GlobalMuonPromptTight')"))
## At least one good muon
process.muonFilter       = cms.EDFilter("CandViewCountFilter", src = cms.InputTag("patMuons"), minNumber = cms.uint32(1))
## No more than one (maxNumber didn't work for me, I don't know why)
process.diMuonFilter     = process.muonFilter.clone(minNumber = 2) 
process.singleMuonFilter = cms.Sequence(~process.diMuonFilter)

process.patMuonTree = cms.EDAnalyzer("ProbeTreeProducer",
    src = cms.InputTag("patMuons"),
    cut = cms.string(""), # you might want a quality cut here
    variables = cms.PSet(
        ## Variables of the muon
Ejemplo n.º 7
0
### standard includes
process.load("FWCore.MessageService.MessageLogger_cfi")
process.MessageLogger.cerr.FwkReport.reportEvery = 1000

### source
process.source = cms.Source(
    "PoolSource",
    fileNames=cms.untracked.vstring(
        'root:://pcmssd12.cern.ch//data/gpetrucc/7TeV/hlt/MC_vecchio.root'  ## doesn't actually have HLT debug inside :-(
    ))
process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(-1))

## Apply other trigger skims (to handle with prescaled triggers)
from HLTrigger.HLTfilters.hltHighLevelDev_cfi import hltHighLevelDev

process.bit40 = hltHighLevelDev.clone(HLTPaths=['HLT_MinBiasBSC'],
                                      HLTPathsPrescales=[1])
process.halo = hltHighLevelDev.clone(HLTPaths=['HLT_L1Tech_BSC_halo'],
                                     HLTPathsPrescales=[1])

## Quality filter on the muons
process.patMuons = cms.EDFilter(
    "PATMuonSelector",
    src=cms.InputTag("patMuonsWithTrigger"),
    cut=cms.string("isGlobalMuon && muonID('GlobalMuonPromptTight')"))
## At least one good muon
process.muonFilter = cms.EDFilter("CandViewCountFilter",
                                  src=cms.InputTag("patMuons"),
                                  minNumber=cms.uint32(1))
## No more than one (maxNumber didn't work for me, I don't know why)
process.diMuonFilter = process.muonFilter.clone(minNumber=2)
process.singleMuonFilter = cms.Sequence(~process.diMuonFilter)
Ejemplo n.º 8
0
   filter = cms.bool(True),   # otherwise it won't filter the events, just produce an empty vertex collection.
)
process.noScraping = cms.EDFilter("FilterOutScraping",
    applyfilter = cms.untracked.bool(True),
    debugOn = cms.untracked.bool(False), ## Or 'True' to get some per-event info
    numtrack = cms.untracked.uint32(10),
    thresh = cms.untracked.double(0.25)
)

process.globalMuFilter = cms.EDFilter("TrackCountFilter",    src = cms.InputTag("globalMuons"), minNumber = cms.uint32(1))
process.recoMuFilter   = cms.EDFilter("CandViewCountFilter", src = cms.InputTag("muons"),       minNumber = cms.uint32(1))

process.preFilter = cms.Sequence(process.oneGoodVertexFilter * process.noScraping)

from HLTrigger.HLTfilters.hltHighLevelDev_cfi import hltHighLevelDev
process.bscMinBiasOR = hltHighLevelDev.clone(HLTPaths = ['HLT_L1_BscMinBiasOR_BptxPlusORMinus'], HLTPathsPrescales = [1])
process.hltL1MuOpen  = hltHighLevelDev.clone(HLTPaths = ['HLT_L1MuOpen'],                        HLTPathsPrescales = [1])

process.skim_RecoMu            = cms.Path(process.preFilter * process.recoMuFilter  )
process.skim_GlbMu             = cms.Path(process.preFilter * process.globalMuFilter)
process.skim_RecoMuBscOR       = cms.Path(process.preFilter * process.recoMuFilter   * process.bscMinBiasOR)
process.skim_RecoMuHLTL1MuOpen = cms.Path(process.preFilter * process.recoMuFilter   * process.hltL1MuOpen)

### Adding Trigger Info from TriggerResultsSummary to the PATMuon
process.load("MuonAnalysis.MuonAssociators.patMuonsWithTrigger_8E29_cff")
from MuonAnalysis.MuonAssociators.patMuonsWithTrigger_8E29_cff import changeTriggerProcessName, switchOffAmbiguityResolution;

## ==== Change trigger process name ====
#changeTriggerProcessName(process, "HLT2")   # Custom re-run HLT
#changeTriggerProcessName(process, "REDIGI") # Spring10 ReDigi
def Force_L1DoubleMuOpen(process):
    from HLTrigger.HLTfilters.hltHighLevelDev_cfi import hltHighLevelDev
    process.forceL1DoubleMuOpen = hltHighLevelDev.clone(HLTPaths = ['HLT_L1DoubleMuOpen'], HLTPathsPrescales = [1])
    process.histoTriggerL1DoubleMuOpen = process.histoTrigger.clone()
    process.tagAndProbeL1DoubleMuOpen = cms.Path(process.tagAndProbe._seq + process.forceL1DoubleMuOpen + process.histoTriggerL1DoubleMuOpen)
process.dimutt = process.dimu.clone(decay="mu4jt@+ mu4jt@-")
## Di-muons, both trigger matched geometrically
process.dimuttg = process.dimu.clone(decay="mu4jtg@+ mu4jtg@-")
process.any = cms.EDFilter("CandViewCountFilter",
                           src=cms.InputTag("dimu"),
                           minNumber=cms.uint32(1))
process.tt = cms.EDFilter("CandViewCountFilter",
                          src=cms.InputTag("dimutt"),
                          minNumber=cms.uint32(1))
process.ttg = cms.EDFilter("CandViewCountFilter",
                           src=cms.InputTag("dimuttg"),
                           minNumber=cms.uint32(1))

## Test trigger bit
from HLTrigger.HLTfilters.hltHighLevelDev_cfi import hltHighLevelDev
process.trigBit = hltHighLevelDev.clone(HLTPaths=['HLT_L1DoubleMuOpen'],
                                        HLTPathsPrescales=[1])

process.s = cms.Sequence(process.csctfDigis * process.muonL1MatchExtended *
                         process.patMuons *
                         (process.mu4j + process.mu4jt + process.mu4jtg) *
                         (process.dimu + process.dimutt + process.dimuttg))

process.pAny = cms.Path(process.trigBit + process.s + process.any)

process.pMatch = cms.Path(process.trigBit + process.s + process.tt)

process.pMatchGeom = cms.Path(process.trigBit + process.s + process.ttg)

#process.o = cms.OutputModule("PoolOutputModule",
#    fileName = cms.untracked.string("patMuons_L1MatcherExtended.root"),
#    outputCommands = cms.untracked.vstring("drop *", "keep *_patMuons__*", "keep l1extraL1MuonParticles_l1extraParticles__*")