ATLAS Offline Software
Loading...
Searching...
No Matches
CMAtrigger.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8
10 bool overlap,float width, const CMApatterns* patterns,
11 const RPCdigit* trigger_hit[3]) :
12 RPCtrigDataObject(patterns->number(),"CMA result"),
13 m_emulation(emulation),m_trigger(type,thres,overlap),
14 m_trigger_width(width),m_Kpatt(0),
15 m_cma_patterns(patterns),m_pivot_hit(trigger_hit[0]),
16 m_lowPt_hit(trigger_hit[1]),m_highPt_hit(trigger_hit[2])
17{}
18
19
28
29
37
38
48
49
52{
53 static_cast<RPCtrigDataObject&>(*this) =
54 static_cast<const RPCtrigDataObject&>(cmaTrig);
55 m_emulation = cmaTrig.emulation();
56 m_trigger = cmaTrig.trigger();
58 m_Kpatt = cmaTrig.Kpatt();
59 m_cma_patterns = cmaTrig.patterns();
60 m_pivot_hit = cmaTrig.pivot_hit();
61 m_lowPt_hit = cmaTrig.lowPt_hit();
62 m_highPt_hit = cmaTrig.highPt_hit();
63
64 return *this;
65}
66
67void
69{
70 if( m_emulation != cmaTrig.emulation() ) return;
71
72 if( *this < cmaTrig )
73 {
74 m_trigger = cmaTrig.trigger();
76 m_Kpatt = cmaTrig.Kpatt();
77 m_cma_patterns = cmaTrig.patterns();
78 if(cmaTrig.pivot_hit()) m_pivot_hit = cmaTrig.pivot_hit();
79 if(cmaTrig.lowPt_hit()) m_lowPt_hit = cmaTrig.lowPt_hit();
80 if(cmaTrig.highPt_hit()) m_highPt_hit = cmaTrig.highPt_hit();
81 }
82}
83
84
85bool
87{
88 if( m_cma_patterns == cmaTrig.patterns() &&
89 m_emulation == cmaTrig.emulation() &&
90 m_trigger == cmaTrig.trigger() &&
91 m_trigger_width == cmaTrig.trigger_width() &&
92 m_Kpatt == cmaTrig.Kpatt() &&
93 m_pivot_hit == cmaTrig.pivot_hit() &&
94 m_lowPt_hit == cmaTrig.lowPt_hit() &&
95 m_highPt_hit == cmaTrig.highPt_hit() )
96 {
97 return true;
98 }
99 return false;
100}
101
102bool
104{
105 return !(*this == cmaTrig);
106}
107
108bool
109CMAtrigger::operator< (const CMAtrigger& cmaTrig) const
110{
111 if ( m_trigger < cmaTrig.trigger() ) return true;
112 if ( m_trigger == cmaTrig.trigger() &&
113 m_trigger_width < cmaTrig.trigger_width()) return true;
114 return false;
115}
116
117int
119{
120 return m_cma_patterns->sector();
121}
122
123const CMAidentity&
125{
126 return m_cma_patterns->cma_parameters().id();
127}
128
129void
131{
132 m_Kpatt = Kpatt;
133}
134
135void
137{
139}
140
141void
143{
144 m_pivot_hit = digit;
145}
146
147void
149{
150 m_lowPt_hit = digit;
151}
152
153void
155{
156 m_highPt_hit = digit;
157}
158
159void
160CMAtrigger::Print(std::ostream& stream,bool detail) const
161{
162 stream << m_trigger << std::endl;
163 if(detail)
164 {
165 m_cma_patterns->Print(stream,false);
166 if(m_lowPt_hit)
167 {
168 stream << "Low Pt trigger digits:" << std::endl;
169 stream << *m_lowPt_hit << std::endl;
170 }
171 if(m_pivot_hit)
172 {
173 stream << "Pivot trigger digits:" << std::endl;
174 stream << *m_pivot_hit << std::endl;
175 }
176 if(m_highPt_hit)
177 {
178 stream << "High Pt trigger digits:" << std::endl;
179 stream << *m_highPt_hit << std::endl;
180 }
181 }
182
183}
Lvl1RPCalgo
Definition CMAtrigger.h:20
TrigType
Threshold
const double width
const std::string & name() const
Definition BaseObject.h:23
const RPCdigit * lowPt_hit(void) const
Definition CMAtrigger.h:60
const CMApatterns * patterns(void) const
Definition CMAtrigger.h:58
bool operator==(const CMAtrigger &) const
float m_trigger_width
Definition CMAtrigger.h:27
int Kpatt(void) const
Definition CMAtrigger.h:63
void operator+=(const CMAtrigger &)
const CMApatterns * m_cma_patterns
Definition CMAtrigger.h:29
const CMAidentity & cma(void) const
float trigger_width(void) const
Definition CMAtrigger.h:62
void set_pivot(const RPCdigit *)
bool operator!=(const CMAtrigger &) const
void Print(std::ostream &, bool) const
void set_highPt(const RPCdigit *)
friend class CMApatterns
Definition CMAtrigger.h:69
void set_Kpatt(int Kpatt)
Lvl1RPCalgo m_emulation
Definition CMAtrigger.h:25
const RPCdigit * m_pivot_hit
Definition CMAtrigger.h:30
const RPCdigit * m_highPt_hit
Definition CMAtrigger.h:32
const RPCdigit * highPt_hit(void) const
Definition CMAtrigger.h:61
int sector(void) const
void set_width(const float width)
TRIGGERidentity m_trigger
Definition CMAtrigger.h:26
const RPCdigit * m_lowPt_hit
Definition CMAtrigger.h:31
Lvl1RPCalgo emulation(void) const
Definition CMAtrigger.h:56
CMAtrigger(Lvl1RPCalgo, TrigType, Threshold, bool, float width, const CMApatterns *, const RPCdigit **)
void set_lowPt(const RPCdigit *)
CMAtrigger operator=(const CMAtrigger &)
bool operator<(const CMAtrigger &) const
const RPCdigit * pivot_hit(void) const
Definition CMAtrigger.h:59
const TRIGGERidentity & trigger(void) const
Definition CMAtrigger.h:57
int number(void) const
RPCtrigDataObject(int, const std::string &)
std::vector< std::string > patterns
Definition listroot.cxx:187
std::string number(const double &d, const std::string &s)
Definition utils.cxx:186