Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:56:12

0001 #ifndef Alignment_CommonAlignment_RigidBodyAlignmentParameters_h
0002 #define Alignment_CommonAlignment_RigidBodyAlignmentParameters_h
0003 
0004 #include "Alignment/CommonAlignment/interface/AlignmentParameters.h"
0005 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
0006 
0007 /// \class RigidBodyAlignmentParameters
0008 ///
0009 /// Concrete class for alignment parameters and associated quantities
0010 /// [derived from AlignmentParameters]. The number of parameters
0011 /// N_PARAM is fixed to 6 (3 translations + 3 rotations)
0012 ///
0013 ///  $Date: 2007/10/08 15:56:00 $
0014 ///  $Revision: 1.12 $
0015 /// (last update by $Author: cklae $)
0016 
0017 class Alignable;
0018 class AlignableDetOrUnitPtr;
0019 class TrajectoryStateOnSurface;
0020 
0021 class RigidBodyAlignmentParameters : public AlignmentParameters {
0022 public:
0023   /// Give parameters a name
0024   enum AlignmentParameterName { dx = 0, dy, dz, dalpha, dbeta, dgamma, N_PARAM };
0025 
0026   /// Constructor with empty parameters/covariance (if calcMis = false) or with
0027   /// parameters (no covariance) created from current (mis-)placement of
0028   /// alignable (if calcMis = true).
0029   RigidBodyAlignmentParameters(Alignable *alignable, bool calcMis);
0030 
0031   /// Constructor for full set of parameters
0032   RigidBodyAlignmentParameters(Alignable *alignable,
0033                                const AlgebraicVector &parameters,
0034                                const AlgebraicSymMatrix &covMatrix);
0035 
0036   /// Constructor for selection
0037   RigidBodyAlignmentParameters(Alignable *alignable,
0038                                const AlgebraicVector &parameters,
0039                                const AlgebraicSymMatrix &covMatrix,
0040                                const std::vector<bool> &selection);
0041 
0042   /// Destructor
0043   ~RigidBodyAlignmentParameters() override{};
0044   void apply() override;
0045   int type() const override;
0046 
0047   /// Clone all parameters (for update of parameters)
0048   RigidBodyAlignmentParameters *clone(const AlgebraicVector &parameters,
0049                                       const AlgebraicSymMatrix &covMatrix) const override;
0050 
0051   /// Clone selected parameters (for update of parameters)
0052   RigidBodyAlignmentParameters *cloneFromSelected(const AlgebraicVector &parameters,
0053                                                   const AlgebraicSymMatrix &covMatrix) const override;
0054 
0055   /// Get all derivatives
0056   AlgebraicMatrix derivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &) const override;
0057 
0058   /// Get selected derivatives
0059   AlgebraicMatrix selectedDerivatives(const TrajectoryStateOnSurface &tsos,
0060                                       const AlignableDetOrUnitPtr &) const override;
0061 
0062   /// Get translation parameters
0063   AlgebraicVector translation(void) const;
0064 
0065   /// Get rotation parameters
0066   AlgebraicVector rotation(void) const;
0067 
0068   /// calculate and return parameters in global frame
0069   AlgebraicVector globalParameters(void) const;
0070 
0071   /// print parameters to screen
0072   void print(void) const;
0073 
0074   /// Calculate parameter vector of misplacements (shift+rotation) from
0075   /// alignable. (If ali=0, return empty AlgebraicVector of proper length.)
0076   static AlgebraicVector displacementFromAlignable(const Alignable *ali);
0077 };
0078 
0079 #endif