ATLAS Offline Software
Loading...
Searching...
No Matches
D3PDMaker/TileD3PDMaker/src/ITrackTools.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5/*
6 * File: ITrackTools.h
7 * Author: Marco van Woerden <mvanwoer@cern.ch>, Archil Durglishvili <archil.durglishvili@cern.ch>
8 * Description: Track tools interface.
9 *
10 * Created in February 2013
11 * updated in November 2014
12 */
13
14#ifndef ITrackTools_H
15#define ITrackTools_H
16//C++
17#include <vector>
18#include <string>
19#include <algorithm>
20#include <math.h>
21#include <map>
22
27
28//Base algorithm
31#include "GaudiKernel/AlgTool.h"
32#include "GaudiKernel/ISvcLocator.h"
33#include "GaudiKernel/IToolSvc.h"
34#include "GaudiKernel/ServiceHandle.h"
35#include "GaudiKernel/StatusCode.h"
36#include "GaudiKernel/ToolHandle.h"
37#include "GaudiKernel/MsgStream.h"
39
43
45#include "CaloEvent/CaloCell.h"
46#include "TileEvent/TileCell.h"
50#include "Identifier/Identifier.h"
52
53
54// xAOD tracks and clusters
59
64
65
70
71
72
73namespace Trk
74{
77}
78
79namespace Rec
81
82
83//Type definitions
84typedef CaloCell CELL;
92
93
94namespace KinematicUtils {
95 inline
97 phi = fmod(phi, (2*M_PI));
98 if (phi < -M_PI) phi += 2*M_PI;
99 if (phi > M_PI) phi -= 2*M_PI;
100 return;
101 }
102
103 inline
104 double deltaPhi(double phi1, double phi2) {
107 double dPhi=phi1-phi2;
108 if (dPhi>M_PI) dPhi=2*M_PI-dPhi;
109 else if(dPhi<-M_PI) dPhi=2*M_PI+dPhi;
110 return dPhi;
111 }
112
113 inline
114 double deltaR(double eta1, double eta2, double phi1, double phi2) {
115 double dPhi=KinematicUtils::deltaPhi(phi1,phi2);
116 double dEta=std::fabs(eta1-eta2);
117 double dR=std::sqrt(std::pow(dEta,2)+std::pow(dPhi,2));
118 return dR;
119 }
120}
121
122
123static const InterfaceID IID_ITrackTools("ITrackTools", 1, 0);
124
125//========================================
126class ITrackTools:virtual public IAlgTool{
127//========================================
128 public:
129
130 virtual ~ITrackTools(){}
131 static const InterfaceID& interfaceID(){ return IID_ITrackTools; };
132
133 // METHOD FOR FILTERING ALGORITHM
135 const CaloCellContainer* input,
137 double cone,
138 bool includelar) = 0;
139 virtual double getPathInsideCell(const TRACK *track, const CaloCell *cell) = 0;
140 virtual double getPath(const CaloCell* cell, const Trk::TrackParameters *entrance, const Trk::TrackParameters *exit) = 0;
141 virtual std::vector< double > getXYZEtaPhiInCellSampling(const TRACK* track, const CaloCell *cell) = 0;
142 virtual std::vector< double > getXYZEtaPhiInCellSampling(const TRACK* track, CaloSampling::CaloSample sampling) = 0;
143 virtual std::unique_ptr<const Trk::TrackParameters> getTrackInCellSampling(const TRACK* track, CaloSampling::CaloSample sampling) = 0;
144 virtual std::vector< std::vector<double> > getXYZEtaPhiPerLayer(const TRACK* track) = 0;
145 virtual std::vector< std::vector<double> > getXYZEtaPhiPerSampling(const TRACK* track) = 0;
146 virtual int retrieveIndex(int sampling, float eta) = 0;
147
149 const std::vector<xAOD::Iso::IsolationType>& cones ) = 0;
150/*THIS IS GOING TO BE USED
151 virtual bool caloTopoClusterIsolation( xAOD::CaloIsolation& result, const xAOD::TrackParticle& tp,
152 const std::vector<xAOD::Iso::IsolationType>& cones, xAOD::CaloIso::SubtractionStrategy strategy) = 0;
153 virtual bool caloCellIsolation( xAOD::CaloIsolation& result, const xAOD::TrackParticle& tp,
154 const std::vector<xAOD::Iso::IsolationType>& cones, xAOD::CaloIso::SubtractionStrategy strategy) = 0;
155 virtual bool neutralEflowIsolation( xAOD::CaloIsolation& result, const xAOD::TrackParticle& tp,
156 const std::vector<xAOD::Iso::IsolationType>& cones, xAOD::CaloIso::SubtractionStrategy strategy) = 0;
157*/
158};
159#endif //ITrackTools_H
#define M_PI
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
CaloPhiRange class declaration.
DataVector adapter that acts like it holds const pointers.
xAOD::TrackParticleAuxContainer TRACKAUXCONTAINER
xAOD::TrackParticle TRACK
xAOD::CaloClusterContainer CLUSTERCONTAINER
xAOD::CaloClusterAuxContainer CLUSTERAUXCONTAINER
CaloCell CELL
CALORIMETER INCLUDES.
CaloCellContainer CELLCONTAINER
xAOD::CaloCluster CLUSTER
static const InterfaceID IID_ITrackTools("ITrackTools", 1, 0)
xAOD::TrackParticleContainer TRACKCONTAINER
Definition of the abstract IRDBAccessSvc interface.
Definition of the abstract IRDBRecord interface.
Definition of the abstract IRDBRecordset interface.
Container class for CaloCell.
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
DataVector adapter that acts like it holds const pointers.
virtual std::vector< std::vector< double > > getXYZEtaPhiPerSampling(const TRACK *track)=0
static const InterfaceID & interfaceID()
virtual double getPathInsideCell(const TRACK *track, const CaloCell *cell)=0
virtual std::vector< double > getXYZEtaPhiInCellSampling(const TRACK *track, const CaloCell *cell)=0
virtual std::vector< double > getXYZEtaPhiInCellSampling(const TRACK *track, CaloSampling::CaloSample sampling)=0
virtual std::vector< std::vector< double > > getXYZEtaPhiPerLayer(const TRACK *track)=0
virtual bool trackIsolation(xAOD::TrackIsolation &result, const xAOD::TrackParticle &tp, const std::vector< xAOD::Iso::IsolationType > &cones)=0
virtual void getCellsWithinConeAroundTrack(const xAOD::TrackParticle *track, const CaloCellContainer *input, ConstDataVector< CaloCellContainer > *output, double cone, bool includelar)=0
virtual int retrieveIndex(int sampling, float eta)=0
virtual std::unique_ptr< const Trk::TrackParameters > getTrackInCellSampling(const TRACK *track, CaloSampling::CaloSample sampling)=0
virtual double getPath(const CaloCell *cell, const Trk::TrackParameters *entrance, const Trk::TrackParameters *exit)=0
Interface for extending Particles with calo cells.
Interface for extending Particles with calo intersections.
helper class to get the TrackParametersIdentifier from a TrackParameters
double deltaR(double eta1, double eta2, double phi1, double phi2)
double deltaPhi(double phi1, double phi2)
Gaudi Tools.
Ensure that the ATLAS eigen extensions are properly loaded.
ParametersBase< TrackParametersDim, Charged > TrackParameters
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
TrackParticleAuxContainer_v5 TrackParticleAuxContainer
Definition of the current TrackParticle auxiliary container.
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.
CaloClusterAuxContainer_v2 CaloClusterAuxContainer
Define the latest version of the calorimeter cluster auxiliary container.