|
ATLAS Offline Software
|
#include <LArHitMerger.h>
|
| LArHitMerger (const std::string &name, ISvcLocator *pSvcLocator) |
|
| ~LArHitMerger ()=default |
|
virtual StatusCode | initialize () |
|
virtual StatusCode | execute () |
|
virtual StatusCode | finalize () |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
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 | 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 |
|
|
ServiceHandle< PileUpMergeSvc > | m_mergeSvc {this, "PileUpMergeSvc", "PileUpMergeSvc"} |
|
std::vector< bool > | m_SubDetFlag |
|
std::vector< std::string > | m_HitContainer |
|
std::vector< int > | m_CaloType |
|
StringProperty | m_SubDetectors {this, "SubDetectors", "LAr_All", "subdetector selection"} |
|
StringProperty | m_EmBarrelHitContainerName {this, "EmBarrelHitContainerName", "LArHitEMB", "Hit container name for EMB"} |
|
StringProperty | m_EmEndCapHitContainerName {this, "EmEndCapHitContainerName", "LArHitEMEC", "Hit container name for EMEC"} |
|
StringProperty | m_HecHitContainerName {this, "HecHitContainerName", "LArHitHEC", "Hit container name for HEC"} |
|
StringProperty | m_ForWardHitContainerName {this, "ForWardHitContainerName", "LArHitFCAL", "Hit container name for FCAL"} |
|
const LArEM_ID * | m_larem_id {} |
|
const LArHEC_ID * | m_larhec_id {} |
|
const LArFCAL_ID * | m_larfcal_id {} |
|
DataObjIDColl | m_extendedExtraObjects |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Definition at line 20 of file LArHitMerger.h.
◆ StoreGateSvc_t
◆ LArHitMerger()
LArHitMerger::LArHitMerger |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~LArHitMerger()
LArHitMerger::~LArHitMerger |
( |
| ) |
|
|
default |
◆ 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()
StatusCode LArHitMerger::execute |
( |
| ) |
|
|
virtual |
Definition at line 138 of file LArHitMerger.cxx.
141 std::vector<double> eCells_EM;
142 std::vector<double> eCells_HEC;
143 std::vector<double> eCells_FCAL;
149 ATH_MSG_INFO(
" ncells " << ncells_em <<
" " << ncells_hec <<
" " << ncells_fcal);
152 eCells_EM.resize(ncells_em,0.);
154 eCells_HEC.resize(ncells_hec,0.);
156 eCells_FCAL.resize(ncells_fcal,0.);
171 if (
sc.isFailure()) {
179 if (
sc.isFailure()) {
188 if (
sc.isFailure()) {
196 if (
sc.isFailure()) {
207 for (
unsigned int iHitContainer=0;iHitContainer<
m_HitContainer.size();iHitContainer++)
229 return StatusCode::FAILURE;
233 TimedHitContList hitContList;
238 ,hitContList).isSuccess()) && hitContList.empty()) {
240 return StatusCode::FAILURE;
246 while (iFirstCont != iEndCont) {
253 while (f_cell != l_cell) {
254 double energy = (*f_cell)->energy();
261 if (idHash<ncells_em) eCells_EM[idHash] +=
energy;
265 if (idHash<ncells_hec) eCells_HEC[idHash] +=
energy;
269 if (idHash<ncells_fcal) eCells_FCAL[idHash] +=
energy;
277 ATH_MSG_INFO(
" total number of hits found " << nhit_tot);
284 for (
unsigned int i=0;
i<ncells_em;
i++) {
303 ATH_MSG_INFO(
" Number of hits filled in LArHitEM containers " << nhit);
308 for (
unsigned int i=0;
i<ncells_hec;
i++) {
319 ATH_MSG_INFO(
" Number of hits filled in LArHitHEC container " << nhit);
324 for (
unsigned int i=0;
i<ncells_fcal;
i++) {
327 double energy = eCells_FCAL[
i];
335 ATH_MSG_INFO(
" Number of hits filled in LArHitFCAL container " << nhit);
343 if (
sc.isFailure()) {
345 return(StatusCode::FAILURE);
351 if (
sc.isFailure()) {
353 return(StatusCode::FAILURE);
359 if (
sc.isFailure()) {
361 return(StatusCode::FAILURE);
367 if (
sc.isFailure()) {
369 return(StatusCode::FAILURE);
374 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
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode LArHitMerger::finalize |
( |
| ) |
|
|
virtual |
◆ initialize()
StatusCode LArHitMerger::initialize |
( |
| ) |
|
|
virtual |
Definition at line 27 of file LArHitMerger.cxx.
111 return(StatusCode::FAILURE);
126 if (
sc.isFailure()) {
127 ATH_MSG_ERROR(
"Unable to retrieve CaloIdManager from DetectoreStore");
128 return StatusCode::FAILURE;
134 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.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ 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.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ 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()
◆ m_CaloType
std::vector<int> LArHitMerger::m_CaloType |
|
private |
◆ m_detStore
◆ m_EmBarrelHitContainerName
StringProperty LArHitMerger::m_EmBarrelHitContainerName {this, "EmBarrelHitContainerName", "LArHitEMB", "Hit container name for EMB"} |
|
private |
◆ m_EmEndCapHitContainerName
StringProperty LArHitMerger::m_EmEndCapHitContainerName {this, "EmEndCapHitContainerName", "LArHitEMEC", "Hit container name for EMEC"} |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_ForWardHitContainerName
StringProperty LArHitMerger::m_ForWardHitContainerName {this, "ForWardHitContainerName", "LArHitFCAL", "Hit container name for FCAL"} |
|
private |
◆ m_HecHitContainerName
StringProperty LArHitMerger::m_HecHitContainerName {this, "HecHitContainerName", "LArHitHEC", "Hit container name for HEC"} |
|
private |
◆ m_HitContainer
std::vector<std::string> LArHitMerger::m_HitContainer |
|
private |
◆ m_larem_id
◆ m_larfcal_id
◆ m_larhec_id
◆ m_mergeSvc
◆ m_SubDetectors
StringProperty LArHitMerger::m_SubDetectors {this, "SubDetectors", "LAr_All", "subdetector selection"} |
|
private |
◆ m_SubDetFlag
std::vector<bool> LArHitMerger::m_SubDetFlag |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
size_type channel_hash_max() const
One more than the largest channel (cell) hash code.
const LArEM_ID * m_larem_id
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
void finalize()
The method to be called at the end of event by SD.
const LArHEC_ID * m_larhec_id
const LArEM_ID * getEM_ID(void) const
StringProperty m_SubDetectors
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
IdentifierHash channel_hash(Identifier channelId) const
Convert a connected channel (cell) Identifier to a hash code.
Identifier channel_id(const ExpandedIdentifier &exp_id) const
Build a cell identifier from an expanded identifier.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
boost::transform_iterator< make_const, typename CONT::const_iterator > const_iterator
virtual void setOwner(IDataHandleHolder *o)=0
std::list< value_t > type
type of the collection of timed data object
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
IdentifierHash channel_hash(Identifier channelId) const
create hash id from channel id
const LArHEC_ID * getHEC_ID(void) const
virtual StatusCode sysInitialize() override
Override sysInitialize.
This class initializes the Calo (LAr and Tile) offline identifiers.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
Identifier channel_id(const ExpandedIdentifier &exp_id) const
cell identifier for a channel from ExpandedIdentifier
const LArFCAL_ID * getFCAL_ID(void) const
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
const LArFCAL_ID * m_larfcal_id
IdentifierHash channel_hash(Identifier channelId) const
create hash id from channel id
ServiceHandle< PileUpMergeSvc > m_mergeSvc
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
StringProperty m_EmEndCapHitContainerName
Identifier channel_id(const ExpandedIdentifier &exp_id) const
channel identifier for a channel from ExpandedIdentifier
Class to store hit energy and time in LAr cell from G4 simulation.
DataObjIDColl m_extendedExtraObjects
std::vector< bool > m_SubDetFlag
StringProperty m_ForWardHitContainerName
StringProperty m_HecHitContainerName
def time(flags, cells_name, *args, **kw)
bool is_em_barrel(const Identifier id) const
test if the id belongs to the EM barrel
#define ATH_MSG_WARNING(x)
std::vector< std::string > m_HitContainer
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
AthAlgorithm()
Default constructor:
const_iterator end() const
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
StringProperty m_EmBarrelHitContainerName
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
const_iterator begin() const
bool is_em_endcap(const Identifier id) const
test if the id belongs to the EM Endcap
std::vector< int > m_CaloType