ATLAS Offline Software
eTowerBuilder.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 
7 
8 #include "L1CaloFEXSim/eTower.h"
11 
12 // TOWER IS A COLLECTION OF SUPER CELLS
13 // IT SHOULD HAVE A UNIQUE ID
14 // IT SHOULD BE ABLE TO RETURN LIST OF SUPER CELLS BELONGING TO IT
15 
16 // THIS IS A CLASS DESIGNED TO BUILD AN ETOWER USING THE ETOWER CLASS AND THEN PRINT THE RELEVANT INFORMATION TO THE SCREEN USING FUNCTION CALLS FROM THE ETOWER CLASS
17 
18 namespace LVL1 {
19 
20 eTowerBuilder::eTowerBuilder(const std::string& type,const std::string& name,const IInterface* parent):
22 {
23  declareInterface<IeTowerBuilder>(this);
24 }
25 
26 
27 void eTowerBuilder::init(std::unique_ptr<eTowerContainer> & eTowerContainerRaw) const
28 {
29  execute(eTowerContainerRaw);
30 }
31 
32 
34 {
35 }
36 
37 
38 void eTowerBuilder::execute(std::unique_ptr<eTowerContainer> & eTowerContainerRaw) const
39 {
40  BuildAllTowers(eTowerContainerRaw);
41 }
42 
43  // TOWER IDs FOR CLARITY
44  // Left Barrel IETower = 100000 + X
45  // Right Barrel IETower = 200000 + X
46  // Left Transition ID Tower = 300000 + X;
47  // Right Transition ID Tower = 400000 + X;
48  // Left Endcap ID Tower = 500000 + X
49  // Right Endcap ID Tower = 600000 + X
50  // Left Hadronic Endcap ID Tower = 11100000 + X --> These are just Layer 5 of Endcap Towers. They will never be generated as standalone eTowers.
51  // Right Haronic Endcap ID Tower = 22200000 + X --> These are just Layer 5 of Endcap Towers. They will never be generated as standalone eTowers.
52 
53  void eTowerBuilder::BuildEMBeTowers(std::unique_ptr<eTowerContainer> & eTowerContainerRaw) const
54 {
55  // Regions 0 only. Region 1 is 'transition region'.
56  for (int ieta = 0; ieta < 14; ++ieta) { // loop over 14 eta steps (ignoring last step as it is transition region)
57  for (int iphi = 0; iphi < 64; ++iphi){ // loop over 64 phi steps
58  BuildSingleTower(eTowerContainerRaw, ieta, iphi, 100000, -1);
59  BuildSingleTower(eTowerContainerRaw, ieta, iphi, 200000, 1);
60  }
61  }
62 
63 }
64 
65 void eTowerBuilder::BuildTRANSeTowers(std::unique_ptr<eTowerContainer> & eTowerContainerRaw) const
66 {
67 
68  int TRANS_MODIFIER = 14;
69  int tmpVal = TRANS_MODIFIER;
70 
71  for (int ieta = tmpVal; ieta < tmpVal + 1; ieta++){ // loop over eta steps
72  for (int iphi = 0; iphi < 64; ++iphi){ // loop over 64 phi steps
73  BuildSingleTower(eTowerContainerRaw, ieta, iphi, 300000, -1);
74  BuildSingleTower(eTowerContainerRaw, ieta, iphi, 400000, 1);
75  }
76  }
77 
78 }
79 
80  void eTowerBuilder::BuildEMEeTowers(std::unique_ptr<eTowerContainer> & eTowerContainerRaw) const
81 {
82  // Region 1
83  int EME_MODIFIER = 15;
84  int tmpVal = EME_MODIFIER;
85 
86  for (int ieta = tmpVal; ieta < tmpVal + 3; ++ieta){ // loop over eta steps
87  for (int iphi = 0; iphi < 64; ++iphi){ // loop over 64 phi steps
88  BuildSingleTower(eTowerContainerRaw, ieta, iphi, 500000, -1);
89  BuildSingleTower(eTowerContainerRaw, ieta, iphi, 600000, 1);
90  }
91  EME_MODIFIER++;
92  }
93 
94  // Region 2
95  tmpVal = EME_MODIFIER;
96  for (int ieta = tmpVal; ieta < tmpVal + 2; ++ieta){ // loop over eta steps
97  for (int iphi = 0; iphi < 64; ++iphi){ // loop over 64 phi steps
98  BuildSingleTower(eTowerContainerRaw, ieta, iphi, 500000, -1);
99  BuildSingleTower(eTowerContainerRaw, ieta, iphi, 600000, 1);
100  }
101  EME_MODIFIER++;
102  }
103 
104  // Region 3
105  tmpVal = EME_MODIFIER;
106  for (int ieta = tmpVal; ieta < tmpVal + 4; ++ieta){ // loop over eta steps
107  for (int iphi = 0; iphi < 64; ++iphi){ // loop over 64 phi steps
108  BuildSingleTower(eTowerContainerRaw, ieta, iphi, 500000, -1);
109  BuildSingleTower(eTowerContainerRaw, ieta, iphi, 600000, 1);
110  }
111  EME_MODIFIER++;
112  }
113 
114  // Region 4
115  tmpVal = EME_MODIFIER;
116  for (int ieta = tmpVal; ieta < tmpVal + 1; ++ieta){ // loop over eta steps
117  for (int iphi = 0; iphi < 64; ++iphi){ // loop over 64 phi steps
118  BuildSingleTower(eTowerContainerRaw, ieta, iphi, 500000, -1);
119  BuildSingleTower(eTowerContainerRaw, ieta, iphi, 600000, 1);
120  }
121  EME_MODIFIER++;
122  }
123 
124 
125 }
126 
127 // REDUNDANT AND NOT USED==========================================================================================================
128  void eTowerBuilder::BuildHECeTowers(std::unique_ptr<eTowerContainer> & eTowerContainerRaw) const
129 {
130 
131  // Region 0
132  int HEC_MODIFIER = 29;
133  int tmpVal = HEC_MODIFIER;
134  for (int ieta = tmpVal; ieta < tmpVal + 10; ++ieta){ // loop over eta steps
135  for (int iphi = 0; iphi < 64; ++iphi){ // loop over 64 phi steps
136  BuildSingleTower(eTowerContainerRaw, ieta, iphi, 11100000, -1);
137  BuildSingleTower(eTowerContainerRaw, ieta, iphi, 22200000, 1);
138  }
139  HEC_MODIFIER++;
140  }
141 
142  // Region 1
143  tmpVal = HEC_MODIFIER;
144  for (int ieta = tmpVal; ieta < tmpVal + 4; ++ieta){ // loop over eta steps
145  for (int iphi = 0; iphi < 32; ++iphi){ // loop over 64 phi steps
146  BuildSingleTower(eTowerContainerRaw, ieta, iphi, 11100000, -1);
147  BuildSingleTower(eTowerContainerRaw, ieta, iphi, 22200000, 1);
148  }
149  HEC_MODIFIER++;
150  }
151 
152 }
153 
154 void eTowerBuilder::BuildSingleTower(std::unique_ptr<eTowerContainer> & eTowerContainerRaw,float eta, float phi, float keybase, int posneg) const
155 {
156  eTowerContainerRaw->push_back(eta, phi, keybase, posneg);
157 }
158 
159 void eTowerBuilder::BuildAllTowers(std::unique_ptr<eTowerContainer> & eTowerContainerRaw) const
160 {
161  BuildEMBeTowers(eTowerContainerRaw);
162  BuildTRANSeTowers(eTowerContainerRaw);
163  BuildEMEeTowers(eTowerContainerRaw);
164 
165 }
166 
167 } // end of LVL1 namespace
LVL1::eTowerBuilder::reset
virtual void reset() const override
Definition: eTowerBuilder.cxx:33
eTowerContainer.h
LVL1::eTowerBuilder::BuildEMEeTowers
virtual void BuildEMEeTowers(std::unique_ptr< eTowerContainer > &eTowerContainerRaw) const override
Definition: eTowerBuilder.cxx:80
LVL1::eTowerBuilder::BuildAllTowers
virtual void BuildAllTowers(std::unique_ptr< eTowerContainer > &eTowerContainerRaw) const override
Definition: eTowerBuilder.cxx:159
TriggerTowerContainer.h
LVL1::eTowerBuilder::eTowerBuilder
eTowerBuilder(const std::string &type, const std::string &name, const IInterface *parent)
Definition: eTowerBuilder.cxx:20
LVL1::eTowerBuilder::BuildTRANSeTowers
virtual void BuildTRANSeTowers(std::unique_ptr< eTowerContainer > &eTowerContainerRaw) const override
Definition: eTowerBuilder.cxx:65
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::eTowerBuilder::execute
virtual void execute(std::unique_ptr< eTowerContainer > &eTowerContainerRaw) const override
Definition: eTowerBuilder.cxx:38
LVL1::eTowerBuilder::BuildHECeTowers
virtual void BuildHECeTowers(std::unique_ptr< eTowerContainer > &eTowerContainerRaw) const override
Definition: eTowerBuilder.cxx:128
eTowerBuilder.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TrigConf::name
Definition: HLTChainList.h:35
LVL1::eTowerBuilder::BuildEMBeTowers
virtual void BuildEMBeTowers(std::unique_ptr< eTowerContainer > &eTowerContainerRaw) const override
Definition: eTowerBuilder.cxx:53
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1::eTowerBuilder::init
virtual void init(std::unique_ptr< eTowerContainer > &eTowerContainerRaw) const override
Definition: eTowerBuilder.cxx:27
LVL1::eTowerBuilder::BuildSingleTower
virtual void BuildSingleTower(std::unique_ptr< eTowerContainer > &eTowerContainerRawRaw, float eta, float phi, float keybase, int posneg) const override
Definition: eTowerBuilder.cxx:154
AthAlgTool
Definition: AthAlgTool.h:26
eTower.h