CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCAlignmentCorrections.h
Go to the documentation of this file.
1 #ifndef Alignment_MuonAlignmentAlgorithms_CSCAlignmentCorrections_H
2 #define Alignment_MuonAlignmentAlgorithms_CSCAlignmentCorrections_H
3 
10 #include <fstream>
11 
12 #include "TH1F.h"
13 
22 
24 public:
25  CSCAlignmentCorrections(std::string fitterName, double oldchi2, double newchi2): m_fitterName(fitterName), m_oldchi2(oldchi2), m_newchi2(newchi2) {};
27 
29  m_name.push_back(name);
30  m_id.push_back(id);
31  m_value.push_back(value);
32  };
33 
34  void insertMode(const std::vector<double>& coefficient, const std::vector<std::string>& modename, const std::vector<long>& modeid, double error) {
35  m_coefficient.push_back(coefficient);
36  m_modename.push_back(modename);
37  m_modeid.push_back(modeid);
38  m_error.push_back(error);
39  };
40 
41  void insertResidual(std::string i, std::string j, double before, double uncert, double residual, double pull) {
42  m_i.push_back(i);
43  m_j.push_back(j);
44  m_before.push_back(before);
45  m_uncert.push_back(uncert);
46  m_residual.push_back(residual);
47  m_pull.push_back(pull);
48  };
49 
50  void applyAlignment(AlignableNavigator *alignableNavigator, AlignmentParameterStore *alignmentParameterStore, int mode, bool combineME11);
51  void plot();
52  void report(std::ofstream &report);
53 
54 protected:
57 
58  // there's one of these for each chamber
59  std::vector<std::string> m_name;
60  std::vector<CSCDetId> m_id;
61  std::vector<double> m_value;
62 
63  // there's one of these for each error mode
64  std::vector<std::vector<double> > m_coefficient;
65  std::vector<std::vector<std::string> > m_modename;
66  std::vector<std::vector<long> > m_modeid;
67  std::vector<double> m_error;
68 
69  // there's one of these for each constraint
70  std::vector<std::string> m_i;
71  std::vector<std::string> m_j;
72  std::vector<double> m_before;
73  std::vector<double> m_uncert;
74  std::vector<double> m_residual;
75  std::vector<double> m_pull;
76 
77  std::vector<TH1F*> th1f_modes;
78 };
79 
80 #endif // Alignment_MuonAlignmentAlgorithms_CSCAlignmentCorrections_H
int i
Definition: DBlmapReader.cc:9
CSCAlignmentCorrections(std::string fitterName, double oldchi2, double newchi2)
std::vector< std::vector< std::string > > m_modename
void report(std::ofstream &report)
std::vector< std::string > m_i
void insertMode(const std::vector< double > &coefficient, const std::vector< std::string > &modename, const std::vector< long > &modeid, double error)
void applyAlignment(AlignableNavigator *alignableNavigator, AlignmentParameterStore *alignmentParameterStore, int mode, bool combineME11)
std::vector< TH1F * > th1f_modes
void insertCorrection(std::string name, CSCDetId id, double value)
std::vector< double > m_before
int j
Definition: DBlmapReader.cc:9
std::vector< std::vector< double > > m_coefficient
std::vector< std::vector< long > > m_modeid
tuple combineME11
Definition: align_cfg.py:32
void insertResidual(std::string i, std::string j, double before, double uncert, double residual, double pull)
std::vector< double > m_residual
std::vector< double > m_uncert
std::vector< double > m_pull
std::vector< double > m_value
std::vector< std::string > m_j
std::vector< CSCDetId > m_id
std::vector< double > m_error
std::vector< std::string > m_name