![]() |
ATLAS Offline Software
|
Tool to get the energy that is deposited by a particle in the calorimeter. More...
#include <TrackDepositInCaloTool.h>
Classes | |
| struct | Hists |
| struct | LayerMaps |
Public Member Functions | |
| TrackDepositInCaloTool (const std::string &type, const std::string &name, const IInterface *pInterface) | |
| virtual | ~TrackDepositInCaloTool ()=default |
| StatusCode | initialize () override |
| std::vector< DepositInCalo > | getDeposits (const Trk::TrackParameters *par, const CaloCellContainer *caloCellCont) const override |
| Fills the vector of DepositInCalo using TrackParameters as input. | |
| std::vector< DepositInCalo > | getDeposits (const xAOD::TrackParticle *tp, const CaloCellContainer *caloCellCont, const CaloExtensionCollection *extensionCache) const override |
| std::vector< DepositInCalo > | deposits (const Trk::TrackParameters *par, const CaloCellContainer *cellContainer) const override |
| Trk::Surface * | createSurface (const CaloDetDescriptor *descr, CaloSurfaceType type) const override |
| Creates a Trk::Surface for a calorimeter region that is described by CaloDetDescr. | |
| double | calcEnergy (const Trk::TrackParameters *par, const Trk::ParticleHypothesis &particleHypo) const override |
| Calculate the energy using \( E^2 = m^2 + p^2 \). | |
| ServiceHandle< StoreGateSvc > & | evtStore () |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. | |
| const ServiceHandle< StoreGateSvc > & | detStore () const |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. | |
| virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. | |
| virtual StatusCode | sysStart () override |
| Handle START transition. | |
| virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. | |
| virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. | |
| Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T, V, H > &t) |
| void | updateVHKA (Gaudi::Details::PropertyBase &) |
| MsgStream & | msg () const |
| bool | msgLvl (const MSG::Level lvl) const |
Protected Member Functions | |
| void | renounceArray (SG::VarHandleKeyArray &handlesArray) |
| remove all handles from I/O resolution | |
| std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > | renounce (T &h) |
| void | extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps) |
| Add StoreName to extra input/output deps as needed. | |
Private Types | |
| typedef ServiceHandle< StoreGateSvc > | StoreGateSvc_t |
Private Member Functions | |
| std::unique_ptr< const Trk::TrackParameters > | extrapolateToSolenoid (const EventContext &ctx, const Trk::TrackParameters *par, bool oppositeMomentum=false) const |
| StatusCode | bookHistos () |
| Create histograms and register them to HistSvc. | |
| const CaloCell * | getClosestCell (const CaloDetDescrManager *caloDDM, const Trk::TrackParameters *par, const CaloDetDescriptor *descr, const CaloCellContainer *cellContainer) const |
| Retrieve the CaloCell for which its center is closest to the position of the particle. | |
| const CaloCell * | getClosestCellTile (const CaloDetDescrManager *caloDDM, const Trk::TrackParameters *par, const CaloDetDescriptor *descr, const CaloCellContainer *caloCellCont) const |
| std::vector< const CaloCell * > | getCaloCellsForLayer (const CaloDetDescrManager *caloDDM, const CaloDetDescriptor *descr, const Trk::TrackParameters *parEntrance, const Trk::TrackParameters *parExit, const CaloCellContainer *caloCellCont) const |
| std::vector< const CaloCell * > | getCaloCellsForTile (const CaloDetDescrManager *caloDDM, const CaloDetDescriptor *descr, const Trk::TrackParameters *parEntrance, const Trk::TrackParameters *parExit, const CaloCellContainer *caloCellCont) const |
| StatusCode | getTraversedLayers (const CaloDetDescrManager *caloDDM, const Trk::TrackParameters *par, std::map< double, const CaloDetDescriptor * > &caloInfo, std::vector< Amg::Vector3D > &extrapolations) const |
| This function determines which calorimeter regions the tracks traverses. | |
| std::unique_ptr< const Trk::TrackParameters > | extrapolateToEntranceOfLayer (const EventContext &ctx, const Trk::TrackParameters *par, const CaloDetDescriptor *descr) const |
| std::unique_ptr< const Trk::TrackParameters > | extrapolateToExitOfLayer (const EventContext &ctx, const Trk::TrackParameters *par, const CaloDetDescriptor *descr) const |
| LayerMaps | initializeDetectorInfo (const CaloDetDescrManager *caloDDM) const |
| Hists & | getHists () const |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> | |
Static Private Member Functions | |
| static std::unique_ptr< Amg::Vector3D > | extrapolateR (const Amg::Vector3D &initialPosition, double phi0, double theta0, double r) |
| Extrapolate track to cylinder surface along straight line. | |
| static std::unique_ptr< Amg::Vector3D > | extrapolateZ (const Amg::Vector3D &initialPosition, double phi0, double theta0, double z) |
| Extrapolate track to disc surface along straight line. | |
| static const CaloCell * | getClosestCellLAr (const CaloDetDescrManager *caloDDM, const Trk::TrackParameters *par, const CaloDetDescriptor *descr, const CaloCellContainer *caloCellCont) |
| static double | distance (const Amg::Vector3D &p1, const Amg::Vector3D &p2) |
| static bool | isInsideDomain (double position, double domainCenter, double domainWidth, bool phiVariable=false) |
| static bool | isInsideCell (const Amg::Vector3D &position, const CaloCell *cell) |
| static bool | inCell (const CaloCell *cell, const Amg::Vector3D &pos) |
Private Attributes | |
| ServiceHandle< ITHistSvc > | m_histSvc |
| ToolHandle< Trk::IExtrapolator > | m_extrapolator {this, "ExtrapolatorHandle", ""} |
| const TileDetDescrManager * | m_tileDDM {nullptr} |
| ToolHandle< Trk::IParticleCaloExtensionTool > | m_caloExtensionTool |
| ToolHandle< Rec::IParticleCaloCellAssociationTool > | m_caloCellAssociationTool {this, "ParticleCaloCellAssociationTool", ""} |
| SG::ReadCondHandleKey< CaloDetDescrManager > | m_caloDetDescrMgrKey |
| bool | m_doExtr |
| Flag to perform extrapolations using m_extrapolator. | |
| bool | m_doHist |
| Flag to write histograms to track performance. | |
| CxxUtils::CachedValue< LayerMaps > | m_layerMaps |
| std::unique_ptr< Hists > | m_h |
| StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) | |
| StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) | |
| std::vector< SG::VarHandleKeyArray * > | m_vhka |
| bool | m_varHandleArraysDeclared |
Tool to get the energy that is deposited by a particle in the calorimeter.
The core method of this tool is the deposits function that returns a std::vector of DepositInCalo. All other methods are essentially helper functions for this one.
Definition at line 41 of file TrackDepositInCaloTool.h.
|
privateinherited |
Definition at line 388 of file AthCommonDataStore.h.
| TrackDepositInCaloTool::TrackDepositInCaloTool | ( | const std::string & | type, |
| const std::string & | name, | ||
| const IInterface * | pInterface ) |
Definition at line 43 of file TrackDepositInCaloTool.cxx.
|
virtualdefault |
|
private |
Create histograms and register them to HistSvc.
Definition at line 1007 of file TrackDepositInCaloTool.cxx.
|
override |
Calculate the energy using \( E^2 = m^2 + p^2 \).
| par | Input TrackParameters |
| particleHypo | Particle type. This determines the mass. |
Definition at line 629 of file TrackDepositInCaloTool.cxx.
|
override |
Creates a Trk::Surface for a calorimeter region that is described by CaloDetDescr.
Works for both cylindrical and disc-like surfaces. The side of a cylindrical detector element is a disc and vice-versa. Don't forget to clear memory. CaloSurfaceType can be Entrance, Middle, Exit, Inside, Outside. Inside is the boundary of the region closest to the center of the detector, outside is the boundary that is furthest away.
| descr | The CaloDetDescriptor for the surface that you want to create. |
| type | What type of surface to create. |
Definition at line 831 of file TrackDepositInCaloTool.cxx.
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
|
inlineinherited |
Definition at line 145 of file AthCommonDataStore.h.
|
override |
Definition at line 478 of file TrackDepositInCaloTool.cxx.
|
inlineinherited |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition at line 95 of file AthCommonDataStore.h.
|
staticprivate |
Definition at line 1124 of file TrackDepositInCaloTool.cxx.
|
inlineinherited |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition at line 85 of file AthCommonDataStore.h.
|
protectedinherited |
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
|
staticprivate |
Extrapolate track to cylinder surface along straight line.
(x0, y0, z0) is the starting position, (phi0,theta0) is the direction of the momentum, r is the bound of the cylinder. The values are returned in (xe, ye, ze).
Definition at line 701 of file TrackDepositInCaloTool.cxx.
|
private |
Definition at line 361 of file TrackDepositInCaloTool.cxx.
|
private |
Definition at line 404 of file TrackDepositInCaloTool.cxx.
|
private |
Definition at line 438 of file TrackDepositInCaloTool.cxx.
|
staticprivate |
Extrapolate track to disc surface along straight line.
Parameter explanation in the same line as for extrapolateR().
Definition at line 731 of file TrackDepositInCaloTool.cxx.
|
private |
Definition at line 234 of file TrackDepositInCaloTool.cxx.
|
private |
Definition at line 261 of file TrackDepositInCaloTool.cxx.
|
private |
Retrieve the CaloCell for which its center is closest to the position of the particle.
| par | TrackParameters of the particle. |
| descr | Calorimeter detector region information. Only cells from this detector region are considered. |
Definition at line 895 of file TrackDepositInCaloTool.cxx.
|
staticprivate |
Definition at line 920 of file TrackDepositInCaloTool.cxx.
|
private |
Definition at line 940 of file TrackDepositInCaloTool.cxx.
|
override |
Fills the vector of DepositInCalo using TrackParameters as input.
| par | TrackParameters to be used as input. The parameters are assumed to be within the solenoid volume. |
| deltaR | Unused parameter. Kept for backward compatibility. |
| inCell | Unused parameter. Kept for backward compatibility. |
Definition at line 70 of file TrackDepositInCaloTool.cxx.
|
override |
Definition at line 151 of file TrackDepositInCaloTool.cxx.
|
private |
Definition at line 1070 of file TrackDepositInCaloTool.cxx.
|
private |
This function determines which calorimeter regions the tracks traverses.
The vector caloInfo and extrapolations are returned. Straight line approximation is employed in the calorimeter regions after the parameters are extrapolated to the surface of the solenoid. This accounts for the magnetic field bending. Covers EMB, TileBar, TileExt, EME and HEC acceptance. The FCAL and TileGap regions are not included. Do not forget to check the StatusCode.
| par | Input track parameters |
| caloInfo | Resulting vector of CaloDetDescriptor that is traversed. |
| extrapolations | Resulting vector of straight-line extrapolations that were obtained. |
Definition at line 758 of file TrackDepositInCaloTool.cxx.
|
staticprivate |
Definition at line 1115 of file TrackDepositInCaloTool.cxx.
|
override |
Definition at line 54 of file TrackDepositInCaloTool.cxx.
|
private |
Definition at line 642 of file TrackDepositInCaloTool.cxx.
|
overridevirtualinherited |
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.
|
staticprivate |
Definition at line 1098 of file TrackDepositInCaloTool.cxx.
|
staticprivate |
Definition at line 1081 of file TrackDepositInCaloTool.cxx.
|
inlineinherited |
Definition at line 24 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 30 of file AthCommonMsg.h.
|
overridevirtualinherited |
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.
|
inlineprotectedinherited |
Definition at line 380 of file AthCommonDataStore.h.
|
inlineprotectedinherited |
remove all handles from I/O resolution
Definition at line 364 of file AthCommonDataStore.h.
|
overridevirtualinherited |
Perform system initialization for an algorithm.
We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.
Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.
|
overridevirtualinherited |
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
|
inlineinherited |
Definition at line 308 of file AthCommonDataStore.h.
|
private |
Definition at line 182 of file TrackDepositInCaloTool.h.
|
private |
Definition at line 184 of file TrackDepositInCaloTool.h.
|
private |
Definition at line 180 of file TrackDepositInCaloTool.h.
|
privateinherited |
Pointer to StoreGate (detector store by default)
Definition at line 393 of file AthCommonDataStore.h.
|
private |
Flag to perform extrapolations using m_extrapolator.
Definition at line 192 of file TrackDepositInCaloTool.h.
|
private |
Flag to write histograms to track performance.
Definition at line 193 of file TrackDepositInCaloTool.h.
|
privateinherited |
Pointer to StoreGate (event store by default)
Definition at line 390 of file AthCommonDataStore.h.
|
private |
Definition at line 176 of file TrackDepositInCaloTool.h.
|
private |
Definition at line 231 of file TrackDepositInCaloTool.h.
|
private |
Definition at line 175 of file TrackDepositInCaloTool.h.
|
private |
Definition at line 201 of file TrackDepositInCaloTool.h.
|
private |
Definition at line 178 of file TrackDepositInCaloTool.h.
|
privateinherited |
Definition at line 399 of file AthCommonDataStore.h.
|
privateinherited |
Definition at line 398 of file AthCommonDataStore.h.