CMS 3D CMS Logo

PPSAlignmentConfig.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * CondFormats/PPSObjects/interface/PPSAlignmentConfig.h
4  *
5  * Description : Class with alignment parameters
6  *
7  * Authors:
8  * - Jan Kašpar
9  * - Mateusz Kocot
10  *
11  ****************************************************************************/
12 
13 #ifndef CondFormats_PPSObjects_PPSAlignmentConfig_h
14 #define CondFormats_PPSObjects_PPSAlignmentConfig_h
15 
17 
18 #include <vector>
19 #include <string>
20 #include <map>
21 
22 //---------------------------------------------------------------------------------------------
23 
24 struct PointErrors {
25  double x_;
26  double y_;
27  double ex_; // error x
28  double ey_; // error y
29 
31 };
32 
33 //---------------------------------------------------------------------------------------------
34 
36  double x_min_;
37  double x_max_;
38 
40 };
41 
42 //---------------------------------------------------------------------------------------------
43 
44 struct RPConfig {
46  unsigned int id_;
48  double slope_;
49  double sh_x_;
50 
53  double y_cen_add_;
54  double y_width_mult_;
55 
57  double x_slice_min_, x_slice_w_;
58 
60 };
61 std::ostream &operator<<(std::ostream &os, RPConfig &rc);
62 
63 //---------------------------------------------------------------------------------------------
64 
65 struct SectorConfig {
68  double slope_;
69 
71  double cut_h_a_, cut_h_c_, cut_h_si_;
72 
74  double cut_v_a_, cut_v_c_, cut_v_si_;
75 
77 };
78 std::ostream &operator<<(std::ostream &os, SectorConfig &sc);
79 
80 //---------------------------------------------------------------------------------------------
81 
82 struct Binning {
83  double bin_size_x_; // mm
84  unsigned int n_bins_x_;
85 
86  double pixel_x_offset_;
87 
88  unsigned int n_bins_y_;
89  double y_min_, y_max_;
90 };
91 std::ostream &operator<<(std::ostream &os, Binning &b);
92 
93 //---------------------------------------------------------------------------------------------
94 
95 class PPSAlignmentConfig {
96 public:
97  // Getters
98  const std::vector<std::string> &sequence() const;
99  const std::string &resultsDir() const;
100 
101  const SectorConfig &sectorConfig45() const;
102  const SectorConfig &sectorConfig56() const;
103 
104  double x_ali_sh_step() const;
105 
106  double y_mode_sys_unc() const;
107  double chiSqThreshold() const;
108  double y_mode_unc_max_valid() const;
109  double y_mode_max_valid() const;
110 
111  double maxRPTracksSize() const;
112  double n_si() const;
113 
114  const std::map<unsigned int, std::vector<PointErrors>> &matchingReferencePoints() const;
115  const std::map<unsigned int, SelectionRange> &matchingShiftRanges() const;
116 
117  const std::map<unsigned int, SelectionRange> &alignment_x_meth_o_ranges() const;
118  unsigned int fitProfileMinBinEntries() const;
119  unsigned int fitProfileMinNReasonable() const;
120  unsigned int methOGraphMinN() const;
121  double methOUncFitRange() const;
122 
123  const std::map<unsigned int, SelectionRange> &alignment_x_relative_ranges() const;
124  unsigned int nearFarMinEntries() const;
125 
126  const std::map<unsigned int, SelectionRange> &alignment_y_ranges() const;
127  unsigned int modeGraphMinN() const;
128  unsigned int multSelProjYMinEntries() const;
129 
130  const Binning &binning() const;
131 
132  // Setters
133  void setSequence(std::vector<std::string> &sequence);
135 
138 
139  void setX_ali_sh_step(double x_ali_sh_step);
140 
141  void setY_mode_sys_unc(double y_mode_sys_unc);
142  void setChiSqThreshold(double chiSqThreshold);
145 
146  void setMaxRPTracksSize(unsigned int maxRPTracksSize);
147  void setN_si(double n_si);
148 
149  void setMatchingReferencePoints(std::map<unsigned int, std::vector<PointErrors>> &matchingReferencePoints);
150  void setMatchingShiftRanges(std::map<unsigned int, SelectionRange> &matchingShiftRanges);
151 
152  void setAlignment_x_meth_o_ranges(std::map<unsigned int, SelectionRange> &alignment_x_meth_o_ranges);
155  void setMethOGraphMinN(unsigned int methOGraphMinN);
157 
158  void setAlignment_x_relative_ranges(std::map<unsigned int, SelectionRange> &alignment_x_relative_ranges);
159  void setNearFarMinEntries(unsigned int nearFarMinEntries);
160 
161  void setAlignment_y_ranges(std::map<unsigned int, SelectionRange> &alignment_y_ranges);
162  void setModeGraphMinN(unsigned int modeGraphMinN);
164 
165  void setBinning(Binning &binning);
166 
167  // << operator
168  friend std::ostream &operator<<(std::ostream &os, PPSAlignmentConfig c);
169 
170 private:
171  std::vector<std::string> sequence_;
173 
175 
176  double x_ali_sh_step_; // mm
177 
181  double y_mode_max_valid_;
182 
183  unsigned int maxRPTracksSize_;
184  double n_si_;
185 
186  std::map<unsigned int, std::vector<PointErrors>> matchingReferencePoints_;
187  std::map<unsigned int, SelectionRange> matchingShiftRanges_;
188 
189  std::map<unsigned int, SelectionRange> alignment_x_meth_o_ranges_;
192  unsigned int methOGraphMinN_;
193  double methOUncFitRange_; // mm
194 
195  std::map<unsigned int, SelectionRange> alignment_x_relative_ranges_;
196  unsigned int nearFarMinEntries_;
197 
198  std::map<unsigned int, SelectionRange> alignment_y_ranges_;
199  unsigned int modeGraphMinN_;
200  unsigned int multSelProjYMinEntries_;
201 
203 
205 };
206 
207 std::ostream &operator<<(std::ostream &os, PPSAlignmentConfig c);
208 
209 #endif
RPConfig::x_slice_min_
double x_slice_min_
Definition: PPSAlignmentConfig.h:56
Binning::bin_size_x_
double bin_size_x_
Definition: PPSAlignmentConfig.h:82
SectorConfig::name_
std::string name_
Definition: PPSAlignmentConfig.h:65
PPSAlignmentConfig::sectorConfig45
const SectorConfig & sectorConfig45() const
Definition: PPSAlignmentConfig.cc:26
SectorConfig::cut_h_c_
double cut_h_c_
Definition: PPSAlignmentConfig.h:70
RPConfig::slope_
double slope_
Definition: PPSAlignmentConfig.h:47
SectorConfig::rp_F_
RPConfig rp_F_
Definition: PPSAlignmentConfig.h:66
PPSAlignmentConfig::matchingShiftRanges_
std::map< unsigned int, SelectionRange > matchingShiftRanges_
Definition: PPSAlignmentConfig.h:186
PPSAlignmentConfig::maxRPTracksSize_
unsigned int maxRPTracksSize_
Definition: PPSAlignmentConfig.h:182
PPSAlignmentConfig::sectorConfig56
const SectorConfig & sectorConfig56() const
Definition: PPSAlignmentConfig.cc:27
PPSAlignmentConfig::setBinning
void setBinning(Binning &binning)
Definition: PPSAlignmentConfig.cc:124
PPSAlignmentConfig::alignment_x_relative_ranges
const std::map< unsigned int, SelectionRange > & alignment_x_relative_ranges() const
Definition: PPSAlignmentConfig.cc:54
PPSAlignmentConfig::setMethOUncFitRange
void setMethOUncFitRange(double methOUncFitRange)
Definition: PPSAlignmentConfig.cc:106
PPSAlignmentConfig::maxRPTracksSize
double maxRPTracksSize() const
Definition: PPSAlignmentConfig.cc:36
PPSAlignmentConfig::y_mode_max_valid_
double y_mode_max_valid_
Definition: PPSAlignmentConfig.h:180
PPSAlignmentConfig::nearFarMinEntries_
unsigned int nearFarMinEntries_
Definition: PPSAlignmentConfig.h:195
PPSAlignmentConfig::chiSqThreshold
double chiSqThreshold() const
Definition: PPSAlignmentConfig.cc:32
RPConfig::x_slice_w_
double x_slice_w_
Definition: PPSAlignmentConfig.h:56
PPSAlignmentConfig::setFitProfileMinNReasonable
void setFitProfileMinNReasonable(unsigned int fitProfileMinNReasonable)
Definition: PPSAlignmentConfig.cc:102
PPSAlignmentConfig::binning_
Binning binning_
Definition: PPSAlignmentConfig.h:201
PPSAlignmentConfig::y_mode_sys_unc_
double y_mode_sys_unc_
Definition: PPSAlignmentConfig.h:177
PPSAlignmentConfig
Definition: PPSAlignmentConfig.h:94
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
PPSAlignmentConfig::setChiSqThreshold
void setChiSqThreshold(double chiSqThreshold)
Definition: PPSAlignmentConfig.cc:78
PPSAlignmentConfig::fitProfileMinBinEntries
unsigned int fitProfileMinBinEntries() const
Definition: PPSAlignmentConfig.cc:49
PPSAlignmentConfig::alignment_x_meth_o_ranges
const std::map< unsigned int, SelectionRange > & alignment_x_meth_o_ranges() const
Definition: PPSAlignmentConfig.cc:46
PPSAlignmentConfig::x_ali_sh_step_
double x_ali_sh_step_
Definition: PPSAlignmentConfig.h:175
PPSAlignmentConfig::setAlignment_x_relative_ranges
void setAlignment_x_relative_ranges(std::map< unsigned int, SelectionRange > &alignment_x_relative_ranges)
Definition: PPSAlignmentConfig.cc:108
SectorConfig::slope_
double slope_
Definition: PPSAlignmentConfig.h:67
PPSAlignmentConfig::n_si_
double n_si_
Definition: PPSAlignmentConfig.h:183
SectorConfig::cut_v_si_
double cut_v_si_
Definition: PPSAlignmentConfig.h:73
PPSAlignmentConfig::setFitProfileMinBinEntries
void setFitProfileMinBinEntries(unsigned int fitProfileMinBinEntries)
Definition: PPSAlignmentConfig.cc:99
PPSAlignmentConfig::n_si
double n_si() const
Definition: PPSAlignmentConfig.cc:37
SelectionRange::x_min_
double x_min_
Definition: PPSAlignmentConfig.h:35
RPConfig::x_min_fit_mode_
double x_min_fit_mode_
Definition: PPSAlignmentConfig.h:50
RPConfig::position_
std::string position_
Definition: PPSAlignmentConfig.h:46
PPSAlignmentConfig::setN_si
void setN_si(double n_si)
Definition: PPSAlignmentConfig.cc:85
PPSAlignmentConfig::resultsDir_
std::string resultsDir_
Definition: PPSAlignmentConfig.h:171
PointErrors::y_
double y_
Definition: PPSAlignmentConfig.h:34
PPSAlignmentConfig::modeGraphMinN
unsigned int modeGraphMinN() const
Definition: PPSAlignmentConfig.cc:62
PointErrors
Definition: PPSAlignmentConfig.h:23
PPSAlignmentConfig::alignment_y_ranges_
std::map< unsigned int, SelectionRange > alignment_y_ranges_
Definition: PPSAlignmentConfig.h:197
PPSAlignmentConfig::sectorConfig45_
SectorConfig sectorConfig45_
Definition: PPSAlignmentConfig.h:173
PPSAlignmentConfig::matchingShiftRanges
const std::map< unsigned int, SelectionRange > & matchingShiftRanges() const
Definition: PPSAlignmentConfig.cc:42
PPSAlignmentConfig::setMatchingShiftRanges
void setMatchingShiftRanges(std::map< unsigned int, SelectionRange > &matchingShiftRanges)
Definition: PPSAlignmentConfig.cc:91
PPSAlignmentConfig::setY_mode_max_valid
void setY_mode_max_valid(double y_mode_max_valid)
Definition: PPSAlignmentConfig.cc:82
PPSAlignmentConfig::setX_ali_sh_step
void setX_ali_sh_step(double x_ali_sh_step)
Definition: PPSAlignmentConfig.cc:75
PPSAlignmentConfig::setMethOGraphMinN
void setMethOGraphMinN(unsigned int methOGraphMinN)
Definition: PPSAlignmentConfig.cc:105
PPSAlignmentConfig::nearFarMinEntries
unsigned int nearFarMinEntries() const
Definition: PPSAlignmentConfig.cc:57
PPSAlignmentConfig::operator<<
friend std::ostream & operator<<(std::ostream &os, PPSAlignmentConfig c)
Definition: PPSAlignmentConfig.cc:163
RPConfig::y_cen_add_
double y_cen_add_
Definition: PPSAlignmentConfig.h:52
PPSAlignmentConfig::methOUncFitRange_
double methOUncFitRange_
Definition: PPSAlignmentConfig.h:192
PPSAlignmentConfig::setNearFarMinEntries
void setNearFarMinEntries(unsigned int nearFarMinEntries)
Definition: PPSAlignmentConfig.cc:112
Binning::y_max_
double y_max_
Definition: PPSAlignmentConfig.h:88
PPSAlignmentConfig::fitProfileMinNReasonable_
unsigned int fitProfileMinNReasonable_
Definition: PPSAlignmentConfig.h:190
PPSAlignmentConfig::y_mode_sys_unc
double y_mode_sys_unc() const
Definition: PPSAlignmentConfig.cc:31
RPConfig::x_slice_n_
int x_slice_n_
Definition: PPSAlignmentConfig.h:55
b
double b
Definition: hdecay.h:118
PPSAlignmentConfig::multSelProjYMinEntries
unsigned int multSelProjYMinEntries() const
Definition: PPSAlignmentConfig.cc:63
PPSAlignmentConfig::methOGraphMinN
unsigned int methOGraphMinN() const
Definition: PPSAlignmentConfig.cc:51
PPSAlignmentConfig::y_mode_max_valid
double y_mode_max_valid() const
Definition: PPSAlignmentConfig.cc:34
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PPSAlignmentConfig::fitProfileMinNReasonable
unsigned int fitProfileMinNReasonable() const
Definition: PPSAlignmentConfig.cc:50
PPSAlignmentConfig::sequence
const std::vector< std::string > & sequence() const
Definition: PPSAlignmentConfig.cc:23
SectorConfig::cut_v_apply_
bool cut_v_apply_
Definition: PPSAlignmentConfig.h:72
RPConfig::x_max_fit_mode_
double x_max_fit_mode_
Definition: PPSAlignmentConfig.h:50
PPSAlignmentConfig::methOUncFitRange
double methOUncFitRange() const
Definition: PPSAlignmentConfig.cc:52
RPConfig::name_
std::string name_
Definition: PPSAlignmentConfig.h:44
RPConfig
Definition: PPSAlignmentConfig.h:43
Binning
Definition: PPSAlignmentConfig.h:81
SectorConfig::cut_v_c_
double cut_v_c_
Definition: PPSAlignmentConfig.h:73
PPSAlignmentConfig::setSectorConfig45
void setSectorConfig45(SectorConfig &sectorConfig45)
Definition: PPSAlignmentConfig.cc:72
PPSAlignmentConfig::setY_mode_unc_max_valid
void setY_mode_unc_max_valid(double y_mode_unc_max_valid)
Definition: PPSAlignmentConfig.cc:79
PPSAlignmentConfig::setY_mode_sys_unc
void setY_mode_sys_unc(double y_mode_sys_unc)
Definition: PPSAlignmentConfig.cc:77
PPSAlignmentConfig::matchingReferencePoints_
std::map< unsigned int, std::vector< PointErrors > > matchingReferencePoints_
Definition: PPSAlignmentConfig.h:185
PointErrors::x_
double x_
Definition: PPSAlignmentConfig.h:33
RPConfig::y_max_fit_mode_
double y_max_fit_mode_
Definition: PPSAlignmentConfig.h:51
PPSAlignmentConfig::setMatchingReferencePoints
void setMatchingReferencePoints(std::map< unsigned int, std::vector< PointErrors >> &matchingReferencePoints)
Definition: PPSAlignmentConfig.cc:87
PPSAlignmentConfig::sectorConfig56_
SectorConfig sectorConfig56_
Definition: PPSAlignmentConfig.h:173
RPConfig::sh_x_
double sh_x_
Definition: PPSAlignmentConfig.h:48
PPSAlignmentConfig::multSelProjYMinEntries_
unsigned int multSelProjYMinEntries_
Definition: PPSAlignmentConfig.h:199
RPConfig::id_
unsigned int id_
Definition: PPSAlignmentConfig.h:45
Binning::n_bins_y_
unsigned int n_bins_y_
Definition: PPSAlignmentConfig.h:87
PPSAlignmentConfig::setAlignment_y_ranges
void setAlignment_y_ranges(std::map< unsigned int, SelectionRange > &alignment_y_ranges)
Definition: PPSAlignmentConfig.cc:116
Serializable.h
SelectionRange::x_max_
double x_max_
Definition: PPSAlignmentConfig.h:36
PPSAlignmentConfig::x_ali_sh_step
double x_ali_sh_step() const
Definition: PPSAlignmentConfig.cc:29
PPSAlignmentConfig::setMultSelProjYMinEntries
void setMultSelProjYMinEntries(unsigned int multSelProjYMinEntries)
Definition: PPSAlignmentConfig.cc:120
PPSAlignmentConfig::setResultsDir
void setResultsDir(std::string &resultsDir)
Definition: PPSAlignmentConfig.cc:70
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
PointErrors::ey_
double ey_
Definition: PPSAlignmentConfig.h:36
PPSAlignmentConfig::resultsDir
const std::string & resultsDir() const
Definition: PPSAlignmentConfig.cc:24
operator<<
std::ostream & operator<<(std::ostream &os, RPConfig &rc)
Definition: PPSAlignmentConfig.cc:128
PPSAlignmentConfig::alignment_x_meth_o_ranges_
std::map< unsigned int, SelectionRange > alignment_x_meth_o_ranges_
Definition: PPSAlignmentConfig.h:188
PPSAlignmentConfig::y_mode_unc_max_valid_
double y_mode_unc_max_valid_
Definition: PPSAlignmentConfig.h:179
SectorConfig::cut_h_apply_
bool cut_h_apply_
Definition: PPSAlignmentConfig.h:69
PPSAlignmentConfig::setModeGraphMinN
void setModeGraphMinN(unsigned int modeGraphMinN)
Definition: PPSAlignmentConfig.cc:119
PPSAlignmentConfig::chiSqThreshold_
double chiSqThreshold_
Definition: PPSAlignmentConfig.h:178
PPSAlignmentConfig::matchingReferencePoints
const std::map< unsigned int, std::vector< PointErrors > > & matchingReferencePoints() const
Definition: PPSAlignmentConfig.cc:39
RPConfig::y_width_mult_
double y_width_mult_
Definition: PPSAlignmentConfig.h:53
SectorConfig::rp_N_
RPConfig rp_N_
Definition: PPSAlignmentConfig.h:66
Binning::pixel_x_offset_
double pixel_x_offset_
Definition: PPSAlignmentConfig.h:85
PPSAlignmentConfig::sequence_
std::vector< std::string > sequence_
Definition: PPSAlignmentConfig.h:170
PPSAlignmentConfig::alignment_x_relative_ranges_
std::map< unsigned int, SelectionRange > alignment_x_relative_ranges_
Definition: PPSAlignmentConfig.h:194
SelectionRange
Definition: PPSAlignmentConfig.h:34
PPSAlignmentConfig::y_mode_unc_max_valid
double y_mode_unc_max_valid() const
Definition: PPSAlignmentConfig.cc:33
PPSAlignmentConfig::setMaxRPTracksSize
void setMaxRPTracksSize(unsigned int maxRPTracksSize)
Definition: PPSAlignmentConfig.cc:84
PointErrors::ex_
double ex_
Definition: PPSAlignmentConfig.h:35
SectorConfig::cut_v_a_
double cut_v_a_
Definition: PPSAlignmentConfig.h:73
SectorConfig::cut_h_si_
double cut_h_si_
Definition: PPSAlignmentConfig.h:70
PPSAlignmentConfig::alignment_y_ranges
const std::map< unsigned int, SelectionRange > & alignment_y_ranges() const
Definition: PPSAlignmentConfig.cc:59
PPSAlignmentConfig::modeGraphMinN_
unsigned int modeGraphMinN_
Definition: PPSAlignmentConfig.h:198
genParticles_cff.map
map
Definition: genParticles_cff.py:11
PPSAlignmentConfig::fitProfileMinBinEntries_
unsigned int fitProfileMinBinEntries_
Definition: PPSAlignmentConfig.h:189
PPSAlignmentConfig::setSectorConfig56
void setSectorConfig56(SectorConfig &sectorConfig56)
Definition: PPSAlignmentConfig.cc:73
SectorConfig::cut_h_a_
double cut_h_a_
Definition: PPSAlignmentConfig.h:70
SectorConfig
Definition: PPSAlignmentConfig.h:64
PPSAlignmentConfig::setAlignment_x_meth_o_ranges
void setAlignment_x_meth_o_ranges(std::map< unsigned int, SelectionRange > &alignment_x_meth_o_ranges)
Definition: PPSAlignmentConfig.cc:95
PPSAlignmentConfig::binning
const Binning & binning() const
Definition: PPSAlignmentConfig.cc:65
Binning::y_min_
double y_min_
Definition: PPSAlignmentConfig.h:88
PPSAlignmentConfig::methOGraphMinN_
unsigned int methOGraphMinN_
Definition: PPSAlignmentConfig.h:191
Binning::n_bins_x_
unsigned int n_bins_x_
Definition: PPSAlignmentConfig.h:83
PPSAlignmentConfig::setSequence
void setSequence(std::vector< std::string > &sequence)
Definition: PPSAlignmentConfig.cc:69