 |
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, V, H > &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::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
|
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 {this, "TRTDriftFunctionTool", "TRT_DriftFunctionTool", "DriftFunctionTool"} |
|
ToolHandle< ITRT_CalDbTool > | m_trtcaldbTool {this, "TRTCalDbTool", "TRT_CalDbTool", ""} |
|
ServiceHandle< ITRT_StrawNeighbourSvc > | m_neighbourSvc {this, "NeighbourSvc", "TRT_StrawNeighbourSvc", ""} |
|
ToolHandle< ITRT_StrawStatusSummaryTool > | m_TRTStrawSummaryTool {this, "TRTStrawSummaryTool", "TRT_StrawStatusSummaryTool", ""} |
|
const TRT_ID * | m_TRTHelper {} |
|
const InDetDD::TRT_DetectorManager * | m_trtman {} |
|
bool | m_firstEventWarnings {true} |
|
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);
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]
◆ execute()
StatusCode TRT_PrepDataToxAOD::execute |
( |
| ) |
|
|
virtual |
Definition at line 83 of file TRT_PrepDataToxAOD.cxx.
88 if (not h_trtPrds.isValid()) {
90 return StatusCode::FAILURE;
99 if (not h_prdmtColl.isValid()){
103 prdmtColl = h_prdmtColl.cptr();
113 if (not h_sdoCollection.isValid()) {
117 sdoCollection = h_sdoCollection.cptr();
124 ATH_CHECK(xaod.record(std::make_unique<xAOD::TrackMeasurementValidationContainer>(),std::make_unique<xAOD::TrackMeasurementValidationAuxContainer>() ) );
129 InDet::TRT_DriftCircleContainer::const_iterator
it = h_trtPrds->begin();
130 InDet::TRT_DriftCircleContainer::const_iterator it_end = h_trtPrds->end();
132 for( ;
it!=it_end; ++
it ) {
136 ATH_MSG_ERROR(
"My assumption about the maximum size of the hash was wrong");
137 (*offsets)[ (*it)->identifyHash() ] =
counter;
140 if( (*it)->empty() )
continue;
143 for(
const auto prd : **
it ){
149 xaod->push_back(xprd);
163 AUXDATA(xprd,
float, strawphi) = element->
center(surfaceID).phi();
176 AUXDATA(xprd,
int, TRTboard) = board ;
177 AUXDATA(xprd,
int, TRTchip) = chip ;
183 float locX = locpos.x();
184 if ( !(std::isinf(locpos.y()) || std::isnan(locpos.y())) ){
185 if (locpos.y()>=1
e-07)
195 if(localCov.size() == 1){
197 }
else if(localCov.size() == 2){
205 const Amg::Vector3D gpos = prd->detectorElement()->surface(surfaceID).localToGlobal(prd->localPosition());
210 unsigned int word = prd->getWord();
213 double tot = prd->timeOverThreshold();
215 AUXDATA(xprd,
float, drifttime) = prd->driftTime(isvalid) ;
217 AUXDATA(xprd,
float, tot) = tot ;
218 AUXDATA(xprd,
char, isHT) = prd->highLevel() ;
223 AUXDATA(xprd,
float, leadingEdge) = prd->rawDriftTime();
227 if(prd->highLevel()) {
231 AUXDATA(xprd,
float, driftTimeHTCorrection) = 0;
236 unsigned int theWord = word & 0x04020100;
237 char highThreshold = 0;
239 if (theWord == 0x04000000)
241 else if (theWord == 0x00020000)
243 else if (theWord == 0x00000100)
245 else if (theWord == 0x04020000)
247 else if (theWord == 0x00020100)
249 else if (theWord == 0x04000100)
251 else if (theWord == 0x04020100)
254 AUXDATA(xprd,
char, highThreshold) = highThreshold;
257 AUXDATA(xprd,
unsigned int, bitPattern) = word;
269 AUXDATA(xprd,
char, gasType) = gas_type;
274 std::vector<int> uniqueIDs;
275 auto range = prdmtColl->equal_range(surfaceID);
279 AUXDATA(xprd, std::vector<int> , truth_barcode) = uniqueIDs;
285 auto pos = sdoCollection->find(surfaceID);
286 int sdo_word = -1000000;
287 if(
pos != sdoCollection->end() ) {
288 sdo_word =
pos->second.word();
290 AUXDATA(xprd,
int, sdo_word) = sdo_word;
296 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 {true} |
|
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
TrackMeasurementValidation_v1 TrackMeasurementValidation
Reference the current persistent version:
bool m_firstEventWarnings
A PRD is mapped onto all contributing particles.
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
value_type get_compact() const
Get the compact id.
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
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
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.
::StatusCode StatusCode
StatusCode definition for legacy code.
ToolHandle< ITRT_StrawStatusSummaryTool > m_TRTStrawSummaryTool
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
#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
#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
size_type straw_layer_hash_max() const
Gaudi::Property< bool > m_writeSDOs