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

#include <EFexEMEnergyWeightedClusterTool.h>

Inheritance diagram for LVL1::EFexEMEnergyWeightedClusterTool:
Collaboration diagram for LVL1::EFexEMEnergyWeightedClusterTool:

Public Member Functions

 EFexEMEnergyWeightedClusterTool (const std::string &type, const std::string &name, const IInterface *parent)
 Name : EFexEMEnergyWeightedClusterTool.cxx PACKAGE : Trigger/TrigT1/TrigT1CaloFexPerf AUTHOR : Denis Oliveira Damazio PURPOSE : emulate the eFex EM algorithm for phase 1 L1Calo (energy weighted clustering) More...
 
void findCellsAbove_EMB2_EMEC2 (const CaloConstCellContainer *, const float &thr, std::vector< const CaloCell * > &out) const
 
void findCellsAround (const CaloConstCellContainer *, const CaloCell *cell, std::vector< const CaloCell * > &out, const float deta, const float dphi) const
 
void findCellsAround (const CaloConstCellContainer *, const float eta, const float phi, std::vector< const CaloCell * > &out, const float deta, const float dphi) const
 
void findTTsAround (const xAOD::TriggerTowerContainer *, const float eta, const float phi, std::vector< const xAOD::TriggerTower * > &out) const
 finds TTs around a seed cell. More...
 
bool isCellEmMaximum (const std::vector< const CaloCell * > &scells, const CaloCell *cell) const
 checks if a give (seed) cell is the highest in a vector of cells. More...
 
float sumEmCells (const std::vector< const CaloCell * > &scells) const
 sum all cells from the vector that are in the EM calorimeter part More...
 
float sumEmCells2nd (const std::vector< const CaloCell * > &scells) const
 sum all cells from the vector that are in the EM calorimeter part (only 2nd layer) More...
 
float sumHadCells (const std::vector< const CaloCell * > &scells) const
 sum all cells from the vector that are in the HAD calorimeter part More...
 
float sumHadTTs (const std::vector< const xAOD::TriggerTower * > &scells) const
 sum all TTs from the vector that are in the HAD calorimeter part, but only for |eta|<1.72 (tile region) More...
 
void findCluster (const std::vector< const CaloCell * > &scells, float &etaCluster, float &phiCluster) const
 detect central cluster position More...
 
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
 

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 findCellsAbove (const CaloConstCellContainer *, const float &thr, std::vector< const CaloCell * > &out) 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

const float m_detaTT {0.125}
 member variables More...
 
const float m_dphiTT {0.15}
 dphi for the cluster to TT definition More...
 
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
 

Detailed Description

Definition at line 23 of file EFexEMEnergyWeightedClusterTool.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

◆ EFexEMEnergyWeightedClusterTool()

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

Name : EFexEMEnergyWeightedClusterTool.cxx PACKAGE : Trigger/TrigT1/TrigT1CaloFexPerf AUTHOR : Denis Oliveira Damazio PURPOSE : emulate the eFex EM algorithm for phase 1 L1Calo (energy weighted clustering)

Definition at line 12 of file EFexEMEnergyWeightedClusterTool.cxx.

14 {}

Member Function Documentation

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

◆ 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

◆ findCellsAbove()

void LVL1::EFexEMEnergyWeightedClusterTool::findCellsAbove ( const CaloConstCellContainer scells,
const float &  thr,
std::vector< const CaloCell * > &  out 
) const
private

Definition at line 18 of file EFexEMEnergyWeightedClusterTool.cxx.

19 {
20  out.clear();
21  for(auto scell : *scells) {
22  if ( scell->et() < Thr ) continue;
23  out.push_back(scell);
24  }
25 }

◆ findCellsAbove_EMB2_EMEC2()

void LVL1::EFexEMEnergyWeightedClusterTool::findCellsAbove_EMB2_EMEC2 ( const CaloConstCellContainer scells,
const float &  thr,
std::vector< const CaloCell * > &  out 
) const

Definition at line 29 of file EFexEMEnergyWeightedClusterTool.cxx.

30 {
31  out.clear();
32  for(auto scell : *scells) {
33  if ( scell->et() < Thr ) continue;
34  if ( scell->caloDDE()->getSampling()==2 || scell->caloDDE()->getSampling()==6 ) {
35  out.push_back(scell);
36  }
37  }
38 }

◆ findCellsAround() [1/2]

void LVL1::EFexEMEnergyWeightedClusterTool::findCellsAround ( const CaloConstCellContainer scells,
const CaloCell cell,
std::vector< const CaloCell * > &  out,
const float  deta,
const float  dphi 
) const

Definition at line 42 of file EFexEMEnergyWeightedClusterTool.cxx.

44 {
45  out.clear();
46  if ( !cell ) return;
47  float etacell = cell->eta();
48  float phicell = cell->phi();
49  for(auto scell : *scells) {
50  if ( std::abs( scell->eta() - etacell) > detaSize ) continue;
51  float dphi = std::abs( scell->phi() - phicell);
52  dphi = std::abs( M_PI - dphi );
53  dphi = std::abs( M_PI - dphi );
54  if ( std::abs( dphi ) > dphiSize ) continue;
55  out.push_back(scell);
56  }
57 }

◆ findCellsAround() [2/2]

void LVL1::EFexEMEnergyWeightedClusterTool::findCellsAround ( const CaloConstCellContainer scells,
const float  eta,
const float  phi,
std::vector< const CaloCell * > &  out,
const float  deta,
const float  dphi 
) const

Definition at line 61 of file EFexEMEnergyWeightedClusterTool.cxx.

63 {
64  out.clear();
65  for(auto scell : *scells) {
66  if ( std::abs( scell->eta() - etacell) > detaSize ) continue;
67  float dphi = std::abs( scell->phi() - phicell);
68  dphi = std::abs( M_PI - dphi );
69  dphi = std::abs( M_PI - dphi );
70  if ( std::abs( dphi ) > dphiSize ) continue;
71  out.push_back(scell);
72  }
73 }

◆ findCluster()

void LVL1::EFexEMEnergyWeightedClusterTool::findCluster ( const std::vector< const CaloCell * > &  scells,
float &  etaCluster,
float &  phiCluster 
) const

detect central cluster position

Definition at line 161 of file EFexEMEnergyWeightedClusterTool.cxx.

162 {
163  etaCluster=0.0;
164  phiCluster=0.0;
165  double etaClusterD=0.0;
166  double phiClusterD=0.0;
167  double energyCluster=0.0;
168  bool cross_phi_bound=false;
169  int last_sign=0;
170  for(auto scell : scells){
171  if ( std::abs( scell->phi() ) < 2.7 ) continue;
172  int layer = scell->caloDDE()->getSampling();
173  if ( ( layer != 2 ) && ( layer != 6 ) ) continue;
174  int cell_sign = ( scell->phi() >=0 ? 1 : -1 );
175  if ( ( last_sign!=0 ) && ( last_sign != cell_sign ) ) cross_phi_bound = true;
176  last_sign = cell_sign;
177  }
178  for(auto scell : scells){
179  int layer = scell->caloDDE()->getSampling();
180  if ( ( layer != 2 ) && ( layer != 6 ) ) continue;
181  double scelleta = scell->eta();
182  double scellphi = scell->phi();
183  double scellet = scell->et();
184  etaClusterD+= (scellet * scelleta);
185  if (cross_phi_bound && scellphi < 0 ) scellphi += 2 * M_PI;
186  phiClusterD+= (scellet * scellphi);
187  energyCluster+= (scellet) ;
188  }
189  if ( energyCluster > 0.1 ) {
190  etaClusterD/=energyCluster;
191  phiClusterD/=energyCluster;
192  etaCluster = (float)etaClusterD;
193  phiCluster = (float)phiClusterD;
194  if ( phiCluster > M_PI ) phiCluster-=2*M_PI;
195  } else {
196  etaCluster=-999.0;
197  phiCluster=-999.0;
198  }
199 }

◆ findTTsAround()

void LVL1::EFexEMEnergyWeightedClusterTool::findTTsAround ( const xAOD::TriggerTowerContainer scells,
const float  eta,
const float  phi,
std::vector< const xAOD::TriggerTower * > &  out 
) const

finds TTs around a seed cell.

These TTs will be part of the cluster. This helps to cover the part related to TileCall

Definition at line 77 of file EFexEMEnergyWeightedClusterTool.cxx.

79 {
80  out.clear();
81  for(auto scell : *scells) {
82  if ( std::abs( scell->eta() - etacell) > m_detaTT ) continue;
83  float dphi = std::abs( scell->phi() - phicell);
84  dphi = std::abs( M_PI - dphi );
85  dphi = std::abs( M_PI - dphi );
86  if ( std::abs( dphi ) > m_dphiTT ) continue;
87  out.push_back(scell);
88  }
89 }

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

◆ isCellEmMaximum()

bool LVL1::EFexEMEnergyWeightedClusterTool::isCellEmMaximum ( const std::vector< const CaloCell * > &  scells,
const CaloCell cell 
) const

checks if a give (seed) cell is the highest in a vector of cells.

This is to make sure we have a real local EM maximum

Definition at line 93 of file EFexEMEnergyWeightedClusterTool.cxx.

94 {
95  if ( !cell ) return false;
96  int samp = cell->caloDDE()->getSampling();
97  if ( (samp >= 8) && (samp!=21) ) return false; // include FCAL0 EM
98  float cellpt = 1.0001*cell->et(); //make sure you don't get thecell itself
99  for(auto scell : scells){
100  int samp1 = scell->caloDDE()->getSampling();
101  if ( ( samp1 >= 8 ) && (samp1!=21) ) continue;
102  if ( scell->ID() == cell->ID() ) continue;
103  if ( scell->et() > cellpt ) return false;
104  }
105  return true;
106 }

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

◆ sumEmCells()

float LVL1::EFexEMEnergyWeightedClusterTool::sumEmCells ( const std::vector< const CaloCell * > &  scells) const

sum all cells from the vector that are in the EM calorimeter part

Definition at line 110 of file EFexEMEnergyWeightedClusterTool.cxx.

111 {
112  float totalSum = 0.0;
113  for(auto scell : scells) {
114  int samp1 = scell->caloDDE()->getSampling();
115  if ( (samp1<8) || (samp1==21) ) totalSum+= scell->energy();
116  }
117  return totalSum;
118 }

◆ sumEmCells2nd()

float LVL1::EFexEMEnergyWeightedClusterTool::sumEmCells2nd ( const std::vector< const CaloCell * > &  scells) const

sum all cells from the vector that are in the EM calorimeter part (only 2nd layer)

Definition at line 122 of file EFexEMEnergyWeightedClusterTool.cxx.

123 {
124  float totalSum = 0.0;
125  for(auto scell : scells) {
126  if ( (scell->caloDDE()->getSampling()==2) ||(scell->caloDDE()->getSampling()==6) ) {
127  totalSum+= scell->energy();
128  }
129  }
130  return totalSum;
131 }

◆ sumHadCells()

float LVL1::EFexEMEnergyWeightedClusterTool::sumHadCells ( const std::vector< const CaloCell * > &  scells) const

sum all cells from the vector that are in the HAD calorimeter part

Definition at line 135 of file EFexEMEnergyWeightedClusterTool.cxx.

136 {
137  float totalSum = 0.0;
138  for(auto scell : scells){
139  if ( (scell->caloDDE()->getSampling() <8) || ( scell->caloDDE()->getSampling()>=22) ) continue;
140  //totalSum+= (scell->et())*TMath::CosH(scell->eta());
141  totalSum+= (scell->energy());
142  }
143  return totalSum;
144 }

◆ sumHadTTs()

float LVL1::EFexEMEnergyWeightedClusterTool::sumHadTTs ( const std::vector< const xAOD::TriggerTower * > &  scells) const

sum all TTs from the vector that are in the HAD calorimeter part, but only for |eta|<1.72 (tile region)

Definition at line 148 of file EFexEMEnergyWeightedClusterTool.cxx.

149 {
150  float totalSum = 0.0;
151  for(auto scell : scells){
152  if ( std::abs( scell->eta() ) > 1.5 ) continue;
153  if ( scell->sampling() == 0 ) continue;
154  totalSum+= (scell->pt())*TMath::CosH(scell->eta());
155  }
156  return totalSum * 1e3; // express in MeV
157 }

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

const float LVL1::EFexEMEnergyWeightedClusterTool::m_detaTT {0.125}
private

member variables

deta for the cluster to TT definition

Definition at line 67 of file EFexEMEnergyWeightedClusterTool.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_dphiTT

const float LVL1::EFexEMEnergyWeightedClusterTool::m_dphiTT {0.15}
private

dphi for the cluster to TT definition

Definition at line 68 of file EFexEMEnergyWeightedClusterTool.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_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:
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LVL1::EFexEMEnergyWeightedClusterTool::m_dphiTT
const float m_dphiTT
dphi for the cluster to TT definition
Definition: EFexEMEnergyWeightedClusterTool.h:68
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
M_PI
#define M_PI
Definition: ActiveFraction.h:11
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
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
test_pyathena.parent
parent
Definition: test_pyathena.py:15
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::EFexEMEnergyWeightedClusterTool::m_detaTT
const float m_detaTT
member variables
Definition: EFexEMEnergyWeightedClusterTool.h:67
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:228
a
TList * a
Definition: liststreamerinfos.cxx:10
h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
readCCLHist.float
float
Definition: readCCLHist.py:83
fitman.k
k
Definition: fitman.py:528