예제 #1
0
from DerivationFrameworkEGamma.EGammaCommon import *
from DerivationFrameworkMuons.MuonsCommon import *
from DerivationFrameworkJetEtMiss.METCommon import *
#

#
if DerivationFrameworkIsMonteCarlo:
    from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents
    addStandardTruthContents()

#====================================================================
# SKIMMING TOOL
#====================================================================

from DerivationFrameworkJetEtMiss import TriggerLists
electronTriggers = TriggerLists.single_el_Trig()
muonTriggers = TriggerLists.single_mu_Trig()

orstr = ' || '
andstr = ' && '
eltrigsel = '(EventInfo.eventTypeBitmask==1) || ' + orstr.join(
    electronTriggers)
elofflinesel = andstr.join([
    'count((Electrons.pt > 25*GeV) && (Electrons.DFCommonElectronsLHMedium)) >= 1',
    'count(AntiKt4EMTopoJets.DFCommonJets_Calib_pt>20*GeV &&  AntiKt4EMTopoJets_BTagging201810.DFCommonJets_FixedCutBEff_77_MV2c10) >= 1'
])
electronSelection = '( (' + eltrigsel + ') && (' + elofflinesel + ') )'

mutrigsel = '(EventInfo.eventTypeBitmask==1) || ' + orstr.join(muonTriggers)
muofflinesel = andstr.join([
    'count((Muons.pt > 25*GeV) && (Muons.DFCommonMuonsPreselection)) >= 1',
예제 #2
0
from DerivationFrameworkJetEtMiss.METTriggerDerivationContent import METTriggerDerivationContentManager

#======================================================================================================================
# SET UP STREAM
#======================================================================================================================
streamName = derivationFlags.WriteDAOD_JETM11Stream.StreamName
fileName = buildFileName(derivationFlags.WriteDAOD_JETM11Stream)
JETM11Stream = MSMgr.NewPoolRootStream(streamName, fileName)
JETM11Stream.AcceptAlgs(['JETM11Kernel'])

#======================================================================================================================
# SKIMMING TOOL
#======================================================================================================================
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool
singleElTriggers = TriggerLists.single_el_Trig()
singleMuTriggers = TriggerLists.single_mu_Trig()
cutExpression = "(count(Electrons.DFCommonElectronsLHLoose && Electrons.pt > (24 * GeV) && abs(Electrons.eta) < 2.47) + count(Muons.DFCommonMuonsPreselection && Muons.pt > (24*GeV) && abs(Muons.eta) < 2.47) ) >= 1"
JETM11StringSkimmingTool = DerivationFramework__xAODStringSkimmingTool(
    name="JETM11StringSkimmingTool", expression=cutExpression)
JETM11TriggerSkimmingTool = DerivationFramework__TriggerSkimmingTool(
    name="JETM11TriggerSkimmingTool",
    TriggerListOR=singleElTriggers + singleMuTriggers)
ToolSvc += JETM11StringSkimmingTool
ToolSvc += JETM11TriggerSkimmingTool

content_manager = METTriggerDerivationContentManager.make_tight_manager(
    "JETM11", JETM11Stream)

#======================================================================================================================
# CREATE PRIVATE SEQUENCE
예제 #3
0
#====================================================================
# SET UP STREAM   
#====================================================================
streamName = derivationFlags.WriteDAOD_JETM6Stream.StreamName
fileName   = buildFileName( derivationFlags.WriteDAOD_JETM6Stream )
JETM6Stream = MSMgr.NewPoolRootStream( streamName, fileName )
JETM6Stream.AcceptAlgs(["JETM6MainKernel"])
augStream = MSMgr.GetStream( streamName )
evtStream = augStream.GetEventStream()

#====================================================================
# SKIMMING TOOL
#====================================================================

from DerivationFrameworkJetEtMiss import TriggerLists
electronTriggers = TriggerLists.single_el_Trig()
muonTriggers = TriggerLists.single_mu_Trig()
photonTriggers = TriggerLists.single_photon_Trig()
jetTriggers = TriggerLists.jetTrig()

# For first data
jetSelection = '(count( AntiKt10LCTopoJets.pt > 400.*GeV && abs(AntiKt10LCTopoJets.eta) < 2.5 ) >=1 || count( AntiKt10UFOCSSKJets.pt > 400.*GeV && abs(AntiKt10UFOCSSKJets.eta) < 2.5 ) >= 1)'
if DerivationFrameworkIsMonteCarlo:
  jetSelection = '(count( AntiKt10LCTopoJets.pt > 180.*GeV && abs(AntiKt10LCTopoJets.eta) < 2.5 ) >=1 || count( AntiKt10UFOCSSKJets.pt > 180.*GeV && abs(AntiKt10UFOCSSKJets.eta) < 2.5 ) >= 1)'

orstr  = ' || '
andstr = ' && '
eltrigsel = '(EventInfo.eventTypeBitmask==1) || '+orstr.join(electronTriggers)
elofflinesel = andstr.join(['count((Electrons.pt > 20*GeV) && (Electrons.DFCommonElectronsLHLoose)) >= 1',
                            '(count(AntiKt10LCTopoJets.pt > 150*GeV && abs(AntiKt10LCTopoJets.eta) < 2.5) >=1 || count(AntiKt10UFOCSSKJets.pt > 150*GeV && abs(AntiKt10UFOCSSKJets.eta) < 2.5) >=1)'])
electronSelection = '( (' + eltrigsel + ') && (' + elofflinesel + ') )'
예제 #4
0
    #import DerivationFrameworkCore.WeightMetadata
    #import DerivationFrameworkCore.LHE3WeightMetadata

    from DerivationFrameworkMCTruth import MCTruthCommon
    MCTruthCommon.addStandardTruthContents()
    MCTruthCommon.addBosonsAndDownstreamParticles(generations=4,
                                                  rejectHadronChildren=True)
    MCTruthCommon.addTopQuarkAndDownstreamParticles(generations=4,
                                                    rejectHadronChildren=True)

#====================================================================
# SKIMMING TOOL
#====================================================================

from DerivationFrameworkJetEtMiss import TriggerLists
muonTriggers = TriggerLists.single_mu_Trig()
jetTriggers = TriggerLists.jetTrig()

# Applying a pT cut of 300 GeV on ungroomed jets, which should be sufficient for the grooming scan studies
jetSelection = '((count( AntiKt10LCTopoJets.pt > 300.*GeV && abs(AntiKt10LCTopoJets.eta) < 2.5 ) >=1) ||  \
                 (count( AntiKt10LCTopoCSSKJets.pt > 300.*GeV && abs(AntiKt10LCTopoCSSKJets.eta) < 2.5 ) >=1) ||  \
                 (count( AntiKt10EMPFlowCSSKJets.pt > 300.*GeV && abs(AntiKt10EMPFlowCSSKJets.eta) < 2.5 ) >=1)  ||  \
                 (count( AntiKt10TrackCaloClusterJets.pt > 300.*GeV && abs(AntiKt10TrackCaloClusterJets.eta) < 2.5 ) >=1) || \
                 (count( AntiKt10UFOCHSJets.pt > 300.*GeV && abs(AntiKt10UFOCHSJets.eta) < 2.5 ) >=1) || \
                 (count( AntiKt10UFOCSSKJets.pt > 300.*GeV && abs(AntiKt10UFOCSSKJets.eta) < 2.5 ) >=1) \
                )'

orstr = ' || '
andstr = ' && '

mutrigsel = '(EventInfo.eventTypeBitmask==1) || ' + orstr.join(muonTriggers)
예제 #5
0
#====================================================================
from DerivationFrameworkCore.DerivationFrameworkMaster import *
from DerivationFrameworkJetEtMiss.JetCommon import *
from DerivationFrameworkJetEtMiss.ExtendedJetCommon import *
from DerivationFrameworkJetEtMiss.METCommon import *
from DerivationFrameworkJetEtMiss import TriggerLists
from DerivationFrameworkEGamma.EGammaCommon import*
from DerivationFrameworkMuons.MuonsCommon import*
from DerivationFrameworkJetEtMiss.METTriggerDerivationContent import METTriggerDerivationContentManager

#======================================================================================================================
# SKIMMING TOOL
#======================================================================================================================
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool
singleMuTriggers = TriggerLists.single_mu_Trig()
cutExpression = "(count(Muons.DFCommonMuonsPreselection && Muons.pt > (20*GeV) && abs(Muons.eta) < 2.7) ) >= 2"
JETM14StringSkimmingTool = DerivationFramework__xAODStringSkimmingTool(
    name       = "JETM14StringSkimmingTool",
    expression = cutExpression)
JETM14TriggerSkimmingTool = DerivationFramework__TriggerSkimmingTool(
    name          = "JETM14TriggerSkimmingTool",
    TriggerListOR = singleMuTriggers)
ToolSvc += JETM14StringSkimmingTool
ToolSvc += JETM14TriggerSkimmingTool


#======================================================================================================================
# SET UP STREAM
#======================================================================================================================
streamName = derivationFlags.WriteDAOD_JETM14Stream.StreamName
예제 #6
0
from DerivationFrameworkCore.DerivationFrameworkMaster import *
from DerivationFrameworkJetEtMiss.JetCommon import *
from DerivationFrameworkJetEtMiss.ExtendedJetCommon import *
from DerivationFrameworkInDet.InDetCommon import *

# Include TRUTH3 containers
if DerivationFrameworkIsMonteCarlo:
    from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents
    addStandardTruthContents()

#====================================================================
# SKIMMING TOOL
#====================================================================
from DerivationFrameworkJetEtMiss import TriggerLists
triggers = TriggerLists.jetTrig()

# NOTE: need to be able to OR isSimulated as an OR with the trigger
expression = ' (EventInfo.eventTypeBitmask==1) || HLT_xe120_pufit_L1XE50'

from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool
JETM1TrigSkimmingTool = DerivationFramework__TriggerSkimmingTool(
    name="JETM1TrigSkimmingTool1", TriggerListOR=triggers)
ToolSvc += JETM1TrigSkimmingTool

from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool
JETM1OfflineSkimmingTool = DerivationFramework__xAODStringSkimmingTool(
    name="JETM1OfflineSkimmingTool1", expression=expression)
ToolSvc += JETM1OfflineSkimmingTool

# OR of the above two selections
예제 #7
0
from DerivationFrameworkJetEtMiss.JetCommon import *
from DerivationFrameworkJetEtMiss.ExtendedJetCommon import *
#
from DerivationFrameworkJetEtMiss.METCommon import *
#
if DerivationFrameworkIsMonteCarlo:
    from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents
    addStandardTruthContents()

#====================================================================
# SKIMMING TOOL
#====================================================================
# NOTE: need to add isSimulation as OR with trigger

from DerivationFrameworkJetEtMiss import TriggerLists
triggerlist = TriggerLists.single_photon_Trig()

triggers = '||'.join(triggerlist)
expression = '( (EventInfo.eventTypeBitmask==1) || (' + triggers + ') )'

from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool
JETM4SkimmingTool = DerivationFramework__xAODStringSkimmingTool(
    name="JETM4SkimmingTool1", expression=expression)
ToolSvc += JETM4SkimmingTool

#Trigger matching decorations
from DerivationFrameworkCore.TriggerMatchingAugmentation import applyTriggerMatching
TrigMatchAug, NewTrigVars = applyTriggerMatching(
    ToolNamePrefix="JETM4", PhotonTriggers=TriggerLists.single_photon_Trig())

#====================================================================
예제 #8
0
from DerivationFrameworkCore.DerivationFrameworkMaster import *
from DerivationFrameworkInDet.InDetCommon import *
from DerivationFrameworkJetEtMiss.JetCommon import *
from DerivationFrameworkJetEtMiss.ExtendedJetCommon import *
from DerivationFrameworkEGamma.EGammaCommon import *
from DerivationFrameworkMuons.MuonsCommon import *
from DerivationFrameworkJetEtMiss.METCommon import *
#

#====================================================================
# SKIMMING TOOL
#====================================================================

from DerivationFrameworkJetEtMiss import TriggerLists
metTriggers = TriggerLists.MET_Trig()
muTriggers = TriggerLists.single_mu_Trig()
orstr = ' || '
andstr = ' && '
trackRequirements = '(InDetTrackParticles.pt > 10.*GeV && InDetTrackParticles.TrkIsoPt1000_ptcone20 < 0.12*InDetTrackParticles.pt && InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV) < 3.0*mm )'
trackRequirementsMu = '(InDetTrackParticles.pt > 70.*GeV && InDetTrackParticles.TrkIsoPt1000_ptcone20 < 0.12*InDetTrackParticles.pt && InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV) < 3.0*mm )'
trackRequirementsTtbar = '(InDetTrackParticles.pt > 25.*GeV && InDetTrackParticles.TrkIsoPt1000_ptcone20 < 0.12*InDetTrackParticles.pt && InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV) < 3.0*mm )'
jetRequirementsTtbar = '( AntiKt4EMTopoJets.DFCommonJets_Calib_pt > 20*GeV && BTagging_AntiKt4EMTopo_201810.MV2c10_discriminant > 0.11 )'
expressionW = '( (' + orstr.join(
    metTriggers) + ' )' + andstr + '( count(' + trackRequirements + ') >=1 ) )'
expressionMu = '( (' + orstr.join(
    muTriggers
) + ' )' + andstr + '( count(' + trackRequirementsMu + ') >=1 ) )'
expressionTtbar = '( (' + orstr.join(
    muTriggers
) + ' )' + andstr + '( count(' + trackRequirementsTtbar + ') >=1 )' + andstr + '( count(' + trackRequirements + ') >=2 )' + andstr + '( count(' + jetRequirementsTtbar + ') >=1 ) )'