ATLAS Offline Software
CMXEtSums_v1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id: CMXEtSums_v1.cxx 687949 2015-08-06 15:48:49Z amazurov $
6 
7 // EDM includes(s):
9 
10 // Local include(s):
12 
13 
14 namespace {
15 
16 
17 std::string sourceComponent(uint8_t source)
18 {
19  switch (source)
20  {
21  case xAOD::CMXEtSums_v1::Sources::REMOTE_STANDARD:
22  return "REMOTE_STANDARD";
23  case xAOD::CMXEtSums_v1::Sources::REMOTE_RESTRICTED:
24  return "REMOTE_RESTRICTED";
25  case xAOD::CMXEtSums_v1::Sources::LOCAL_STANDARD:
26  return "LOCAL_STANDARD";
27  case xAOD::CMXEtSums_v1::Sources::LOCAL_RESTRICTED:
28  return "LOCAL_RESTRICTED";
29  case xAOD::CMXEtSums_v1::Sources::TOTAL_STANDARD:
30  return "TOTAL_STANDARD";
31  case xAOD::CMXEtSums_v1::Sources::TOTAL_RESTRICTED:
32  return "TOTAL_RESTRICTED";
33  case xAOD::CMXEtSums_v1::Sources::SUM_ET_STANDARD:
34  return "SUM_ET_STANDARD";
35  case xAOD::CMXEtSums_v1::Sources::SUM_ET_RESTRICTED:
36  return "SUM_ET_RESTRICTED";
37  case xAOD::CMXEtSums_v1::Sources::MISSING_ET_STANDARD:
38  return "MISSING_ET_STANDARD";
39  case xAOD::CMXEtSums_v1::Sources::MISSING_ET_RESTRICTED:
40  return "MISSING_ET_RESTRICTED";
41  case xAOD::CMXEtSums_v1::Sources::MISSING_ET_SIG_STANDARD:
42  return "MISSING_ET_SIG_STANDARD";
43  default:
44  return std::to_string(source);
45  }
46 }
47 
48 
49 } // anonymous namespace
50 
51 namespace xAOD{
52 
54  SG::AuxElement()
55  {
56  }
57 
60  {
61  setCrate( crate );
63  }
64 
67  const std::vector<uint16_t>& etVec,
68  const std::vector<uint16_t>& exVec,
69  const std::vector<uint16_t>& eyVec,
70  const std::vector<uint32_t>& etErrorVec,
71  const std::vector<uint32_t>& exErrorVec,
72  const std::vector<uint32_t>& eyErrorVec,
73  const uint8_t peak)
74  {
75  setCrate( crate );
77  setEtVec( etVec );
78  setExVec( exVec );
79  setEyVec( eyVec );
83  setPeak( peak );
84  }
85 
86 
89  void CMXEtSums_v1::addEt(const std::vector<uint16_t>& etVec,const std::vector<uint32_t>& etErrorVec)
90  {
91  setEtVec( etVec );
93  }
94 
96  void CMXEtSums_v1::addEx(const std::vector<uint16_t>& exVec,const std::vector<uint32_t>& exErrorVec)
97  {
98  setExVec( exVec );
100  }
101 
103  void CMXEtSums_v1::addEy(const std::vector<uint16_t>& eyVec,const std::vector<uint32_t>& eyErrorVec)
104  {
105  setEyVec( eyVec );
107  }
108 
110  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( CMXEtSums_v1 , uint8_t , sourceComponent , setSourceComponent )
112  AUXSTORE_OBJECT_SETTER_AND_GETTER( CMXEtSums_v1 , std::vector<uint16_t> , etVec , setEtVec )
113  AUXSTORE_OBJECT_SETTER_AND_GETTER( CMXEtSums_v1 , std::vector<uint16_t> , exVec , setExVec )
114  AUXSTORE_OBJECT_SETTER_AND_GETTER( CMXEtSums_v1 , std::vector<uint16_t> , eyVec , setEyVec )
115  AUXSTORE_OBJECT_SETTER_AND_GETTER( CMXEtSums_v1 , std::vector<uint32_t> , etErrorVec , setEtErrorVec )
116  AUXSTORE_OBJECT_SETTER_AND_GETTER( CMXEtSums_v1 , std::vector<uint32_t> , exErrorVec , setExErrorVec )
117  AUXSTORE_OBJECT_SETTER_AND_GETTER( CMXEtSums_v1 , std::vector<uint32_t> , eyErrorVec , setEyErrorVec )
118 
119 
120 
125  {
126  return etVec()[ peak() ];
127  }
128 
131  {
132  return exVec()[ peak() ];
133  }
134 
137  {
138  return eyVec()[ peak() ];
139  }
140 
143  {
144  return etErrorVec()[ peak() ];
145  }
146 
149  {
150  return exErrorVec()[ peak() ];
151  }
152 
155  {
156  return eyErrorVec()[ peak() ];
157  }
158 
159 
160  std::ostream &operator<<(std::ostream &os, const xAOD::CMXEtSums_v1 &el)
161  {
162  os << "xAOD::CMXEtSums crate=" << int(el.crate())
163  << " sourceComponent=" << sourceComponent(el.sourceComponent())
164  << " peak=" << int(el.peak()) << " et=" << el.et()
165  << " ex=" << int(el.ex()) << " ey=" << int(el.ey())
166  << " etError=" << int(el.etError()) << " exError="
167  << int(el.exError()) << ", eyError=" << int(el.eyError()) << " etVec=[";
168  std::for_each(el.etVec().begin(), el.etVec().end(), [&](uint16_t n) { os << " " << int(n); });
169  os << "]";
170  return os;
171  }
172 
173 
174 } // namespace xAOD
175 
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
xAOD::CMXEtSums_v1::setEyErrorVec
void setEyErrorVec(const std::vector< uint32_t > &)
set eyErrorVec
et
Extra patterns decribing particle interation process.
xAOD::CMXEtSums_v1::setEtVec
void setEtVec(const std::vector< uint16_t > &)
set etVec
xAOD::CMXEtSums_v1::addEy
void addEy(const std::vector< uint16_t > &eyVec, const std::vector< uint32_t > &eyErrorVec)
add Ey
Definition: CMXEtSums_v1.cxx:103
xAOD::CMXEtSums_v1::exError
uint32_t exError() const
get exErrorVec at peak bunch crossing
Definition: CMXEtSums_v1.cxx:148
xAOD::CMXEtSums_v1::exVec
const std::vector< uint16_t > & exVec() const
get exVec
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
xAOD::CMXEtSums_v1::eyError
uint32_t eyError() const
get eyErrorVec at peak bunch crossing
Definition: CMXEtSums_v1.cxx:154
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
xAOD::int
setRawEt setRawPhi int
Definition: TrigCaloCluster_v1.cxx:33
xAOD::CMXEtSums_v1::ey
uint16_t ey() const
get eyVec at peak bunch crossing
Definition: CMXEtSums_v1.cxx:136
AuxStoreAccessorMacros.h
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
xAOD::CMXEtSums_v1::etError
uint32_t etError() const
get etErrorVec at peak bunch crossing
Definition: CMXEtSums_v1.cxx:142
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::CMXEtSums_v1::etVec
const std::vector< uint16_t > & etVec() const
get etVec
xAOD::CMXEtSums_v1::setEtErrorVec
void setEtErrorVec(const std::vector< uint32_t > &)
set etErrorVec
xAOD::CMXEtSums_v1::peak
uint8_t peak() const
get peak
xAOD::CMXEtSums_v1::ex
uint16_t ex() const
get exVec at peak bunch crossing
Definition: CMXEtSums_v1.cxx:130
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
xAOD::CMXEtSums_v1
Description of CMXEtSums_v1.
Definition: CMXEtSums_v1.h:28
beamspotman.n
n
Definition: beamspotman.py:731
CMXEtSums_v1.h
xAOD::CMXEtSums_v1::crate
uint8_t crate() const
get crate
xAOD::CMXEtSums_v1::addEt
void addEt(const std::vector< uint16_t > &etVec, const std::vector< uint32_t > &etErrorVec)
add data to existing object add Et
Definition: CMXEtSums_v1.cxx:89
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
xAOD::CMXEtSums_v1::setExVec
void setExVec(const std::vector< uint16_t > &)
set exVec
xAOD::CMXEtSums_v1::eyErrorVec
const std::vector< uint32_t > & eyErrorVec() const
get eyErrorVec
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
xAOD::CMXEtSums_v1::CMXEtSums_v1
CMXEtSums_v1()
Default constructor.
Definition: CMXEtSums_v1.cxx:53
xAOD::CMXEtSums_v1::setCrate
void setCrate(uint8_t)
set crate
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
xAOD::CMXEtSums_v1::addEx
void addEx(const std::vector< uint16_t > &exVec, const std::vector< uint32_t > &exErrorVec)
add Ex
Definition: CMXEtSums_v1.cxx:96
xAOD::CMXEtSums_v1::setPeak
void setPeak(uint8_t)
set peak
xAOD::CMXEtSums_v1::setSourceComponent
void setSourceComponent(uint8_t)
set source
copySelective.source
string source
Definition: copySelective.py:32
xAOD::CMXEtSums_v1::etErrorVec
const std::vector< uint32_t > & etErrorVec() const
get etErrorVec
xAOD::CMXEtSums_v1::setEyVec
void setEyVec(const std::vector< uint16_t > &)
set eyVec
xAOD::CMXEtSums_v1::initialize
virtual void initialize(const uint8_t crate, const uint8_t source)
initialize
Definition: CMXEtSums_v1.cxx:59
xAOD::CMXEtSums_v1::setExErrorVec
void setExErrorVec(const std::vector< uint32_t > &)
set exErrorVec
xAOD::operator<<
std::ostream & operator<<(std::ostream &out, const std::pair< FIRST, SECOND > &pair)
Helper print operator.
Definition: RDataSource.cxx:53
xAOD::AUXSTORE_OBJECT_SETTER_AND_GETTER
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
Definition: CaloRings_v1.cxx:27
xAOD::CMXEtSums_v1::exErrorVec
const std::vector< uint32_t > & exErrorVec() const
get exErrorVec
xAOD::CMXEtSums_v1::eyVec
const std::vector< uint16_t > & eyVec() const
get eyVec