Skiming.
13 """Configure the example skimming tool"""
17 ExtraData += [
'xAOD::MuonContainer/Muons']
18 ExtraData += [
'xAOD::ElectronContainer/Electrons']
19 ExtraData += [
'xAOD::PhotonContainer/Photons']
20 ExtraData += [
'xAOD::TrackParticleContainer/InDetTrackParticles']
22 acc.addSequence(
seqAND(
"HION4Sequence") )
23 acc.getSequence(
"HION4Sequence").ExtraDataForDynamicConsumers = ExtraData
24 acc.getSequence(
"HION4Sequence").ProcessDynamicDataDependencies =
True
26 muonsRequirements =
'(Muons.pt >= 2.0*GeV) && (abs(Muons.eta) < 2.6)'
27 muonOnlySelection =
'count('+muonsRequirements+
') >= 1'
29 electronsRequirements =
'(Electrons.pt > 2.0*GeV) && (abs(Electrons.eta) < 2.6)'
30 electronOnlySelection =
'count('+electronsRequirements+
') >= 1'
32 photonsRequirements =
'(Photons.pt >= 2.0*GeV)'
33 photonOnlySelection =
'count('+photonsRequirements+
') >=2'
35 electronPhotonSelection =
'(count('+electronsRequirements+
') + count('+photonsRequirements+
')) >= 2'
37 trackRequirements =
'(InDetTrackParticles.pt >= 0.2*GeV) && (abs(InDetTrackParticles.eta) < 2.5)'
38 trackOnlySelection =
'( count('+trackRequirements+
') >= 2 && 5 >= count('+trackRequirements+
') )'
40 tightTrackRequirements =
'(InDetTrackParticles.pt >= 1*GeV) && (abs(InDetTrackParticles.eta) < 2.5)'
41 tightTrackOnlySelection =
'( count('+tightTrackRequirements+
') == 2 )'
43 objectSelection =
'('+muonOnlySelection+
' || '+electronOnlySelection+
' || '+photonOnlySelection+
' || '+electronPhotonSelection+
' || '+trackOnlySelection+
')'
45 from DerivationFrameworkHI
import ListTriggers
46 VMtrigger=ListTriggers.HION4SkimmingTriggersVM()
47 triggers=ListTriggers.HION4SkimmingTriggersALL()
50 if flags.Trigger.EDMVersion != -1:
51 from TrigDecisionTool.TrigDecisionToolConfig
import TrigDecisionToolCfg
53 expression =
'( (' +
' || '.
join(triggers) +
') && '+objectSelection+
') || ( '+
' || '.
join(VMtrigger)+
' && '+tightTrackOnlySelection+
')'
55 expression =
'( '+objectSelection+
' ) || ( '+tightTrackOnlySelection+
' )'
58 acc.addPublicTool(CompFactory.DerivationFramework.xAODStringSkimmingTool(name =
"HION4StringSkimmingTool",
59 expression = expression,
60 TrigDecisionTool=tdt),