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 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
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
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< CaloClusterContainer > nav_t
typedef ServiceHandle< StoreGateSvc > StoreGateSvc_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< CaloCell2ClusterMap > m_cellToClusterMapKey {this, "Cell2ClusterMapName", "CaloCell2TopoCluster"}
SG::ReadHandleKey< CaloCellContainer > m_cellContainerKey {this, "CellContainerName", "AllCalo"}
SG::ReadHandleKey< CaloTowerContainer > m_towerContainerKey {this, "InputTowerContainerName", "CmbTower"}
SG::WriteHandleKey< CaloTowerContainer > m_newTowerContainerKey {this, "OutputTowerContainerName", "TopoTower"}
Gaudi::Property< double > m_minimumCellEnergy {this, "MinimumCellEnergy", -1000000000.0}
Gaudi::Property< double > m_minimumClusterEnergy {this, "MinimumClusterEnergy", -1000000000.0}
Gaudi::Property< bool > m_useCellWeights {this, "useCellWeight", true}
SG::ReadCondHandleKey< CaloNoise > m_noiseCDOKey {this,"CaloNoiseKey","totalNoise","SG Key of CaloNoise data object"}
 Key of the CaloNoise Conditions data object.
Gaudi::Property< float > m_cellESignificanceThreshold {this, "CellEnergySignificance", -1.f}
Gaudi::Property< std::vector< std::string > > m_includedCalos {this, "IncludedCalos", {}}
std::vector< CaloCell_ID::SUBCALO > m_caloIndices
bool m_caloSelection {false}
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 52 of file CaloTopoTowerAlg.h.

Member Typedef Documentation

◆ nav_t

Definition at line 90 of file CaloTopoTowerAlg.h.

◆ StoreGateSvc_t

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

Definition at line 376 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 30 of file CaloTopoTowerAlg.cxx.

30 :
31 AthReentrantAlgorithm(name, pSvcLocator)
32{
33}

◆ ~CaloTopoTowerAlg()

CaloTopoTowerAlg::~CaloTopoTowerAlg ( )
virtualdefault

Destructor.

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

DESTRUCTOR

Member Function Documentation

◆ 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 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ 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 103 of file CaloTopoTowerAlg.cxx.

104{
106 ATH_MSG_DEBUG( "In CaloTopoTowerAlg::execute()" );
107
109
110 SG::ReadHandle<CaloTowerContainer> towerContainer( m_towerContainerKey, ctx );
111 if ( !towerContainer.isValid()) {
112 ATH_MSG_WARNING( " cannot retrieve tower container with key " << towerContainer.name() );
113 return StatusCode::SUCCESS;
114 }
115
116
118 SG::WriteHandle<CaloTowerContainer> newTowerContainer(m_newTowerContainerKey, ctx);
119 if (newTowerContainer.record( std::make_unique<CaloTowerContainer> (towerContainer->towerseg()) ).isFailure()){
120 ATH_MSG_WARNING( " cannot record new tower container with key " << towerContainer.name() );
121 return StatusCode::SUCCESS;
122 }
123 newTowerContainer->init();
124
126 SG::ReadHandle<CaloCellContainer> theCells(m_cellContainerKey, ctx);
127 if ( !theCells.isValid()) {
128 ATH_MSG_WARNING( " cannot retrieve cell container with key " << theCells.name() );
129 return StatusCode::SUCCESS;
130 }
131
132 // EL to the container, to allow making other ELs quickly.
133 ElementLink<CaloCellContainer> theCellsEL (m_cellContainerKey.key(), 0, ctx);
134
136 const CaloClusterContainer* clusterContainer = nullptr;
137
138 SG::ReadHandle<CaloCell2ClusterMap> cellToClusterMap( m_cellToClusterMapKey, ctx );
139
140 if ( !cellToClusterMap.isValid() )
141 {
142 ATH_MSG_WARNING( "cannot retrieve CaloCell2ClusterMap with key <"
143 << cellToClusterMap.name() << ">" );
144 return StatusCode::SUCCESS;
145 }
146 ATH_MSG_DEBUG( "Successfully retrieved CaloCell2ClusterMap <"<< cellToClusterMap.name() << ">" );
147
149 SG::ReadCondHandle<CaloNoise> noiseHdl{m_noiseCDOKey,ctx};
150 const CaloNoise* noise=*noiseHdl;
151
152
154 CaloCell2ClusterMap::const_iterator fClusMap(cellToClusterMap->begin());
155 CaloCell2ClusterMap::const_iterator lClusMap(cellToClusterMap->end());
156 ATH_MSG_DEBUG( "Starting loop over Navigable CaloCell2ClusterMap" );
157 while ( clusterContainer == nullptr && fClusMap != lClusMap )
158 {
159 ATH_MSG_VERBOSE( "In loop over Navigable CaloCell2ClusterMap" );
160 if (*fClusMap)
161 {
162 // Pick first Navigable and then ask first entry in this
163 // Navigable for the pointer to the CaloClusterContainer.
164 // This should be sufficient because all entries should
165 // have the same pointer. (TBC)
166 ATH_MSG_DEBUG( "CaloCell2ClusterMap has entry" );
167 const nav_t* pNav = (*fClusMap);
168 clusterContainer = pNav->getContainer(pNav->begin());
169 ATH_MSG_DEBUG( "Successfully picked up CaloClusterContainer " );
170 }
171 else ++fClusMap;
172 }
173
174 // Make sure the cluster container is not NULL
175 if ( clusterContainer == nullptr )
176 {
177 if (!theCells->empty() ) {
178 ATH_MSG_WARNING( "No cluster found from CaloCell2ClusterMap, tool unusable" );
179 return StatusCode::SUCCESS;
180 }
181 else {
182 ATH_MSG_DEBUG( " empty calorimeter event .. return " );
183 return StatusCode::SUCCESS;
184 }
185 }
186 else ATH_MSG_DEBUG( "Size of CaloClusterContainer = " << clusterContainer->size() );
187
189 // (*towerIter) is the ITERATOR over TOWERS
190 // (*cellInTowerIter) is the ITERATOR over CELLS for this TOWER
191
192 ATH_MSG_DEBUG( "Beginning loop over tower grid" );
193
194 for (const CaloTower* theTower : *towerContainer) {
195 int towerIndex = towerContainer->getTowerIndex(theTower);
196
197 CaloTower* newTower = newTowerContainer->getTower(towerIndex);
198
200 ATH_MSG_VERBOSE( "In loop over tower grid: tower eta-phi" << theTower->eta() << " " << theTower->phi() );
201 CaloTower::cell_iterator cellInTowerIter(theTower->cell_begin());
202 CaloTower::cell_iterator lastCellInTower(theTower->cell_end());
203
205 double energyTower = 0.0;
206 double totalAttachedClusterEnergy = 0.0;
207 int numberOfCellsInTower = 0;
208 int numberOfAttachedCellsInTower = 0;
209 int numberOfClustersInTower = 0;
210 int totalNumberOfCellsInAttachedClusters = 0;
211
213 ATH_MSG_VERBOSE( "Now looking at all cells in this tower" );
214 for ( ; cellInTowerIter != lastCellInTower; cellInTowerIter++ )
215 {
216 numberOfCellsInTower++;
217 // geometrical cell weight in towers
218 // **** Note that in the header it says that this gets the kinematic weight
219 // **** is this somehow different from the geometrical weight?
220 double signedE = 0.0; // zero-out the energy for this cell in case we can't get it from the map
221 double weight = theTower->getCellWeight(cellInTowerIter); // get the weight of this cell in the tower
222
223 const CaloCell* cell = (*cellInTowerIter);
224 if (!cell) continue;
225
226 size_t globalIndex=0;
227 if (!(theTower->getCellIndex(cell,globalIndex)) ) {
228 ATH_MSG_WARNING( " cannot find back cell index " );
229 continue;
230 }
231
232 if (m_caloSelection) {
233 CaloCell_ID::SUBCALO iCaloNum = (cell->caloDDE()->getSubCalo()); // keep only cells from desired calorimeter
234 std::vector<CaloCell_ID::SUBCALO>::const_iterator theFound =
235 find (m_caloIndices.begin(),m_caloIndices.end(),iCaloNum);
236 if (theFound==m_caloIndices.end()) continue ;
237 }
238
239 signedE = cell->e(); // get the cell energy if we got a good pointer
240 if (!m_useCellWeights) weight = 1.0; // if we chose not to use the cell weights, reset to 1.0
241 double cellEnergy = weight * signedE; // calculate the energy of this cell in this tower using the weight
242
243
244 float signedRatio=0;
245
246 float noiseSigma = 1.0;
248 // Noise tool to calculate cell energy significance
249 noiseSigma=noise->getNoise(cell->ID(),cell->gain());
250 if ( noiseSigma > 0. ) signedRatio = signedE/noiseSigma;
251 }
252
253 // DEBUGGING
254 ATH_MSG_VERBOSE( " Cell has E = " << signedE << " eta,phi " << cell->eta() << " " << cell->phi() );
255 ATH_MSG_VERBOSE( "Cell has E in tower = " << cellEnergy );
256 ATH_MSG_VERBOSE( " Cell noise sigma = " << noiseSigma );
257 ATH_MSG_VERBOSE( " Cell noise signif = " << signedRatio );
258
260 if ( (signedE > m_minimumCellEnergy) && ( fabs(signedRatio) > m_cellESignificanceThreshold) )
261 {
262 // find clusters associated to this cell using the hash ID
263 size_t cellIndex(cell->caloDDE()->calo_hash());
264 ATH_MSG_VERBOSE( "Cell index from CaloCell2ClusterMap = " << cellIndex );
265 const nav_t* nav = (cellToClusterMap->operator[])(cellIndex);
266
268 if (!nav) {
269 ATH_MSG_VERBOSE( "No Cluster container from this cell!" );
270 }
271 else
272 {
274 ATH_MSG_VERBOSE( "Cell associated to N clusters = " << nav->size() );
275 for (const CaloCluster* clusterFromCell : *nav) {
276 double eClusRaw = clusterFromCell->getBasicEnergy();
277 double eClus = clusterFromCell->energy();
278 ATH_MSG_VERBOSE( " Cluster Basic Energy = " << eClusRaw );
279 ATH_MSG_VERBOSE( " Cluster Normal Energy = " << eClus );
280
282 if ( eClusRaw > m_minimumClusterEnergy )
283 {
284 ATH_MSG_VERBOSE( "Cluster has at least E > " << m_minimumClusterEnergy );
285
286 numberOfAttachedCellsInTower++;
287 totalNumberOfCellsInAttachedClusters += clusterFromCell->getNumberOfCells();
288 totalAttachedClusterEnergy += eClusRaw;
289 energyTower += cellEnergy;
290 numberOfClustersInTower++;
291
292 newTower->addUniqueCellNoKine(theCellsEL,globalIndex,weight, 10);
293
294 // now that we found the cell in at least one cluster above threshold, stop looking at associated clusters
295 ATH_MSG_VERBOSE( " -- Found at least one cluster passing cuts. 'break'" );
296 break;
297
298 } // cluster filter
299 } // clusters from cell loop
300 ATH_MSG_VERBOSE( "Finished cluster loop" );
301 } // cluster associated to cell
302 } // cell filter
303 } // cell loop
304 ATH_MSG_VERBOSE( "Finished cell loop" );
305
307 newTower->setE(energyTower);
308
309 // Report some information about this Topo-Tower
310 if (msgLvl(MSG::VERBOSE)) {
311 ATH_MSG_VERBOSE( "" );
312 ATH_MSG_VERBOSE( "Old/ new TopoTower energy from all cells = " << theTower->e() << " " << newTower->e() );
313 ATH_MSG_VERBOSE( "TopoTower energy adding all cells in clusters = " << energyTower );
314 ATH_MSG_VERBOSE( "Total attached cluster energy = " << totalAttachedClusterEnergy );
315 ATH_MSG_VERBOSE( "Total number of attached clusters = " << numberOfClustersInTower );
316 ATH_MSG_VERBOSE( "Number of cells in attached clusters = " << totalNumberOfCellsInAttachedClusters );
317 ATH_MSG_VERBOSE( "Total number of cells originally in tower = " << numberOfCellsInTower );
318 ATH_MSG_VERBOSE( "Total number of cells from clusters = " << numberOfAttachedCellsInTower );
319 CaloTower::cell_iterator cellInTowerIter(newTower->cell_begin());
320 CaloTower::cell_iterator lastCellInTower(newTower->cell_end());
321 msg(MSG::VERBOSE) << " E*weight, eta, phi of cells in new tower ";
322 for ( ; cellInTowerIter != lastCellInTower; cellInTowerIter++ ) {
323 double weight = theTower->getCellWeight(cellInTowerIter); // get the weight of this cell in the tower
324 const CaloCell* cell = (*cellInTowerIter);
325 if (!cell) continue;
326 msg(MSG::VERBOSE) << cell->e()*weight << " " << cell->eta() << " " << cell->phi() << " / ";
327 }
328 msg(MSG::VERBOSE) << endmsg;
329 }
330
331 } // tower loop
332
333 ATH_MSG_DEBUG( "Finished creating TopoTowers" );
334
335 return StatusCode::SUCCESS;
336
337}
#define endmsg
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_VERBOSE(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.
Gaudi::Property< bool > m_useCellWeights
Navigable< CaloClusterContainer > nav_t
std::vector< CaloCell_ID::SUBCALO > m_caloIndices
Gaudi::Property< double > m_minimumCellEnergy
Gaudi::Property< float > m_cellESignificanceThreshold
SG::ReadCondHandleKey< CaloNoise > m_noiseCDOKey
Key of the CaloNoise Conditions data object.
SG::ReadHandleKey< CaloCellContainer > m_cellContainerKey
SG::WriteHandleKey< CaloTowerContainer > m_newTowerContainerKey
SG::ReadHandleKey< CaloTowerContainer > m_towerContainerKey
SG::ReadHandleKey< CaloCell2ClusterMap > m_cellToClusterMapKey
Gaudi::Property< double > m_minimumClusterEnergy
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:861
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:140

◆ 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 & AthCommonAlgorithm< 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 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

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

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode CaloTopoTowerAlg::finalize ( )
overridevirtual

finalize

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

finalize

Definition at line 44 of file CaloTopoTowerAlg.cxx.

45{
46 return StatusCode::SUCCESS;
47}

◆ initialize()

StatusCode CaloTopoTowerAlg::initialize ( )
overridevirtual

initialize

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

INITIALIZATION

Definition at line 52 of file CaloTopoTowerAlg.cxx.

53{
54 // services
55 ATH_MSG_INFO( "Initializing CaloTopoTowerAlg" );
56
57 ATH_CHECK(m_cellToClusterMapKey.initialize());
58 ATH_CHECK(m_cellContainerKey.initialize());
59 ATH_CHECK(m_towerContainerKey.initialize());
61
62 ATH_CHECK(m_noiseCDOKey.initialize());
63
64 m_caloIndices.clear();
65 for ( unsigned int iCalos=0; iCalos< m_includedCalos.size(); iCalos++ )
66 {
67 if ( m_includedCalos[iCalos] == "LAREM" )
68 {
70 }
71 else if ( m_includedCalos[iCalos] == "LARHEC")
72 {
74 }
75 else if ( m_includedCalos[iCalos] == "LARFCAL" )
76 {
78 }
79 else if ( m_includedCalos[iCalos] == "TILE" )
80 {
82 }
83 }
84
85 m_caloSelection=false;
86 unsigned int nSubCalo=static_cast<int>(CaloCell_ID::NSUBCALO) ;
87 if (!m_caloIndices.empty() && m_caloIndices.size()<nSubCalo) m_caloSelection=true;
88
89 ATH_MSG_INFO( " Calo selection applied ? " << m_caloSelection );
90 if (m_caloSelection) {
91 msg(MSG::INFO) << " subcalo selected ";
92 for (unsigned int iCalos=0;iCalos< m_includedCalos.size(); iCalos++ ) msg(MSG::INFO) << " " << m_includedCalos[iCalos];
93 msg(MSG::INFO) << " " << endmsg;
94 }
95
96 // check setup
97 return StatusCode::SUCCESS;
98}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x,...)
Gaudi::Property< std::vector< std::string > > m_includedCalos

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

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ 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 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
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 352 of file AthCommonDataStore.h.

352 {
354 }

◆ setFilterPassed()

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

Set filter decision:

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< 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.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< 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 AthAnalysisAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_ERROR(x,...)
virtual StatusCode sysInitialize() override
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 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }

Member Data Documentation

◆ m_caloIndices

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

Definition at line 94 of file CaloTopoTowerAlg.h.

◆ m_caloSelection

bool CaloTopoTowerAlg::m_caloSelection {false}
private

Definition at line 95 of file CaloTopoTowerAlg.h.

95{false};

◆ m_cellContainerKey

SG::ReadHandleKey<CaloCellContainer> CaloTopoTowerAlg::m_cellContainerKey {this, "CellContainerName", "AllCalo"}
private

Definition at line 74 of file CaloTopoTowerAlg.h.

74{this, "CellContainerName", "AllCalo"};

◆ m_cellESignificanceThreshold

Gaudi::Property<float> CaloTopoTowerAlg::m_cellESignificanceThreshold {this, "CellEnergySignificance", -1.f}
private

Definition at line 87 of file CaloTopoTowerAlg.h.

87{this, "CellEnergySignificance", -1.f};

◆ m_cellToClusterMapKey

SG::ReadHandleKey<CaloCell2ClusterMap> CaloTopoTowerAlg::m_cellToClusterMapKey {this, "Cell2ClusterMapName", "CaloCell2TopoCluster"}
private

Definition at line 73 of file CaloTopoTowerAlg.h.

73{this, "Cell2ClusterMapName", "CaloCell2TopoCluster"};

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 381 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 378 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_includedCalos

Gaudi::Property<std::vector<std::string> > CaloTopoTowerAlg::m_includedCalos {this, "IncludedCalos", {}}
private

Definition at line 93 of file CaloTopoTowerAlg.h.

93{this, "IncludedCalos", {}};

◆ m_minimumCellEnergy

Gaudi::Property<double> CaloTopoTowerAlg::m_minimumCellEnergy {this, "MinimumCellEnergy", -1000000000.0}
private

Definition at line 79 of file CaloTopoTowerAlg.h.

79{this, "MinimumCellEnergy", -1000000000.0};

◆ m_minimumClusterEnergy

Gaudi::Property<double> CaloTopoTowerAlg::m_minimumClusterEnergy {this, "MinimumClusterEnergy", -1000000000.0}
private

Definition at line 80 of file CaloTopoTowerAlg.h.

80{this, "MinimumClusterEnergy", -1000000000.0};

◆ m_newTowerContainerKey

SG::WriteHandleKey<CaloTowerContainer> CaloTopoTowerAlg::m_newTowerContainerKey {this, "OutputTowerContainerName", "TopoTower"}
private

Definition at line 76 of file CaloTopoTowerAlg.h.

76{this, "OutputTowerContainerName", "TopoTower"};

◆ 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 85 of file CaloTopoTowerAlg.h.

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

◆ m_towerContainerKey

SG::ReadHandleKey<CaloTowerContainer> CaloTopoTowerAlg::m_towerContainerKey {this, "InputTowerContainerName", "CmbTower"}
private

Definition at line 75 of file CaloTopoTowerAlg.h.

75{this, "InputTowerContainerName", "CmbTower"};

◆ m_useCellWeights

Gaudi::Property<bool> CaloTopoTowerAlg::m_useCellWeights {this, "useCellWeight", true}
private

Definition at line 81 of file CaloTopoTowerAlg.h.

81{this, "useCellWeight", true};

◆ m_varHandleArraysDeclared

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

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 386 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: