ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
L1JetMonitoringConfig.L1JetMonAlg Class Reference
Collaboration diagram for L1JetMonitoringConfig.L1JetMonAlg:

Public Member Functions

def __init__ (self, name, jetColl, jetCollKey='', triggerChain='', matched=False, matchedOfflineJets='', matchedHLTJets='')
 
def __str__ (self)
 
def toAlg (self, monhelper)
 

Public Attributes

 name
 
 L1JetContainer
 
 L1JetKey
 
 triggerChain
 
 matched
 
 matchedOJ
 
 matchedHLTJ
 

Detailed Description

Definition at line 3 of file L1JetMonitoringConfig.py.

Constructor & Destructor Documentation

◆ __init__()

def L1JetMonitoringConfig.L1JetMonAlg.__init__ (   self,
  name,
  jetColl,
  jetCollKey = '',
  triggerChain = '',
  matched = False,
  matchedOfflineJets = '',
  matchedHLTJets = '' 
)

Definition at line 4 of file L1JetMonitoringConfig.py.

4  def __init__(self,
5  name,
6  jetColl,
7  jetCollKey='', # actual jet collection name to use for SG retrieval, in case different to original jet container
8  # (as can be the case for copied containers on which jet matching applied)
9  triggerChain='',
10  matched=False,
11  matchedOfflineJets='',
12  matchedHLTJets=''):
13 
14  self.name = name
15  self.L1JetContainer = jetColl
16  self.L1JetKey = jetColl if jetCollKey == '' else jetCollKey
17  self.triggerChain = triggerChain
18  self.matched = matched
19  # self.matched = False
20  self.matchedOJ = matchedOfflineJets
21  self.matchedHLTJ = matchedHLTJets
22 

Member Function Documentation

◆ __str__()

def L1JetMonitoringConfig.L1JetMonAlg.__str__ (   self)

Definition at line 23 of file L1JetMonitoringConfig.py.

23  def __str__(self):
24  text = ' '.join(['%s: %s' % (str(k), str(v)) for k, v in self.__dict__.items()])
25  return self.__class__.__name__ + ':: ' + text
26 
27 

◆ toAlg()

def L1JetMonitoringConfig.L1JetMonAlg.toAlg (   self,
  monhelper 
)

Definition at line 28 of file L1JetMonitoringConfig.py.

28  def toAlg(self,monhelper):
29  from AthenaConfiguration.ComponentFactory import CompFactory
30 
31  jFexSR = self.L1JetContainer == 'L1_jFexSRJetRoI'
32  jFexLR = self.L1JetContainer == 'L1_jFexLRJetRoI'
33  gFexSR = self.L1JetContainer == 'L1_gFexSRJetRoI'
34  gFexLR = self.L1JetContainer == 'L1_gFexLRJetRoI'
35 
36  noFex = self.L1JetContainer == 'LVL1JetRoIs'
37 
38  L1Fex = jFexSR or jFexLR or gFexSR or gFexLR
39 
40  assert L1Fex or noFex, 'unsupported L1Container %s' % self.L1JetContainer
41 
42  def container2tool_class_name():
43 
44  # Note: there are two gFex names, both correspond to the
45  # same container type.
46 
47  # The strangeness of the class names in the following dict are
48  # due to them arising from template instantiations.
49  # They can be found in the TrigJetMonitoringConf.py module
50  # which is constructed at build time.
51  return {
52  'L1_jFexSRJetRoI': 'TrigL1FexJetMonitorTool_JTM_jFexSRJetRoIContainer_',
53  'L1_jFexLRJetRoI': 'TrigL1FexJetMonitorTool_JTM_jFexLRJetRoIContainer_',
54  'L1_gFexSRJetRoI': 'TrigL1FexJetMonitorTool_JTM_gFexJetRoIContainer_',
55  'L1_gFexLRJetRoI': 'TrigL1FexJetMonitorTool_JTM_gFexJetRoIContainer_',
56  'LVL1JetRoIs': 'TrigL1FexJetMonitorTool_JTM_JetRoIContainer_',
57  }[self.L1JetContainer]
58 
59  def container2tool_inst_name():
60 
61  return {'L1_jFexSRJetRoI': 'jFexSRDataRetriever',
62  'L1_jFexLRJetRoI': 'jFexLRDataRetriever',
63  'L1_gFexSRJetRoI': 'gFexSRDataRetriever',
64  'L1_gFexLRJetRoI': 'gFexLRDataRetriever',
65  'LVL1JetRoIs': 'JetRoIDataRetriever',
66  }[self.L1JetContainer]
67 
68 
69  def container2_monitorgroup():
70 
71  return {'L1_jFexSRJetRoI': 'TrigL1JFexSRJetMonitor',
72  'L1_jFexLRJetRoI': 'TrigL1JFexLRJetMonitor',
73  'L1_gFexSRJetRoI': 'TrigL1GFexSRJetMonitor',
74  'L1_gFexLRJetRoI': 'TrigL1GFexLRJetMonitor',
75  'LVL1JetRoIs': 'TrigL1JetMonitor'}[self.L1JetContainer]
76 
77 
78  alg = monhelper.addAlgorithm(CompFactory.TrigL1FexJetMonitorAlgorithm,
79  self.name)
80  toolClass = getattr(CompFactory, container2tool_class_name())
81 
82  tool = toolClass(container2tool_inst_name())
83  tool.do_matching = self.matched
84  tool.offlineJetsToMatch = self.matchedOJ
85  tool.HLTJetsToMatch = self.matchedHLTJ
86  tool.l1container = self.L1JetKey
87  alg.group_name = container2_monitorgroup()
88  alg.filler = tool
89  alg.TriggerChain = self.triggerChain
90 
91  # Add a generic monitoring tool (a "group" in old language). The returned
92  # object here is the standard GenericMonitoringTool
93 
94  Path = self.L1JetContainer+'/'
95  Path += 'NoTriggerSelection/' if self.triggerChain == '' else self.triggerChain+'/'
96  myGroup = monhelper.addGroup(alg, container2_monitorgroup(),'HLT/JetMon/L1/')
97 
98  if L1Fex:
99  myGroup.defineHistogram('et',title='et',path=Path,xbins=400,xmin=0.0,xmax=400.0)
100  else:
101  myGroup.defineHistogram('et8x8',title='et8x8',path=Path,xbins=400,xmin=0.0,xmax=400.0)
102 
103 
104  myGroup.defineHistogram('eta',title='eta',path=Path,xbins=50,xmin=-5,xmax=5)
105  myGroup.defineHistogram('phi',title='phi',path=Path,xbins=50,xmin=-3.3,xmax=3.3)
106 
107  if self.matched:
108  for matchcoll,tag in [ [self.matchedOJ, 'off'], [self.matchedHLTJ, 'hlt'] ]:
109  Path = self.L1JetContainer + '/NoTriggerSelection/MatchedJets_' + matchcoll + '/'
110 
111  # define which variable difference will be plotted,
112  # mass difference makes no sense for L1 as m=0
113  for histname in [ 'ptdiff', 'energydiff' ]:
114  myGroup.defineHistogram(tag+histname+';'+histname,
115  title=histname, type="TH1F", path=Path,
116  xbins=140 , xmin=-120000., xmax=80000. ,)
117 
118  for histname in [ 'ptresp', 'energyresp' ]:
119  myGroup.defineHistogram(tag+histname+';'+histname,
120  title=histname,
121  type="TH1F", path=Path,
122  xbins=100 , xmin=-1., xmax=2. ,)
123 
124  myGroup.defineHistogram(tag+'ptresp,'+tag+'ptref;ptresp_vs_ptRef',
125  title='ptresponse vs ptRef', type="TH2F", path=Path,
126  xbins=10 , xmin=-1., xmax=2.,
127  ybins=10, ymin=0., ymax=500000.,)
128 
129  myGroup.defineHistogram(tag+'ptresp,'+tag+'etaref;ptresp_vs_etaRef',
130  title='ptresponse vs etaRef', type="TH2F", path=Path,
131  xbins=10, xmin=-1., xmax=2.,
132  ybins=10, ymin=-5., ymax=5.,)
133 
134 
135  return alg

Member Data Documentation

◆ L1JetContainer

L1JetMonitoringConfig.L1JetMonAlg.L1JetContainer

Definition at line 7 of file L1JetMonitoringConfig.py.

◆ L1JetKey

L1JetMonitoringConfig.L1JetMonAlg.L1JetKey

Definition at line 8 of file L1JetMonitoringConfig.py.

◆ matched

L1JetMonitoringConfig.L1JetMonAlg.matched

Definition at line 10 of file L1JetMonitoringConfig.py.

◆ matchedHLTJ

L1JetMonitoringConfig.L1JetMonAlg.matchedHLTJ

Definition at line 13 of file L1JetMonitoringConfig.py.

◆ matchedOJ

L1JetMonitoringConfig.L1JetMonAlg.matchedOJ

Definition at line 12 of file L1JetMonitoringConfig.py.

◆ name

L1JetMonitoringConfig.L1JetMonAlg.name

Definition at line 6 of file L1JetMonitoringConfig.py.

◆ triggerChain

L1JetMonitoringConfig.L1JetMonAlg.triggerChain

Definition at line 9 of file L1JetMonitoringConfig.py.


The documentation for this class was generated from the following file:
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
str
Definition: BTagTrackIpAccessor.cxx:11