Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <RpcClusteringAlg.h>
|
StatusCode | initialize () override final |
|
StatusCode | execute (const EventContext &ctx) const override final |
|
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< xAOD::RpcStripContainer > | m_readKey {this, "ReadKey", "xRpcStrips"} |
|
SG::WriteHandleKey< xAOD::RpcStripContainer > | m_writeKey {this, "WriteKey", "xRpcClusters"} |
|
SG::WriteDecorHandleKey< xAOD::RpcStripContainer > | m_linkKey {this, "LinkKey", m_writeKey, "rpcConstituents"} |
|
Gaudi::Property< unsigned > | m_maxHoles {this, "maxHoles", 1, "maximum holes between two strips"} |
|
Gaudi::Property< unsigned > | m_maxSize {this, "maxSize", 5, "Maximum size of a cluster to grow"} |
|
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 |
|
Definition at line 14 of file RpcClusteringAlg.h.
◆ LinkType
◆ StoreGateSvc_t
◆ cardinality()
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 75 of file AthCommonReentrantAlgorithm.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()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode MuonR4::RpcClusteringAlg::execute |
( |
const EventContext & |
ctx | ) |
const |
|
finaloverride |
Helper object returning ranges per chamber
Sort the hits per layer
Cluster the sorted hits
Sort the hits by channel
Definition at line 20 of file RpcClusteringAlg.cxx.
25 ATH_CHECK(outContainer.record(std::make_unique<xAOD::RpcStripContainer>(),
26 std::make_unique<xAOD::RpcStripAuxContainer>()));
30 auto createCluster = [&](std::vector<const xAOD::RpcStrip*>& constituents) {
31 if (constituents.empty())
return;
33 (*cluster) = (*constituents[constituents.size()/2]);
36 constituents[constituents.size() -1]->localPosition<1>().
x())};
39 cluster->setMeasurement(
cluster->identifierHash(), std::move(locPos), std::move(locCov));
42 float midTime{0.f}, midTimeCov{0.f};
44 links.emplace_back(*inContainer,
strip->index());
45 midTime+=
strip->time();
46 midTimeCov+=
strip->timeCovariance();
48 midTime /= constituents.size();
49 midTimeCov /= constituents.size();
54 spread /=
std::pow(constituents.size(), 2);
57 cluster->setTimeCovariance(midTimeCov);
63 std::size_t seenHits{};
65 seenHits+=hitsPerChamber.
size();
67 std::vector<std::vector<const xAOD::RpcStrip*>> sortedHits{};
69 const unsigned int layerHash =
strip->layerHash();
70 if (layerHash >= sortedHits.size()) {
71 sortedHits.resize(layerHash +1);
73 sortedHits[layerHash].push_back(strip);
76 for (std::vector<const xAOD::RpcStrip*>& hitsInLay : sortedHits){
77 if (hitsInLay.empty())
continue;
79 std::sort(hitsInLay.begin(), hitsInLay.end(),
81 return a->stripNumber() < b->stripNumber();
83 uint16_t lastChannel = hitsInLay[0]->stripNumber();
84 std::vector<const xAOD::RpcStrip*> groupedHits{};
87 (!groupedHits.empty() && 1
u*(
strip->stripNumber() - groupedHits[0]->stripNumber()) >
m_maxSize)){
88 createCluster(groupedHits);
90 groupedHits.push_back(strip);
92 createCluster(groupedHits);
95 }
while (hitsPerChamber.next());
96 if (seenHits != inContainer->size()) {
97 ATH_MSG_FATAL(
"Detected inconsistency between the hits in container "<<inContainer->size()<<
98 " and what's returned by the chamber viewer "<<seenHits);
99 return StatusCode::FAILURE;
101 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()
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.
◆ filterPassed()
◆ initialize()
StatusCode MuonR4::RpcClusteringAlg::initialize |
( |
| ) |
|
|
finaloverride |
◆ 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()
◆ 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()
◆ sysExecute()
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.
◆ sysInitialize()
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 61 of file AthCommonReentrantAlgorithm.cxx.
110 if (
sc.isFailure()) {
118 if ( cs.retrieve().isFailure() ) {
120 return StatusCode::SUCCESS;
122 if (cs->regHandle(
this,*
h).isFailure()) {
123 sc = StatusCode::FAILURE;
124 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_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
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_linkKey
◆ m_maxHoles
Gaudi::Property<unsigned> MuonR4::RpcClusteringAlg::m_maxHoles {this, "maxHoles", 1, "maximum holes between two strips"} |
|
private |
◆ m_maxSize
Gaudi::Property<unsigned> MuonR4::RpcClusteringAlg::m_maxSize {this, "maxSize", 5, "Maximum size of a cluster to grow"} |
|
private |
◆ m_readKey
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_writeKey
The documentation for this class was generated from the following files:
std::size_t size() const noexcept
Returns how many hits are in the current chamber.
SG::WriteDecorHandleKey< xAOD::RpcStripContainer > m_linkKey
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
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)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
std::vector< ElementLink< xAOD::RpcStripContainer > > LinkType
Gaudi::Property< unsigned > m_maxHoles
@ u
Enums for curvilinear frames.
virtual void setOwner(IDataHandleHolder *o)=0
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
SG::WriteHandleKey< xAOD::RpcStripContainer > m_writeKey
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
Eigen::Matrix< float, N, 1 > MeasVector
Abrivation of the Matrix & Covariance definitions.
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Gaudi::Property< unsigned > m_maxSize
SG::ReadHandleKey< xAOD::RpcStripContainer > m_readKey
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual StatusCode sysInitialize() override
Override sysInitialize.
Eigen::Matrix< float, N, N > MeasMatrix
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
constexpr int pow(int base, int exp) noexcept
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>