|
ATLAS Offline Software
|
Algorithm to build HI-style clusters, which are essentially towers. Cluster energy is sum of cell energies x geometric weights eta/phi are (energy x geometric weight)-averaged positions. eta0/phi0 are original tower coordinates. If cluster energy is below m_E_min_mom ent, eta=eta0, phi=phi0.
More...
#include <HIClusterMaker.h>
|
| HIClusterMaker (const std::string &name, ISvcLocator *pSvcLocator) |
|
| ~HIClusterMaker () |
|
virtual StatusCode | initialize () |
|
virtual StatusCode | execute (const EventContext &ctx) const |
|
virtual StatusCode | finalize () |
|
StatusCode | dumpClusters (xAOD::CaloClusterContainer *clusColl) |
|
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 |
|
|
SG::ReadHandleKey< INavigable4MomentumCollection > | m_towerContainerKey { this, "InputTowerKey" , "CombinedTower" , "InputTowerKey"} |
| Name of input CaloTowerContainer, e.g CmbTower. More...
|
|
SG::ReadHandleKey< CaloCellContainer > | m_cellContainerKey { this, "CaloCellContainerKey" , "AllCalo" , "InputCellKey" } |
| Name of input CaloCellContainer, e.g. AllCalo. More...
|
|
SG::WriteHandleKey< xAOD::CaloClusterContainer > | m_outputKey { this, "OutputContainerKey" , "PseudoJet" , "Read version of output Container Key"} |
| Name of output CaloClusterContainer, e.g. HIClusters. More...
|
|
Gaudi::Property< float > | m_EminMoment { this, "MinimumEnergyForMoments", 50., "> E, cluster given tower coordinates" } |
| For clusters w/ E less than this, set their eta/phi to tower eta/phi. 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 to build HI-style clusters, which are essentially towers. Cluster energy is sum of cell energies x geometric weights eta/phi are (energy x geometric weight)-averaged positions. eta0/phi0 are original tower coordinates. If cluster energy is below m_E_min_mom ent, eta=eta0, phi=phi0.
- Author
- Aaron Angerami anger.nosp@m.ami@.nosp@m.cern..nosp@m.ch
- Date
- Jan, 2015
Definition at line 36 of file HIClusterMaker.h.
◆ StoreGateSvc_t
◆ HIClusterMaker()
HIClusterMaker::HIClusterMaker |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~HIClusterMaker()
HIClusterMaker::~HIClusterMaker |
( |
| ) |
|
|
inline |
◆ 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.
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ dumpClusters()
Definition at line 164 of file HIClusterMaker.cxx.
168 clusCollIter!= clusColl->
end(); ++clusCollIter)
180 ATH_MSG_ERROR(
"Can't get valid links to CaloCells (CaloClusterCellLink)!");
181 return StatusCode::FAILURE;
184 unsigned int ncells=0;
196 double cell_E_w=pCell->
energy();
199 eta_cl+=cell_E_w*pCell->
eta();
200 phi_cl+=cell_E_w*pCell->
phi();
210 << std::setw(15) <<
cl->e()
211 << std::setw(15) <<
cl->eta()
212 << std::setw(15) <<
cl->phi()
213 << std::setw(15) << E_cl
214 << std::setw(15) << eta_cl
215 << std::setw(15) << phi_cl
216 << std::setw(15) << ncells
217 << std::setw(15) <<
sumw );
219 return StatusCode::SUCCESS;
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode HIClusterMaker::execute |
( |
const EventContext & |
ctx | ) |
const |
|
virtual |
Definition at line 34 of file HIClusterMaker.cxx.
41 navInColl = readHandleTower.cptr();
46 cellColl = readHandleCell.cptr();
54 for(
const auto *towerItr : *navInColl)
68 towerItr->fillToken(cellToken,
double(1.));
73 if ( cellToken.
size() == 0 )
continue;
83 double cell_E_w=(*cellItr)->energy()*geoWeight;
87 cl->addCell(iCell,geoWeight);
90 eta_cl+=cell_E_w*(*cellItr)->eta();
91 phi_cl+=cell_E_w*(*cellItr)->phi();
92 E2_cl+=cell_E_w*cell_E_w;
93 time_cl+=cell_E_w*cell_E_w*(*cellItr)->time();
96 samplingPattern |= (0x1U<<
sample);
99 float eta0=towerItr->eta();
100 float phi0=towerItr->phi();
120 if(E2_cl < 1
e-8) time_cl=0.;
130 cl->setRawEta(eta_cl);
131 cl->setRawPhi(phi_cl);
135 cl->setAltEta(eta_cl);
136 cl->setAltPhi(phi_cl);
140 cl->setCalEta(eta_cl);
141 cl->setCalPhi(phi_cl);
145 cl->setTime(time_cl);
146 cl->setSamplingPattern(samplingPattern);
149 << std::setw(15) <<
cl->e()
150 << std::setw(15) <<
cl->eta()
151 << std::setw(15) <<
cl->phi() );
153 writeHandleContainer->push_back(std::move(
cl));
155 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
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.
86 return Algorithm::extraOutputDeps();
◆ filterPassed()
virtual bool AthReentrantAlgorithm::filterPassed |
( |
const EventContext & |
ctx | ) |
const |
|
inlinevirtualinherited |
◆ finalize()
StatusCode HIClusterMaker::finalize |
( |
| ) |
|
|
virtual |
◆ initialize()
StatusCode HIClusterMaker::initialize |
( |
| ) |
|
|
virtual |
◆ inputHandles()
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 |
Specify if the algorithm is clonable.
Reentrant algorithms are clonable.
Reimplemented in Simulation::BeamEffectsAlg, InDet::SiTrackerSpacePointFinder, InDet::SCT_Clusterization, InDet::SiSPSeededTrackFinder, SCTRawDataProvider, InDet::GNNSeedingTrackMaker, SCT_PrepDataToxAOD, RoIBResultToxAOD, InDet::SiSPGNNTrackMaker, SCT_CablingCondAlgFromCoraCool, SCT_ReadCalibDataTestAlg, SCT_CablingCondAlgFromText, SCT_ReadCalibChipDataTestAlg, SCT_TestCablingAlg, SCT_ConfigurationConditionsTestAlg, ITkPixelCablingAlg, ITkStripCablingAlg, SCTEventFlagWriter, SCT_ConditionsSummaryTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_TdaqEnabledTestAlg, SCT_SiliconConditionsTestAlg, SCTSiLorentzAngleTestAlg, SCT_ByteStreamErrorsTestAlg, SCT_ConditionsParameterTestAlg, SCT_FlaggedConditionTestAlg, SCT_StripVetoTestAlg, SCT_RawDataToxAOD, and SCTSiPropertiesTestAlg.
Definition at line 44 of file AthReentrantAlgorithm.cxx.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ setFilterPassed()
virtual void AthReentrantAlgorithm::setFilterPassed |
( |
bool |
state, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
inlinevirtualinherited |
◆ 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.
69 return Gaudi::Algorithm::sysExecute (ctx);
◆ 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.
107 if ( cs.retrieve().isFailure() ) {
109 return StatusCode::SUCCESS;
111 if (cs->regHandle(
this,*
h).isFailure()) {
112 sc = StatusCode::FAILURE;
113 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_cellContainerKey
◆ m_detStore
◆ m_EminMoment
Gaudi::Property< float > HIClusterMaker::m_EminMoment { this, "MinimumEnergyForMoments", 50., "> E, cluster given tower coordinates" } |
|
private |
For clusters w/ E less than this, set their eta/phi to tower eta/phi.
Definition at line 58 of file HIClusterMaker.h.
◆ m_evtStore
◆ 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_outputKey
◆ m_towerContainerKey
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
static std::unique_ptr< xAOD::CaloCluster > makeCluster(const CaloCellContainer *cellCont)
Creates a valid CaloCluster with a private Aux-Store and CellLink container.
virtual double phi() const override final
get phi (through CaloDetDescrElement)
static StatusCode AddContainerWriteHandle(SG::WriteHandle< xAOD::CaloClusterContainer > &clusColl)
Creates a new xAOD::CaloClusterContainer in the given WriteHandle + CaloClusterAuxContainer and recor...
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
SG::ReadHandleKey< INavigable4MomentumCollection > m_towerContainerKey
Name of input CaloTowerContainer, e.g CmbTower.
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)
bool inTowerBoundary(float eta0, float phi0, float eta, float phi)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
#define ATH_MSG_VERBOSE(x)
__HOSTDEV__ double Phi_mpi_pi(double)
SG::WriteHandleKey< xAOD::CaloClusterContainer > m_outputKey
Name of output CaloClusterContainer, e.g. HIClusters.
virtual void setOwner(IDataHandleHolder *o)=0
double energy() const
get energy (data member)
SG::ReadHandleKey< CaloCellContainer > m_cellContainerKey
Name of input CaloCellContainer, e.g. AllCalo.
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
Description of a calorimeter cluster.
AthReentrantAlgorithm()
Default constructor:
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
(Non-const) Iterator class for DataVector/DataList.
::StatusCode StatusCode
StatusCode definition for legacy code.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
void prefetchNext(Iter iter, Iter endIter)
Prefetch next object in sequence.
const_iterator begin() const
virtual StatusCode sysInitialize() override
Override sysInitialize.
Container class for CaloCell.
const_iterator end() const
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Gaudi::Property< float > m_EminMoment
For clusters w/ E less than this, set their eta/phi to tower eta/phi.
Data object for each calorimeter readout cell.
#define ATH_MSG_WARNING(x)
int findIndex(const IdentifierHash theHash) const
Return index of the cell with a given hash.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
CHILDPAR getParameter(const_child_ptr data) const
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual double eta() const override final
get eta (through CaloDetDescrElement)
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.