 |
ATLAS Offline Software
|
Go to the documentation of this file.
16 m_secVertexFinderToolHandle(this)
43 return StatusCode::SUCCESS;
50 if (!h_JetCollectionName.
isValid()) {
52 return StatusCode::FAILURE;
57 ATH_CHECK( h_VxSecVertexInfoName.
record(std::make_unique<Trk::VxSecVertexInfoContainer>()));
59 if (h_JetCollectionName->
empty()) {
61 return StatusCode::SUCCESS;
68 ATH_MSG_ERROR(
"cannot retrieve jet container particle EL decoration with key " << h_TracksToTag.
decorKey() );
69 return StatusCode::FAILURE;
76 if (!h_VertexCollectionName.
isValid()) {
78 return StatusCode::FAILURE;
80 unsigned int nVertexes = h_VertexCollectionName->
size();
83 return StatusCode::SUCCESS;
85 for (
const auto *fz : *h_VertexCollectionName) {
93 if (! primaryVertex) {
105 for (
const auto *jetIter : *h_JetCollectionName) {
108 const std::vector<ElementLink< xAOD::IParticleContainer > >& tracksInJet
109 = h_TracksToTag(jetToTag);
111 if(tracksInJet.empty()){
113 h_VxSecVertexInfoName->
push_back(
nullptr);
121 std::vector<const xAOD::IParticle*> inputIParticles;
124 inputIParticles.reserve(tracksInJet.size());
125 for (
const auto& iparticle : tracksInJet)
127 inputIParticles.push_back(*iparticle);
133 h_VxSecVertexInfoName->
push_back(myVertexInfo);
139 std::vector<std::string> decorationNames =
141 std::vector<SG::auxid_t> decorIDs;
142 decorIDs.reserve (decorationNames.size());
144 for (
const std::string&
s : decorationNames) {
146 if (
id != SG::null_auxid) {
147 decorIDs.push_back (
id);
159 trackContainer_nc->lockDecoration (
id);
163 return StatusCode::SUCCESS;
Const iterator class for DataVector/DataList.
const T * ptr() const
Return a pointer to the cached value.
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
virtual StatusCode execute(const EventContext &ctx) const override final
bool isValid() const
Test to see if the value is valid.
const std::vector< xAOD::Vertex * > & vertices() const
ToolHandle< InDet::ISecVertexInJetFinder > m_secVertexFinderToolHandle
SG::WriteHandleKey< Trk::VxSecVertexInfoContainer > m_VxSecVertexInfoName
const std::string & key() const
Return the StoreGate ID for the referenced object.
SG::ReadHandleKey< xAOD::JetContainer > m_JetCollectionName
An algorithm that can be simultaneously executed in multiple threads.
size_t auxid_t
Identifier for a particular aux data item.
Handle class for reading a decoration on an object.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const std::string & decorKey() const
Return the name of the decoration alias (CONT.DECOR).
virtual StatusCode initialize() override final
Main routines specific to an ATHENA algorithm.
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?
SG::ReadHandleKey< xAOD::VertexContainer > m_VertexCollectionName
The namespace of all packages in PhysicsAnalysis/JetTagging.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
void set(const T &val) const
Set the value, assuming it is currently invalid.
JetSecVtxFindingAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructors and destructors.
Class describing a Vertex.
SG::ReadDecorHandleKey< xAOD::JetContainer > m_TracksToTag
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
CxxUtils::CachedValue< std::vector< SG::auxid_t > > m_decorIDs
List of the track decorations that we produce.
Handle mappings between names and auxid_t.
Handle class for reading a decoration on an object.
#define ATLAS_THREAD_SAFE
Handle class for reading from StoreGate.
Define macros for attributes used to control the static checker.
bool isAvailable()
Test to see if this variable exists in the store, for the referenced object.
size_type size() const noexcept
Returns the number of elements in the collection.
bool empty() const noexcept
Returns true if the collection is empty.