Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <JetHitAssociation.h>
|
| JetHitAssociation (const std::string &name, ISvcLocator *svcloc) |
| Constructor with parameters: More...
|
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | finalize () override |
|
virtual StatusCode | execute () override |
|
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 |
|
Definition at line 24 of file JetHitAssociation.h.
◆ StoreGateSvc_t
◆ JetHitAssociation()
JetHitAssociation::JetHitAssociation |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svcloc |
|
) |
| |
Constructor with parameters:
Definition at line 11 of file JetHitAssociation.cxx.
19 "Jet collection that will be used for matching the Hits");
21 "Name of PV collection. Default is PrimaryVertices");
23 "Name of output pixel hit collection. JetAssociatedPixelClusters is default.");
25 "Name of output SCT hit collection. JetAssociatedSCTClusters is default.");
27 "Name of input pixel hit collection. PixelClusters is default");
29 "Name of input SCT hit collection. SCT_Clusters is default");
31 "Hits are saved only if they match to jets with pT > jetPtThreshold [in MeV]");
33 "The radius used for matching hits to jets");
◆ 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 JetHitAssociation::execute |
( |
| ) |
|
|
overridevirtual |
Definition at line 66 of file JetHitAssociation.cxx.
68 const EventContext& ctx = Gaudi::Hive::currentContext();
72 if ( !jetReadHandle.isValid() ) {
74 return StatusCode::FAILURE;
78 std::vector<const xAOD::Jet*>
jets;
79 jets.reserve( jetReadHandle->size() );
91 if ( !vertexReadHandle.isValid() ) {
92 ATH_MSG_ERROR(
"Failed to retrieve PrimaryVertices container" );
93 return StatusCode::FAILURE;
107 if ( !pixHitReadHandle.isValid() ) {
109 return StatusCode::FAILURE;
114 if ( !sctHitReadHandle.isValid() ) {
116 return StatusCode::FAILURE;
124 return StatusCode::SUCCESS;
◆ 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 JetHitAssociation::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode JetHitAssociation::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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()
◆ saveHits()
Definition at line 128 of file JetHitAssociation.cxx.
136 auto outputHitCollection = std::make_unique<xAOD::TrackMeasurementValidationContainer>();
137 auto outputHitCollectionAux = std::make_unique<xAOD::TrackMeasurementValidationAuxContainer>();
138 outputHitCollection->setStore(outputHitCollectionAux.get());
148 ATH_MSG_DEBUG(
"JetHitAssociation: PrimaryVertex Z Position = " << PVposition.Z());
153 float x = hit->globalX();
154 float y = hit->globalY();
155 float z = hit->globalZ();
158 TVector3 hitPosition(
x,
y,
z);
161 hitPosition = hitPosition - PVposition;
166 float dR = hitPosition.DeltaR(
jet->p4().Vect());
170 outputHitCollection->push_back(std::make_unique<xAOD::TrackMeasurementValidation>(*hit));
171 *outputHitCollection->back() = *hit;
179 nTotalHits +=
hits->size();
182 if ( ! outputHits.put( std::move(outputHitCollection), std::move(outputHitCollectionAux) ) ) {
184 return StatusCode::FAILURE;
187 return StatusCode::SUCCESS;
◆ 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_dRmatchHitToJet
float JetHitAssociation::m_dRmatchHitToJet |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_inputPixHitCollectionName
◆ m_inputSCTHitCollectionName
◆ m_jetCollectionName
◆ m_jetPtThreshold
float JetHitAssociation::m_jetPtThreshold |
|
private |
◆ m_nStoredPixHits
unsigned long long int JetHitAssociation::m_nStoredPixHits |
|
private |
◆ m_nStoredSCTHits
unsigned long long int JetHitAssociation::m_nStoredSCTHits |
|
private |
◆ m_nTotalPixHits
unsigned long long int JetHitAssociation::m_nTotalPixHits |
|
private |
◆ m_nTotalSCTHits
unsigned long long int JetHitAssociation::m_nTotalSCTHits |
|
private |
◆ m_outputPixHitCollectionName
◆ m_outputSCTHitCollectionName
◆ m_varHandleArraysDeclared
◆ m_vertexCollectionName
◆ m_vhka
The documentation for this class was generated from the following files:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
SG::ReadHandleKey< xAOD::JetContainer > m_jetCollectionName
SG::ReadHandleKey< xAOD::TrackMeasurementValidationContainer > m_inputSCTHitCollectionName
StatusCode saveHits(const std::vector< const xAOD::Jet * > &jets, const xAOD::Vertex *const vertex, SG::ReadHandle< xAOD::TrackMeasurementValidationContainer > &hits, const SG::WriteHandle< xAOD::TrackMeasurementValidationContainer > &writeHandle, unsigned long long int &nStoredHits, unsigned long long int &nTotalHits)
const std::string & key() const
Return the StoreGate ID for the referenced object.
virtual void setOwner(IDataHandleHolder *o)=0
SG::WriteHandleKey< xAOD::TrackMeasurementValidationContainer > m_outputPixHitCollectionName
Class describing a TrackMeasurementValidation.
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
unsigned long long int m_nStoredSCTHits
unsigned long long int m_nTotalPixHits
::StatusCode StatusCode
StatusCode definition for legacy code.
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.
unsigned long long int m_nTotalSCTHits
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
DataObjIDColl m_extendedExtraObjects
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexCollectionName
Class describing a Vertex.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
AthAlgorithm()
Default constructor:
unsigned long long int m_nStoredPixHits
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
SG::WriteHandleKey< xAOD::TrackMeasurementValidationContainer > m_outputSCTHitCollectionName
SG::ReadHandleKey< xAOD::TrackMeasurementValidationContainer > m_inputPixHitCollectionName