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

#include <CaloTowerxAODFromCells.h>

Inheritance diagram for CaloTowerxAODFromCells:
Collaboration diagram for CaloTowerxAODFromCells:

Public Member Functions

 CaloTowerxAODFromCells (const std::string &name, ISvcLocator *pSvcLocator)
 Default algorithm constructor. More...
 
virtual ~CaloTowerxAODFromCells ()
 Baseclass destructor. More...
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
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 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
 
@c AthAlgorithm interface implementation
virtual StatusCode initialize () override
 Initialize algorithm. More...
 
virtual StatusCode execute (const EventContext &ctx) const override
 Execute algorithm. More...
 
virtual StatusCode finalize () override
 Finalize algorithm. More...
 

Protected Member Functions

StatusCode initBase ()
 < More...
 
SG::WriteHandle< xAOD::CaloTowerContainermakeContainer (const EventContext &ctx) const
 Intialize m_cellToTower cache. More...
 
const CellToTowerVecgetIndexCache (const EventContext &ctx) const
 
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...
 

Protected Attributes

SG::ReadCondHandleKey< CaloDetDescrManagerm_caloMgrKey
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode fillIndexCache (const EventContext &ctx, CellToTowerVec &cellToTower) 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

bool m_filterCells
 
CxxUtils::CachedValue< CellToTowerVecm_cellToTower
 map of cell indices to tower indices and weights More...
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. 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
 
Algorithm properties
SG::ReadHandleKey< CaloCellContainerm_inputCellContainerKey
 
double m_cellThresholdE
 Cell energy threshold (only for FilteredCell mode) More...
 

Detailed Description

Definition at line 19 of file CaloTowerxAODFromCells.h.

Member Typedef Documentation

◆ CellToTowerVec

typedef std::vector<std::vector<cellToTower_t> > CaloTowerxAODAlgoBase::CellToTowerVec
protectedinherited

Definition at line 63 of file CaloTowerxAODAlgoBase.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ CaloTowerxAODFromCells()

CaloTowerxAODFromCells::CaloTowerxAODFromCells ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Default algorithm constructor.

Parameters
namereference to non-modifiable name of algorithm instance
pSvcLocatorpointer to generic service locator

Definition at line 18 of file CaloTowerxAODFromCells.cxx.

19  : CaloTowerxAODAlgoBase(name,pSvcLocator)
20  , m_inputCellContainerKey("AllCalo")
22  , m_filterCells(false)
23 {
24  declareProperty("InputCellContainer", m_inputCellContainerKey);
25  declareProperty("CellEnergyThreshold", m_cellThresholdE);
26 }

◆ ~CaloTowerxAODFromCells()

CaloTowerxAODFromCells::~CaloTowerxAODFromCells ( )
virtualdefault

Baseclass destructor.

Member Function Documentation

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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()

StatusCode CaloTowerxAODFromCells::execute ( const EventContext &  ctx) const
overridevirtual

Execute algorithm.

Definition at line 46 of file CaloTowerxAODFromCells.cxx.

47 {
48  const CellToTowerVec& cellToTower = getIndexCache(ctx);
49  if(cellToTower.empty()) {
50  ATH_MSG_ERROR( "Failed to compute the index cache");
51  return StatusCode::FAILURE;
52  }
53 
55  if (!inputCellContainer.isValid()) {
56  ATH_MSG_ERROR( "Can't retrieve CaloCellContainer with key " << inputCellContainer.name() );
57  return StatusCode::FAILURE;
58  }
59 
61  this->makeContainer(ctx);
62  if (!caloTowerContainer.isValid())
63  return StatusCode::FAILURE;
64 
65  const size_t nCell2Tower=cellToTower.size();
66  if (nCell2Tower<inputCellContainer->size()) {
67  ATH_MSG_ERROR( "Number of cells larger than size of internal cell2tower cache. nCells="
68  << inputCellContainer->size() << ", cell2tower size=" << nCell2Tower );
69  return StatusCode::FAILURE;
70  }
71 
72  for (const CaloCell* cell : *inputCellContainer) {
73 
74  if (!m_filterCells || (cell->e()> m_cellThresholdE)) {
75 
76  const IdentifierHash cellHash=cell->caloDDE()->calo_hash();
77  assert(cellHash<cellToTower.size());
78  if (!(cellHash<cellToTower.size())) {
79  ATH_MSG_ERROR( "Cell2Tower mapping too small " << cellToTower.size() << ", expected at least" << cellHash );
80  return StatusCode::FAILURE;
81  }
82  const auto& c2ts=cellToTower[cellHash];
83  //Remember: A cell can contribute to more than one tower!
84  for (const cellToTower_t& c2t : c2ts) {
85  if (c2t.m_towerIdx > caloTowerContainer->size()) {
86  ATH_MSG_ERROR( "Tower container size too small " << caloTowerContainer->size() << ", expected at least" << c2t.m_towerIdx );
87  return StatusCode::FAILURE;
88  }
89  (*caloTowerContainer)[c2t.m_towerIdx]->addEnergy(cell->e()*c2t.m_weight);
90  }//end loop over towers coverd by this cell
91  }// end if filter cells
92  }//end loop over cells
93 
94 
95  return StatusCode::SUCCESS;
96 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ fillIndexCache()

StatusCode CaloTowerxAODAlgoBase::fillIndexCache ( const EventContext &  ctx,
CellToTowerVec cellToTower 
) const
privateinherited

Definition at line 73 of file CaloTowerxAODAlgoBase.cxx.

74 {
75  ATH_MSG_INFO("Filling cell -> tower index map");
76 
77  //Some basic sanity checks:
78  if (m_minEta>=m_maxEta) {
79  ATH_MSG_ERROR( "Configuration problem: minEta>=maxEta " << m_minEta << "," << m_maxEta );
80  return StatusCode::FAILURE;
81  }
82 
84  ATH_CHECK(caloMgrHandle.isValid());
85  const CaloDetDescrManager* theManager = *caloMgrHandle;
86 
87  //Build a dummy CaloTowerContainer
88  std::unique_ptr<xAOD::CaloTowerContainer> dummy(new xAOD::CaloTowerContainer());
89 
91 
92  const int nTowers=dummy->nTowers();
93 
94  if (nTowers<1) {
95  ATH_MSG_ERROR( "Something went wrong with tower grid config: Got container with " << nTowers << " Towers." );
96  return StatusCode::FAILURE;
97  }
98 
99  ATH_MSG_INFO("Working on tower container with dEta=" << dummy->deltaEta() << ", dPhi="
100  << dummy->deltaPhi() << ", nTowers=" << nTowers);
101 
102  cellToTower.clear();
103  cellToTower.resize(theManager->element_size()); //fixme, get calo-hash-max
104 
105  //FCAL cells are not pointing. We slice them in smaller chunks to see in which tower they go
106  const std::array<double,3> ndxFCal={{4.,4.,6.}};
107  const std::array<double,3> ndyFCal={{4.,6.,6.}};
108 
110  ddeIt!=theManager->element_end();++ddeIt) {
111 
112  const CaloDetDescrElement* dde=*ddeIt;
113 
114  if (dde->is_lar_fcal()) {
115  //special handling of FCAL cells. Inspired by LArRecUtils/src/LArFCalTowerStore.cxx
116  double xCell = dde->x();
117  double yCell = dde->y();
118  double zCell = dde->z();
119  double dxCell = dde->dx();
120  double dyCell = dde->dy();
121 
122  // get cell logical location
123  int thisModule = dde->getLayer()-1; //modules are counted 1..n, convert to 0..n-1
124  double theXBin = dxCell / ndxFCal[thisModule];
125  double theYBin = dyCell / ndyFCal[thisModule];
126  double theWeight = 1. / (ndxFCal[thisModule] * ndyFCal[thisModule]);
127 
128  // loop the cell fragments
129  for (int iX=0;iX<ndxFCal[thisModule];++iX) {
130  double x=xCell-dxCell/2.0 + iX*theXBin;
131  for (int iY=0;iY<ndyFCal[thisModule];++iY) {
132  double y=yCell-dyCell/2.0 + iY*theYBin;
133 
134  // eta,phi of fragment
135  double r = sqrt( x * x + y * y + zCell * zCell );
136  double eta = -0.5 * log((r-zCell)/(r+zCell));
137  double phi = CaloPhiRange::fix(atan2(y,x));
138  //int towerIdx=xAOD::CaloTowerGrid::index(dummy.get(),eta,phi);
139  int towerIdx=dummy->index(eta,phi);
140  if (towerIdx>=nTowers || towerIdx<0) {
141  ATH_MSG_ERROR("Found invalid tower index for FCAL cell eta/phi " << eta << "/" << phi << ", x/y=" << x << "/" << y);
142  return StatusCode::FAILURE;
143  }
144  //m_cellToTower[dde->calo_hash()].push_back(cellToTower_t(towerIdx,theWeight));
145  cellToTower[dde->calo_hash()].emplace_back(towerIdx,theWeight);
146  ATH_MSG_VERBOSE("cell hash " << dde->calo_hash() << ", goes into tower " << towerIdx << " with weight " << theWeight);
147  } //end y loop
148  } //end x loop
149  }//end FCAL
150 
151  else { //Non-FCAL subcalos:
152 
153  const double cellDeta = dde->deta();
154  const double cellDphi = dde->dphi();
155  const double etaRaw = dde->eta_raw();
156  const double phiRaw = CaloPhiRange::fix(dde->phi_raw());
157  //The following lines ar copied from the old CaloTowerStore.cxx
158  // calculate cell/tower size ratio (integer,[1..n])
159  size_t ke = (size_t) (cellDeta/dummy->deltaEta()+0.5);
160  ke = (ke==0) ? 1 : ke;
161  size_t kp = (size_t) (cellDphi/dummy->deltaPhi()+0.5);
162  kp = (kp==0) ? 1 : kp;
163  // signal weight
164  if ( ke>1 || kp>1 ) {
165  ATH_MSG_VERBOSE( "Found cell [0x" << std::hex << dde->identify().get_compact() << std::dec
166  << "] spanning several towers. nEta=" << ke << "nPhi="<<kp );
167  }
168 
169 
170  double theWeight = 1. / ( (double) ke * kp );
171  // fractional cell sizes
172  double cellDdeta = cellDeta / (double) ke;
173  double cellDdphi = cellDphi / (double) kp;
174  double etaMin = etaRaw - cellDeta / 2.;
175  double phiMin = phiRaw - cellDphi / 2.;
176 
177  //Loop over cell fragments:
178 
179  for ( size_t ie=1; ie<=ke; ie++ ){ // outer (eta) fragment loop
180  double cellEta = etaMin + ((double)ie - 0.5) * cellDdeta; // eta of fragment
181  for ( size_t ip=1; ip<=kp; ip++ ){ // inner (phi) fragement loop
182  double cellPhi = phiMin + ((double)ip - 0.5) * cellDdphi; // phi of fragment
183  int towerIdx=dummy->index(cellEta,cellPhi);
184  if (towerIdx>=nTowers || towerIdx<0) {
185  ATH_MSG_ERROR("Found invalid tower index " << towerIdx << " for cell eta/phi " << cellEta << "/" << cellPhi << " coming from " << dde->calo_hash() << "/" << ie << "/" << ip);
186  return StatusCode::FAILURE;
187  }
188  cellToTower[dde->calo_hash()].push_back(cellToTower_t(towerIdx,theWeight));
189  ATH_MSG_VERBOSE("cell hash " << dde->calo_hash() << ", goes into tower " << towerIdx << "with weight" << theWeight);
190  }//end loop over fragments (phi)
191  }// end loop over fragments (eta)
192  }//end else FCAL
193  }//end loop over detDescrElements
194 
195 
196  if (m_doxCheck) {
197  const CaloCell_ID* caloCellId;
198  ATH_CHECK(detStore()->retrieve(caloCellId));
199  for (size_t i=0;i<cellToTower.size(); ++i) {
200  const auto& towerinfo=cellToTower[i];
201  if (!towerinfo.empty()) {
202  ATH_MSG_DEBUG("Cell with index " << i << " contributes to " << towerinfo.size() << " Towers.");
203  }
204  else {
205  const Identifier id=caloCellId->cell_id(i);
206  ATH_MSG_ERROR("Cell with index " << i << ", id=0x"
207  << std::hex << id.get_identifier32().get_compact() << std::dec
208  << "does not contribute to any tower!");
209  }
210  double sumWeight=0;
211  for (const cellToTower_t& ct : towerinfo) sumWeight+=ct.m_weight;
212  if (fabs(sumWeight-1)>0.001) {
213  const Identifier id=caloCellId->cell_id(i);
214  ATH_MSG_ERROR( "Cell with index " << i << ", id=0x"
215  << std::hex << id.get_identifier32().get_compact() << std::dec
216  << ": Weights don't add up to 1.0, got " << sumWeight );
217  }
218  }//end loop over cells
219  }//end if doxCheck
220 
221  ATH_MSG_DEBUG("Built CelltoTower index table. nCells=" << cellToTower.size() << ", nTowers=" << nTowers);
222 
223  return StatusCode::SUCCESS;
224 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ finalize()

StatusCode CaloTowerxAODFromCells::finalize ( )
overridevirtual

Finalize algorithm.

Definition at line 98 of file CaloTowerxAODFromCells.cxx.

99 { return StatusCode::SUCCESS; }

◆ getIndexCache()

const CaloTowerxAODAlgoBase::CellToTowerVec & CaloTowerxAODAlgoBase::getIndexCache ( const EventContext &  ctx) const
protectedinherited

Definition at line 63 of file CaloTowerxAODAlgoBase.cxx.

64 {
65  if(!m_cellToTower.isValid()) {
66  CellToTowerVec cellToTower;
67  if(fillIndexCache(ctx,cellToTower).isFailure()) cellToTower.clear();
68  m_cellToTower.set(std::move(cellToTower));
69  }
70  return *m_cellToTower.ptr();
71 }

◆ initBase()

StatusCode CaloTowerxAODAlgoBase::initBase ( )
protectedinherited

<

Initialization of this base-class

Create xAOD::CaloTowerContainer and auxiliary store

Definition at line 30 of file CaloTowerxAODAlgoBase.cxx.

30  {
31  ATH_CHECK( m_caloTowerContainerKey.initialize() );
33  return StatusCode::SUCCESS;
34 }

◆ initialize()

StatusCode CaloTowerxAODFromCells::initialize ( )
overridevirtual

Initialize algorithm.

Definition at line 31 of file CaloTowerxAODFromCells.cxx.

31  {
32 
35 
36  // process modes
37  if ( m_filterCells ) {
38  ATH_MSG_INFO("[Configuration::Status] FilterCell mode configured with Ecell > " << m_cellThresholdE << " MeV");
39  } else {
40  ATH_MSG_INFO("[Configuration::Status] Using all cells");
41  }
42 
43  return initBase();
44 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ makeContainer()

SG::WriteHandle< xAOD::CaloTowerContainer > CaloTowerxAODAlgoBase::makeContainer ( const EventContext &  ctx) const
protectedinherited

Intialize m_cellToTower cache.

Definition at line 38 of file CaloTowerxAODAlgoBase.cxx.

39 {
42 
43  if( caloTowerContainer.record (std::make_unique<xAOD::CaloTowerContainer>(),
44  std::make_unique<xAOD::CaloTowerAuxContainer>()).isSuccess())
45  {
46  // configure the container
47  caloTowerContainer->configureGrid(m_nEtaBins,m_minEta,m_maxEta,m_nPhiBins);
48 
49  //Prefill the container:
50  const int nTowers=caloTowerContainer->nTowers();
51 
52  for (int iTower=0;iTower<nTowers;++iTower) {
53  xAOD::CaloTower* tower=new xAOD::CaloTower();
54  caloTowerContainer->push_back(tower);
55  tower->setEnergy(0.0);
56  }
57  }
58 
59  return caloTowerContainer;
60 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::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< Gaudi::Algorithm >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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  }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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_caloMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> CaloTowerxAODAlgoBase::m_caloMgrKey
protectedinherited
Initial value:
{ this
, "CaloDetDescrManager"
, "CaloDetDescrManager"
, "SG Key for CaloDetDescrManager in the Condition Store" }

Definition at line 49 of file CaloTowerxAODAlgoBase.h.

◆ m_caloTowerContainerKey

SG::WriteHandleKey<xAOD::CaloTowerContainer> CaloTowerxAODAlgoBase::m_caloTowerContainerKey
protectedinherited

Handle to xAOD::CaloTowerContainer.

Definition at line 41 of file CaloTowerxAODAlgoBase.h.

◆ m_cellThresholdE

double CaloTowerxAODFromCells::m_cellThresholdE
private

Cell energy threshold (only for FilteredCell mode)

Definition at line 45 of file CaloTowerxAODFromCells.h.

◆ m_cellToTower

CxxUtils::CachedValue<CellToTowerVec> CaloTowerxAODAlgoBase::m_cellToTower
privateinherited

map of cell indices to tower indices and weights

Definition at line 77 of file CaloTowerxAODAlgoBase.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doxCheck

bool CaloTowerxAODAlgoBase::m_doxCheck
protectedinherited

Turn on internal checks (debugging)

Definition at line 46 of file CaloTowerxAODAlgoBase.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_filterCells

bool CaloTowerxAODFromCells::m_filterCells
private

Definition at line 48 of file CaloTowerxAODFromCells.h.

◆ m_inputCellContainerKey

SG::ReadHandleKey<CaloCellContainer> CaloTowerxAODFromCells::m_inputCellContainerKey
private

Definition at line 44 of file CaloTowerxAODFromCells.h.

◆ m_maxEta

float CaloTowerxAODAlgoBase::m_maxEta
protectedinherited

Tower-grid: upper eta boundary.

Definition at line 43 of file CaloTowerxAODAlgoBase.h.

◆ m_minEta

float CaloTowerxAODAlgoBase::m_minEta
protectedinherited

Tower-grid: lower eta boundary.

Definition at line 42 of file CaloTowerxAODAlgoBase.h.

◆ m_nEtaBins

int CaloTowerxAODAlgoBase::m_nEtaBins
protectedinherited

Tower-grid: number of phi bins.

Definition at line 44 of file CaloTowerxAODAlgoBase.h.

◆ m_nPhiBins

int CaloTowerxAODAlgoBase::m_nPhiBins
protectedinherited

Tower-grid: number of phi bins.

Definition at line 45 of file CaloTowerxAODAlgoBase.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
CaloDetDescrElement::deta
float deta() const
cell deta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:356
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
beamspotman.r
def r
Definition: beamspotman.py:676
CxxUtils::CachedValue::ptr
const T * ptr() const
Return a pointer to the cached value.
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
xAOD::CaloTowerContainer_v1
Basic container storing all information need for xAOD::CaloTower_v1 objects.
Definition: CaloTowerContainer_v1.h:21
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
CaloDetDescrManager_Base::element_end
calo_element_const_iterator element_end() const
end of element vector
Definition: CaloDetDescrManager.cxx:117
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CaloDetDescrElement::y
float y() const
cell y
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:365
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
CaloTowerxAODAlgoBase::initBase
StatusCode initBase()
<
Definition: CaloTowerxAODAlgoBase.cxx:30
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CxxUtils::CachedValue::isValid
bool isValid() const
Test to see if the value is valid.
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
CaloTowerxAODAlgoBase::getIndexCache
const CellToTowerVec & getIndexCache(const EventContext &ctx) const
Definition: CaloTowerxAODAlgoBase.cxx:63
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
CaloTowerxAODAlgoBase::m_doxCheck
bool m_doxCheck
Turn on internal checks (debugging)
Definition: CaloTowerxAODAlgoBase.h:46
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
Identifier::get_compact
value_type get_compact() const
Get the compact id.
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
CaloTowerxAODFromCells::m_inputCellContainerKey
SG::ReadHandleKey< CaloCellContainer > m_inputCellContainerKey
Definition: CaloTowerxAODFromCells.h:44
x
#define x
CaloTowerxAODFromCells::m_cellThresholdE
double m_cellThresholdE
Cell energy threshold (only for FilteredCell mode)
Definition: CaloTowerxAODFromCells.h:45
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
CaloDetDescrElement::eta_raw
float eta_raw() const
cell eta_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:350
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
PlotCalibFromCool.ie
ie
Definition: PlotCalibFromCool.py:420
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
CaloDetDescrElement::identify
Identifier identify() const override final
cell identifier
Definition: CaloDetDescrElement.cxx:64
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
CaloTowerxAODAlgoBase::fillIndexCache
StatusCode fillIndexCache(const EventContext &ctx, CellToTowerVec &cellToTower) const
Definition: CaloTowerxAODAlgoBase.cxx:73
CaloDetDescrElement::calo_hash
IdentifierHash calo_hash() const
cell calo hash
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:412
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CaloTowerxAODAlgoBase::CellToTowerVec
std::vector< std::vector< cellToTower_t > > CellToTowerVec
Definition: CaloTowerxAODAlgoBase.h:63
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
lumiFormat.i
int i
Definition: lumiFormat.py:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
CaloTowerxAODAlgoBase::m_maxEta
float m_maxEta
Tower-grid: upper eta boundary.
Definition: CaloTowerxAODAlgoBase.h:43
xAOD::CaloTower
CaloTower_v1 CaloTower
Definition: Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloTower.h:13
CaloTowerxAODAlgoBase::m_minEta
float m_minEta
Tower-grid: lower eta boundary.
Definition: CaloTowerxAODAlgoBase.h:42
CaloTowerxAODAlgoBase::makeContainer
SG::WriteHandle< xAOD::CaloTowerContainer > makeContainer(const EventContext &ctx) const
Intialize m_cellToTower cache.
Definition: CaloTowerxAODAlgoBase.cxx:38
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CaloTowerxAODAlgoBase::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: CaloTowerxAODAlgoBase.h:49
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
CaloTowerxAODAlgoBase::m_nEtaBins
int m_nEtaBins
Tower-grid: number of phi bins.
Definition: CaloTowerxAODAlgoBase.h:44
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
CaloDetDescrElement::is_lar_fcal
bool is_lar_fcal() const
cell belongs to FCAL
Definition: CaloDetDescrElement.cxx:138
WriteCellNoiseToCool.cellHash
cellHash
Definition: WriteCellNoiseToCool.py:433
CaloPhiRange::fix
static double fix(double phi)
Definition: CaloPhiRange.cxx:14
calibdata.ct
ct
Definition: calibdata.py:418
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
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
SG::WriteHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CaloTowerxAODAlgoBase::CaloTowerxAODAlgoBase
CaloTowerxAODAlgoBase(const std::string &name, ISvcLocator *pSvcLocator)
Default algorithm constructor.
Definition: CaloTowerxAODAlgoBase.cxx:15
xAOD::CaloTower_v1::setEnergy
void setEnergy(double energy)
Sets the energy.
Definition: CaloTower_v1.cxx:26
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
CaloTowerxAODAlgoBase::m_cellToTower
CxxUtils::CachedValue< CellToTowerVec > m_cellToTower
map of cell indices to tower indices and weights
Definition: CaloTowerxAODAlgoBase.h:77
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
CaloTowerxAODAlgoBase::m_caloTowerContainerKey
SG::WriteHandleKey< xAOD::CaloTowerContainer > m_caloTowerContainerKey
Handle to xAOD::CaloTowerContainer.
Definition: CaloTowerxAODAlgoBase.h:41
CxxUtils::CachedValue::set
void set(const T &val) const
Set the value, assuming it is currently invalid.
CaloDetDescrManager_Base::element_begin
calo_element_const_iterator element_begin() const
first element
Definition: CaloDetDescrManager.cxx:111
CaloCell_Base_ID::cell_id
Identifier cell_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, const int phi) const
Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL,...
CaloDetDescrElement::x
float x() const
cell x
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:363
checkCorrelInHIST.iX
int iX
Definition: checkCorrelInHIST.py:491
CaloDetDescrElement::dphi
float dphi() const
cell dphi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:358
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
a
TList * a
Definition: liststreamerinfos.cxx:10
CaloDetDescrElement::getLayer
virtual int getLayer() const
cell layer
Definition: CaloDetDescrElement.cxx:85
LArCellBinning.etaMin
etaMin
Definition: LArCellBinning.py:84
y
#define y
h
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
CaloDetDescrElement::dx
float dx() const
cell dx
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:375
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CaloDetDescrManager_Base::element_size
calo_element_vec_size element_size() const
total number of elements
Definition: CaloDetDescrManager.cxx:105
CaloDetDescrElement::z
float z() const
cell z
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:367
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
checkCorrelInHIST.iY
int iY
Definition: checkCorrelInHIST.py:518
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
xAOD::CaloTower_v1
!
Definition: CaloTower_v1.h:18
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
CaloDetDescrElement::dy
float dy() const
cell dy
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:377
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
CaloTowerxAODAlgoBase::m_nPhiBins
int m_nPhiBins
Tower-grid: number of phi bins.
Definition: CaloTowerxAODAlgoBase.h:45
CaloConstIteratorAdaptor
Tranform iterator over pointers to iterator over const pointers.
Definition: CaloConstIteratorAdaptor.h:47
fitman.k
k
Definition: fitman.py:528
CaloTowerxAODFromCells::m_filterCells
bool m_filterCells
Definition: CaloTowerxAODFromCells.h:48
CaloDetDescrElement::phi_raw
float phi_raw() const
cell phi_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:352
ServiceHandle< ICondSvc >
Identifier
Definition: IdentifierFieldParser.cxx:14