File indexing completed on 2024-04-06 11:56:55
0001 #ifndef ALIGNMENT_OFFLINEVALIDATION_OUTPVTRENDS_H_
0002 #define ALIGNMENT_OFFLINEVALIDATION_OUTPVTRENDS_H_
0003
0004 #include "TArrow.h"
0005 #include "TAxis.h"
0006 #include "TCanvas.h"
0007 #include "TF1.h"
0008 #include "TFile.h"
0009 #include "TGaxis.h"
0010 #include "TGraph.h"
0011 #include "TGraphAsymmErrors.h"
0012 #include "TGraphErrors.h"
0013 #include "TH1F.h"
0014 #include "TH2F.h"
0015 #include "TLatex.h"
0016 #include "TLegend.h"
0017 #include "TList.h"
0018 #include "TMath.h"
0019 #include "TObjArray.h"
0020 #include "TObjString.h"
0021 #include "TPad.h"
0022 #include "TPaveText.h"
0023 #include "TProcPool.h"
0024 #include "TProfile.h"
0025 #include "TROOT.h"
0026 #include "TStyle.h"
0027 #include "TSystem.h"
0028 #include "TSystemDirectory.h"
0029 #include "TSystemFile.h"
0030 #include <TStopwatch.h>
0031 #include <algorithm>
0032 #include <bitset>
0033 #include <fstream>
0034 #include <functional>
0035 #include <iostream>
0036 #include <iterator>
0037 #include <map>
0038 #include <sstream>
0039 #include <vector>
0040
0041
0042
0043
0044 typedef std::map<TString, std::vector<double> > alignmentTrend;
0045
0046
0047
0048 struct unrolledHisto {
0049 double m_y_min;
0050 double m_y_max;
0051 unsigned int m_n_bins;
0052 std::vector<double> m_bincontents;
0053
0054 unrolledHisto() {
0055 m_y_min = 0.;
0056 m_y_max = 0.;
0057 m_n_bins = 0;
0058 m_bincontents.clear();
0059 }
0060
0061 unrolledHisto(const double &y_min,
0062 const double &y_max,
0063 const unsigned int &n_bins,
0064 const std::vector<double> &bincontents) {
0065 m_y_min = y_min;
0066 m_y_max = y_max;
0067 m_n_bins = n_bins;
0068 m_bincontents = bincontents;
0069 }
0070
0071 double get_y_min() { return m_y_min; }
0072
0073 double get_y_max() { return m_y_max; }
0074
0075 unsigned int get_n_bins() { return m_n_bins; }
0076
0077 std::vector<double> get_bin_contents() { return m_bincontents; }
0078
0079 double get_integral() {
0080 double ret(0.);
0081 for (const auto &binc : m_bincontents) {
0082 ret += binc;
0083 }
0084 return ret;
0085 }
0086 };
0087
0088 struct outPVtrends {
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120 outPVtrends() { init(); }
0121
0122 int m_index;
0123 std::vector<double> m_runs;
0124 alignmentTrend m_dxyPhiMeans;
0125 alignmentTrend m_dxyPhiChi2;
0126 alignmentTrend m_dxyPhiKS;
0127 alignmentTrend m_dxyPhiHi;
0128 alignmentTrend m_dxyPhiLo;
0129 alignmentTrend m_dxyEtaMeans;
0130 alignmentTrend m_dxyEtaChi2;
0131 alignmentTrend m_dxyEtaKS;
0132 alignmentTrend m_dxyEtaHi;
0133 alignmentTrend m_dxyEtaLo;
0134 alignmentTrend m_dzPhiMeans;
0135 alignmentTrend m_dzPhiChi2;
0136 alignmentTrend m_dzPhiKS;
0137 alignmentTrend m_dzPhiHi;
0138 alignmentTrend m_dzPhiLo;
0139 alignmentTrend m_dzEtaMeans;
0140 alignmentTrend m_dzEtaChi2;
0141 alignmentTrend m_dzEtaKS;
0142 alignmentTrend m_dzEtaHi;
0143 alignmentTrend m_dzEtaLo;
0144 std::map<TString, std::vector<unrolledHisto> > m_dxyVect;
0145 std::map<TString, std::vector<unrolledHisto> > m_dzVect;
0146
0147 void init() {
0148 m_index = -1;
0149 m_runs.clear();
0150
0151 m_dxyPhiMeans.clear();
0152 m_dxyPhiChi2.clear();
0153 m_dxyPhiKS.clear();
0154 m_dxyPhiHi.clear();
0155 m_dxyPhiLo.clear();
0156
0157 m_dxyEtaMeans.clear();
0158 m_dxyEtaChi2.clear();
0159 m_dxyEtaKS.clear();
0160 m_dxyEtaHi.clear();
0161 m_dxyEtaLo.clear();
0162
0163 m_dzPhiMeans.clear();
0164 m_dzPhiChi2.clear();
0165 m_dzPhiKS.clear();
0166 m_dzPhiHi.clear();
0167 m_dzPhiLo.clear();
0168
0169 m_dzEtaMeans.clear();
0170 m_dzEtaChi2.clear();
0171 m_dzEtaKS.clear();
0172 m_dzEtaHi.clear();
0173 m_dzEtaLo.clear();
0174
0175 m_dxyVect.clear();
0176 m_dzVect.clear();
0177 }
0178 };
0179
0180 #if defined(__ROOTCLING__)
0181 #pragma link C++ class std::map < TString, std::vector < double>> + ;
0182 #pragma link C++ class std::map < TString, std::vector < unrolledHisto>> + ;
0183 #pragma link C++ class outPVtrends + ;
0184 #pragma link C++ class unrolledHisto + ;
0185
0186 #endif
0187
0188 #endif