ATLAS Offline Software
Loading...
Searching...
No Matches
TrigMuonEFInfo.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_TRIGMUONEFINFO_H
8#define TRIGMUONEVENT_TRIGMUONEFINFO_H
9
10// STL include(s):
11#include <map>
12#include <string>
13
14// Gaudi/Athena include(s):
16
17// Forward declaration(s):
18class MsgStream;
19class TrigMuonEFTrack;
23
25
26 enum{nRoINumDefault=999};
27
28public:
29
32
33
34 TrigMuonEFInfo( unsigned short int theRoI );
35
36 TrigMuonEFInfo( unsigned short int theRoI,
37 std::unique_ptr<TrigMuonEFInfoTrackContainer> tracks);
38
40 TrigMuonEFInfo( unsigned short int theRoI,
41 std::unique_ptr<TrigMuonEFInfoTrackContainer> tracks,
42 std::unique_ptr<TrigMuonEFTrack> spectrometerTrack,
43 std::unique_ptr<TrigMuonEFTrack> extrapolatedTrack,
44 std::unique_ptr<TrigMuonEFCbTrack> combinedTrack);
45
47 TrigMuonEFInfo( const TrigMuonEFInfo& rhs );
48
51
54
57
58 // the check on pointers should be the best way to check.
59 // Anyway right now the tracks are created, empty, in the constructor.
60 // So here the check is if the track has been set once at least.
61 //
62 bool hasTrack() const;
63
64 // legacy methods
65 bool hasSpectrometerTrack() const ;
66 bool hasExtrapolatedTrack() const ;
67 bool hasCombinedTrack() const ;
68
69
70 /* set methods */
71 void setRoINum( unsigned short int theRoINum );
72 void setNSegments( unsigned short int theNSegments );
73 void setNMdtHits( unsigned short int theNMdtHits );
74 void setNRpcHits( unsigned short int theNRpcHits );
75 void setNTgcHits( unsigned short int theNTgcHits );
76 void setNCscHits( unsigned short int theNCscHits );
77 void setEtaPreviousLevel( double theEtaPreviousLevel );
78 void setPhiPreviousLevel( double thePhiPreviousLevel );
79 void addTrack(TrigMuonEFInfoTrack* track);
80 // legacy methods
84
85 /* get methods */
86 unsigned short int RoINum() const { return m_roi; }
87 unsigned short int NSegments() const { return m_nSegments; }
88 unsigned short int NMdtHits() const { return m_nMdtHits; }
89 unsigned short int NRpcHits() const { return m_nRpcHits; }
90 unsigned short int NTgcHits() const { return m_nTgcHits; }
91 unsigned short int NCscHits() const { return m_nCscHits; }
92 double EtaPreviousLevel() const { return m_etaPreviousLevel; }
93 double PhiPreviousLevel() const { return m_phiPreviousLevel; }
95 // legacy methods
99 // legacy methods with const correctness for comparison operator
103
104 // checks existence of legacy track
105 bool hasLegacyTrack() const;
106
107
108private:
109
110 unsigned short int m_roi;
111 unsigned short int m_nSegments;
112 unsigned short int m_nMdtHits;
113 unsigned short int m_nRpcHits;
114 unsigned short int m_nTgcHits;
115 unsigned short int m_nCscHits;
118
120
121 // these objects are kept here for backward compatibility.
122 // the are not used.
126
127};
128
129
131std::string str( const TrigMuonEFInfo& d );
133MsgStream& operator<< ( MsgStream& m, const TrigMuonEFInfo& d );
134
136bool operator== ( const TrigMuonEFInfo& a, const TrigMuonEFInfo& b );
138inline bool operator!= ( const TrigMuonEFInfo& a, const TrigMuonEFInfo& b ) {
139 return !( a == b );
140}
141
143void diff( const TrigMuonEFInfo& a, const TrigMuonEFInfo& b,
144 std::map< std::string, double >& variableChange );
145
146CLASS_DEF( TrigMuonEFInfo , 180322828 , 1 )
147
148#endif // TRIGMUONEVENT_TRIGMUONEFINFO_H
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
static Double_t a
MsgStream & operator<<(MsgStream &m, const TrigMuonEFInfo &d)
Helper operator for printing the object.
void diff(const TrigMuonEFInfo &a, const TrigMuonEFInfo &b, std::map< std::string, double > &variableChange)
Comparison with feedback.
bool operator!=(const TrigMuonEFInfo &a, const TrigMuonEFInfo &b)
Operator comparing two TrigMuonEFInfo objects for inequality.
bool operator==(const TrigMuonEFInfo &a, const TrigMuonEFInfo &b)
Operator comparing two TrigMuonEFInfo objects for equality.
void setNMdtHits(unsigned short int theNMdtHits)
TrigMuonEFCbTrack * CombinedTrack()
bool hasExtrapolatedTrack() const
void setExtrapolatedTrack(TrigMuonEFTrack *track)
unsigned short int NTgcHits() const
void addTrack(TrigMuonEFInfoTrack *track)
void setNRpcHits(unsigned short int theNRpcHits)
TrigMuonEFTrack * SpectrometerTrack()
void setRoINum(unsigned short int theRoINum)
bool hasSpectrometerTrack() const
~TrigMuonEFInfo()
Destructor.
unsigned short int NCscHits() const
unsigned short int NMdtHits() const
bool hasLegacyTrack() const
unsigned short int NRpcHits() const
TrigMuonEFCbTrack * m_combinedTrack
void setPhiPreviousLevel(double thePhiPreviousLevel)
TrigMuonEFInfo & operator=(const TrigMuonEFInfo &rhs)
Assignment operator.
void setNSegments(unsigned short int theNSegments)
unsigned short int m_nRpcHits
double m_etaPreviousLevel
unsigned short int RoINum() const
const TrigMuonEFInfoTrackContainer * TrackContainer() const
void setEtaPreviousLevel(double theEtaPreviousLevel)
bool hasCombinedTrack() const
unsigned short int m_nCscHits
const TrigMuonEFTrack * legacyExtrapolatedTrack() const
unsigned short int m_roi
TrigMuonEFTrack * m_extrapolatedTrack
unsigned short int NSegments() const
bool hasTrack() const
unsigned short int m_nMdtHits
void setCombinedTrack(TrigMuonEFCbTrack *track)
void setNTgcHits(unsigned short int theNTgcHits)
double EtaPreviousLevel() const
unsigned short int m_nSegments
const TrigMuonEFTrack * legacySpectrometerTrack() const
TrigMuonEFInfoTrackContainer * m_trackContainer
TrigMuonEFTrack * m_spectrometerTrack
unsigned short int m_nTgcHits
void setNCscHits(unsigned short int theNCscHits)
double PhiPreviousLevel() const
const TrigMuonEFCbTrack * legacyCombinedTrack() const
double m_phiPreviousLevel
TrigMuonEFInfo()
Default constructor.
void setSpectrometerTrack(TrigMuonEFTrack *track)
TrigMuonEFTrack * ExtrapolatedTrack()