|
11 | 11 | #include "DataFormats/TrackingRecHit/interface/RecHit2DLocalPos.h" |
12 | 12 | #include "DataFormats/MuonDetId/interface/RPCDetId.h" |
13 | 13 |
|
14 | | -class RPCRecHit : public RecHit2DLocalPos { |
15 | | -public: |
16 | | - RPCRecHit(const RPCDetId& rpcId, int bx); |
| 14 | +namespace io_v1 { |
| 15 | + class RPCRecHit : public RecHit2DLocalPos { |
| 16 | + public: |
| 17 | + RPCRecHit(const RPCDetId& rpcId, int bx); |
17 | 18 |
|
18 | | - /// Default constructor |
19 | | - RPCRecHit(); |
| 19 | + /// Default constructor |
| 20 | + RPCRecHit(); |
20 | 21 |
|
21 | | - /// Constructor from a local position, rpcId and digi time. |
22 | | - /// The 3-dimensional local error is defined as |
23 | | - /// resolution (the cell resolution) for the coordinate being measured |
24 | | - /// and 0 for the two other coordinates |
25 | | - RPCRecHit(const RPCDetId& rpcId, int bx, const LocalPoint& pos); |
| 22 | + /// Constructor from a local position, rpcId and digi time. |
| 23 | + /// The 3-dimensional local error is defined as |
| 24 | + /// resolution (the cell resolution) for the coordinate being measured |
| 25 | + /// and 0 for the two other coordinates |
| 26 | + RPCRecHit(const RPCDetId& rpcId, int bx, const LocalPoint& pos); |
26 | 27 |
|
27 | | - /// Constructor from a local position and error, rpcId and bx. |
28 | | - RPCRecHit(const RPCDetId& rpcId, int bx, const LocalPoint& pos, const LocalError& err); |
| 28 | + /// Constructor from a local position and error, rpcId and bx. |
| 29 | + RPCRecHit(const RPCDetId& rpcId, int bx, const LocalPoint& pos, const LocalError& err); |
29 | 30 |
|
30 | | - /// Constructor from a local position and error, rpcId, bx, frist strip of cluster and cluster size. |
31 | | - RPCRecHit(const RPCDetId& rpcId, int bx, int firstStrip, int clustSize, const LocalPoint& pos, const LocalError& err); |
| 31 | + /// Constructor from a local position and error, rpcId, bx, frist strip of cluster and cluster size. |
| 32 | + RPCRecHit( |
| 33 | + const RPCDetId& rpcId, int bx, int firstStrip, int clustSize, const LocalPoint& pos, const LocalError& err); |
32 | 34 |
|
33 | | - /// Destructor |
34 | | - ~RPCRecHit() override; |
| 35 | + /// Destructor |
| 36 | + ~RPCRecHit() override; |
35 | 37 |
|
36 | | - /// Return the 3-dimensional local position |
37 | | - LocalPoint localPosition() const override { return theLocalPosition; } |
| 38 | + /// Return the 3-dimensional local position |
| 39 | + LocalPoint localPosition() const override { return theLocalPosition; } |
38 | 40 |
|
39 | | - /// Return the 3-dimensional error on the local position |
40 | | - LocalError localPositionError() const override { return theLocalError; } |
| 41 | + /// Return the 3-dimensional error on the local position |
| 42 | + LocalError localPositionError() const override { return theLocalError; } |
41 | 43 |
|
42 | | - RPCRecHit* clone() const override; |
| 44 | + RPCRecHit* clone() const override; |
43 | 45 |
|
44 | | - /// Access to component RecHits. |
45 | | - /// No components rechits: it returns a null vector |
46 | | - std::vector<const TrackingRecHit*> recHits() const override; |
| 46 | + /// Access to component RecHits. |
| 47 | + /// No components rechits: it returns a null vector |
| 48 | + std::vector<const TrackingRecHit*> recHits() const override; |
47 | 49 |
|
48 | | - /// Non-const access to component RecHits. |
49 | | - /// No components rechits: it returns a null vector |
50 | | - std::vector<TrackingRecHit*> recHits() override; |
| 50 | + /// Non-const access to component RecHits. |
| 51 | + /// No components rechits: it returns a null vector |
| 52 | + std::vector<TrackingRecHit*> recHits() override; |
51 | 53 |
|
52 | | - /// Set local position |
53 | | - void setPosition(LocalPoint pos) { theLocalPosition = pos; } |
| 54 | + /// Set local position |
| 55 | + void setPosition(LocalPoint pos) { theLocalPosition = pos; } |
54 | 56 |
|
55 | | - /// Set local position error |
56 | | - void setError(LocalError err) { theLocalError = err; } |
| 57 | + /// Set local position error |
| 58 | + void setError(LocalError err) { theLocalError = err; } |
57 | 59 |
|
58 | | - /// Set the local position and its error |
59 | | - void setPositionAndError(LocalPoint pos, LocalError err) { |
60 | | - theLocalPosition = pos; |
61 | | - theLocalError = err; |
62 | | - } |
| 60 | + /// Set the local position and its error |
| 61 | + void setPositionAndError(LocalPoint pos, LocalError err) { |
| 62 | + theLocalPosition = pos; |
| 63 | + theLocalError = err; |
| 64 | + } |
63 | 65 |
|
64 | | - /// Set the time and its error |
65 | | - void setTimeAndError(float time, float err) { |
66 | | - theTime = time; |
67 | | - theTimeError = err; |
68 | | - } |
| 66 | + /// Set the time and its error |
| 67 | + void setTimeAndError(float time, float err) { |
| 68 | + theTime = time; |
| 69 | + theTimeError = err; |
| 70 | + } |
69 | 71 |
|
70 | | - /// Return the rpcId |
71 | | - RPCDetId rpcId() const { return theRPCId; } |
| 72 | + /// Return the rpcId |
| 73 | + RPCDetId rpcId() const { return theRPCId; } |
72 | 74 |
|
73 | | - int BunchX() const { return theBx; } |
| 75 | + int BunchX() const { return theBx; } |
74 | 76 |
|
75 | | - int firstClusterStrip() const { return theFirstStrip; } |
| 77 | + int firstClusterStrip() const { return theFirstStrip; } |
76 | 78 |
|
77 | | - int clusterSize() const { return theClusterSize; } |
| 79 | + int clusterSize() const { return theClusterSize; } |
78 | 80 |
|
79 | | - float time() const { return theTime; } |
| 81 | + float time() const { return theTime; } |
80 | 82 |
|
81 | | - float timeError() const { return theTimeError; } |
| 83 | + float timeError() const { return theTimeError; } |
82 | 84 |
|
83 | | - /// Comparison operator, based on the rpcId and the digi time |
84 | | - bool operator==(const RPCRecHit& hit) const; |
| 85 | + /// Comparison operator, based on the rpcId and the digi time |
| 86 | + bool operator==(const RPCRecHit& hit) const; |
85 | 87 |
|
86 | | -private: |
87 | | - RPCDetId theRPCId; |
88 | | - int theBx; |
89 | | - int theFirstStrip; |
90 | | - int theClusterSize; |
91 | | - // Position and error in the Local Ref. Frame of the RPCLayer |
92 | | - LocalPoint theLocalPosition; |
93 | | - LocalError theLocalError; |
94 | | - float theTime, theTimeError; |
95 | | -}; |
| 88 | + private: |
| 89 | + RPCDetId theRPCId; |
| 90 | + int theBx; |
| 91 | + int theFirstStrip; |
| 92 | + int theClusterSize; |
| 93 | + // Position and error in the Local Ref. Frame of the RPCLayer |
| 94 | + LocalPoint theLocalPosition; |
| 95 | + LocalError theLocalError; |
| 96 | + float theTime, theTimeError; |
| 97 | + }; |
| 98 | + /// The ostream operator |
| 99 | + std::ostream& operator<<(std::ostream& os, const RPCRecHit& hit); |
| 100 | +} // namespace io_v1 |
| 101 | +using RPCRecHit = io_v1::RPCRecHit; |
96 | 102 | #endif |
97 | | - |
98 | | -/// The ostream operator |
99 | | -std::ostream& operator<<(std::ostream& os, const RPCRecHit& hit); |
|
0 commit comments