ATLAS Offline Software
TBTrackToCaloAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // TrackToCaloAlg.h
7 // Header file for class TrackToCaloAlg
9 // Top algorithm class for extrapolating tracks to Calo
11 
12 
13 #ifndef TBREC_TBTRACKTOCALOALG_H
14 #define TBREC_TBTRACKTOCALOALG_H
15 
16 // Base class
18 #include "GaudiKernel/ToolHandle.h"
19 //#include "TrkTrack/Track.h"
20 #include "TrkTrack/TrackCollection.h" // typedef
21 //#include "Particle/TrackParticleContainer.h"
22 //#include "Particle/TrackParticle.h"
23 //#include "TrackToCalo/ImpactInCalo.h"
27 //class IExtrapolTrackToCaloTool;
28 class IExtrapolateToCaloTool;
31 class CaloCellList;
32 class CaloDepthTool;
33 class ImpactInCalo;
34 
35 namespace Trk {
36  class Track;
37 }
38 namespace Rec {
39  class TrackParticle;
41 }
42 
44 
64 
65 public:
66 
67  // Constructor with parameters:
68  TBTrackToCaloAlg(const std::string &name,ISvcLocator *pSvcLocator);
69 
71  // Non-const methods:
73 
74  // Basic algorithm methods:
75  virtual StatusCode initialize() override;
76  virtual StatusCode execute() override;
77  virtual StatusCode finalize() override;
78 
79  // Loop on Trk::Tracks and create ImpactInCaloCollection
80  bool CreateTrkImpactInCalo();
81  ImpactInCalo* GetImpactsInCalo(const Trk::Track* track, bool& got_a_track);
82 
83  // Retreive ImpactInCaloCollection and compare to CaloClusters
85  void PrintImpact();
86 
87  // List of cells crossed by Trk::Tracks
88  // in sampling_or_module = 0,1,2,3
89  // ( neta and nphi are the total window width, e.g .5x5 )
91  const CaloCell_ID::CaloSample sam,
92  int neta, int nphi);
93  bool PrintCellsCrossed();
94 
95 
96  // A little check : where is the beam ?
97  void PrintBeamPosition();
98 
100  // Private methods:
102 private:
106 
108  // Private data:
110 private:
111  // Tracking variables :
112  std::string m_TrackName;
114  std::string m_TrackParticleName;
116  std::string m_trkinput;
117 
118  // Calo variables :
119  std::string m_cluster_container;
120  std::string m_cell_container;
122 
123  // Between the 2 :
128 
129  // these ones are only here for debugging, not for general use !
131 
132  SG::ReadCondHandleKey<CaloDetDescrManager> m_caloMgrKey{this,"CaloDetDescrManager", "CaloDetDescrManager"};
133 
134 };
135 
136 #endif //TESTLARDETDESCR_TESTTRACKTOCALO_H
137 
TBTrackToCaloAlg::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: TBTrackToCaloAlg.h:132
CaloDepthTool
Implementation of the ICaloDepthTool interface.Given a Track direction, checks if it is in the Calori...
Definition: CaloDepthTool.h:47
TBTrackToCaloAlg::m_ImpactInCalosOutputName
std::string m_ImpactInCalosOutputName
Definition: TBTrackToCaloAlg.h:124
CaloPhiRange
This class defines the phi convention for Calorimeters.
Definition: CaloPhiRange.h:28
TBTrackToCaloAlg::CompareImpactWithCluster
void CompareImpactWithCluster()
Definition: TBTrackToCaloAlg.cxx:441
CaloCellList
Definition: CaloCellList.h:40
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
AthCUDAExamples::TrackParticleContainer
vecmem::edm::container< TrackParticleInterface, vecmem::edm::type::vector< float >, vecmem::edm::type::vector< float >, vecmem::edm::type::vector< float > > TrackParticleContainer
SoA, GPU friendly TrackParticleContainer.
Definition: Control/AthenaExamples/AthExCUDA/src/TrackParticleContainer.h:46
TBTrackToCaloAlg::m_phiRange
CaloPhiRange m_phiRange
Definition: TBTrackToCaloAlg.h:127
ImpactInCalo
The ImpactInCalo collection is created by the TrackToCaloAlg algorithm, which loops on all Tracks of ...
Definition: ImpactInCalo.h:33
TBTrackToCaloAlg::m_TrackName
std::string m_TrackName
Definition: TBTrackToCaloAlg.h:112
TBTrackToCaloAlg::m_TrackParticleName
std::string m_TrackParticleName
Definition: TBTrackToCaloAlg.h:114
TBExtrapolTrackToCaloTool
This class takes a given TrkTrack, extrapolates it to the Calo and returns the variables needed to co...
Definition: TBExtrapolTrackToCaloTool.h:83
TBTrackToCaloAlg::PrintBeamPosition
void PrintBeamPosition()
Definition: TBTrackToCaloAlg.cxx:700
TBTrackToCaloAlg::m_toCalo
TBExtrapolTrackToCaloTool * m_toCalo
Definition: TBTrackToCaloAlg.h:125
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
TBTrackToCaloAlg::m_trkinput
std::string m_trkinput
Definition: TBTrackToCaloAlg.h:116
TBTrackToCaloAlg::m_cell_container
std::string m_cell_container
Definition: TBTrackToCaloAlg.h:120
CaloCell_ID.h
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
AthAlgorithm.h
TBTrackToCaloAlg::m_calo_id
const CaloCell_ID * m_calo_id
Definition: TBTrackToCaloAlg.h:121
TBTrackToCaloAlg::m_calodepth
CaloDepthTool * m_calodepth
Definition: TBTrackToCaloAlg.h:126
TBTrackToCaloAlg::operator=
TBTrackToCaloAlg & operator=(const TBTrackToCaloAlg &)
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
Rec
Name: MuonSpContainer.h Package : offline/Reconstruction/MuonIdentification/muonEvent.
Definition: FakeTrackBuilder.h:10
TBTrackToCaloAlg::finalize
virtual StatusCode finalize() override
Definition: TBTrackToCaloAlg.cxx:124
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TBTrackToCaloAlg::m_cluster_container
std::string m_cluster_container
Definition: TBTrackToCaloAlg.h:119
TrackCollection.h
CaloPhiRange.h
CaloPhiRange class declaration.
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
TBTrackToCaloAlg::initialize
virtual StatusCode initialize() override
Definition: TBTrackToCaloAlg.cxx:65
DataVector< Trk::Track >
ICaloCoordinateTool
This (clean) interface is implemented in the (rather dirty) ICaloCoordinateTool class,...
Definition: ICaloCoordinateTool.h:65
AthAlgorithm
Definition: AthAlgorithm.h:47
ReadCondHandleKey.h
TBTrackToCaloAlg::PrintCellsCrossed
bool PrintCellsCrossed()
Definition: TBTrackToCaloAlg.cxx:632
TBTrackToCaloAlg
This Algorithm is meant to be an example of use of the TrackToCalo tools :
Definition: TBTrackToCaloAlg.h:63
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
TBTrackToCaloAlg::m_tracks
const TrackCollection * m_tracks
Definition: TBTrackToCaloAlg.h:113
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Rec::TrackParticleContainer
Definition: Reconstruction/Particle/Particle/TrackParticleContainer.h:33
TBTrackToCaloAlg::CreateTrkImpactInCalo
bool CreateTrkImpactInCalo()
Definition: TBTrackToCaloAlg.cxx:133
TBTrackToCaloAlg::m_calo_tb_coord
ICaloCoordinateTool * m_calo_tb_coord
Definition: TBTrackToCaloAlg.h:130
SG::ReadCondHandleKey< CaloDetDescrManager >
TBTrackToCaloAlg::PrintImpact
void PrintImpact()
Definition: TBTrackToCaloAlg.cxx:491
TBTrackToCaloAlg::execute
virtual StatusCode execute() override
Definition: TBTrackToCaloAlg.cxx:98
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
TBTrackToCaloAlg::TBTrackToCaloAlg
TBTrackToCaloAlg()
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
TBTrackToCaloAlg::CellsCrossedByTrack
CaloCellList * CellsCrossedByTrack(const Trk::Track *trk, const CaloCell_ID::CaloSample sam, int neta, int nphi)
Definition: TBTrackToCaloAlg.cxx:572
TBTrackToCaloAlg::TBTrackToCaloAlg
TBTrackToCaloAlg(const TBTrackToCaloAlg &)
TBTrackToCaloAlg::m_particle
const Rec::TrackParticleContainer * m_particle
Definition: TBTrackToCaloAlg.h:115
TBTrackToCaloAlg::GetImpactsInCalo
ImpactInCalo * GetImpactsInCalo(const Trk::Track *track, bool &got_a_track)
Definition: TBTrackToCaloAlg.cxx:196