ATLAS Offline Software
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 void xAOD::PixelCluster_v1::setRDOlist(const std::vector<Identifier>& rdoList) {
26  std::vector<Identifier::value_type> rdos(rdoList.size());
27  for (std::size_t i(0); i < rdos.size(); ++i) {
28  rdos[i] = rdoList[i].get_compact();
29  }
30  rdoListAcc(*this) = rdos;
31 }
32 
33 const std::vector<Identifier> xAOD::PixelCluster_v1::rdoList() const {
34  const std::vector<Identifier::value_type>& values = rdoListAcc(*this);
35  std::vector<Identifier> rdos(values.size());
36  for (std::size_t i(0); i < rdos.size(); ++i) {
37  rdos[i].set_literal(values[i]);
38  }
39  return rdos;
40 }
41 
43 
45 
46 void xAOD::PixelCluster_v1::setChannelsInPhiEta(int channelsInPhi,
47  int channelsInEta) {
48  static const SG::AuxElement::Accessor<int> chanPhiAcc("channelsInPhi");
49  chanPhiAcc(*this) = channelsInPhi;
50  static const SG::AuxElement::Accessor<int> chanEtaAcc("channelsInEta");
51  chanEtaAcc(*this) = channelsInEta;
52 }
53 
55  setWidthInEta)
56 
57 void xAOD::PixelCluster_v1::setOmegas(float omegaX, float omegaY) {
58  static const SG::AuxElement::Accessor<float> omegaXAcc("omegaX");
59  omegaXAcc(*this) = omegaX;
60  static const SG::AuxElement::Accessor<float> omegaYAcc("omegaY");
61  omegaYAcc(*this) = omegaY;
62 }
63 
66 
67 AUXSTORE_OBJECT_SETTER_AND_GETTER(xAOD::PixelCluster_v1, std::vector<int>, totList,
68  setToTlist)
69 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(xAOD::PixelCluster_v1, int, totalToT,
70  setTotalToT)
71 
72 AUXSTORE_OBJECT_SETTER_AND_GETTER(xAOD::PixelCluster_v1, std::vector<float>, chargeList,
73  setChargelist)
74 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(xAOD::PixelCluster_v1, float, totalCharge,
75  setTotalCharge)
76 
77 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(xAOD::PixelCluster_v1, float, energyLoss,
78  setEnergyLoss)
79 
80 AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(xAOD::PixelCluster_v1, char, bool, isSplit)
81 AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(xAOD::PixelCluster_v1, char, bool, isSplit,
82  setIsSplit)
83 
84 void xAOD::PixelCluster_v1::setSplitProbabilities(float prob1, float prob2) {
85  static const SG::AuxElement::Accessor<float> prob1Acc("splitProbability1");
86  prob1Acc(*this) = prob1;
87  static const SG::AuxElement::Accessor<float> prob2Acc("splitProbability2");
88  prob2Acc(*this) = prob2;
89 }
90 
91 AUXSTORE_PRIMITIVE_GETTER(xAOD::PixelCluster_v1, float, splitProbability1)
92 
93 AUXSTORE_PRIMITIVE_GETTER(xAOD::PixelCluster_v1, float, splitProbability2)
94 
96  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:66
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:33
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:25
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:92
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:57
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:59
xAOD::AUXSTORE_OBJECT_SETTER_AND_GETTER
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
Definition: CaloRings_v1.cxx:27