File indexing completed on 2024-09-07 04:34:33
0001 #ifndef Alignment_MuonAlignmentAlgorithms_CSCAlignmentCorrections_H
0002 #define Alignment_MuonAlignmentAlgorithms_CSCAlignmentCorrections_H
0003
0004
0005
0006
0007
0008
0009
0010 #include <fstream>
0011
0012 #include "TH1F.h"
0013
0014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0015 #include "DataFormats/DetId/interface/DetId.h"
0016 #include "DataFormats/MuonDetId/interface/CSCDetId.h"
0017 #include "Alignment/CommonAlignment/interface/Alignable.h"
0018 #include "Alignment/CommonAlignment/interface/AlignableNavigator.h"
0019 #include "Alignment/CommonAlignment/interface/AlignableObjectId.h"
0020 #include "Alignment/CommonAlignment/interface/AlignmentParameters.h"
0021 #include "Alignment/CommonAlignmentAlgorithm/interface/AlignmentParameterStore.h"
0022
0023 class CSCAlignmentCorrections {
0024 public:
0025 CSCAlignmentCorrections(std::string fitterName, double oldchi2, double newchi2)
0026 : m_fitterName(fitterName), m_oldchi2(oldchi2), m_newchi2(newchi2) {}
0027 virtual ~CSCAlignmentCorrections() {}
0028
0029 void insertCorrection(std::string name, CSCDetId id, double value) {
0030 m_name.push_back(name);
0031 m_id.push_back(id);
0032 m_value.push_back(value);
0033 };
0034
0035 void insertMode(const std::vector<double>& coefficient,
0036 const std::vector<std::string>& modename,
0037 const std::vector<long>& modeid,
0038 double error) {
0039 m_coefficient.push_back(coefficient);
0040 m_modename.push_back(modename);
0041 m_modeid.push_back(modeid);
0042 m_error.push_back(error);
0043 };
0044
0045 void insertResidual(std::string i, std::string j, double before, double uncert, double residual, double pull) {
0046 m_i.push_back(i);
0047 m_j.push_back(j);
0048 m_before.push_back(before);
0049 m_uncert.push_back(uncert);
0050 m_residual.push_back(residual);
0051 m_pull.push_back(pull);
0052 };
0053
0054 void applyAlignment(AlignableNavigator* alignableNavigator,
0055 AlignmentParameterStore* alignmentParameterStore,
0056 int mode,
0057 bool combineME11);
0058 void plot();
0059 void report(std::ofstream& report);
0060
0061 protected:
0062 std::string m_fitterName;
0063 double m_oldchi2, m_newchi2;
0064
0065
0066 std::vector<std::string> m_name;
0067 std::vector<CSCDetId> m_id;
0068 std::vector<double> m_value;
0069
0070
0071 std::vector<std::vector<double> > m_coefficient;
0072 std::vector<std::vector<std::string> > m_modename;
0073 std::vector<std::vector<long> > m_modeid;
0074 std::vector<double> m_error;
0075
0076
0077 std::vector<std::string> m_i;
0078 std::vector<std::string> m_j;
0079 std::vector<double> m_before;
0080 std::vector<double> m_uncert;
0081 std::vector<double> m_residual;
0082 std::vector<double> m_pull;
0083
0084 std::vector<TH1F*> th1f_modes;
0085 };
0086
0087 #endif