19static const SG::AuxElement::Accessor< RingSetLinks >
21static const SG::AuxElement::ConstAccessor< RingSetLinks >
57 (RingSetLinks::iterator());
65 (RingSetLinks::iterator());
73 (RingSetLinks::const_iterator());
81 (RingSetLinks::const_iterator());
118 throw std::runtime_error(
"The element link is invalid.");
120 return rs->at(ringIdx);
126 unsigned ringStripPartialSize = 0;
127 for (
unsigned rsELIdx = 0; rsELIdx < this->
nRingSets(); ++rsELIdx){
130 throw std::runtime_error(
"There is an invalid element link.");
132 unsigned cRsSize =
rs->size();
133 if ( ringStripPartialSize + cRsSize > ringIdx ) {
136 return rs->at( ringIdx - ( ringStripPartialSize ) );
138 ringStripPartialSize += cRsSize;
142 std::stringstream
ss;
143 ss <<
"Requested ring at index: \""
144 << ringIdx <<
"\", but total rings size is: "
145 << ringStripPartialSize;
146 throw std::overflow_error(
ss.str() );
154 std::vector<float> &ringStrip,
155 const unsigned rsIdxStart,
156 const unsigned rsIdxEnd)
const
166 for (
unsigned idx = rsIdxStart; idx <= rsIdxEnd ; ++idx ) {
169 throw std::runtime_error(
"Found invalid ElementLink");
171 rs->copyTo(ringStrip);
177 std::vector<float> &ringStrip,
183 if ( layerTypeEnd < layerTypeStart ) {
184 throw std::invalid_argument( std::string(
185 "Input layerTypeStart greater than layerTypeEnd") );
190 if ( nRingSets && clRingsRawConfCol.size() !=
nRingSets ) {
191 throw std::invalid_argument( std::string(
192 "The configuration struct seems not to be valid."));
198 bool foundStartLayer =
false;
200 for (
unsigned rsIdx = 0; rsIdx <
nRingSets; ++rsIdx ) {
203 throw std::runtime_error( std::string(
204 "Found invalid ElementLink") );
206 if ( !foundStartLayer ) {
208 if ( clRingsRawConfCol[rsIdx].calJointLayer == layerTypeStart )
210 foundStartLayer =
true;
211 rs->copyTo(ringStrip);
214 rs->copyTo(ringStrip);
217 if ( clRingsRawConfCol[rsIdx].calJointLayer == layerTypeEnd ) {
225 std::vector<float> &ringStrip,
232 if ( nRingSets && clRingsRawConfCol.size() !=
nRingSets ) {
233 throw std::invalid_argument( std::string(
234 "The configuration struct seems not to be valid."));
240 bool foundSection =
false;
242 for (
unsigned rsIdx = 0; rsIdx <
nRingSets; ++rsIdx) {
243 if ( clRingsRawConfCol[rsIdx].calJointSection == sectionType) {
247 throw std::runtime_error( std::string(
248 "Found invalid ElementLink") );
250 rs->copyTo(ringStrip);
251 }
else if (foundSection) {
264 if (
this != &cl_rings){
265 if (!this->container() && !this->hasStore() ) {
268 this->SG::AuxElement::operator=( cl_rings );
282 stream <<
"CaloRings are : " << std::endl;
283 for (
unsigned rsIdx = 0; rsIdx < this->
nRingSets(); ++rsIdx) {
284 stream <<
"Ringset #" << rsIdx <<
" : ";
287 throw std::runtime_error( std::string(
288 "Found invalid ElementLink") );
301 throw std::overflow_error(
"Out of RingSet ElementLink vector range.");
#define AUXSTORE_OBJECT_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of complex auxiliary properties.
ElementLink implementation for ROOT usage.
bool isValid() const
Check if the element can be found.
Class summarizing the particle interaction throughout the Calorimeter (its shower shape).
void clear()
Clear RingSet EL Collection.
const RingSet * operator[](const unsigned index) const
Return ith RingSet.
unsigned nRingSets() const
Number of RingSets ElementLinks available.
const RingSet * at(const unsigned index) const
Return ith RingSet.
void print(std::ostream &stream) const
Print-out methods:
void checkRingSetIndexWithinRange(unsigned index) const
Check if index is within range, otherwise throws overflow_error:
float ringAt(const unsigned int rsIdx, const unsigned int ringIdx) const
Navigate through eT rings methods.
RingSetLinks::iterator begin()
returns iterator to the beginning of RingSet Collection.
void addRingSetEL(const ElementLink< RingSetContainer_v1 > &rsEL)
Add ElementLink to holden vector.
CaloRings_v1()
Default empty ctor.
RingSetLinks::iterator end()
returns iterator to the ending of RingSet EL Collection.
void exportRingsTo(std::vector< float > &ringStrip) const
Export rings eT in vectorized representation.
CaloRings_v1 & operator=(const CaloRings_v1 &clrings)
Assignment Operator.
std::vector< RawConf > RawConfCollection
typedef The raw configuration structure data holder
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.
RingSet_v1 RingSet
Definition of the current "RingSet version".
static const SG::AuxElement::ConstAccessor< RingSetLinks > constAccRingSetLinks("ringSetLinks")
static const SG::AuxElement::Accessor< RingSetLinks > accRingSetLinks("ringSetLinks")
std::vector< ElementLink< RingSetContainer > > RingSetLinks
Declare element links vector.