ATLAS Offline Software
CombinedMuonFeature.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef TRIGMUONEVENT_COMBINED_MUON_FEATURE_H
8 #define TRIGMUONEVENT_COMBINED_MUON_FEATURE_H
9 
10 // Gaudi/Athena include(s):
11 #include "AthenaKernel/CLASS_DEF.h"
16 #include "AthLinks/ElementLink.h"
17 
18 // STL include(s):
19 #include <vector>
20 #include <stdint.h>
21 #include <map>
22 #include <string>
23 
24 // Trigger include(s):
27 
29  public NavigableTerminalNode,
30  virtual public INavigable4Momentum {
31 
32 public:
34  CombinedMuonFeature(float ptsigned, float sigma_pt,
35  const ElementLink< MuonFeatureContainer>& muFastOutput,
36  const ElementLink< TrigInDetTrackCollection>& IdscanOutput);
37 
38  CombinedMuonFeature(float ptsigned, float sigma_pt, int fs, int fe, int fm,
39  const ElementLink< MuonFeatureContainer>& muFastOutput,
40  const ElementLink< TrigInDetTrackCollection>& IdscanOutput);
41 
42  CombinedMuonFeature(float pt, float sigma_pt, float q, int fs, int fe, int fm,
43  const ElementLink< MuonFeatureContainer>& muFastOutput,
44  const ElementLink< TrigInDetTrackCollection>& IdscanOutput);
45 
46  CombinedMuonFeature(float pt, float sigma_pt, float q, int flag,
47  const ElementLink< MuonFeatureContainer>& muFastOutput,
48  const ElementLink< TrigInDetTrackCollection>& IdscanOutput);
49 
50  CombinedMuonFeature(const CombinedMuonFeature* muon_feature);
51  CombinedMuonFeature(const CombinedMuonFeature& muon_feature);
52 
53 public:
55 
56  double pt(void) const {return fabs(m_pt);}
57  double charge(void) const {return fabs(m_charge)>0?m_charge:(m_pt>0?1.0:-1.0);}
58  double ptq(void) const {return fabs(m_charge)>0?m_pt*m_charge:m_pt;}
59  double sigma_pt(void) const;
60  double sigma_pt_raw(void) const { return m_sigma_pt; }
61  int comb_strategy(void) const;
62  int comb_errorFlag(void) const;
63  int comb_matchFlag(void) const;
64  int getFlag(void) const { return m_flag; }
65  const MuonFeature* muFastTrack(void) const {return m_muFastTrack.isValid() ? *m_muFastTrack : 0;}
66  const TrigInDetTrack* IDTrack(void) const {return m_IDTrack.isValid() ? *m_IDTrack : 0;}
69 
70  double eta(void) const;
71  double phi(void) const;
72  double m(void) const {return 105.658367;}
73 
74 
75 private:
76  float m_pt;
77  float m_sigma_pt;
78  float m_charge;
79  int m_flag;
82 };
83 
85 std::string str( const CombinedMuonFeature& d );
87 MsgStream& operator<< ( MsgStream& m, const CombinedMuonFeature& d );
88 
92 inline bool operator!= ( const CombinedMuonFeature& a, const CombinedMuonFeature& b ) {
93  return !( a == b );
94 }
95 
97 void diff( const CombinedMuonFeature& a, const CombinedMuonFeature& b,
98  std::map< std::string, double >& variableChange );
99 
101 CLASS_DEF( DataVector<CombinedMuonFeature> , 225396276 , 1 )
102 
103 #include "TrigMuonEvent/CombinedMuonFeatureContainer.h"
104 
105 #endif // TRIGMUONEVENT_COMBINED_MUON_FEATURE_H
CombinedMuonFeature::comb_strategy
int comb_strategy(void) const
Definition: CombinedMuonFeature.cxx:97
CombinedMuonFeature::charge
double charge(void) const
Definition: CombinedMuonFeature.h:57
P4PtEtaPhiMBase.h
CombinedMuonFeature::operator=
CombinedMuonFeature & operator=(const CombinedMuonFeature &muon_feature)
Definition: CombinedMuonFeature.cxx:152
operator!=
bool operator!=(const CombinedMuonFeature &a, const CombinedMuonFeature &b)
Operator comparing two CombinedMuonFeature objects for inequality.
Definition: CombinedMuonFeature.h:92
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
CombinedMuonFeature::m_IDTrack
ElementLink< TrigInDetTrackCollection > m_IDTrack
Definition: CombinedMuonFeature.h:81
INavigable4Momentum.h
CombinedMuonFeature::eta
double eta(void) const
pseudo rapidity
Definition: CombinedMuonFeature.cxx:163
hist_file_dump.d
d
Definition: hist_file_dump.py:137
diff
void diff(const CombinedMuonFeature &a, const CombinedMuonFeature &b, std::map< std::string, double > &variableChange)
Comparison with feedback.
Definition: CombinedMuonFeature.cxx:212
CombinedMuonFeature::getFlag
int getFlag(void) const
Definition: CombinedMuonFeature.h:64
NavigableTerminalNode
Dummy type needed fro specialized implementation.
Definition: NavigableTerminalNode.h:19
CombinedMuonFeature::pt
double pt(void) const
transverse momentum
Definition: CombinedMuonFeature.h:56
CombinedMuonFeature::CombinedMuonFeature
CombinedMuonFeature()
Definition: CombinedMuonFeature.cxx:21
TrigInDetTrackCollection.h
CombinedMuonFeature::sigma_pt
double sigma_pt(void) const
Definition: CombinedMuonFeature.cxx:84
CombinedMuonFeature::m
double m(void) const
mass
Definition: CombinedMuonFeature.h:72
TrigInDetTrack
Definition: TrigInDetTrack.h:34
CombinedMuonFeature::IDTrackLink
const ElementLink< TrigInDetTrackCollection > & IDTrackLink(void) const
Definition: CombinedMuonFeature.h:68
CombinedMuonFeature::m_flag
int m_flag
Definition: CombinedMuonFeature.h:79
CombinedMuonFeature::ptq
double ptq(void) const
Definition: CombinedMuonFeature.h:58
master.flag
bool flag
Definition: master.py:29
CombinedMuonFeature::m_muFastTrack
ElementLink< MuonFeatureContainer > m_muFastTrack
Definition: CombinedMuonFeature.h:80
CombinedMuonFeature::m_charge
float m_charge
Definition: CombinedMuonFeature.h:78
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
CombinedMuonFeature
Definition: CombinedMuonFeature.h:30
CombinedMuonFeature::m_pt
float m_pt
Definition: CombinedMuonFeature.h:76
operator==
bool operator==(const CombinedMuonFeature &a, const CombinedMuonFeature &b)
Operator comparing two CombinedMuonFeature objects for equality.
Definition: CombinedMuonFeature.cxx:191
MuonFeature
Definition: MuonFeature.h:21
MuonFeatureContainer.h
P4PtEtaPhiMBase
Definition: P4PtEtaPhiMBase.h:26
CombinedMuonFeature::muFastTrack
const MuonFeature * muFastTrack(void) const
Definition: CombinedMuonFeature.h:65
NavigableTerminalNode.h
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
CombinedMuonFeature::IDTrack
const TrigInDetTrack * IDTrack(void) const
Definition: CombinedMuonFeature.h:66
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
a
TList * a
Definition: liststreamerinfos.cxx:10
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
CombinedMuonFeature::comb_errorFlag
int comb_errorFlag(void) const
Definition: CombinedMuonFeature.cxx:108
Herwig7_QED_EvtGen_ll.fs
dictionary fs
Definition: Herwig7_QED_EvtGen_ll.py:17
extractSporadic.q
list q
Definition: extractSporadic.py:98
CombinedMuonFeature::comb_matchFlag
int comb_matchFlag(void) const
Definition: CombinedMuonFeature.cxx:114
str
std::string str(const CombinedMuonFeature &d)
Helper function for printing the object.
Definition: CombinedMuonFeature.cxx:174
CombinedMuonFeature::muFastTrackLink
const ElementLink< MuonFeatureContainer > & muFastTrackLink(void) const
Definition: CombinedMuonFeature.h:67
CombinedMuonFeature::sigma_pt_raw
double sigma_pt_raw(void) const
Definition: CombinedMuonFeature.h:60
CombinedMuonFeature::phi
double phi(void) const
phi in [-pi,pi[
Definition: CombinedMuonFeature.cxx:167
CLASS_DEF.h
macros to associate a CLID to a type
operator<<
MsgStream & operator<<(MsgStream &m, const CombinedMuonFeature &d)
Helper operator for printing the object.
Definition: CombinedMuonFeature.cxx:186
CombinedMuonFeature::m_sigma_pt
float m_sigma_pt
Definition: CombinedMuonFeature.h:77