|
ATLAS Offline Software
|
This algorithm builds TileCells from TileHits. Hits from the PMTs in the cell are merged and calibration constants applied to obtained cell energy, time and quality.
More...
#include <TileHitToCell.h>
|
| TileHitToCell (const std::string &name, ISvcLocator *pSvcLocator) |
| Constructor. More...
|
|
virtual | ~TileHitToCell () |
| Destructor
More...
|
|
virtual StatusCode | initialize () override |
| initialize method More...
|
|
virtual StatusCode | execute () override |
| execute method More...
|
|
virtual StatusCode | finalize () override |
| finalize method More...
|
|
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 |
|
This algorithm builds TileCells from TileHits. Hits from the PMTs in the cell are merged and calibration constants applied to obtained cell energy, time and quality.
TileHitToCell groups some PMT's output (energy deposit) contained in TileHit. (For barrel and ext.barrel, two Hits feed into each cell; for the Gap cells, there is only one PMT.) Calibrations constants are applied, and the total energy in the cell, the mean time of the energy deposition, and the quality of the measurement are returned. Clearly different things are needed for different data, e.g., full simulation vs. fast simulation vs. data. LAr handles this by a strategy of having a top level algorithm that calls builder sub-algs and a list of cell-correction sub-algs. It is not clear to us yet how we (tile) will want to tie to the database nor what level of complexity will exist in Tile for this task, so we will start with the simplest thing, TileCellBuilderAlg, which will do both the converstion of Hit to Cell and correctsions/scaling.
Definition at line 54 of file TileHitToCell.h.
◆ StoreGateSvc_t
◆ TileHitToCell()
TileHitToCell::TileHitToCell |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~TileHitToCell()
TileHitToCell::~TileHitToCell |
( |
| ) |
|
|
virtual |
◆ 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 TileHitToCell::execute |
( |
| ) |
|
|
overridevirtual |
execute method
Definition at line 73 of file TileHitToCell.cxx.
89 double eCellTot = 0.0;
93 std::vector<double> enePmt1;
94 std::vector<double> enePmt2;
95 enePmt1.resize(nCellMax);
96 enePmt2.resize(nCellMax);
105 for (; hitItr != lastHit; ++hitItr) {
122 double eHit = (*hitItr)->energy();
123 double fact = samplingFraction->getSamplingFraction(drawerIdx,
channel);
124 double eCell = eHit * fact;
134 enePmt1[cellHash_id] = eCell;
137 enePmt2[cellHash_id] = eCell;
141 <<
" nChan=" << nChan
144 <<
" nCell=" << nCell
146 <<
" eCell=" << eCell );
152 ATH_CHECK( cellContainer.record(std::make_unique<CaloCellContainer>()) );
155 for (
unsigned int i = 0;
i < nCellMax; ++
i) {
160 cellContainer->push_back(pCell);
167 <<
" eHitTot=" << eHitTot
168 <<
" nCell=" << nCell
170 <<
" eneTot=" << eCellTot <<
endmsg;
175 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 TileHitToCell::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode TileHitToCell::initialize |
( |
| ) |
|
|
overridevirtual |
initialize method
Definition at line 50 of file TileHitToCell.cxx.
65 ATH_MSG_INFO(
"TileHitToCell initialisation completed" );
67 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_cellContainerKey
Initial value:{this,"TileCellContainer",
"TileCellContainer",
"Output Tile cell container key"}
Definition at line 70 of file TileHitToCell.h.
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_hitContainerKey
Initial value:{this,"TileHitContainer","TileHitContainer",
"input Tile hit container key"}
Definition at line 67 of file TileHitToCell.h.
◆ m_samplingFractionKey
Initial value:{this,
"TileSamplingFraction", "TileSamplingFraction", "Input Tile sampling fraction"}
Name of TileSamplingFraction in condition store.
Definition at line 77 of file TileHitToCell.h.
◆ m_tileHWID
◆ m_tileID
◆ m_tileMgr
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
const TileDetDescrManager * m_tileMgr
Pointer to TileDetDescrManager.
IdContext cell_context(void) const
id for cells
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
int pmt(const Identifier &id) const
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
SG::ReadHandleKey< TileHitContainer > m_hitContainerKey
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
const TileID * m_tileID
Pointer to TileID helper.
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
calo_element_vec_size tile_cell_size() const
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
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.
SG::WriteHandleKey< CaloCellContainer > m_cellContainerKey
virtual int get_hash(const Identifier &id, IdentifierHash &hash_id, const IdContext *context=0) const
create hash id from compact id (return == 0 for OK)
CaloDetDescrElement * get_cell_element(unsigned int cell_hash) const
virtual void renounce()=0
SG::ReadCondHandleKey< TileSamplingFraction > m_samplingFractionKey
Name of TileSamplingFraction in condition store.
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
const TileHWID * m_tileHWID
Pointer to TileHWID helper.
StatusCode initialize(bool used=true)
DataObjIDColl m_extendedExtraObjects
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
std::string to_string(const Identifier &id, int level=0) const
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
AthAlgorithm()
Default constructor:
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Identifier cell_id(const Identifier &any_id) const
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>