Loading [MathJax]/jax/output/SVG/config.js
 |
ATLAS Offline Software
|
#include <PixelClusterTruthDecoratorAlg.h>
|
| PixelClusterTruthDecoratorAlg (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~PixelClusterTruthDecoratorAlg ()=default |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute (const EventContext &ctx) const override |
|
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 |
|
|
ToolHandle< ISiLorentzAngleTool > | m_lorentzAngleTool {this, "LorentzAngleTool", ""} |
|
SG::ReadHandleKey< xAOD::PixelClusterContainer > | m_clustercontainer_key {this,"ClusterContainer", "","Input Pixel Cluster container"} |
|
SG::ReadHandleKey< ActsTrk::MeasurementToTruthParticleAssociation > | m_associationMap_key {this,"AssociationMapOut","", "Association map between measurements and truth particles"} |
|
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > | m_pixelDetEleCollKey {this, "PixelDetEleCollKey", "ITkPixelDetectorElementCollection"} |
|
SG::WriteHandleKey< xAOD::TrackMeasurementValidationContainer > | m_write_xaod_key {this,"MeasurementContainer","", "Output Pixel Validation Clusters"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_truth_indices {this, "MeasurementTruthIndices", "truth_index"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_truth_barcodes {this, "MeasurementTruthBarcode", "truth_barcode"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_detectorElementID {this, "MeasurementDetectorElementID", "detectorElementID"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_waferID {this, "MeasurementWaferID", "waferID"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_bec {this, "MeasurementBEC", "bec"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_layer {this, "MeasurementLayer", "layer"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_sizePhi {this, "MeasurementSizePhi", "sizePhi"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_sizeZ {this, "MeasurementSizeZ", "sizeZ"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_SiWidth {this, "MeasurementSiWidth", "SiWidth"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_eta_module {this, "MeasurementEtaModule", "eta_module"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_phi_module {this, "MeasurementPhiModule", "phi_module"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_omegax {this, "MeasurementOmegaX", "omegax"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_omegay {this, "MeasurementOmegaY", "omegay"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_LorentzShift {this, "MeasurementLorentzShift", "LorentzShift"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_centroid_xphi {this, "MeasurementCentroidXphi", "centroid_xphi"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_centroid_xeta {this, "MeasurementCentroidXeta", "centroid_xeta"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_side {this, "MeasurementSide", "side"} |
|
Gaudi::Property< bool > | m_useTruthInfo {this, "UseTruthInfo", true} |
|
const PixelID * | m_PixelHelper {nullptr} |
|
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 |
|
◆ StoreGateSvc_t
◆ PixelClusterTruthDecoratorAlg()
ActsTrk::PixelClusterTruthDecoratorAlg::PixelClusterTruthDecoratorAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~PixelClusterTruthDecoratorAlg()
virtual ActsTrk::PixelClusterTruthDecoratorAlg::~PixelClusterTruthDecoratorAlg |
( |
| ) |
|
|
virtualdefault |
◆ 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 ActsTrk::PixelClusterTruthDecoratorAlg::execute |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
Definition at line 73 of file PixelClusterTruthDecoratorAlg.cxx.
85 const MeasurementToTruthParticleAssociation* measToTruth(
nullptr);
89 measToTruth = measToTruthHandle.
cptr();
95 ATH_CHECK(xaod.
record(std::make_unique<xAOD::TrackMeasurementValidationContainer>(),
96 std::make_unique<xAOD::TrackMeasurementValidationAuxContainer>()));
118 std::vector<xAOD::TrackMeasurementValidation*>
toAdd(
clusters->size(),
nullptr);
119 for (std::size_t
i(0);
i<
toAdd.size(); ++
i) {
135 ATH_MSG_FATAL(
"Invalid pixel detector element for hash " << hashId );
136 return StatusCode::FAILURE;
139 const std::vector<Identifier> rdoList =
cluster->rdoList();
140 std::vector< std::uint64_t > rdoIdentifierList;
141 rdoIdentifierList.reserve(rdoList.size());
146 for(
const Identifier& hitIdentifier : rdoList ){
147 rdoIdentifierList.push_back( hitIdentifier.get_compact() );
161 return StatusCode::FAILURE;
174 auto gpos =
cluster->globalPosition();
178 auto locpos =
cluster->localPosition<2>();
181 auto localCov =
cluster->localCovariance<2>();
185 decor_detectorElementID(*measurement) = hashId;
186 decor_waferID(*measurement) = waferId.
get_compact();
189 decor_sizePhi(*measurement) =
cluster->channelsInPhi();
190 decor_sizeZ(*measurement) =
cluster->channelsInEta();
191 decor_SiWidth(*measurement) =
cluster->channelsInPhi();
194 decor_omegax(*measurement) =
cluster->omegaX();
195 decor_omegay(*measurement) =
cluster->omegaY();
196 decor_LorentzShift(*measurement) =
static_cast<float>(
m_lorentzAngleTool->getLorentzShift(
cluster->identifierHash(), ctx) );
197 decor_centroid_xphi(*measurement) =
centroid.xPhi();
198 decor_centroid_xeta(*measurement) =
centroid.xEta();
199 decor_side(*measurement) = 0;
214 if (
cluster->index() >= measToTruth->size()) {
215 ATH_MSG_ERROR(
"PRD index "<<
cluster->index() <<
" not present in the measurement to truth vector with size " << measToTruth->size() );
216 return StatusCode::FAILURE;
219 auto tps = measToTruth->at(
cluster->index());
221 std::vector<unsigned int> tp_indices;
222 std::vector<unsigned int> tp_barcodes;
223 for (
const auto&
tp : tps) {
224 tp_indices.push_back(
tp->index());
229 decor_truth_indices(*measurement) = std::move(tp_indices);
230 decor_truth_barcode(*measurement) = std::move(tp_barcodes);
235 ATH_MSG_DEBUG(
" recorded PixelPrepData objects: size " << measurements->
size() );
236 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 ActsTrk::PixelClusterTruthDecoratorAlg::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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_associationMap_key
◆ m_clustercontainer_key
◆ 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_lorentzAngleTool
ToolHandle<ISiLorentzAngleTool> ActsTrk::PixelClusterTruthDecoratorAlg::m_lorentzAngleTool {this, "LorentzAngleTool", ""} |
|
private |
◆ m_measurement_bec
◆ m_measurement_centroid_xeta
◆ m_measurement_centroid_xphi
◆ m_measurement_detectorElementID
◆ m_measurement_eta_module
◆ m_measurement_layer
◆ m_measurement_LorentzShift
◆ m_measurement_omegax
◆ m_measurement_omegay
◆ m_measurement_phi_module
◆ m_measurement_side
◆ m_measurement_SiWidth
◆ m_measurement_sizePhi
◆ m_measurement_sizeZ
◆ m_measurement_truth_barcodes
◆ m_measurement_truth_indices
◆ m_measurement_waferID
◆ m_pixelDetEleCollKey
◆ m_PixelHelper
const PixelID* ActsTrk::PixelClusterTruthDecoratorAlg::m_PixelHelper {nullptr} |
|
private |
◆ m_useTruthInfo
Gaudi::Property<bool> ActsTrk::PixelClusterTruthDecoratorAlg::m_useTruthInfo {this, "UseTruthInfo", true} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_write_xaod_key
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
const PixelID * m_PixelHelper
long unsigned int DetectorIdentType
int phi_index(const Identifier &id) const
const_pointer_type cptr()
Dereference the pointer.
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_centroid_xphi
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
TrackMeasurementValidation_v1 TrackMeasurementValidation
Reference the current persistent version:
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_centroid_xeta
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)
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_phi_module
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
value_type get_compact() const
Get the compact id.
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_layer
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_clustercontainer_key
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_bec
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_LorentzShift
void setRdoIdentifierList(const std::vector< uint64_t > &rdoIdentifierList)
Sets the list of RDO identifiers.
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_sizeZ
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_eta_module
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Class describing a TrackMeasurementValidation.
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
SG::ReadHandleKey< ActsTrk::MeasurementToTruthParticleAssociation > m_associationMap_key
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_truth_barcodes
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
void setLocalPosition(float localX, float localY)
Sets the local position.
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_omegay
::StatusCode StatusCode
StatusCode definition for legacy code.
pointer_type ptr()
Dereference the pointer.
Handle class for adding a decoration to an object.
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_side
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_truth_indices
int eta_index(const Identifier &id) const
iterator insert(iterator position, value_type pElem)
Add a new element to the collection.
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.
void setIdentifier(uint64_t identifier)
Sets the identifier.
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_waferID
Gaudi::Property< bool > m_useTruthInfo
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual void renounce()=0
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
SG::WriteHandleKey< xAOD::TrackMeasurementValidationContainer > m_write_xaod_key
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
int layer_disk(const Identifier &id) const
int eta_module(const Identifier &id) const
void setGlobalPosition(float globalX, float globalY, float globalZ)
Sets the global position.
PixelClusterContainer_v1 PixelClusterContainer
Define the version of the pixel cluster container.
unsigned int DetectorIDHashType
@ detector ID element hash
void setLocalPositionError(float localXError, float localYError, float localXYCorrelation)
Sets the local position error.
StatusCode initialize(bool used=true)
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_sizePhi
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_detectorElementID
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual StatusCode sysInitialize() override
Override sysInitialize.
const T * at(size_type n) const
Access an element, as an rvalue.
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_omegax
int phi_module(const Identifier &id) const
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_SiWidth
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
Vertex centroid(const Polygon &p)
const_pointer_type cptr()