File indexing completed on 2024-04-06 12:02:28
0001
0002
0003
0004
0005
0006
0007 #ifndef CondFormats_PPSObjects_PPSAlignmentConfiguration_h
0008 #define CondFormats_PPSObjects_PPSAlignmentConfiguration_h
0009
0010 #include "CondFormats/Serialization/interface/Serializable.h"
0011
0012 #include <vector>
0013 #include <string>
0014 #include <map>
0015
0016 class PPSAlignmentConfiguration {
0017 public:
0018
0019 struct PointErrors {
0020 double x_;
0021 double y_;
0022 double ex_;
0023 double ey_;
0024
0025 COND_SERIALIZABLE;
0026 };
0027
0028 struct SelectionRange {
0029 double x_min_;
0030 double x_max_;
0031
0032 COND_SERIALIZABLE;
0033 };
0034
0035 struct RPConfig {
0036 std::string name_;
0037 unsigned int id_;
0038 std::string position_;
0039 double slope_;
0040 double sh_x_;
0041
0042 double x_min_fit_mode_, x_max_fit_mode_;
0043 double y_max_fit_mode_;
0044 double y_cen_add_;
0045 double y_width_mult_;
0046
0047 int x_slice_n_;
0048 double x_slice_min_, x_slice_w_;
0049
0050 COND_SERIALIZABLE;
0051 };
0052
0053 struct SectorConfig {
0054 std::string name_;
0055 RPConfig rp_N_, rp_F_;
0056 double slope_;
0057
0058 bool cut_h_apply_;
0059 double cut_h_a_, cut_h_c_, cut_h_si_;
0060
0061 bool cut_v_apply_;
0062 double cut_v_a_, cut_v_c_, cut_v_si_;
0063
0064 COND_SERIALIZABLE;
0065 };
0066
0067 struct Binning {
0068 double bin_size_x_;
0069 unsigned int n_bins_x_;
0070
0071 double pixel_x_offset_;
0072
0073 unsigned int n_bins_y_;
0074 double y_min_, y_max_;
0075
0076 unsigned int diffFN_n_bins_x_;
0077 double diffFN_x_min_, diffFN_x_max_;
0078
0079 unsigned int slice_n_bins_x_, slice_n_bins_y_;
0080 double slice_x_min_, slice_x_max_, slice_y_min_, slice_y_max_;
0081
0082 COND_SERIALIZABLE;
0083 };
0084
0085
0086 const SectorConfig& sectorConfig45() const;
0087 const SectorConfig& sectorConfig56() const;
0088
0089 double x_ali_sh_step() const;
0090
0091 double y_mode_sys_unc() const;
0092 double chiSqThreshold() const;
0093 double y_mode_unc_max_valid() const;
0094 double y_mode_max_valid() const;
0095
0096 double minRPTracksSize() const;
0097 double maxRPTracksSize() const;
0098 double n_si() const;
0099
0100 const std::map<unsigned int, std::vector<PointErrors>>& matchingReferencePoints() const;
0101 const std::map<unsigned int, SelectionRange>& matchingShiftRanges() const;
0102
0103 const std::map<unsigned int, SelectionRange>& alignment_x_meth_o_ranges() const;
0104 unsigned int fitProfileMinBinEntries() const;
0105 unsigned int fitProfileMinNReasonable() const;
0106 unsigned int methOGraphMinN() const;
0107 double methOUncFitRange() const;
0108
0109 const std::map<unsigned int, SelectionRange>& alignment_x_relative_ranges() const;
0110 unsigned int nearFarMinEntries() const;
0111
0112 const std::map<unsigned int, SelectionRange>& alignment_y_ranges() const;
0113 unsigned int modeGraphMinN() const;
0114 unsigned int multSelProjYMinEntries() const;
0115
0116 const Binning& binning() const;
0117
0118 const std::vector<double>& extraParams() const;
0119
0120
0121 void setSectorConfig45(SectorConfig& sectorConfig45);
0122 void setSectorConfig56(SectorConfig& sectorConfig56);
0123
0124 void setX_ali_sh_step(double x_ali_sh_step);
0125
0126 void setY_mode_sys_unc(double y_mode_sys_unc);
0127 void setChiSqThreshold(double chiSqThreshold);
0128 void setY_mode_unc_max_valid(double y_mode_unc_max_valid);
0129 void setY_mode_max_valid(double y_mode_max_valid);
0130
0131 void setMinRPTracksSize(unsigned int minRPTracksSize);
0132 void setMaxRPTracksSize(unsigned int maxRPTracksSize);
0133 void setN_si(double n_si);
0134
0135 void setMatchingReferencePoints(std::map<unsigned int, std::vector<PointErrors>>& matchingReferencePoints);
0136 void setMatchingShiftRanges(std::map<unsigned int, SelectionRange>& matchingShiftRanges);
0137
0138 void setAlignment_x_meth_o_ranges(std::map<unsigned int, SelectionRange>& alignment_x_meth_o_ranges);
0139 void setFitProfileMinBinEntries(unsigned int fitProfileMinBinEntries);
0140 void setFitProfileMinNReasonable(unsigned int fitProfileMinNReasonable);
0141 void setMethOGraphMinN(unsigned int methOGraphMinN);
0142 void setMethOUncFitRange(double methOUncFitRange);
0143
0144 void setAlignment_x_relative_ranges(std::map<unsigned int, SelectionRange>& alignment_x_relative_ranges);
0145 void setNearFarMinEntries(unsigned int nearFarMinEntries);
0146
0147 void setAlignment_y_ranges(std::map<unsigned int, SelectionRange>& alignment_y_ranges);
0148 void setModeGraphMinN(unsigned int modeGraphMinN);
0149 void setMultSelProjYMinEntries(unsigned int multSelProjYMinEntries);
0150
0151 void setBinning(Binning& binning);
0152
0153 void setExtraParams(std::vector<double>& extraParams);
0154
0155
0156 friend std::ostream& operator<<(std::ostream& os, const PPSAlignmentConfiguration& c);
0157
0158 private:
0159 SectorConfig sectorConfig45_, sectorConfig56_;
0160
0161 double x_ali_sh_step_;
0162
0163 double y_mode_sys_unc_;
0164 double chiSqThreshold_;
0165 double y_mode_unc_max_valid_;
0166 double y_mode_max_valid_;
0167
0168 unsigned int minRPTracksSize_;
0169 unsigned int maxRPTracksSize_;
0170 double n_si_;
0171
0172 std::map<unsigned int, std::vector<PointErrors>> matchingReferencePoints_;
0173 std::map<unsigned int, SelectionRange> matchingShiftRanges_;
0174
0175 std::map<unsigned int, SelectionRange> alignment_x_meth_o_ranges_;
0176 unsigned int fitProfileMinBinEntries_;
0177 unsigned int fitProfileMinNReasonable_;
0178 unsigned int methOGraphMinN_;
0179 double methOUncFitRange_;
0180
0181 std::map<unsigned int, SelectionRange> alignment_x_relative_ranges_;
0182 unsigned int nearFarMinEntries_;
0183
0184 std::map<unsigned int, SelectionRange> alignment_y_ranges_;
0185 unsigned int modeGraphMinN_;
0186 unsigned int multSelProjYMinEntries_;
0187
0188 Binning binning_;
0189
0190 std::vector<double> extraParams_;
0191
0192 COND_SERIALIZABLE;
0193 };
0194
0195 std::ostream& operator<<(std::ostream& os, const PPSAlignmentConfiguration::RPConfig& rc);
0196 std::ostream& operator<<(std::ostream& os, const PPSAlignmentConfiguration::SectorConfig& sc);
0197 std::ostream& operator<<(std::ostream& os, const PPSAlignmentConfiguration::Binning& b);
0198
0199 #endif