Skip to content

Commit a64d1be

Browse files
authored
Merge pull request #50368 from Dr15Jones/evo_DTRecHit
[EVO] Moved DataFormats/DTRecHit stored products to versioned namespace
2 parents 93ca4c8 + 6176d13 commit a64d1be

11 files changed

Lines changed: 659 additions & 647 deletions

File tree

AnalysisDataFormats/SUSYBSMObjects/src/classes_def.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<class name="edm::Wrapper<susybsm::HSCPDeDxInfoValueMap>"/>
4949

5050
<class name="susybsm::MuonSegment" ClassVersion="3">
51-
<version ClassVersion="3" checksum="3212731337"/>
51+
<version ClassVersion="3" checksum="2764789041"/>
5252
</class>
5353
<class name="susybsm::MuonSegmentCollection"/>
5454
<class name="susybsm::MuonSegmentRef"/>

DataFormats/DTRecHit/interface/DTRecHit1D.h

Lines changed: 59 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -22,80 +22,83 @@
2222
class DTLayer;
2323
class GeomDet;
2424

25-
class DTRecHit1D : public RecHit1D {
26-
public:
27-
/// Constructor from wireId and digi time only.
28-
DTRecHit1D(const DTWireId& wireId, DTEnums::DTCellSide lr, float digiTime);
25+
namespace io_v1 {
26+
class DTRecHit1D : public RecHit1D {
27+
public:
28+
/// Constructor from wireId and digi time only.
29+
DTRecHit1D(const DTWireId& wireId, DTEnums::DTCellSide lr, float digiTime);
2930

30-
/// Default constructor
31-
DTRecHit1D();
31+
/// Default constructor
32+
DTRecHit1D();
3233

33-
/// Constructor from a local position, wireId and digi time.
34-
/// The 3-dimensional local error is defined as
35-
/// resolution (the cell resolution) for the coordinate being measured
36-
/// and 0 for the two other coordinates
37-
DTRecHit1D(const DTWireId& wireId, DTEnums::DTCellSide lr, float digiTime, const LocalPoint& pos);
34+
/// Constructor from a local position, wireId and digi time.
35+
/// The 3-dimensional local error is defined as
36+
/// resolution (the cell resolution) for the coordinate being measured
37+
/// and 0 for the two other coordinates
38+
DTRecHit1D(const DTWireId& wireId, DTEnums::DTCellSide lr, float digiTime, const LocalPoint& pos);
3839

39-
/// Constructor from a local position and error, wireId and digi time.
40-
DTRecHit1D(
41-
const DTWireId& wireId, DTEnums::DTCellSide lr, float digiTime, const LocalPoint& pos, const LocalError& err);
40+
/// Constructor from a local position and error, wireId and digi time.
41+
DTRecHit1D(
42+
const DTWireId& wireId, DTEnums::DTCellSide lr, float digiTime, const LocalPoint& pos, const LocalError& err);
4243

43-
/// Destructor
44-
~DTRecHit1D() override;
44+
/// Destructor
45+
~DTRecHit1D() override;
4546

46-
/// Return the 3-dimensional local position
47-
LocalPoint localPosition() const override { return theLocalPosition; }
47+
/// Return the 3-dimensional local position
48+
LocalPoint localPosition() const override { return theLocalPosition; }
4849

49-
/// Return the 3-dimensional error on the local position
50-
LocalError localPositionError() const override { return theLocalError; }
50+
/// Return the 3-dimensional error on the local position
51+
LocalError localPositionError() const override { return theLocalError; }
5152

52-
DTRecHit1D* clone() const override;
53+
DTRecHit1D* clone() const override;
5354

54-
/// No components rechits: it returns a null vector
55-
std::vector<const TrackingRecHit*> recHits() const override;
55+
/// No components rechits: it returns a null vector
56+
std::vector<const TrackingRecHit*> recHits() const override;
5657

57-
/// No components rechits: it returns a null vector
58-
std::vector<TrackingRecHit*> recHits() override;
58+
/// No components rechits: it returns a null vector
59+
std::vector<TrackingRecHit*> recHits() override;
5960

60-
/// The side of the cell
61-
DTEnums::DTCellSide lrSide() const { return theLRSide; }
61+
/// The side of the cell
62+
DTEnums::DTCellSide lrSide() const { return theLRSide; }
6263

63-
/// Set local position
64-
void setPosition(LocalPoint pos) { theLocalPosition = pos; }
64+
/// Set local position
65+
void setPosition(LocalPoint pos) { theLocalPosition = pos; }
6566

66-
/// Set local position error
67-
void setError(LocalError err) { theLocalError = err; }
67+
/// Set local position error
68+
void setError(LocalError err) { theLocalError = err; }
6869

69-
/// Set the local position and its error
70-
void setPositionAndError(LocalPoint pos, LocalError err) {
71-
theLocalPosition = pos;
72-
theLocalError = err;
73-
}
70+
/// Set the local position and its error
71+
void setPositionAndError(LocalPoint pos, LocalError err) {
72+
theLocalPosition = pos;
73+
theLocalError = err;
74+
}
7475

75-
/// Return the wireId
76-
DTWireId wireId() const { return theWireId; }
76+
/// Return the wireId
77+
DTWireId wireId() const { return theWireId; }
7778

78-
/// Return the time (ns) of the digi used to build the rechit
79-
float digiTime() const { return theDigiTime; }
79+
/// Return the time (ns) of the digi used to build the rechit
80+
float digiTime() const { return theDigiTime; }
8081

81-
/// Comparison operator, based on the wireId and the digi time
82-
bool operator==(const DTRecHit1D& hit) const;
82+
/// Comparison operator, based on the wireId and the digi time
83+
bool operator==(const DTRecHit1D& hit) const;
8384

84-
private:
85-
// The wire id
86-
DTWireId theWireId;
85+
private:
86+
// The wire id
87+
DTWireId theWireId;
8788

88-
// Left/Right side code
89-
DTEnums::DTCellSide theLRSide;
89+
// Left/Right side code
90+
DTEnums::DTCellSide theLRSide;
9091

91-
// The digi time used to reconstruct the hit
92-
float theDigiTime;
92+
// The digi time used to reconstruct the hit
93+
float theDigiTime;
9394

94-
// Position and error in the Local Ref. Frame of the DTLayer
95-
LocalPoint theLocalPosition;
96-
LocalError theLocalError;
97-
};
98-
#endif
95+
// Position and error in the Local Ref. Frame of the DTLayer
96+
LocalPoint theLocalPosition;
97+
LocalError theLocalError;
98+
};
9999

100-
/// The ostream operator
101-
std::ostream& operator<<(std::ostream& os, const DTRecHit1D& hit);
100+
/// The ostream operator
101+
std::ostream& operator<<(std::ostream& os, const DTRecHit1D& hit);
102+
} // namespace io_v1
103+
using DTRecHit1D = io_v1::DTRecHit1D;
104+
#endif
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#ifndef DataFormats_DTRecHit_DTRecHit1D_h
22
#define DataFormats_DTRecHit_DTRecHit1D_h
33

4-
class DTRecHit1D;
4+
namespace io_v1 {
5+
class DTRecHit1D;
6+
}
7+
using DTRecHit1D = io_v1::DTRecHit1D;
58
#endif

DataFormats/DTRecHit/interface/DTRecHit1DPair.h

Lines changed: 63 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -23,87 +23,89 @@
2323

2424
class DTLayer;
2525

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);
3031

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();
3334

34-
/// Destructor
35-
~DTRecHit1DPair() override;
35+
/// Destructor
36+
~DTRecHit1DPair() override;
3637

37-
// Operations
38+
// Operations
3839

39-
DTRecHit1DPair* clone() const override;
40+
DTRecHit1DPair* clone() const override;
4041

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;
4546

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;
5051

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;
5455

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;
5859

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;
6162

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(); }
6465

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;
6768

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); }
7172

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;
7576

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;
7980

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);
8384

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);
8788

88-
// Return the wireId
89-
DTWireId wireId() const { return theLeftHit.wireId(); }
89+
// Return the wireId
90+
DTWireId wireId() const { return theLeftHit.wireId(); }
9091

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;
9394

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;
9697

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);
100101

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+
};
108106

107+
/// Ostream operator
108+
std::ostream& operator<<(std::ostream& os, const DTRecHit1DPair& hit);
109+
} // namespace io_v1
110+
using DTRecHit1DPair = io_v1::DTRecHit1DPair;
109111
#endif

0 commit comments

Comments
 (0)