1 |
fronga |
1.1 |
#ifndef Alignment_CommonAlignmentAlgorithm_AlignableData_h
|
2 |
|
|
#define Alignment_CommonAlignmentAlgorithm_AlignableData_h
|
3 |
|
|
|
4 |
|
|
#include "Geometry/Surface/interface/Surface.h"
|
5 |
|
|
#include "DataFormats/Math/interface/Point3D.h"
|
6 |
|
|
#include "DataFormats/Math/interface/Vector3D.h"
|
7 |
|
|
|
8 |
fronga |
1.2 |
#include <vector>
|
9 |
fronga |
1.1 |
|
10 |
|
|
/// Helper class to store position data of an alignable;
|
11 |
|
|
/// Contents: position vector, rotation matrix, DetId and TypeId;
|
12 |
|
|
/// can be used for both absolute and relative positions/rotations
|
13 |
|
|
|
14 |
|
|
|
15 |
|
|
template<class T> class AlignableData
|
16 |
|
|
{
|
17 |
|
|
|
18 |
|
|
public:
|
19 |
|
|
|
20 |
|
|
/// constructor
|
21 |
|
|
AlignableData(T pos, Surface::RotationType rot,
|
22 |
|
|
unsigned int id, int objid) :
|
23 |
|
|
thePos(pos), theRot(rot), theObjId(objid), theId(id) {}
|
24 |
|
|
|
25 |
|
|
/// accessors
|
26 |
|
|
T pos(void) const { return thePos; }
|
27 |
|
|
Surface::RotationType rot(void) const { return theRot; }
|
28 |
|
|
int objId(void) const { return theObjId; }
|
29 |
|
|
unsigned int id(void) const { return theId; }
|
30 |
|
|
|
31 |
|
|
private:
|
32 |
|
|
|
33 |
|
|
// data members
|
34 |
|
|
|
35 |
|
|
T thePos;
|
36 |
|
|
Surface::RotationType theRot;
|
37 |
|
|
int theObjId;
|
38 |
|
|
unsigned int theId;
|
39 |
|
|
|
40 |
|
|
};
|
41 |
|
|
|
42 |
|
|
/// Absolute position/rotation
|
43 |
|
|
typedef AlignableData<GlobalPoint> AlignableAbsData;
|
44 |
|
|
/// relative position/rotation
|
45 |
|
|
typedef AlignableData<GlobalVector> AlignableRelData;
|
46 |
|
|
|
47 |
|
|
typedef std::vector<AlignableAbsData> AlignablePositions;
|
48 |
|
|
typedef std::vector<AlignableRelData> AlignableShifts;
|
49 |
|
|
|
50 |
|
|
#endif
|
51 |
|
|
|