ATLAS Offline Software
D3PDMaker/TileD3PDMaker/src/TrackTools.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /*
6  * File: TrackTools.h
7  * Author: Marco van Woerden <mvanwoer@cern.ch>
8  * Description: Track tools.
9  *
10  * Created in February 2013, based on TrackInCaloTools.
11  */
12 
13 #ifndef TrackTools_H
14 #define TrackTools_H
15 #include "ITrackTools.h"
16 
17 
18 //==========================================================================================================================
19 class TrackTools: public AthAlgTool, virtual public ITrackTools{
20 //==========================================================================================================================
21  public:
22  TrackTools (const std::string& type,const std::string& name,const IInterface* parent);
23  ~TrackTools();
24 
27 
28  // METHOD FOR CALOCELL FILTERING
30  const CaloCellContainer* input,
32  double cone,
33  bool includelar);
34 
35  std::vector< double > getXYZEtaPhiInCellSampling(const TRACK* track, const CaloCell *cell);
36  std::vector< double > getXYZEtaPhiInCellSampling(const TRACK* track, CaloSampling::CaloSample sampling);
37  std::unique_ptr<const Trk::TrackParameters> getTrackInCellSampling(const TRACK* track, CaloSampling::CaloSample sampling);
38  std::vector< std::vector<double> > getXYZEtaPhiPerLayer(const TRACK* track);
39  std::vector< std::vector<double> > getXYZEtaPhiPerSampling(const TRACK* track);
40  double getPathInsideCell(const TRACK *track, const CaloCell *cell);
41  int retrieveIndex(int sampling, float eta);
42 
43  bool trackIsolation( xAOD::TrackIsolation& result, const xAOD::TrackParticle &tp, const std::vector<xAOD::Iso::IsolationType>& cones )
44  {
45  if(!m_trackIsolationTool.empty()) {
46  xAOD::TrackCorrection corrlist;
47  corrlist.trackbitset.set(static_cast<unsigned int>(xAOD::Iso::IsolationTrackCorrection::coreTrackPtr));
48  return m_trackIsolationTool->trackIsolation(result, tp, cones, corrlist);
49  }
50  return false;
51  };
52 
53 /* THIS IS GOING TO BE USED
54  bool caloTopoClusterIsolation( xAOD::CaloIsolation& result, const xAOD::TrackParticle& tp,
55  const std::vector<xAOD::Iso::IsolationType>& cones, xAOD::CaloIso::SubtractionStrategy strategy)
56  {
57  if(!m_caloIsolationTool.empty()) ; //GOING TO CALL PROPER FUNCTION
58  return false;
59  };
60  bool caloCellIsolation( xAOD::CaloIsolation& result, const xAOD::TrackParticle& tp,
61  const std::vector<xAOD::Iso::IsolationType>& cones, xAOD::CaloIso::SubtractionStrategy strategy)
62  {
63  if(!m_caloIsolationTool.empty()) ; //GOING TO CALL PROPER FUNCTION
64  return false;
65  };
66  bool neutralEflowIsolation( xAOD::CaloIsolation& result, const xAOD::TrackParticle& tp,
67  const std::vector<xAOD::Iso::IsolationType>& cones, xAOD::CaloIso::SubtractionStrategy strategy)
68  {
69  if(!m_caloIsolationTool.empty()) ; //GOING TO CALL PROPER FUNCTION
70  return false;
71  };
72 */
73  private:
74 
75  ToolHandle <Trk::IParticleCaloExtensionTool> m_caloExtensionTool;
76  ToolHandle <Rec::IParticleCaloCellAssociationTool> m_caloCellAssociationTool;
77  //ToolHandle <Trk::ITrackSelectorTool> m_trackSelector; //!< Tool to select tracks
78 
79  ToolHandle<xAOD::ITrackIsolationTool> m_trackIsolationTool;
80  ToolHandle<xAOD::INeutralEFlowIsolationTool> m_neutralEFlowIsolationTool;
81 
82  // JOBOPTIONS PROPERTIES
83  std::string m_cellContainerName;
84  double getPath(const CaloCell* cell, const Trk::TrackParameters *entrance, const Trk::TrackParameters *exit);
85 
86  // DEFAULT CONSTRUCTOR
89 };
90 
91 #endif //TrackTools_H
TrackTools::trackIsolation
bool trackIsolation(xAOD::TrackIsolation &result, const xAOD::TrackParticle &tp, const std::vector< xAOD::Iso::IsolationType > &cones)
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.h:43
get_generator_info.result
result
Definition: get_generator_info.py:21
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
xAOD::TrackCorrection
Definition: IsolationCommon.h:18
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
xAOD::Iso::coreTrackPtr
@ coreTrackPtr
tracks pointer
Definition: Event/xAOD/xAODPrimitives/xAODPrimitives/IsolationCorrection.h:66
TrackTools::getXYZEtaPhiPerSampling
std::vector< std::vector< double > > getXYZEtaPhiPerSampling(const TRACK *track)
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.cxx:179
TrackTools::operator=
TrackTools & operator=(const TrackTools &)
xAOD::TrackCorrection::trackbitset
Iso::IsolationTrackCorrectionBitset trackbitset
Definition: IsolationCommon.h:19
ParticleTest.tp
tp
Definition: ParticleTest.py:25
TrackTools::getPath
double getPath(const CaloCell *cell, const Trk::TrackParameters *entrance, const Trk::TrackParameters *exit)
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.cxx:271
TrackTools
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.h:19
TrackTools::m_trackIsolationTool
ToolHandle< xAOD::ITrackIsolationTool > m_trackIsolationTool
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.h:79
TrackTools::m_cellContainerName
std::string m_cellContainerName
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.h:83
TrackTools::TrackTools
TrackTools(const std::string &type, const std::string &name, const IInterface *parent)
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.cxx:17
TrackTools::getXYZEtaPhiPerLayer
std::vector< std::vector< double > > getXYZEtaPhiPerLayer(const TRACK *track)
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.cxx:145
TrackTools::retrieveIndex
int retrieveIndex(int sampling, float eta)
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.cxx:690
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ITrackTools.h
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Trk::ParametersBase
Definition: ParametersBase.h:55
TrackTools::getTrackInCellSampling
std::unique_ptr< const Trk::TrackParameters > getTrackInCellSampling(const TRACK *track, CaloSampling::CaloSample sampling)
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.cxx:60
TrackTools::~TrackTools
~TrackTools()
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.cxx:35
calibdata.exit
exit
Definition: calibdata.py:236
TrackTools::getCellsWithinConeAroundTrack
void getCellsWithinConeAroundTrack(const xAOD::TrackParticle *track, const CaloCellContainer *input, ConstDataVector< CaloCellContainer > *output, double cone, bool includelar)
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.cxx:200
xAOD::TrackIsolation
Definition: IsolationCommon.h:33
merge.output
output
Definition: merge.py:17
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
TrackTools::initialize
StatusCode initialize()
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.cxx:40
TrackTools::TrackTools
TrackTools(const TrackTools &)
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
TrackTools::m_caloCellAssociationTool
ToolHandle< Rec::IParticleCaloCellAssociationTool > m_caloCellAssociationTool
Tool to make the step-wise extrapolation.
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.h:76
TrackTools::finalize
StatusCode finalize()
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.cxx:53
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
ConstDataVector< CaloCellContainer >
TrackTools::m_caloExtensionTool
ToolHandle< Trk::IParticleCaloExtensionTool > m_caloExtensionTool
Tool to make the step-wise extrapolation.
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.h:51
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ITrackTools
Definition: D3PDMaker/TileD3PDMaker/src/ITrackTools.h:126
TrackTools::getXYZEtaPhiInCellSampling
std::vector< double > getXYZEtaPhiInCellSampling(const TRACK *track, const CaloCell *cell)
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.cxx:130
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
TrackTools::getPathInsideCell
double getPathInsideCell(const TRACK *track, const CaloCell *cell)
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.cxx:236
AthAlgTool
Definition: AthAlgTool.h:26
TrackTools::m_neutralEFlowIsolationTool
ToolHandle< xAOD::INeutralEFlowIsolationTool > m_neutralEFlowIsolationTool
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.h:80