ATLAS Offline Software
TrkUtilityPackages/TrkDriftCircleMath/src/Segment.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
9 
10 namespace TrkDriftCircleMath {
11 
12  std::ostream& operator<<(std::ostream& os, const TrkDriftCircleMath::Segment& seg) {
13  os << seg.line() << " chi2 " << seg.chi2() << " ndof " << seg.ndof() << " t0 shift " << seg.t0Shift() << std::endl
14  << " hot " << seg.hitsOnTrack() << " deltas " << seg.deltas() << " hoo " << seg.hitsOutOfTime() << " cl " << seg.closeHits()
15  << " ml1 " << seg.hitsMl1() << " ml2 " << seg.hitsMl2() << " cls " << seg.clusterLayers() << " empty " << seg.emptyTubes().size()
16  << " cross ml1 " << seg.crossedTubesMl1() << " ml2 " << seg.crossedTubesMl2() << std::endl;
17 
18  // TrkDriftCircleMath::ResidualWithLine resLine( seg.line() );
19 
20  TrkDriftCircleMath::DCOnTrackCit it = seg.dcs().begin();
21  TrkDriftCircleMath::DCOnTrackCit it_end = seg.dcs().end();
22 
23  for (; it != it_end; ++it) { os << *it << std::endl; }
24  return os;
25  }
26 
27  MsgStream& operator<<(MsgStream& os, const TrkDriftCircleMath::Segment& seg) {
28  os << seg.line() << " chi2 " << seg.chi2() << " ndof " << seg.ndof() << " t0 shift " << seg.t0Shift() << "\n hot "
29  << seg.hitsOnTrack() << " deltas " << seg.deltas() << " hoo " << seg.hitsOutOfTime() << " cl " << seg.closeHits() << " ml1 "
30  << seg.hitsMl1() << " ml2 " << seg.hitsMl2() << " cls " << seg.clusterLayers() << " empty " << seg.emptyTubes().size()
31  << " cross ml1 " << seg.crossedTubesMl1() << " ml2 " << seg.crossedTubesMl2() << endmsg;
32 
33  TrkDriftCircleMath::DCOnTrackCit it = seg.dcs().begin();
34  TrkDriftCircleMath::DCOnTrackCit it_end = seg.dcs().end();
35 
36  for (; it != it_end; ++it) { os << *it << endmsg; }
37 
38  return os;
39  }
40 
41  void Segment::set(double chi2, unsigned int ndof, double dtheta, double dy0) {
42  m_chi2 = chi2;
43  m_ndof = ndof;
44  m_dtheta = dtheta;
45  m_dy0 = dy0;
46  m_t0Shift = -99999.;
47  m_deltaAlpha = -99999.;
48  m_deltab = -99999.;
49  m_deltas = 0;
50  m_hitsOutOfTime = 0;
51  m_hitsOnTrack = 0;
52  m_closeHits = 0;
53  m_showerHits = 0;
56  m_hitsMl1 = 0;
57  m_hitsMl2 = 0;
58  m_ambigue = 0;
59  m_clusterLayers = 0;
60  }
61 
62  void Segment::setAndReset(double chi2, unsigned int ndof, double dtheta, double dy0) {
63  m_chi2 = chi2;
64  m_ndof = ndof;
65  m_dtheta = dtheta;
66  m_dy0 = dy0;
67  m_t0Shift = -99999.;
68  m_deltaAlpha = -99999.;
69  m_deltab = -99999.;
70  m_deltas = 0;
71  m_hitsOutOfTime = 0;
72  m_hitsOnTrack = 0;
73  m_closeHits = 0;
74  m_showerHits = 0;
77  m_hitsMl1 = 0;
78  m_hitsMl2 = 0;
79  m_ambigue = 0;
80  m_clusterLayers = 0;
81  m_dcs.clear();
82  m_clusters.clear();
83  m_emptyTubes.clear();
84  }
85 
86 } // namespace TrkDriftCircleMath
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
IDTPM::ndof
float ndof(const U &p)
Definition: TrackParametersHelper.h:142
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::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
SegmentCandidate.h
TrkDriftCircleMath::Segment::line
const Line & line() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:27
TrkDriftCircleMath::Segment::m_dcs
DCOnTrackVec m_dcs
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:97
TrkDriftCircleMath::Segment::m_deltas
unsigned int m_deltas
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:109
skel.it
it
Definition: skel.GENtoEVGEN.py:423
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
TrkDriftCircleMath::Segment::hitsOutOfTime
void hitsOutOfTime(unsigned int hitsOutOfTime)
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:51
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
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:18
TrkDriftCircleMath::Segment::hitsMl1
unsigned int hitsMl1() const
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:90
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::Segment::m_hitsMl2
unsigned int m_hitsMl2
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:117
TrkDriftCircleMath::operator<<
std::ostream & operator<<(std::ostream &os, const TrkDriftCircleMath::ClusterId &id)
Definition: ClusterId.cxx:9
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
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
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
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522
TrkDriftCircleMath::Segment::m_dtheta
double m_dtheta
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:103
TrkDriftCircleMath::DCOnTrackCit
DCOnTrackVec::const_iterator DCOnTrackCit
Definition: DCOnTrack.h:61
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
DCOnTrack.h
TrkDriftCircleMath::Segment::m_hitsMl1
unsigned int m_hitsMl1
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:116
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
Segment.h
TrkDriftCircleMath::Segment::m_clusterLayers
unsigned int m_clusterLayers
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:119
TrkDriftCircleMath::Segment::m_chi2
double m_chi2
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:101
TrkDriftCircleMath::Segment::m_crossedTubesMl2
unsigned int m_crossedTubesMl2
Definition: TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:115
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