Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:44:37

0001 #ifndef Alignment_CommonAlignmentAlgorithm_AlignableData_h
0002 #define Alignment_CommonAlignmentAlgorithm_AlignableData_h
0003 
0004 #include "Alignment/CommonAlignment/interface/StructureType.h"
0005 #include "CondFormats/Alignment/interface/Definitions.h"
0006 #include <vector>
0007 
0008 ///  Helper class to store position data of an alignable;
0009 ///  Contents: position vector, rotation matrix, DetId and TypeId;
0010 ///            also surface deformation parameters are foreseen;
0011 ///  can be used for both absolute and relative positions/rotations
0012 
0013 template <class T>
0014 class AlignableData {
0015 public:
0016   /// constructor
0017   /// deformationParameters can be given if detUnit
0018   AlignableData(const T& pos,
0019                 const align::RotationType& rot,
0020                 align::ID id,
0021                 align::StructureType objid,
0022                 const std::vector<double>& deformationParameters = std::vector<double>())
0023       : thePos(pos), theRot(rot), theObjId(objid), theId(id), theDeformationParameters(deformationParameters) {}
0024 
0025   /// accessors
0026   const T& pos() const { return thePos; }
0027   const align::RotationType& rot() const { return theRot; }
0028   align::StructureType objId() const { return theObjId; }
0029   align::ID id() const { return theId; }
0030   const std::vector<double> deformationParameters() const { return theDeformationParameters; }
0031 
0032 private:
0033   // data members
0034 
0035   T thePos;
0036   align::RotationType theRot;
0037   align::StructureType theObjId;
0038   align::ID theId;
0039   std::vector<double> theDeformationParameters;
0040 };
0041 
0042 /// Absolute position/rotation
0043 typedef AlignableData<align::GlobalPoint> AlignableAbsData;
0044 /// relative position/rotation
0045 typedef AlignableData<align::GlobalVector> AlignableRelData;
0046 
0047 typedef std::vector<AlignableAbsData> AlignablePositions;
0048 typedef std::vector<AlignableRelData> AlignableShifts;
0049 
0050 #endif