File indexing completed on 2023-03-17 10:39:35
0001 #ifndef Alignment_MuonAlignment_MuonAlignment_H
0002 #define Alignment_MuonAlignment_MuonAlignment_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include <map>
0013
0014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0015 #include "Alignment/MuonAlignment/interface/AlignableMuon.h"
0016 #include "FWCore/Framework/interface/Frameworkfwd.h"
0017 #include "Alignment/CommonAlignment/interface/AlignableNavigator.h"
0018 #include "Alignment/MuonAlignment/interface/MuonAlignmentInputMethod.h"
0019 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0020
0021 class MuonAlignment {
0022 public:
0023 MuonAlignment(const DTGeometry* dtGeometry, const CSCGeometry* cscGeometry, const GEMGeometry* gemGeometry);
0024
0025 MuonAlignment(const edm::EventSetup& iSetup, const MuonAlignmentInputMethod& input);
0026
0027 ~MuonAlignment() {
0028 delete theAlignableMuon;
0029 delete theAlignableNavigator;
0030 }
0031
0032 AlignableMuon* getAlignableMuon() { return theAlignableMuon; }
0033
0034 AlignableNavigator* getAlignableNavigator() { return theAlignableNavigator; }
0035
0036 void moveAlignableLocalCoord(DetId&, align::Scalars&, align::Scalars&);
0037 void moveAlignableGlobalCoord(DetId&, align::Scalars&, align::Scalars&);
0038
0039 void recursiveList(const align::Alignables& alignables, align::Alignables& theList);
0040 void recursiveMap(const align::Alignables& alignables, std::map<align::ID, Alignable*>& theMap);
0041 void recursiveStructureMap(const align::Alignables& alignables,
0042 std::map<std::pair<align::StructureType, align::ID>, Alignable*>& theMap);
0043
0044 void copyAlignmentToSurvey(double shiftErr, double angleErr);
0045 void fillGapsInSurvey(double shiftErr, double angleErr);
0046 void copySurveyToAlignment();
0047
0048 void writeXML(const edm::ParameterSet& iConfig,
0049 const DTGeometry* dtGeometryXML,
0050 const CSCGeometry* cscGeometryXML,
0051 const GEMGeometry* gemGeometryXML);
0052
0053 void saveDTSurveyToDB();
0054 void saveCSCSurveyToDB();
0055 void saveSurveyToDB();
0056
0057 void saveDTtoDB();
0058 void saveCSCtoDB();
0059 void saveGEMtoDB();
0060 void saveToDB();
0061
0062 private:
0063 void init();
0064 void recursiveCopySurveyToAlignment(Alignable* alignable);
0065
0066 std::string theDTAlignRecordName, theDTErrorRecordName;
0067 std::string theCSCAlignRecordName, theCSCErrorRecordName;
0068 std::string theGEMAlignRecordName, theGEMErrorRecordName;
0069 std::string theDTSurveyRecordName, theDTSurveyErrorRecordName;
0070 std::string theCSCSurveyRecordName, theCSCSurveyErrorRecordName;
0071
0072 const DTGeometry* dtGeometry_;
0073 const CSCGeometry* cscGeometry_;
0074 const GEMGeometry* gemGeometry_;
0075
0076 align::Scalars displacements;
0077
0078 align::Scalars rotations;
0079
0080 AlignableMuon* theAlignableMuon;
0081
0082 AlignableNavigator* theAlignableNavigator;
0083 };
0084
0085 #endif