Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef Alignment_CommonAlignment_BeamSpotAlignmentParameters_h
0002 #define Alignment_CommonAlignment_BeamSpotAlignmentParameters_h
0003 
0004 #include "Alignment/CommonAlignment/interface/AlignmentParameters.h"
0005 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
0006 
0007 /// \class BeamSpotAlignmentParameters
0008 ///
0009 /// Concrete class for alignment parameters and associated quantities
0010 /// [derived from AlignmentParameters]. The number of parameters
0011 /// N_PARAM is fixed to 4 (2 translations in x & y, and 2 slopes)
0012 ///
0013 ///  $Date: 2008/09/02 15:08:12 $
0014 ///  $Revision: 1.13 $
0015 /// (last update by $Author: flucke $)
0016 
0017 class Alignable;
0018 class AlignableDetOrUnitPtr;
0019 class TrajectoryStateOnSurface;
0020 
0021 class BeamSpotAlignmentParameters : public AlignmentParameters {
0022 public:
0023   /// Give parameters a name
0024   enum AlignmentParameterName { dx = 0, dy, dxslope, dyslope, 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   BeamSpotAlignmentParameters(Alignable *alignable, bool calcMis);
0030 
0031   /// Constructor for full set of parameters
0032   BeamSpotAlignmentParameters(Alignable *alignable,
0033                               const AlgebraicVector &parameters,
0034                               const AlgebraicSymMatrix &covMatrix);
0035 
0036   /// Constructor for selection
0037   BeamSpotAlignmentParameters(Alignable *alignable,
0038                               const AlgebraicVector &parameters,
0039                               const AlgebraicSymMatrix &covMatrix,
0040                               const std::vector<bool> &selection);
0041 
0042   /// Destructor
0043   ~BeamSpotAlignmentParameters() override;
0044   void apply() override;
0045   int type() const override;
0046 
0047   /// Clone all parameters (for update of parameters)
0048   BeamSpotAlignmentParameters *clone(const AlgebraicVector &parameters,
0049                                      const AlgebraicSymMatrix &covMatrix) const override;
0050 
0051   /// Clone selected parameters (for update of parameters)
0052   BeamSpotAlignmentParameters *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