ATLAS Offline Software
Loading...
Searching...
No Matches
InDet::SCT_Clusterization Class Reference

Form clusters from SCT Raw Data Objects. More...

#include <SCT_Clusterization.h>

Inheritance diagram for InDet::SCT_Clusterization:

Public Member Functions

 SCT_Clusterization (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor with parameters:
virtual StatusCode sysInitialize () override
 Override sysInitialize.
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
Usual algorithm methods
virtual StatusCode initialize () override
 Retrieve the tools used and initialize handle keys.
virtual StatusCode execute (const EventContext &ctx) const override
 Form clusters and record them in StoreGate by WriteHandle.
virtual StatusCode finalize () override
 Finalize (nothing done actually).
virtual bool isClonable () const override
 Make this algorithm clonable.

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< 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>
Disallow default instantiation, copy, assignment
 SCT_Clusterization ()=delete
 SCT_Clusterization (const SCT_Clusterization &)=delete
SCT_Clusterizationoperator= (const SCT_Clusterization &)=delete

Private Attributes

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
Service and Tool Handles and ID helper
ToolHandle< IRegSelToolm_regionSelector {this, "RegSelTool", "RegSelTool/RegSel_SCT", "region selector tool for HLT"}
ToolHandle< ISCT_ClusteringToolm_clusteringTool {this, "clusteringTool", "InDet::SCT_ClusteringTool"}
ToolHandle< IInDetConditionsToolm_pSummaryTool {this, "conditionsTool", "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool", "Tool to retrieve SCT conditions summary"}
ToolHandle< GenericMonitoringToolm_monTool { this, "MonTool", "", "Monitoring tool" }
const SCT_IDm_idHelper {nullptr}
Read, Write and Update HandleKeys

StoreGate accesses in AthenaMT way

SG::ReadHandleKey< TrigRoiDescriptorCollectionm_roiCollectionKey {this, "RoIs", "", "RoIs to read in"}
SG::ReadHandleKey< SCT_RDO_Containerm_rdoContainerKey {this, "DataObjectName", "SCT_RDOs", "SCT RDOs"}
SG::WriteHandleKey< SCT_ClusterContainer > m_clusterContainerKey {this, "ClustersName", "SCT_Clusters", "SCT cluster container"}
SG::WriteHandleKey< SiClusterContainer > m_clusterContainerLinkKey {this, "ClustersLinkName_", "SCT_Clusters", "SCT cluster container link name (don't set this)"}
SG::WriteHandleKey< IDCInDetBSErrContainerm_flaggedCondDataKey {this, "SCT_FlaggedCondData", "SCT_FlaggedCondData", "SCT flagged conditions data"}
SG::UpdateHandleKey< SCT_ClusterContainerCache > m_clusterContainerCacheKey
 For HLT cache.
SG::UpdateHandleKey< IDCInDetBSErrContainer_Cachem_flaggedCondCacheKey
 For HLT cache.
SG::ReadHandleKey< InDet::SiDetectorElementStatusm_sctDetElStatus {this, "SCTDetElStatus", "", "Key of SiDetectorElementStatus for SCT"}
 Optional read handle to get status data to test whether a SCT detector element is good.
Flags to configure SCT_Clusterization
UnsignedIntegerProperty m_maxFiredStrips {this, "maxFiredStrips", 384, "Threshold of number of fired strips per wafer, to mask noisy modules. 0 disables the per-wafer cut."}
UnsignedIntegerProperty m_maxTotalOccupancyPercent {this, "maxTotalOccupancyInPercent", 100, "Threshold of percentage of fired strips for the whole SCT. 100 disables the whole SCT cut."}
BooleanProperty m_roiSeeded {this, "isRoI_Seeded", false, "Use RoI"}
BooleanProperty m_checkBadModules {this, "checkBadModules", true, "Flag to check bad modules using InDetSCT_ConditionsSummaryTool"}
Gaudi::Property< bool > m_useDataPoolWithCache

Detailed Description

Form clusters from SCT Raw Data Objects.

The class loops over an RDO grouping strips and creating collections of clusters, subsequently recorded in StoreGate using WriteHandle(Key). Uses SCT_ConditionsTools to determine which strips to include.

Definition at line 53 of file SCT_Clusterization.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ SCT_Clusterization() [1/3]

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

Constructor with parameters:

Definition at line 29 of file SCT_Clusterization.cxx.

29 :
30 AthReentrantAlgorithm(name, pSvcLocator)
31 {}

◆ SCT_Clusterization() [2/3]

InDet::SCT_Clusterization::SCT_Clusterization ( )
privatedelete

◆ SCT_Clusterization() [3/3]

InDet::SCT_Clusterization::SCT_Clusterization ( const SCT_Clusterization & )
privatedelete

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.

62{
63 return 0;
64}

◆ 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 InDet::SCT_Clusterization::execute ( const EventContext & ctx) const
overridevirtual

Form clusters and record them in StoreGate by WriteHandle.

Definition at line 72 of file SCT_Clusterization.cxx.

72 {
73 //Monitoring Tool Configuration
74 auto mnt_timer_Total = Monitored::Timer<std::chrono::milliseconds>("TIME_Total");
75 auto mnt_timer_SummaryTool = Monitored::Timer<std::chrono::milliseconds>("TIME_SummaryTool");
76 auto mnt_timer_Clusterize = Monitored::Timer<std::chrono::milliseconds>("TIME_Clusterize");
77 // Register the IdentifiableContainer into StoreGate
78 SG::WriteHandle<SCT_ClusterContainer> clusterContainer{m_clusterContainerKey, ctx};
79 if (m_clusterContainerCacheKey.key().empty()) {
80 ATH_CHECK(clusterContainer.record(std::make_unique<SCT_ClusterContainer>(m_idHelper->wafer_hash_max(), EventContainers::Mode::OfflineFast)));
81 } else {
82 SG::UpdateHandle<SCT_ClusterContainerCache> clusterContainercache{m_clusterContainerCacheKey, ctx};
83 ATH_CHECK(clusterContainer.record(std::make_unique<SCT_ClusterContainer>(clusterContainercache.ptr())));
84 }
85 ATH_MSG_DEBUG("Container '" << clusterContainer.name() << "' initialised");
86
88 ATH_CHECK(clusterContainer.isValid());
89 ATH_MSG_DEBUG("SCT clusters '" << clusterContainer.name() << "' symlinked in StoreGate");
90
91 SG::WriteHandle<IDCInDetBSErrContainer> flaggedCondData{m_flaggedCondDataKey, ctx};
92 if (m_flaggedCondCacheKey.key().empty()) {
93 ATH_CHECK(flaggedCondData.record( std::make_unique<IDCInDetBSErrContainer>(m_idHelper->wafer_hash_max(), std::numeric_limits<IDCInDetBSErrContainer::ErrorCode>::min())));
94 ATH_MSG_DEBUG("Created IDCInDetBSErrContainer w/o using external cache");
95 } else {
96 SG::UpdateHandle<IDCInDetBSErrContainer_Cache> flaggedCondCacheHandle(m_flaggedCondCacheKey, ctx);
97 ATH_CHECK(flaggedCondCacheHandle.isValid() );
98 ATH_CHECK(flaggedCondData.record( std::make_unique<IDCInDetBSErrContainer>(flaggedCondCacheHandle.ptr())) );
99 ATH_MSG_DEBUG("Created SCT IDCInDetBSErrContainer using external cache");
100 }
101 std::unordered_map<IdentifierHash, IDCInDetBSErrContainer::ErrorCode> flaggedCondMap; // temporary store of flagged condition error
102
103 // First, we have to retrieve and access the container, not because we want to
104 // use it, but in order to generate the proxies for the collections, if they
105 // are being provided by a container converter.
106 SG::ReadHandle<SCT_RDO_Container> rdoContainer{m_rdoContainerKey, ctx};
107 ATH_CHECK(rdoContainer.isValid());
108
109 SCT_RDO_Container::const_iterator rdoCollections{rdoContainer->begin()};
110 SCT_RDO_Container::const_iterator rdoCollectionsEnd{rdoContainer->end()};
111 bool dontDoClusterization{false};
112 //new code to remove large numbers of hits (what is large?)
113 if (m_maxTotalOccupancyPercent.value()!=100) {
114 constexpr unsigned int totalNumberOfChannels{6279168};
115 const unsigned int maxAllowableStrips{(totalNumberOfChannels*m_maxTotalOccupancyPercent.value())/100};//integer arithmetic, should be ok
116 unsigned int totalFiredStrips{0};
117 for (; rdoCollections != rdoCollectionsEnd; ++rdoCollections) {
118 for (const SCT_RDORawData* rdo: **rdoCollections) {
119 totalFiredStrips += rdo->getGroupSize();
120 }
121 } //iterator is now at the end
122 //reset the iterator
123 rdoCollections = rdoContainer->begin();
124 if (totalFiredStrips > maxAllowableStrips) {
125 ATH_MSG_WARNING("This event has too many hits in the SCT: " << totalFiredStrips << " > " << maxAllowableStrips);
126 dontDoClusterization = true;
127 }
128 }
129 SG::ReadHandle<InDet::SiDetectorElementStatus> sctDetElStatus;
130 if (!m_sctDetElStatus.empty()) {
131 sctDetElStatus=SG::ReadHandle<InDet::SiDetectorElementStatus>(m_sctDetElStatus, ctx);
132 ATH_CHECK( sctDetElStatus.isValid() ? StatusCode::SUCCESS : StatusCode::FAILURE);
133 }
134
135 if (not dontDoClusterization) {
136 std::unique_ptr<DataPool<SCT_Cluster>> dataItemsPool = nullptr;
137 const bool hasExternalCache = rdoContainer->hasExternalCache();
138 if (!hasExternalCache) {
139 dataItemsPool = std::make_unique<DataPool<SCT_Cluster>>(ctx);
140 dataItemsPool->reserve(20000); // Some large default size
141 } else if (m_useDataPoolWithCache) {
142 dataItemsPool = std::make_unique<DataPool<SCT_Cluster>>(ctx);
143 // this is per view so let it expand on its own in blocks
144 }
145 // cache to avoid re-allocation inside the loop.
146 // Trying to re-use the vector capacities.
147 // we clear them inside the methods we call
148
149 SCTClusteringCache cache;
150 cache.currentVector.reserve(32);
151 cache.idGroups.reserve(16);
152 cache.tbinGroups.reserve(16);
153 if (not m_roiSeeded.value()) { // Full-scan mode
154
155 for (; rdoCollections != rdoCollectionsEnd; ++rdoCollections) {
156 const InDetRawDataCollection<SCT_RDORawData>* rd{*rdoCollections};
157 ATH_MSG_DEBUG("RDO collection size=" << rd->size() << ", Hash="
158 << rd->identifyHash());
159 SCT_ClusterContainer::IDC_WriteHandle lock{
160 clusterContainer->getWriteHandle(rdoCollections.hashId())};
161 if (lock.OnlineAndPresentInAnotherView()) {
163 "Item already in cache , Hash=" << rd->identifyHash());
164 continue;
165 }
166 bool goodModule{
167 m_checkBadModules.value()
168 ? (!m_sctDetElStatus.empty()
169 ? sctDetElStatus->isGood(rd->identifyHash())
170 : m_pSummaryTool->isGood(rd->identifyHash(), ctx))
171 : true};
173 m_checkBadModules.value() && !m_sctDetElStatus.empty(),
174 sctDetElStatus->isGood(rd->identifyHash()),
175 m_pSummaryTool->isGood(rd->identifyHash(), ctx));
176
177 if (!goodModule) {
178 ATH_MSG_DEBUG(" module status is bad");
179 }
180 // Check the RDO is not empty and that the wafer is good according to
181 // the conditions
182 if ((not rd->empty()) and goodModule) {
183 // If more than a certain number of RDOs set module to bad
184 if (m_maxFiredStrips.value()) {
185 unsigned int nFiredStrips{0};
186 for (const SCT_RDORawData* rdo : *rd) {
187 nFiredStrips += rdo->getGroupSize();
188 }
189 if (nFiredStrips > m_maxFiredStrips.value()) {
190 // This should work in the case of a new code or existing, since
191 // the default init is 0
192 constexpr int value =
194 auto [pPair, inserted] =
195 flaggedCondMap.insert({rd->identifyHash(), value});
196 if (not inserted) {
197 pPair->second |= value;
198 }
199 continue;
200 }
201 }
202 // Use one of the specific clustering AlgTools to make clusters
203 std::unique_ptr<SCT_ClusterCollection> clusterCollection{
204 m_clusteringTool->clusterize(
205 *rd, *m_idHelper,
206 !m_sctDetElStatus.empty() ? sctDetElStatus.cptr() : nullptr,
207 cache, dataItemsPool.get(), ctx)};
208 if (clusterCollection) {
209 if (not clusterCollection->empty()) {
210 const IdentifierHash hash{clusterCollection->identifyHash()};
211 ATH_CHECK(lock.addOrDelete(std::move(clusterCollection)));
212 ATH_MSG_DEBUG("Clusters with key '"
213 << hash << "' added to Container\n");
214 } else {
215 ATH_MSG_DEBUG("Don't write empty collections\n");
216 }
217 } else {
218 ATH_MSG_DEBUG("Clustering algorithm found no clusters\n");
219 }
220 }
221 }
222 } else { // enter RoI-seeded mode
223 SG::ReadHandle<TrigRoiDescriptorCollection> roiCollection{
224 m_roiCollectionKey, ctx};
225 ATH_CHECK(roiCollection.isValid());
226 TrigRoiDescriptorCollection::const_iterator roi{roiCollection->begin()};
227 TrigRoiDescriptorCollection::const_iterator roiE{roiCollection->end()};
228 std::vector<IdentifierHash> listOfSCTIds;
229 for (; roi != roiE; ++roi) {
230 listOfSCTIds.clear(); // Prevents needless memory reallocations
231
232 m_regionSelector->lookup(ctx)->HashIDList( **roi, listOfSCTIds );
233
234 ATH_MSG_VERBOSE(**roi);
235 ATH_MSG_VERBOSE("REGTEST: SCT : Roi contains " << listOfSCTIds.size()
236 << " det. Elements");
237 for (size_t i{0}; i < listOfSCTIds.size(); i++) {
238 IdentifierHash id = listOfSCTIds[i];
239 const InDetRawDataCollection<SCT_RDORawData>* RDO_Collection{
240 rdoContainer->indexFindPtr(id)};
241 if (RDO_Collection == nullptr){
242 continue;
243 }
244 bool goodModule;
245 {
246 Monitored::ScopedTimer time_SummaryTool(mnt_timer_SummaryTool);
247 goodModule = {m_checkBadModules.value()
248 ? (!m_sctDetElStatus.empty()
249 ? sctDetElStatus->isGood(id)
250 : m_pSummaryTool->isGood(id, ctx))
251 : true};
253 m_checkBadModules.value() && !m_sctDetElStatus.empty(),
254 sctDetElStatus->isGood(id), m_pSummaryTool->isGood(id));
255 if (!goodModule){
256 ATH_MSG_VERBOSE("module status flagged as BAD");
257 }
258 }
259 // Check the RDO is not empty and that the wafer is good according
260 // to the conditions
261 if ((not RDO_Collection->empty()) and goodModule) {
262 // If more than a certain number of RDOs set module to bad
263 if (m_maxFiredStrips.value()) {
264 unsigned int nFiredStrips{0};
265 for (const SCT_RDORawData* rdo : *RDO_Collection){
266 nFiredStrips += rdo->getGroupSize();
267 }
268 if (nFiredStrips > m_maxFiredStrips.value()) {
269 // This should work in the case of a new code or existing,
270 // since the default init is 0
271 constexpr int value =
273 auto [pPair, inserted] = flaggedCondMap.insert({id, value});
274 if (not inserted) {
275 pPair->second |= value;
276 }
277 continue;
278 }
279 }
280 }
281
282 SCT_ClusterContainer::IDC_WriteHandle lock{
283 clusterContainer->getWriteHandle(listOfSCTIds[i])};
284 if (lock.OnlineAndPresentInAnotherView()) {
285 ATH_MSG_DEBUG("Item already in cache , Hash=" << listOfSCTIds[i]);
286 continue;
287 }
288
289 // Use one of the specific clustering AlgTools to make clusters
290 {
291 Monitored::ScopedTimer time_Clusterize(mnt_timer_Clusterize);
292 std::unique_ptr<SCT_ClusterCollection> clusterCollection{
293 m_clusteringTool->clusterize(
294 *RDO_Collection, *m_idHelper,
295 !m_sctDetElStatus.empty() ? sctDetElStatus.cptr()
296 : nullptr,
297 cache, dataItemsPool.get(), ctx)};
298 if (clusterCollection and (not clusterCollection->empty())) {
299 ATH_MSG_VERBOSE("REGTEST: SCT : clusterCollection contains " << clusterCollection->size() << " clusters");
300 ATH_CHECK(lock.addOrDelete(std::move(clusterCollection)));
301 } else {
302 ATH_MSG_DEBUG("No SCTClusterCollection to write");
303 }
304 }
305 }
306 }
307 }
308 }
309 // Set container to const
310 ATH_CHECK(clusterContainer.setConst());
311
312 // Fill flaggedCondData
313 for (auto [hash, error] : flaggedCondMap) {
314 flaggedCondData->setOrDrop(hash, error);
315 }
316 auto monTime = Monitored::Group(m_monTool, mnt_timer_Total, mnt_timer_Clusterize, mnt_timer_SummaryTool);
317 return StatusCode::SUCCESS;
318 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
#define VALIDATE_STATUS_ARRAY(use_info, info_val, summary_val)
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
size_type size() const noexcept
Returns the number of elements in the collection.
bool empty() const noexcept
Returns true if the collection is empty.
virtual IdentifierHash identifyHash() const override final
ToolHandle< ISCT_ClusteringTool > m_clusteringTool
ToolHandle< GenericMonitoringTool > m_monTool
SG::WriteHandleKey< SiClusterContainer > m_clusterContainerLinkKey
ToolHandle< IInDetConditionsTool > m_pSummaryTool
SG::ReadHandleKey< SCT_RDO_Container > m_rdoContainerKey
SG::UpdateHandleKey< IDCInDetBSErrContainer_Cache > m_flaggedCondCacheKey
For HLT cache.
SG::WriteHandleKey< IDCInDetBSErrContainer > m_flaggedCondDataKey
ToolHandle< IRegSelTool > m_regionSelector
SG::ReadHandleKey< InDet::SiDetectorElementStatus > m_sctDetElStatus
Optional read handle to get status data to test whether a SCT detector element is good.
UnsignedIntegerProperty m_maxTotalOccupancyPercent
Gaudi::Property< bool > m_useDataPoolWithCache
SG::WriteHandleKey< SCT_ClusterContainer > m_clusterContainerKey
UnsignedIntegerProperty m_maxFiredStrips
SG::UpdateHandleKey< SCT_ClusterContainerCache > m_clusterContainerCacheKey
For HLT cache.
SG::ReadHandleKey< TrigRoiDescriptorCollection > m_roiCollectionKey
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
pointer_type ptr()
Dereference the pointer.
StatusCode setConst()
Set the 'const' bit for the bound proxy in the store.
const std::string & name() const
Return the StoreGate ID for the referenced object.
StatusCode symLink(const WriteHandleKey< U > &key)
Make an explicit link.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const IIntersectionCache * cache() const
Retrieve the associated cache block, if it exists.

◆ 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.

88{
89 // If we didn't find any symlinks to add, just return the collection
90 // from the base class. Otherwise, return the extended collection.
91 if (!m_extendedExtraObjects.empty()) {
93 }
95}
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 InDet::SCT_Clusterization::finalize ( )
overridevirtual

Finalize (nothing done actually).

Definition at line 321 of file SCT_Clusterization.cxx.

322 {
323 return StatusCode::SUCCESS;
324 }

◆ initialize()

StatusCode InDet::SCT_Clusterization::initialize ( )
overridevirtual

Retrieve the tools used and initialize handle keys.

Definition at line 34 of file SCT_Clusterization.cxx.

34 {
35 // Get the conditions summary service (continue anyway, just check the pointer
36 // later and declare everything to be 'good' if it is nullptr)
37 ATH_CHECK( m_pSummaryTool.retrieve( DisableTool{!m_checkBadModules.value() || (!m_sctDetElStatus.empty() && !VALIDATE_STATUS_ARRAY_ACTIVATED)} ) );
38
40
41 ATH_CHECK(m_rdoContainerKey.initialize());
42 ATH_CHECK(m_clusterContainerKey.initialize());
45 ATH_CHECK(m_flaggedCondDataKey.initialize());
46 ATH_CHECK(m_flaggedCondCacheKey.initialize(not m_flaggedCondCacheKey.key().empty()));
47
48 ATH_CHECK(m_sctDetElStatus.initialize( !m_sctDetElStatus.empty() ));
49
50 // Get the clustering tool
51 ATH_CHECK(m_clusteringTool.retrieve());
52
53 // Get the SCT ID helper
54 ATH_CHECK(detStore()->retrieve(m_idHelper, "SCT_ID"));
55
56 if (m_roiSeeded.value()) {
57 ATH_CHECK(m_roiCollectionKey.initialize());
58 ATH_CHECK(m_regionSelector.retrieve());
59 } else {
60 ATH_CHECK(m_roiCollectionKey.initialize(false));
61 m_regionSelector.disable();
62 }
63
64 if ( !m_monTool.empty() ) {
65 ATH_CHECK(m_monTool.retrieve() );
66 }
67
68 return StatusCode::SUCCESS;
69 }
const ServiceHandle< StoreGateSvc > & detStore() const

◆ 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 InDet::SCT_Clusterization::isClonable ( ) const
inlineoverridevirtual

Make this algorithm clonable.

Reimplemented from AthCommonReentrantAlgorithm< Gaudi::Algorithm >.

Definition at line 69 of file SCT_Clusterization.h.

69{ return true; };

◆ 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 }

◆ operator=()

SCT_Clusterization & InDet::SCT_Clusterization::operator= ( const SCT_Clusterization & )
privatedelete

◆ 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.

75{
76 return BaseAlg::sysExecute (ctx);
77}

◆ 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.

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

BooleanProperty InDet::SCT_Clusterization::m_checkBadModules {this, "checkBadModules", true, "Flag to check bad modules using InDetSCT_ConditionsSummaryTool"}
private

Definition at line 123 of file SCT_Clusterization.h.

123{this, "checkBadModules", true, "Flag to check bad modules using InDetSCT_ConditionsSummaryTool"};

◆ m_clusterContainerCacheKey

SG::UpdateHandleKey<SCT_ClusterContainerCache> InDet::SCT_Clusterization::m_clusterContainerCacheKey
private
Initial value:
{
this, "ClusterContainerCacheKey", ""}

For HLT cache.

Definition at line 104 of file SCT_Clusterization.h.

104 {
105 this, "ClusterContainerCacheKey", ""};

◆ m_clusterContainerKey

SG::WriteHandleKey<SCT_ClusterContainer> InDet::SCT_Clusterization::m_clusterContainerKey {this, "ClustersName", "SCT_Clusters", "SCT cluster container"}
private

Definition at line 100 of file SCT_Clusterization.h.

100{this, "ClustersName", "SCT_Clusters", "SCT cluster container"};

◆ m_clusterContainerLinkKey

SG::WriteHandleKey<SiClusterContainer> InDet::SCT_Clusterization::m_clusterContainerLinkKey {this, "ClustersLinkName_", "SCT_Clusters", "SCT cluster container link name (don't set this)"}
private

Definition at line 101 of file SCT_Clusterization.h.

101{this, "ClustersLinkName_", "SCT_Clusters", "SCT cluster container link name (don't set this)"};

◆ m_clusteringTool

ToolHandle<ISCT_ClusteringTool> InDet::SCT_Clusterization::m_clusteringTool {this, "clusteringTool", "InDet::SCT_ClusteringTool"}
private

Definition at line 87 of file SCT_Clusterization.h.

87{this, "clusteringTool", "InDet::SCT_ClusteringTool"};

◆ 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_flaggedCondCacheKey

SG::UpdateHandleKey<IDCInDetBSErrContainer_Cache> InDet::SCT_Clusterization::m_flaggedCondCacheKey
private
Initial value:
{
this, "FlaggedCondCacheKey", ""}

For HLT cache.

Definition at line 106 of file SCT_Clusterization.h.

106 {
107 this, "FlaggedCondCacheKey", ""};

◆ m_flaggedCondDataKey

SG::WriteHandleKey<IDCInDetBSErrContainer> InDet::SCT_Clusterization::m_flaggedCondDataKey {this, "SCT_FlaggedCondData", "SCT_FlaggedCondData", "SCT flagged conditions data"}
private

Definition at line 102 of file SCT_Clusterization.h.

102{this, "SCT_FlaggedCondData", "SCT_FlaggedCondData", "SCT flagged conditions data"};

◆ m_idHelper

const SCT_ID* InDet::SCT_Clusterization::m_idHelper {nullptr}
private

Definition at line 90 of file SCT_Clusterization.h.

90{nullptr};

◆ m_maxFiredStrips

UnsignedIntegerProperty InDet::SCT_Clusterization::m_maxFiredStrips {this, "maxFiredStrips", 384, "Threshold of number of fired strips per wafer, to mask noisy modules. 0 disables the per-wafer cut."}
private

Definition at line 120 of file SCT_Clusterization.h.

120{this, "maxFiredStrips", 384, "Threshold of number of fired strips per wafer, to mask noisy modules. 0 disables the per-wafer cut."};

◆ m_maxTotalOccupancyPercent

UnsignedIntegerProperty InDet::SCT_Clusterization::m_maxTotalOccupancyPercent {this, "maxTotalOccupancyInPercent", 100, "Threshold of percentage of fired strips for the whole SCT. 100 disables the whole SCT cut."}
private

Definition at line 121 of file SCT_Clusterization.h.

121{this, "maxTotalOccupancyInPercent", 100, "Threshold of percentage of fired strips for the whole SCT. 100 disables the whole SCT cut."};

◆ m_monTool

ToolHandle< GenericMonitoringTool > InDet::SCT_Clusterization::m_monTool { this, "MonTool", "", "Monitoring tool" }
private

Definition at line 89 of file SCT_Clusterization.h.

89{ this, "MonTool", "", "Monitoring tool" };

◆ m_pSummaryTool

ToolHandle<IInDetConditionsTool> InDet::SCT_Clusterization::m_pSummaryTool {this, "conditionsTool", "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool", "Tool to retrieve SCT conditions summary"}
private

Definition at line 88 of file SCT_Clusterization.h.

88{this, "conditionsTool", "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool", "Tool to retrieve SCT conditions summary"};

◆ m_rdoContainerKey

SG::ReadHandleKey<SCT_RDO_Container> InDet::SCT_Clusterization::m_rdoContainerKey {this, "DataObjectName", "SCT_RDOs", "SCT RDOs"}
private

Definition at line 99 of file SCT_Clusterization.h.

99{this, "DataObjectName", "SCT_RDOs", "SCT RDOs"};

◆ m_regionSelector

ToolHandle<IRegSelTool> InDet::SCT_Clusterization::m_regionSelector {this, "RegSelTool", "RegSelTool/RegSel_SCT", "region selector tool for HLT"}
private

Definition at line 86 of file SCT_Clusterization.h.

86{this, "RegSelTool", "RegSelTool/RegSel_SCT", "region selector tool for HLT"};

◆ m_roiCollectionKey

SG::ReadHandleKey<TrigRoiDescriptorCollection> InDet::SCT_Clusterization::m_roiCollectionKey {this, "RoIs", "", "RoIs to read in"}
private

Definition at line 98 of file SCT_Clusterization.h.

98{this, "RoIs", "", "RoIs to read in"};

◆ m_roiSeeded

BooleanProperty InDet::SCT_Clusterization::m_roiSeeded {this, "isRoI_Seeded", false, "Use RoI"}
private

Definition at line 122 of file SCT_Clusterization.h.

122{this, "isRoI_Seeded", false, "Use RoI"};

◆ m_sctDetElStatus

SG::ReadHandleKey<InDet::SiDetectorElementStatus> InDet::SCT_Clusterization::m_sctDetElStatus {this, "SCTDetElStatus", "", "Key of SiDetectorElementStatus for SCT"}
private

Optional read handle to get status data to test whether a SCT detector element is good.

If set to e.g. SCTDetectorElementStatus the event data will be used instead of the SCT conditions summary tool.

Definition at line 113 of file SCT_Clusterization.h.

114{this, "SCTDetElStatus", "", "Key of SiDetectorElementStatus for SCT"};

◆ m_useDataPoolWithCache

Gaudi::Property<bool> InDet::SCT_Clusterization::m_useDataPoolWithCache
private
Initial value:
{
this, "useDataPoolWithCache", false, "use DataPool With Cache"}

Definition at line 124 of file SCT_Clusterization.h.

124 {
125 this, "useDataPoolWithCache", false, "use DataPool With Cache"};

◆ 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: