Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
PixelCluster_v1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // EDM include(s):
7 // Local include(s):
9 
10 static const SG::AuxElement::Accessor<std::array<float, 3> > globalPosAcc(
11  "globalPosition");
13  rdoListAcc("rdoList");
14 
16  const auto& values = globalPosAcc(*this);
17  return ConstVectorMap<3>{values.data()};
18 }
19 
21  auto& values = globalPosAcc(*this);
22  return VectorMap<3>{values.data()};
23 }
24 
25 
26 void xAOD::PixelCluster_v1::setRDOlist(std::vector<Identifier::value_type>&& rdoList) {
27  rdoListAcc(*this) = std::move(rdoList);
28 }
29 
30 
31 //Custom setter for identifier inputs
32 void xAOD::PixelCluster_v1::setRDOlist(const std::vector<Identifier>& rdoList) {
33  std::vector<Identifier::value_type> rdos(rdoList.size());
34  for (std::size_t i(0); i < rdos.size(); ++i) {
35  rdos[i] = rdoList[i].get_compact();
36  }
37  rdoListAcc(*this) = std::move(rdos);
38 }
39 
40 
41 
42 const std::vector<Identifier> xAOD::PixelCluster_v1::rdoList() const {
43  const std::vector<Identifier::value_type>& values = rdoListAcc(*this);
44  std::vector<Identifier> rdos(values.size());
45  for (std::size_t i(0); i < rdos.size(); ++i) {
46  rdos[i].set_literal(values[i]);
47  }
48  return rdos;
49 }
50 
52 
54 
55 void xAOD::PixelCluster_v1::setChannelsInPhiEta(int channelsInPhi,
56  int channelsInEta) {
57  static const SG::AuxElement::Accessor<int> chanPhiAcc("channelsInPhi");
58  chanPhiAcc(*this) = channelsInPhi;
59  static const SG::AuxElement::Accessor<int> chanEtaAcc("channelsInEta");
60  chanEtaAcc(*this) = channelsInEta;
61 }
62 
64  setWidthInEta)
65 
66 void xAOD::PixelCluster_v1::setOmegas(float omegaX, float omegaY) {
67  static const SG::AuxElement::Accessor<float> omegaXAcc("omegaX");
68  omegaXAcc(*this) = omegaX;
69  static const SG::AuxElement::Accessor<float> omegaYAcc("omegaY");
70  omegaYAcc(*this) = omegaY;
71 }
72 
75 
76 AUXSTORE_OBJECT_SETTER_AND_GETTER(xAOD::PixelCluster_v1, std::vector<int>, totList,
77  setToTlist)
78 
79 AUXSTORE_OBJECT_MOVE(xAOD::PixelCluster_v1, std::vector<int>, totList, setToTlist)
80 
81 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(xAOD::PixelCluster_v1, int, totalToT,
82  setTotalToT)
83 
84 AUXSTORE_OBJECT_SETTER_AND_GETTER(xAOD::PixelCluster_v1, std::vector<float>, chargeList,
85  setChargelist)
86 
87 AUXSTORE_OBJECT_MOVE(xAOD::PixelCluster_v1, std::vector<float>, chargeList, setChargelist)
88 
89 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(xAOD::PixelCluster_v1, float, totalCharge,
90  setTotalCharge)
91 
92 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(xAOD::PixelCluster_v1, float, energyLoss,
93  setEnergyLoss)
94 
95 AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(xAOD::PixelCluster_v1, char, bool, isSplit)
96 AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(xAOD::PixelCluster_v1, char, bool, isSplit,
97  setIsSplit)
98 
99 void xAOD::PixelCluster_v1::setSplitProbabilities(float prob1, float prob2) {
100  static const SG::AuxElement::Accessor<float> prob1Acc("splitProbability1");
101  prob1Acc(*this) = prob1;
102  static const SG::AuxElement::Accessor<float> prob2Acc("splitProbability2");
103  prob2Acc(*this) = prob2;
104 }
105 
106 AUXSTORE_PRIMITIVE_GETTER(xAOD::PixelCluster_v1, float, splitProbability1)
107 
108 AUXSTORE_PRIMITIVE_GETTER(xAOD::PixelCluster_v1, float, splitProbability2)
109 
111  setLVL1A)
xAOD::AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1, float, IP2D_pb, setIP2D_pb) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
AuxStoreAccessorMacros.h
xAOD::PixelCluster_v1::rdoList
const std::vector< Identifier > rdoList() const
Returns the list of identifiers of the channels building the cluster.
Definition: PixelCluster_v1.cxx:42
AUXSTORE_OBJECT_MOVE
#define AUXSTORE_OBJECT_MOVE(CL, TYPE, NAME, SETTER)
Macro creating a move accessor for complex auxiliary properties.
Definition: AuxStoreAccessorMacros.h:101
xAOD::PixelCluster_v1::setRDOlist
void setRDOlist(const std::vector< Identifier > &rdolist)
Sets the list of identifiers of the channels building the cluster.
Definition: PixelCluster_v1.cxx:32
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
InDetSecVtxTruthMatchUtils::isSplit
bool isSplit(int matchInfo)
Definition: InDetSecVtxTruthMatchTool.h:56
xAOD::AUXSTORE_PRIMITIVE_SETTER_WITH_CAST
AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(CompositeParticle_v1, float, double, px, setPx) AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(CompositeParticle_v1
lumiFormat.i
int i
Definition: lumiFormat.py:85
vector
Definition: MultiHisto.h:13
xAOD::AUXSTORE_PRIMITIVE_GETTER_WITH_CAST
AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(Muon_v1, uint8_t, Muon_v1::EnergyLossType, energyLossType) AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(Muon_v1
xAOD::PixelCluster_v1::globalPosition
ConstVectorMap< 3 > globalPosition() const
Returns the global position of the pixel cluster.
Definition: PixelCluster_v1.cxx:15
xAOD::PixelCluster_v1::setOmegas
void setOmegas(float omegax, float omegay)
Sets omegax and omegay, i.e.
xAOD::PixelCluster_v1
Definition: PixelCluster_v1.h:17
xAOD::VectorMap
Eigen::Map< MeasVector< N > > VectorMap
Definition: MeasurementDefs.h:58
AUXSTORE_PRIMITIVE_GETTER
#define AUXSTORE_PRIMITIVE_GETTER(CL, TYPE, NAME)
Macro creating the reader function for a primitive auxiliary property.
Definition: AuxStoreAccessorMacros.h:59
PixelCluster_v1.h
xAOD::ConstVectorMap
Eigen::Map< const MeasVector< N > > ConstVectorMap
Definition: MeasurementDefs.h:60
xAOD::AUXSTORE_OBJECT_SETTER_AND_GETTER
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
Definition: CaloRings_v1.cxx:27