Typesetting math: 100%
ATLAS Offline Software
Retrieves all InDet::SpacePoint
data for Pixel and SCT .
More...
#include <SiSpacePointRetriever.h >
SiSpacePointRetriever (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 ()
Only retrieve geo tool in initialize. 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
Retrieves all InDet::SpacePoint
data for Pixel and SCT .
Properties
PixelSpacePoints = 'PixelSpacePoints'
:
SCT_SpacePoints = 'SCTSpacePoints'
:
PRD_TruthPixel = 'PRD_MultiTruthPixel'
: m_PixelPRDTruthName;
PRD_TruthSCT = 'PRD_MultiTruthSCT'
:
Retrieved Data
x,y,z : coordinates of the spacePoint
clusters : identifier of first (and second for SCT ) associated cluster
phiModule,etaModule : and of module in detector coordinates
numBarcodes : number of truth particles associated with this SpacePoint
barcodes : barcodes of associated truth particles
Definition at line 35 of file SiSpacePointRetriever.h .
◆ StoreGateSvc_t
◆ SiSpacePointRetriever()
JiveXML::SiSpacePointRetriever::SiSpacePointRetriever
(
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 30 of file SiSpacePointRetriever.cxx .
35 declareInterface<IDataRetriever>(
this );
◆ dataTypeName()
virtual std::string JiveXML::SiSpacePointRetriever::dataTypeName
(
)
const
inline virtual
◆ 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::SiSpacePointRetriever::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
(
)
inline static inherited
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::SiSpacePointRetriever::retrieve
(
ToolHandle< IFormatTool > &
FormatTool )
virtual
Retrieve all the data.
Implementation of DataRetriever interface.
Parameters
FormatTool the tool that will create formated output from the DataMap
Try to retrieve all the relevant collections
Now make a list of SpacePoint - PRDTruth collection pairs to run over
Found out how much space we will need
Declare all the data we want to retrieve
Now fill in all the data
Implements JiveXML::IDataRetriever .
Definition at line 109 of file SiSpacePointRetriever.cxx .
119 if ( not PixelSPContainer.isValid() )
125 if ( not PixelPRDTruthColl.
isValid () )
130 if ( not SCTSPContainer.isValid() )
136 if ( not SCTPRDTruthColl.
isValid () )
143 using SpacePointTruthPair = std::pair<const SpacePointContainer *, const PRD_MultiTruthCollection *>;
144 std::vector<SpacePointTruthPair> SpacePointTruthPairList;
147 if (PixelSPContainer.isValid())
148 SpacePointTruthPairList.emplace_back(PixelSPContainer.cptr(),
m_usePixelTruthMap ? PixelPRDTruthColl.
cptr () :
nullptr );
151 if (SCTSPContainer.isValid())
152 SpacePointTruthPairList.emplace_back(SCTSPContainer.cptr(),
m_useSCTTruthMap ? SCTPRDTruthColl.
cptr () :
nullptr );
157 int NSpacePoints = 0;
159 for (
const auto &SPTruthPair : SpacePointTruthPairList) {
162 for (
const auto SpacePoint : *(SPTruthPair.first))
176 DataVect etaModule; etaModule.reserve(NSpacePoints);
177 DataVect numBarcodes; numBarcodes.reserve(NSpacePoints);
185 for (
const auto &SPTruthPair : SpacePointTruthPairList) {
188 for (
const auto SpacePointColl : *(SPTruthPair.first)){
191 for (
const auto SpacePoint : *SpacePointColl) {
202 const std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*> clusterList =
SpacePoint ->clusterList();
205 Identifier idFirst = clusterList.first->identify();
206 Identifier idSecond = (clusterList.second != NULL) ? clusterList.second->identify() :
Identifier ();
211 etaModule.push_back(
DataType (
m_geo ->SCTIDHelper()->eta_module(idFirst)));
215 etaModule.push_back(
DataType (
m_geo ->PixelIDHelper()->eta_module(idFirst)));
224 if ( PRDTruthColl ==
nullptr ) continue ;
229 ATH_MSG_VERBOSE (
"Found " << numBarcodes.back() <<
" common barcodes, now "
230 <<
barcodes .size() <<
" in total" );
238 const auto sz =
x .size();
244 dataMap [
"etaModule" ] = std::move(etaModule);
247 if ( numBarcodes.size() > 0 ){
249 dataMap [
"numBarcodes" ] = numBarcodes;
251 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_PixelPRDTruthName
◆ m_PixelSPContainerName
◆ m_SCTPRDTruthName
◆ m_SCTSPContainerName
◆ m_usePixelTruthMap
bool JiveXML::SiSpacePointRetriever::m_usePixelTruthMap = false
private
◆ m_useSCTTruthMap
bool JiveXML::SiSpacePointRetriever::m_useSCTTruthMap = false
private
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
SG::ReadHandleKey< PRD_MultiTruthCollection > m_SCTPRDTruthName
const_pointer_type cptr()
Dereference the pointer.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
A PRD is mapped onto all contributing particles.
std::vector< DataType > DataVect
Defines a map with a key and a vector of DataType objects e.g.
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.
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
std::map< std::string, DataVect > DataMap
bool is_valid() const
Check if id is in a valid state.
virtual void setOwner(IDataHandleHolder *o)=0
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
unsigned int getTruthBarcodes(const Identifier idFirst, const Identifier idSecond, const PRD_MultiTruthCollection *truthColl, DataVect &barcodes)
Get the barcodes of associated truth particles for a SpacePoint ( we require both clusters,...
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.
bool m_useSCTTruthMap
StoreGate key for SCT PRD_MultiTruth.
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
virtual std::string dataTypeName() const
Return the name of the data type.
const ToolHandle< IInDetGeoModelTool > m_geo
A tool handle to the geo model tool.
Eigen::Matrix< double, 3, 1 > Vector3D
SG::ReadHandleKey< SpacePointContainer > m_PixelSPContainerName
StoreGate key for Pixel space points.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
SG::ReadHandleKey< PRD_MultiTruthCollection > m_PixelPRDTruthName
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
SG::ReadHandleKey< SpacePointContainer > m_SCTSPContainerName
StoreGate key for SCT space points.
bool m_usePixelTruthMap
StoreGate key for pixel PRD_MultiTruth.