ATLAS Offline Software
Loading...
Searching...
No Matches
BPHY21 Namespace Reference

Functions

 BPHY21Cfg (flags)

Variables

str BPHYDerivationName = "BPHY21"
str streamName = "StreamDAOD_BPHY21"

Function Documentation

◆ BPHY21Cfg()

BPHY21.BPHY21Cfg ( flags)

Definition at line 14 of file BPHY21.py.

14def BPHY21Cfg(flags):
15 from DerivationFrameworkBPhys.commonBPHYMethodsCfg import (
16 BPHY_V0ToolCfg, BPHY_InDetDetailedTrackSelectorToolCfg,
17 BPHY_VertexPointEstimatorCfg, BPHY_TrkVKalVrtFitterCfg,
18 AugOriginalCountsCfg)
19 from JpsiUpsilonTools.JpsiUpsilonToolsConfig import PrimaryVertexRefittingToolCfg
20 acc = ComponentAccumulator()
21 isSimulation = flags.Input.isMC
22 V0Tools = acc.popToolsAndMerge(BPHY_V0ToolCfg(flags, BPHYDerivationName))
23 vkalvrt = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(flags, BPHYDerivationName)) # VKalVrt vertex fitter
24 acc.addPublicTool(vkalvrt)
25 acc.addPublicTool(V0Tools)
26 trackselect = acc.popToolsAndMerge(BPHY_InDetDetailedTrackSelectorToolCfg(flags, BPHYDerivationName))
27 acc.addPublicTool(trackselect)
28 vpest = acc.popToolsAndMerge(BPHY_VertexPointEstimatorCfg(flags, BPHYDerivationName))
29 acc.addPublicTool(vpest)
30
31 #====================================================================
32 # TriggerCounting for Kernel1
33 #====================================================================
34
35 BPHY21_triggerList = [
36 "HLT_2mu10",
37 "HLT_2mu10_nomucomb",
38 "HLT_2mu14",
39 "HLT_2mu14_nomucomb",
40 "HLT_mu18_mu8noL1",
41 "HLT_mu18_nomucomb_mu8noL1",
42 "HLT_mu20_mu8noL1",
43 "HLT_mu20_nomucomb_mu8noL1",
44 "HLT_mu22_mu8noL1",
45 "HLT_mu22_nomucomb_mu8noL1",
46 "HLT_mu20_mu8noL1",
47 "HLT_mu24_mu8noL1",
48 "HLT_mu10_mu6_bJpsimumu",
49 "HLT_mu22_mu8noL1_calotag_0eta010_L1MU1"
50 ]
51
52 BPHY21_JpsiFinder = CompFactory.Analysis.JpsiFinder(
53 name = "BPHY21_JpsiFinder",
54 muAndMu = True,
55 muAndTrack = False,
56 TrackAndTrack = False,
57 assumeDiMuons = True,
58 muonThresholdPt = 2700,
59 invMassUpper = 3400.0,
60 invMassLower = 2800.0,
61 Chi2Cut = 10.,
62 oppChargesOnly = True,
63 combOnly = True,
64 atLeastOneComb = False,
65 useCombinedMeasurement = False, # Only takes effect if combOnly=True
66 muonCollectionKey = "Muons",
67 TrackParticleCollection = "InDetTrackParticles",
68 V0VertexFitterTool = None, # V0 vertex fitter
69 useV0Fitter = False, # if False a TrkVertexFitterTool will be used
70 TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter
71 TrackSelectorTool = trackselect,
72 VertexPointEstimator = vpest,
73 useMCPCuts = False)
74 acc.addPublicTool(BPHY21_JpsiFinder)
75 BPHY21_JpsiSelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex(
76 name = "BPHY21_JpsiSelectAndWrite",
77 VertexSearchTool = BPHY21_JpsiFinder,
78 OutputVtxContainerName = "BPHY21_JpsiCandidates",
79 V0Tools = V0Tools,
80 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
81 PVContainerName = "PrimaryVertices",
82 RefPVContainerName = "SHOULDNOTBEUSED",
83 DoVertexType = 1)
84 BPHY21_Select_Jpsi2mumu = CompFactory.DerivationFramework.Select_onia2mumu(
85 name = "BPHY21_Select_Jpsi2mumu",
86 HypothesisName = "Jpsi",
87 InputVtxContainerName = "BPHY21_JpsiCandidates",
88 V0Tools = V0Tools,
89 VtxMassHypo = 3096.900,
90 MassMin = 2600.0,
91 MassMax = 3600.0,
92 Chi2Max = 200,
93 LxyMin = 0.1,
94 DoVertexType = 1)
95
96 BPHY21_AugOriginalCounts = acc.popToolsAndMerge(
97 AugOriginalCountsCfg(flags, name = "BPHY21_AugOriginalCounts"))
98
99 if not isSimulation: #Only Skim Data
100 BPHY21_TriggerSkim = CompFactory.DerivationFramework.TriggerSkimmingTool(name = "BPHY21_TriggerSkim",
101 TriggerListOR = BPHY21_triggerList)
102 BPHY21_SelectJpsiEvent = CompFactory.DerivationFramework.xAODStringSkimmingTool(
103 name = "BPHY21_SelectJpsiEvent",
104 expression = "count(BPHY21_JpsiCandidates.passed_Jpsi) > 0")
105
106 BPHY21_SkimmingOR = CompFactory.DerivationFramework.FilterCombinationOR("BPHY21_SkimmingOR",
107 FilterList = [ BPHY21_TriggerSkim, BPHY21_SelectJpsiEvent] )
108 acc.addPublicTool(BPHY21_SelectJpsiEvent)
109 acc.addPublicTool(BPHY21_TriggerSkim)
110 acc.addPublicTool(BPHY21_SkimmingOR)
111
112 augTools = [BPHY21_JpsiSelectAndWrite, BPHY21_Select_Jpsi2mumu,
113 BPHY21_AugOriginalCounts]
114 for t in augTools : acc.addPublicTool(t)
115
116 acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel("BPHY21Kernel",
117 AugmentationTools = augTools,
118 #Only skim if not MC
119 SkimmingTools = [BPHY21_SkimmingOR] if not isSimulation else [],
120 ThinningTools = []))
121 #====================================================================
122 # Slimming
123 #====================================================================
124 from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
125 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
126 from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
127 BPHY21_SlimmingHelper = SlimmingHelper("BPHY21_SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
128 from DerivationFrameworkBPhys.commonBPHYMethodsCfg import getDefaultAllVariables
129 BPHY21_AllVariables = getDefaultAllVariables()
130 BPHY21_StaticContent = []
131
132 # Needed for trigger objects
133 BPHY21_SlimmingHelper.IncludeMuonTriggerContent = True
134 BPHY21_SlimmingHelper.IncludeBPhysTriggerContent = True
135
136
137 BPHY21_AllVariables += ["PrimaryVertices"]
138 BPHY21_StaticContent += ["xAOD::VertexContainer#BPHY21_RefittedPrimaryVertices"]
139 BPHY21_StaticContent += ["xAOD::VertexAuxContainer#BPHY21_RefittedPrimaryVerticesAux."]
140
141
142 BPHY21_AllVariables += ["InDetTrackParticles"]
143
144
147 BPHY21_AllVariables += ["CombinedMuonTrackParticles"]
148 BPHY21_AllVariables += ["ExtrapolatedMuonTrackParticles"]
149
150
151 BPHY21_AllVariables += ["Muons"]
152
153
154
155 BPHY21_StaticContent += ["xAOD::VertexContainer#%s" % BPHY21_JpsiSelectAndWrite.OutputVtxContainerName]
156
157 BPHY21_StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY21_JpsiSelectAndWrite.OutputVtxContainerName]
158
159
160 # Tagging information (in addition to that already requested by usual algorithms)
161 #AllVariables += ["GSFTrackParticles", "MuonSpectrometerTrackParticles" ]
162
163 # Added by ASC
164 # Truth information for MC only
165 if isSimulation:
166 BPHY21_AllVariables += ["TruthEvents","TruthParticles","TruthVertices","MuonTruthParticles"]
167
168
169 BPHY21_AllVariables = list(set(BPHY21_AllVariables)) # remove duplicates
170 BPHY21_SlimmingHelper.AllVariables = BPHY21_AllVariables
171 BPHY21_SlimmingHelper.StaticContent = BPHY21_StaticContent
172 acc.merge(OutputStreamCfg(flags, "DAOD_BPHY21", ItemList=BPHY21_SlimmingHelper.GetItemList(), AcceptAlgs=["BPHY21Kernel"]))
173 acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_BPHY21", AcceptAlgs=["BPHY21Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
174 acc.printConfig(withDetails=True, summariseProps=True, onlyComponents = [], printDefaults=True)
175 return acc
STL class.

Variable Documentation

◆ BPHYDerivationName

str BPHY21.BPHYDerivationName = "BPHY21"

Definition at line 11 of file BPHY21.py.

◆ streamName

str BPHY21.streamName = "StreamDAOD_BPHY21"

Definition at line 12 of file BPHY21.py.