|
ATLAS Offline Software
|
#include <CalibHitToCaloCellTool.h>
|
| CalibHitToCaloCellTool (const std::string &t, const std::string &n, const IInterface *p) |
|
| ~CalibHitToCaloCellTool () |
|
StatusCode | initialize () override |
|
StatusCode | processCalibHitsFromParticle (int barcode=-1) const |
|
StatusCode | finalize () 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 |
|
Definition at line 38 of file CalibHitToCaloCellTool.h.
◆ StoreGateSvc_t
◆ CalibHitToCaloCellTool()
CalibHitToCaloCellTool::CalibHitToCaloCellTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~CalibHitToCaloCellTool()
CalibHitToCaloCellTool::~CalibHitToCaloCellTool |
( |
| ) |
|
|
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);
◆ 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.
◆ 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.
◆ 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]
◆ 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 CalibHitToCaloCellTool::finalize |
( |
| ) |
|
|
override |
◆ initialize()
StatusCode CalibHitToCaloCellTool::initialize |
( |
| ) |
|
|
override |
◆ 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()
static const InterfaceID& CalibHitToCaloCellTool::interfaceID |
( |
| ) |
|
|
inlinestatic |
◆ 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.
◆ processCalibHitsFromParticle()
StatusCode CalibHitToCaloCellTool::processCalibHitsFromParticle |
( |
int |
barcode = -1 | ) |
const |
..........................................................
Definition at line 86 of file CalibHitToCaloCellTool.cxx.
97 std::vector<SG::WriteHandle<CaloCellContainer> > truthCells;
98 std::vector<SG::WriteHandle<xAOD::CaloClusterContainer> > truthClusters;
99 std::vector<SG::WriteHandle<CaloClusterCellLinkContainer> > truthLinks;
106 ATH_CHECK(truthCells.back().record(std::make_unique<CaloCellContainer>()));
112 ATH_CHECK(truthLinks.back().record(std::make_unique<CaloClusterCellLinkContainer>()));
117 std::vector<const CaloCalibrationHitContainer*> calibHitContainers(nCont,
nullptr);
118 for (
unsigned int i=0;
i<nCont;
i++) {
121 ATH_MSG_DEBUG(
" Retrieved container " << calibHitContainers[
i]->
Name() <<
" with size " << calibHitContainers[
i]->
Size() );
122 if( calibHitContainers[
i]->
Size() == 0 ) {
126 ATH_MSG_DEBUG(
"CaloCalibrationHitContainers retrieved successfuly" );
134 int unknown_nchan = 0 ;
136 std::vector<Identifier>
ID;
140 std::vector<CaloCell*> CellsEtot;
141 std::vector<CaloCell*> CellsEvis;
142 std::vector<CaloCell*> CellsEem;
144 int nhitsInactive = 0;
146 for (
unsigned int i=0;
i<calibHitContainers.size();
i++) {
147 for(
const auto *
const calibhit: *(calibHitContainers[
i])) {
149 if ((
int)calibhit->particleID()!=
barcode)
continue;
151 double Etot = calibhit->energyTotal();
152 double Eem = calibhit->energy(0);
153 double Enonem = calibhit->energy(1);
154 double Evis = Eem + Enonem;
162 for (
int n=0;
n<nhitsInactive;
n++) {
164 CellsEtot[
n]->addEnergy(Etot);
165 CellsEvis[
n]->addEnergy(Evis);
166 CellsEem[
n]->addEnergy(Eem);
171 if(!isNewId)
continue;
199 if (
i==0) nhitsInactive = (
int)
ID.size();
210 for(
int itr=0; itr!=
nchan; itr++) {
222 for(
int itr=0; itr!=
nchan; itr++) {
234 for(
int itr=0; itr!=
nchan; itr++) {
246 for(
int itr=0; itr!=
nchan; itr++) {
276 if (!truthCluster[
i]) {
278 return StatusCode::FAILURE;
280 for (
const auto cell: *truthCells[
i]) {
282 truthCluster[
i]->
addCell( truthCells[
i]->findIndex(
cell->caloDDE()->calo_hash()) , 1.);
288 truthClusters[
i].ptr()));
294 return StatusCode::SUCCESS;
◆ renounce()
◆ renounceArray()
◆ 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()
◆ m_calibHitContainerNames
std::vector<std::string> CalibHitToCaloCellTool::m_calibHitContainerNames |
|
private |
◆ m_caloCell_Em
std::string CalibHitToCaloCellTool::m_caloCell_Em |
|
private |
◆ m_caloCell_ID
◆ m_caloCell_NonEm
std::string CalibHitToCaloCellTool::m_caloCell_NonEm |
|
private |
◆ m_caloCell_Tot
std::string CalibHitToCaloCellTool::m_caloCell_Tot |
|
private |
◆ m_caloCell_Vis
std::string CalibHitToCaloCellTool::m_caloCell_Vis |
|
private |
◆ m_caloDM_ID
◆ m_caloGain
int CalibHitToCaloCellTool::m_caloGain |
|
private |
◆ m_caloMgrKey
Initial value:{ this
, "CaloDetDescrManager"
, "CaloDetDescrManager"
, "SG Key for CaloDetDescrManager in the Condition Store" }
Definition at line 70 of file CalibHitToCaloCellTool.h.
◆ m_cellContKeys
◆ m_cellLinkKeys
◆ m_clusterContKeys
◆ m_detStore
◆ m_doTile
bool CalibHitToCaloCellTool::m_doTile |
|
private |
◆ m_energyTypeToStr
const std::array<std::string, 3> CalibHitToCaloCellTool::m_energyTypeToStr {"Eem","Evis","Etot"} |
|
private |
◆ m_evtStore
◆ m_larActHitCnt
std::string CalibHitToCaloCellTool::m_larActHitCnt |
|
private |
◆ m_larDMHitCnt
std::string CalibHitToCaloCellTool::m_larDMHitCnt |
|
private |
◆ m_larInactHitCnt
std::string CalibHitToCaloCellTool::m_larInactHitCnt |
|
private |
◆ m_outputCellContainerName
std::string CalibHitToCaloCellTool::m_outputCellContainerName |
|
private |
◆ m_outputClusterContainerName
std::string CalibHitToCaloCellTool::m_outputClusterContainerName |
|
private |
◆ m_tileActiveHitCnt
std::string CalibHitToCaloCellTool::m_tileActiveHitCnt |
|
private |
◆ m_tileDMHitCnt
std::string CalibHitToCaloCellTool::m_tileDMHitCnt |
|
private |
◆ m_tileInactiveHitCnt
std::string CalibHitToCaloCellTool::m_tileInactiveHitCnt |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
static std::unique_ptr< xAOD::CaloCluster > makeCluster(const CaloCellContainer *cellCont)
Creates a valid CaloCluster with a private Aux-Store and CellLink container.
def retrieve(aClass, aKey=None)
static StatusCode finalizeClusters(SG::WriteHandle< CaloClusterCellLinkContainer > &h, xAOD::CaloClusterContainer *pClusterColl)
Finalize clusters (move CaloClusterCellLink to a separate container).
std::vector< Identifier > ID
static StatusCode AddContainerWriteHandle(SG::WriteHandle< xAOD::CaloClusterContainer > &clusColl)
Creates a new xAOD::CaloClusterContainer in the given WriteHandle + CaloClusterAuxContainer and recor...
bool is_lar(Identifier id) const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
#define ATH_MSG_VERBOSE(x)
bool is_tile(const Identifier id) const
test if the id belongs to the Tiles
bool is_hec(const Identifier id) const
test if the id belongs to the HEC
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
bool is_em(const Identifier id) const
test if the id belongs to LArEM
Description of a calorimeter cluster.
bool is_fcal(const Identifier id) const
test if the id belongs to the FCAL - true also for MiniFCAL
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
constexpr int SINGLE_PARTICLE
StatusCode initialize(bool used=true)
Data object for LAr calorimeter readout cell.
This class provides the client interface for accessing the detector description information common to...
void setClusterSize(const ClusterSize)
Get cluster size.
bool addCell(const unsigned index, const double weight)
Method to add a cell to the cluster (Beware: Kinematics not updated!)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
static void calculateKine(xAOD::CaloCluster *clu, const bool useweight=true, const bool updateLayers=true, const bool useGPUCriteria=false)
Helper class to calculate cluster kinematics based on cells.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>