ATLAS Offline Software
TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.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 #ifndef DCMATH_SEGMENT_H
6 #define DCMATH_SEGMENT_H
7 
8 #include <ostream>
9 #include <vector>
10 
11 #include "GaudiKernel/MsgStream.h"
15 
16 namespace TrkDriftCircleMath {
17 
18  class Segment {
19  public:
20  Segment(const Line& l, const DCOnTrackVec& dcs, double chi2, unsigned int ndof, double dtheta, double dy0) :
22 
23  Segment(const Line& l, const DCOnTrackVec& dcs) : m_line(l), m_dcs(dcs) {}
24 
25  ~Segment() = default;
26 
27  const Line& line() const { return m_line; }
28  const DCOnTrackVec& dcs() const { return m_dcs; }
29  const CLVec& clusters() const { return m_clusters; }
30  const DCVec& emptyTubes() const { return m_emptyTubes; }
31 
33  Line& line() { return m_line; }
34  DCOnTrackVec& dcs() { return m_dcs; }
35  CLVec& clusters() { return m_clusters; }
36  DCVec& emptyTubes() { return m_emptyTubes; }
37 
39  void set(double chi2, unsigned int ndof, double dtheta, double dy0);
40  void setAndReset(double chi2, unsigned int ndof, double dtheta, double dy0);
41 
42  double chi2() const { return m_chi2; }
43  unsigned int ndof() const { return m_ndof; }
44  double dtheta() const { return m_dtheta; }
45  double dy0() const { return m_dy0; }
46 
47  void dcs(const DCOnTrackVec& dcs) { m_dcs = dcs; }
48  void clusters(const CLVec& cls) { m_clusters = cls; }
50  void deltas(unsigned int dts) { m_deltas = dts; }
53  void closeHits(unsigned int closeHits) { m_closeHits = closeHits; }
54  void showerHits(unsigned int showerHits) { m_showerHits = showerHits; }
55  void crossedTubes(unsigned int crossedTubesMl1, unsigned int crossedTubesMl2) {
58  }
59  void hitsPerMl(unsigned int hml1, unsigned int hml2) {
60  m_hitsMl1 = hml1;
61  m_hitsMl2 = hml2;
62  }
63  void ambigue(unsigned int amb) { m_ambigue = amb; }
64  void clusterLayers(unsigned int ncl) { m_clusterLayers = ncl; }
65 
66  void setT0Shift(double t0Shift, double error) {
68  m_t0Error = error;
69  }
70  bool hasT0Shift() const { return m_t0Shift != -99999.; }
71 
72  void setCurvatureParameters(double deltaAlpha, double deltab) {
74  m_deltab = deltab;
75  }
76  bool hasCurvatureParameters() const { return m_deltaAlpha != -99999.; }
77 
78  double t0Shift() const { return m_t0Shift; }
79  double t0Error() const { return m_t0Error; }
80  double deltaAlpha() const { return m_deltaAlpha; }
81  double deltab() const { return m_deltab; }
82  unsigned int deltas() const { return m_deltas; }
83  unsigned int hitsOutOfTime() const { return m_hitsOutOfTime; }
84  unsigned int hitsOnTrack() const { return m_hitsOnTrack; }
85  unsigned int closeHits() const { return m_closeHits; }
86  unsigned int showerHits() const { return m_showerHits; }
87  unsigned int crossedTubes() const { return crossedTubesMl1() + crossedTubesMl2(); }
88  unsigned int crossedTubesMl1() const { return m_crossedTubesMl1; }
89  unsigned int crossedTubesMl2() const { return m_crossedTubesMl2; }
90  unsigned int hitsMl1() const { return m_hitsMl1; }
91  unsigned int hitsMl2() const { return m_hitsMl2; }
92  unsigned int ambigue() const { return m_ambigue; }
93  unsigned int clusterLayers() const { return m_clusterLayers; }
94 
95  private:
100 
101  double m_chi2{1.e9};
102  unsigned int m_ndof{0};
103  double m_dtheta{1.e9}; // needed in find5. Error in tube coordinate (pos? dir?)
104  double m_dy0{1.e9}; // needed in find5. Error in strip coordinate (pos? dir?)
105  double m_t0Shift{-99999.};
106  double m_t0Error{-99999.};
107  double m_deltaAlpha{-99999.};
108  double m_deltab{-99999.};
109  unsigned int m_deltas{0};
110  unsigned int m_hitsOutOfTime{0};
111  unsigned int m_hitsOnTrack{0};
112  unsigned int m_closeHits{0};
113  unsigned int m_showerHits{0};
114  unsigned int m_crossedTubesMl1{0};
115  unsigned int m_crossedTubesMl2{0};
116  unsigned int m_hitsMl1{0};
117  unsigned int m_hitsMl2{0};
118  unsigned int m_ambigue{0};
119  unsigned int m_clusterLayers{0};
120  };
121 
122  typedef std::vector<Segment> SegVec;
124  typedef SegVec::const_iterator SegCit;
125 
126  std::ostream& operator<<(std::ostream& os, const TrkDriftCircleMath::Segment& dc);
127 
128  MsgStream& operator<<(MsgStream& os, const TrkDriftCircleMath::Segment& dc);
129 
130 } // namespace TrkDriftCircleMath
131 
132 #endif // DCMATH_SEGMENT_H
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
TrkDriftCircleMath::Segment::closeHits
unsigned int closeHits() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:85
TrkDriftCircleMath::Segment::set
void set(double chi2, unsigned int ndof, double dtheta, double dy0)
set methods to replace calling constructors
Definition: TrkUtilityPackages/TrkDriftCircleMath/src/Segment.cxx:41
TrkDriftCircleMath::Segment::crossedTubesMl2
unsigned int crossedTubesMl2() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:89
TrkDriftCircleMath::Segment::crossedTubesMl1
unsigned int crossedTubesMl1() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:88
TrkDriftCircleMath::Segment::m_showerHits
unsigned int m_showerHits
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:113
TrkDriftCircleMath::Segment::m_deltab
double m_deltab
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:108
TrkDriftCircleMath::Segment::showerHits
unsigned int showerHits() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:86
TrkDriftCircleMath::DCOnTrackVec
std::vector< DCOnTrack > DCOnTrackVec
Definition: DCOnTrack.h:59
TrkDriftCircleMath::Segment::m_emptyTubes
DCVec m_emptyTubes
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:99
TrkDriftCircleMath::Segment::m_dy0
double m_dy0
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:104
TrkDriftCircleMath::Segment::line
const Line & line() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:27
TrkDriftCircleMath::SegCit
SegVec::const_iterator SegCit
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:124
TrkDriftCircleMath::Segment::showerHits
void showerHits(unsigned int showerHits)
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:54
TrkDriftCircleMath::Segment::hasT0Shift
bool hasT0Shift() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:70
TrkDriftCircleMath::Segment::dcs
void dcs(const DCOnTrackVec &dcs)
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:47
TrkDriftCircleMath::Segment::clusters
const CLVec & clusters() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:29
TrkDriftCircleMath::Segment::m_dcs
DCOnTrackVec m_dcs
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:97
TrkDriftCircleMath::Segment::~Segment
~Segment()=default
TrkDriftCircleMath::CLVec
std::vector< Cluster > CLVec
Definition: Tracking/TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Cluster.h:70
TrkDriftCircleMath::Segment::m_deltas
unsigned int m_deltas
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:109
TrkDriftCircleMath::Segment::dtheta
double dtheta() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:44
TrkDriftCircleMath
Function object to check whether two Segments are sub/super sets or different.
Definition: IMdtSegmentFinder.h:13
CaloClusterListBadChannel.cls
cls
Definition: CaloClusterListBadChannel.py:8
TrkDriftCircleMath::Segment::hitsOutOfTime
void hitsOutOfTime(unsigned int hitsOutOfTime)
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:51
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
TrkDriftCircleMath::Segment::m_ndof
unsigned int m_ndof
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:102
TrkDriftCircleMath::Segment::setAndReset
void setAndReset(double chi2, unsigned int ndof, double dtheta, double dy0)
Definition: TrkUtilityPackages/TrkDriftCircleMath/src/Segment.cxx:62
TrkDriftCircleMath::Segment::ndof
unsigned int ndof() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:43
TrkDriftCircleMath::Segment::closeHits
void closeHits(unsigned int closeHits)
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:53
TrkDriftCircleMath::Segment::deltas
unsigned int deltas() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:82
TrkDriftCircleMath::Segment
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:18
TrkDriftCircleMath::Segment::hitsMl1
unsigned int hitsMl1() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:90
TrkDriftCircleMath::DCVec
std::vector< DriftCircle > DCVec
Definition: DriftCircle.h:117
TrkDriftCircleMath::Segment::dcs
DCOnTrackVec & dcs()
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:34
TrkDriftCircleMath::Segment::hitsPerMl
void hitsPerMl(unsigned int hml1, unsigned int hml2)
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:59
TrkDriftCircleMath::Segment::m_closeHits
unsigned int m_closeHits
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:112
TrkDriftCircleMath::Segment::m_hitsOnTrack
unsigned int m_hitsOnTrack
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:111
TrkDriftCircleMath::Line
Definition: Line.h:17
TrkDriftCircleMath::Segment::t0Error
double t0Error() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:79
TrkDriftCircleMath::Segment::hitsOutOfTime
unsigned int hitsOutOfTime() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:83
TrkDriftCircleMath::Segment::clusterLayers
unsigned int clusterLayers() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:93
TrkDriftCircleMath::Segment::m_hitsMl2
unsigned int m_hitsMl2
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:117
TrkDriftCircleMath::Segment::ambigue
void ambigue(unsigned int amb)
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:63
TrkDriftCircleMath::operator<<
std::ostream & operator<<(std::ostream &os, const TrkDriftCircleMath::ClusterId &id)
Definition: ClusterId.cxx:9
Line.h
TrkDriftCircleMath::Segment::hitsMl2
unsigned int hitsMl2() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:91
TrkDriftCircleMath::Segment::chi2
double chi2() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:42
TrkDriftCircleMath::Segment::m_clusters
CLVec m_clusters
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:98
TrkDriftCircleMath::Segment::m_crossedTubesMl1
unsigned int m_crossedTubesMl1
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:114
TrkDriftCircleMath::Segment::emptyTubes
const DCVec & emptyTubes() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:30
TrkDriftCircleMath::Segment::line
Line & line()
non-const access to reduce memory usage when re-using segments
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:33
TrkDriftCircleMath::Segment::clusters
void clusters(const CLVec &cls)
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:48
TrkDriftCircleMath::Segment::emptyTubes
void emptyTubes(const DCVec &emptyTubes)
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:49
TrkDriftCircleMath::Segment::m_line
Line m_line
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:96
TrkDriftCircleMath::Segment::m_dtheta
double m_dtheta
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:103
TrkDriftCircleMath::Segment::hitsOnTrack
void hitsOnTrack(unsigned int hitsOnTrack)
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:52
TrkDriftCircleMath::Segment::dcs
const DCOnTrackVec & dcs() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:28
TrkDriftCircleMath::Segment::t0Shift
double t0Shift() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:78
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
TrkDriftCircleMath::Segment::Segment
Segment(const Line &l, const DCOnTrackVec &dcs)
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:23
DCOnTrack.h
TrkDriftCircleMath::Segment::ambigue
unsigned int ambigue() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:92
TrkDriftCircleMath::Segment::m_hitsMl1
unsigned int m_hitsMl1
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:116
TrkDriftCircleMath::SegIt
SegVec::iterator SegIt
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:123
TrkDriftCircleMath::Segment::setCurvatureParameters
void setCurvatureParameters(double deltaAlpha, double deltab)
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:72
TrkDriftCircleMath::Segment::Segment
Segment(const Line &l, const DCOnTrackVec &dcs, double chi2, unsigned int ndof, double dtheta, double dy0)
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:20
TrkDriftCircleMath::Segment::crossedTubes
unsigned int crossedTubes() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:87
TrkDriftCircleMath::Segment::clusters
CLVec & clusters()
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:35
TrkDriftCircleMath::Segment::deltaAlpha
double deltaAlpha() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:80
TrkDriftCircleMath::Segment::hitsOnTrack
unsigned int hitsOnTrack() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:84
TrkDriftCircleMath::Segment::m_deltaAlpha
double m_deltaAlpha
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:107
TrkDriftCircleMath::Segment::clusterLayers
void clusterLayers(unsigned int ncl)
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:64
TrkDriftCircleMath::Segment::m_t0Shift
double m_t0Shift
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:105
TrkDriftCircleMath::Segment::deltab
double deltab() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:81
TrkDriftCircleMath::Segment::m_clusterLayers
unsigned int m_clusterLayers
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:119
TrkDriftCircleMath::Segment::hasCurvatureParameters
bool hasCurvatureParameters() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:76
TrkDriftCircleMath::Segment::emptyTubes
DCVec & emptyTubes()
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:36
TrkDriftCircleMath::Segment::m_t0Error
double m_t0Error
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:106
TrkDriftCircleMath::SegVec
std::vector< Segment > SegVec
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:122
TrkDriftCircleMath::Segment::m_chi2
double m_chi2
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:101
TrkDriftCircleMath::Segment::setT0Shift
void setT0Shift(double t0Shift, double error)
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:66
get_generator_info.error
error
Definition: get_generator_info.py:40
TrkDriftCircleMath::Segment::crossedTubes
void crossedTubes(unsigned int crossedTubesMl1, unsigned int crossedTubesMl2)
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:55
Cluster.h
TrkDriftCircleMath::Segment::m_crossedTubesMl2
unsigned int m_crossedTubesMl2
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:115
error
Definition: IImpactPoint3dEstimator.h:70
TrkDriftCircleMath::Segment::deltas
void deltas(unsigned int dts)
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:50
TrkDriftCircleMath::Segment::m_hitsOutOfTime
unsigned int m_hitsOutOfTime
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:110
TrkDriftCircleMath::Segment::dy0
double dy0() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:45
TrkDriftCircleMath::Segment::m_ambigue
unsigned int m_ambigue
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:118