ATLAS Offline Software
gTowerBuilder.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 //***************************************************************************
5 // gTowerBuilder - Builds gTowers (readout elements of gFEX)
6 // -------------------
7 // begin : 01 04 2021
8 // email : cecilia.tosciri@cern.ch
9 //***************************************************************************
10 
13 
14 
15 
16 // TOWER IS A COLLECTION OF SUPER CELLS
17 // IT SHOULD HAVE A UNIQUE ID
18 // IT SHOULD BE ABLE TO RETURN LIST OF SUPER CELLS BELONGING TO IT
19 
20 // THIS IS A CLASS DESIGNED TO BUILD A GTOWER USING THE GTOWER CLASS AND THEN PRINT THE RELEVANT INFORMATION TO THE SCREEN USING FUNCTION CALLS FROM THE GTOWER CLASS
21 
22 namespace LVL1 {
23 
24 gTowerBuilder::gTowerBuilder(const std::string& type,const std::string& name,const IInterface* parent):
26 {
27  declareInterface<IgTowerBuilder>(this);
28 }
29 
30 
31 void gTowerBuilder::init(std::unique_ptr<gTowerContainer> & gTowerContainerRaw)
32 {
33  execute(gTowerContainerRaw);
34  gTowerContainerRaw->clearContainerMap();
35  gTowerContainerRaw->fillContainerMap();
36 }
37 
38 
40 {
41 }
42 
43 
44 void gTowerBuilder::execute(std::unique_ptr<gTowerContainer> & gTowerContainerRaw) const
45 {
46  BuildAllTowers(gTowerContainerRaw);
47 }
48 
49  // TOWER IDs FOR CLARITY (updated Jan 21, 2022)
50  // EM Calorimeter
51  // EMB region (gFEX Eta [0.0, 1.4])= 100000 + X (left); 200000 + X (right)
52  // EMB/EMEC region (gFEX Eta [1.4, 1.6])= 300000 + X (left); 400000 + X (right)
53  // EMEC region (gFEX Eta [1.6, 3.2])= 500000 + X (left); 600000 + X (right) (no overlap with FCAL)
54  // FCAL region (gFEX Eta [3.2, 4.9])= 900000 + X (left); 1000000 + X (right)
55  // HAD Calorimeter
56  // Tile region (gFEX Eta [0.0, 1.4])= 100000 + X (left); 200000 + X (right)
57  // Tile/HEC region (gFEX Eta [1.4, 1.6])= 300000 + X (left); 400000 + X (right)
58  // HEC region (gFEX Eta [1.6, 3.2])= 500000 + X (left); 600000 + X (right) (32 phi bins)
59 
60 
61 
62  void gTowerBuilder::BuildEMBgTowers(std::unique_ptr<gTowerContainer> & gTowerContainerRaw) const
63 {
64  int nphi = 32;
65  // This is pure EMB region (for gFEX: Eta Range 0.0-1.4)
66  for (int ieta = 0; ieta < 7; ++ieta) { // loop over 7 eta steps
67  for (int iphi = 0; iphi < nphi; ++iphi){ // loop over 32 phi steps
68  BuildSingleTower(gTowerContainerRaw, ieta, iphi, nphi, 100000, -1);
69  BuildSingleTower(gTowerContainerRaw, ieta, iphi, nphi, 200000, 1);
70  }
71  }
72 
73 }
74 
75 void gTowerBuilder::BuildTransEMBgTowers(std::unique_ptr<gTowerContainer> & gTowerContainerRaw) const
76 {
77 
78  int TRANSEMB_MODIFIER = 7;
79  int tmpVal = TRANSEMB_MODIFIER;
80  int nphi = 32;
81  //Transition region is where EMB and EMEC overlap (for gFEX: Eta Range 1.4-1.6)
82  for (int ieta = tmpVal; ieta < tmpVal + 1; ieta++){ // loop over eta steps
83  for (int iphi = 0; iphi < nphi; ++iphi){ // loop over 32 phi steps
84  BuildSingleTower(gTowerContainerRaw, ieta, iphi, nphi, 300000, -1);
85  BuildSingleTower(gTowerContainerRaw, ieta, iphi, nphi, 400000, 1);
86  }
87  TRANSEMB_MODIFIER++;
88  }
89 
90 }
91 
92 void gTowerBuilder::BuildEMEgTowers(std::unique_ptr<gTowerContainer> & gTowerContainerRaw) const
93 {
94  // This is pure EMEC region (for gFEX: Eta Range 1.6-3.3)
95  int EME_MODIFIER = 8;
96  int tmpVal = EME_MODIFIER;
97  int nphi = 32;
98  for (int ieta = tmpVal; ieta < tmpVal + 4; ++ieta){ // loop over eta steps
99  for (int iphi = 0; iphi < nphi; ++iphi){ // loop over 32 phi steps
100  BuildSingleTower(gTowerContainerRaw, ieta, iphi, nphi, 500000, -1);
101  BuildSingleTower(gTowerContainerRaw, ieta, iphi, nphi, 600000, 1);
102  }
103  EME_MODIFIER++;
104  }
105 
106 }
107 
108 void gTowerBuilder::BuildFwdEMECgTowers(std::unique_ptr<gTowerContainer> & gTowerContainerRaw) const
109 {
110 // Transition region between EMEC and FCAL (for gFEX: Eta Range 2.8-3.2)
111  int TRANSFCAL_MODIFIER = 12;
112  int tmpVal = TRANSFCAL_MODIFIER;
113  int nphi = 32;
114  for (int ieta = tmpVal; ieta < tmpVal + 4; ++ieta){ // loop over eta steps
115  for (int iphi = 0; iphi < nphi; ++iphi){ // loop over 32 phi steps
116  BuildSingleTower(gTowerContainerRaw, ieta, iphi, nphi, 700000, -1);
117  BuildSingleTower(gTowerContainerRaw, ieta, iphi, nphi, 800000, 1);
118  }
119  TRANSFCAL_MODIFIER++;
120  }
121 
122 }
123 
124 
125 void gTowerBuilder::BuildFCALgTowers(std::unique_ptr<gTowerContainer> & gTowerContainerRaw) const
126 {
127  // This is pure EMEC region (for gFEX: Eta Range 3.2-4.9)
128  int FCAL_MODIFIER = 16;
129  int tmpVal = FCAL_MODIFIER;
130  int nphi = 16;
131  for (int ieta = tmpVal; ieta < tmpVal + 4; ++ieta){ // loop over eta steps
132  for (int iphi = 0; iphi < nphi; ++iphi){ // loop over 16 phi steps
133  BuildSingleTower(gTowerContainerRaw, ieta, iphi, nphi, 900000, -1);
134  BuildSingleTower(gTowerContainerRaw, ieta, iphi, nphi, 1000000, 1);
135  }
136  FCAL_MODIFIER++;
137  }
138 
139 }
140 
141 
142 
143  void gTowerBuilder::BuildSingleTower(std::unique_ptr<gTowerContainer> & gTowerContainerRaw, int ieta, int iphi, int nphi, int keybase, int posneg) const
144 {
145  gTowerContainerRaw->push_back(ieta, iphi, nphi, keybase, posneg);
146 }
147 
148  void gTowerBuilder::BuildAllTowers(std::unique_ptr<gTowerContainer> & gTowerContainerRaw) const
149 {
150  BuildEMBgTowers(gTowerContainerRaw);
151  BuildTransEMBgTowers(gTowerContainerRaw);
152  BuildEMEgTowers(gTowerContainerRaw);
153  BuildFwdEMECgTowers(gTowerContainerRaw);
154  BuildFCALgTowers(gTowerContainerRaw);
155 }
156 
157 } // end of LVL1 namespace
LVL1::gTowerBuilder::BuildEMEgTowers
virtual void BuildEMEgTowers(std::unique_ptr< gTowerContainer > &gTowerContainerRaw) const override
Definition: gTowerBuilder.cxx:92
LVL1::gTowerBuilder::execute
virtual void execute(std::unique_ptr< gTowerContainer > &gTowerContainerRaw) const override
Definition: gTowerBuilder.cxx:44
LVL1::gTowerBuilder::BuildSingleTower
virtual void BuildSingleTower(std::unique_ptr< gTowerContainer > &gTowerContainerRaw, int eta, int phi, int nphi, int keybase, int posneg) const override
Definition: gTowerBuilder.cxx:143
TriggerTowerContainer.h
LVL1::gTowerBuilder::gTowerBuilder
gTowerBuilder(const std::string &type, const std::string &name, const IInterface *parent)
Definition: gTowerBuilder.cxx:24
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::gTowerBuilder::BuildTransEMBgTowers
virtual void BuildTransEMBgTowers(std::unique_ptr< gTowerContainer > &gTowerContainerRaw) const override
Definition: gTowerBuilder.cxx:75
gTowerBuilder.h
LVL1::gTowerBuilder::BuildEMBgTowers
virtual void BuildEMBgTowers(std::unique_ptr< gTowerContainer > &gTowerContainerRaw) const override
Definition: gTowerBuilder.cxx:62
LVL1::gTowerBuilder::reset
virtual void reset() override
Definition: gTowerBuilder.cxx:39
LVL1::gTowerBuilder::BuildFCALgTowers
virtual void BuildFCALgTowers(std::unique_ptr< gTowerContainer > &gTowerContainerRaw) const override
Definition: gTowerBuilder.cxx:125
LVL1::gTowerBuilder::BuildFwdEMECgTowers
virtual void BuildFwdEMECgTowers(std::unique_ptr< gTowerContainer > &gTowerContainerRaw) const override
Definition: gTowerBuilder.cxx:108
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TrigConf::name
Definition: HLTChainList.h:35
LVL1::gTowerBuilder::BuildAllTowers
virtual void BuildAllTowers(std::unique_ptr< gTowerContainer > &gTowerContainerRaw) const override
Definition: gTowerBuilder.cxx:148
LVL1::gTowerBuilder::init
virtual void init(std::unique_ptr< gTowerContainer > &gTowerContainerRaw) override
Definition: gTowerBuilder.cxx:31
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthAlgTool
Definition: AthAlgTool.h:26