22 const std::vector<CaloSampling::CaloSample> &
layers)
24 if (
layers.empty())
return false;
25 for (
const auto &layer :
layers){
26 if ( (layer != CaloSampling::CaloSample::PreSamplerB ) &&
27 (layer != CaloSampling::CaloSample::PreSamplerE ) &&
28 (layer != CaloSampling::CaloSample::EMB1 ) &&
29 (layer != CaloSampling::CaloSample::EMB2 ) &&
30 (layer != CaloSampling::CaloSample::EMB3 ) &&
31 (layer != CaloSampling::CaloSample::EME1 ) &&
32 (layer != CaloSampling::CaloSample::EME2 ) &&
33 (layer != CaloSampling::CaloSample::EME3 ) ){
42 const std::vector<CaloSampling::CaloSample> &
layers)
44 if (
layers.empty())
return false;
45 for (
const auto &layer :
layers){
46 if ( (layer != CaloSampling::CaloSample::HEC0 ) &&
47 (layer != CaloSampling::CaloSample::HEC1 ) &&
48 (layer != CaloSampling::CaloSample::HEC2 ) &&
49 (layer != CaloSampling::CaloSample::HEC3 ) &&
50 (layer != CaloSampling::CaloSample::TileBar0 ) &&
51 (layer != CaloSampling::CaloSample::TileBar1 ) &&
52 (layer != CaloSampling::CaloSample::TileBar2 ) &&
53 (layer != CaloSampling::CaloSample::TileGap1 ) &&
54 (layer != CaloSampling::CaloSample::TileGap2 ) &&
55 (layer != CaloSampling::CaloSample::TileGap3 ) &&
56 (layer != CaloSampling::CaloSample::TileExt0 ) &&
57 (layer != CaloSampling::CaloSample::TileExt1 ) &&
58 (layer != CaloSampling::CaloSample::TileExt2 ) ){
67 const std::vector<CaloSampling::CaloSample> &
layers)
69 if (
layers.empty())
return false;
71 if ( (layer != CaloSampling::CaloSample::PreSamplerB ) &&
72 (layer != CaloSampling::CaloSample::PreSamplerE ) ){
81 const std::vector<CaloSampling::CaloSample> &
layers)
83 if (
layers.empty())
return false;
85 if ( (layer != CaloSampling::CaloSample::EMB1 ) &&
86 (layer != CaloSampling::CaloSample::EME1 ) ){
95 const std::vector<CaloSampling::CaloSample> &
layers)
97 if (
layers.empty())
return false;
98 for (
const auto &layer :
layers){
99 if ( (layer != CaloSampling::CaloSample::EMB2 ) &&
100 (layer != CaloSampling::CaloSample::EME2 ) ){
109 const std::vector<CaloSampling::CaloSample> &
layers)
111 if (
layers.empty())
return false;
112 for (
const auto &layer :
layers){
113 if ( (layer != CaloSampling::CaloSample::EMB3 ) &&
114 (layer != CaloSampling::CaloSample::EME3 ) ){
123 const std::vector<CaloSampling::CaloSample> &
layers)
125 if (
layers.empty())
return false;
126 for (
const auto &layer :
layers){
127 if ( (layer != CaloSampling::CaloSample::HEC0 ) &&
128 (layer != CaloSampling::CaloSample::HEC1 ) &&
129 (layer != CaloSampling::CaloSample::TileBar0 ) &&
130 (layer != CaloSampling::CaloSample::TileGap1 ) &&
131 (layer != CaloSampling::CaloSample::TileGap2 ) &&
132 (layer != CaloSampling::CaloSample::TileGap3 ) &&
133 (layer != CaloSampling::CaloSample::TileExt0 ) ){
142 const std::vector<CaloSampling::CaloSample> &
layers)
144 if (
layers.empty())
return false;
145 for (
const auto &layer :
layers){
146 if ( (layer != CaloSampling::CaloSample::HEC1 ) &&
147 (layer != CaloSampling::CaloSample::HEC2 ) &&
148 (layer != CaloSampling::CaloSample::TileBar1 ) &&
149 (layer != CaloSampling::CaloSample::TileGap1 ) &&
150 (layer != CaloSampling::CaloSample::TileGap2 ) &&
151 (layer != CaloSampling::CaloSample::TileGap3 ) &&
152 (layer != CaloSampling::CaloSample::TileExt1 ) ){
161 const std::vector<CaloSampling::CaloSample> &
layers)
163 if (
layers.empty())
return false;
164 for (
const auto &layer :
layers){
165 if ( (layer != CaloSampling::CaloSample::HEC2 ) &&
166 (layer != CaloSampling::CaloSample::HEC3 ) &&
167 (layer != CaloSampling::CaloSample::TileBar2 ) &&
168 (layer != CaloSampling::CaloSample::TileGap1 ) &&
169 (layer != CaloSampling::CaloSample::TileGap2 ) &&
170 (layer != CaloSampling::CaloSample::TileGap3 ) &&
171 (layer != CaloSampling::CaloSample::TileExt2 ) ){
180 const std::vector<CaloSampling::CaloSample> &
layers)
189 const std::vector<CaloSampling::CaloSample> &
layers)
220 stream <<
"|" << std::endl;
231 for (
const auto &rsRawConfCol : rawConfCol )
241 if ( clRingsConf.empty() ) {
242 throw std::runtime_error(std::string(
243 "Cannot add the JointLayer/JointSection bounderies "
244 "into an empty RawConfCollection."));
247 unsigned startOfEMJointSection(0),
248 endOfEMJointSection(0),
249 startOfHADJointSection(0),
250 endOfHADJointSection(0),
253 bool isWithinEMJointSection(
false),
254 isWithinHADJointSection(
false);
257 for (
const auto &rawConf : clRingsConf ){
262 if ( !isWithinEMJointSection && isEM ) {
263 startOfEMJointSection = currentRingIdx;
264 isWithinEMJointSection =
true;
266 if ( !isWithinHADJointSection && isHAD ) {
267 startOfHADJointSection = currentRingIdx;
268 isWithinHADJointSection =
true;
271 if ( isWithinEMJointSection && !isEM ) {
272 endOfEMJointSection = currentRingIdx;
273 isWithinEMJointSection =
false;
275 if ( isWithinHADJointSection && !isHAD ) {
276 endOfHADJointSection = currentRingIdx;
277 isWithinHADJointSection =
false;
280 currentRingIdx += rawConf.nRings;
284 if ( isWithinEMJointSection ) {
285 endOfEMJointSection = currentRingIdx;
286 }
else if ( isWithinHADJointSection ) {
287 endOfHADJointSection = currentRingIdx;
292 for (
auto &rawConf : clRingsConf ){
294 rawConf.layerStartIdx = currentRingIdx;
295 currentRingIdx += rawConf.nRings;
296 rawConf.layerEndIdx = currentRingIdx;
298 switch (rawConf.calJointSection) {
301 rawConf.sectionStartIdx = startOfEMJointSection;
302 rawConf.sectionEndIdx = endOfEMJointSection;
307 rawConf.sectionStartIdx = startOfHADJointSection;
308 rawConf.sectionEndIdx = endOfHADJointSection;
312 throw std::runtime_error(std::string(
313 "Found unknown JointSection type."));
320 std::ostream &stream )
322 stream <<
"RawConfCollection is : " << std::endl;
323 for (
unsigned rsIdx = 0; rsIdx < rawCol.size(); ++rsIdx) {
324 stream <<
"RawConf #" << rsIdx <<
" : ";
335 for(
const auto &rsConf : clRingsConf ) {
336 if ( rsConf.calJointSection == sec ) {
337 startEdge = rsConf.sectionStartIdx;
338 endEdge = rsConf.sectionEndIdx;
350 for(
const auto &rsConf : clRingsConf ) {
351 if ( rsConf.calJointLayer == layer ) {
352 startEdge = rsConf.layerStartIdx;
353 endEdge = rsConf.layerEndIdx;
367 for (
const auto& rsRawConf : rawConfCol ) {
368 container.push_back(std::make_unique<RingSetConf_v1>( rsRawConf ));
380 throw std::runtime_error(std::string(
"Retrieved nullptr when trying to create"
381 " RawConfCollection."));
387 for (
const auto *
const rsConf : *
container ) {
388 rawConfCol.push_back( rsConf->getRawConf() );
397 const std::vector<CaloSampling::CaloSample> &
layers,
446 const std::vector<CaloSampling::CaloSample> &
layers,
471 const std::vector<CaloSampling::CaloSample> &
layers,
531 return reinterpret_cast<const std::vector<CaloSampling::CaloSample>&
>(
537 const std::vector<CaloSampling::CaloSample>&
layers) {
539 acc.set( *
this ,
reinterpret_cast<const std::vector<unsigned>&
>(
layers) );
545 return acc( *this ).size();
557 acc( *this ).push_back(c);
563 acc( *this ).clear();
624 return static_cast<bool>(
acc( *
this) );
636 return static_cast<bool>(
acc( *
this ) );
683 if (
this != &rsConf ){
707 stream <<
"|" << std::endl;
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of primitive auxiliary properties.
void makePrivateStore()
Create a new (empty) private store for this object.
AuxElement & operator=(const AuxElement &other)
Assignment.
SG::ConstAccessor< T, ALLOC > ConstAccessor
bool hasStore() const
Return true if this object has an associated store.
SG::Accessor< T, ALLOC > Accessor
const SG::AuxVectorData * container() const
Return the container holding this element.
Class holding the RingSet configuration used for the Reconstruction.
Ringer::CalJointSection calJointSection() const
Retrieve this RingSet conf CalJointSection.
unsigned layerEndIdx() const
Returns end of section index for this RingSet Configuration when this configuration is concatened int...
void setEtaWidth(float etaWidth)
Set etaWidth.
unsigned layerStartIdx() const
Returns start of layer index for this RingSet Configuration when this configuration is concatened int...
const RingSetConf_v1::RawConf getRawConf() const
Retrieve raw RingSet Configuration struct.
CaloSampling::CaloSample layerAt(const unsigned idx) const
Get ith layer.
std::vector< RawConf > RawConfCollection
typedef The raw configuration structure data holder
static bool isPSLayer(const std::vector< CaloSampling::CaloSample > &layers)
void setCellMaxDEtaDist(float cellMaxDEtaDist)
Set maxCellDEtaDist.
static bool isEMSection(const std::vector< CaloSampling::CaloSample > &layers)
Static methods:
static bool isHADSection(const std::vector< CaloSampling::CaloSample > &layers)
unsigned nRings() const
Get nRings.
static bool isEM3Layer(const std::vector< CaloSampling::CaloSample > &layers)
float cellMaxDEtaDist() const
Return the maximun cell distance in eta w.r.t seed.
static Ringer::CalJointLayer whichLayer(const std::vector< CaloSampling::CaloSample > &layers)
unsigned sectionEndIdx() const
Returns end of section index for this RingSet Configuration when this configuration is concatened int...
static void print(const RawConf &raw, std::ostream &stream)
Prints rawConf.
unsigned nLayers() const
RingSet layers size:
RingSetConf_v1 & operator=(const RingSetConf_v1 &clrings)
Assignment Operator.
float cellMaxDPhiDist() const
Return the maximun cell distance in phi w.r.t seed.
static Ringer::CalJointSection whichSection(const std::vector< CaloSampling::CaloSample > &layers)
void setLayerEndIdx(unsigned layerEndIdx)
Set end layer configuration index.
static void getRawConfCol(RawConfCollection &rawConfCol, const RingSetConfContainer_v1 *container)
Retrieve RawConfCollection from RingSetConf container.
void addLayer(const CaloSampling::CaloSample c)
Add layer.
static bool isHAD2Layer(const std::vector< CaloSampling::CaloSample > &layers)
void setSectionEndIdx(unsigned sectionEndIdx)
Set end section configuration index.
static bool isHAD3Layer(const std::vector< CaloSampling::CaloSample > &layers)
static bool isHAD1Layer(const std::vector< CaloSampling::CaloSample > &layers)
void setCalJointSection(Ringer::CalJointSection calJointSection)
Set this RingSet CalJointSection.
float etaWidth() const
Returns the etaWidth configuration step used for this RingSet.
void setdoPhiAxesDivision(bool doPhiAxesDivision)
Set doPhiAxesDivision.
bool doEtaAxesDivision() const
Return the etaAxesDivision configuration.
void clearLayers()
Clear layers.
unsigned sectionStartIdx() const
Returns start of section index for this RingSet Configuration when this configuration is concatened i...
void setSectionStartIdx(unsigned sectionEndIdx)
Set start section configuration index.
void setLayers(const std::vector< CaloSampling::CaloSample > &layers)
set layers
RingSetConf_v1()
Empty ctor:
static bool isEM1Layer(const std::vector< CaloSampling::CaloSample > &layers)
static void getEdges(const RawConfCollection &clRingsConf, const Ringer::CalJointSection sec, unsigned &startEdge, unsigned &endEdge)
Get CalJointSection start and end edges.
float phiWidth() const
Returns the phiWidth configuration step used for this RingSet.
void setLayerStartIdx(unsigned layerStartIdx)
Set start layer configuration index.
static void fillRingSetConfContainer(const RawConfCollection &rawConfCol, RingSetConfContainer_v1 &container)
Creates RingSetConfContainer from RawConfCollection.
void setCellMaxDPhiDist(float cellMaxDPhiDist)
Set maxCellDPhiDist.
static void addRawConfColBounderies(RawConfCollection &clRingsConf)
Add to RawConfCollection its JointLayer/JointSection bounderies.
const std::vector< CaloSampling::CaloSample > & layers() const
get layers
Ringer::CalJointLayer calJointLayer() const
Retrieve this RingSet conf CalJointLayer.
void setPhiWidth(float phiWidth)
Set phiWidth.
bool doPhiAxesDivision() const
Return the phiAxesDivision configuration.
void setNRings(unsigned nRings)
Set nRings.
void setCalJointLayer(Ringer::CalJointLayer calJointLayer)
Set this RingSet CalJointLayer.
void setdoEtaAxesDivision(bool doEtaAxesDivision)
Set doEtaAxesDivision.
static bool isEM2Layer(const std::vector< CaloSampling::CaloSample > &layers)
static unsigned totalNumberOfRings(const RawConfCollection &clRingsConf)
Get the totalNumber of Rings contained in this configuration:
CalJointLayer
the joint calorimeter layers.
CalJointSection
the joint calorimeter sections.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setPhiWidth cellMaxDPhiDist
setLayerEndIdx sectionEndIdx
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1, float, IP2D_pb, setIP2D_pb) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1
static const SG::AuxElement::Accessor< ElementLink< IParticleContainer > > acc("originalObjectLink")
Object used for setting/getting the dynamic decoration in question.
DataVector< xAOD::RingSetConf_v1 > RingSetConfContainer_v1
The container is a simple typedef for now.
unsigned sectionEndIdx
Hold the end of this section on a non-segmented representation:
float cellMaxDEtaDist
Maximum distance cell in eta to seed.
unsigned sectionStartIdx
Hold the start of this section on a non-segmented representation:
bool doPhiAxesDivision
Hold the option of phi axes division.
float cellMaxDPhiDist
Maximum distance cell in phi to seed.
bool doEtaAxesDivision
Hold the option of eta axes division.
Ringer::CalJointSection calJointSection
The Calorimeter Joint Section (see CaloRingsDefs.h)
RawConf()
Configuration Struct ctors.
Ringer::CalJointLayer calJointLayer
The Calorimeter Joint Layer of this RingSet (see CaloRingsDefs.h)
unsigned nRings
Ringset number of Rings.
float etaWidth
Ring Width in eta.
unsigned layerStartIdx
Hold the start of this layer on a non-segmented representation:
float phiWidth
Ring Width in phi.
std::vector< CaloSampling::CaloSample > layers
Ringset layers.
unsigned layerEndIdx
Hold the end of this layer on a non-segmented representation: