ATLAS Offline Software
IsoMuonFeature.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 /*******************************************************
8 
9 NAME: IsoMuonFeature.h
10 PACKAGE: Trigger/TrigEvent/TrigMuonEvent
11 AUTHORS: Stefano Giagu <stefano.giagu@cern.ch>
12 PURPOSE: Keep the important output variables
13  from the muon isolation trigger.
14 DATE: V4.0 May 5th, 2008
15 
16 ******************************************************/
17 #ifndef TRIGMUONEVENT_ISO_MUON_FEATURE_H
18 #define TRIGMUONEVENT_ISO_MUON_FEATURE_H
19 
20 // STL include(s):
21 #include <iostream>
22 #include <vector>
23 #include <map>
24 #include <string>
25 #include <cmath>
26 
27 // Gaudi/Athena include(s):
28 #include "AthenaKernel/CLASS_DEF.h"
33 
34 // Forward declaration(s):
35 class MsgStream;
36 
40  public NavigableTerminalNode,
41  virtual public INavigable4Momentum {
42 
43 public:
44 
47 
49  ~IsoMuonFeature ();
50 
52  IsoMuonFeature ( const IsoMuonFeature* mfeature ) ;
54  IsoMuonFeature ( const IsoMuonFeature& mfeature ) ;
56  IsoMuonFeature& operator=(const IsoMuonFeature& mfeature);
57 
58  // Print out variables for Debug
60  void print ( void );
62  void print ( MsgStream& log );
63 
64  //Ovveride pure virtual methods
65  double pt(void) const {return fabs(m_PtMu); }
66  double ptq(void) const {return fabs(m_QMu)>0?m_PtMu*m_QMu:m_PtMu; }
67  double charge(void) const {return fabs(m_QMu)>0?m_QMu:(m_PtMu>0?1.0:-1.0); }
68  double eta(void) const {return m_EtaMu; }
69  double phi(void) const {return m_PhiMu; }
70  double m(void) const {return 105.658367;}
71 
72  //Setters
74  inline void setCaloInfos(float e01, float e02, float e03, float e04) {
75  m_sumet01 = e01;
76  m_sumet02 = e02;
77  m_sumet03 = e03;
78  m_sumet04 = e04;
79  };
81  inline void setTrackInfos(float p01, float p02, float p03, float p04, float pmu, float pmax) {
82  m_sumpt01 = p01;
83  m_sumpt02 = p02;
84  m_sumpt03 = p03;
85  m_sumpt04 = p04;
86  m_PtMuID = pmu;
87  m_MaxPtID = pmax;
88  };
90  inline void setRoiMu(int id, float pt, float eta, float phi, int fl) {
91  m_RoiIdMu = id;
92  m_PtMu = fabs(pt);
93  if (pt > 0) m_QMu = 1.0;
94  else if (pt < 0) m_QMu = -1.0;
95  else m_QMu = 0.0;
96  m_EtaMu = eta;
97  m_PhiMu = phi;
98  m_flag = fl;
99  };
100  inline void setRoiMu(int id, float pt, float eta, float phi, float charge, int fl) {
101  m_RoiIdMu = id;
102  m_PtMu = fabs(pt);
103  m_QMu = charge;
104  m_EtaMu = eta;
105  m_PhiMu = phi;
106  m_flag = fl;
107  };
108 
109  //Getters
115 
117  inline float getsumpt01 () const { return m_SumPtTracksCone>0?0.0:m_sumpt01; };
118  inline float getsumpt02 () const { return m_SumPtTracksCone>0?m_SumPtTracksCone:m_sumpt02; };
119  inline float getsumpt03 () const { return m_SumPtTracksCone>0?m_SumPtTracksCone:m_sumpt03; };
120  inline float getsumpt04 () const { return m_SumPtTracksCone>0?m_SumPtTracksCone:m_sumpt04; };
121 
123  inline float getPtMuID() const { return m_PtMuTracksCone>0?m_PtMuTracksCone:m_PtMuID; };
125  inline float getMaxPtID() const { return m_MaxPtID; };
126 
127  inline int getFlag() const { return m_flag; };
128 
130  int iso_strategy(void) const;
132  int iso_errorFlag(void) const;
133 
135  inline int getRoiIdMu() const { return m_RoiIdMu; };
137  inline float getPtMu() const { return fabs(m_QMu)>0?m_PtMu*m_QMu:m_PtMu; };
139  inline float getQMu() const { return fabs(m_QMu)>0?m_QMu:(m_PtMu>0?1.0:-1.0); };
141  inline float getEtaMu() const { return m_EtaMu; };
143  inline float getPhiMu() const { return m_PhiMu; };
144 
145  //Obsolete (for backward compatibility)
146  inline float getEtInnerConeEC () const { return fabs(m_EtInnerConeEC)>0?m_EtInnerConeEC:0.0; };
147  inline float getEtOuterConeEC () const { return fabs(m_EtOuterConeEC)>0?m_EtOuterConeEC:m_sumet02; };
148  inline float getEtInnerConeHC () const { return fabs(m_EtInnerConeHC)>0?m_EtInnerConeHC:0.0; };
149  inline float getEtOuterConeHC () const { return fabs(m_EtOuterConeHC)>0?m_EtOuterConeHC:0.0; };
150  inline int getNTracksCone() const { return m_NTracksCone>0?m_NTracksCone%100000:0; };
152  inline float getPtMuTracksCone() const { return m_PtMuTracksCone>0?m_PtMuTracksCone:m_PtMuID; };
153  inline float getLArWeight() const { return m_LAr_w; }
154  inline float getTileWeight() const { return m_Tile_w; }
155 
156 private:
157  friend class IsoMuonFeatureCnv_p1;
158  friend class IsoMuonFeatureCnv_p2;
159  friend class IsoMuonFeatureCnv_p3;
160 
162  float m_sumet01;
163  float m_sumet02;
164  float m_sumet03;
165  float m_sumet04;
166 
168  float m_sumpt01;
169  float m_sumpt02;
170  float m_sumpt03;
171  float m_sumpt04;
172 
174  float m_PtMuID;
176  float m_MaxPtID;
177 
178  int m_flag;
179 
180  // Muon info
184  float m_PtMu;
186  float m_QMu;
188  float m_EtaMu;
190  float m_PhiMu;
191 
192  //obsolete
200  float m_LAr_w;
201  float m_Tile_w;
202 
203 };
204 
206 std::string str( const IsoMuonFeature& d );
208 MsgStream& operator<< ( MsgStream& m, const IsoMuonFeature& d );
209 
211 bool operator== ( const IsoMuonFeature& a, const IsoMuonFeature& b );
213 inline bool operator!= ( const IsoMuonFeature& a, const IsoMuonFeature& b ) {
214  return !( a == b );
215 }
216 
218 void diff( const IsoMuonFeature& a, const IsoMuonFeature& b,
219  std::map< std::string, double >& variableChange );
220 
221 CLASS_DEF( IsoMuonFeature , 110010498 , 1 )
222 CLASS_DEF( DataVector<IsoMuonFeature> , 247013301 , 1 )
223 
224 
225 #endif // TRIGMUONEVENT_ISO_MUON_FEATURE_H
IsoMuonFeature::m_NTracksCone
int m_NTracksCone
Definition: IsoMuonFeature.h:197
IsoMuonFeatureCnv_p2
Definition: IsoMuonFeatureCnv_p2.h:26
IsoMuonFeature::m_EtOuterConeEC
float m_EtOuterConeEC
Definition: IsoMuonFeature.h:194
IsoMuonFeature::getsumet01
float getsumet01() const
Get Transverse Energy sum in cone.
Definition: IsoMuonFeature.h:111
IsoMuonFeature::m_QMu
float m_QMu
Muon Charge.
Definition: IsoMuonFeature.h:186
IsoMuonFeature::getsumet03
float getsumet03() const
Definition: IsoMuonFeature.h:113
IsoMuonFeature::getEtInnerConeEC
float getEtInnerConeEC() const
Definition: IsoMuonFeature.h:146
P4PtEtaPhiMBase.h
IsoMuonFeature::getsumpt02
float getsumpt02() const
Definition: IsoMuonFeature.h:118
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
IsoMuonFeature::getLArWeight
float getLArWeight() const
Definition: IsoMuonFeature.h:153
IsoMuonFeature::iso_strategy
int iso_strategy(void) const
Get Isolation strategy (1->CombinedMuon seeded, 2->muFast Muon seeded, 3->L1 muon seeded)
Definition: IsoMuonFeature.cxx:82
IsoMuonFeature::phi
double phi(void) const
phi in [-pi,pi[
Definition: IsoMuonFeature.h:69
IsoMuonFeature::m_PtMuTracksCone
float m_PtMuTracksCone
Definition: IsoMuonFeature.h:199
INavigable4Momentum.h
hist_file_dump.d
d
Definition: hist_file_dump.py:137
IsoMuonFeature::getNTracksCone
int getNTracksCone() const
Definition: IsoMuonFeature.h:150
IsoMuonFeature::setTrackInfos
void setTrackInfos(float p01, float p02, float p03, float p04, float pmu, float pmax)
Set Tracks infos.
Definition: IsoMuonFeature.h:81
IsoMuonFeature::getTileWeight
float getTileWeight() const
Definition: IsoMuonFeature.h:154
NavigableTerminalNode
Dummy type needed fro specialized implementation.
Definition: NavigableTerminalNode.h:19
IsoMuonFeature::setCaloInfos
void setCaloInfos(float e01, float e02, float e03, float e04)
Set calorimetric infos.
Definition: IsoMuonFeature.h:74
IsoMuonFeature::m_RoiIdMu
int m_RoiIdMu
ROI ID.
Definition: IsoMuonFeature.h:182
IsoMuonFeature::getsumet02
float getsumet02() const
Definition: IsoMuonFeature.h:112
IsoMuonFeature::getPtMu
float getPtMu() const
Get Muon Pt.
Definition: IsoMuonFeature.h:137
IsoMuonFeature::m_sumpt03
float m_sumpt03
Definition: IsoMuonFeature.h:170
IsoMuonFeature::charge
double charge(void) const
Definition: IsoMuonFeature.h:67
IsoMuonFeature::~IsoMuonFeature
~IsoMuonFeature()
Destructor.
Definition: IsoMuonFeature.cxx:56
IsoMuonFeature::getPtMuID
float getPtMuID() const
Get Pt of charged track associated to muon.
Definition: IsoMuonFeature.h:123
IsoMuonFeature::m_sumpt01
float m_sumpt01
Track based isolation.
Definition: IsoMuonFeature.h:168
IsoMuonFeature::m_sumet01
float m_sumet01
Calo based isolation.
Definition: IsoMuonFeature.h:162
operator!=
bool operator!=(const IsoMuonFeature &a, const IsoMuonFeature &b)
Operator comparing two IsoMuonFeature objects for inequality.
Definition: IsoMuonFeature.h:213
IsoMuonFeatureCnv_p3
Definition: IsoMuonFeatureCnv_p3.h:26
IsoMuonFeature::getRoiIdMu
int getRoiIdMu() const
Get Muon RoI Id.
Definition: IsoMuonFeature.h:135
IsoMuonFeature::m_flag
int m_flag
Definition: IsoMuonFeature.h:178
IsoMuonFeature::getEtaMu
float getEtaMu() const
Get Muon Eta.
Definition: IsoMuonFeature.h:141
IsoMuonFeature::setRoiMu
void setRoiMu(int id, float pt, float eta, float phi, float charge, int fl)
Definition: IsoMuonFeature.h:100
IsoMuonFeature::m_PhiMu
float m_PhiMu
Muon Phi.
Definition: IsoMuonFeature.h:190
IsoMuonFeature::m_EtaMu
float m_EtaMu
Muon Eta.
Definition: IsoMuonFeature.h:188
IsoMuonFeature::getSumPtTracksCone
float getSumPtTracksCone() const
Definition: IsoMuonFeature.h:151
IsoMuonFeature::ptq
double ptq(void) const
Definition: IsoMuonFeature.h:66
diff
void diff(const IsoMuonFeature &a, const IsoMuonFeature &b, std::map< std::string, double > &variableChange)
Comparison with feedback.
Definition: IsoMuonFeature.cxx:264
IsoMuonFeature::getPtMuTracksCone
float getPtMuTracksCone() const
Definition: IsoMuonFeature.h:152
IsoMuonFeature::setRoiMu
void setRoiMu(int id, float pt, float eta, float phi, int fl)
Set Muon Roi.
Definition: IsoMuonFeature.h:90
operator<<
MsgStream & operator<<(MsgStream &m, const IsoMuonFeature &d)
Helper operator for printing the object.
Definition: IsoMuonFeature.cxx:212
IsoMuonFeature::getPhiMu
float getPhiMu() const
Get Muon Phi.
Definition: IsoMuonFeature.h:143
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
IsoMuonFeature::m
double m(void) const
mass
Definition: IsoMuonFeature.h:70
IsoMuonFeature::m_sumet02
float m_sumet02
Definition: IsoMuonFeature.h:163
IsoMuonFeature::m_Tile_w
float m_Tile_w
Definition: IsoMuonFeature.h:201
IsoMuonFeature::print
void print(void)
Prints out cluster variables to std::cout.
Definition: IsoMuonFeature.cxx:145
IsoMuonFeature::operator=
IsoMuonFeature & operator=(const IsoMuonFeature &mfeature)
Assignement operator.
Definition: IsoMuonFeature.cxx:60
IsoMuonFeature::m_sumpt02
float m_sumpt02
Definition: IsoMuonFeature.h:169
P4PtEtaPhiMBase
Definition: P4PtEtaPhiMBase.h:26
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
NavigableTerminalNode.h
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
IsoMuonFeature::getEtOuterConeEC
float getEtOuterConeEC() const
Definition: IsoMuonFeature.h:147
IsoMuonFeature::m_MaxPtID
float m_MaxPtID
pt of highest pt track in cone (excluded the one associated to the muon)
Definition: IsoMuonFeature.h:176
IsoMuonFeature::getsumpt04
float getsumpt04() const
Definition: IsoMuonFeature.h:120
IsoMuonFeature
Class with isolation variables for TrigmuIso algorithm.
Definition: IsoMuonFeature.h:41
IsoMuonFeature::m_sumet04
float m_sumet04
Definition: IsoMuonFeature.h:165
IsoMuonFeature::iso_errorFlag
int iso_errorFlag(void) const
Get Error Flag.
Definition: IsoMuonFeature.cxx:91
IsoMuonFeature::m_PtMu
float m_PtMu
Muon Pt.
Definition: IsoMuonFeature.h:184
IsoMuonFeature::m_EtInnerConeEC
float m_EtInnerConeEC
Definition: IsoMuonFeature.h:193
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
IsoMuonFeature::getsumpt01
float getsumpt01() const
Get Transverse Pt sum in cone.
Definition: IsoMuonFeature.h:117
a
TList * a
Definition: liststreamerinfos.cxx:10
IsoMuonFeature::getEtInnerConeHC
float getEtInnerConeHC() const
Definition: IsoMuonFeature.h:148
IsoMuonFeature::m_SumPtTracksCone
float m_SumPtTracksCone
Definition: IsoMuonFeature.h:198
IsoMuonFeature::m_sumet03
float m_sumet03
Definition: IsoMuonFeature.h:164
IsoMuonFeature::m_sumpt04
float m_sumpt04
Definition: IsoMuonFeature.h:171
IsoMuonFeature::m_EtInnerConeHC
float m_EtInnerConeHC
Definition: IsoMuonFeature.h:195
IsoMuonFeatureCnv_p1
Definition: IsoMuonFeatureCnv_p1.h:26
INavigable4Momentum
Definition: INavigable4Momentum.h:21
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
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
IsoMuonFeature::m_LAr_w
float m_LAr_w
Definition: IsoMuonFeature.h:200
IsoMuonFeature::getMaxPtID
float getMaxPtID() const
Get Pt of max pt ID track in cone (muon excluded)
Definition: IsoMuonFeature.h:125
IsoMuonFeature::IsoMuonFeature
IsoMuonFeature()
Constructor.
Definition: IsoMuonFeature.cxx:29
IsoMuonFeature::getsumpt03
float getsumpt03() const
Definition: IsoMuonFeature.h:119
IsoMuonFeature::getEtOuterConeHC
float getEtOuterConeHC() const
Definition: IsoMuonFeature.h:149
operator==
bool operator==(const IsoMuonFeature &a, const IsoMuonFeature &b)
Operator comparing two IsoMuonFeature objects for equality.
Definition: IsoMuonFeature.cxx:217
IsoMuonFeature::getsumet04
float getsumet04() const
Definition: IsoMuonFeature.h:114
IsoMuonFeature::eta
double eta(void) const
pseudo rapidity
Definition: IsoMuonFeature.h:68
CLASS_DEF.h
macros to associate a CLID to a type
IsoMuonFeature::m_PtMuID
float m_PtMuID
Pt of charged track associated to the muon.
Definition: IsoMuonFeature.h:174
IsoMuonFeature::getFlag
int getFlag() const
Definition: IsoMuonFeature.h:127
IsoMuonFeature::pt
double pt(void) const
transverse momentum
Definition: IsoMuonFeature.h:65
IsoMuonFeature::getQMu
float getQMu() const
Get Muon Q.
Definition: IsoMuonFeature.h:139
IsoMuonFeature::m_EtOuterConeHC
float m_EtOuterConeHC
Definition: IsoMuonFeature.h:196
str
std::string str(const IsoMuonFeature &d)
Helper function for printing the object.
Definition: IsoMuonFeature.cxx:189