107 : esTokenBookHistograms_(
114 debug_(iConfig.getParameter<bool>(
"debug")) {
116 li <<
"[worker] parameters:\n";
119 li <<
"* folder: " <<
folder_ <<
"\n";
120 li <<
"* debug: " << std::boolalpha <<
debug_;
146 desc.
add<
bool>(
"debug",
false);
161 auto profilePtr = std::make_unique<TProfile>(
163 p_y_diffFN_vs_y = iBooker.
bookProfile(
"p_y_diffFN_vs_y", profilePtr.get());
166 h2_y_diffFN_vs_y = iBooker.
book2DD(
"h2_y_diffFN_vs_y",
189 const double x_min_pix = pixel_x_offset, x_max_pix = pixel_x_offset + n_bins_x * bin_size_x;
190 const double x_min_str = 0., x_max_str = n_bins_x * bin_size_x;
198 iBooker.
book2DD(
"h2_y_vs_x",
";x;y", n_bins_x, x_min_str, x_max_str, n_bins_y, y_min, y_max);
201 iBooker.
book2DD(
"h2_y_vs_x",
";x;y", n_bins_x, x_min_pix, x_max_pix, n_bins_y, y_min, y_max);
205 iBooker.
book2DD(
"h2_y_vs_x",
";x;y", n_bins_x, x_min_str, x_max_str, n_bins_y, y_min, y_max);
208 iBooker.
book2DD(
"h2_y_vs_x",
";x;y", n_bins_x, x_min_pix, x_max_pix, n_bins_y, y_min, y_max);
212 iBooker.
book2DD(
"h2_y_vs_x",
";x;y", n_bins_x, x_min_str, x_max_str, n_bins_y, y_min, y_max);
215 iBooker.
book2DD(
"h2_y_vs_x",
";x;y", n_bins_x, x_min_pix, x_max_pix, n_bins_y, y_min, y_max);
222 iBooker.
book2DD(
"h2_cut_h_bef",
";x_up;x_dw", n_bins_x, x_min_str, x_max_str, n_bins_x, x_min_pix, x_max_pix);
224 iBooker.
book2DD(
"h2_cut_h_aft",
";x_up;x_dw", n_bins_x, x_min_str, x_max_str, n_bins_x, x_min_pix, x_max_pix);
229 h2_cut_v_bef = iBooker.
book2DD(
"h2_cut_v_bef",
";y_up;y_dw", n_bins_y, y_min, y_max, n_bins_y, y_min, y_max);
230 h2_cut_v_aft = iBooker.
book2DD(
"h2_cut_v_aft",
";y_up;y_dw", n_bins_y, y_min, y_max, n_bins_y, y_min, y_max);
235 auto profilePtr = std::make_unique<TProfile>(
"",
236 ";x_{N};x_{F} - x_{N}",
247 sprintf(
buf,
"%.1f-%.1f", x_min, x_max);
258 sprintf(
buf,
"%.1f-%.1f", x_min, x_max);
270 for (
const auto& tr : tracks) {
272 unsigned int rpDecId = rpId.
arm() * 100 + rpId.station() * 10 + rpId.rp();
279 tracksUp.push_back(tr);
281 tracksDw.push_back(tr);
285 for (
const auto& tr : tracksUp)
288 for (
const auto& tr : tracksDw)
299 for (
const auto& tr : tracksUp)
302 for (
const auto& tr : tracksDw)
306 unsigned int pairsSelected = 0;
308 for (
const auto& trUp : tracksUp) {
309 for (
const auto& trDw : tracksDw) {
321 bool cutsPassed =
true;
344 x_slice_plots_N[idx].p_y_diffFN_vs_y->Fill(trUp.y(), trDw.y() - trUp.y());
346 x_slice_plots_N[idx].h2_y_diffFN_vs_y->Fill(trUp.y(), trDw.y() - trUp.y());
352 x_slice_plots_F[idx].p_y_diffFN_vs_y->Fill(trDw.y(), trDw.y() - trUp.y());
354 x_slice_plots_F[idx].h2_y_diffFN_vs_y->Fill(trDw.y(), trDw.y() - trUp.y());
360 return pairsSelected;
std::map< unsigned int, SlicePlots > x_slice_plots_F
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
std::map< unsigned int, MonitorElement * > m_h2_y_vs_x_bef_sel
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void bookHistograms(DQMStore::IBooker &iBooker, edm::Run const &, edm::EventSetup const &iSetup) override
unsigned int process(const CTPPSLocalTrackLiteCollection &tracks, const PPSAlignmentConfiguration &cfg, bool debug)
edm::ESGetToken< PPSAlignmentConfiguration, PPSAlignmentConfigurationRcd > esTokenBookHistograms_
unsigned int slice_n_bins_y_
MonitorElement * h_q_cut_h_bef
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * h2_cut_h_aft
#define DEFINE_FWK_MODULE(type)
MonitorElement * p_y_diffFN_vs_y_F
auto const & tracks
cannot be loose
std::map< unsigned int, MonitorElement * > m_h2_y_vs_x_aft_sel
void init(DQMStore::IBooker &iBooker, const PPSAlignmentConfiguration &cfg, const PPSAlignmentConfiguration::SectorConfig &scfg, const std::string &folder, bool debug)
MonitorElement * p_x_diffFN_vs_x_N
bool getData(T &iHolder) const
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
MonitorElement * book1DD(TString const &name, TString const &title, int nchX, double lowX, double highX, FUNC onbooking=NOOP())
MonitorElement * h_q_cut_h_aft
MonitorElement * h2_cut_v_bef
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
PPSAlignmentWorker(const edm::ParameterSet &iConfig)
if(conf_.getParameter< bool >("UseStripCablingDB"))
const Binning & binning() const
bool get(ProductID const &oid, Handle< PROD > &result) const
MonitorElement * h2_cut_h_bef
PPSAlignmentConfiguration::SectorConfig scfg_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
unsigned int slice_n_bins_x_
MonitorElement * h_q_cut_v_aft
MonitorElement * h2_cut_v_aft
edm::EDGetTokenT< CTPPSLocalTrackLiteCollection > tracksToken_
MonitorElement * h2_y_diffFN_vs_y
double maxRPTracksSize() const
Log< level::Info, false > LogInfo
double minRPTracksSize() const
std::vector< CTPPSLocalTrackLite > CTPPSLocalTrackLiteCollection
Collection of CTPPSLocalTrackLite objects.
T getParameter(std::string const &) const
MonitorElement * book2DD(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Base class for CTPPS detector IDs.
std::map< unsigned int, SlicePlots > x_slice_plots_N
edm::ESGetToken< PPSAlignmentConfiguration, PPSAlignmentConfigurationRcd > esTokenAnalyze_
std::map< unsigned int, MonitorElement * > m_h2_y_vs_x_mlt_sel
unsigned int diffFN_n_bins_x_
MonitorElement * p_y_diffFN_vs_y
MonitorElement * h_q_cut_v_bef