ATLAS Offline Software
Functions
LArClusterCellMonAlg Namespace Reference

Functions

def LArClusterCellMonConfig (flags)
 
def LArClusterCellMonConfigCore (helper, algclass, flags, isCosmics=False, TriggerStream='CosmicCalo', isMC=False, isOnline=False, algname='LArClusterCellMonAlg')
 

Function Documentation

◆ LArClusterCellMonConfig()

def LArClusterCellMonAlg.LArClusterCellMonConfig (   flags)

Definition at line 5 of file LArClusterCellMonAlg.py.

5 def LArClusterCellMonConfig(flags):
6 
7  from AthenaMonitoring.AthMonitorCfgHelper import AthMonitorCfgHelper
8  helper = AthMonitorCfgHelper(flags,'LArClusterCellMonAlgCfg')
9 
10  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
12 
13 
14  from LArGeoAlgsNV.LArGMConfig import LArGMCfg
15  cfg.merge(LArGMCfg(flags))
16  from TileGeoModel.TileGMConfig import TileGMCfg
17  cfg.merge(TileGMCfg(flags))
18 
19  from DetDescrCnvSvc.DetDescrCnvSvcConfig import DetDescrCnvSvcCfg
20  cfg.merge(DetDescrCnvSvcCfg(flags))
21 
22  from LArCellRec.LArCollisionTimeConfig import LArCollisionTimeCfg
23  cfg.merge(LArCollisionTimeCfg(flags))
24 
25 
26  from AthenaConfiguration.ComponentFactory import CompFactory
27  lArCellMonAlg=CompFactory.LArClusterCellMonAlg
28 
29  algname='LArClusterCellMonAlg'
30  from AthenaConfiguration.Enums import BeamType
31  if flags.Beam.Type is BeamType.Cosmics:
32  algname=algname+'Cosmics'
33 
34  algo = LArClusterCellMonConfigCore(helper, lArCellMonAlg, flags,
35  flags.Beam.Type is BeamType.Cosmics,
36  flags.Input.TriggerStream,
37  flags.Input.isMC, flags.Common.isOnline,
38  algname)
39  algo.useTrigger = flags.DQ.useTrigger
40 
41  #copied from LArClusterCellMonTool
42  algo.rndmTriggerNames = "L1_RD0, L1_RD0_FILLED, L1_RD0_EMPTY, L1_RD1, L1_RD1_NOISE, L1_RD1_HIST, L1_RD1_BGRP4, L1_RD1_BGRP5"
43  algo.caloTriggerNames = "L1_EM[0-9]+, L1_HA[0-9]+, L1_J[0-9]+.*, L1_JB[0-9]+, L1_JF[0-9]+, L1_TE[0-9]+, L1_JE[0-9]+, L1_XE[0-9]+, L1_2EM[0-9]+, L1_2FJ[0-9]+, L1_2J[0-9]+,L1_3J[0-9]+.*,L1_4J[0-9]+.*,L1_5J[0-9]+,L1_6J[0-9]+,L1_FJ[0-9]+.*"
44  algo.minBiasTriggerNames = "L1_RD0_FILLED, L1_MBTS_1, L1_MBTS_2, L1_MBTS_1_1"
45  algo.metTriggerNames = "EF_xe[0-9]+.*"
46  algo.miscTriggerNames = ""
47 
48  from AthenaMonitoring.AtlasReadyFilterConfig import AtlasReadyFilterCfg
49  algo.ReadyFilterTool = cfg.popToolsAndMerge(AtlasReadyFilterCfg(flags))
50 
51  if not flags.Input.isMC:
52  from AthenaMonitoring.BadLBFilterToolConfig import LArBadLBFilterToolCfg
53  algo.BadLBTool=cfg.popToolsAndMerge(LArBadLBFilterToolCfg(flags))
54 
55  cfg.merge(helper.result())
56 
57  return cfg
58 
59 

◆ LArClusterCellMonConfigCore()

def LArClusterCellMonAlg.LArClusterCellMonConfigCore (   helper,
  algclass,
  flags,
  isCosmics = False,
  TriggerStream = 'CosmicCalo',
  isMC = False,
  isOnline = False,
  algname = 'LArClusterCellMonAlg' 
)

Definition at line 60 of file LArClusterCellMonAlg.py.

60 def LArClusterCellMonConfigCore(helper, algclass, flags, isCosmics=False, TriggerStream='CosmicCalo', isMC=False, isOnline=False, algname='LArClusterCellMonAlg'):
61 
62 
63  LArClusterCellMonAlg = helper.addAlgorithm(algclass, algname)
64 
65  if not isCosmics and not isMC:
66  LArClusterCellMonAlg.useReadyFilterTool=True
67  else:
68  LArClusterCellMonAlg.useReadyFilterTool=False
69 
70  if isMC:
71  LArClusterCellMonAlg.useBadLBTool=False
72  else:
73  LArClusterCellMonAlg.useBadLBTool=True
74 
75  if isCosmics or TriggerStream!='physics_CosmicCalo':
76  LArClusterCellMonAlg.useBeamBackgroundRemoval = False
77  LArClusterCellMonAlg.useLArCollisionFilterTool = False
78  else:
79  LArClusterCellMonAlg.useBeamBackgroundRemoval = True
80  LArClusterCellMonAlg.useLArCollisionFilterTool = True
81 
82  if isOnline:
83  LArClusterCellMonAlg.useLArNoisyAlg = False
84  else:
85  LArClusterCellMonAlg.useLArNoisyAlg = True
86 
87  GroupName="LArClusterCell"
88  LArClusterCellMonAlg.MonGroupName = GroupName
89 
90  LArClusterCellMonAlg.EnableLumi = True
91 
92 
93  from CaloMonitoring.LArCellBinning import lArCellBinningScheme
94 
95  binlabels=["TotalEvents","ATLAS Ready","with Good LAr LB","with No LAr Collision","with No Beam Background", "with No Trigger Filter","with No LArError"]
96 
97  # triggers to use
98  LArClusterCellMonAlg.rndmTriggerNames = "L1_RD0, L1_RD0_FILLED, L1_RD0_EMPTY, L1_RD1, L1_RD1_NOISE, L1_RD1_HIST, L1_RD1_BGRP4, L1_RD1_BGRP5"
99  LArClusterCellMonAlg.caloTriggerNames = "L1_EM[0-9]+, L1_HA[0-9]+, L1_J[0-9]+.*, L1_JB[0-9]+, L1_JF[0-9]+, L1_TE[0-9]+, L1_JE[0-9]+, L1_XE[0-9]+, L1_2EM[0-9]+, L1_2FJ[0-9]+, L1_2J[0-9]+,L1_3J[0-9]+.*,L1_4J[0-9]+.*,L1_5J[0-9]+,L1_6J[0-9]+,L1_FJ[0-9]+.*"
100  LArClusterCellMonAlg.minBiasTriggerNames = "L1_RD0_FILLED, L1_MBTS_1, L1_MBTS_2, L1_MBTS_1_1"
101  LArClusterCellMonAlg.metTriggerNames = "EF_xe[0-9]+.*"
102  LArClusterCellMonAlg.miscTriggerNames = ""
103 
104  # Global Settings:
105 
106  #---single Group for non threshold histograms
107  cellMonGroup = helper.addGroup(
108  LArClusterCellMonAlg,
109  GroupName,
110  '/CaloMonitoring/LArClusterCellMon/'
111 
112  )
113 
114 
115  #--define histograms
116  # Summary
117  summ_hist_path='Summary/'
118 
119  from CaloMonitoring.CaloMonAlgBase import CaloBaseHistConfig
120  CaloBaseHistConfig(cellMonGroup,summ_hist_path,binlabels)
121 
122  cellMonGroup.defineHistogram('trigType;nEvtsByTrigger',
123  title='Total Events: bin 0, RNDM Trigger: 1, Calo Trigger: 2, MinBias Trigger: 3, MET Trigger: 4, Misc Trigger: 5, Events Accepted 6 ',
124  type='TH1I', path=summ_hist_path,
125  xbins=lArCellBinningScheme.larCellSummary["xbins"][0], xmin=lArCellBinningScheme.larCellSummary["xbins"][1], xmax=lArCellBinningScheme.larCellSummary["xbins"][2],
126  xlabels=lArCellBinningScheme.larCellSummary["xlabels"])
127 
128 
129  cellMonGroup.defineHistogram('eventCounter',
130  title='Events events passed Trigger and Background removal for each threshold (for normalisation)',
131  type='TH1I', path=summ_hist_path,
132  xbins=1
133  )
134 
135  cellMonGroup.defineHistogram('cellhash',
136  title='Total number of cells contributing to clusters, per online-hash',
137  type='TH1I', path=summ_hist_path,
138  xbins=195072,xmin=-0.5,xmax=195072.5
139  )
140 
141 
142 
143  for part in LArClusterCellMonAlg.LayerNames:
144  cellMonGroup.defineHistogram('celleta_'+part+',cellphi_'+part+';NClusteredCells_'+part,
145  title="Total number of cells contributing to clusters in (#eta,#phi) for "+part+";cell #eta;cell #phi",
146  weight='NClusteredCells_'+part,
147  type='TH2I', path="ClusterCell/",
148  xbins = lArCellBinningScheme.etaRange[part],
149  ybins = lArCellBinningScheme.phiRange[part]
150 )
151 
152  pass #part loop
153 
154 
155  return LArClusterCellMonAlg
156 
157 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
CaloMonAlgBase.CaloBaseHistConfig
def CaloBaseHistConfig(group, histpath, binlabels)
Definition: CaloMonAlgBase.py:5
python.DetDescrCnvSvcConfig.DetDescrCnvSvcCfg
def DetDescrCnvSvcCfg(flags, **kwargs)
Definition: DetDescrCnvSvcConfig.py:6
python.BadLBFilterToolConfig.LArBadLBFilterToolCfg
def LArBadLBFilterToolCfg(inputFlags, origDbTag=None)
Definition: BadLBFilterToolConfig.py:100
CaloMonitoring::LArCellBinning
Definition: LArCellBinning.h:21
LArGMConfig.LArGMCfg
def LArGMCfg(flags)
Definition: LArGMConfig.py:8
python.AtlasReadyFilterConfig.AtlasReadyFilterCfg
def AtlasReadyFilterCfg(flags)
Definition: AtlasReadyFilterConfig.py:10
LArClusterCellMonAlg.LArClusterCellMonConfigCore
def LArClusterCellMonConfigCore(helper, algclass, flags, isCosmics=False, TriggerStream='CosmicCalo', isMC=False, isOnline=False, algname='LArClusterCellMonAlg')
Definition: LArClusterCellMonAlg.py:60
LArClusterCellMonAlg.LArClusterCellMonConfig
def LArClusterCellMonConfig(flags)
Definition: LArClusterCellMonAlg.py:5
LArCollisionTimeConfig.LArCollisionTimeCfg
def LArCollisionTimeCfg(configFlags, cutIteration=False)
Definition: LArCollisionTimeConfig.py:8
TileGMConfig.TileGMCfg
def TileGMCfg(flags)
Definition: TileGMConfig.py:7