ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
LVL1::jTowerBuilder Class Reference

#include <jTowerBuilder.h>

Inheritance diagram for LVL1::jTowerBuilder:
Collaboration diagram for LVL1::jTowerBuilder:

Public Member Functions

 jTowerBuilder (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~jTowerBuilder ()=default
 
virtual StatusCode initialize () override
 
virtual void init (std::unique_ptr< jTowerContainer > &jTowerContainerRaw) const override
 
virtual void execute (std::unique_ptr< jTowerContainer > &jTowerContainerRaw) const override
 
virtual void reset () const override
 
virtual StatusCode AssignPileupAndNoiseValues (std::unique_ptr< jTowerContainer > &jTowerContainerRaw) const override
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void BuildEMBjTowers (std::unique_ptr< jTowerContainer > &jTowerContainerRaw) const
 
void BuildTRANSjTowers (std::unique_ptr< jTowerContainer > &jTowerContainerRaw) const
 
void BuildEMEjTowers (std::unique_ptr< jTowerContainer > &jTowerContainerRaw) const
 
void BuildEMIEjTowers (std::unique_ptr< jTowerContainer > &jTowerContainerRaw) const
 
void BuildFCALjTowers (std::unique_ptr< jTowerContainer > &jTowerContainerRaw) const
 
void BuildHECjTowers (std::unique_ptr< jTowerContainer > &jTowerContainerRaw) const
 
void BuildAllTowers (std::unique_ptr< jTowerContainer > &jTowerContainerRaw) const
 
void BuildSingleTower (std::unique_ptr< jTowerContainer > &jTowerContainerRaw, float eta, float phi, int key_eta, float keybase, int posneg, float centre_eta=0.0, float centre_phi=0.0, int fcal_layer=-1) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadCondHandleKey< jFEXDBCondDatam_BDToolKey {this, "BDToolKey", "jFEXDBParams", "DB tool key"}
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Static Private Attributes

static constexpr float m_TT_Size_phi = M_PI/32
 
static constexpr float m_TT_Size_phi_FCAL = M_PI/16
 

Detailed Description

Definition at line 30 of file jTowerBuilder.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ jTowerBuilder()

LVL1::jTowerBuilder::jTowerBuilder ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 26 of file jTowerBuilder.cxx.

27  declareInterface<IjTowerBuilder>(this);
28 }

◆ ~jTowerBuilder()

virtual LVL1::jTowerBuilder::~jTowerBuilder ( )
virtualdefault

Member Function Documentation

◆ AssignPileupAndNoiseValues()

StatusCode LVL1::jTowerBuilder::AssignPileupAndNoiseValues ( std::unique_ptr< jTowerContainer > &  jTowerContainerRaw) const
overridevirtual

Implements LVL1::IjTowerBuilder.

Definition at line 300 of file jTowerBuilder.cxx.

300  {
301 
303  if (!myDBTool.isValid()){
304  ATH_MSG_ERROR("Not able to read " << m_BDToolKey );
305  return StatusCode::FAILURE;
306  }
307 
308  for(const auto & jtower : *jTowerContainerRaw) {
309 
310  auto [CutJetEM, CutJetHad, CutMetEM, CutMetHad] = myDBTool->get_NoiseCuts( jtower->OnlineID() );
311  auto [PileUpWeightEM, PileUpWeightHad, InverseWeightEM, InverseWeightHad] = myDBTool->get_PileUpValues( jtower->OnlineID() );
312 
313  //Simulation used MeV not counts, those
314  int LSBscale_EM = 25; // cf LATOME
315  int LSBscale_HAD = 25; // cf LATOME
316 
317  //TREX uses another conversion factor
318  if(std::abs(jtower->centreEta()) < 1.5){
319  LSBscale_HAD = 500;// cf TREX
320  }
321 
322  //Since the COOL DB for FCAL individual towers are sharing the same OnlideID ( to save space)
323  //but in reality they are different towers. we need to set the parameters to 0
324  if(jtower->OfflineID() >= FEXAlgoSpaceDefs::jFEX_FCAL2_start){
325  PileUpWeightEM = 0;
326  InverseWeightEM = 0;
327  }
328  else if(jtower->OfflineID() >= FEXAlgoSpaceDefs::jFEX_FCAL1_start){
329  PileUpWeightHad = 0;
330  InverseWeightHad = 0;
331  }
332 
333  jtower->setTTowerArea(PileUpWeightEM,0);
334  jtower->setTTowerArea(PileUpWeightHad,1);
335 
336  jtower->setTTowerAreaInv(InverseWeightEM,0);
337  jtower->setTTowerAreaInv(InverseWeightHad,1);
338 
339  jtower->setNoiseForMet(CutMetEM*LSBscale_EM,0);
340  jtower->setNoiseForMet(CutMetHad*LSBscale_HAD,1);
341 
342  jtower->setNoiseForJet(CutJetEM*LSBscale_EM,0);
343  jtower->setNoiseForJet(CutJetHad*LSBscale_HAD,1);
344 
345  }
346  return StatusCode::SUCCESS;
347 }

◆ BuildAllTowers()

void LVL1::jTowerBuilder::BuildAllTowers ( std::unique_ptr< jTowerContainer > &  jTowerContainerRaw) const
private

Definition at line 350 of file jTowerBuilder.cxx.

350  {
351  BuildEMBjTowers(jTowerContainerRaw);
352  BuildTRANSjTowers(jTowerContainerRaw);
353  BuildEMEjTowers(jTowerContainerRaw);
354  BuildEMIEjTowers(jTowerContainerRaw);
355  BuildFCALjTowers(jTowerContainerRaw);
356 }

◆ BuildEMBjTowers()

void LVL1::jTowerBuilder::BuildEMBjTowers ( std::unique_ptr< jTowerContainer > &  jTowerContainerRaw) const
private

Definition at line 68 of file jTowerBuilder.cxx.

68  {
69  // Regions 0 only. Region 1 is 'transition region'.
70  for (int ieta = 0; ieta < 14; ++ieta) { // loop over 14 eta steps (ignoring last step as it is transition region)
71  float centre_eta = (0.1*ieta) + (0.05) ;
72  for (int iphi = 0; iphi < 64; ++iphi) { // loop over 64 phi steps
73  int key_eta = ieta;
74  float centre_phi = (m_TT_Size_phi*iphi) + (m_TT_Size_phi/2);
75  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 100000, -1, -1*centre_eta, centre_phi);
76  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 200000, 1, centre_eta, centre_phi);
77  }
78  }
79 
80 }

◆ BuildEMEjTowers()

void LVL1::jTowerBuilder::BuildEMEjTowers ( std::unique_ptr< jTowerContainer > &  jTowerContainerRaw) const
private

Definition at line 98 of file jTowerBuilder.cxx.

98  {
99  // Region 1
100  int EME_MODIFIER = 15;
101  int tmpVal = EME_MODIFIER;
102 
103  for (int ieta = tmpVal; ieta < tmpVal + 3; ++ieta) { // loop over eta steps
104  float centre_eta =(0.1*ieta) + (0.05) ;
105  for (int iphi = 0; iphi < 64; ++iphi) { // loop over 64 phi steps
106  int key_eta = ieta;
107  float centre_phi = (m_TT_Size_phi*iphi) + (m_TT_Size_phi/2);
108  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 500000, -1, -1*centre_eta, centre_phi);
109  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 600000, 1, centre_eta, centre_phi);
110  }
111  EME_MODIFIER++;
112  }
113 
114  // Region 2
115  tmpVal = EME_MODIFIER;
116  for (int ieta = tmpVal; ieta < tmpVal + 2; ++ieta) { // loop over eta steps
117  float centre_eta = (0.1*ieta) + (0.05);
118  for (int iphi = 0; iphi < 64; ++iphi) { // loop over 64 phi steps
119  int key_eta = ieta;
120  float centre_phi = (m_TT_Size_phi*iphi) + (m_TT_Size_phi/2);
121  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 500000, -1,-1*centre_eta, centre_phi);
122  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 600000, 1, centre_eta, centre_phi);
123  }
124  EME_MODIFIER++;
125  }
126 
127  // Region 3
128  tmpVal = EME_MODIFIER;
129  for (int ieta = tmpVal; ieta < tmpVal + 4; ++ieta) { // loop over eta steps
130  float centre_eta= (0.1*ieta) + (0.05) ;
131  for (int iphi = 0; iphi < 64; ++iphi) { // loop over 64 phi steps
132  int key_eta = ieta;
133  float centre_phi = (m_TT_Size_phi*iphi) + (m_TT_Size_phi/2);
134  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 500000, -1,-1*centre_eta, centre_phi);
135  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 600000, 1, centre_eta, centre_phi);
136  }
137  EME_MODIFIER++;
138  }
139 
140  // Region 4
141  tmpVal = EME_MODIFIER;
142  for (int ieta = tmpVal; ieta < tmpVal + 1; ++ieta) { // loop over eta steps
143  float centre_eta = (0.1*ieta) + (0.05);
144  for (int iphi = 0; iphi < 64; ++iphi) { // loop over 64 phi steps
145  int key_eta = ieta;
146  //float centre_phi =(TT_Size*iphi) + (0.5*TT_Size) ;
147  float centre_phi = (m_TT_Size_phi*iphi) + (m_TT_Size_phi/2);
148  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 500000, -1, -1*centre_eta, centre_phi);
149  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 600000, 1, centre_eta, centre_phi);
150  }
151  EME_MODIFIER++;
152  }
153 
154 
155 }

◆ BuildEMIEjTowers()

void LVL1::jTowerBuilder::BuildEMIEjTowers ( std::unique_ptr< jTowerContainer > &  jTowerContainerRaw) const
private

Definition at line 158 of file jTowerBuilder.cxx.

158  {
159  int EMIE_MODIFIER = 25;
160  int tmpVal = EMIE_MODIFIER;
161  int cellCountEta = 0;
162 
163  for (int ieta = tmpVal; ieta < tmpVal + 3; ++ieta) { // loop over eta steps (there are 3 here, 2.5-2.7, 2.7-2.9, 2.9-3.1)
164  cellCountEta++;
165  float centre_eta =(0.1*ieta) + (0.1*cellCountEta) ;
166  for (int iphi = 0; iphi < 32; ++iphi) { // loop over 32 phi steps
167  int key_eta = ieta;
168  float centre_phi = (2*m_TT_Size_phi*iphi) + m_TT_Size_phi;
169  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, /*7*/500000, -1, -1*centre_eta, centre_phi);
170  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, /*8*/600000, 1, centre_eta, centre_phi);
171  }
172  EMIE_MODIFIER++;
173  }
174 
175  tmpVal = EMIE_MODIFIER;
176  for (int ieta = tmpVal; ieta < tmpVal + 1; ++ieta) { // loop over eta steps (there are 1 here, 3.1-3.2)
177  float centre_eta = (0.1*ieta + 0.3) + (0.05);
178  for (int iphi = 0; iphi < 32; ++iphi) { // loop over 32 phi steps
179  int key_eta = ieta;
180  float centre_phi = (2*m_TT_Size_phi*iphi) + m_TT_Size_phi;
181  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, /*7*/500000, -1, -1*centre_eta, centre_phi);
182  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, /*8*/600000, 1, centre_eta, centre_phi);
183  }
184  EMIE_MODIFIER++;
185  }
186 
187 }

◆ BuildFCALjTowers()

void LVL1::jTowerBuilder::BuildFCALjTowers ( std::unique_ptr< jTowerContainer > &  jTowerContainerRaw) const
private

Definition at line 189 of file jTowerBuilder.cxx.

189  {
190  int FCAL_MODIFIER = 29; // there's 0.1 overlap with EMIE here in eta, but in counting we pretend it's the next one along.
191  int tmpVal = FCAL_MODIFIER;
192 
193  //These jTowers split between all of the layers as well (FCAL0,1,2) but we treat them as though they are a single flat layer of 24 supercells and also pretend that they do not overlap - when they definitely do...
194  //This means that from a tower numbering perspective we start with FCAL0 and work upwards (in numbers?), but real ordering in eta is different and this has to be built into the jTower internal properties
195  //Right now we are unfortunately using hard-coded eta and phi positions to do this, but maybe these should be drawn from a database someday
196 
197  // THIS REGION DEFINES 1 jTOWER PER SUPERCELL! AS SUCH THE jTOWER AND SUPERCELL POSITIONS IN ETA-PHI SPACE WILL MATCH EXACTY
198  // (That's good right? Supposed to make life easier?)
199 
200  // 21/01/21 IN THE MC:
201  // FCAL 0 Region [NOT SPECIFIED IN MC] has 12 supercells in 3.2 < eta < 4.88, and 16 supercells in phi. Supercells are 0.14 x 0.4. posneg +-2
202  // FCAL 1 Region [NOT SPECIFIED IN MC] has 8 supercells in 3.2 < eta < 4.48, and 16 supercells in phi. Supercells are 0.16 x 0.4. posneg +-2
203  // FCAL 2 Region [NOT SPECIFIED IN MC] has 4 supercells in 3.2 < eta < 4.48, and 16 supercells in phi. Supercells are 0.32 x 0.4. posneg +-2
204 
205  //FCAL0
206  float eta_width = 1.4;
207  int cellCountEta = 0;
208  int FCAL0_INITIAL = FCAL_MODIFIER;
209  std::vector<int> TT_etapos{31,33,34,36,37,39,40,42,43,45,46,48}; // Eta position of each supercell, need to be change for the real coords. Future MR
210  for (int ieta = tmpVal; ieta < tmpVal + 12; ++ieta) { // loop over eta steps (there are 12 here in varying positions for FCAL0)
211  int key_eta = ieta - FCAL0_INITIAL;
212  float centre_eta = (TT_etapos[cellCountEta]+eta_width/2)/10.0;
213  cellCountEta++;
214 
215  for (int iphi = 0; iphi < 16; ++iphi) { // loop over 16 phi steps
216  float centre_phi = (2*m_TT_Size_phi_FCAL*iphi) + m_TT_Size_phi_FCAL;
217  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 700000, -1, -1*centre_eta, centre_phi, 0);
218  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 800000, 1, centre_eta, centre_phi, 0);
219  }
220  FCAL_MODIFIER++;
221  }
222 
223  //FCAL1
224  eta_width = 1.6;
225  cellCountEta = 0;
226  tmpVal = FCAL_MODIFIER;
227  TT_etapos = {31,33,35,37,39,41,43,44};// Eta position of each supercell, need to be change for the real coords. Future MR
228  int FCAL1_INITIAL = FCAL_MODIFIER;
229  for (int ieta = tmpVal; ieta < tmpVal + 8; ++ieta) { // loop over eta steps (there are 8 here in varying positions for FCAL1)
230  int key_eta = ieta - FCAL1_INITIAL;
231  float centre_eta = (TT_etapos[cellCountEta]+eta_width/2)/10.0;
232  cellCountEta++;
233  for (int iphi = 0; iphi < 16; ++iphi) { // loop over 16 phi steps
234  float centre_phi = (2*m_TT_Size_phi_FCAL*iphi) + m_TT_Size_phi_FCAL;
235  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 900000, -1, -1*centre_eta, centre_phi, 1);
236  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 1000000, 1, centre_eta, centre_phi, 1);
237  }
238  FCAL_MODIFIER++;
239  }
240 
241 
242  //FCAL2
243  eta_width = 3.2;
244  cellCountEta = 0;
245  tmpVal = FCAL_MODIFIER;
246  TT_etapos = {31,34,37,41};// Eta position of each supercell, need to be change for the real coords. Future MR
247  int FCAL2_INITIAL = FCAL_MODIFIER;
248  for (int ieta = tmpVal; ieta < tmpVal + 4; ++ieta) { // loop over eta steps (there are 4 here in varying positions for FCAL2)
249  int key_eta = ieta - FCAL2_INITIAL;
250  float centre_eta = (TT_etapos[cellCountEta]+eta_width/2)/10.0;
251  cellCountEta++;
252  for (int iphi = 0; iphi < 16; ++iphi) { // loop over 16 phi steps
253  float centre_phi = (2*m_TT_Size_phi_FCAL*iphi) + m_TT_Size_phi_FCAL;
254  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 1100000, -1, -1*centre_eta, centre_phi, 2);
255  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 1200000, 1, centre_eta, centre_phi, 2);
256  }
257  FCAL_MODIFIER++;
258  }
259 
260 
261 }

◆ BuildHECjTowers()

void LVL1::jTowerBuilder::BuildHECjTowers ( std::unique_ptr< jTowerContainer > &  jTowerContainerRaw) const
private

Definition at line 265 of file jTowerBuilder.cxx.

265  {
266  // Region 0
267  int HEC_MODIFIER = 29;
268  int tmpVal = HEC_MODIFIER;
269  for (int ieta = tmpVal; ieta < tmpVal + 10; ++ieta){ // loop over eta steps
270  for (int iphi = 0; iphi < 64; ++iphi){ // loop over 64 phi steps
271  int key_eta = ieta;
272  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 11100000, -1, ieta, iphi);
273  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 22200000, 1, ieta, iphi);
274  }
275  HEC_MODIFIER++;
276  }
277 
278  // Region 1
279  tmpVal = HEC_MODIFIER;
280  for (int ieta = tmpVal; ieta < tmpVal + 4; ++ieta){ // loop over eta steps
281  for (int iphi = 0; iphi < 32; ++iphi){ // loop over 64 phi steps
282  int key_eta = ieta;
283  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 11100000, -1, ieta, iphi);
284  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 22200000, 1, ieta, iphi);
285  }
286  HEC_MODIFIER++;
287  }
288 
289 }

◆ BuildSingleTower()

void LVL1::jTowerBuilder::BuildSingleTower ( std::unique_ptr< jTowerContainer > &  jTowerContainerRaw,
float  eta,
float  phi,
int  key_eta,
float  keybase,
int  posneg,
float  centre_eta = 0.0,
float  centre_phi = 0.0,
int  fcal_layer = -1 
) const
private

Definition at line 292 of file jTowerBuilder.cxx.

292  {
293  int towerID = keybase + phi + (64 * key_eta);
294  jTowerContainerRaw->push_back(eta, phi, towerID, posneg, centre_eta, centre_phi, fcal_layer);
295 
296 }

◆ BuildTRANSjTowers()

void LVL1::jTowerBuilder::BuildTRANSjTowers ( std::unique_ptr< jTowerContainer > &  jTowerContainerRaw) const
private

Definition at line 82 of file jTowerBuilder.cxx.

82  {
83  int TRANS_MODIFIER = 14;
84  int tmpVal = TRANS_MODIFIER;
85 
86  for (int ieta = tmpVal; ieta < tmpVal + 1; ieta++) { // loop over eta steps
87  float centre_eta = (0.1*ieta) + (0.05);
88  for (int iphi = 0; iphi < 64; ++iphi) { // loop over 64 phi steps
89  int key_eta = ieta;
90  float centre_phi = (m_TT_Size_phi*iphi) + (m_TT_Size_phi/2);
91  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 300000, -1,-1*centre_eta, centre_phi);
92  BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 400000, 1, centre_eta, centre_phi);
93  }
94  }
95 
96 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

void LVL1::jTowerBuilder::execute ( std::unique_ptr< jTowerContainer > &  jTowerContainerRaw) const
overridevirtual

Implements LVL1::IjTowerBuilder.

Definition at line 54 of file jTowerBuilder.cxx.

54  {
55  BuildAllTowers(jTowerContainerRaw);
56 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ init()

void LVL1::jTowerBuilder::init ( std::unique_ptr< jTowerContainer > &  jTowerContainerRaw) const
overridevirtual

Implements LVL1::IjTowerBuilder.

Definition at line 39 of file jTowerBuilder.cxx.

39  {
40 
41  execute(jTowerContainerRaw);
42 
43  jTowerContainerRaw->clearContainerMap();
44  jTowerContainerRaw->fillContainerMap();
45 
46 }

◆ initialize()

StatusCode LVL1::jTowerBuilder::initialize ( )
overridevirtual

Implements LVL1::IjTowerBuilder.

Definition at line 30 of file jTowerBuilder.cxx.

31 {
32  ATH_CHECK( m_BDToolKey.initialize() );
33 
34  return StatusCode::SUCCESS;
35 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & LVL1::IjTowerBuilder::interfaceID ( )
inlinestaticinherited

Definition at line 44 of file IjTowerBuilder.h.

45  {
46  return IID_IjTowerBuilder;
47  }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ reset()

void LVL1::jTowerBuilder::reset ( ) const
overridevirtual

Implements LVL1::IjTowerBuilder.

Definition at line 49 of file jTowerBuilder.cxx.

49  {
50 
51 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_BDToolKey

SG::ReadCondHandleKey<jFEXDBCondData> LVL1::jTowerBuilder::m_BDToolKey {this, "BDToolKey", "jFEXDBParams", "DB tool key"}
private

Definition at line 57 of file jTowerBuilder.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_TT_Size_phi

constexpr float LVL1::jTowerBuilder::m_TT_Size_phi = M_PI/32
staticconstexprprivate

Definition at line 54 of file jTowerBuilder.h.

◆ m_TT_Size_phi_FCAL

constexpr float LVL1::jTowerBuilder::m_TT_Size_phi_FCAL = M_PI/16
staticconstexprprivate

Definition at line 55 of file jTowerBuilder.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
LVL1::jTowerBuilder::m_BDToolKey
SG::ReadCondHandleKey< jFEXDBCondData > m_BDToolKey
Definition: jTowerBuilder.h:57
LVL1::jTowerBuilder::m_TT_Size_phi
static constexpr float m_TT_Size_phi
Definition: jTowerBuilder.h:54
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LVL1::jTowerBuilder::BuildTRANSjTowers
void BuildTRANSjTowers(std::unique_ptr< jTowerContainer > &jTowerContainerRaw) const
Definition: jTowerBuilder.cxx:82
SG::ReadCondHandle::isValid
bool isValid()
Definition: ReadCondHandle.h:205
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
LVL1::FEXAlgoSpaceDefs::jFEX_FCAL1_start
constexpr static int jFEX_FCAL1_start
Definition: FEXAlgoSpaceDefs.h:32
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LVL1::jTowerBuilder::BuildEMIEjTowers
void BuildEMIEjTowers(std::unique_ptr< jTowerContainer > &jTowerContainerRaw) const
Definition: jTowerBuilder.cxx:158
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
LVL1::jTowerBuilder::BuildEMBjTowers
void BuildEMBjTowers(std::unique_ptr< jTowerContainer > &jTowerContainerRaw) const
Definition: jTowerBuilder.cxx:68
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
LVL1::jTowerBuilder::BuildEMEjTowers
void BuildEMEjTowers(std::unique_ptr< jTowerContainer > &jTowerContainerRaw) const
Definition: jTowerBuilder.cxx:98
LVL1::jTowerBuilder::m_TT_Size_phi_FCAL
static constexpr float m_TT_Size_phi_FCAL
Definition: jTowerBuilder.h:55
a
TList * a
Definition: liststreamerinfos.cxx:10
h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1::jTowerBuilder::BuildSingleTower
void BuildSingleTower(std::unique_ptr< jTowerContainer > &jTowerContainerRaw, float eta, float phi, int key_eta, float keybase, int posneg, float centre_eta=0.0, float centre_phi=0.0, int fcal_layer=-1) const
Definition: jTowerBuilder.cxx:292
LVL1::FEXAlgoSpaceDefs::jFEX_FCAL2_start
constexpr static int jFEX_FCAL2_start
Definition: FEXAlgoSpaceDefs.h:33
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
LVL1::jTowerBuilder::execute
virtual void execute(std::unique_ptr< jTowerContainer > &jTowerContainerRaw) const override
Definition: jTowerBuilder.cxx:54
LVL1::jTowerBuilder::BuildFCALjTowers
void BuildFCALjTowers(std::unique_ptr< jTowerContainer > &jTowerContainerRaw) const
Definition: jTowerBuilder.cxx:189
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
LVL1::jTowerBuilder::BuildAllTowers
void BuildAllTowers(std::unique_ptr< jTowerContainer > &jTowerContainerRaw) const
Definition: jTowerBuilder.cxx:350
fitman.k
k
Definition: fitman.py:528