![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <TRT_PrepDataToxAOD.h>
|
| TRT_PrepDataToxAOD (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual StatusCode | initialize () |
|
virtual StatusCode | execute () |
|
virtual StatusCode | finalize () |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. 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 | 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 |
|
|
Gaudi::Property< bool > | m_useTruthInfo {this, "UseTruthInfo",false,"Use data object"} |
|
Gaudi::Property< bool > | m_writeSDOs {this, "WriteSDOs", false,"Use data object"} |
|
SG::ReadHandleKey< InDet::TRT_DriftCircleContainer > | m_driftcirclecontainer {this,"DriftCircleContainer","TRT_DriftCircles","RHK to retrieve the drift Circle Container"} |
|
SG::ReadHandleKey< PRD_MultiTruthCollection > | m_multiTruth {this,"PRD_MultiTruth","PRD_MultiTruthTRT","RHK to retrieve PRD multitruth"} |
|
SG::ReadHandleKey< InDetSimDataCollection > | m_SDOcontainer {this,"MC_TRTUncompressedHit","TRT_SDO_Map","RHK to retrieve TRT SDO map"} |
|
SG::WriteHandleKey< xAOD::TrackMeasurementValidationContainer > | m_xAodContainer {this,"TRTxAodContainer","TRT_DriftCircles","WHK to write the TRT drift circle container"} |
|
SG::WriteHandleKey< std::vector< unsigned int > > | m_xAodOffset {this,"TRTxAodOffset","TRT_DriftCirclesOffsets","WHK to write the TRT drift circle offsets"} |
|
ToolHandle< ITRT_DriftFunctionTool > | m_driftFunctionTool |
| DriftFunctionTool. More...
|
|
ToolHandle< ITRT_CalDbTool > | m_trtcaldbTool |
|
ServiceHandle< ITRT_StrawNeighbourSvc > | m_neighbourSvc |
|
ToolHandle< ITRT_StrawStatusSummaryTool > | m_TRTStrawSummaryTool |
|
const TRT_ID * | m_TRTHelper |
|
const InDetDD::TRT_DetectorManager * | m_trtman |
|
bool | m_firstEventWarnings |
|
DataObjIDColl | m_extendedExtraObjects |
|
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 |
|
Definition at line 40 of file TRT_PrepDataToxAOD.h.
◆ StoreGateSvc_t
◆ EGasType
◆ TRT_PrepDataToxAOD()
TRT_PrepDataToxAOD::TRT_PrepDataToxAOD |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ 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 TRT_PrepDataToxAOD::execute |
( |
| ) |
|
|
virtual |
Definition at line 99 of file TRT_PrepDataToxAOD.cxx.
104 if (not h_trtPrds.isValid()) {
106 return StatusCode::FAILURE;
115 if (not h_prdmtColl.isValid()){
119 prdmtColl = h_prdmtColl.cptr();
129 if (not h_sdoCollection.isValid()) {
133 sdoCollection = h_sdoCollection.cptr();
140 ATH_CHECK(xaod.record(std::make_unique<xAOD::TrackMeasurementValidationContainer>(),std::make_unique<xAOD::TrackMeasurementValidationAuxContainer>() ) );
145 InDet::TRT_DriftCircleContainer::const_iterator
it = h_trtPrds->begin();
146 InDet::TRT_DriftCircleContainer::const_iterator it_end = h_trtPrds->end();
148 for( ;
it!=it_end; ++
it ) {
152 ATH_MSG_ERROR(
"My assumption about the maximum size of the hash was wrong");
153 (*offsets)[ (*it)->identifyHash() ] =
counter;
156 if( (*it)->empty() )
continue;
159 for(
const auto prd : **
it ){
165 xaod->push_back(xprd);
179 AUXDATA(xprd,
float, strawphi) = element->
center(surfaceID).phi();
192 AUXDATA(xprd,
int, TRTboard) = board ;
193 AUXDATA(xprd,
int, TRTchip) = chip ;
199 float locX = locpos.x();
200 if ( !(std::isinf(locpos.y()) || std::isnan(locpos.y())) ){
201 if (locpos.y()>=1
e-07)
211 if(localCov.size() == 1){
213 }
else if(localCov.size() == 2){
221 const Amg::Vector3D gpos = prd->detectorElement()->surface(surfaceID).localToGlobal(prd->localPosition());
226 unsigned int word = prd->getWord();
229 double tot = prd->timeOverThreshold();
231 AUXDATA(xprd,
float, drifttime) = prd->driftTime(isvalid) ;
234 AUXDATA(xprd,
char, isHT) = prd->highLevel() ;
239 AUXDATA(xprd,
float, leadingEdge) = prd->rawDriftTime();
243 if(prd->highLevel()) {
247 AUXDATA(xprd,
float, driftTimeHTCorrection) = 0;
252 unsigned int theWord = word & 0x04020100;
253 char highThreshold = 0;
255 if (theWord == 0x04000000)
257 else if (theWord == 0x00020000)
259 else if (theWord == 0x00000100)
261 else if (theWord == 0x04020000)
263 else if (theWord == 0x00020100)
265 else if (theWord == 0x04000100)
267 else if (theWord == 0x04020100)
270 AUXDATA(xprd,
char, highThreshold) = highThreshold;
273 AUXDATA(xprd,
unsigned int, bitPattern) = word;
285 AUXDATA(xprd,
char, gasType) = gas_type;
291 auto range = prdmtColl->equal_range(surfaceID);
293 barcodes.push_back(
i->second.barcode() );
301 auto pos = sdoCollection->find(surfaceID);
302 int sdo_word = -1000000;
303 if(
pos != sdoCollection->end() ) {
304 sdo_word =
pos->second.word();
306 AUXDATA(xprd,
int, sdo_word) = sdo_word;
312 ATH_MSG_DEBUG(
" recorded TRT_PrepData obejcts: size " << xaod->size() );
◆ 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()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode TRT_PrepDataToxAOD::finalize |
( |
| ) |
|
|
virtual |
◆ initialize()
StatusCode TRT_PrepDataToxAOD::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.
◆ 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()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ 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_driftcirclecontainer
◆ m_driftFunctionTool
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_firstEventWarnings
bool TRT_PrepDataToxAOD::m_firstEventWarnings |
|
private |
◆ m_multiTruth
◆ m_neighbourSvc
◆ m_SDOcontainer
◆ m_trtcaldbTool
◆ m_TRTHelper
◆ m_trtman
◆ m_TRTStrawSummaryTool
◆ m_useTruthInfo
Gaudi::Property<bool> TRT_PrepDataToxAOD::m_useTruthInfo {this, "UseTruthInfo",false,"Use data object"} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_writeSDOs
Gaudi::Property<bool> TRT_PrepDataToxAOD::m_writeSDOs {this, "WriteSDOs", false,"Use data object"} |
|
private |
◆ m_xAodContainer
◆ m_xAodOffset
SG::WriteHandleKey<std::vector<unsigned int> > TRT_PrepDataToxAOD::m_xAodOffset {this,"TRTxAodOffset","TRT_DriftCirclesOffsets","WHK to write the TRT drift circle offsets"} |
|
private |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
SG::ReadHandleKey< InDet::TRT_DriftCircleContainer > m_driftcirclecontainer
Eigen::Matrix< double, 2, 1 > Vector2D
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
TrackMeasurementValidation_v1 TrackMeasurementValidation
Reference the current persistent version:
bool m_firstEventWarnings
A PRD is mapped onto all contributing particles.
size_type straw_layer_hash_max(void) const
const InDetDD::TRT_DetectorManager * m_trtman
#define AUXDATA(OBJ, TYP, NAME)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const TRT_ID * m_TRTHelper
const std::string & key() const
Return the StoreGate ID for the referenced object.
SG::ReadHandleKey< PRD_MultiTruthCollection > m_multiTruth
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
SG::ReadHandleKey< InDetSimDataCollection > m_SDOcontainer
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< ITRT_StrawNeighbourSvc > m_neighbourSvc
Class describing a TrackMeasurementValidation.
int straw(const Identifier &id) const
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
void setLocalPosition(float localX, float localY)
Sets the local position.
def barcodes(beg, end, sz)
::StatusCode StatusCode
StatusCode definition for legacy code.
ToolHandle< ITRT_StrawStatusSummaryTool > m_TRTStrawSummaryTool
#define CHECK(...)
Evaluate an expression and check for errors.
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.
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
int straw_layer(const Identifier &id) const
void setIdentifier(uint64_t identifier)
Sets the identifier.
int layer_or_wheel(const Identifier &id) const
Gaudi::Property< bool > m_useTruthInfo
virtual void renounce()=0
SG::WriteHandleKey< std::vector< unsigned int > > m_xAodOffset
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
void setGlobalPosition(float globalX, float globalY, float globalZ)
Sets the global position.
const TRT_BaseElement * getElement(Identifier id) const
Access Elements Generically---------------------------------------------—.
void setLocalPositionError(float localXError, float localYError, float localXYCorrelation)
Sets the local position error.
Eigen::Matrix< double, 3, 1 > Vector3D
int phi_module(const Identifier &id) const
ToolHandle< ITRT_CalDbTool > m_trtcaldbTool
DataObjIDColl m_extendedExtraObjects
value_type get_compact(void) const
Get the compact id.
#define ATH_MSG_WARNING(x)
virtual const Amg::Vector3D & center() const override final
Element Surface: center of a straw layer.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
SG::WriteHandleKey< xAOD::TrackMeasurementValidationContainer > m_xAodContainer
AthAlgorithm()
Default constructor:
ToolHandle< ITRT_DriftFunctionTool > m_driftFunctionTool
DriftFunctionTool.
Gaudi::Property< bool > m_writeSDOs
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>