CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/Alignment/MuonAlignment/interface/AlignableMuon.h

Go to the documentation of this file.
00001 #ifndef Alignment_MuonAlignment_AlignableMuon_H
00002 #define Alignment_MuonAlignment_AlignableMuon_H
00003 
00013 #include "Geometry/DTGeometry/interface/DTGeometry.h"
00014 #include <DataFormats/GeometryVector/interface/GlobalPoint.h>
00015 #include <Geometry/CSCGeometry/interface/CSCLayer.h>
00016 
00017 #include "Alignment/CommonAlignment/interface/AlignableComposite.h"
00018 
00019 class CSCGeometry;
00020 
00021 // Classes that will be used to construct the muon
00022 class AlignableDTBarrel;
00023 class AlignableDTWheel;
00024 class AlignableDTStation;
00025 class AlignableDTChamber;
00026 class AlignableCSCEndcap;
00027 class AlignableCSCStation;
00028 class AlignableCSCRing;
00029 class AlignableCSCChamber;
00030 
00031 
00032 
00033 
00035 
00036 class AlignableMuon: public AlignableComposite 
00037 {
00038 
00039 public:
00040 
00042   AlignableMuon( const DTGeometry* , const CSCGeometry* );
00043 
00045   ~AlignableMuon();
00046   
00047 
00049   virtual align::Alignables components() const { return theMuonComponents; }
00050 
00052   virtual Alignable* mother() { return 0; }
00053 
00054   // Methods to return specific of components
00055   align::Alignables DTLayers();
00056   align::Alignables DTSuperLayers();
00057   align::Alignables DTChambers();
00058   align::Alignables DTStations();
00059   align::Alignables DTWheels();
00060   align::Alignables DTBarrel();
00061   align::Alignables CSCLayers();
00062   align::Alignables CSCChambers();
00063   align::Alignables CSCStations();
00064   align::Alignables CSCRings();
00065   align::Alignables CSCEndcaps();
00066 
00067   // Get DT alignments sorted by DetId
00068   Alignments* dtAlignments();
00069 
00070   // Get DT alignment errors sorted by DetId
00071   AlignmentErrors* dtAlignmentErrors();
00072 
00073   // Get CSC alignments sorted by DetId
00074   Alignments* cscAlignments();
00075 
00076   // Get CSC alignment errors sorted by DetId
00077   AlignmentErrors* cscAlignmentErrors();
00078 
00079 
00080 
00081 private:
00082   
00083   // Get the position (centered at 0 by default)
00084   PositionType computePosition(); 
00085 
00086   // Get the global orientation (no rotation by default)
00087   RotationType computeOrientation();
00088 
00089   // Get the Surface
00090   AlignableSurface computeSurface();
00091 
00092   // Get alignments sorted by DetId
00093   Alignments* alignments() const;
00094 
00095   // Get alignment errors sorted by DetId
00096   AlignmentErrors* alignmentErrors() const;
00097 
00098 
00099 
00100    // Sub-structure builders 
00101 
00102    // Build muon barrel
00103   void buildDTBarrel( const DTGeometry*  );
00104 
00105   // Build muon end caps
00106   void buildCSCEndcap( const CSCGeometry*  );
00107 
00109   void recursiveSetMothers( Alignable* alignable );
00110 
00111 
00112   // Containers of separate components
00113 
00114   std::vector<AlignableDTChamber*>   theDTChambers;
00115   std::vector<AlignableDTStation*>   theDTStations;
00116   std::vector<AlignableDTWheel*>     theDTWheels;
00117   std::vector<AlignableDTBarrel*>    theDTBarrel;
00118   
00119   std::vector<AlignableCSCChamber*>  theCSCChambers;
00120   std::vector<AlignableCSCStation*>  theCSCStations;
00121   std::vector<AlignableCSCRing*>     theCSCRings;
00122   std::vector<AlignableCSCEndcap*>   theCSCEndcaps;
00123 
00124   align::Alignables theMuonComponents;
00125 
00126 };
00127 
00128 #endif //AlignableMuon_H
00129