ATLAS Offline Software
MuonFeature.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef TRIGMUONEVENT_MUON_FEATURE_H
8 #define TRIGMUONEVENT_MUON_FEATURE_H
9 
10 // STL include(s):
11 #include <string>
12 #include <map>
13 
14 // Gaudi/Athena include(s):
15 #include "AthenaKernel/CLASS_DEF.h"
17 
18 // Forward declaration(s):
19 class MsgStream;
20 
21 class MuonFeature {
22 
23 public:
24  enum AlgoId{GEV900ID=0, MUONID=1, HALOID=2, NULLID=99999};
25 
26  MuonFeature();
27  // keep this for backward compatibility
28  MuonFeature(int saddress, float pt, float radius, float eta,
29  float phi, float dir_phi, float zeta, float dir_zeta, float beta);
30  // new constructor
31  MuonFeature(int saddress, float pt, float radius, float eta,
32  float phi, float dir_phi, float zeta, float dir_zeta, float beta,
33  float sp1_r, float sp1_z, float sp1_slope,
34  float sp2_r, float sp2_z, float sp2_slope,
35  float sp3_r, float sp3_z, float sp3_slope,
36  float br_radius, float br_sagitta,
37  float ec_alpha, float ec_beta,
38  double dq_var1, double dq_var2);
39 
40  MuonFeature(const MuonFeature* muon_feature);
41  MuonFeature(const MuonFeature& muon_feature);
42 
43  MuonFeature& operator=(const MuonFeature& muon_feature);
44 
45  AlgoId algoId(void) const {return m_algoId;}
46  int roiId(void) const {return m_RoIId;}
47  int saddress(void) const {return m_saddress;}
48  float pt(void) const {return m_pt;}
49  float radius(void) const {return m_radius;}
50  float eta(void) const {return m_eta;}
51  float phi(void) const {return m_phi;}
52  float dir_phi(void) const {return m_dir_phi;}
53  float zeta(void) const {return m_zeta;}
54  float dir_zeta(void) const {return m_dir_zeta;}
55  float beta(void) const {return m_beta;}
56  float sp1_r(void) const {return m_sp1_r; }
57  float sp1_z(void) const {return m_sp1_z; }
58  float sp1_slope(void) const {return m_sp1_slope; }
59  float sp2_r(void) const {return m_sp2_r; }
60  float sp2_z(void) const {return m_sp2_z; }
61  float sp2_slope(void) const {return m_sp2_slope; }
62  float sp3_r(void) const {return m_sp3_r; }
63  float sp3_z(void) const {return m_sp3_z; }
64  float sp3_slope(void) const {return m_sp3_slope; }
65  float br_radius(void) const {return m_br_radius; }
66  float br_sagitta(void) const {return m_br_sagitta; }
67  float ec_alpha(void) const {return m_ec_alpha; }
68  float ec_beta(void) const {return m_ec_beta; }
69  double dq_var1(void) const {return m_dq_var1; }
70  double dq_var2(void) const {return m_dq_var2; }
71 
73  void set_roiId(int roiId) {m_RoIId = roiId;}
74  void set_sp1(float r, float z, float slope) {m_sp1_r=r; m_sp1_z=z; m_sp1_slope=slope;}
75  void set_sp2(float r, float z, float slope) {m_sp2_r=r; m_sp2_z=z; m_sp2_slope=slope;}
76  void set_sp3(float r, float z, float slope) {m_sp3_r=r; m_sp3_z=z; m_sp3_slope=slope;}
77  void set_br(float radius, float sagitta) {m_br_radius=radius; m_br_sagitta=sagitta;}
78  void set_ec(float alpha, float beta) {m_ec_alpha =alpha ; m_ec_beta =beta;}
79  void set_dq(double var1, double var2) {m_dq_var1 =var1 ; m_dq_var2 =var2;}
80 
81 private:
83  int m_RoIId;
85  float m_pt;
86  float m_radius;
87  float m_eta;
88  float m_phi;
89  float m_dir_phi;
90  float m_zeta;
91  float m_dir_zeta;
92  float m_beta;
93  float m_sp1_r;
94  float m_sp1_z;
95  float m_sp1_slope;
96  float m_sp2_r;
97  float m_sp2_z;
98  float m_sp2_slope;
99  float m_sp3_r;
100  float m_sp3_z;
101  float m_sp3_slope;
102  float m_br_radius;
104  float m_ec_alpha;
105  float m_ec_beta;
106  double m_dq_var1;
107  double m_dq_var2;
108 
109 };
110 
112 std::string str( const MuonFeature& muon );
114 MsgStream& operator<< ( MsgStream& m, const MuonFeature& muon );
115 
117 bool operator== ( const MuonFeature& left, const MuonFeature& right );
119 inline bool operator!= ( const MuonFeature& left, const MuonFeature& right ) {
120  return !( left == right );
121 }
122 
124 void diff( const MuonFeature& left, const MuonFeature& right,
125  std::map< std::string, double >& varChange );
126 
127 CLASS_DEF(MuonFeature, 1500, 1)
128 CLASS_DEF(DataVector<MuonFeature>, 227312873, 1)
129 
130 
131 #endif // TRIGMUONEVENT_MUON_FEATURE_H
MuonFeature::dq_var2
double dq_var2(void) const
Definition: MuonFeature.h:70
beamspotman.r
def r
Definition: beamspotman.py:676
MuonFeature::m_sp1_z
float m_sp1_z
Definition: MuonFeature.h:94
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
MuonFeature::MuonFeature
MuonFeature()
Definition: MuonFeature.cxx:21
MuonFeature::MUONID
@ MUONID
Definition: MuonFeature.h:24
MuonFeature::m_dq_var1
double m_dq_var1
Definition: MuonFeature.h:106
MuonFeature::dq_var1
double dq_var1(void) const
Definition: MuonFeature.h:69
MuonFeature::m_pt
float m_pt
Definition: MuonFeature.h:85
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
MuonFeature::m_br_sagitta
float m_br_sagitta
Definition: MuonFeature.h:103
diff
void diff(const MuonFeature &left, const MuonFeature &right, std::map< std::string, double > &varChange)
Comparison with feedback.
Definition: MuonFeature.cxx:236
MuonFeature::sp3_slope
float sp3_slope(void) const
Definition: MuonFeature.h:64
MuonFeature::m_algoId
AlgoId m_algoId
Definition: MuonFeature.h:82
MuonFeature::radius
float radius(void) const
Definition: MuonFeature.h:49
MuonFeature::m_radius
float m_radius
Definition: MuonFeature.h:86
MuonFeature::set_sp2
void set_sp2(float r, float z, float slope)
Definition: MuonFeature.h:75
MuonFeature::m_saddress
int m_saddress
Definition: MuonFeature.h:84
MuonFeature::dir_phi
float dir_phi(void) const
Definition: MuonFeature.h:52
MuonFeature::m_phi
float m_phi
Definition: MuonFeature.h:88
MuonFeature::sp1_r
float sp1_r(void) const
Definition: MuonFeature.h:56
MuonFeature::eta
float eta(void) const
Definition: MuonFeature.h:50
MuonFeature::m_sp3_z
float m_sp3_z
Definition: MuonFeature.h:100
MuonFeature::m_ec_beta
float m_ec_beta
Definition: MuonFeature.h:105
MuonFeature::ec_alpha
float ec_alpha(void) const
Definition: MuonFeature.h:67
operator==
bool operator==(const MuonFeature &left, const MuonFeature &right)
Operator comparing two MuonFeature objects for equality.
Definition: MuonFeature.cxx:198
MuonFeature::set_sp3
void set_sp3(float r, float z, float slope)
Definition: MuonFeature.h:76
MuonFeature::set_ec
void set_ec(float alpha, float beta)
Definition: MuonFeature.h:78
str
std::string str(const MuonFeature &muon)
Helper function for printing the object.
Definition: MuonFeature.cxx:180
MuonFeature::phi
float phi(void) const
Definition: MuonFeature.h:51
operator<<
MsgStream & operator<<(MsgStream &m, const MuonFeature &muon)
Helper operator for printing the object.
Definition: MuonFeature.cxx:192
MuonFeature::set_algoId
void set_algoId(AlgoId algoId)
Definition: MuonFeature.h:72
MuonFeature::set_roiId
void set_roiId(int roiId)
Definition: MuonFeature.h:73
MuonFeature::set_sp1
void set_sp1(float r, float z, float slope)
Definition: MuonFeature.h:74
MuonFeature::NULLID
@ NULLID
Definition: MuonFeature.h:24
MuonFeature::HALOID
@ HALOID
Definition: MuonFeature.h:24
MuonFeature::br_radius
float br_radius(void) const
Definition: MuonFeature.h:65
MuonFeature::dir_zeta
float dir_zeta(void) const
Definition: MuonFeature.h:54
MuonFeature::saddress
int saddress(void) const
Definition: MuonFeature.h:47
MuonFeature::roiId
int roiId(void) const
Definition: MuonFeature.h:46
z
#define z
MuonFeature::set_br
void set_br(float radius, float sagitta)
Definition: MuonFeature.h:77
MuonFeature::br_sagitta
float br_sagitta(void) const
Definition: MuonFeature.h:66
MuonFeature::sp3_z
float sp3_z(void) const
Definition: MuonFeature.h:63
MuonFeature::m_dir_phi
float m_dir_phi
Definition: MuonFeature.h:89
MuonFeature::m_sp1_slope
float m_sp1_slope
Definition: MuonFeature.h:95
MuonFeature::m_zeta
float m_zeta
Definition: MuonFeature.h:90
MuonFeature::set_dq
void set_dq(double var1, double var2)
Definition: MuonFeature.h:79
MuonFeature::algoId
AlgoId algoId(void) const
Definition: MuonFeature.h:45
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
MuonFeature::m_sp2_r
float m_sp2_r
Definition: MuonFeature.h:96
MuonFeature::sp3_r
float sp3_r(void) const
Definition: MuonFeature.h:62
MuonFeature::m_RoIId
int m_RoIId
Definition: MuonFeature.h:83
MuonFeature
Definition: MuonFeature.h:21
MuonFeature::sp1_z
float sp1_z(void) const
Definition: MuonFeature.h:57
MuonFeature::sp2_z
float sp2_z(void) const
Definition: MuonFeature.h:60
MuonFeature::m_dir_zeta
float m_dir_zeta
Definition: MuonFeature.h:91
MuonFeature::m_ec_alpha
float m_ec_alpha
Definition: MuonFeature.h:104
MuonFeature::sp1_slope
float sp1_slope(void) const
Definition: MuonFeature.h:58
MuonFeature::m_sp2_slope
float m_sp2_slope
Definition: MuonFeature.h:98
MuonFeature::sp2_slope
float sp2_slope(void) const
Definition: MuonFeature.h:61
MuonFeature::operator=
MuonFeature & operator=(const MuonFeature &muon_feature)
Definition: MuonFeature.cxx:148
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
MuonFeature::GEV900ID
@ GEV900ID
Definition: MuonFeature.h:24
MuonFeature::m_sp2_z
float m_sp2_z
Definition: MuonFeature.h:97
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
MuonFeature::m_sp1_r
float m_sp1_r
Definition: MuonFeature.h:93
MuonFeature::m_eta
float m_eta
Definition: MuonFeature.h:87
MuonFeature::m_beta
float m_beta
Definition: MuonFeature.h:92
operator!=
bool operator!=(const MuonFeature &left, const MuonFeature &right)
Operator comparing two MuonFeature objects for inequality.
Definition: MuonFeature.h:119
MuonFeature::ec_beta
float ec_beta(void) const
Definition: MuonFeature.h:68
MuonFeature::pt
float pt(void) const
Definition: MuonFeature.h:48
MuonFeature::AlgoId
AlgoId
Definition: MuonFeature.h:24
MuonFeature::beta
float beta(void) const
Definition: MuonFeature.h:55
CLASS_DEF.h
macros to associate a CLID to a type
MuonFeature::m_sp3_r
float m_sp3_r
Definition: MuonFeature.h:99
MuonFeature::m_sp3_slope
float m_sp3_slope
Definition: MuonFeature.h:101
MuonFeature::m_dq_var2
double m_dq_var2
Definition: MuonFeature.h:107
MuonFeature::sp2_r
float sp2_r(void) const
Definition: MuonFeature.h:59
MuonFeature::m_br_radius
float m_br_radius
Definition: MuonFeature.h:102
MuonFeature::zeta
float zeta(void) const
Definition: MuonFeature.h:53