ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/CMSSW/Alignment/CommonAlignmentAlgorithm/interface/AlignableData.h
Revision: 1.2
Committed: Fri Jan 19 14:33:17 2007 UTC (18 years, 3 months ago) by fronga
Content type: text/plain
Branch: MAIN
CVS Tags: CMSSW_1_3_6, CMSSW_1_3_1_HLT6, CMSSW_1_3_5, CMSSW_1_3_1_HLT5, CMSSW_1_3_1_HLT4, CMSSW_1_3_1_HLT3, CMSSW_1_3_4, CMSSW_1_3_3, CMSSW_1_3_2, CMSSW_1_3_1, CMSSW_1_3_0, CMSSW_1_3_0_pre7, CMSSW_1_3_0_pre6, CMSSW_1_3_0_pre5, CMSSW_1_3_0_pre4, V01-01-03, CMSSW_1_3_0_pre3, V01-01-02, CMSSW_1_3_0_SLC4_pre2, CMSSW_1_3_0_pre2, V01-01-01, V01-01-00
Changes since 1.1: +1 -1 lines
Log Message:
Minor correction...

File Contents

# User Rev Content
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