|
ATLAS Offline Software
|
#include <CaloStripsRingsBuilder.h>
|
std::size_t | nRingSets () const override |
|
const SG::WriteHandleKey< xAOD::CaloRingsContainer > & | crContName () const override |
|
const SG::WriteHandleKey< xAOD::RingSetContainer > & | rsContName () const override |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
virtual StatusCode | preExecute (xAOD::CaloRingsContainer *crCont, xAOD::RingSetContainer *rsCont, const std::size_t nReserve=0) override |
| method for working on containers More...
|
|
virtual StatusCode | execute (const xAOD::IParticle &particle, ElementLink< xAOD::CaloRingsContainer > &clRingsLink) override |
| build CaloRings for IParticle More...
|
|
virtual StatusCode | execute (const xAOD::CaloCluster &cluster, ElementLink< xAOD::CaloRingsContainer > &clRingsLink) override |
| build CaloRings for CaloCluster More...
|
|
|
const xAOD::RingSetConf::RawConfCollection & | rawConf () override |
| Extra methods: More...
|
|
bool | useShowerShapeBarycenter () override |
| Retrieve whether it was set used shower shape barycenter. More...
|
|
|
const xAOD::RingSetConf::RawConfCollection & | rawConf () override |
| Extra methods: More...
|
|
bool | useShowerShapeBarycenter () override |
| Retrieve whether it was set used shower shape barycenter. More...
|
|
|
| CaloStripsRingsBuilder (const std::string &type, const std::string &name, const IInterface *parent) |
| Default constructor. More...
|
|
| ~CaloStripsRingsBuilder () |
| Destructor. More...
|
|
|
virtual StatusCode | initialize () override |
| Tool main methods: More...
|
|
virtual StatusCode | finalize () override |
| finalize method More...
|
|
|
virtual StatusCode | preExecute (xAOD::CaloRingsContainer *crCont, xAOD::RingSetContainer *rsCont, const std::size_t nReserve=0) override |
| method for working on containers More...
|
|
virtual StatusCode | execute (const xAOD::IParticle &particle, ElementLink< xAOD::CaloRingsContainer > &clRingsLink) override |
| build CaloRings for IParticle More...
|
|
virtual StatusCode | execute (const xAOD::CaloCluster &cluster, ElementLink< xAOD::CaloRingsContainer > &clRingsLink) override |
| build CaloRings for CaloCluster More...
|
|
|
const xAOD::RingSetConf::RawConfCollection & | rawConf () override |
| Extra methods: More...
|
|
bool | useShowerShapeBarycenter () override |
| Retrieve whether it was set used shower shape barycenter. More...
|
|
Definition at line 14 of file CaloStripsRingsBuilder.h.
◆ StoreGateSvc_t
◆ CaloStripsRingsBuilder()
Ringer::CaloStripsRingsBuilder::CaloStripsRingsBuilder |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~CaloStripsRingsBuilder()
Ringer::CaloStripsRingsBuilder::~CaloStripsRingsBuilder |
( |
| ) |
|
|
default |
◆ buildRingSet()
main method where the strips are build
NOTE: Please note that RingSets are the strip sets
Reimplemented from Ringer::CaloRingsBuilder.
Definition at line 95 of file CaloStripsRingsBuilder.cxx.
104 if(!cellsCont.isValid()) {
106 return StatusCode::FAILURE;
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;
◆ crContName()
|
inlineoverridevirtualinherited |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute() [1/2]
◆ execute() [2/2]
◆ executeTemp()
Tool protected methods:
unique execute method for integrating interface code.
Definition at line 193 of file CaloRingsBuilder.cxx.
207 clRingsLink.toContainedElement(*
m_crCont, clRings);
236 std::ostringstream
str;
241 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ finalize()
StatusCode Ringer::CaloStripsRingsBuilder::finalize |
( |
| ) |
|
|
overridevirtual |
◆ getRingSetSeed() [1/2]
◆ getRingSetSeed() [2/2]
Fill RingSet seed for CaloCluster.
Definition at line 245 of file CaloRingsBuilder.cxx.
255 return StatusCode::SUCCESS;
259 bool foundValid =
false, foundMultipleValid =
false;
269 ") seedCandidate is: (" <<
270 seedCandidate.eta() <<
"," <<
271 seedCandidate.phi() <<
")" );
273 if ( seedCandidate.isValid() ){
276 foundMultipleValid =
true;
283 if ( foundMultipleValid ){
284 ATH_MSG_WARNING(
"Found multiple valid seeds. Set to last valid candidate.");
286 return StatusCode::SUCCESS;
◆ initialize()
StatusCode Ringer::CaloStripsRingsBuilder::initialize |
( |
| ) |
|
|
overridevirtual |
Tool main methods:
initialize method
Reimplemented from Ringer::CaloRingsBuilder.
Definition at line 42 of file CaloStripsRingsBuilder.cxx.
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;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ interfaceID()
const InterfaceID & ICaloRingsBuilder::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
AlgTool interface methods.
Definition at line 83 of file ICaloRingsBuilder.h.
85 return IID_ICaloRingsBuilder;
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ nRingSets()
std::size_t Ringer::CaloRingsBuilder::nRingSets |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ preExecute()
method for working on containers
Implements Ringer::ICaloRingsBuilder.
Definition at line 131 of file CaloRingsBuilder.cxx.
135 if ( crCont && rsCont ){
139 ATH_MSG_ERROR(
"Attempted to set CaloRingsContainer and/or RingSetContainer to invalid pointers");
140 return StatusCode::FAILURE;
151 return StatusCode::SUCCESS;
◆ rawConf()
|
inlineoverridevirtualinherited |
◆ renounce()
◆ renounceArray()
◆ rsContName()
|
inlineoverridevirtualinherited |
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ useShowerShapeBarycenter()
bool Ringer::CaloRingsBuilder::useShowerShapeBarycenter |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ m_axis
std::size_t Ringer::CaloStripsRingsBuilder::m_axis |
|
protected |
◆ m_caloMgrKey
◆ m_cellMaxDEtaDist
Gaudi::Property<float> Ringer::CaloRingsBuilder::m_cellMaxDEtaDist |
|
protectedinherited |
Initial value:{this,
"CellMaxDEtaDist", 0,
"Maximum cell distance to the seed in eta."}
Maximum cell distance in eta to seed.
Definition at line 185 of file CaloRingsBuilder.h.
◆ m_cellMaxDPhiDist
Gaudi::Property<float> Ringer::CaloRingsBuilder::m_cellMaxDPhiDist |
|
protectedinherited |
Initial value:{this,
"CellMaxDPhiDist", 0,
"Maximum cell distance to the seed in phi."}
Maximum cell distance in phi to seed.
Definition at line 191 of file CaloRingsBuilder.h.
◆ m_cellsContName
◆ m_crCont
◆ m_crContName
Initial value:{this,
"CaloRingsContainerName",
"CaloRings",
"Name of the CaloRings container"}
Tool props (python configurables):
Name of CaloRingsContainer on Event StoreGate
electron collection input name
Definition at line 151 of file CaloRingsBuilder.h.
◆ m_detStore
◆ m_doEtaAxesDivision
bool Ringer::CaloStripsRingsBuilder::m_doEtaAxesDivision |
|
protected |
◆ m_doPhiAxesDivision
bool Ringer::CaloStripsRingsBuilder::m_doPhiAxesDivision |
|
protected |
◆ m_doTransverseEnergy
bool Ringer::CaloStripsRingsBuilder::m_doTransverseEnergy = false |
|
protected |
◆ m_etaWidth
Gaudi::Property<std::vector<float> > Ringer::CaloRingsBuilder::m_etaWidth |
|
protectedinherited |
Initial value:{this,
"EtaWidth", {}, "Each RingSet ring eta width."}
Width of the ring in eta.
Definition at line 175 of file CaloRingsBuilder.h.
◆ m_evtStore
◆ m_lastValidSeed
last valid RingSet seed
Propagate other layer centroids in case a layer centroid is not valid.
Definition at line 268 of file CaloRingsBuilder.h.
◆ m_layers
Gaudi::Property<std::vector<int> > Ringer::CaloRingsBuilder::m_layers |
|
protectedinherited |
Initial value:{this,
"Layers", {},
"Concatenated list of layers which will be used "
"to build the RingSets"}
Calorimeter layers in each ringset.
This property should be read as: std::vector<CaloSampling::CaloSample> m_layersRings;
Definition at line 215 of file CaloRingsBuilder.h.
◆ m_minEnergy
Gaudi::Property<float> Ringer::CaloRingsBuilder::m_minEnergy |
|
protectedinherited |
Initial value:{this,
"MinPartEnergy", std::numeric_limits<float>::lowest(),
"Minimum particle/cluster energy to build rings (GeV)."}
Minimum particle energy to build rings (GeV)
Definition at line 203 of file CaloRingsBuilder.h.
◆ m_nLayers
Gaudi::Property<std::vector<unsigned int> > Ringer::CaloRingsBuilder::m_nLayers |
|
protectedinherited |
Initial value:{this,
"RingSetNLayers", {},
"Each RingSet number of layers from the Layers "
"configurable property to use."}
Number of calorimeter layers in each ringset.
Definition at line 222 of file CaloRingsBuilder.h.
◆ m_nRings
Gaudi::Property<std::vector<unsigned int> > Ringer::CaloRingsBuilder::m_nRings |
|
protectedinherited |
Initial value:{this,
"NRings", {},
"Each RingSet number of rings."}
Number of rings in a ringset.
Definition at line 197 of file CaloRingsBuilder.h.
◆ m_nRingSets
size_t Ringer::CaloRingsBuilder::m_nRingSets |
|
protectedinherited |
◆ m_phiHelper
◆ m_phiWidth
Gaudi::Property<std::vector<float> > Ringer::CaloRingsBuilder::m_phiWidth |
|
protectedinherited |
Initial value:{this,
"PhiWidth", {}, "Each RingSet ring phi width."}
Width of the ring in phi.
Definition at line 180 of file CaloRingsBuilder.h.
◆ m_rsCont
Tool props (non configurables):
Create and hold RingSetContainer for each event
Definition at line 254 of file CaloRingsBuilder.h.
◆ m_rsContName
Initial value:{this,
"RingSetContainerName",
"RingSets",
"Name of the RingSets container"}
Name of RingSetContainer on Event StoreGate.
Definition at line 159 of file CaloRingsBuilder.h.
◆ m_rsRawConfCol
◆ m_useShowShapeBarycenter
Gaudi::Property<bool> Ringer::CaloRingsBuilder::m_useShowShapeBarycenter |
|
protectedinherited |
Initial value:{this,
"useShowerShapeBarycenter", false,
"Switch to use shower barycenter for each layer, "
"instead of the cluster center."}
Switch to use shower barycenter seed for each RingSets.
This can be set to false if using cluster information to use the cluster center instead of its layer energy baricenter.
Definition at line 232 of file CaloRingsBuilder.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
JetConstituentVector::iterator iterator
virtual double phi() const
The azimuthal angle ( ) of the particle.
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.
Extra patterns decribing particle interation process.
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
StatusCode getRingSetSeed(const xAOD::RingSetConf::RawConf &conf, const xAOD::CaloCluster &cluster, AtlasGeoPoint &seed)
Fill RingSet seed for CaloCluster.
Gaudi::Property< std::vector< float > > m_etaWidth
Width of the ring in eta.
xAOD::CaloRingsContainer * m_crCont
Create and hold CaloRingsContainer for each event.
Gaudi::Property< float > m_cellMaxDPhiDist
Maximum cell distance in phi to seed.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
bool m_doTransverseEnergy
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.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Gaudi::Property< std::vector< float > > m_phiWidth
Width of the ring in phi.
std::vector< SG::VarHandleKeyArray * > m_vhka
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):
virtual StatusCode buildRingSet(const xAOD::RingSetConf::RawConf &rawConf, const AtlasGeoPoint &seed, xAOD::RingSet *rs)
main method where the RingSets are built.
static Ringer::CalJointLayer whichLayer(const std::vector< CaloSampling::CaloSample > &layers)
virtual void setOwner(IDataHandleHolder *o)=0
float etaSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
StatusCode executeTemp(const T &input, ElementLink< xAOD::CaloRingsContainer > &crEL)
Tool protected methods:
Gaudi::Property< std::vector< int > > m_layers
Calorimeter layers in each ringset.
CaloRingsBuilder(const std::string &type, const std::string &name, const IInterface *parent)
Default constructor.
virtual double eta() const
The pseudorapidity ( ) of the particle.
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.
void addRingSetEL(const ElementLink< RingSetContainer_v1 > &rsEL)
Add ElementLink to holden vector.
static void addRawConfColBounderies(RawConfCollection &clRingsConf)
Add to RawConfCollection its JointLayer/JointSection bounderies.
void print(std::ostream &stream) const
Print-out methods:
AtlasGeoPoint m_lastValidSeed
last valid RingSet seed
#define CHECK(...)
Evaluate an expression and check for errors.
Class summarizing the particle interaction throughout the Calorimeter (its shower shape).
float phiSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ElementLink implementation for ROOT usage.
int nStrips(const MuonGM::TgcReadoutElement &readoutEle, int layer)
Gaudi::Property< float > m_minEnergy
Minimum particle energy to build rings (GeV)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
size_t m_nRingSets
hold the number of RingSets we are building for each CaloRings
xAOD::RingSetContainer * m_rsCont
Tool props (non configurables):
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)
CaloRings_v1 CaloRings
Definition of the current "CaloRings version".
SG::WriteHandleKey< xAOD::CaloRingsContainer > m_crContName
Tool props (python configurables):
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
static std::string getSamplingName(CaloSample theSample)
Returns a string (name) for each CaloSampling.
Gaudi::Property< std::vector< unsigned int > > m_nRings
Number of rings in a ringset.
static Ringer::CalJointSection whichSection(const std::vector< CaloSampling::CaloSample > &layers)
Gaudi::Property< bool > m_useShowShapeBarycenter
Switch to use shower barycenter seed for each RingSets.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
bool m_doEtaAxesDivision
This can be set True to divide in two the eta axes.
virtual double e() const
The total energy of the particle.
RingSet_v1 RingSet
Definition of the current "RingSet version".
static double diff(double phi1, double phi2)
simple phi1 - phi2 calculation, but result is fixed to respect range.