|
ATLAS Offline Software
|
Retrieves all InDet::SiCluster
objects.
More...
#include <PixelClusterRetriever.h>
|
| PixelClusterRetriever (const std::string &type, const std::string &name, const IInterface *parent) |
| Standard Constructor. More...
|
|
virtual StatusCode | retrieve (ToolHandle< IFormatTool > &FormatTool) |
| Retrieve all the data. More...
|
|
virtual std::string | dataTypeName () const |
| Return the name of the data type. More...
|
|
virtual StatusCode | initialize () |
| initialize only geo model tool More...
|
|
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 | sysInitialize () override |
| Perform system initialization for an algorithm. 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 |
|
|
const ToolHandle< IInDetGeoModelTool > | m_geo {this, "GeoModelTool","JiveXML::InDetGeoModelTool/InDetGeoModelTool",""} |
| A tool handle to the geo model tool. More...
|
|
SG::ReadHandleKey< InDet::SiClusterContainer > | m_PixelClusterCollName {this, "PixelClusterCollKey", "PixelClusters", "Key of SiClusterContainer for Pixel"} |
| The StoreGate key for the SiClusterCollection to retrieve. More...
|
|
bool | m_usePixelTruthMap = false |
| The StoreGate key for the PRD MultiTruthMap with the track associations. More...
|
|
SG::ReadHandleKey< PRD_MultiTruthCollection > | m_PixelTruthMapName {this, "PixelClusterMapKey", "PRD_MultiTruthPixel", "Key of PRD_MultiTruthCollection for Pixel"} |
|
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > | m_pixelDetEleCollKey {this, "PixelDetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"} |
|
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 |
|
Retrieves all InDet::SiCluster
objects.
- Properties
- PixelClusters
= 'PixelClusters'
: The StoreGate key for the SiClusterCollection to retrieve.
- PixelTruthMap
= 'PRD_MultiTruthPixel'
:
- Retrieved Data
- x0,y0,z0 : global position of the cluster
- widthx : cluster width in local x direction
- widthy : cluster width in local y direction
- id : id of the cluster
- eloss : energy loss
- phiModule,etaModule \(\eta\) and \(\phi\) of module in detector coordinates
- numBarcodes : number of associated truth tracks
- barcodes : barcodes of the associated truth tracks
Definition at line 41 of file PixelClusterRetriever.h.
◆ StoreGateSvc_t
◆ PixelClusterRetriever()
JiveXML::PixelClusterRetriever::PixelClusterRetriever |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Standard Constructor.
This is the standard AthAlgTool constructor.
- Parameters
-
type | AlgTool type name |
name | AlgTool instance name |
parent | AlgTools parent owning this tool |
Definition at line 25 of file PixelClusterRetriever.cxx.
30 declareInterface<IDataRetriever>(
this);
◆ dataTypeName()
virtual std::string JiveXML::PixelClusterRetriever::dataTypeName |
( |
| ) |
const |
|
inlinevirtual |
◆ 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);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ 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]
◆ 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
◆ initialize()
StatusCode JiveXML::PixelClusterRetriever::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.
◆ interfaceID()
const InterfaceID & JiveXML::IDataRetriever::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
Return the interface identifier.
Definition at line 40 of file IDataRetriever.h.
40 {
return IID_IDataRetriever; }
◆ 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()
◆ retrieve()
StatusCode JiveXML::PixelClusterRetriever::retrieve |
( |
ToolHandle< IFormatTool > & |
FormatTool | ) |
|
|
virtual |
Retrieve all the data.
Implementation of DataRetriever interface.
- For each cluster get the coordinates
- Try to find associated truth cluster
- Store coordinates and id of truth particles
- Parameters
-
FormatTool | the tool that will create formated output from the DataMap |
Implements JiveXML::IDataRetriever.
Definition at line 53 of file PixelClusterRetriever.cxx.
60 if (not pixelDetEleHandle.isValid() or elements==
nullptr) {
62 return StatusCode::FAILURE;
67 if (!SiClusterCont.isValid()) {
69 return StatusCode::RECOVERABLE;
83 unsigned long NClusterTotal = 0;
84 for (
const auto SiClusterColl : * SiClusterCont)
85 NClusterTotal += SiClusterColl->size();
91 DataVect widthx; widthx.reserve(NClusterTotal);
92 DataVect widthy; widthy.reserve(NClusterTotal);
93 DataVect eloss; eloss.reserve(NClusterTotal);
97 DataVect numBarcodes; numBarcodes.reserve(NClusterTotal);
101 DataVect etaModule; etaModule.reserve(NClusterTotal);
104 for (
const auto SiClusterColl : * SiClusterCont) {
107 if ( !
m_geo->PixelIDHelper()->is_pixel(SiClusterColl->identify())) continue ;
110 for (
const auto sicluster : * SiClusterColl) {
114 if (not cluster)
continue;
120 ATH_MSG_DEBUG(
"Could not obtain Detector Element with ID " <<
id );
125 x0.push_back(
DataType(cluster->globalPosition().x() /10.));
126 y0.push_back(
DataType(cluster->globalPosition().y() /10.));
127 z0.push_back(
DataType(cluster->globalPosition().z() /10.));
128 widthx.push_back(
DataType(cluster->width().phiR()/10.0));
129 widthy.push_back(
DataType(cluster->width().z()/10.0));
130 eloss.push_back(
DataType(cluster->energyLoss()));
136 etaModule.push_back(
DataType(
m_geo->PixelIDHelper()->eta_module(clusterId)));
142 unsigned long countBarcodes=0;
143 using iter = PRD_MultiTruthCollection::const_iterator;
144 std::pair<iter,iter>
range = simClusterMap->equal_range(clusterId);
149 numBarcodes.push_back(
DataType(countBarcodes));
165 dataMap[
"etaModule"] = etaModule;
168 if ( numBarcodes.size() > 0 ){
170 dataMap[
"numBarcodes"] = numBarcodes;
172 std::string bctag =
"barcodes multiple=\""+
DataType(
barcodes.size()/
double(numBarcodes.size())).toString()+
"\"";
◆ sysInitialize()
◆ 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_geo
◆ m_PixelClusterCollName
◆ m_pixelDetEleCollKey
◆ m_PixelTruthMapName
◆ m_usePixelTruthMap
bool JiveXML::PixelClusterRetriever::m_usePixelTruthMap = false |
|
private |
The StoreGate key for the PRD MultiTruthMap with the track associations.
Definition at line 68 of file PixelClusterRetriever.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
virtual std::string dataTypeName() const
Return the name of the data type.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< DataType > DataVect
Defines a map with a key and a vector of DataType objects e.g.
const ToolHandle< IInDetGeoModelTool > m_geo
A tool handle to the geo model tool.
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.
bool m_usePixelTruthMap
The StoreGate key for the PRD MultiTruthMap with the track associations.
const std::string & key() const
Return the StoreGate ID for the referenced object.
std::map< std::string, DataVect > DataMap
virtual void setOwner(IDataHandleHolder *o)=0
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
SG::ReadHandleKey< PRD_MultiTruthCollection > m_PixelTruthMapName
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
def barcodes(beg, end, sz)
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.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
StatusCode initialize(bool used=true)
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
SG::ReadHandleKey< InDet::SiClusterContainer > m_PixelClusterCollName
The StoreGate key for the SiClusterCollection to retrieve.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>