ATLAS Offline Software
Classes | Functions | Variables
LArCellBinning_test Namespace Reference

Classes

class  CreateDataAlg
 

Functions

def checkHistoBinning (filename, runnumber)
 
def testCfg (flags)
 

Variables

 flags = initConfigFlags()
 
 Files
 
 AtlasVersion
 
 GlobalTag
 
 HISTFileName
 
 useTrigger
 
 acc = MainServicesCfg(flags)
 
 sc = acc.run(1)
 
def retval = checkHistoBinning(flags.Output.HISTFileName,431493)
 

Function Documentation

◆ checkHistoBinning()

def LArCellBinning_test.checkHistoBinning (   filename,
  runnumber 
)

Definition at line 8 of file LArCellBinning_test.py.

8 def checkHistoBinning(filename,runnumber):
9  nMultipleHits=0
10  nNoHit=0
11  f=ROOT.TFile.Open(filename)
12  layers=["EMBPA", "EMBPC", "EMB1A", "EMB1C", "EMB2A", "EMB2C", "EMB3A", "EMB3C",
13  "HEC0A", "HEC0C", "HEC1A", "HEC1C", "HEC2A", "HEC2C", "HEC3A", "HEC3C",
14  "EMECPA", "EMECPC", "EMEC1A", "EMEC1C", "EMEC2A", "EMEC2C", "EMEC3A", "EMEC3C",
15  "FCAL1A", "FCAL1C", "FCAL2A", "FCAL2C", "FCAL3A", "FCAL3C"]
16 
17 
18  for layer in layers:
19  histpath="run_%i/CaloMonitoring/LArCellMon_NoTrigSel/2d_Occupancy/CellOccupancyVsEtaPhi_%s_noEth_rndm_CSCveto"%(runnumber,layer)
20  hist=f.Get(histpath)
21  print ("Checking Histogram",hist)
22  print ("\tBinning x:",hist.GetNbinsX(),"y:",hist.GetNbinsY())
23  for x in range (hist.GetNbinsX()):
24  for y in range (hist.GetNbinsY()):
25  n=hist.GetBinContent(x,y)
26  if (n>1):
27  print ("ERROR multiple hits in ",layer,x,y,n)
28  nMultipleHits+=1
29  elif (n!=1):
30  nNoHit+=1
31  print ("WARNING no hit in ", layer,x,y,n)
32  print ("Summary")
33  print ("\tNumber of bins not corresponding to any cell:",nNoHit)
34  print ("\tNumber of bins corresponding to multiple cells:",nMultipleHits)
35 
36  return nMultipleHits
37 

◆ testCfg()

def LArCellBinning_test.testCfg (   flags)

Definition at line 57 of file LArCellBinning_test.py.

57 def testCfg (flags):
58  result = ComponentAccumulator()
59 
60  from LArGeoAlgsNV.LArGMConfig import LArGMCfg
61  from TileGeoModel.TileGMConfig import TileGMCfg
62  result.merge(LArGMCfg(flags))
63  result.merge(TileGMCfg(flags))
64 
65  from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg
66  result.merge(LArOnOffIdMappingCfg(flags))
67 
68  result.addEventAlgo (CreateDataAlg ('CreateDataAlg'),sequenceName="AthAlgSeq")
69  from CaloMonitoring.LArCellMonAlg import LArCellMonConfig
70  result.merge( LArCellMonConfig(flags) )
71 
72  alg=result.getEventAlgo("LArCellMonAlg")
73  alg.useReadyFilterTool=False
74  alg.useBadLBTool=False
75  alg.useLArCollisionFilterTool=False
76  alg.useLArNoisyAlg=False
77  alg.useBeamBackgroundRemoval=False
78  return result
79 
80 

Variable Documentation

◆ acc

LArCellBinning_test.acc = MainServicesCfg(flags)

Definition at line 93 of file LArCellBinning_test.py.

◆ AtlasVersion

LArCellBinning_test.AtlasVersion

Definition at line 86 of file LArCellBinning_test.py.

◆ Files

LArCellBinning_test.Files

Definition at line 85 of file LArCellBinning_test.py.

◆ flags

LArCellBinning_test.flags = initConfigFlags()

Definition at line 84 of file LArCellBinning_test.py.

◆ GlobalTag

LArCellBinning_test.GlobalTag

Definition at line 87 of file LArCellBinning_test.py.

◆ HISTFileName

LArCellBinning_test.HISTFileName

Definition at line 88 of file LArCellBinning_test.py.

◆ retval

def LArCellBinning_test.retval = checkHistoBinning(flags.Output.HISTFileName,431493)

Definition at line 112 of file LArCellBinning_test.py.

◆ sc

LArCellBinning_test.sc = acc.run(1)

Definition at line 108 of file LArCellBinning_test.py.

◆ useTrigger

LArCellBinning_test.useTrigger

Definition at line 89 of file LArCellBinning_test.py.

python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
LArCablingConfig.LArOnOffIdMappingCfg
def LArOnOffIdMappingCfg(configFlags)
Definition: LArCablingConfig.py:62
LArGMConfig.LArGMCfg
def LArGMCfg(flags)
Definition: LArGMConfig.py:8
LArCellBinning_test.testCfg
def testCfg(flags)
Definition: LArCellBinning_test.py:57
LArCellBinning_test.checkHistoBinning
def checkHistoBinning(filename, runnumber)
Definition: LArCellBinning_test.py:8
LArCellMonAlg.LArCellMonConfig
def LArCellMonConfig(flags)
Definition: LArCellMonAlg.py:5
TileGMConfig.TileGMCfg
def TileGMCfg(flags)
Definition: TileGMConfig.py:7