88#include < iomanip>
99
1010#include " DataFormats/MuonDetId/interface/GEMDetId.h"
11- #include " DataFormats/GEMDigi /interface/ME0StubPrimitive.h"
11+ #include " L1Trigger/L1TGEM /interface/ME0StubPrimitive.h"
1212
1313class ME0Stub final {
1414public:
15- ME0Stub () : detId(), etaPartition(0 ), padStrip(0 ), bending_angle(0 ),
16- layercount (0 ), quality(0 ), patternId(0 ), bx(0 ) {}
17- ME0Stub (const GEMDetId& id,
18- const ME0StubPrimitive& stub)
19- : detId(id), etaPartition(stub.EtaPartition()), padStrip(stub.Strip()+stub.SubStrip()),
20- bending_angle(stub.BendingAngle()), layercount(stub.LayerCount()),
21- quality(stub.Quality()), patternId(stub.PatternId()), bx(stub.BX()) {}
22- ME0Stub (const GEMDetId& id,
23- int etaPartition_,
24- double padStrip_,
25- double bending_angle_,
26- int layercount_,
27- int quality_,
28- int patternId_,
29- double bx_)
30- : detId(id), etaPartition(etaPartition_), padStrip(padStrip_), bending_angle(bending_angle_),
31- layercount(layercount_), quality(quality_), patternId(patternId_), bx(bx_) {}
15+ ME0Stub () : detId(), etaPartition(0 ), padStrip(0 ), bending_angle(0 ), layercount(0 ), quality(0 ), patternId(0 ), bx(0 ) {}
16+ ME0Stub (const GEMDetId& id, const ME0StubPrimitive& stub)
17+ : detId(id),
18+ etaPartition (stub.EtaPartition()),
19+ padStrip(stub.Strip() + stub.SubStrip()),
20+ bending_angle(stub.BendingAngle()),
21+ layercount(stub.LayerCount()),
22+ quality(stub.Quality()),
23+ patternId(stub.PatternId()),
24+ bx(stub.BX()) {}
25+ ME0Stub (const GEMDetId& id,
26+ int etaPartition_,
27+ double padStrip_,
28+ double bending_angle_,
29+ int layercount_,
30+ int quality_,
31+ int patternId_,
32+ double bx_)
33+ : detId(id),
34+ etaPartition(etaPartition_),
35+ padStrip(padStrip_),
36+ bending_angle(bending_angle_),
37+ layercount(layercount_),
38+ quality(quality_),
39+ patternId(patternId_),
40+ bx(bx_) {}
3241
33- // clone
34- ME0Stub* clone () const { return new ME0Stub (*this ); }
42+ // clone
43+ ME0Stub* clone () const { return new ME0Stub (*this ); }
3544
36- // Get private variable
37- GEMDetId DetId () const {return detId;}
38- int EtaPartition () const {return etaPartition;}
39- double Strip () const {return padStrip;}
40- double BendingAngle () const {return bending_angle;}
41- int LayerCount () const {return layercount;}
42- int Quality () const {return quality;}
43- int PatternId () const {return patternId;}
44- double BX () const {return bx;}
45-
46- // operators
47- bool operator ==(const ME0Stub& other) {
48- if (layercount == 0 && other.layercount == 0 ) {return true ;}
49- return (quality == other.quality );
50- }
51- bool operator >(const ME0Stub& other) {return (quality > other.quality );}
52- bool operator <(const ME0Stub& other) {return (quality < other.quality );}
53- bool operator >=(const ME0Stub& other) {return (quality >= other.quality );}
54- bool operator <=(const ME0Stub& other) {return (quality <= other.quality );}
55- // ostream
56- friend std::ostream& operator <<(std::ostream& os, const ME0Stub& stub) {
57- os << " id=" << stub.PatternId () << " , lc=" << stub.LayerCount ()
58- << " , strip=" << std::fixed << std::setprecision (3 ) << stub.Strip () << " , prt=" << stub.EtaPartition ()
59- << " , quality=" << stub.Quality ();
60- return os;
45+ // Get private variable
46+ GEMDetId DetId () const { return detId; }
47+ int EtaPartition () const { return etaPartition; }
48+ double Strip () const { return padStrip; }
49+ double BendingAngle () const { return bending_angle; }
50+ int LayerCount () const { return layercount; }
51+ int Quality () const { return quality; }
52+ int PatternId () const { return patternId; }
53+ double BX () const { return bx; }
54+
55+ // operators
56+ bool operator ==(const ME0Stub& other) {
57+ if (layercount == 0 && other.layercount == 0 ) {
58+ return true ;
6159 }
60+ return (quality == other.quality );
61+ }
62+ bool operator >(const ME0Stub& other) { return (quality > other.quality ); }
63+ bool operator <(const ME0Stub& other) { return (quality < other.quality ); }
64+ bool operator >=(const ME0Stub& other) { return (quality >= other.quality ); }
65+ bool operator <=(const ME0Stub& other) { return (quality <= other.quality ); }
66+ // ostream
67+ friend std::ostream& operator <<(std::ostream& os, const ME0Stub& stub) {
68+ os << " id=" << stub.PatternId () << " , lc=" << stub.LayerCount () << " , strip=" << std::fixed << std::setprecision (3 )
69+ << stub.Strip () << " , prt=" << stub.EtaPartition () << " , quality=" << stub.Quality ();
70+ return os;
71+ }
72+
6273private:
63- GEMDetId detId;
64- int etaPartition;
65- double padStrip;
66- double bending_angle;
67- int layercount;
68- int quality;
69- int patternId;
70- double bx;
74+ GEMDetId detId;
75+ int etaPartition;
76+ double padStrip;
77+ double bending_angle;
78+ int layercount;
79+ int quality;
80+ int patternId;
81+ double bx;
7182};
7283
7384#endif
0 commit comments