|
ATLAS Offline Software
|
Go to the documentation of this file.
20 accRingSetLinks(
"ringSetLinks" );
22 constAccRingSetLinks(
"ringSetLinks" );
35 return (constAccRingSetLinks.isAvailable( *
this ) )?
36 (constAccRingSetLinks( *this ).size()):
44 accRingSetLinks( *this ).push_back(rsEL);
49 accRingSetLinks( *this ).clear();
55 return (accRingSetLinks.isAvailable( *
this ) )?
56 (accRingSetLinks( *this ).begin()):
63 return (accRingSetLinks.isAvailable( *
this ) )?
64 (accRingSetLinks( *this ).end()):
71 return (constAccRingSetLinks.isAvailable( *
this ) )?
72 (constAccRingSetLinks( *this ).begin()):
73 (RingSetLinks::const_iterator());
79 return (constAccRingSetLinks.isAvailable( *
this ) )?
80 (constAccRingSetLinks( *this ).end()):
81 (RingSetLinks::const_iterator());
90 constAccRingSetLinks( *this ).at(
i);
103 constAccRingSetLinks( *
this )[
i];
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");
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;
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") );
251 }
else if (foundSection) {
264 if (
this != &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.");
JetConstituentVector::iterator iterator
void checkRingSetIndexWithinRange(unsigned index) const
Check if index is within range, otherwise throws overflow_error:
RingSetLinks::iterator end()
returns iterator to the ending of RingSet EL Collection.
Helper class to provide type-safe access to aux data.
float & at(unsigned int i)
RingSet ///.
std::vector< RawConf > RawConfCollection
typedef The raw configuration structure data holder
std::vector< ElementLink< RingSetContainer > > RingSetLinks
Declare element links vector.
float & at(const unsigned int i)
Get/set ring Et at ith position.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Helper class to provide constant type-safe access to aux data.
Class holding a set of rings.
unsigned nRingSets() const
Number of RingSets ElementLinks available.
bool isValid() const
Test to see if the link can be dereferenced.
void print(std::ostream &stream) const
float ringAt(const unsigned int rsIdx, const unsigned int ringIdx) const
Navigate through eT rings methods.
const RingSet * operator[](const unsigned index) const
Return ith RingSet.
void copyTo(std::vector< float > &vec) const
Copy ringset to std::vector end:
void addRingSetEL(const ElementLink< RingSetContainer_v1 > &rsEL)
Add ElementLink to holden vector.
void print(std::ostream &stream) const
Print-out methods:
Class summarizing the particle interaction throughout the Calorimeter (its shower shape).
CalJointLayer
the joint calorimeter layers.
void exportRingsTo(std::vector< float > &ringStrip) const
Export rings eT in vectorized representation.
ElementLink implementation for ROOT usage.
void makePrivateStore()
Create a new (empty) private store for this object.
AuxElement & operator=(const AuxElement &other)
Assignment.
bool hasStore() const
Return true if this object has an associated store.
CaloRings_v1 & operator=(const CaloRings_v1 &clrings)
Assignment Operator.
const RingSet * at(const unsigned index) const
Return ith RingSet.
RingSetLinks::iterator begin()
returns iterator to the beginning of RingSet Collection.
const SG::AuxVectorData * container() const
Return the container holding this element.
void clear()
Clear RingSet EL Collection.
CalJointSection
the joint calorimeter sections.
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1