Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef Alignment_CommonAlignment_AlignableBeamSpot_h
0002 #define Alignment_CommonAlignment_AlignableBeamSpot_h
0003 
0004 /** \class AlignableBeamSpot
0005  *
0006  * An Alignable for the beam spot
0007  *
0008  *  Original author: Andreas Mussgiller, August 2010
0009  *
0010  *  $Date: 2010/10/26 19:53:53 $
0011  *  $Revision: 1.2 $
0012  *  (last update by $Author: flucke $)
0013  */
0014 
0015 #include "Alignment/CommonAlignment/interface/Alignable.h"
0016 
0017 class SurfaceDeformation;
0018 
0019 class AlignableBeamSpot : public Alignable {
0020 public:
0021   AlignableBeamSpot();
0022 
0023   /// Destructor
0024   ~AlignableBeamSpot() override;
0025 
0026   /// Add a component and set its mother to this alignable.
0027   /// (Note: The component will be adopted, e.g. later deleted.)
0028   /// Also find average position of this composite from its modules' positions.
0029   void addComponent(Alignable* component) override {}
0030 
0031   /// Return vector of direct components
0032   const Alignables& components() const override { return emptyComponents_; }
0033 
0034   /// Provide all components, subcomponents etc. (cf. description in base class)
0035   void recursiveComponents(Alignables& result) const override {}
0036 
0037   /// Move with respect to the global reference frame
0038   void move(const GlobalVector& displacement) override;
0039 
0040   /// Rotation interpreted in global reference frame
0041   void rotateInGlobalFrame(const RotationType& rotation) override;
0042 
0043   /// Set the AlignmentPositionError and, if (propagateDown), to all components
0044   void setAlignmentPositionError(const AlignmentPositionError& ape, bool propagateDown) override;
0045 
0046   /// Add (or set if it does not exist yet) the AlignmentPositionError,
0047   /// if (propagateDown), add also to all components
0048   void addAlignmentPositionError(const AlignmentPositionError& ape, bool propagateDown) override;
0049 
0050   /// Add (or set if it does not exist yet) the AlignmentPositionError
0051   /// resulting from a rotation in the global reference frame,
0052   /// if (propagateDown), add also to all components
0053   void addAlignmentPositionErrorFromRotation(const RotationType& rot, bool propagateDown) override;
0054 
0055   /// Add the AlignmentPositionError resulting from local rotation (if this Alignable is a Det) and,
0056   /// if (propagateDown), add to all the components of the composite
0057   void addAlignmentPositionErrorFromLocalRotation(const RotationType& rotation, bool propagateDown) override;
0058 
0059   /// Return the alignable type identifier
0060   StructureType alignableObjectId() const override { return align::BeamSpot; }
0061 
0062   /// Recursive printout of alignable structure
0063   void dump() const override;
0064 
0065   /// Return vector of alignment data
0066   Alignments* alignments() const override;
0067 
0068   /// Return vector of alignment errors
0069   AlignmentErrorsExtended* alignmentErrors() const override;
0070 
0071   /// alignment position error - for checking only, otherwise use alignmentErrors() above!
0072   const AlignmentPositionError* alignmentPositionError() const { return theAlignmentPositionError; }
0073 
0074   /// Return surface deformations
0075   int surfaceDeformationIdPairs(std::vector<std::pair<int, SurfaceDeformation*> >&) const override { return 0; }
0076 
0077   /// do no use, for compatibility only
0078   void setSurfaceDeformation(const SurfaceDeformation*, bool) override;
0079   /// do no use, for compatibility only
0080   void addSurfaceDeformation(const SurfaceDeformation*, bool) override;
0081 
0082   /// initialize the alignable with the passed beam spot parameters
0083   void initialize(double x, double y, double z, double dxdz, double dydz);
0084 
0085   /// reset beam spot to the uninitialized state
0086   void reset();
0087 
0088   /// returns the DetId corresponding to the alignable beam spot. Also used
0089   /// by BeamSpotGeomDet and BeamSpotTransientTrackingRecHit
0090   static const DetId detId() { return DetId((DetId::Tracker << DetId::kDetOffset) + 0x1ffffff); }
0091 
0092 private:
0093   static const Alignables emptyComponents_;
0094   AlignmentPositionError* theAlignmentPositionError;
0095 
0096   bool theInitializedFlag;
0097 };
0098 
0099 #endif  // ALIGNABLE_BEAMSPOT_H