|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #include "CaloGeoHelpers/CaloSampling.h"
27 const std::string&
name,
28 const ::IInterface*
parent)
32 declareInterface<ICaloRingsBuilder>(
this);
48 for (
size_t rsConfIdx = 0; rsConfIdx <
m_nRingSets; ++rsConfIdx) {
50 const auto rsNLayers =
m_nLayers[rsConfIdx];
51 auto end_itr = itr + rsNLayers;
56 std::vector<CaloSampling::CaloSample> rsLayers( caloSampleItr , caloSampleEndItr);
72 }
catch (
const std::runtime_error &
e) {
73 ATH_MSG_ERROR(
"Could not add collection bounderies due to: " <<
e.what() );
75 std::ostringstream
str;
78 return StatusCode::FAILURE;
85 return StatusCode::SUCCESS;
91 return StatusCode::SUCCESS;
106 return StatusCode::FAILURE;
120 return (seed.eta() -
cell->eta())/
rawConf.etaWidth;
129 const auto delta = calcDelta(
cell );
130 int idx =copysign(
static_cast<int>(std::floor( delta + .5)),delta);
131 unsigned int stripIdx(0);
134 stripIdx = midPoint - (
idx*2);
135 if (stripIdx>100000){stripIdx = 0;}
137 stripIdx = midPoint - (
idx*2 + 1);
138 if (stripIdx>100000){stripIdx = 0;}
142 rs->
at(stripIdx) +=
cell->energy()/std::cosh(
cell->eta());
144 rs->
at(stripIdx) +=
cell->energy();
149 return StatusCode::SUCCESS;
JetConstituentVector::iterator iterator
bool m_doPhiAxesDivision
This can be set True to divide in two the phi axes.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
static void print(const RawConf &raw, std::ostream &stream)
Prints rawConf.
virtual StatusCode finalize() override
finalize method
Gaudi::Property< std::vector< float > > m_etaWidth
Width of the ring in eta.
Gaudi::Property< float > m_cellMaxDPhiDist
Maximum cell distance in phi to seed.
virtual StatusCode initialize() override
Tool main methods:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
bool m_doTransverseEnergy
CaloStripsRingsBuilder(const std::string &type, const std::string &name, const IInterface *parent)
Default constructor.
SG::WriteHandleKey< xAOD::RingSetContainer > m_rsContName
Name of RingSetContainer on Event StoreGate.
const xAOD::RingSetConf::RawConfCollection & rawConf() override
Extra methods:
float & at(const unsigned int i)
Get/set ring Et at ith position.
Gaudi::Property< std::vector< float > > m_phiWidth
Width of the ring in phi.
Class holding a set of rings.
SG::ReadHandleKey< CaloCellContainer > m_cellsContName
Name of CaloCellContainer.
const std::string & key() const
Return the StoreGate ID for the referenced object.
std::size_t m_axis
Tool props (python configurables):
static Ringer::CalJointLayer whichLayer(const std::vector< CaloSampling::CaloSample > &layers)
Gaudi::Property< std::vector< int > > m_layers
Calorimeter layers in each ringset.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< std::vector< unsigned int > > m_nLayers
Number of calorimeter layers in each ringset.
Gaudi::Property< float > m_cellMaxDEtaDist
Maximum cell distance in eta to seed.
static void addRawConfColBounderies(RawConfCollection &clRingsConf)
Add to RawConfCollection its JointLayer/JointSection bounderies.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual StatusCode buildRingSet(const xAOD::RingSetConf::RawConf &rawConf, const AtlasGeoPoint &seed, xAOD::RingSet *rs) override
main method where the strips are build
virtual bool isValid() override final
Can the handle be successfully dereferenced?
int nStrips(const MuonGM::TgcReadoutElement &readoutEle, int layer)
Helpers for checking error return status codes and reporting errors.
StatusCode initialize(bool used=true)
size_t m_nRingSets
hold the number of RingSets we are building for each CaloRings
const_pointer_type ptr()
Dereference the pointer.
xAOD::RingSetConf::RawConfCollection m_rsRawConfCol
holds each RingSet configuration (filled at initialize)
This class provides the client interface for accessing the detector description information common to...
Data object for each calorimeter readout cell.
#define ATH_MSG_WARNING(x)
SG::WriteHandleKey< xAOD::CaloRingsContainer > m_crContName
Tool props (python configurables):
Gaudi::Property< std::vector< unsigned int > > m_nRings
Number of rings in a ringset.
static Ringer::CalJointSection whichSection(const std::vector< CaloSampling::CaloSample > &layers)
bool m_doEtaAxesDivision
This can be set True to divide in two the eta axes.
~CaloStripsRingsBuilder()
Destructor.
static double diff(double phi1, double phi2)
simple phi1 - phi2 calculation, but result is fixed to respect range.
Namespace dedicated for Ringer utilities.