ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
PixelAthMonitoringBase::VecAccumulator2DMap Struct Reference

helper class to accumulate points to fill a 2D plot with More...

#include <PixelAthMonitoringBase.h>

Collaboration diagram for PixelAthMonitoringBase::VecAccumulator2DMap:

Public Member Functions

 VecAccumulator2DMap (const PixelAthMonitoringBase &host, const std::string &prof2Dname, bool copy2DFEval=false)
 
void add (const int layer, const Identifier &id, float value=1.0)
 helper class to accumulate points to fill a 2D per-module plot with More...
 
void add (const int layer, const Identifier &id, int iFE, float value)
 helper class to accumulate points to fill a 2D per-FE plot with More...
 

Public Attributes

std::unordered_map< int, std::vector< int > > m_pm
 
std::unordered_map< int, std::vector< int > > m_em
 
std::unordered_map< int, std::vector< float > > m_val
 
const PixelAthMonitoringBasem_host
 
std::string m_prof2Dname
 
bool m_copy2DFEval
 

Detailed Description

helper class to accumulate points to fill a 2D plot with

Definition at line 104 of file PixelAthMonitoringBase.h.

Constructor & Destructor Documentation

◆ VecAccumulator2DMap()

PixelAthMonitoringBase::VecAccumulator2DMap::VecAccumulator2DMap ( const PixelAthMonitoringBase host,
const std::string &  prof2Dname,
bool  copy2DFEval = false 
)
inline

Definition at line 112 of file PixelAthMonitoringBase.h.

113  : m_host(host),
114  m_prof2Dname(prof2Dname),
115  m_copy2DFEval(copy2DFEval) {}

Member Function Documentation

◆ add() [1/2]

void PixelAthMonitoringBase::VecAccumulator2DMap::add ( const int  layer,
const Identifier id,
float  value = 1.0 
)

helper class to accumulate points to fill a 2D per-module plot with

Definition at line 16 of file PixelAthMonitoringBase.cxx.

17  {
18  m_pm[layer].push_back(m_host.m_pixelid->phi_module(id));
19  int ld = m_host.m_pixelid->layer_disk(id);
20  int em = ld;
21  m_val[layer].push_back(value);
22 
23  bool copy = false;
24  if (m_host.m_pixelid->barrel_ec(id) == 0) {
25  em = m_host.m_pixelid->eta_module(id);
26  if (ld == 0) {
27  int feid = 0;
28  int emf = 0;
29  if (em < -6) {
30  emf = em - 6;
31  } else if (em > -7 && em < 6) {
32  if (m_host.m_pixelid->eta_index(id) >= 80) feid = 1;
33  emf = 2 * em + feid;
34  copy = true;
35  } else {
36  emf = em + 6;
37  }
38  em = emf;
39  }
40  }
41  m_em[layer].push_back(em);
42 
43  if (m_copy2DFEval && copy) {
44  ++em;
45  m_pm[layer].push_back(m_host.m_pixelid->phi_module(id));
46  m_em[layer].push_back(em);
47  m_val[layer].push_back(value);
48  }
49 }

◆ add() [2/2]

void PixelAthMonitoringBase::VecAccumulator2DMap::add ( const int  layer,
const Identifier id,
int  iFE,
float  value 
)

helper class to accumulate points to fill a 2D per-FE plot with

Definition at line 55 of file PixelAthMonitoringBase.cxx.

56  {
57  // value
58  m_val[layer].push_back(value);
59 
60  // for old pixel see https://twiki.cern.ch/twiki/pub/Atlas/PixelCOOLoffline/pixel_modules_sketch.png
61  //
62  // phi (Y) coordinate
63  if (layer == PixLayers::kIBL) m_pm[layer].push_back(m_host.m_pixelid->phi_module(id));
64  else {
65  if ((layer == PixLayers::kECA || layer == PixLayers::kECC) && (m_host.m_pixelid->phi_module(id) % 2 == 0)) {
66  // even disk modules
67  m_pm[layer].push_back(m_host.m_pixelid->phi_module(id) * 2 + iFE / 8);
68  } else {
69  m_pm[layer].push_back(m_host.m_pixelid->phi_module(id) * 2 + 1 - iFE / 8);
70  }
71  }
72  // eta (X) coordinate
73  int ld = m_host.m_pixelid->layer_disk(id);
74  int em(0);
75  // endcaps
76  em = ld * 8;
77  if (iFE < 8) em += (7 - iFE % 8);
78  else em += iFE % 8;
79 
80  // barrel
81  //
82  if (m_host.m_pixelid->barrel_ec(id) == 0) {
83  if (ld == 0) { //ibl
84  em = m_host.m_pixelid->eta_module(id);
85  int emf;
86  if (em < -6) {
87  emf = em - 6;
88  } else if (em > -7 && em < 6) {
89  emf = 2 * em + iFE;
90  } else {
91  emf = em + 6;
92  }
93  em = emf;
94  } else {
95  em = m_host.m_pixelid->eta_module(id) * 8 - 4;
96  if (iFE < 8) em += (7 - iFE % 8);
97  else em += iFE % 8;
98  }
99  } // end barrel
100  m_em[layer].push_back(em);
101 }

Member Data Documentation

◆ m_copy2DFEval

bool PixelAthMonitoringBase::VecAccumulator2DMap::m_copy2DFEval

Definition at line 110 of file PixelAthMonitoringBase.h.

◆ m_em

std::unordered_map<int, std::vector<int> > PixelAthMonitoringBase::VecAccumulator2DMap::m_em

Definition at line 106 of file PixelAthMonitoringBase.h.

◆ m_host

const PixelAthMonitoringBase& PixelAthMonitoringBase::VecAccumulator2DMap::m_host

Definition at line 108 of file PixelAthMonitoringBase.h.

◆ m_pm

std::unordered_map<int, std::vector<int> > PixelAthMonitoringBase::VecAccumulator2DMap::m_pm

Definition at line 105 of file PixelAthMonitoringBase.h.

◆ m_prof2Dname

std::string PixelAthMonitoringBase::VecAccumulator2DMap::m_prof2Dname

Definition at line 109 of file PixelAthMonitoringBase.h.

◆ m_val

std::unordered_map<int, std::vector<float> > PixelAthMonitoringBase::VecAccumulator2DMap::m_val

Definition at line 107 of file PixelAthMonitoringBase.h.


The documentation for this struct was generated from the following files:
PixelAthMonitoringBase::m_pixelid
const PixelID * m_pixelid
Definition: PixelAthMonitoringBase.h:142
PixelID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: PixelID.h:619
athena.value
value
Definition: athena.py:124
PixelAthMonitoringBase::VecAccumulator2DMap::m_em
std::unordered_map< int, std::vector< int > > m_em
Definition: PixelAthMonitoringBase.h:106
PixelAthMonitoringBase::VecAccumulator2DMap::m_val
std::unordered_map< int, std::vector< float > > m_val
Definition: PixelAthMonitoringBase.h:107
PixelAthMonitoringBase::VecAccumulator2DMap::m_copy2DFEval
bool m_copy2DFEval
Definition: PixelAthMonitoringBase.h:110
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
PixLayers::kECC
@ kECC
Definition: PixelAthMonitoringBase.h:24
PixelID::eta_index
int eta_index(const Identifier &id) const
Definition: PixelID.h:664
PixelAthMonitoringBase::VecAccumulator2DMap::m_host
const PixelAthMonitoringBase & m_host
Definition: PixelAthMonitoringBase.h:108
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:626
PixelID::eta_module
int eta_module(const Identifier &id) const
Definition: PixelID.h:651
PixLayers::kIBL
@ kIBL
Definition: PixelAthMonitoringBase.h:24
PixelAthMonitoringBase::VecAccumulator2DMap::m_pm
std::unordered_map< int, std::vector< int > > m_pm
Definition: PixelAthMonitoringBase.h:105
PixelAthMonitoringBase::VecAccumulator2DMap::m_prof2Dname
std::string m_prof2Dname
Definition: PixelAthMonitoringBase.h:109
calibdata.copy
bool copy
Definition: calibdata.py:27
PixelID::phi_module
int phi_module(const Identifier &id) const
Definition: PixelID.h:644
PixLayers::kECA
@ kECA
Definition: PixelAthMonitoringBase.h:24
geometry_dat_to_json.ld
ld
Definition: geometry_dat_to_json.py:32