def addDiMuonSeparationVariables(process, sequence, treeProducer):
    from MuonAnalysis.TagAndProbe.nearbyMuonsInfo_cfi import nearbyMuonsInfo;
    tpp = treeProducer.tagProbePairs.moduleLabel
    if not hasattr(process, tpp+"DiMuonInfo"):
        setattr(process, tpp+"DiMuonInfo", nearbyMuonsInfo.clone(src = treeProducer.tagProbePairs))
        sequence.replace(getattr(process,tpp), getattr(process,tpp) + getattr(process, tpp+"DiMuonInfo"))
    if not hasattr(treeProducer, 'pairVariables'):
        treeProducer.pairVariables = cms.PSet()
        treeProducer.pairFlags     = cms.PSet()
    treeProducer.pairVariables.dphiVtxTimesQ = cms.InputTag(tpp+"DiMuonInfo", "dphiVtxTimesQ")
    treeProducer.pairVariables.drM2          = cms.InputTag(tpp+"DiMuonInfo", "drM2")
    treeProducer.pairVariables.dphiM2        = cms.InputTag(tpp+"DiMuonInfo", "dphiM2")
    treeProducer.pairVariables.distM2        = cms.InputTag(tpp+"DiMuonInfo", "distM2")
    treeProducer.pairVariables.drStaIn       = cms.InputTag(tpp+"DiMuonInfo", "drStaIn")
    treeProducer.pairVariables.dphiStaIn     = cms.InputTag(tpp+"DiMuonInfo", "dphiStaIn")
Beispiel #2
0
def addDiMuonSeparationVariables(process, sequence, treeProducer):
    from MuonAnalysis.TagAndProbe.nearbyMuonsInfo_cfi import nearbyMuonsInfo
    tpp = treeProducer.tagProbePairs.moduleLabel
    if not hasattr(process, tpp + "DiMuonInfo"):
        setattr(process, tpp + "DiMuonInfo",
                nearbyMuonsInfo.clone(src=treeProducer.tagProbePairs))
        sequence.replace(
            getattr(process, tpp),
            getattr(process, tpp) + getattr(process, tpp + "DiMuonInfo"))
    if not hasattr(treeProducer, 'pairVariables'):
        treeProducer.pairVariables = cms.PSet()
        treeProducer.pairFlags = cms.PSet()
    treeProducer.pairVariables.dphiVtxTimesQ = cms.InputTag(
        tpp + "DiMuonInfo", "dphiVtxTimesQ")
    treeProducer.pairVariables.drM2 = cms.InputTag(tpp + "DiMuonInfo", "drM2")
    treeProducer.pairVariables.dphiM2 = cms.InputTag(tpp + "DiMuonInfo",
                                                     "dphiM2")
    treeProducer.pairVariables.distM2 = cms.InputTag(tpp + "DiMuonInfo",
                                                     "distM2")
    treeProducer.pairVariables.drStaIn = cms.InputTag(tpp + "DiMuonInfo",
                                                      "drStaIn")
    treeProducer.pairVariables.dphiStaIn = cms.InputTag(
        tpp + "DiMuonInfo", "dphiStaIn")
Beispiel #3
0
process.load(
    "Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")

process.GlobalTag.globaltag = 'GR_R_44_V12::All'

from MuonAnalysis.MuonAssociators.TnPTreeProducer_separation_variables_cfi import *

process.tnpTreeJPsi = tnpTreeJPsiProducer.clone()
###################
treeProducer = process.tnpTreeJPsi

from MuonAnalysis.TagAndProbe.nearbyMuonsInfo_cfi import nearbyMuonsInfo
nearbyMuonsInfo.filename = cms.string("Debug_JPsi_MuOnia_13_2.root")
tpp = treeProducer.tagProbePairs.moduleLabel
setattr(process, tpp + "DiMuonInfo",
        nearbyMuonsInfo.clone(src=treeProducer.tagProbePairs))

if not hasattr(treeProducer, 'pairVariables'):
    treeProducer.pairVariables = cms.PSet()
    treeProducer.pairFlags = cms.PSet()
treeProducer.pairVariables.dphiVtxTimesQ = cms.InputTag(
    tpp + "DiMuonInfo", "dphiVtxTimesQ")
treeProducer.pairVariables.drM2 = cms.InputTag(tpp + "DiMuonInfo", "drM2")
treeProducer.pairVariables.dphiM2 = cms.InputTag(tpp + "DiMuonInfo", "dphiM2")
treeProducer.pairVariables.distM2 = cms.InputTag(tpp + "DiMuonInfo", "distM2")
treeProducer.pairVariables.drStaIn = cms.InputTag(tpp + "DiMuonInfo",
                                                  "drStaIn")
treeProducer.pairVariables.dphiStaIn = cms.InputTag(tpp + "DiMuonInfo",
                                                    "dphiStaIn")
#####################
Beispiel #4
0
import FWCore.ParameterSet.Config as cms

from MuonAnalysis.TagAndProbe.nearbyMuonsInfo_cfi import nearbyMuonsInfo as tagProbeSeparation

tagProbeStaSeparation = tagProbeSeparation.clone(
    src=cms.InputTag("tpPairsSta"), )

#########################################################################################
##        Object counting modules                                                      ##
#########################################################################################

nverticesModule = cms.EDProducer(
    "VertexMultiplicityCounter",
    probes=cms.InputTag("tagMuons"),
    objects=cms.InputTag("offlinePrimaryVertices"),
    objectSelection=cms.string(
        "!isFake && ndof > 4 && abs(z) <= 25 && position.Rho <= 2"),
)

njets30Module = cms.EDProducer(
    "CandCleanedMultiplicityCounter",
    pairs=cms.InputTag("tpPairs"),
    objects=cms.InputTag("ak4PFJetsCHS"),
    objectSelection=cms.string("abs(eta) < 5 && pt > 30"),
    minTagObjDR=cms.double(0.3),
    minProbeObjDR=cms.double(0.3),
)

#########################################################################################
##        Tracking-related modules                                                     ##
#########################################################################################
process.load("Configuration.StandardSequences.Reconstruction_cff")
process.load("Configuration.StandardSequences.MagneticField_cff")
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
#process.GlobalTag.globaltag = 'GR_R_42_V14::All'
#process.GlobalTag.globaltag = 'GR_R_42_V21::All'
process.GlobalTag.globaltag = 'GR_R_44_V12::All'
from MuonAnalysis.MuonAssociators.TnPTreeProducer_separation_variables_Z_cfi import *

process.tnpTreeZ = tnpTreeZProducer.clone()
###################
treeProducer = process.tnpTreeZ

from MuonAnalysis.TagAndProbe.nearbyMuonsInfo_cfi import nearbyMuonsInfo
nearbyMuonsInfo.filename = cms.string("Debug_Z_IsoMu24_2p1_1.root")
tpp = treeProducer.tagProbePairs.moduleLabel
setattr(process, tpp+"DiMuonInfo", nearbyMuonsInfo.clone(src = treeProducer.tagProbePairs))

if not hasattr(treeProducer, 'pairVariables'):
    treeProducer.pairVariables = cms.PSet()
    treeProducer.pairFlags     = cms.PSet()
treeProducer.pairVariables.dphiVtxTimesQ = cms.InputTag(tpp+"DiMuonInfo", "dphiVtxTimesQ")
treeProducer.pairVariables.drM2          = cms.InputTag(tpp+"DiMuonInfo", "drM2")
treeProducer.pairVariables.dphiM2        = cms.InputTag(tpp+"DiMuonInfo", "dphiM2")
treeProducer.pairVariables.distM2        = cms.InputTag(tpp+"DiMuonInfo", "distM2")
treeProducer.pairVariables.drStaIn       = cms.InputTag(tpp+"DiMuonInfo", "drStaIn")
treeProducer.pairVariables.dphiStaIn     = cms.InputTag(tpp+"DiMuonInfo", "dphiStaIn")
#####################

process.TFileService = cms.Service("TFileService", fileName = cms.string('rfio:/castor/cern.ch/user/r/rybinska/Feb/Z_IsoMu24_2p1_1.root'))  

process.tnpSequence = cms.Sequence(