Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Functions | Variables
FPGAOutputValidationConfig Namespace Reference

Functions

def FPGAOutputValidationCfg (flags, **kwargs)
 

Variables

 argumentParser
 
 default
 
 action
 
 required
 
 arguments
 
 flags
 
 NumThreads
 
 Files
 
 AODFileName
 
 acc
 

Function Documentation

◆ FPGAOutputValidationCfg()

def FPGAOutputValidationConfig.FPGAOutputValidationCfg (   flags,
**  kwargs 
)

Definition at line 3 of file FPGAOutputValidationConfig.py.

3 def FPGAOutputValidationCfg(flags, **kwargs):
4  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6 
7  kwargs.setdefault("pixelKeys", [])
8  kwargs.setdefault("stripKeys", [])
9  kwargs.setdefault("doDiffHistograms", False)
10  kwargs.setdefault("matchByID", False)
11  kwargs.setdefault("allowedRdoMisses", 0)
12 
13  from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
14  monitoringTool = GenericMonitoringTool(flags, 'FPGAOutputValidationMonitoringTool')
15  monitoringTool.HistPath = "/"
16 
17  if len(kwargs["pixelKeys"]) == 2 and kwargs["doDiffHistograms"]:
18  key0 = kwargs["pixelKeys"][0]
19  key1 = kwargs["pixelKeys"][1]
20  name = f"{key0} - {key1}"
21  monitoringTool.defineHistogram("nmatched_pixel_clusters", path = "FPGAOutputValidation", type = "TH1I", title = f"{name}: number of matched clusters", xbins = 100, xmin=0, xmax = 100)
22  monitoringTool.defineHistogram("diff_pixel_locx",path = "FPGAOutputValidation", type = "TH1F", title = f"{name}:locx;Local position x;", xbins = 200, xmin = -0.2, xmax = 0.2)
23  monitoringTool.defineHistogram("diff_pixel_locy",path = "FPGAOutputValidation", type = "TH1F", title = f"{name}:locy;Local position y;", xbins = 200, xmin = -0.2, xmax = 0.2)
24  monitoringTool.defineHistogram("diff_pixel_covxx",path = "FPGAOutputValidation", type = "TH1F", title = f"{name}:covxx;Local covariance xx;", xbins = 100, xmin = -0.1, xmax = 0.1)
25  monitoringTool.defineHistogram("diff_pixel_covyy",path = "FPGAOutputValidation", type = "TH1F", title = f"{name}:covyy;Local covariance yy;", xbins = 100, xmin = -0.1, xmax = 0.1)
26  monitoringTool.defineHistogram("diff_pixel_globalx",path = "FPGAOutputValidation", type = "TH1F", title = f"{name}:globalx;Global position x;", xbins = 200, xmin = -0.05, xmax = 0.05)
27  monitoringTool.defineHistogram("diff_pixel_globaly",path = "FPGAOutputValidation", type = "TH1F", title = f"{name}:globaly;Global position y;", xbins = 200, xmin = -0.05, xmax = 0.05)
28  monitoringTool.defineHistogram("diff_pixel_globalz",path = "FPGAOutputValidation", type = "TH1F", title = f"{name}:globalz;Global position z;", xbins = 200, xmin = -0.05, xmax = 0.05)
29  monitoringTool.defineHistogram("diff_pixel_omegax",path = "FPGAOutputValidation", type = "TH1F", title = f"{name}:omegax;Omega x;", xbins = 200, xmin = -1, xmax = 1)
30  monitoringTool.defineHistogram("diff_pixel_omegay",path = "FPGAOutputValidation", type = "TH1F", title = f"{name}:omegay;Omega y;", xbins = 200, xmin = -1, xmax = 1)
31  monitoringTool.defineHistogram("diff_pixel_channelsphi", path = "FPGAOutputValidation", type = "TH1F", title = f"{name}:channels in phi;Channels in #phi;", xbins = 10, xmin = -5, xmax = 5)
32  monitoringTool.defineHistogram("diff_pixel_channelseta", path = "FPGAOutputValidation", type = "TH1F", title = f"{name}:channels in eta;Channels in #eta;", xbins = 10, xmin = -5, xmax = 5)
33  monitoringTool.defineHistogram("diff_pixel_widtheta", path = "FPGAOutputValidation", type = "TH1F", title = f"{name}:width in eta;Channels in #phi;", xbins = 10, xmin = -5, xmax = 5)
34  monitoringTool.defineHistogram("diff_pixel_tot", path = "FPGAOutputValidation", type = "TH1F", title = f"{name}:tot;Total TOT;", xbins = 200, xmin = -1, xmax = 1)
35 
36  if len(kwargs["stripKeys"]) == 2 and kwargs["doDiffHistograms"]:
37  key0 = kwargs["stripKeys"][0]
38  key1 = kwargs["stripKeys"][1]
39  name = f"{key0} - {key1}"
40  monitoringTool.defineHistogram("nmatched_strip_clusters", path = "FPGAOutputValidation", type = "TH1I", title = f"{name}: number of matched clusters", xbins = 100, xmin=0, xmax = 100)
41  monitoringTool.defineHistogram("diff_strip_locx",path = "FPGAOutputValidation", type = "TH1F", title = f"{name}:locx;Local position x;", xbins = 200, xmin = -0.2, xmax = 0.2)
42  monitoringTool.defineHistogram("diff_strip_covxx",path = "FPGAOutputValidation", type = "TH1F", title = f"{name}:covxx;Local covariance xx;", xbins = 100, xmin = -0.1, xmax = 0.1)
43  monitoringTool.defineHistogram("diff_strip_globalx",path = "FPGAOutputValidation", type = "TH1F", title = f"{name}:globalx;Global position x;", xbins = 200, xmin = -0.05, xmax = 0.05)
44  monitoringTool.defineHistogram("diff_strip_globaly",path = "FPGAOutputValidation", type = "TH1F", title = f"{name}:globaly;Global position y;", xbins = 200, xmin = -0.05, xmax = 0.05)
45  monitoringTool.defineHistogram("diff_strip_globalz",path = "FPGAOutputValidation", type = "TH1F", title = f"{name}:globalz;Global position z;", xbins = 200, xmin = -0.05, xmax = 0.05)
46  monitoringTool.defineHistogram("diff_strip_channelsphi", path = "FPGAOutputValidation", type = "TH1F", title = f"{name}:channels in phi;Channels in #phi;", xbins = 10, xmin = -5, xmax = 5)
47 
48  for key in kwargs["pixelKeys"]:
49  monitoringTool.defineHistogram(f"{key}_LOCALPOSITION_X", path = "FPGAOutputValidation", type = "TH1F", title = f"{key}_LOCALPOSITION_X;Local position x;", xbins = 200, xmin = -40, xmax = 40)
50  monitoringTool.defineHistogram(f"{key}_LOCALPOSITION_Y", path = "FPGAOutputValidation", type = "TH1F", title = f"{key}_LOCALPOSITION_Y;Local position y;", xbins = 200, xmin = -40, xmax = 40)
51 
52  monitoringTool.defineHistogram(f"{key}_LOCALCOVARIANCE_XX", path = "FPGAOutputValidation", type = "TH1F", title = f"{key}_LOCALCOVARIANCE_XX;Local covariance xx;", xbins = 100, xmin = 0, xmax = 1)
53  monitoringTool.defineHistogram(f"{key}_LOCALCOVARIANCE_YY", path = "FPGAOutputValidation", type = "TH1F", title = f"{key}_LOCALCOVARIANCE_YY;Local covariance yy;", xbins = 100, xmin = 0, xmax = 1)
54 
55  monitoringTool.defineHistogram(f"{key}_GLOBALPOSITION_X", path = "FPGAOutputValidation", type = "TH1F", title = f"{key}_GLOBALPOSITION_X;Global position x [mm];", xbins = 200, xmin = -350, xmax = 350)
56  monitoringTool.defineHistogram(f"{key}_GLOBALPOSITION_Y", path = "FPGAOutputValidation", type = "TH1F", title = f"{key}_GLOBALPOSITION_Y;Global position y [mm];", xbins = 200, xmin = -350, xmax = 350)
57  monitoringTool.defineHistogram(f"{key}_GLOBALPOSITION_Z", path = "FPGAOutputValidation", type = "TH1F", title = f"{key}_GLOBALPOSITION_Z;Global position z [mm];", xbins = 200, xmin = -3000, xmax =3000)
58 
59  monitoringTool.defineHistogram(f"{key}_OMEGA_X", path = "FPGAOutputValidation", type = "TH1F", title = f"{key}_OMEGA_X;Omega X;", xbins = 100, xmin = 0, xmax = 1)
60  monitoringTool.defineHistogram(f"{key}_OMEGA_Y", path = "FPGAOutputValidation", type = "TH1F", title = f"{key}_OMEGA_Y;Omega Y;", xbins = 100, xmin = 0, xmax = 1)
61 
62  monitoringTool.defineHistogram(f"{key}_CHANNELS_IN_PHI", path = "FPGAOutputValidation", type = "TH1F", title = f"{key}_CHANNELS_IN_PHI;Channels in #phi;", xbins = 100, xmin = 0, xmax = 100)
63  monitoringTool.defineHistogram(f"{key}_CHANNELS_IN_ETA", path = "FPGAOutputValidation", type = "TH1F", title = f"{key}_CHANNELS_IN_ETA;Channels in #eta;", xbins = 100, xmin = 0, xmax = 100)
64 
65  monitoringTool.defineHistogram(f"{key}_WIDTH_IN_ETA", path = "FPGAOutputValidation", type = "TH1F", title = f"{key}_WIDTH_IN_ETA;Width in #eta;", xbins = 100, xmin = 0, xmax = 1)
66 
67  monitoringTool.defineHistogram(f"{key}_TOTAL_TOT", path = "FPGAOutputValidation", type = "TH1F", title = f"{key}_TOTAL_TOT;Total ToT;", xbins = 100, xmin = 0, xmax = 100)
68 
69  for key in kwargs["stripKeys"]:
70  monitoringTool.defineHistogram(f"{key}_LOCALPOSITION_X", path = "FPGAOutputValidation", type = "TH1F", title = f"{key}_LOCALPOSITION_X;Local position x;", xbins = 200, xmin = -100, xmax = 100)
71  # monitoringTool.defineHistogram(f"{key}_LOCALPOSITION_Y", path = "FPGAOutputValidation", type = "TH1F", title = f"{key}_LOCALPOSITION_Y", xbins = 200, xmin = -100, xmax = 100)
72 
73  monitoringTool.defineHistogram(f"{key}_LOCALCOVARIANCE_XX", path = "FPGAOutputValidation", type = "TH1F", title = f"{key}_LOCALCOVARIANCE_XX;Local covariance xx;", xbins = 100, xmin = 0, xmax = 1)
74 
75  monitoringTool.defineHistogram(f"{key}_GLOBALPOSITION_X", path = "FPGAOutputValidation", type = "TH1F", title = f"{key}_GLOBALPOSITION_X;Global position x [mm];", xbins = 200, xmin = -1024, xmax = 1024)
76  monitoringTool.defineHistogram(f"{key}_GLOBALPOSITION_Y", path = "FPGAOutputValidation", type = "TH1F", title = f"{key}_GLOBALPOSITION_Y;Global position y [mm];", xbins = 200, xmin = -1024, xmax = 1024)
77  monitoringTool.defineHistogram(f"{key}_GLOBALPOSITION_Z", path = "FPGAOutputValidation", type = "TH1F", title = f"{key}_GLOBALPOSITION_Z;Global position z [mm];", xbins = 200, xmin = -3000, xmax = 3000)
78 
79  monitoringTool.defineHistogram(f"{key}_CHANNELS_IN_PHI", path = "FPGAOutputValidation", type = "TH1F", title = f"{key}_CHANNELS_IN_PHI;Channels in #phi;", xbins = 100, xmin = 0, xmax = 100)
80 
81  from AthenaConfiguration.ComponentFactory import CompFactory
82  FPGAOutputValidationAlg = CompFactory.FPGAOutputValidationAlg(
83  "FPGAOutputValidationAlg",
84  **kwargs
85  )
86 
87  FPGAOutputValidationAlg.monitoringTool = monitoringTool
88  acc.addEventAlgo(FPGAOutputValidationAlg)
89 
90  acc.addService(CompFactory.THistSvc(
91  Output=["FPGAOutputValidation DATAFILE='FPGAOutputValidation.root', OPT='RECREATE'"]
92  ))
93 
94  return acc
95 

Variable Documentation

◆ acc

FPGAOutputValidationConfig.acc

Definition at line 116 of file FPGAOutputValidationConfig.py.

◆ action

FPGAOutputValidationConfig.action

Definition at line 101 of file FPGAOutputValidationConfig.py.

◆ AODFileName

FPGAOutputValidationConfig.AODFileName

Definition at line 112 of file FPGAOutputValidationConfig.py.

◆ argumentParser

FPGAOutputValidationConfig.argumentParser

Definition at line 100 of file FPGAOutputValidationConfig.py.

◆ arguments

FPGAOutputValidationConfig.arguments

Definition at line 107 of file FPGAOutputValidationConfig.py.

◆ default

FPGAOutputValidationConfig.default

Definition at line 101 of file FPGAOutputValidationConfig.py.

◆ Files

FPGAOutputValidationConfig.Files

Definition at line 111 of file FPGAOutputValidationConfig.py.

◆ flags

FPGAOutputValidationConfig.flags

Definition at line 109 of file FPGAOutputValidationConfig.py.

◆ NumThreads

FPGAOutputValidationConfig.NumThreads

Definition at line 110 of file FPGAOutputValidationConfig.py.

◆ required

FPGAOutputValidationConfig.required

Definition at line 101 of file FPGAOutputValidationConfig.py.

python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
GenericMonitoringTool
Definition: GenericMonitoringTool.h:53
FPGAOutputValidationConfig.FPGAOutputValidationCfg
def FPGAOutputValidationCfg(flags, **kwargs)
Definition: FPGAOutputValidationConfig.py:3