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

============================================================ CaloTopoTowerAlg.cxx, (c) ATLAS Detector software Calorimeter/CaloRec/CaloTopoTowerAlg More...

#include <CaloTopoTowerAlg.h>

Inheritance diagram for CaloTopoTowerAlg:
Collaboration diagram for CaloTopoTowerAlg:

Public Member Functions

 CaloTopoTowerAlg (const std::string &name, ISvcLocator *pSvcLocator)
 AlgTool constructor.
virtual ~CaloTopoTowerAlg ()
 Destructor.
virtual StatusCode initialize () override
 initialize
virtual StatusCode finalize () override
 finalize
virtual StatusCode execute (const EventContext &ctx) const override
 Execute.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
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.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
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 Navigable< CaloClusterContainernav_t
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadHandleKey< CaloCell2ClusterMapm_cellToClusterMapKey
SG::ReadHandleKey< CaloCellContainerm_cellContainerKey
SG::ReadHandleKey< CaloTowerContainerm_towerContainerKey
SG::WriteHandleKey< CaloTowerContainerm_newTowerContainerKey
double m_minimumCellEnergy
double m_minimumClusterEnergy
bool m_useCellWeights
SG::ReadCondHandleKey< CaloNoisem_noiseCDOKey {this,"CaloNoiseKey","totalNoise","SG Key of CaloNoise data object"}
 Key of the CaloNoise Conditions data object.
float m_cellESignificanceThreshold
std::vector< std::string > m_includedCalos
std::vector< CaloCell_ID::SUBCALOm_caloIndices
bool m_caloSelection
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
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

Detailed Description

============================================================ CaloTopoTowerAlg.cxx, (c) ATLAS Detector software Calorimeter/CaloRec/CaloTopoTowerAlg

Build towers from raw cells that have been taken out of topo clusters. In this way, we can create noise suppressed raw towers to be saved in the AOD and thus allows re-calibration and re-do MET.

Authors :

Author
Peter Loch loch@.nosp@m.phys.nosp@m.ics.a.nosp@m.rizo.nosp@m.na.ed.nosp@m.u
Ariel Schwartzman sch@s.nosp@m.lac..nosp@m.stanf.nosp@m.ord..nosp@m.edu
David W. Miller David.nosp@m..Mil.nosp@m.ler@s.nosp@m.lac..nosp@m.stanf.nosp@m.ord..nosp@m.edu

Date : 25 February 2009

Concrete algorithm for building noise suppressed CaloTowers from standard towers using cells from topo-clusters

CaloTopoTowerAlg fills CaloCells which are used in topological clusters into CaloTowers for the LAr and Tile Calorimeters.

Author
David W. Miller David.nosp@m..W.M.nosp@m.iller.nosp@m.@cer.nosp@m.n.ch
Date
25 February 2009 - port from JetRecTool

Definition at line 48 of file CaloTopoTowerAlg.h.

Member Typedef Documentation

◆ nav_t

Definition at line 86 of file CaloTopoTowerAlg.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ CaloTopoTowerAlg()

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

AlgTool constructor.

============================================================ CaloTopoTowerAlg.cxx, (c) ATLAS Detector software Calorimeter/CaloRec/CaloTopoTowerAlg

Build towers from raw cells that have been taken out of topo clusters. In this way, we can create noise suppressed raw towers to be saved in the AOD and thus allows re-calibration and re-do MET.

Authors :

Author
Peter Loch loch@.nosp@m.phys.nosp@m.ics.a.nosp@m.rizo.nosp@m.na.ed.nosp@m.u
Ariel Schwartzman sch@s.nosp@m.lac..nosp@m.stanf.nosp@m.ord..nosp@m.edu
David W. Miller David.nosp@m..Mil.nosp@m.ler@s.nosp@m.lac..nosp@m.stanf.nosp@m.ord..nosp@m.edu

Date : 25 February 2009

==============================================

DEFAULT CONSTRUCTOR

Definition at line 32 of file CaloTopoTowerAlg.cxx.

32 :
33 AthReentrantAlgorithm(name, pSvcLocator),
34 m_cellToClusterMapKey("CaloCell2TopoCluster"),
35 m_cellContainerKey("AllCalo"),
36 m_towerContainerKey("CmbTower"),
37 m_newTowerContainerKey("TopoTower"),
38 m_caloSelection(false)
39{
40
41 // Containers needed for this algorithm
42 declareProperty("Cell2ClusterMapName", m_cellToClusterMapKey);
43 declareProperty("CellContainerName" , m_cellContainerKey);
44 declareProperty("InputTowerContainerName" , m_towerContainerKey);
45 declareProperty("OutputTowerContainerName", m_newTowerContainerKey );
46
47 // Declare configurable properties of the algorithm
48 declareProperty("MinimumCellEnergy", m_minimumCellEnergy = -1000000000.0);
49 declareProperty("MinimumClusterEnergy", m_minimumClusterEnergy = -1000000000.0);
50
51 declareProperty("CellEnergySignificance", m_cellESignificanceThreshold = -1);
52
53 // Calo from which to use cells
54 declareProperty("IncludedCalos", m_includedCalos);
55
56 declareProperty("useCellWeight", m_useCellWeights=true);
57
58}
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::vector< std::string > m_includedCalos
SG::ReadHandleKey< CaloCellContainer > m_cellContainerKey
SG::WriteHandleKey< CaloTowerContainer > m_newTowerContainerKey
SG::ReadHandleKey< CaloTowerContainer > m_towerContainerKey
SG::ReadHandleKey< CaloCell2ClusterMap > m_cellToClusterMapKey
float m_cellESignificanceThreshold

◆ ~CaloTopoTowerAlg()

CaloTopoTowerAlg::~CaloTopoTowerAlg ( )
virtualdefault

Destructor.

==============================================

DESTRUCTOR

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::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.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ declareGaudiProperty()

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

◆ declareProperty()

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

◆ evtStore()

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.

◆ execute()

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

Execute.

==============================================

EXECUTE

Say hello

retrieve existing Tower container

create new tower container with same tower segmentation and record it to StoreGate

get CaloCell container from StoreGate

+++ pick up CaloCell2ClusterMap from StoreGate

Get CaloNoise CDO

+++ consistency: pick up CaloClusterContainer pointer from map

+++ loop on towers

+++ loop cells in old tower

Various counters for keeping track of energy added to this tower

+++ Look at all cells in this tower

Require that the cell have a minimum energy and energy significance

Require that the cell be used in at least one cluster

+++ Loop over all clusters associated to this cell

filter clusters according to cluster energy

Set tower energy according to the energy from cells in clusters passing selections

Definition at line 128 of file CaloTopoTowerAlg.cxx.

129{
131 ATH_MSG_DEBUG( "In CaloTopoTowerAlg::execute()" );
132
134
135 SG::ReadHandle<CaloTowerContainer> towerContainer( m_towerContainerKey, ctx );
136 if ( !towerContainer.isValid()) {
137 ATH_MSG_WARNING( " cannot retrieve tower container with key " << towerContainer.name() );
138 return StatusCode::SUCCESS;
139 }
140
141
143 SG::WriteHandle<CaloTowerContainer> newTowerContainer(m_newTowerContainerKey, ctx);
144 if (newTowerContainer.record( std::make_unique<CaloTowerContainer> (towerContainer->towerseg()) ).isFailure()){
145 ATH_MSG_WARNING( " cannot record new tower container with key " << towerContainer.name() );
146 return StatusCode::SUCCESS;
147 }
148 newTowerContainer->init();
149
151 SG::ReadHandle<CaloCellContainer> theCells(m_cellContainerKey, ctx);
152 if ( !theCells.isValid()) {
153 ATH_MSG_WARNING( " cannot retrieve cell container with key " << theCells.name() );
154 return StatusCode::SUCCESS;
155 }
156
157 // EL to the container, to allow making other ELs quickly.
158 ElementLink<CaloCellContainer> theCellsEL (m_cellContainerKey.key(), 0, ctx);
159
161 const CaloClusterContainer* clusterContainer = nullptr;
162
163 SG::ReadHandle<CaloCell2ClusterMap> cellToClusterMap( m_cellToClusterMapKey, ctx );
164
165 if ( !cellToClusterMap.isValid() )
166 {
167 ATH_MSG_WARNING( "cannot retrieve CaloCell2ClusterMap with key <"
168 << cellToClusterMap.name() << ">" );
169 return StatusCode::SUCCESS;
170 }
171 ATH_MSG_DEBUG( "Successfully retrieved CaloCell2ClusterMap <"<< cellToClusterMap.name() << ">" );
172
174 SG::ReadCondHandle<CaloNoise> noiseHdl{m_noiseCDOKey,ctx};
175 const CaloNoise* noise=*noiseHdl;
176
177
179 CaloCell2ClusterMap::const_iterator fClusMap(cellToClusterMap->begin());
180 CaloCell2ClusterMap::const_iterator lClusMap(cellToClusterMap->end());
181 ATH_MSG_DEBUG( "Starting loop over Navigable CaloCell2ClusterMap" );
182 while ( clusterContainer == nullptr && fClusMap != lClusMap )
183 {
184 ATH_MSG_VERBOSE( "In loop over Navigable CaloCell2ClusterMap" );
185 if (*fClusMap)
186 {
187 // Pick first Navigable and then ask first entry in this
188 // Navigable for the pointer to the CaloClusterContainer.
189 // This should be sufficient because all entries should
190 // have the same pointer. (TBC)
191 ATH_MSG_DEBUG( "CaloCell2ClusterMap has entry" );
192 const nav_t* pNav = (*fClusMap);
193 clusterContainer = pNav->getContainer(pNav->begin());
194 ATH_MSG_DEBUG( "Successfully picked up CaloClusterContainer " );
195 }
196 else ++fClusMap;
197 }
198
199 // Make sure the cluster container is not NULL
200 if ( clusterContainer == nullptr )
201 {
202 if (!theCells->empty() ) {
203 ATH_MSG_WARNING( "No cluster found from CaloCell2ClusterMap, tool unusable" );
204 return StatusCode::SUCCESS;
205 }
206 else {
207 ATH_MSG_DEBUG( " empty calorimeter event .. return " );
208 return StatusCode::SUCCESS;
209 }
210 }
211 else ATH_MSG_DEBUG( "Size of CaloClusterContainer = " << clusterContainer->size() );
212
214 // (*towerIter) is the ITERATOR over TOWERS
215 // (*cellInTowerIter) is the ITERATOR over CELLS for this TOWER
216
217 ATH_MSG_DEBUG( "Beginning loop over tower grid" );
218
219 for (const CaloTower* theTower : *towerContainer) {
220 int towerIndex = towerContainer->getTowerIndex(theTower);
221
222 CaloTower* newTower = newTowerContainer->getTower(towerIndex);
223
225 ATH_MSG_VERBOSE( "In loop over tower grid: tower eta-phi" << theTower->eta() << " " << theTower->phi() );
226 CaloTower::cell_iterator cellInTowerIter(theTower->cell_begin());
227 CaloTower::cell_iterator lastCellInTower(theTower->cell_end());
228
230 double energyTower = 0.0;
231 double totalAttachedClusterEnergy = 0.0;
232 int numberOfCellsInTower = 0;
233 int numberOfAttachedCellsInTower = 0;
234 int numberOfClustersInTower = 0;
235 int totalNumberOfCellsInAttachedClusters = 0;
236
238 ATH_MSG_VERBOSE( "Now looking at all cells in this tower" );
239 for ( ; cellInTowerIter != lastCellInTower; cellInTowerIter++ )
240 {
241 numberOfCellsInTower++;
242 // geometrical cell weight in towers
243 // **** Note that in the header it says that this gets the kinematic weight
244 // **** is this somehow different from the geometrical weight?
245 double signedE = 0.0; // zero-out the energy for this cell in case we can't get it from the map
246 double weight = theTower->getCellWeight(cellInTowerIter); // get the weight of this cell in the tower
247
248 const CaloCell* cell = (*cellInTowerIter);
249 if (!cell) continue;
250
251 size_t globalIndex=0;
252 if (!(theTower->getCellIndex(cell,globalIndex)) ) {
253 ATH_MSG_WARNING( " cannot find back cell index " );
254 continue;
255 }
256
257 if (m_caloSelection) {
258 CaloCell_ID::SUBCALO iCaloNum = (cell->caloDDE()->getSubCalo()); // keep only cells from desired calorimeter
259 std::vector<CaloCell_ID::SUBCALO>::const_iterator theFound =
260 find (m_caloIndices.begin(),m_caloIndices.end(),iCaloNum);
261 if (theFound==m_caloIndices.end()) continue ;
262 }
263
264 signedE = cell->e(); // get the cell energy if we got a good pointer
265 if (!m_useCellWeights) weight = 1.0; // if we chose not to use the cell weights, reset to 1.0
266 double cellEnergy = weight * signedE; // calculate the energy of this cell in this tower using the weight
267
268
269 float signedRatio=0;
270
271 float noiseSigma = 1.0;
273 // Noise tool to calculate cell energy significance
274 noiseSigma=noise->getNoise(cell->ID(),cell->gain());
275 if ( noiseSigma > 0. ) signedRatio = signedE/noiseSigma;
276 }
277
278 // DEBUGGING
279 ATH_MSG_VERBOSE( " Cell has E = " << signedE << " eta,phi " << cell->eta() << " " << cell->phi() );
280 ATH_MSG_VERBOSE( "Cell has E in tower = " << cellEnergy );
281 ATH_MSG_VERBOSE( " Cell noise sigma = " << noiseSigma );
282 ATH_MSG_VERBOSE( " Cell noise signif = " << signedRatio );
283
285 if ( (signedE > m_minimumCellEnergy) && ( fabs(signedRatio) > m_cellESignificanceThreshold) )
286 {
287 // find clusters associated to this cell using the hash ID
288 size_t cellIndex(cell->caloDDE()->calo_hash());
289 ATH_MSG_VERBOSE( "Cell index from CaloCell2ClusterMap = " << cellIndex );
290 const nav_t* nav = (cellToClusterMap->operator[])(cellIndex);
291
293 if (!nav) {
294 ATH_MSG_VERBOSE( "No Cluster container from this cell!" );
295 }
296 else
297 {
299 ATH_MSG_VERBOSE( "Cell associated to N clusters = " << nav->size() );
300 for (const CaloCluster* clusterFromCell : *nav) {
301 double eClusRaw = clusterFromCell->getBasicEnergy();
302 double eClus = clusterFromCell->energy();
303 ATH_MSG_VERBOSE( " Cluster Basic Energy = " << eClusRaw );
304 ATH_MSG_VERBOSE( " Cluster Normal Energy = " << eClus );
305
307 if ( eClusRaw > m_minimumClusterEnergy )
308 {
309 ATH_MSG_VERBOSE( "Cluster has at least E > " << m_minimumClusterEnergy );
310
311 numberOfAttachedCellsInTower++;
312 totalNumberOfCellsInAttachedClusters += clusterFromCell->getNumberOfCells();
313 totalAttachedClusterEnergy += eClusRaw;
314 energyTower += cellEnergy;
315 numberOfClustersInTower++;
316
317 newTower->addUniqueCellNoKine(theCellsEL,globalIndex,weight, 10);
318
319 // now that we found the cell in at least one cluster above threshold, stop looking at associated clusters
320 ATH_MSG_VERBOSE( " -- Found at least one cluster passing cuts. 'break'" );
321 break;
322
323 } // cluster filter
324 } // clusters from cell loop
325 ATH_MSG_VERBOSE( "Finished cluster loop" );
326 } // cluster associated to cell
327 } // cell filter
328 } // cell loop
329 ATH_MSG_VERBOSE( "Finished cell loop" );
330
332 newTower->setE(energyTower);
333
334 // Report some information about this Topo-Tower
335 if (msgLvl(MSG::VERBOSE)) {
336 ATH_MSG_VERBOSE( "" );
337 ATH_MSG_VERBOSE( "Old/ new TopoTower energy from all cells = " << theTower->e() << " " << newTower->e() );
338 ATH_MSG_VERBOSE( "TopoTower energy adding all cells in clusters = " << energyTower );
339 ATH_MSG_VERBOSE( "Total attached cluster energy = " << totalAttachedClusterEnergy );
340 ATH_MSG_VERBOSE( "Total number of attached clusters = " << numberOfClustersInTower );
341 ATH_MSG_VERBOSE( "Number of cells in attached clusters = " << totalNumberOfCellsInAttachedClusters );
342 ATH_MSG_VERBOSE( "Total number of cells originally in tower = " << numberOfCellsInTower );
343 ATH_MSG_VERBOSE( "Total number of cells from clusters = " << numberOfAttachedCellsInTower );
344 CaloTower::cell_iterator cellInTowerIter(newTower->cell_begin());
345 CaloTower::cell_iterator lastCellInTower(newTower->cell_end());
346 msg(MSG::VERBOSE) << " E*weight, eta, phi of cells in new tower ";
347 for ( ; cellInTowerIter != lastCellInTower; cellInTowerIter++ ) {
348 double weight = theTower->getCellWeight(cellInTowerIter); // get the weight of this cell in the tower
349 const CaloCell* cell = (*cellInTowerIter);
350 if (!cell) continue;
351 msg(MSG::VERBOSE) << cell->e()*weight << " " << cell->eta() << " " << cell->phi() << " / ";
352 }
353 msg(MSG::VERBOSE) << endmsg;
354 }
355
356 } // tower loop
357
358 ATH_MSG_DEBUG( "Finished creating TopoTowers" );
359
360 return StatusCode::SUCCESS;
361
362}
#define endmsg
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
CaloClusterContainer
Definition CaloTPCnv.cxx:21
bool msgLvl(const MSG::Level lvl) const
CaloCell_Base_ID::SUBCALO SUBCALO
Definition CaloCell_ID.h:50
void addUniqueCellNoKine(const CaloCellContainer *theContainer, index_type theIndex, double weight, size_t size_hint=0)
Add a cell (very fast)
cell_iterator cell_begin() const
Retrieve a STL-type begin() iterator for the cell store.
cell_iterator cell_end() const
Retrieve a STL-type end() iterator for the cell store.
Navigable< CaloClusterContainer > nav_t
std::vector< CaloCell_ID::SUBCALO > m_caloIndices
SG::ReadCondHandleKey< CaloNoise > m_noiseCDOKey
Key of the CaloNoise Conditions data object.
virtual double e() const override final
get energy data member
CaloEnergyCluster::cell_iterator cell_iterator
Iterator on CaloCell s.
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
size_type size() const noexcept
Returns the number of elements in the collection.
virtual void setE(double theE)
set energy data member
Definition P4EEtaPhiM.h:114
std::string find(const std::string &s)
return a remapped string
Definition hcg.cxx:138

◆ 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 & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ finalize()

StatusCode CaloTopoTowerAlg::finalize ( )
overridevirtual

finalize

==============================================

finalize

Definition at line 69 of file CaloTopoTowerAlg.cxx.

70{
71 return StatusCode::SUCCESS;
72}

◆ initialize()

StatusCode CaloTopoTowerAlg::initialize ( )
overridevirtual

initialize

==============================================

INITIALIZATION

Definition at line 77 of file CaloTopoTowerAlg.cxx.

78{
79 // services
80 ATH_MSG_INFO( "Initializing CaloTopoTowerAlg" );
81
82 ATH_CHECK(m_cellToClusterMapKey.initialize());
83 ATH_CHECK(m_cellContainerKey.initialize());
84 ATH_CHECK(m_towerContainerKey.initialize());
86
87 ATH_CHECK(m_noiseCDOKey.initialize());
88
89 m_caloIndices.clear();
90 for ( unsigned int iCalos=0; iCalos< m_includedCalos.size(); iCalos++ )
91 {
92 if ( m_includedCalos[iCalos] == "LAREM" )
93 {
95 }
96 else if ( m_includedCalos[iCalos] == "LARHEC")
97 {
99 }
100 else if ( m_includedCalos[iCalos] == "LARFCAL" )
101 {
103 }
104 else if ( m_includedCalos[iCalos] == "TILE" )
105 {
107 }
108 }
109
110 m_caloSelection=false;
111 unsigned int nSubCalo=static_cast<int>(CaloCell_ID::NSUBCALO) ;
112 if (!m_caloIndices.empty() && m_caloIndices.size()<nSubCalo) m_caloSelection=true;
113
114 ATH_MSG_INFO( " Calo selection applied ? " << m_caloSelection );
115 if (m_caloSelection) {
116 msg(MSG::INFO) << " subcalo selected ";
117 for (unsigned int iCalos=0;iCalos< m_includedCalos.size(); iCalos++ ) msg(MSG::INFO) << " " << m_includedCalos[iCalos];
118 msg(MSG::INFO) << " " << endmsg;
119 }
120
121 // check setup
122 return StatusCode::SUCCESS;
123}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)

◆ 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()

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ 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();
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< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::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 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::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 HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
#define ATH_MSG_ERROR(x)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

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

Member Data Documentation

◆ m_caloIndices

std::vector<CaloCell_ID::SUBCALO> CaloTopoTowerAlg::m_caloIndices
private

Definition at line 90 of file CaloTopoTowerAlg.h.

◆ m_caloSelection

bool CaloTopoTowerAlg::m_caloSelection
private

Definition at line 91 of file CaloTopoTowerAlg.h.

◆ m_cellContainerKey

SG::ReadHandleKey<CaloCellContainer> CaloTopoTowerAlg::m_cellContainerKey
private

Definition at line 70 of file CaloTopoTowerAlg.h.

◆ m_cellESignificanceThreshold

float CaloTopoTowerAlg::m_cellESignificanceThreshold
private

Definition at line 83 of file CaloTopoTowerAlg.h.

◆ m_cellToClusterMapKey

SG::ReadHandleKey<CaloCell2ClusterMap> CaloTopoTowerAlg::m_cellToClusterMapKey
private

Definition at line 69 of file CaloTopoTowerAlg.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_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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_includedCalos

std::vector<std::string> CaloTopoTowerAlg::m_includedCalos
private

Definition at line 89 of file CaloTopoTowerAlg.h.

◆ m_minimumCellEnergy

double CaloTopoTowerAlg::m_minimumCellEnergy
private

Definition at line 75 of file CaloTopoTowerAlg.h.

◆ m_minimumClusterEnergy

double CaloTopoTowerAlg::m_minimumClusterEnergy
private

Definition at line 76 of file CaloTopoTowerAlg.h.

◆ m_newTowerContainerKey

SG::WriteHandleKey<CaloTowerContainer> CaloTopoTowerAlg::m_newTowerContainerKey
private

Definition at line 72 of file CaloTopoTowerAlg.h.

◆ m_noiseCDOKey

SG::ReadCondHandleKey<CaloNoise> CaloTopoTowerAlg::m_noiseCDOKey {this,"CaloNoiseKey","totalNoise","SG Key of CaloNoise data object"}
private

Key of the CaloNoise Conditions data object.

Typical values are '"electronicNoise', 'pileupNoise', or '"totalNoise' (default)

Definition at line 81 of file CaloTopoTowerAlg.h.

81{this,"CaloNoiseKey","totalNoise","SG Key of CaloNoise data object"};

◆ m_towerContainerKey

SG::ReadHandleKey<CaloTowerContainer> CaloTopoTowerAlg::m_towerContainerKey
private

Definition at line 71 of file CaloTopoTowerAlg.h.

◆ m_useCellWeights

bool CaloTopoTowerAlg::m_useCellWeights
private

Definition at line 77 of file CaloTopoTowerAlg.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: