ATLAS Offline Software
TrigInDetUtils.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGINDETPATTRECOTOOLS_TRIG_INDET_UTILS_H
6 #define TRIGINDETPATTRECOTOOLS_TRIG_INDET_UTILS_H
7 
8 #include "TrkTrack/Track.h"
9 #include <vector>
10 
12 
13 struct trackInfo {
14  int n_hits_pix = 0; int n_hits_sct = 0; int n_hits_inner = 0; int n_hits_innermost = 0;
15  float ptGeV = 0; float a0beam = 0;float eta = 0; float phi0 = 0;
16 };
17 
18 namespace FTF {
19  bool isGoodTrackUTT(const Trk::Track* track, trackInfo& theTrackInfo, const float shift_x, const float shift_y, float trkcut_ptgev);
20  void getBeamSpotShift(float& shift_x, float& shift_y, const InDet::BeamSpotData& beamSpotHandle);
21 }
22 
23 typedef struct WeightedCoordinate{
24  struct Comparator {
25  bool operator()(const struct WeightedCoordinate& wc1, const struct WeightedCoordinate& wc2) {
26  return (wc2.m_x > wc1.m_x);
27  }
28  };
29 public:
30 WeightedCoordinate(double x, double w) : m_x(x), m_w(w) {};
32  double m_x, m_w;
33 private:
34 WeightedCoordinate() : m_x(0.0), m_w(0.0) {};
36 
37 typedef class CdfApproximator {
38  public:
40  double findMedian(std::vector<WEIGHTED_COORDINATE>&);
41  double findModes(std::vector<WEIGHTED_COORDINATE>&, std::vector<double>&, int);
43 
44 #endif
trackInfo::ptGeV
float ptGeV
Definition: TrigInDetUtils.h:15
WeightedCoordinate::WeightedCoordinate
WeightedCoordinate(const WeightedCoordinate &wc)
Definition: TrigInDetUtils.h:31
trackInfo::n_hits_inner
int n_hits_inner
Definition: TrigInDetUtils.h:14
WeightedCoordinate::m_x
double m_x
Definition: TrigInDetUtils.h:31
CdfApproximator
Definition: TrigInDetUtils.h:37
FTF::isGoodTrackUTT
bool isGoodTrackUTT(const Trk::Track *track, trackInfo &theTrackInfo, const float shift_x, const float shift_y, float trkcut_ptgev)
Definition: TrigInDetUtils.cxx:4
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
WeightedCoordinate::WeightedCoordinate
WeightedCoordinate(double x, double w)
Definition: TrigInDetUtils.h:30
FTF::getBeamSpotShift
void getBeamSpotShift(float &shift_x, float &shift_y, const InDet::BeamSpotData &beamSpotHandle)
Definition: TrigInDetUtils.cxx:30
x
#define x
Track.h
WeightedCoordinate
Definition: TrigInDetUtils.h:23
trackInfo::eta
float eta
Definition: TrigInDetUtils.h:15
WeightedCoordinate::m_w
double m_w
Definition: TrigInDetUtils.h:32
trackInfo::n_hits_pix
int n_hits_pix
Definition: TrigInDetUtils.h:14
CdfApproximator::findModes
double findModes(std::vector< WEIGHTED_COORDINATE > &, std::vector< double > &, int)
WeightedCoordinate::WeightedCoordinate
WeightedCoordinate()
Definition: TrigInDetUtils.h:34
CDF_APPROXIMATOR
class CdfApproximator CDF_APPROXIMATOR
WeightedCoordinate::Comparator
Definition: TrigInDetUtils.h:24
CdfApproximator::findMedian
double findMedian(std::vector< WEIGHTED_COORDINATE > &)
trackInfo::n_hits_sct
int n_hits_sct
Definition: TrigInDetUtils.h:14
trackInfo
Definition: TrigInDetUtils.h:13
trackInfo::a0beam
float a0beam
Definition: TrigInDetUtils.h:15
WEIGHTED_COORDINATE
struct WeightedCoordinate WEIGHTED_COORDINATE
InDet::BeamSpotData
Definition: BeamSpotData.h:21
trackInfo::phi0
float phi0
Definition: TrigInDetUtils.h:15
CdfApproximator::CdfApproximator
CdfApproximator()
Definition: TrigInDetUtils.h:39
BeamSpotData.h
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
trackInfo::n_hits_innermost
int n_hits_innermost
Definition: TrigInDetUtils.h:14
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
WeightedCoordinate::Comparator::operator()
bool operator()(const struct WeightedCoordinate &wc1, const struct WeightedCoordinate &wc2)
Definition: TrigInDetUtils.h:25
FTF
header for factorised IRoiDescriptor interface
Definition: TrigInDetUtils.h:18