ATLAS Offline Software
RingSetConf_v1.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef XAODCALORINGS_VERSIONS_RINGSETCONF_V1_H
5 #define XAODCALORINGS_VERSIONS_RINGSETCONF_V1_H
6 
7 // std includes:
8 #include <vector>
9 #include <iosfwd>
10 
11 // Athena framework includes:
12 #include "CaloGeoHelpers/CaloSampling.h"
14 
15 // EDM include(s):
18 
19 // local includes:
21 
22 namespace xAOD {
23 
24 // Forward declare the container type:
25 class RingSetConf_v1;
27 
36 
37  public:
38 
41 
49  struct RawConf {
51  unsigned nRings;
53  std::vector<CaloSampling::CaloSample> layers;
55  float etaWidth;
57  float phiWidth;
71  unsigned layerStartIdx;
73  unsigned layerEndIdx;
75  unsigned sectionStartIdx;
77  unsigned sectionEndIdx;
78 
81 
84  RawConf();
92  RawConf(const unsigned nRings,
93  const std::vector<CaloSampling::CaloSample> &layers,
94  const float etaWidth, const float phiWidth,
95  const float cellMaxDEtaDist, const float cellMaxDPhiDist,
98  const bool doEtaAxesDivision = false,
99  const bool doPhiAxesDivision = false);
103  RawConf(const unsigned nRings,
104  const std::vector<CaloSampling::CaloSample> &layers,
105  const float etaWidth, const float phiWidth,
106  const float cellMaxDEtaDist, const float cellMaxDPhiDist,
109  const bool doEtaAxesDivision,
110  const bool doPhiAxesDivision,
111  const unsigned layerStartIdx,
112  const unsigned layerEndIdx,
113  const unsigned sectionStartIdx,
114  const unsigned sectionEndIdx);
118  RawConf(const RingSetConf_v1 &rsConf);
120 
121  };
122 
124  typedef std::vector<RawConf> RawConfCollection;
126 
132  static bool isEMSection (const std::vector<CaloSampling::CaloSample> &layers);
133  static bool isHADSection(const std::vector<CaloSampling::CaloSample> &layers);
134  static bool isPSLayer (const std::vector<CaloSampling::CaloSample> &layers);
135  static bool isEM1Layer (const std::vector<CaloSampling::CaloSample> &layers);
136  static bool isEM2Layer (const std::vector<CaloSampling::CaloSample> &layers);
137  static bool isEM3Layer (const std::vector<CaloSampling::CaloSample> &layers);
138  static bool isHAD1Layer (const std::vector<CaloSampling::CaloSample> &layers);
139  static bool isHAD2Layer (const std::vector<CaloSampling::CaloSample> &layers);
140  static bool isHAD3Layer (const std::vector<CaloSampling::CaloSample> &layers);
145  const std::vector<CaloSampling::CaloSample> &layers);
147  const std::vector<CaloSampling::CaloSample> &layers);
151  static void print( const RawConf &raw, std::ostream &stream);
153 
156  static unsigned totalNumberOfRings( const RawConfCollection &clRingsConf );
160  static void getEdges( const RawConfCollection &clRingsConf,
161  const Ringer::CalJointSection sec,
162  unsigned &startEdge,
163  unsigned &endEdge);
167  static void getEdges( const RawConfCollection &clRingsConf,
169  unsigned &startEdge,
170  unsigned &endEdge);
174  static void addRawConfColBounderies( RawConfCollection &clRingsConf );
177  static void print( const RawConfCollection &raw, std::ostream &stream );
179 
182  static void fillRingSetConfContainer(
183  const RawConfCollection &rawConfCol,
188  static void getRawConfCol(RawConfCollection &rawConfCol,
191 
192 
195 
198  RingSetConf_v1();
202  RingSetConf_v1(const RingSetConf_v1& ringset);
206  RingSetConf_v1(const unsigned nRings,
207  const std::vector<CaloSampling::CaloSample> &rsLayers,
208  const float etaWidth, const float phiWidth,
209  const float cellMaxDEtaDist, const float cellMaxDPhiDist,
212  const bool doEtaAxesDivision, const bool doPhiAxesDivision,
213  const unsigned layerStartIdx, const unsigned layerEndIdx,
214  const unsigned sectionStartIdx, const unsigned sectionEndIdx);
218  RingSetConf_v1(const RawConf &confStruct);
220 
221 
225 
228 
233  unsigned nRings() const;
239  void setNRings(unsigned nRings);
241 
244 
247  unsigned nLayers() const;
253  const std::vector< CaloSampling::CaloSample >& layers() const;
259  void setLayers(const std::vector< CaloSampling::CaloSample > &layers);
263  CaloSampling::CaloSample layerAt(const unsigned idx) const;
267  void addLayer(const CaloSampling::CaloSample c);
271  void clearLayers();
273 
276 
283  float etaWidth() const;
291  float phiWidth() const;
297  void setEtaWidth(float etaWidth);
303  void setPhiWidth(float phiWidth);
309  float cellMaxDEtaDist() const;
315  float cellMaxDPhiDist() const;
333  bool doEtaAxesDivision() const;
345  bool doPhiAxesDivision() const;
353 
356 
373 
377 
384  unsigned layerStartIdx() const;
385 
391  unsigned sectionStartIdx() const;
392 
400  unsigned layerEndIdx() const;
401 
409  unsigned sectionEndIdx() const;
410 
428  void setLayerEndIdx(unsigned layerEndIdx);
436 
438 
441  void print( std::ostream &stream ) const;
443 
446 
449  const RingSetConf_v1::RawConf getRawConf() const;
451 
454 
457  RingSetConf_v1& operator=(const RingSetConf_v1& clrings);
459 
460 };
461 
464 //==============================================================================
465 inline
467 
468 //==============================================================================
469 inline
471  SG::AuxElement(ringsetconf)
472 {
473  this->makePrivateStore(ringsetconf);
474 }
475 
476 //==============================================================================
477 inline
479  : nRings(0),
480  etaWidth(0),
481  phiWidth(0),
482  cellMaxDEtaDist(0),
483  cellMaxDPhiDist(0),
484  calJointLayer(Ringer::CalJointLayer::UnknownJointLayer),
485  calJointSection(Ringer::CalJointSection::UnknownJointSection),
486  doEtaAxesDivision(false),
487  doPhiAxesDivision(false),
488  layerStartIdx(0),
489  layerEndIdx(0),
490  sectionStartIdx(0),
491  sectionEndIdx(0){;}
493 
494 } // End of namespace xAOD
495 
496 #include "xAODCore/BaseInfo.h"
498 
499 #endif // XAODCALORINGS_VERSIONS_RINGSETCONF_V1_H
500 
xAOD::RingSetConf_v1::RawConf::layerEndIdx
unsigned layerEndIdx
Hold the end of this layer on a non-segmented representation:
Definition: RingSetConf_v1.h:73
xAOD::RingSetConf_v1::setCalJointLayer
void setCalJointLayer(Ringer::CalJointLayer calJointLayer)
Set this RingSet CalJointLayer.
Definition: RingSetConf_v1.cxx:582
xAOD::RingSetConf_v1
Class holding the RingSet configuration used for the Reconstruction.
Definition: RingSetConf_v1.h:35
Ringer::UnknownJointLayer
@ UnknownJointLayer
Definition: CaloRingsDefs.h:54
xAOD::RingSetConf_v1::isEMSection
static bool isEMSection(const std::vector< CaloSampling::CaloSample > &layers)
Static methods:
Definition: RingSetConf_v1.cxx:21
xAOD::RingSetConf_v1::layerAt
CaloSampling::CaloSample layerAt(const unsigned idx) const
Get ith layer.
Definition: RingSetConf_v1.cxx:555
xAOD::RingSetConf_v1::setSectionEndIdx
void setSectionEndIdx(unsigned sectionEndIdx)
Set end section configuration index.
xAOD::RingSetConf_v1::print
static void print(const RawConf &raw, std::ostream &stream)
Prints rawConf.
Definition: RingSetConf_v1.cxx:206
xAOD::RingSetConf_v1::operator=
RingSetConf_v1 & operator=(const RingSetConf_v1 &clrings)
Assignment Operator.
Definition: RingSetConf_v1.cxx:688
xAOD::RingSetConf_v1::layerEndIdx
unsigned layerEndIdx() const
Returns end of section index for this RingSet Configuration when this configuration is concatened int...
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
xAOD::RingSetConf_v1::RawConf::layerStartIdx
unsigned layerStartIdx
Hold the start of this layer on a non-segmented representation:
Definition: RingSetConf_v1.h:71
xAOD::RingSetConf_v1::nRings
unsigned nRings() const
Get nRings.
xAOD::RingSetConf_v1::setdoEtaAxesDivision
void setdoEtaAxesDivision(bool doEtaAxesDivision)
Set doEtaAxesDivision.
Definition: RingSetConf_v1.cxx:634
xAOD::RingSetConf_v1::isHADSection
static bool isHADSection(const std::vector< CaloSampling::CaloSample > &layers)
Definition: RingSetConf_v1.cxx:41
AuxStoreAccessorMacros.h
xAOD::RingSetConf_v1::RawConf::phiWidth
float phiWidth
Ring Width in phi.
Definition: RingSetConf_v1.h:57
xAOD::RingSetConf_v1::isEM2Layer
static bool isEM2Layer(const std::vector< CaloSampling::CaloSample > &layers)
Definition: RingSetConf_v1.cxx:94
xAOD::RingSetConf_v1::isHAD1Layer
static bool isHAD1Layer(const std::vector< CaloSampling::CaloSample > &layers)
Definition: RingSetConf_v1.cxx:122
xAOD::RingSetConf_v1::setLayerEndIdx
void setLayerEndIdx(unsigned layerEndIdx)
Set end layer configuration index.
xAOD::RingSetConf_v1::RawConfCollection
std::vector< RawConf > RawConfCollection
typedef The raw configuration structure data holder
Definition: RingSetConf_v1.h:124
xAOD::RingSetConf_v1::setCellMaxDEtaDist
void setCellMaxDEtaDist(float cellMaxDEtaDist)
Set maxCellDEtaDist.
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:472
xAOD::RingSetConf_v1::RawConf::cellMaxDPhiDist
float cellMaxDPhiDist
Maximum distance cell in phi to seed.
Definition: RingSetConf_v1.h:61
xAOD::RingSetConf_v1::calJointLayer
Ringer::CalJointLayer calJointLayer() const
Retrieve this RingSet conf CalJointLayer.
Definition: RingSetConf_v1.cxx:576
BaseInfo.h
xAOD::RingSetConf_v1::nLayers
unsigned nLayers() const
RingSet layers size:
Definition: RingSetConf_v1.cxx:549
xAOD::RingSetConf_v1::sectionEndIdx
unsigned sectionEndIdx() const
Returns end of section index for this RingSet Configuration when this configuration is concatened int...
xAOD::RingSetConf_v1::RawConf::calJointLayer
Ringer::CalJointLayer calJointLayer
The Calorimeter Joint Layer of this RingSet (see CaloRingsDefs.h)
Definition: RingSetConf_v1.h:63
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::RingSetConf_v1::getRawConfCol
static void getRawConfCol(RawConfCollection &rawConfCol, const RingSetConfContainer_v1 *container)
Retrieve RawConfCollection from RingSetConf container.
Definition: RingSetConf_v1.cxx:380
xAOD::RingSetConf_v1::RawConf::nRings
unsigned nRings
Ringset number of Rings.
Definition: RingSetConf_v1.h:51
SG_BASE
SG_BASE(xAOD::RingSetConf_v1, SG::AuxElement)
xAOD::RingSetConf_v1::addLayer
void addLayer(const CaloSampling::CaloSample c)
Add layer.
Definition: RingSetConf_v1.cxx:561
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
xAOD::RingSetConf_v1::RawConf::etaWidth
float etaWidth
Ring Width in eta.
Definition: RingSetConf_v1.h:55
xAOD::RingSetConf_v1::whichLayer
static Ringer::CalJointLayer whichLayer(const std::vector< CaloSampling::CaloSample > &layers)
Definition: RingSetConf_v1.cxx:188
xAOD::RingSetConf_v1::isPSLayer
static bool isPSLayer(const std::vector< CaloSampling::CaloSample > &layers)
Definition: RingSetConf_v1.cxx:66
xAOD::RingSetConf_v1::layers
const std::vector< CaloSampling::CaloSample > & layers() const
get layers
Ringer::UnknownJointSection
@ UnknownJointSection
Definition: CaloRingsDefs.h:22
xAOD::RingSetConf_v1::isHAD2Layer
static bool isHAD2Layer(const std::vector< CaloSampling::CaloSample > &layers)
Definition: RingSetConf_v1.cxx:141
xAOD::RingSetConf_v1::isEM1Layer
static bool isEM1Layer(const std::vector< CaloSampling::CaloSample > &layers)
Definition: RingSetConf_v1.cxx:80
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
xAOD::RingSetConf_v1::setCalJointSection
void setCalJointSection(Ringer::CalJointSection calJointSection)
Set this RingSet CalJointSection.
Definition: RingSetConf_v1.cxx:594
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
xAOD::cellMaxDPhiDist
setPhiWidth cellMaxDPhiDist
Definition: RingSetConf_v1.cxx:624
xAOD::RingSetConf_v1::addRawConfColBounderies
static void addRawConfColBounderies(RawConfCollection &clRingsConf)
Add to RawConfCollection its JointLayer/JointSection bounderies.
Definition: RingSetConf_v1.cxx:239
xAOD::RingSetConf_v1::isHAD3Layer
static bool isHAD3Layer(const std::vector< CaloSampling::CaloSample > &layers)
Definition: RingSetConf_v1.cxx:160
xAOD::RingSetConf_v1::RawConf::sectionEndIdx
unsigned sectionEndIdx
Hold the end of this section on a non-segmented representation:
Definition: RingSetConf_v1.h:77
xAOD::RingSetConf_v1::getRawConf
const RingSetConf_v1::RawConf getRawConf() const
Retrieve raw RingSet Configuration struct.
Definition: RingSetConf_v1.cxx:682
xAOD::RingSetConf_v1::RawConf::RawConf
RawConf()
Configuration Struct ctors.
Definition: RingSetConf_v1.h:478
xAOD::RingSetConf_v1::RawConf::layers
std::vector< CaloSampling::CaloSample > layers
Ringset layers.
Definition: RingSetConf_v1.h:53
xAOD::RingSetConf_v1::RawConf::sectionStartIdx
unsigned sectionStartIdx
Hold the start of this section on a non-segmented representation:
Definition: RingSetConf_v1.h:75
xAOD::RingSetConf_v1::setNRings
void setNRings(unsigned nRings)
Set nRings.
xAOD::RingSetConf_v1::setPhiWidth
void setPhiWidth(float phiWidth)
Set phiWidth.
xAOD::RingSetConf_v1::isEM3Layer
static bool isEM3Layer(const std::vector< CaloSampling::CaloSample > &layers)
Definition: RingSetConf_v1.cxx:108
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
xAOD::RingSetConf_v1::sectionStartIdx
unsigned sectionStartIdx() const
Returns start of section index for this RingSet Configuration when this configuration is concatened i...
xAOD::RingSetConf_v1::clearLayers
void clearLayers()
Clear layers.
Definition: RingSetConf_v1.cxx:567
xAOD::RingSetConf_v1::doPhiAxesDivision
bool doPhiAxesDivision() const
Return the phiAxesDivision configuration.
Definition: RingSetConf_v1.cxx:640
xAOD::RingSetConf_v1::etaWidth
float etaWidth() const
Returns the etaWidth configuration step used for this RingSet.
Ringer::CalJointLayer
CalJointLayer
the joint calorimeter layers.
Definition: CaloRingsDefs.h:45
xAOD::RingSetConf_v1::layerStartIdx
unsigned layerStartIdx() const
Returns start of layer index for this RingSet Configuration when this configuration is concatened int...
xAOD::RingSetConf_v1::getEdges
static void getEdges(const RawConfCollection &clRingsConf, const Ringer::CalJointSection sec, unsigned &startEdge, unsigned &endEdge)
Get CalJointSection start and end edges.
Definition: RingSetConf_v1.cxx:330
CaloRingsDefs.h
xAOD::RingSetConf_v1::RawConf::doEtaAxesDivision
bool doEtaAxesDivision
Hold the option of eta axes division.
Definition: RingSetConf_v1.h:67
xAOD::RingSetConf_v1::setSectionStartIdx
void setSectionStartIdx(unsigned sectionEndIdx)
Set start section configuration index.
xAOD::RingSetConf_v1::RawConf::calJointSection
Ringer::CalJointSection calJointSection
The Calorimeter Joint Section (see CaloRingsDefs.h)
Definition: RingSetConf_v1.h:65
SG::AuxElement::makePrivateStore
void makePrivateStore()
Create a new (empty) private store for this object.
Definition: AuxElement.cxx:172
xAOD::layerEndIdx
layerEndIdx
Definition: RingSetConf_v1.cxx:663
xAOD::RingSetConf_v1::cellMaxDEtaDist
float cellMaxDEtaDist() const
Return the maximun cell distance in eta w.r.t seed.
xAOD::RingSetConf_v1::RingSetConf_v1
RingSetConf_v1()
Empty ctor:
Definition: RingSetConf_v1.h:466
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
xAOD::RingSetConf_v1::calJointSection
Ringer::CalJointSection calJointSection() const
Retrieve this RingSet conf CalJointSection.
Definition: RingSetConf_v1.cxx:588
xAOD::RingSetConf_v1::setEtaWidth
void setEtaWidth(float etaWidth)
Set etaWidth.
xAOD::RingSetConf_v1::RawConf::doPhiAxesDivision
bool doPhiAxesDivision
Hold the option of phi axes division.
Definition: RingSetConf_v1.h:69
xAOD::RingSetConf_v1::RawConf::cellMaxDEtaDist
float cellMaxDEtaDist
Maximum distance cell in eta to seed.
Definition: RingSetConf_v1.h:59
xAOD::RingSetConf_v1::phiWidth
float phiWidth() const
Returns the phiWidth configuration step used for this RingSet.
xAOD::sectionEndIdx
setLayerEndIdx sectionEndIdx
Definition: RingSetConf_v1.cxx:675
xAOD::phiWidth
phiWidth
Definition: RingSetConf_v1.cxx:612
xAOD::RingSetConf_v1::RawConf
Definition: RingSetConf_v1.h:49
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
xAOD::RingSetConf_v1::setLayerStartIdx
void setLayerStartIdx(unsigned layerStartIdx)
Set start layer configuration index.
xAOD::RingSetConf_v1::doEtaAxesDivision
bool doEtaAxesDivision() const
Return the etaAxesDivision configuration.
Definition: RingSetConf_v1.cxx:628
xAOD::RingSetConfContainer_v1
DataVector< xAOD::RingSetConf_v1 > RingSetConfContainer_v1
The container is a simple typedef for now.
Definition: RingSetConf_v1.h:25
SG::AuxElement::container
const SG::AuxVectorData * container() const
Return the container holding this element.
xAOD::RingSetConf_v1::totalNumberOfRings
static unsigned totalNumberOfRings(const RawConfCollection &clRingsConf)
Get the totalNumber of Rings contained in this configuration:
Definition: RingSetConf_v1.cxx:227
xAOD::RingSetConf_v1::whichSection
static Ringer::CalJointSection whichSection(const std::vector< CaloSampling::CaloSample > &layers)
Definition: RingSetConf_v1.cxx:179
python.compressB64.c
def c
Definition: compressB64.py:93
xAOD::RingSetConf_v1::fillRingSetConfContainer
static void fillRingSetConfContainer(const RawConfCollection &rawConfCol, RingSetConfContainer_v1 *container)
Creates RingSetConfContainer from RawConfCollection.
Definition: RingSetConf_v1.cxx:360
xAOD::RingSetConf_v1::cellMaxDPhiDist
float cellMaxDPhiDist() const
Return the maximun cell distance in phi w.r.t seed.
xAOD::RingSetConf_v1::setdoPhiAxesDivision
void setdoPhiAxesDivision(bool doPhiAxesDivision)
Set doPhiAxesDivision.
Definition: RingSetConf_v1.cxx:646
Ringer::CalJointSection
CalJointSection
the joint calorimeter sections.
Definition: CaloRingsDefs.h:18
AuxElement.h
Base class for elements of a container that can have aux data.
Ringer
Namespace dedicated for Ringer utilities.
Definition: CaloRingsDefs.h:9
xAOD::RingSetConf_v1::setCellMaxDPhiDist
void setCellMaxDPhiDist(float cellMaxDPhiDist)
Set maxCellDPhiDist.
xAOD::RingSetConf_v1::setLayers
void setLayers(const std::vector< CaloSampling::CaloSample > &layers)
set layers