Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef Alignment_MuonAlignment_AlignableMuon_H
0002 #define Alignment_MuonAlignment_AlignableMuon_H
0003 
0004 /** \class AlignableMuon
0005  *  The alignable muon.
0006  *
0007  *  $Date: 2008/04/25 21:23:15 $
0008  *  $Revision: 1.21 $
0009  *  \author Andre Sznajder - UERJ(Brazil)
0010  */
0011 
0012 #include "Geometry/DTGeometry/interface/DTGeometry.h"
0013 #include <DataFormats/GeometryVector/interface/GlobalPoint.h>
0014 #include <Geometry/CSCGeometry/interface/CSCLayer.h>
0015 
0016 #include "Alignment/CommonAlignment/interface/AlignableComposite.h"
0017 #include "Alignment/CommonAlignment/interface/AlignableObjectId.h"
0018 
0019 class CSCGeometry;
0020 class GEMGeometry;
0021 
0022 // Classes that will be used to construct the muon
0023 class AlignableDTBarrel;
0024 class AlignableDTWheel;
0025 class AlignableDTStation;
0026 class AlignableDTChamber;
0027 class AlignableCSCEndcap;
0028 class AlignableCSCStation;
0029 class AlignableCSCRing;
0030 class AlignableCSCChamber;
0031 class AlignableGEMEndcap;
0032 class AlignableGEMStation;
0033 class AlignableGEMRing;
0034 class AlignableGEMSuperChamber;
0035 
0036 /// Constructor of the full muon geometry.
0037 
0038 class AlignableMuon : public AlignableComposite {
0039 public:
0040   /// Constructor from geometries
0041   AlignableMuon(const DTGeometry*, const CSCGeometry*, const GEMGeometry*);
0042 
0043   /// Destructor
0044   ~AlignableMuon() override;
0045 
0046   /// Updater using DTGeometry and CSCGeometry.
0047   /// The given geometries have to match the current ones.
0048   void update(const DTGeometry*, const CSCGeometry*, const GEMGeometry*);
0049 
0050   /// Return all components
0051   const align::Alignables& components() const final { return theMuonComponents; }
0052 
0053   /// Alignable tracker has no mother
0054   virtual Alignable* mother() { return nullptr; }
0055 
0056   /// Methods to return specific of components
0057   align::Alignables DTLayers();
0058   align::Alignables DTSuperLayers();
0059   align::Alignables DTChambers();
0060   align::Alignables DTStations();
0061   align::Alignables DTWheels();
0062   align::Alignables DTBarrel();
0063   align::Alignables CSCLayers();
0064   align::Alignables CSCChambers();
0065   align::Alignables CSCStations();
0066   align::Alignables CSCRings();
0067   align::Alignables CSCEndcaps();
0068   align::Alignables GEMEtaPartitions();
0069   align::Alignables GEMChambers();
0070   align::Alignables GEMSuperChambers();
0071   align::Alignables GEMStations();
0072   align::Alignables GEMRings();
0073   align::Alignables GEMEndcaps();
0074 
0075   /// Get DT alignments sorted by DetId
0076   Alignments* dtAlignments();
0077 
0078   /// Get DT alignment errors sorted by DetId
0079   AlignmentErrorsExtended* dtAlignmentErrorsExtended();
0080 
0081   /// Get CSC alignments sorted by DetId
0082   Alignments* cscAlignments();
0083 
0084   Alignments* gemAlignments();
0085 
0086   /// Get CSC alignment errors sorted by DetId
0087   AlignmentErrorsExtended* cscAlignmentErrorsExtended();
0088 
0089   AlignmentErrorsExtended* gemAlignmentErrorsExtended();
0090 
0091   /// Return muon alignable object ID provider derived from the muon system geometry
0092   const AlignableObjectId& objectIdProvider() const { return alignableObjectId_; }
0093 
0094   const bool doGEM() { return doGEM_; }
0095 
0096 private:
0097   /// Get the position (centered at 0 by default)
0098   PositionType computePosition();
0099 
0100   /// Get the global orientation (no rotation by default)
0101   RotationType computeOrientation();
0102 
0103   /// Get the Surface
0104   AlignableSurface computeSurface();
0105 
0106   /// Get alignments sorted by DetId
0107   Alignments* alignments() const override;
0108 
0109   /// Get alignment errors sorted by DetId
0110   AlignmentErrorsExtended* alignmentErrors() const override;
0111 
0112   // Sub-structure builders
0113 
0114   /// Build muon barrel
0115   void buildDTBarrel(const DTGeometry*, bool update = false);
0116 
0117   /// Build muon end caps
0118   void buildCSCEndcap(const CSCGeometry*, bool update = false);
0119 
0120   void buildGEMEndcap(const GEMGeometry*, bool update = false);
0121 
0122   /// Set mothers recursively
0123   void recursiveSetMothers(Alignable* alignable);
0124 
0125   /// alignable object ID provider
0126   const AlignableObjectId alignableObjectId_;
0127 
0128   bool doGEM_;
0129   /// Containers of separate components
0130   std::vector<AlignableDTChamber*> theDTChambers;
0131   std::vector<AlignableDTStation*> theDTStations;
0132   std::vector<AlignableDTWheel*> theDTWheels;
0133   std::vector<AlignableDTBarrel*> theDTBarrel;
0134 
0135   std::vector<AlignableCSCChamber*> theCSCChambers;
0136   std::vector<AlignableCSCStation*> theCSCStations;
0137   std::vector<AlignableCSCRing*> theCSCRings;
0138   std::vector<AlignableCSCEndcap*> theCSCEndcaps;
0139 
0140   std::vector<AlignableGEMSuperChamber*> theGEMSuperChambers;
0141   std::vector<AlignableGEMStation*> theGEMStations;
0142   std::vector<AlignableGEMRing*> theGEMRings;
0143   std::vector<AlignableGEMEndcap*> theGEMEndcaps;
0144 
0145   align::Alignables theMuonComponents;
0146 };
0147 
0148 #endif  //AlignableMuon_H