![]() |
ATLAS Offline Software
|
A cluster builder tool forming topo-clusters representing calorimeter tower signals on a regular grid in \( (\eta,\phi) \) space. More...
#include <CaloTopoTowerFromClusterMaker.h>
Public Member Functions | |
| CaloTopoTowerFromClusterMaker (const std::string &type, const std::string &name, const IInterface *pParent) | |
| Tool constructor. | |
| ServiceHandle< StoreGateSvc > & | evtStore () |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. | |
| const ServiceHandle< StoreGateSvc > & | detStore () const |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. | |
| virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. | |
| virtual StatusCode | sysStart () override |
| Handle START transition. | |
| virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. | |
| virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. | |
| Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T, V, H > &t) |
| void | updateVHKA (Gaudi::Details::PropertyBase &) |
| MsgStream & | msg () const |
| bool | msgLvl (const MSG::Level lvl) const |
@c AthAlgTool and @c CaloClusterCellProcessor interface implementations | |
| virtual StatusCode | initialize () override |
| Setting up the operational mode and corresponding parameters. | |
| virtual StatusCode | execute (const EventContext &ctx, xAOD::CaloClusterContainer *pClusCont, CaloCellClusterWeights *cellWeights) const override |
Execute the tool and fill the xAOD::CaloClusterContainer pointed to by pClusCont. | |
| virtual StatusCode | finalize () override |
| Finalize the tool (no action) | |
Static Public Member Functions | |
| static const InterfaceID & | interfaceID () |
| Standard Gaudi interface ID method. | |
Protected Member Functions | |
| void | renounceArray (SG::VarHandleKeyArray &handlesArray) |
| remove all handles from I/O resolution | |
| std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > | renounce (T &h) |
| void | extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps) |
| Add StoreName to extra input/output deps as needed. | |
Private Types | |
| typedef ServiceHandle< StoreGateSvc > | StoreGateSvc_t |
Internally used types | |
| typedef std::vector< CaloProtoCluster > | protocont_t |
Container for CaloProtoCluster objects. | |
| typedef std::size_t | uint_t |
| Unsigned integral type. | |
Private Member Functions | |
| bool | addCellToProtoCluster (const CaloTowerGeometry *towerGeo, const CaloCell *cptr, protocont_t &pProtoCont, double weight=1.) const |
| Adding cells to proto-clusters. | |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> | |
Tower builders | |
| uint_t | buildInclTowers (const CaloTowerGeometry *towerGeo, const CaloCellContainer &pCellCont, protocont_t &pProtoCont) const |
| Inclusive towers. | |
| uint_t | buildExclTowers (const CaloTowerGeometry *towerGeo, const CaloCellContainer &pCellCont, protocont_t &pProtoCont) const |
| Exclusive towers. | |
| uint_t | buildEMTopoTowers (const CaloTowerGeometry *towerGeo, const xAOD::CaloClusterContainer &clusCont, protocont_t &protoCont) const |
| EM topo-towers. | |
| uint_t | buildLCWTopoTowers (const CaloTowerGeometry *towerGeo, const xAOD::CaloClusterContainer &clusCont, protocont_t &protoCont, CaloCellClusterWeights *cellWeights) const |
| LCW topo-towers. | |
Private Attributes | |
| 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 |
Tool properties | |
| SG::ReadCondHandleKey< CaloTowerGeometry > | m_towerGeoKey {this,"TowerGeometry","CaloTowerGeometry"} |
| the name of the key of the CaloTowerGeometry object in the ConditonsStore | |
| SG::ReadCondHandleKey< CaloDetDescrManager > | m_caloMgrKey {this,"CaloDetDescrManager", "CaloDetDescrManager"} |
| SG::ReadHandleKey< xAOD::CaloClusterContainer > | m_clusterContainerKey |
| Topo-cluster container key. | |
| SG::ReadHandleKey< CaloCellContainer > | m_cellContainerKey |
| Calorimeter cell container. | |
| bool | m_orderByPt = { false } |
Orders cluster container by \( p_{\text{T}} \), default true. | |
| bool | m_prepareLCW = { false } |
Prepare LCW calibration, default is false. | |
| bool | m_useCellsFromClusters = { true } |
Use cells from topo-clusters if true, else use all cells, default is true. | |
| bool | m_applyCellEnergyThreshold = { false } |
Apply cell energy threshold, default is false. | |
| bool | m_doCellIndexCheck = { false } |
Check cell hash index consistency if true (default false) | |
| bool | m_buildCombinedSignal = { false } |
| Build topo-clusters within given \( y \) range, else topo-towers. | |
| double | m_energyThreshold |
Cell energy threshold, default is set in m_energyThresholdDef. | |
| double | m_clusterRange |
| Range where topo-clusters are used when m_buildCombinedSignal = true | |
| bool | m_removeSamplingData = { true } |
| Remove sampling data for towers. | |
Excluded samplings | |
| std::vector< CaloSampling::CaloSample > | m_excludedSamplings |
List of excluded samplings (CaloSampling::CaloSample enumerators) | |
| std::vector< std::string > | m_excludedSamplingsName |
| List of excluded samplings (human-readable names) | |
| std::bitset< _CALOTOPOTOWERFROMCLUSTERMAKER_BITSET_SIZE > | m_excludedSamplingsPattern |
| Bit pattern indicates if sampling is excluded. | |
Constants and parameters | |
| uint_t | m_numberOfSamplings |
| Number of samplings. | |
| static const double | m_energyThresholdDef = -100000000. |
| Default energy threshold. | |
| static const double | m_clusterRangeDef = 5. |
| Default cluster \( y \) range. | |
| static const uint_t | m_errorValueUINT = uint_t(-1) |
Error value for uint_t type values. | |
Internally used helpers | |
| static xAOD::CaloCluster::ClusterSize | getClusterSize (uint_t etaBins, uint_t phiBins) |
| Returns a cluster size tag from number of eta and phi bins in tower grid. | |
| static xAOD::CaloCluster::ClusterSize | getClusterSize (uint_t towerBins) |
| Returns a cluster size tag from number of towers (bins) in tower grid. | |
| int | cleanupCells (const CaloTowerGeometry *towerGeo, CaloClusterCellLink *clk, uint_t nclus) const |
Checks CaloClusterCellLink for consistency. | |
Helpers | |
| static bool | filterProtoCluster (const CaloClusterCellLink &clnk) |
| Checks for and removes invalid cell links. | |
| bool | checkCellIndices (const CaloTowerGeometry *towerGeo, const CaloDetDescrManager *caloDDM, const CaloCellContainer *pCellCont) const |
| Checks consistency between cell indices and hash identifiers. | |
| bool | isValidIndex (uint_t idx) const |
| Checks if argument is a valid index value. | |
| uint_t | badIndexValue () const |
| Returns value indicating a bad index. | |
A cluster builder tool forming topo-clusters representing calorimeter tower signals on a regular grid in \( (\eta,\phi) \) space.
By default, EM-scale topo-towers are created from cells in topo-clusters.
This tool fills EM-scale towers and stores them as xAOD::CaloCluster. It supports several operational modes, which are controlled by tool properties. It fills a container of type xAOD::CaloClusterContainer. The properties controlling its specific behavior are:
| Properties defining tool behavior | |||
| Property name | Property type | Default value | Comment |
| OrderClusterByPt | bool | false | if true, the xAOD::CaloClusterContainer is ordered by \( p_{\rm T}^{\rm clus} \). See further comments below. |
| PrepareLCW | bool | false | if true, the tool fills a CaloCellClusterWeights object and records it into the event store to be used by CaloTopoClusterFromTowerCalibrator |
| UseCellsFromClusters | bool | true | if true, only cells from topo-clusters are used to fill the towers (topo-towers); else, inclusive towers are filled with all cells. |
| Properties setting variables for operational modes | |||
| Property name | Property type | Default value | Comment |
| CellEnergyThreshold | double | m_energyThresholdDef | cell energy threshold used in exclusive mode only. See further comments below. |
| CellContainerKey | SG::ReadHandleKey<CaloCellContainer> | "AllCalo" | cell container key is needed to pick up CaloCellContainer for all operational modes. |
| ClusterContainerKey | SG::ReadHandleKey<xAOD::CaloClusterContainer> | "CaloTopoClusters" | cluster container key is needed to pick up xAOD::CaloClusterContainer for filtered mode (UseCellsFromCluster = true) |
| CellClusterWeightKey | SG::WriteHandleKey<CaloCellClusterWeights> | −N/A− | key for CaloCellClusterWeights object is needed if PrepareLCW = true. Default is empty key. |
| BuildCombinedTopoSignal | bool | false | turns on combined topo-cluster/topo-tower output, with topo-clusters used within the rapidity range defined by TopoClusterRange and topo-towers elsewhere. |
TopoClusterRange
double
5.
sets the range \( y_{\rm topo-cluster}^{\rm max} \) for using topo-clusters when BuildCombinedTopoSignal = true; topo-clusters with \( \left|y_{\rm topo-cluster}\right| < y_{\rm topo-cluster}^{\rm max} \) are used.
The towers can be classified as:
CaloTopoClusterFromTowerCalibrator tool after the cluster moment calculators. The values of the UseEnergyThreshold and CellEnergyThreshold properties are ignored in this mode. A valid event store key needs to be provided in the to pick up the topo-cluster container. Note that building EM topo-towers requires topo-clusters on EM scale (no LCW applied) to get the correct geometrical cell weights only. LCW topo-towers require LCW scale topo-clusters to get the correct full geometrical and calibration weights.mixed mode Cells contributing to standard topo-clusters are collected into towers if these topo-clusters are outside of a give rapidity range. The rapidity range is defined by the TopoClusterRange property. This mode is turned on by setting the property BuildCombinedTopoSignal = true. It is turned off by default (BuildCombinedTopoSignal = false). EM scale and LCW scale is possible, as in the filtered mode.
Configuration 2 and 3 are exclusive, with 3 overwriting 2. The output topo-clusters represent calorimeter towers on the EM scale. The can be handed to cluster moment tools (needs EM scale) and, if desired, to a dedicated cluster calibration tool of type xAOD::CaloTowerClusterFromTowerCalibrator .
To avoid multiple retrievals of the same weights by searching for cells in (many) topo-clusters, the overall weight of the cell signal is stored in a random access look-up table stored in a CaloCellClusterWeights object in the detector store. This object is created by this tool, if needed. If the tool property CellWeightLookupKey is set, this object will be generated, filled, and recorded. This is essential for calibrated topo-towers!
Definition at line 37 of file CaloTopoTowerFromClusterMaker.h.
|
private |
Container for CaloProtoCluster objects.
Definition at line 57 of file CaloTopoTowerFromClusterMaker.h.
|
privateinherited |
Definition at line 388 of file AthCommonDataStore.h.
|
private |
Unsigned integral type.
Definition at line 58 of file CaloTopoTowerFromClusterMaker.h.
| CaloTopoTowerFromClusterMaker::CaloTopoTowerFromClusterMaker | ( | const std::string & | type, |
| const std::string & | name, | ||
| const IInterface * | pParent ) |
Tool constructor.
Definition at line 50 of file CaloTopoTowerFromClusterMaker.cxx.
|
private |
Adding cells to proto-clusters.
true if cell successfully added to one (or more) proto-clusters| cptr | pointer ton non-modifiable CaloCell object |
| pProtoCont | reference to proto-cluster container |
| weight | additional (global) weight of cell (e.g. for geometrical weight for combined EM-scale signals) |
Definition at line 437 of file CaloTopoTowerFromClusterMaker.cxx.
|
inlineprivate |
Returns value indicating a bad index.
Definition at line 145 of file CaloTopoTowerFromClusterMaker.h.
|
private |
EM topo-towers.
Definition at line 304 of file CaloTopoTowerFromClusterMaker.cxx.
|
private |
Exclusive towers.
Definition at line 419 of file CaloTopoTowerFromClusterMaker.cxx.
|
private |
Inclusive towers.
false in case of problems with data access or inconsistent data structures| pCellCont | reference to non-modifiable CaloCellContainer@param pProtoCont reference to CaloProtoCluster container filled on output. |
| clusCont | reference to non-modifiable xAOD::CaloClusterContainer@param protoCont reference to modifiable proto-cluster container |
Definition at line 401 of file CaloTopoTowerFromClusterMaker.cxx.
|
private |
LCW topo-towers.
Definition at line 352 of file CaloTopoTowerFromClusterMaker.cxx.
|
private |
Checks consistency between cell indices and hash identifiers.
Definition at line 521 of file CaloTopoTowerFromClusterMaker.cxx.
|
private |
Checks CaloClusterCellLink for consistency.
Definition at line 475 of file CaloTopoTowerFromClusterMaker.cxx.
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
|
inlineinherited |
Definition at line 145 of file AthCommonDataStore.h.
|
inlineinherited |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition at line 95 of file AthCommonDataStore.h.
|
inlineinherited |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition at line 85 of file AthCommonDataStore.h.
|
overridevirtual |
Execute the tool and fill the xAOD::CaloClusterContainer pointed to by pClusCont.
Implements CaloTowerCollectionProcessor.
Definition at line 183 of file CaloTopoTowerFromClusterMaker.cxx.
|
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
|
staticprivate |
Checks for and removes invalid cell links.
Definition at line 518 of file CaloTopoTowerFromClusterMaker.cxx.
|
overridevirtual |
Finalize the tool (no action)
Definition at line 180 of file CaloTopoTowerFromClusterMaker.cxx.
|
staticprivate |
Returns a cluster size tag from number of eta and phi bins in tower grid.
Definition at line 462 of file CaloTopoTowerFromClusterMaker.cxx.
|
staticprivate |
Returns a cluster size tag from number of towers (bins) in tower grid.
Definition at line 465 of file CaloTopoTowerFromClusterMaker.cxx.
|
overridevirtual |
Setting up the operational mode and corresponding parameters.
Definition at line 78 of file CaloTopoTowerFromClusterMaker.cxx.
|
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.
|
inlinestaticinherited |
Standard Gaudi interface ID method.
Definition at line 45 of file CaloTowerCollectionProcessor.h.
|
inlineprivate |
Checks if argument is a valid index value.
Definition at line 146 of file CaloTopoTowerFromClusterMaker.h.
|
inlineinherited |
Definition at line 24 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 30 of file AthCommonMsg.h.
|
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.
|
inlineprotectedinherited |
Definition at line 380 of file AthCommonDataStore.h.
|
inlineprotectedinherited |
remove all handles from I/O resolution
Definition at line 364 of file AthCommonDataStore.h.
|
overridevirtualinherited |
Perform system initialization for an algorithm.
We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.
Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.
|
overridevirtualinherited |
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
|
inlineinherited |
Definition at line 308 of file AthCommonDataStore.h.
|
private |
Apply cell energy threshold, default is false.
Definition at line 73 of file CaloTopoTowerFromClusterMaker.h.
|
private |
Build topo-clusters within given \( y \) range, else topo-towers.
Definition at line 75 of file CaloTopoTowerFromClusterMaker.h.
|
private |
Definition at line 66 of file CaloTopoTowerFromClusterMaker.h.
|
private |
Calorimeter cell container.
Definition at line 69 of file CaloTopoTowerFromClusterMaker.h.
|
private |
Topo-cluster container key.
Definition at line 68 of file CaloTopoTowerFromClusterMaker.h.
|
private |
Range where topo-clusters are used when m_buildCombinedSignal = true
Definition at line 77 of file CaloTopoTowerFromClusterMaker.h.
|
staticprivate |
Default cluster \( y \) range.
Definition at line 88 of file CaloTopoTowerFromClusterMaker.h.
|
privateinherited |
Pointer to StoreGate (detector store by default)
Definition at line 393 of file AthCommonDataStore.h.
|
private |
Check cell hash index consistency if true (default false)
Definition at line 74 of file CaloTopoTowerFromClusterMaker.h.
|
private |
Cell energy threshold, default is set in m_energyThresholdDef.
Definition at line 76 of file CaloTopoTowerFromClusterMaker.h.
|
staticprivate |
Default energy threshold.
Definition at line 87 of file CaloTopoTowerFromClusterMaker.h.
|
staticprivate |
Error value for uint_t type values.
Definition at line 89 of file CaloTopoTowerFromClusterMaker.h.
|
privateinherited |
Pointer to StoreGate (event store by default)
Definition at line 390 of file AthCommonDataStore.h.
|
private |
List of excluded samplings (CaloSampling::CaloSample enumerators)
Definition at line 135 of file CaloTopoTowerFromClusterMaker.h.
|
private |
List of excluded samplings (human-readable names)
Definition at line 136 of file CaloTopoTowerFromClusterMaker.h.
|
private |
Bit pattern indicates if sampling is excluded.
Definition at line 137 of file CaloTopoTowerFromClusterMaker.h.
|
private |
Number of samplings.
Definition at line 85 of file CaloTopoTowerFromClusterMaker.h.
|
private |
Orders cluster container by \( p_{\text{T}} \), default true.
Definition at line 70 of file CaloTopoTowerFromClusterMaker.h.
|
private |
Prepare LCW calibration, default is false.
Definition at line 71 of file CaloTopoTowerFromClusterMaker.h.
|
private |
Remove sampling data for towers.
Definition at line 78 of file CaloTopoTowerFromClusterMaker.h.
|
private |
the name of the key of the CaloTowerGeometry object in the ConditonsStore
Definition at line 65 of file CaloTopoTowerFromClusterMaker.h.
|
private |
Use cells from topo-clusters if true, else use all cells, default is true.
Definition at line 72 of file CaloTopoTowerFromClusterMaker.h.
|
privateinherited |
Definition at line 399 of file AthCommonDataStore.h.
|
privateinherited |
Definition at line 398 of file AthCommonDataStore.h.