ATLAS Offline Software
TileTrackMuFeature.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
7 
9 static const double DELTA = 0.001;
10 
11 TileTrackMuFeature::TileTrackMuFeature() : P4PtEtaPhiMBase(), m_TileMuOutput(), m_IDScanOutput()
12 {
13  m_PtTR_Trk = 9999.9;
14  m_EtaTR_Trk = 9999.9;
15  m_PhiTR_Trk = 9999.9;
16  m_Typ_IDTrk = 0;
17 }
18 
20 
22  float PtTR_Trk,
23  float EtaTR_Trk, float PhiTR_Trk, int Typ_IDTrk,
24  const ElementLink< TileMuFeatureContainer>& TileMuOutput,
25  const ElementLink< TrigInDetTrackCollection>& IDScanOutput)
26  : P4PtEtaPhiMBase()
27  , m_PtTR_Trk(PtTR_Trk)
28  , m_EtaTR_Trk(EtaTR_Trk)
29  , m_PhiTR_Trk(PhiTR_Trk)
30  , m_Typ_IDTrk(Typ_IDTrk)
31  , m_TileMuOutput(TileMuOutput)
32  , m_IDScanOutput(IDScanOutput)
33 {
34 }
35 
38  : m_PtTR_Trk ( muon_feature-> m_PtTR_Trk)
39  , m_EtaTR_Trk ( muon_feature-> m_EtaTR_Trk)
40  , m_PhiTR_Trk ( muon_feature-> m_PhiTR_Trk)
41  , m_Typ_IDTrk ( muon_feature-> m_Typ_IDTrk)
42  , m_TileMuOutput ( muon_feature-> m_TileMuOutput)
43  , m_IDScanOutput ( muon_feature-> m_IDScanOutput)
44 {
45 }
46 
50  , m_PtTR_Trk ( muon_feature.m_PtTR_Trk)
51  , m_EtaTR_Trk ( muon_feature.m_EtaTR_Trk)
52  , m_PhiTR_Trk ( muon_feature.m_PhiTR_Trk)
53  , m_Typ_IDTrk ( muon_feature.m_Typ_IDTrk)
54  , m_TileMuOutput ( muon_feature.m_TileMuOutput)
55  , m_IDScanOutput ( muon_feature.m_IDScanOutput)
56 {
57 }
58 
62  if (this != &muon_feature) {
63  m_PtTR_Trk = muon_feature.m_PtTR_Trk;
64  m_EtaTR_Trk = muon_feature.m_EtaTR_Trk;
65  m_PhiTR_Trk = muon_feature.m_PhiTR_Trk;
66  m_Typ_IDTrk = muon_feature.m_Typ_IDTrk;
67  m_TileMuOutput = muon_feature.m_TileMuOutput;
68  m_IDScanOutput = muon_feature.m_IDScanOutput;
69  }
70  return *this;
71 }
72 
75 std::string str ( const TileTrackMuFeature& d )
76 {
77  std::stringstream ss;
78 
79  ss << "EtaTR_Trk: " << d.EtaTR_Trk()
80  << "; PhiTR_Trk: " << d.PhiTR_Trk()
81  << "; PtTR_Trk: " << d.PtTR_Trk();
82 
83  return ss.str();
84 }
85 
86 MsgStream& operator<< ( MsgStream& m, const TileTrackMuFeature& d )
87 {
88  return ( m << str( d ) );
89 }
90 
92 {
93  if( std::abs( a.EtaTR_Trk() - b.EtaTR_Trk() ) > DELTA ) return false;
94  if( std::abs( a.PhiTR_Trk() - b.PhiTR_Trk() ) > DELTA ) return false;
95  if( std::abs( a.PtTR_Trk() - b.PtTR_Trk() ) > DELTA ) return false;
96 
97  return true;
98 }
99 
100 void diff( const TileTrackMuFeature& a, const TileTrackMuFeature& b, std::map< std::string, double >& variableChange )
101 {
102  if( std::abs( a.EtaTR_Trk() - b.EtaTR_Trk() ) > DELTA ) {
103  variableChange[ "EtaTR_Trk" ] = a.EtaTR_Trk() - b.EtaTR_Trk();
104  }
105  if( std::abs( a.PhiTR_Trk() - b.PhiTR_Trk() ) > DELTA ) {
106  variableChange[ "PhiTR_Trk" ] = a.PhiTR_Trk() - b.PhiTR_Trk();
107  }
108  if( std::abs( a.PtTR_Trk() - b.PtTR_Trk() ) > DELTA ) {
109  variableChange[ "PtTR_Trk" ] = a.PtTR_Trk() - b.PtTR_Trk();
110  }
111 
112  return;
113 }
TileTrackMuFeature::m_TileMuOutput
ElementLink< TileMuFeatureContainer > m_TileMuOutput
Definition: TileTrackMuFeature.h:89
I4Momentum
Definition: I4Momentum.h:31
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
hist_file_dump.d
d
Definition: hist_file_dump.py:137
TileTrackMuFeature::m_EtaTR_Trk
float m_EtaTR_Trk
Definition: TileTrackMuFeature.h:85
TileTrackMuFeature::m_PtTR_Trk
float m_PtTR_Trk
Definition: TileTrackMuFeature.h:84
NavigableTerminalNode
Dummy type needed fro specialized implementation.
Definition: NavigableTerminalNode.h:19
TileTrackMuFeature::TileTrackMuFeature
TileTrackMuFeature()
Constructor.
Definition: TileTrackMuFeature.cxx:11
TileTrackMuFeature::m_Typ_IDTrk
int m_Typ_IDTrk
Definition: TileTrackMuFeature.h:87
operator<<
MsgStream & operator<<(MsgStream &m, const TileTrackMuFeature &d)
Helper operator for printing the object.
Definition: TileTrackMuFeature.cxx:86
diff
void diff(const TileTrackMuFeature &a, const TileTrackMuFeature &b, std::map< std::string, double > &variableChange)
Comparison with feedback.
Definition: TileTrackMuFeature.cxx:100
TileTrackMuFeature
Definition: TileTrackMuFeature.h:41
TileTrackMuFeature.h
str
std::string str(const TileTrackMuFeature &d)
Helper operators.
Definition: TileTrackMuFeature.cxx:75
INavigable
Definition: INavigable.h:18
IAthenaBarCode
Definition: AthenaKernel/AthenaKernel/IAthenaBarCode.h:48
TileTrackMuFeature::m_PhiTR_Trk
float m_PhiTR_Trk
Definition: TileTrackMuFeature.h:86
P4PtEtaPhiMBase
Definition: P4PtEtaPhiMBase.h:26
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
a
TList * a
Definition: liststreamerinfos.cxx:10
INavigable4Momentum
Definition: INavigable4Momentum.h:21
TileTrackMuFeature::~TileTrackMuFeature
~TileTrackMuFeature()
Destructor.
Definition: TileTrackMuFeature.cxx:19
TileTrackMuFeature::m_IDScanOutput
ElementLink< TrigInDetTrackCollection > m_IDScanOutput
Definition: TileTrackMuFeature.h:90
TileTrackMuFeature::operator=
TileTrackMuFeature & operator=(const TileTrackMuFeature &muon_feature)
Assignement operator.
Definition: TileTrackMuFeature.cxx:61
operator==
bool operator==(const TileTrackMuFeature &a, const TileTrackMuFeature &b)
Operator comparing two CombinedMuonFeature objects for equality.
Definition: TileTrackMuFeature.cxx:91