|
23 | 23 |
|
24 | 24 | class DTLayer; |
25 | 25 |
|
26 | | -class DTRecHit1DPair : public RecHit1D { |
27 | | -public: |
28 | | - /// Constructor without components: must use setPos and Err! |
29 | | - DTRecHit1DPair(const DTWireId& wireId, const DTDigi& digi); |
| 26 | +namespace io_v1 { |
| 27 | + class DTRecHit1DPair : public RecHit1D { |
| 28 | + public: |
| 29 | + /// Constructor without components: must use setPos and Err! |
| 30 | + DTRecHit1DPair(const DTWireId& wireId, const DTDigi& digi); |
30 | 31 |
|
31 | | - /// Default constructor. Needed to write the RecHit into a STL container. |
32 | | - DTRecHit1DPair(); |
| 32 | + /// Default constructor. Needed to write the RecHit into a STL container. |
| 33 | + DTRecHit1DPair(); |
33 | 34 |
|
34 | | - /// Destructor |
35 | | - ~DTRecHit1DPair() override; |
| 35 | + /// Destructor |
| 36 | + ~DTRecHit1DPair() override; |
36 | 37 |
|
37 | | - // Operations |
| 38 | + // Operations |
38 | 39 |
|
39 | | - DTRecHit1DPair* clone() const override; |
| 40 | + DTRecHit1DPair* clone() const override; |
40 | 41 |
|
41 | | - /// Return the 3-dimensional local position. |
42 | | - /// The average theLeftHit/theRightHit hits position, namely the wire position |
43 | | - /// is returned. |
44 | | - LocalPoint localPosition() const override; |
| 42 | + /// Return the 3-dimensional local position. |
| 43 | + /// The average theLeftHit/theRightHit hits position, namely the wire position |
| 44 | + /// is returned. |
| 45 | + LocalPoint localPosition() const override; |
45 | 46 |
|
46 | | - /// Return the 3-dimensional error on the local position. |
47 | | - /// The error is defiened as half |
48 | | - /// the distance between theLeftHit and theRightHit pos |
49 | | - LocalError localPositionError() const override; |
| 47 | + /// Return the 3-dimensional error on the local position. |
| 48 | + /// The error is defiened as half |
| 49 | + /// the distance between theLeftHit and theRightHit pos |
| 50 | + LocalError localPositionError() const override; |
50 | 51 |
|
51 | | - /// Access to component RecHits. |
52 | | - /// Return the two recHits (L/R) |
53 | | - std::vector<const TrackingRecHit*> recHits() const override; |
| 52 | + /// Access to component RecHits. |
| 53 | + /// Return the two recHits (L/R) |
| 54 | + std::vector<const TrackingRecHit*> recHits() const override; |
54 | 55 |
|
55 | | - /// Non-const access to component RecHits. |
56 | | - /// Return the two recHits (L/R) |
57 | | - std::vector<TrackingRecHit*> recHits() override; |
| 56 | + /// Non-const access to component RecHits. |
| 57 | + /// Return the two recHits (L/R) |
| 58 | + std::vector<TrackingRecHit*> recHits() override; |
58 | 59 |
|
59 | | - /// Return the detId of the Det (a DTLayer). |
60 | | - virtual DetId geographicalId() const; |
| 60 | + /// Return the detId of the Det (a DTLayer). |
| 61 | + virtual DetId geographicalId() const; |
61 | 62 |
|
62 | | - /// Return the digi time (ns) used to build the rechits |
63 | | - float digiTime() const { return theLeftHit.digiTime(); } |
| 63 | + /// Return the digi time (ns) used to build the rechits |
| 64 | + float digiTime() const { return theLeftHit.digiTime(); } |
64 | 65 |
|
65 | | - /// Comparison operator, based on the wireId and the digi time |
66 | | - bool operator==(const DTRecHit1DPair& hit) const; |
| 66 | + /// Comparison operator, based on the wireId and the digi time |
| 67 | + bool operator==(const DTRecHit1DPair& hit) const; |
67 | 68 |
|
68 | | - /// Inequality operator, defined as the mirror image of the comparions |
69 | | - /// operator |
70 | | - bool operator!=(const DTRecHit1DPair& hit) const { return !(*this == hit); } |
| 69 | + /// Inequality operator, defined as the mirror image of the comparions |
| 70 | + /// operator |
| 71 | + bool operator!=(const DTRecHit1DPair& hit) const { return !(*this == hit); } |
71 | 72 |
|
72 | | - /// Return position in the local (layer) coordinate system for a |
73 | | - /// certain hypothesis about the L/R cell side |
74 | | - LocalPoint localPosition(DTEnums::DTCellSide lrside) const; |
| 73 | + /// Return position in the local (layer) coordinate system for a |
| 74 | + /// certain hypothesis about the L/R cell side |
| 75 | + LocalPoint localPosition(DTEnums::DTCellSide lrside) const; |
75 | 76 |
|
76 | | - /// Return position error in the local (layer) coordinate system for a |
77 | | - /// certain hypothesis about the L/R cell side |
78 | | - LocalError localPositionError(DTEnums::DTCellSide lrside) const; |
| 77 | + /// Return position error in the local (layer) coordinate system for a |
| 78 | + /// certain hypothesis about the L/R cell side |
| 79 | + LocalError localPositionError(DTEnums::DTCellSide lrside) const; |
79 | 80 |
|
80 | | - /// Set the 3-dimensional local position for the component hit |
81 | | - /// corresponding to the given cell side. Default value is assumed for the error. |
82 | | - void setPosition(DTEnums::DTCellSide lrside, const LocalPoint& point); |
| 81 | + /// Set the 3-dimensional local position for the component hit |
| 82 | + /// corresponding to the given cell side. Default value is assumed for the error. |
| 83 | + void setPosition(DTEnums::DTCellSide lrside, const LocalPoint& point); |
83 | 84 |
|
84 | | - /// Set the 3-dimensional local position and error for the component hit |
85 | | - /// corresponding to the given cell side. Default value is assumed for the error. |
86 | | - void setPositionAndError(DTEnums::DTCellSide lrside, const LocalPoint& point, const LocalError& err); |
| 85 | + /// Set the 3-dimensional local position and error for the component hit |
| 86 | + /// corresponding to the given cell side. Default value is assumed for the error. |
| 87 | + void setPositionAndError(DTEnums::DTCellSide lrside, const LocalPoint& point, const LocalError& err); |
87 | 88 |
|
88 | | - // Return the wireId |
89 | | - DTWireId wireId() const { return theLeftHit.wireId(); } |
| 89 | + // Return the wireId |
| 90 | + DTWireId wireId() const { return theLeftHit.wireId(); } |
90 | 91 |
|
91 | | - /// Return the left/right DTRecHit1D |
92 | | - const DTRecHit1D* componentRecHit(DTEnums::DTCellSide lrSide) const; |
| 92 | + /// Return the left/right DTRecHit1D |
| 93 | + const DTRecHit1D* componentRecHit(DTEnums::DTCellSide lrSide) const; |
93 | 94 |
|
94 | | - /// Get the left and right 1D rechits (first and second respectively). |
95 | | - std::pair<const DTRecHit1D*, const DTRecHit1D*> componentRecHits() const; |
| 95 | + /// Get the left and right 1D rechits (first and second respectively). |
| 96 | + std::pair<const DTRecHit1D*, const DTRecHit1D*> componentRecHits() const; |
96 | 97 |
|
97 | | -private: |
98 | | - /// Non const access to left/right DTRecHit1D |
99 | | - DTRecHit1D* componentRecHit(DTEnums::DTCellSide lrSide); |
| 98 | + private: |
| 99 | + /// Non const access to left/right DTRecHit1D |
| 100 | + DTRecHit1D* componentRecHit(DTEnums::DTCellSide lrSide); |
100 | 101 |
|
101 | | - // The two rechits |
102 | | - DTRecHit1D theLeftHit; |
103 | | - DTRecHit1D theRightHit; |
104 | | -}; |
105 | | - |
106 | | -/// Ostream operator |
107 | | -std::ostream& operator<<(std::ostream& os, const DTRecHit1DPair& hit); |
| 102 | + // The two rechits |
| 103 | + DTRecHit1D theLeftHit; |
| 104 | + DTRecHit1D theRightHit; |
| 105 | + }; |
108 | 106 |
|
| 107 | + /// Ostream operator |
| 108 | + std::ostream& operator<<(std::ostream& os, const DTRecHit1DPair& hit); |
| 109 | +} // namespace io_v1 |
| 110 | +using DTRecHit1DPair = io_v1::DTRecHit1DPair; |
109 | 111 | #endif |
0 commit comments