ATLAS Offline Software
Loading...
Searching...
No Matches
T2GeometryTool Class Reference

#include <T2GeometryTool.h>

Inheritance diagram for T2GeometryTool:
Collaboration diagram for T2GeometryTool:

Public Member Functions

 T2GeometryTool (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor.
virtual StatusCode initialize () override
 Initialize method.
virtual int EtaPhiRange (const int nCaloType, const int nCaloSamp, const double &energyEta, const double &energyPhi) override
 This prepares internal tables based on the cluster position.
virtual bool CellInNorCluster (const int nCaloType, const int nCaloSamp, const double &etaCell, const double &phiCell) override
 Finds whether a cell is in a Normal Sized Cluster.
virtual bool CellInNarCluster (const int nCaloType, const int nCaloSamp, const double &etaCell, const double &phiCell) override
 Finds whether a cell is in a Narrow Sized Cluster.
virtual bool CellInWidCluster (const int nCaloType, const int nCaloSamp, const double &etaCell, const double &phiCell) override
 Finds whether a cell is in a Wide Sized Cluster.
virtual int nStripetaEMnar (const int layer) const override
 Get number of cells in eta for Narrow Sized Cluster in EM calorimeter.
virtual int nStripphiEMnar (const int layer) const override
 Get number of cells in phi for Narrow Sized Cluster in EM calorimeter.
virtual int nStripetaEMwid (const int layer) const override
 Get number of cells in eta for Wide Sized Cluster in EM calorimeter.
virtual int nStripphiEMwid (const int layer) const override
 Get number of cells in phi for Wide Sized Cluster in EM calorimeter.
virtual int nStripetaEMnor (const int layer) const override
 Get number of cells in eta for Normal Sized Cluster in EM calorimeter.
virtual int nStripphiEMnor (const int layer) const override
 Get number of cells in phi for Normal Sized Cluster in EM calorimeter.
virtual int nStripetaHADnar (const int layer) const override
 Get number of cells in eta for Narrow Sized Cluster in HAD calorimeter.
virtual int nStripphiHADnar (const int layer) const override
 Get number of cells in phi for Narrow Sized Cluster in HAD calorimeter.
virtual int nStripetaHADwid (const int layer) const override
 Get number of cells in eta for Wide Sized Cluster in HADcalorimeter.
virtual int nStripphiHADwid (const int layer) const override
 Get number of cells in phi for Wide Sized Cluster in HAD calorimeter.
virtual int nStripetaHADnor (const int layer) const override
 Get number of cells in eta for Normal Sized Cluster in HAD calorimeter.
virtual int nStripphiHADnor (const int layer) const override
 Get number of cells in phi for Normal Sized Cluster in HAD calorimeter.
 DeclareInterfaceID (IT2GeometryTool, 1, 0)
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

virtual int EtaPhiRangeInt (const int layer, const int &nStripEta, const int &nStripPhi, const double &energyEta, const double &energyPhi, const int index_size) override
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

double m_CellEtaNorMin [7] {}
 Normal cluster variables.
double m_CellEtaNorMax [7] {}
double m_CellPhiNorMin [7] {}
double m_CellPhiNorMax [7] {}
double m_CellEtaNarMin [7] {}
 Narrow cluster variables.
double m_CellEtaNarMax [7] {}
double m_CellPhiNarMin [7] {}
double m_CellPhiNarMax [7] {}
double m_CellEtaWidMin [7] {}
 Wider cluster variables.
double m_CellEtaWidMax [7] {}
double m_CellPhiWidMin [7] {}
double m_CellPhiWidMax [7] {}
int m_nStripetaEMnar [4] {}
 Reference changed to vectors.
int m_nStripphiEMnar [4] {}
int m_nStripetaEMwid [4] {}
int m_nStripphiEMwid [4] {}
int m_nStripetaEMnor [4] {}
int m_nStripphiEMnor [4] {}
int m_nStripetaHADnar [3] {}
int m_nStripphiHADnar [3] {}
int m_nStripetaHADwid [3] {}
int m_nStripphiHADwid [3] {}
int m_nStripetaHADnor [3] {}
int m_nStripphiHADnor [3] {}
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Static Private Attributes

static const int m_netareg [7] = {3,7,4,3,2,2,3}
 Granularity and eta ranges relevant for above energy sums.
static const double m_etareg [7][8]
static const double m_etaGran [7][7]
static const int m_nphireg [7] = {1,3,2,1,2,2,2}
static const double m_phireg [7][4]
static const double m_phiGran [7][3]

Detailed Description

Definition at line 25 of file T2GeometryTool.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

◆ T2GeometryTool()

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

Constructor.

Loads cluster size definition tables.

Definition at line 9 of file T2GeometryTool.cxx.

10 : AthAlgTool(type,name,parent)
11{
12
13 declareProperty( "nStripEtaEM0nar" , m_nStripetaEMnar[0] = 4); // 0.1
14 declareProperty( "nStripPhiEM0nar" , m_nStripphiEMnar[0] = 1); // 0.098
15 declareProperty( "nStripEtaEM1nar" , m_nStripetaEMnar[1] = 32); // 0.1
16 declareProperty( "nStripPhiEM1nar" , m_nStripphiEMnar[1] = 1); // 0.098
17 declareProperty( "nStripEtaEM2nar" , m_nStripetaEMnar[2] = 4); // 0.1
18 declareProperty( "nStripPhiEM2nar" , m_nStripphiEMnar[2] = 4); // 0.098
19 declareProperty( "nStripEtaEM3nar" , m_nStripetaEMnar[3] = 2); // 0.1
20 declareProperty( "nStripPhiEM3nar" , m_nStripphiEMnar[3] = 4); // 0.098
21
22 declareProperty( "nStripEtaEM0wid" , m_nStripetaEMwid[0] = 8); // 0.2
23 declareProperty( "nStripPhiEM0wid" , m_nStripphiEMwid[0] = 2); // 0.196
24 declareProperty( "nStripEtaEM1wid" , m_nStripetaEMwid[1] = 64); // 0.2
25 declareProperty( "nStripPhiEM1wid" , m_nStripphiEMwid[1] = 2); // 0.196
26 declareProperty( "nStripEtaEM2wid" , m_nStripetaEMwid[2] = 8); // 0.2
27 declareProperty( "nStripPhiEM2wid" , m_nStripphiEMwid[2] = 8); // 0.196
28 declareProperty( "nStripEtaEM3wid" , m_nStripetaEMwid[3] = 4); // 0.2
29 declareProperty( "nStripPhiEM3wid" , m_nStripphiEMwid[3] = 8); // 0.196
30
31 declareProperty( "nStripEtaEM0nor" , m_nStripetaEMnor[0] = 16); // 0.4
32 declareProperty( "nStripPhiEM0nor" , m_nStripphiEMnor[0] = 4); // 0.39
33 declareProperty( "nStripEtaEM1nor" , m_nStripetaEMnor[1] = 128); // 0.4
34 declareProperty( "nStripPhiEM1nor" , m_nStripphiEMnor[1] = 4); // 0.39
35 declareProperty( "nStripEtaEM2nor" , m_nStripetaEMnor[2] = 16); // 0.4
36 declareProperty( "nStripPhiEM2nor" , m_nStripphiEMnor[2] = 16); // 0.39
37 declareProperty( "nStripEtaEM3nor" , m_nStripetaEMnor[3] = 8); // 0.4
38 declareProperty( "nStripPhiEM3nor" , m_nStripphiEMnor[3] = 16); // 0.39
39
40
41 declareProperty( "nStripEtaHAD0nar" , m_nStripetaHADnar[0] = 1); // 0.1
42 declareProperty( "nStripPhiHAD0nar" , m_nStripphiHADnar[0] = 1); // 0.098
43 declareProperty( "nStripEtaHAD1nar" , m_nStripetaHADnar[1] = 1); // 0.1
44 declareProperty( "nStripPhiHAD1nar" , m_nStripphiHADnar[1] = 1); // 0.098
45 declareProperty( "nStripEtaHAD2nar" , m_nStripetaHADnar[2] = 1); // 0.2
46 declareProperty( "nStripPhiHAD2nar" , m_nStripphiHADnar[2] = 1); // 0.098
47
48 declareProperty( "nStripEtaHAD0wid" , m_nStripetaHADwid[0] = 2); // 0.2
49 declareProperty( "nStripPhiHAD0wid" , m_nStripphiHADwid[0] = 2); // 0.196
50 declareProperty( "nStripEtaHAD1wid" , m_nStripetaHADwid[1] = 2); // 0.2
51 declareProperty( "nStripPhiHAD1wid" , m_nStripphiHADwid[1] = 2); // 0.196
52 declareProperty( "nStripEtaHAD2wid" , m_nStripetaHADwid[2] = 1); // 0.2
53 declareProperty( "nStripPhiHAD2wid" , m_nStripphiHADwid[2] = 2); // 0.196
54
55 declareProperty( "nStripEtaHAD0nor" , m_nStripetaHADnor[0] = 4); // 0.4
56 declareProperty( "nStripPhiHAD0nor" , m_nStripphiHADnor[0] = 4); // 0.39
57 declareProperty( "nStripEtaHAD1nor" , m_nStripetaHADnor[1] = 4); // 0.4
58 declareProperty( "nStripPhiHAD1nor" , m_nStripphiHADnor[1] = 4); // 0.39
59 declareProperty( "nStripEtaHAD2nor" , m_nStripetaHADnor[2] = 2); // 0.4
60 declareProperty( "nStripPhiHAD2nor" , m_nStripphiHADnor[2] = 4); // 0.39
61
62
63
64}
AthAlgTool()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
int m_nStripetaEMnar[4]
Reference changed to vectors.

Member Function Documentation

◆ CellInNarCluster()

bool T2GeometryTool::CellInNarCluster ( const int nCaloType,
const int nCaloSamp,
const double & etaCell,
const double & phiCell )
inlineoverridevirtual

Finds whether a cell is in a Narrow Sized Cluster.

Parameters
[in]nCaloType,nCaloSamp: See T2GeometryTool::EtaPhiRange.
[in]etaCell: Cell eta position.
[in]phiCell: Cell phi position.
Returns
cell is or not in this cluster.

Implements IT2GeometryTool.

Definition at line 426 of file T2GeometryTool.h.

427 {
428 // test for invalid calorimeter type
429 if (nCaloType < 0 || nCaloType > 1) {
430 ATH_MSG_ERROR("Invalid CaloType");
431 return false;
432 }
433 if (nCaloSamp < 0 || nCaloSamp > 3 || (nCaloSamp == 3 && nCaloType == 1)) {
434 ATH_MSG_ERROR("Invalid CaloSamp");
435 return false;
436 }
437 int layer = nCaloType*4+nCaloSamp;
438
439 int IetaPass=0;
440 int IphiPass=0;
441 if ( (etaCell > m_CellEtaNarMin[layer]) &&
442 (etaCell < m_CellEtaNarMax[layer]) ) IetaPass=1;
443 if ( ( m_CellPhiNarMax[layer] > m_CellPhiNarMin[layer] &&
444 phiCell > m_CellPhiNarMin[layer] &&
445 phiCell < m_CellPhiNarMax[layer] ) ||
446 ( ( m_CellPhiNarMax[layer] < m_CellPhiNarMin[layer] &&
447 phiCell > 0 && phiCell > m_CellPhiNarMin[layer] &&
448 phiCell -2*M_PI < m_CellPhiNarMax[layer] ) ||
449 ( phiCell < 0 && phiCell < m_CellPhiNarMax[layer] &&
450 phiCell +2*M_PI > m_CellPhiNarMin[layer] ) )
451 ) IphiPass=1;
452
453 if ( IetaPass == 1 && IphiPass == 1 ) return true;
454 else return false;
455} // end of CellInCluster
#define M_PI
#define ATH_MSG_ERROR(x)
double m_CellPhiNarMax[7]
double m_CellPhiNarMin[7]
double m_CellEtaNarMin[7]
Narrow cluster variables.
double m_CellEtaNarMax[7]
@ layer
Definition HitInfo.h:79

◆ CellInNorCluster()

bool T2GeometryTool::CellInNorCluster ( const int nCaloType,
const int nCaloSamp,
const double & etaCell,
const double & phiCell )
inlineoverridevirtual

Finds whether a cell is in a Normal Sized Cluster.

Parameters
[in]nCaloType,nCaloSamp: See T2GeometryTool::EtaPhiRange.
[in]etaCell: Cell eta position.
[in]phiCell: Cell phi position.
Returns
cell is or not in this cluster.

Implements IT2GeometryTool.

Definition at line 393 of file T2GeometryTool.h.

394 {
395
396 // test for invalid calorimeter type
397 if (nCaloType < 0 || nCaloType > 1) {
398 ATH_MSG_ERROR("Invalid CaloType");
399 return false;
400 }
401 if (nCaloSamp < 0 || nCaloSamp > 3 || (nCaloSamp == 3 && nCaloType == 1)) {
402 ATH_MSG_ERROR("Invalid CaloSamp");
403 return false;
404 }
405
406 int layer = nCaloType*4+nCaloSamp;
407
408 int IetaPass=0;
409 int IphiPass=0;
410 if ( (etaCell > m_CellEtaNorMin[layer]) &&
411 (etaCell < m_CellEtaNorMax[layer] ) ) IetaPass=1;
412 if ( ((m_CellPhiNorMax[layer] > m_CellPhiNorMin[layer]) &&
413 (phiCell > m_CellPhiNorMin[layer]) &&
414 (phiCell < m_CellPhiNorMax[layer]) ) ||
415 ( (m_CellPhiNorMax[layer] < m_CellPhiNorMin[layer] &&
416 phiCell > 0 && phiCell > m_CellPhiNorMin[layer] &&
417 phiCell -2*M_PI < m_CellPhiNorMax[layer] ) ||
418 ( phiCell < 0 && phiCell < m_CellPhiNorMax[layer] &&
419 phiCell +2*M_PI > m_CellPhiNorMin[layer] ) )
420 ) IphiPass=1;
421
422 if ( IetaPass == 1 && IphiPass == 1 ) return true;
423 else return false;
424} // end of CellInCluster
double m_CellPhiNorMin[7]
double m_CellPhiNorMax[7]
double m_CellEtaNorMax[7]
double m_CellEtaNorMin[7]
Normal cluster variables.

◆ CellInWidCluster()

bool T2GeometryTool::CellInWidCluster ( const int nCaloType,
const int nCaloSamp,
const double & etaCell,
const double & phiCell )
inlineoverridevirtual

Finds whether a cell is in a Wide Sized Cluster.

Parameters
[in]nCaloType,nCaloSamp: See T2GeometryTool::EtaPhiRange.
[in]etaCell: Cell eta position.
[in]phiCell: Cell phi position.
Returns
cell is or not in this cluster.

Implements IT2GeometryTool.

Definition at line 457 of file T2GeometryTool.h.

458 {
459 // test for invalid calorimeter type
460 if (nCaloType < 0 || nCaloType > 1) {
461 ATH_MSG_ERROR("Invalid CaloType");
462 return false;
463 }
464 if (nCaloSamp < 0 || nCaloSamp > 3 || (nCaloSamp == 3 && nCaloType == 1)) {
465 ATH_MSG_ERROR("Invalid CaloSamp");
466 return false;
467 }
468 int layer = nCaloType*4+nCaloSamp;
469
470
471 int IetaPass=0;
472 int IphiPass=0;
473 if ( (etaCell > m_CellEtaWidMin[layer] ) &&
474 (etaCell < m_CellEtaWidMax[layer] ) ) IetaPass=1;
475 if ( ( m_CellPhiWidMax[layer] > m_CellPhiWidMin[layer] &&
476 phiCell > m_CellPhiWidMin[layer] &&
477 phiCell < m_CellPhiWidMax[layer] ) ||
478 ( ( m_CellPhiWidMax[layer] < m_CellPhiWidMin[layer] &&
479 phiCell > 0 && phiCell > m_CellPhiWidMin[layer] &&
480 phiCell -2*M_PI < m_CellPhiWidMax[layer] ) ||
481 ( phiCell < 0 && phiCell < m_CellPhiWidMax[layer] &&
482 phiCell +2*M_PI > m_CellPhiWidMin[layer] ) )
483 ) IphiPass=1;
484
485 if ( IetaPass == 1 && IphiPass == 1 ) return true;
486 else return false;
487} // end of CellInWidCluster
double m_CellPhiWidMax[7]
double m_CellPhiWidMin[7]
double m_CellEtaWidMin[7]
Wider cluster variables.
double m_CellEtaWidMax[7]

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ DeclareInterfaceID()

IT2GeometryTool::DeclareInterfaceID ( IT2GeometryTool ,
1 ,
0  )
inherited

◆ declareProperty()

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

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ 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.

◆ EtaPhiRange()

int T2GeometryTool::EtaPhiRange ( const int nCaloType,
const int nCaloSamp,
const double & energyEta,
const double & energyPhi )
inlineoverridevirtual

This prepares internal tables based on the cluster position.

Such tables should be used to determine whether a cells is inside clusters with different sizes

Parameters
[in]nCaloTypeshould be 0 for LAr and 1 for TileCal.
[in]nCaloSampshould be calorimeter sample.
[in]energyEta: eta of hottest cell.
[in]energyPhi: phi of hottest cell.

Implements IT2GeometryTool.

Definition at line 330 of file T2GeometryTool.h.

331 {
332
333 // test for invalid calorimeter type
334 if (nCaloType < 0 || nCaloType > 1) {
335 ATH_MSG_ERROR("Invalid CaloType");
336 return 0;
337 }
338 if (nCaloSamp < 0 || nCaloSamp > 3 || (nCaloSamp == 3 && nCaloType == 1)) {
339 ATH_MSG_ERROR("Invalid CaloSamp");
340 return 0;
341 }
342 int layer = nCaloType*4+nCaloSamp;
343
344 if( nCaloType == 0)
345 {
346
347 EtaPhiRangeInt(layer,m_nStripetaEMnar[nCaloSamp],
348 m_nStripphiEMnar[nCaloSamp],energyEta,energyPhi,0);
349 EtaPhiRangeInt(layer,m_nStripetaEMwid[nCaloSamp],
350 m_nStripphiEMwid[nCaloSamp],energyEta,energyPhi,1);
351 EtaPhiRangeInt(layer,m_nStripetaEMnor[nCaloSamp],
352 m_nStripphiEMnor[nCaloSamp],energyEta,energyPhi,2);
353 }
354 else
355 {
356 EtaPhiRangeInt(layer,m_nStripetaHADnar[nCaloSamp],
357 m_nStripphiHADnar[nCaloSamp],energyEta,energyPhi,0);
358 EtaPhiRangeInt(layer,m_nStripetaHADwid[nCaloSamp],
359 m_nStripphiHADwid[nCaloSamp],energyEta,energyPhi,1);
360 EtaPhiRangeInt(layer,m_nStripetaHADnor[nCaloSamp],
361 m_nStripphiHADnor[nCaloSamp],energyEta,energyPhi,2);
362
363 }
364
365 // log removed, this is not an AlgTool
366 ATH_MSG_DEBUG( "At end of EtaPhiRange. layer " << layer
367 << " CellEtaNorMin : " << m_CellEtaNorMin[layer] << " CellEtaNorMax : "
368 << m_CellEtaNorMax[layer] << " CellPhiNorMin : " << m_CellPhiNorMin[layer]
369 << " CellPhiNorMax : " << m_CellPhiNorMax[layer] << " deta : "
370 << m_CellEtaNorMin[layer] - energyEta << " dphi : "
371 << m_CellPhiNorMin[layer] - energyPhi );
372
373 ATH_MSG_DEBUG( " Nar variables ----> CellEtaNarMin : "
374 << m_CellEtaNarMin[layer]
375 << " CellEtaNarMax : " << m_CellEtaNarMax[layer] << " CellPhiNarMin : "
376 << m_CellPhiNarMin[layer] << " CellPhiNarMax : " << m_CellPhiNarMax[layer]
377 << " detaNar : " << m_CellEtaNarMin[layer] - energyEta << " dphiNar : "
378 << m_CellPhiNarMin[layer] - energyPhi );
379
380 ATH_MSG_DEBUG( " Wid variables ----> CellEtaWidMin : "
381 << m_CellEtaWidMin[layer] << " CellEtaWidMax : " << m_CellEtaWidMax[layer]
382 << " CellPhiWidMin : " << m_CellPhiWidMin[layer] << " CellPhiWidMax : "
383 << m_CellPhiWidMax[layer] << " detaWid : "
384 << m_CellEtaWidMin[layer] - energyEta << " dphiWid : "
385 << m_CellPhiWidMin[layer] - energyPhi );
386
387
388
389
390 return 0;
391} // End of EtaPhiRange
#define ATH_MSG_DEBUG(x)
virtual int EtaPhiRangeInt(const int layer, const int &nStripEta, const int &nStripPhi, const double &energyEta, const double &energyPhi, const int index_size) override

◆ EtaPhiRangeInt()

int T2GeometryTool::EtaPhiRangeInt ( const int layer,
const int & nStripEta,
const int & nStripPhi,
const double & energyEta,
const double & energyPhi,
const int index_size )
inlineoverrideprivatevirtual

Implements IT2GeometryTool.

Definition at line 202 of file T2GeometryTool.h.

204 {
205
206 double aeta = fabs(energyEta);
207 double dgra = m_etaGran[layer][0]; // eta granularity at eta=0
208 int netaregions=m_netareg[layer]; // number of different eta regions
209 double CellEtaMin=0.;
210 double CellEtaMax=0.;
211 double CellPhiMin=0.;
212 double CellPhiMax=0.;
213
214 CellEtaMin = aeta - dgra*nStripEta*0.5;
215 int EtaMinSign = 1;
216 if ( CellEtaMin < 0. ) {
217 EtaMinSign = -1;
218 CellEtaMin = fabs(CellEtaMin ); // need a non-negative value
219 }
220 ATH_MSG_DEBUG( "At start of EtaPhiRange. layer " << layer <<
221 " aeta " << aeta << " dgra " << dgra << " netaregions " << netaregions
222 << " First CellEtaMin " << CellEtaMin );
223
224 // Go by cell edges not centres since boundaries are at edges.
225 // Determine correct cell edges below, if seed is exactly at a cell
226 // edge rounding uncertainties could theoretically result in wrong
227 // number of cells being used, this is not checked.
228
229 // When dealing with a non-integer number of cells (due to including cells
230 // with a different granularity then the central region) round up to the next
231 // integer number of cells if at least 30% of the cell would be in the
232 // desired range (i.e. error on the side of including too much rather
233 // then too little). This is an arbitrary choice and not proven to be ideal.
234
235 int irmin;
236 int irmax;
237 double dgra1;
238
239if( CellEtaMin < m_etareg[layer][netaregions]){
240 for (irmin=0;irmin<netaregions;irmin++) {
241
242 if (CellEtaMin >= m_etareg[layer][irmin] &&
243 CellEtaMin < m_etareg[layer][irmin+1]) {
244
245 dgra1 = m_etaGran[layer][irmin];
246 CellEtaMin = (CellEtaMin-m_etareg[layer][irmin])/dgra1; //number of cells
247 if(CellEtaMin - trunc(CellEtaMin) > 0.7 ) CellEtaMin++; //round down
248 CellEtaMin = dgra1*trunc(CellEtaMin) + m_etareg[layer][irmin];
249
250 CellEtaMin = CellEtaMin*EtaMinSign; // correct for edge that spans 0
251 CellEtaMax = aeta + dgra*nStripEta * 0.5;
252
253
254 for (irmax=irmin;irmax<netaregions;irmax++) {
255 if (CellEtaMax > m_etareg[layer][irmax] &&
256 CellEtaMax <= m_etareg[layer][irmax+1]) {
257 dgra1 = m_etaGran[layer][irmax];
258 CellEtaMax = (CellEtaMax-m_etareg[layer][irmax])/dgra1; //number of cells
259 if (CellEtaMax-trunc(CellEtaMax) >= 0.3) CellEtaMax++; // round up
260 CellEtaMax = dgra1*trunc(CellEtaMax)+m_etareg[layer][irmax];
261 }
262 } // for (irmax=irmin+1;irmax<netaregions;irmax++)
263 } // if (*CellEtaMin >= m_etareg[layer][irmin]...
264 } // for (irmin=0;irmin<=netaregions;irmin++)
265} // if (CellEtaMin < m_etareg[layer][netaregions])
266
267 // set to correct sign
268 double tempeta;
269 if (energyEta < 0) {
270 tempeta=-CellEtaMin;
271 CellEtaMin=-CellEtaMax;
272 CellEtaMax=tempeta;
273
274 }
275
276 // set phi range based only on phi granularity in the eta region
277 // of CellEtaMin, this may not be the optimum method when the eta
278 // range spans a change in phi granularity but the only place that
279 // might be a concern is the crack region of EM samp 1 since the
280 // other phi gran. changes occur at eta > 2.5
281
282 double dgrap= m_phiGran[layer][0]; // phi granularity at eta=0
283 int nphiregions=m_nphireg[layer]; // number of different phi regions
284 CellPhiMin = energyPhi - dgrap*nStripPhi*0.5;
285
286if (fabs(CellEtaMin) < m_phireg[layer][nphiregions]){
287 for (irmin=0;irmin<nphiregions;irmin++) {
288
289 if (fabs(CellEtaMin) >= m_phireg[layer][irmin] &&
290 fabs(CellEtaMin) < m_phireg[layer][irmin+1]) {
291
292 dgra1 = m_phiGran[layer][irmin];
293 CellPhiMin = dgra1*rint(CellPhiMin/dgra1);
294 CellPhiMax = CellPhiMin + dgrap*nStripPhi;
295 } // if *(CellEtaMin >= m_phireg[layer][irmin]...
296 } // for (irmin=0;irmin<=nphiregions;irmin++)
297} // if (fabs(CellEtaMin) < m_phireg[layer][nphiregions]){
298
299 if (CellPhiMax > M_PI) CellPhiMax -= 2*M_PI;
300 if (CellPhiMin <= -M_PI) CellPhiMin += 2*M_PI;
301 if (CellPhiMin > M_PI) CellPhiMin -= 2*M_PI;
302 if (CellPhiMax <= -M_PI) CellPhiMax += 2*M_PI;
303
304 if( index_size == 0)
305 {
306 m_CellEtaNarMax[layer] = CellEtaMax;
307 m_CellEtaNarMin[layer] = CellEtaMin;
308 m_CellPhiNarMax[layer] = CellPhiMax;
309 m_CellPhiNarMin[layer] = CellPhiMin;
310 }
311 else if (index_size == 1)
312 {
313 m_CellEtaWidMax[layer] = CellEtaMax;
314 m_CellEtaWidMin[layer] = CellEtaMin;
315 m_CellPhiWidMax[layer] = CellPhiMax;
316 m_CellPhiWidMin[layer] = CellPhiMin;
317 }
318 else if (index_size == 2)
319 {
320 m_CellEtaNorMax[layer] = CellEtaMax;
321 m_CellEtaNorMin[layer] = CellEtaMin;
322 m_CellPhiNorMax[layer] = CellPhiMax;
323 m_CellPhiNorMin[layer] = CellPhiMin;
324 }
325
326
327 return 0;
328} // End of EtaPhiRangeInt method
static const int m_nphireg[7]
static const int m_netareg[7]
Granularity and eta ranges relevant for above energy sums.
static const double m_etareg[7][8]
static const double m_phireg[7][4]
static const double m_etaGran[7][7]
static const double m_phiGran[7][3]

◆ evtStore()

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.

◆ 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

◆ initialize()

StatusCode T2GeometryTool::initialize ( )
overridevirtual

Initialize method.

Definition at line 67 of file T2GeometryTool.cxx.

68{
69 ATH_MSG_DEBUG("in initialize() by T2GeometryTool");
70 return StatusCode::SUCCESS;
71}

◆ 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.

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ 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 }

◆ nStripetaEMnar()

int T2GeometryTool::nStripetaEMnar ( const int layer) const
inlineoverridevirtual

Get number of cells in eta for Narrow Sized Cluster in EM calorimeter.

Parameters
[in]layerinteger to identify the EM sampling

Implements IT2GeometryTool.

Definition at line 490 of file T2GeometryTool.h.

491 { return m_nStripetaEMnar[layer]; }

◆ nStripetaEMnor()

int T2GeometryTool::nStripetaEMnor ( const int layer) const
inlineoverridevirtual

Get number of cells in eta for Normal Sized Cluster in EM calorimeter.

Parameters
[in]layerinteger to identify the EM sampling

Implements IT2GeometryTool.

Definition at line 500 of file T2GeometryTool.h.

501 { return m_nStripetaEMnor[layer]; }

◆ nStripetaEMwid()

int T2GeometryTool::nStripetaEMwid ( const int layer) const
inlineoverridevirtual

Get number of cells in eta for Wide Sized Cluster in EM calorimeter.

Parameters
[in]layerinteger to identify the EM sampling

Implements IT2GeometryTool.

Definition at line 495 of file T2GeometryTool.h.

496 { return m_nStripetaEMwid[layer]; }

◆ nStripetaHADnar()

int T2GeometryTool::nStripetaHADnar ( const int layer) const
inlineoverridevirtual

Get number of cells in eta for Narrow Sized Cluster in HAD calorimeter.

Parameters
[in]layerinteger to identify the HAD sampling

Implements IT2GeometryTool.

Definition at line 505 of file T2GeometryTool.h.

506 { return m_nStripetaHADnar[layer]; }

◆ nStripetaHADnor()

int T2GeometryTool::nStripetaHADnor ( const int layer) const
inlineoverridevirtual

Get number of cells in eta for Normal Sized Cluster in HAD calorimeter.

Parameters
[in]layerinteger to identify the HAD sampling

Implements IT2GeometryTool.

Definition at line 515 of file T2GeometryTool.h.

516 { return m_nStripetaHADnor[layer]; }

◆ nStripetaHADwid()

int T2GeometryTool::nStripetaHADwid ( const int layer) const
inlineoverridevirtual

Get number of cells in eta for Wide Sized Cluster in HADcalorimeter.

Parameters
[in]layerinteger to identify the HAD sampling

Implements IT2GeometryTool.

Definition at line 510 of file T2GeometryTool.h.

511 { return m_nStripetaHADwid[layer]; }

◆ nStripphiEMnar()

int T2GeometryTool::nStripphiEMnar ( const int layer) const
inlineoverridevirtual

Get number of cells in phi for Narrow Sized Cluster in EM calorimeter.

Parameters
[in]layerinteger to identify the EM sampling

Implements IT2GeometryTool.

Definition at line 492 of file T2GeometryTool.h.

493 { return m_nStripphiEMnar[layer]; }

◆ nStripphiEMnor()

int T2GeometryTool::nStripphiEMnor ( const int layer) const
inlineoverridevirtual

Get number of cells in phi for Normal Sized Cluster in EM calorimeter.

Parameters
[in]layerinteger to identify the EM sampling

Implements IT2GeometryTool.

Definition at line 502 of file T2GeometryTool.h.

503 { return m_nStripphiEMnor[layer]; }

◆ nStripphiEMwid()

int T2GeometryTool::nStripphiEMwid ( const int layer) const
inlineoverridevirtual

Get number of cells in phi for Wide Sized Cluster in EM calorimeter.

Parameters
[in]layerinteger to identify the EM sampling

Implements IT2GeometryTool.

Definition at line 497 of file T2GeometryTool.h.

498 { return m_nStripphiEMwid[layer]; }

◆ nStripphiHADnar()

int T2GeometryTool::nStripphiHADnar ( const int layer) const
inlineoverridevirtual

Get number of cells in phi for Narrow Sized Cluster in HAD calorimeter.

Parameters
[in]layerinteger to identify the HAD sampling

Implements IT2GeometryTool.

Definition at line 507 of file T2GeometryTool.h.

508 { return m_nStripphiHADnar[layer]; }

◆ nStripphiHADnor()

int T2GeometryTool::nStripphiHADnor ( const int layer) const
inlineoverridevirtual

Get number of cells in phi for Normal Sized Cluster in HAD calorimeter.

Parameters
[in]layerinteger to identify the HAD sampling

Implements IT2GeometryTool.

Definition at line 517 of file T2GeometryTool.h.

518 { return m_nStripphiHADnor[layer]; }

◆ nStripphiHADwid()

int T2GeometryTool::nStripphiHADwid ( const int layer) const
inlineoverridevirtual

Get number of cells in phi for Wide Sized Cluster in HAD calorimeter.

Parameters
[in]layerinteger to identify the HAD sampling

Implements IT2GeometryTool.

Definition at line 512 of file T2GeometryTool.h.

513 { return m_nStripphiHADwid[layer]; }

◆ 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();
384 }
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)

◆ 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 {
366 }

◆ 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 asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ 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) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_CellEtaNarMax

double T2GeometryTool::m_CellEtaNarMax[7] {}
private

Definition at line 161 of file T2GeometryTool.h.

161{}, m_CellEtaNarMax[7]{};

◆ m_CellEtaNarMin

double T2GeometryTool::m_CellEtaNarMin[7] {}
private

Narrow cluster variables.

Definition at line 161 of file T2GeometryTool.h.

161{}, m_CellEtaNarMax[7]{};

◆ m_CellEtaNorMax

double T2GeometryTool::m_CellEtaNorMax[7] {}
private

Definition at line 158 of file T2GeometryTool.h.

158{}, m_CellEtaNorMax[7]{};

◆ m_CellEtaNorMin

double T2GeometryTool::m_CellEtaNorMin[7] {}
private

Normal cluster variables.

Definition at line 158 of file T2GeometryTool.h.

158{}, m_CellEtaNorMax[7]{};

◆ m_CellEtaWidMax

double T2GeometryTool::m_CellEtaWidMax[7] {}
private

Definition at line 164 of file T2GeometryTool.h.

164{}, m_CellEtaWidMax[7]{};

◆ m_CellEtaWidMin

double T2GeometryTool::m_CellEtaWidMin[7] {}
private

Wider cluster variables.

Definition at line 164 of file T2GeometryTool.h.

164{}, m_CellEtaWidMax[7]{};

◆ m_CellPhiNarMax

double T2GeometryTool::m_CellPhiNarMax[7] {}
private

Definition at line 162 of file T2GeometryTool.h.

162{}, m_CellPhiNarMax[7]{};

◆ m_CellPhiNarMin

double T2GeometryTool::m_CellPhiNarMin[7] {}
private

Definition at line 162 of file T2GeometryTool.h.

162{}, m_CellPhiNarMax[7]{};

◆ m_CellPhiNorMax

double T2GeometryTool::m_CellPhiNorMax[7] {}
private

Definition at line 159 of file T2GeometryTool.h.

159{}, m_CellPhiNorMax[7]{};

◆ m_CellPhiNorMin

double T2GeometryTool::m_CellPhiNorMin[7] {}
private

Definition at line 159 of file T2GeometryTool.h.

159{}, m_CellPhiNorMax[7]{};

◆ m_CellPhiWidMax

double T2GeometryTool::m_CellPhiWidMax[7] {}
private

Definition at line 165 of file T2GeometryTool.h.

165{}, m_CellPhiWidMax[7]{};

◆ m_CellPhiWidMin

double T2GeometryTool::m_CellPhiWidMin[7] {}
private

Definition at line 165 of file T2GeometryTool.h.

165{}, m_CellPhiWidMax[7]{};

◆ 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_etaGran

const double T2GeometryTool::m_etaGran
staticprivate
Initial value:
= {
{0.025 ,0.024,0.025 ,0.0 ,0.0 ,0.0 ,0.0},
{0.003125,0.025,0.003125,0.0041667,0.00625,0.025,0.1},
{0.025 ,0.05 ,0.025 ,0.1 ,0.0 ,0.0 ,0.0},
{0.05 ,0.001,0.05 ,0.0 ,0.0 ,0.0 ,0.0},
{0.1 ,0.2 ,0.0 ,0.0 ,0.0 ,0.0 ,0.0},
{0.1 ,0.2 ,0.0 ,0.0 ,0.0 ,0.0 ,0.0},
{0.2 ,0.1 ,0.2 ,0.0 ,0.0 ,0.0 ,0.0}}

Definition at line 85 of file T2GeometryTool.h.

◆ m_etareg

const double T2GeometryTool::m_etareg
staticprivate
Initial value:
= {
{0.0,1.4 ,1.5 ,1.8,0.0,0.0,0.0,0.0},
{0.0,1.4 ,1.5 ,1.8,2.0,2.4,2.5,3.2},
{0.0,1.4 ,1.425,2.5,3.2,0.0,0.0,0.0},
{0.0,1.35,1.5 ,2.5,0.0,0.0,0.0,0.0},
{0.0,2.5 ,3.2 ,0.0,0.0,0.0,0.0,0.0},
{0.0,2.5 ,3.2 ,0.0,0.0,0.0,0.0,0.0},
{0.0,1.5 ,2.5 ,3.2,0.0,0.0,0.0,0.0}}

Definition at line 77 of file T2GeometryTool.h.

77 : integer to identify the EM sampling
78 */
79
80 virtual
81 int nStripetaEMnar(const int layer) const override;
82

◆ 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_netareg

const int T2GeometryTool::m_netareg = {3,7,4,3,2,2,3}
staticprivate

Granularity and eta ranges relevant for above energy sums.

Definition at line 75 of file T2GeometryTool.h.

◆ m_nphireg

const int T2GeometryTool::m_nphireg = {1,3,2,1,2,2,2}
staticprivate

Definition at line 95 of file T2GeometryTool.h.

◆ m_nStripetaEMnar

int T2GeometryTool::m_nStripetaEMnar[4] {}
private

Reference changed to vectors.

Definition at line 174 of file T2GeometryTool.h.

◆ m_nStripetaEMnor

int T2GeometryTool::m_nStripetaEMnor[4] {}
private

Definition at line 180 of file T2GeometryTool.h.

◆ m_nStripetaEMwid

int T2GeometryTool::m_nStripetaEMwid[4] {}
private

Definition at line 177 of file T2GeometryTool.h.

◆ m_nStripetaHADnar

int T2GeometryTool::m_nStripetaHADnar[3] {}
private

Definition at line 183 of file T2GeometryTool.h.

◆ m_nStripetaHADnor

int T2GeometryTool::m_nStripetaHADnor[3] {}
private

Definition at line 189 of file T2GeometryTool.h.

◆ m_nStripetaHADwid

int T2GeometryTool::m_nStripetaHADwid[3] {}
private

Definition at line 186 of file T2GeometryTool.h.

◆ m_nStripphiEMnar

int T2GeometryTool::m_nStripphiEMnar[4] {}
private

Definition at line 175 of file T2GeometryTool.h.

◆ m_nStripphiEMnor

int T2GeometryTool::m_nStripphiEMnor[4] {}
private

Definition at line 181 of file T2GeometryTool.h.

◆ m_nStripphiEMwid

int T2GeometryTool::m_nStripphiEMwid[4] {}
private

Definition at line 178 of file T2GeometryTool.h.

◆ m_nStripphiHADnar

int T2GeometryTool::m_nStripphiHADnar[3] {}
private

Definition at line 184 of file T2GeometryTool.h.

◆ m_nStripphiHADnor

int T2GeometryTool::m_nStripphiHADnor[3] {}
private

Definition at line 190 of file T2GeometryTool.h.

◆ m_nStripphiHADwid

int T2GeometryTool::m_nStripphiHADwid[3] {}
private

Definition at line 187 of file T2GeometryTool.h.

◆ m_phiGran

const double T2GeometryTool::m_phiGran
staticprivate
Initial value:

Definition at line 106 of file T2GeometryTool.h.

◆ m_phireg

const double T2GeometryTool::m_phireg
staticprivate
Initial value:

Definition at line 97 of file T2GeometryTool.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: