|
ATLAS Offline Software
|
Retrieves all InDet::TRT_DriftCircle
objects.
More...
#include <TRTRetriever.h>
|
| TRTRetriever (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 |
|
Retrieves all InDet::TRT_DriftCircle
objects.
- Properties
- TRTClusters: The StoreGate key for the TRT Cluster collection to retrieve.
- TRT_TruthMap:
- Retrieved Data
- id : unique identifier of the drift circle
- rhoz : \(\rho\) (for barrel) or \(z\) (for endcap) coordinate of the hit
- phi : \(\phi\) coordinate of the hit
- driftR : the drift radius
- threshold : wether the hit passed the high threshold or not
- numBarcodes : number of associated truth tracks
- barcodes : barcodes of the associated truth tracks
- sub : the barrel/endcap subdetector in which the drift circle is
- noise : wether the hit is flagged as noise
- timeOverThreshold : time over threshold of the hit
- bitPattern : the status word of the drift circle
Definition at line 43 of file TRTRetriever.h.
◆ StoreGateSvc_t
◆ TRTRetriever()
JiveXML::TRTRetriever::TRTRetriever |
( |
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 TRTRetriever.cxx.
29 declareInterface<IDataRetriever>(
this);
◆ dataTypeName()
virtual std::string JiveXML::TRTRetriever::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::TRTRetriever::initialize |
( |
| ) |
|
|
virtual |
initialize only geo model tool
Definition at line 35 of file TRTRetriever.cxx.
40 return StatusCode::SUCCESS;
◆ 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::TRTRetriever::retrieve |
( |
ToolHandle< IFormatTool > & |
FormatTool | ) |
|
|
virtual |
Retrieve all the data.
NOTE: to get rhoz and phi, obtain DetectorElement and then change to hashid - faster
Finally, get the associated truth particles, if there are
Implements JiveXML::IDataRetriever.
Definition at line 43 of file TRTRetriever.cxx.
49 if ( !DriftCircleContainer.isValid() ) {
51 return StatusCode::RECOVERABLE;
58 if ( !TRTMultiTruthMap.
isValid() ){
65 unsigned long NDriftCircleTotal = 0;
67 for (
const auto DriftCircleColl : *DriftCircleContainer)
68 NDriftCircleTotal += DriftCircleColl->size();
71 ATH_MSG_VERBOSE(
"Reserving space for " << NDriftCircleTotal <<
" entries" );
74 DataVect rhoz; rhoz.reserve(NDriftCircleTotal);
76 DataVect driftR; driftR.reserve(NDriftCircleTotal);
79 DataVect sub; sub.reserve(NDriftCircleTotal);
82 DataVect bitPattern; bitPattern.reserve(NDriftCircleTotal);
83 DataVect numBarcodes; numBarcodes.reserve(NDriftCircleTotal);
87 for (
const auto DriftCircleColl : *DriftCircleContainer) {
90 for (
const auto driftcircle : *DriftCircleColl){
100 if (!
id.is_valid()) {
101 ATH_MSG_DEBUG(
"Ignoring TRT_DriftCircle with invalid identifier " <<
id );
132 switch (
m_geo->TRTIDHelper()->barrel_ec(
id) ) {
133 case -2 : sub.push_back(
DataType( 0 ));
break;
134 case -1 : sub.push_back(
DataType( 1 ));
break;
135 case 1 : sub.push_back(
DataType( 2 ));
break;
136 case 2 : sub.push_back(
DataType( 3 ));
break;
144 bitPattern.push_back(
DataType(driftcircle->getWord()));
154 using iter = PRD_MultiTruthCollection::const_iterator;
155 std::pair<iter,iter> equalIDRange = TRTMultiTruthMap->equal_range(
id);
156 for ( iter TRTMultiTruthMapItr = equalIDRange.first; TRTMultiTruthMapItr != equalIDRange.second; ++TRTMultiTruthMapItr){
160 numBarcodes.push_back(
DataType(NBarcodes));
174 dataMap[
"bitPattern"]=bitPattern;
177 if ( numBarcodes.size() > 0 ){
179 dataMap[
"numBarcodes"]=numBarcodes;
181 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_TRTDriftCircleCollKey
The StoreGate key for the TRT Cluster collection to retrieve.
Definition at line 67 of file TRTRetriever.h.
◆ m_TRTTruthMapKey
◆ m_useTRTTruthMap
bool JiveXML::TRTRetriever::m_useTRTTruthMap = false |
|
private |
The StoreGate key for the TRT MultiTruthMap with the track associations.
Definition at line 69 of file TRTRetriever.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
Scalar phi() const
phi method
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.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
#define ATH_MSG_VERBOSE(x)
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())
def barcodes(beg, end, sz)
virtual TRT_BaseElement::Type type() const =0
Type information: returns BARREL or ENDCAP.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual std::string dataTypeName() const
Return the name of the data type.
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
bool m_useTRTTruthMap
The StoreGate key for the TRT MultiTruthMap with the track associations.
Eigen::Matrix< double, 3, 1 > Vector3D
const ToolHandle< IInDetGeoModelTool > m_geo
A tool handle to the geo model tool.
const Amg::Transform3D & strawTransform(unsigned int straw) const
Straw transform - fast access in array, in Tracking frame: Amg.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
double timeOverThreshold(unsigned int m_word)
SG::ReadHandleKey< InDet::TRT_DriftCircleContainer > m_TRTDriftCircleCollKey
The StoreGate key for the TRT Cluster collection to retrieve.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
SG::ReadHandleKey< PRD_MultiTruthCollection > m_TRTTruthMapKey