ATLAS Offline Software
Loading...
Searching...
No Matches
MeasurementToTruthParticleAssociation.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4#ifndef MEASUREMENTTOGENPARTICLEASSOCIATION_H
5#define MEASUREMENTTOGENPARTICLEASSOCIATION_H
6#include "boost/container/small_vector.hpp"
9#include "AthLinks/DataLink.h"
10#include <vector>
11
12namespace ActsTrk
13{
14 constexpr unsigned int NTruthParticlesPerMeasurement = 5; // chosen to make the small_vector fit into 164 bytes
15 // a tiny fraction of measurements will have more than
16 // 5 associated GenParticles
17 using ParticleVector = boost::container::small_vector<const xAOD::TruthParticle *, NTruthParticlesPerMeasurement>;
18 class MeasurementToTruthParticleAssociation : public std::vector<ParticleVector> {
19 public:
20 using std::vector<ParticleVector>::vector ;
21
29
30 if (!container) return false;
31
32 if (container == m_sourceMeasurements.getDataPtr()) return true;
33
34 return false;
35 }
36
37 // convenience methods to convert "data-links" to derived measurement container
38 template <class T_MeasurementContainer>
39 void setSourceContainer(const T_MeasurementContainer &source, const EventContext &ctx) {
41 }
42 template <class T_MeasurementContainer>
46
47 private:
49 };
50
51}
52
55
56#endif
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
void setSourceContainer(const T_MeasurementContainer &source, const EventContext &ctx)
const xAOD::UncalibratedMeasurementContainer * sourceContainer() const
void setSourceContainer(DataLink< xAOD::UncalibratedMeasurementContainer > &&source)
DataLink< xAOD::UncalibratedMeasurementContainer > m_sourceMeasurements
void setSourceContainer(const DataLink< T_MeasurementContainer > &source)
bool isCompatibleWith(const xAOD::UncalibratedMeasurementContainer *container) const
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
boost::container::small_vector< const xAOD::TruthParticle *, NTruthParticlesPerMeasurement > ParticleVector
constexpr unsigned int NTruthParticlesPerMeasurement
UncalibratedMeasurementContainer_v1 UncalibratedMeasurementContainer
Define the version of the uncalibrated measurement container.