ATLAS Offline Software
Loading...
Searching...
No Matches
ParticleCaloExtension.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef XAOD_PARTICLECALOEXTENSION_H
6#define XAOD_PARTICLECALOEXTENSION_H
7
10
11#ifndef XAOD_ANALYSIS
12// Athena includes
14#endif // not XAOD_ANALYSIS
15
16#include <vector>
17class CaloCell;
18
19namespace xAOD {
20
23 public:
26 std::vector<std::vector<float> >&& parameters,
27 std::vector<std::vector<float> >&& parametersCovariance,
28 std::vector<int>&& identifiers );
29
32
35
38
40 size_t numberOfParameters() const;
41
43 const CurvilinearParameters_t trackParameters(unsigned int index) const;
44
46 int parameterIdentifier(unsigned int index) const;
47
49 bool trackParameterCovarianceMatrix(ParametersCovMatrix_t& matrix, unsigned int index) const;
50
51#ifndef XAOD_ANALYSIS
55#endif // not XAOD_ANALYSIS
56
58 bool cellsAreAssociated() const;
59
61 const std::vector<CaloCell*>& caloCells() const;
62
64 void setCaloCells(const std::vector<CaloCell*>& cells);
65
66 private:
68#ifdef __clang__
69 [[maybe_unused]]
70#endif
71 float m_charge;
72
74 std::vector<std::vector<float> > m_parameters;
75
77 std::vector<std::vector<float> > m_parametersCovariance;
78
80 std::vector<int> m_identifiers;
81
83 bool m_cellsAreSet; // bool to store whether already set
84 std::vector<CaloCell*> m_caloCells; // vector of cells
85 };
86
89 return m_parameters.size();
90 }
91
93 inline const CurvilinearParameters_t ParticleCaloExtension::trackParameters(unsigned int index) const {
94 CurvilinearParameters_t tmp;
97 return tmp;
98 }
99
100 inline bool ParticleCaloExtension::trackParameterCovarianceMatrix(ParametersCovMatrix_t& cov, unsigned int index) const {
101 const std::vector<float>& covVec = m_parametersCovariance[index];
102 if( !covVec.empty() ) Amg::expand( covVec.begin(), covVec.end(),cov );
103 else{
104 cov.setIdentity();
105 return false;
106 }
107 return true;
108 }
109
111 inline int ParticleCaloExtension::parameterIdentifier(unsigned int index) const {
112 return m_identifiers[index];
113 }
114
116 return m_cellsAreSet;
117 }
118
119 inline const std::vector<CaloCell*>& ParticleCaloExtension::caloCells() const {
120 return m_caloCells;
121 }
122
123 inline void ParticleCaloExtension::setCaloCells(const std::vector<CaloCell*>& cells) {
124 m_caloCells = cells;
125 m_cellsAreSet=true;
126 }
127
128#ifndef XAOD_ANALYSIS
130
131 // copy the correct values into the temp matrix
132 ParametersCovMatrix_t cov;
135 }
136 // retrieve the parameters to build the curvilinear frame
139 Trk::CurvilinearParameters param(pos,mom,m_charge,std::move(cov));
140
141 return param;
142 }
143#endif // not XAOD_ANALYSIS
144
145}
146
147#include "xAODCore/CLASS_DEF.h"
151
152#endif
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
An STL vector of pointers that by default owns its pointed-to elements.
File providing the different SG_BASE macros.
DataVector< xAOD::ParticleCaloExtension > ParticleCaloExtensionCollection
static const Attributes_t empty
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
Derived DataVector<T>.
Definition DataVector.h:795
float m_charge
charge (unused in AnalysisBase)
bool trackParameterCovarianceMatrix(ParametersCovMatrix_t &matrix, unsigned int index) const
fill the matrix with the covariance at position 'index', returns false if the parameters at 'index' d...
std::vector< int > m_identifiers
identifiers of the intersections with detector layers
const CurvilinearParameters_t trackParameters(unsigned int index) const
Returns the track parameter vector at 'index'.
const std::vector< CaloCell * > & caloCells() const
return vector of cells
int parameterIdentifier(unsigned int index) const
Return the ParameterPosition of the parameters at 'index'.
const Trk::CurvilinearParameters curvilinearParameters(unsigned int index) const
Returns a curvilinear representation of the parameters at 'index'.
size_t numberOfParameters() const
Returns the number of additional parameters stored in the Particle.
ParticleCaloExtension(const ParticleCaloExtension &)=delete
no copy constructor
std::vector< std::vector< float > > m_parametersCovariance
covariance of parameters of the intersections with detector layers
ParticleCaloExtension & operator=(const ParticleCaloExtension &)=delete
no assignment operator
std::vector< std::vector< float > > m_parameters
parameters of the intersections with detector layers
std::vector< CaloCell * > m_caloCells
void setCaloCells(const std::vector< CaloCell * > &cells)
set vector of cells
ParticleCaloExtension(float charge, std::vector< std::vector< float > > &&parameters, std::vector< std::vector< float > > &&parametersCovariance, std::vector< int > &&identifiers)
constructor taking calo extrapolation as input.
bool cellsAreAssociated() const
return whether cells were already associated or not
void expand(std::vector< float >::const_iterator it, std::vector< float >::const_iterator, AmgSymMatrix(N) &covMatrix)
Eigen::Matrix< double, 3, 1 > Vector3D
CurvilinearParametersT< TrackParametersDim, Charged, PlaneSurface > CurvilinearParameters
Definition index.py:1
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.