00001 00009 #ifndef Alignment_MuonStantaloneAlgorithm_StandaloneMerger_H 00010 #define Alignment_MuonStantaloneAlgorithm_StandaloneMerger_H 00011 00012 00013 // Base Class Headers 00014 #include "FWCore/Framework/interface/EDAnalyzer.h" 00015 #include "Alignment/MuonStandaloneAlgorithm/interface/AlignmentDetectorCollection.h" 00016 //#include "Alignment/MuonAlignment/interface/MuonAlignment.h" 00017 #include <vector> 00018 #include <string> 00019 #include "TMatrixD.h" 00020 00021 namespace edm { 00022 class ParameterSet; 00023 class Event; 00024 class EventSetup; 00025 } 00026 00027 class TFile; 00028 class TH1F; 00029 00030 00031 class StandaloneMerger: public edm::EDAnalyzer { 00032 public: 00033 00035 StandaloneMerger(const edm::ParameterSet& pset); 00036 00038 virtual ~StandaloneMerger(); 00039 00040 // Operations 00041 void analyze(const edm::Event & event, const edm::EventSetup& eventSetup); 00042 00043 virtual void beginJob(const edm::EventSetup& eventSetup) ; 00044 00045 virtual void endJob(); 00046 00047 private: 00048 00049 void surveyAdd(); 00050 00051 bool CalculateSolution(); 00052 00053 void BuildDelta(); 00054 00055 void updateMatrix(TMatrixD *, TMatrixD *, TMatrixD *, TMatrixD *); 00056 00057 void mergeMatrix(); 00058 00059 TFile *theFile; 00060 TFile *f; 00061 00062 TMatrixD C; 00063 TMatrixD CMatrixInvert; 00064 TMatrixD b; 00065 TMatrixD Delta; 00066 TMatrixD theIndex; 00067 TMatrixD SurveyMatrix; 00068 TMatrixD SurveyVector; 00069 TMatrixD N; 00070 TMatrixD TotalMatrix; 00071 TMatrixD TotalVector; 00072 //TDecompQRH *Decomp; 00073 TMatrixD Q, R; 00074 TMatrixD IndependentVector; 00075 00076 00077 int maxFiles; 00078 std::string surveyFileName; 00079 std::string outputFile; 00080 std::string submatrices; 00081 00082 const static int NDOFTrack = 5; 00083 const static int NDOFAlign = 6; 00084 const static int NDOFChamber = 4; 00085 const static int NDOFCoor = 4; 00086 00087 }; 00088 #endif 00089 00090 00091 00092