|
ATLAS Offline Software
|
#include <CaloAsymRingsBuilder.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 |
|
|
| CaloAsymRingsBuilder (const std::string &type, const std::string &name, const IInterface *parent) |
| Default constructor. More...
|
|
| ~CaloAsymRingsBuilder () |
| Destructor. More...
|
|
|
virtual StatusCode | initialize () override |
| Tool main methods: More...
|
|
virtual StatusCode | finalize () override |
| finalize method More...
|
|
Definition at line 14 of file CaloAsymRingsBuilder.h.
◆ StoreGateSvc_t
◆ CaloAsymRingsBuilder()
Ringer::CaloAsymRingsBuilder::CaloAsymRingsBuilder |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Default constructor.
Definition at line 40 of file CaloAsymRingsBuilder.cxx.
47 declareInterface<ICaloRingsBuilder>(
this);
50 "Eta Axes can be divide in two.");
52 "Phi Axes can be divide in two.");
◆ ~CaloAsymRingsBuilder()
Ringer::CaloAsymRingsBuilder::~CaloAsymRingsBuilder |
( |
| ) |
|
|
default |
◆ buildRingSet()
main method where the RingSets are built.
Reimplemented from Ringer::CaloRingsBuilder.
Definition at line 137 of file CaloAsymRingsBuilder.cxx.
145 if(!cellsCont.isValid()) {
147 return StatusCode::FAILURE;
156 const auto nRings =
rawConf.nRings;
166 unsigned int ringNumber(0);
186 ringNumber =
static_cast<unsigned int>(std::floor(deltaGreater + .5));
192 ringNumber = (ringNumber * 4) - 3;
195 ringNumber = (ringNumber * 4) - 2;
198 else if (etaPositive){
199 ringNumber = (ringNumber * 4) - 1;
202 ringNumber = (ringNumber * 4);
206 ringNumber = (etaPositive)?(ringNumber * 2):
207 ((ringNumber * 2) - 1);
210 ringNumber = (phiPositive)?(ringNumber * 2):
211 ((ringNumber * 2) - 1);
215 if ( ringNumber < nRings ){
217 rs->
at(ringNumber) +=
cell->energy()/cosh(
cell->eta());
219 rs->
at(ringNumber) +=
cell->energy();
225 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::CaloAsymRingsBuilder::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::CaloAsymRingsBuilder::initialize |
( |
| ) |
|
|
overridevirtual |
Tool main methods:
initialize method
Reimplemented from Ringer::CaloRingsBuilder.
Definition at line 60 of file CaloAsymRingsBuilder.cxx.
69 for (
size_t rsConfIdx = 0; rsConfIdx <
m_nRingSets; ++rsConfIdx) {
71 const auto rsNLayers =
m_nLayers[rsConfIdx];
73 auto end_itr = itr + rsNLayers;
78 const auto& caloSampleItr =
reinterpret_cast<
81 const auto& caloSampleEndItr =
reinterpret_cast<
85 std::vector<CaloSampling::CaloSample> rsLayers( caloSampleItr ,
108 }
catch (
const std::runtime_error &
e) {
109 ATH_MSG_ERROR(
"Could not add collection bounderies due to: " <<
e.what() );
111 std::ostringstream
str;
114 return StatusCode::FAILURE;
119 std::ostringstream
str;
127 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_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::CaloAsymRingsBuilder::m_doEtaAxesDivision |
|
protected |
◆ m_doPhiAxesDivision
bool Ringer::CaloAsymRingsBuilder::m_doPhiAxesDivision |
|
protected |
◆ m_doTransverseEnergy
bool Ringer::CaloAsymRingsBuilder::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.
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.
bool m_doPhiAxesDivision
This can be set True to divide in two the phi axes.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
bool m_doEtaAxesDivision
This can be set True to divide in two the eta axes.
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.
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.
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
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.
bool m_doTransverseEnergy
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ElementLink implementation for ROOT usage.
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>
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.