76 void fill(
const double y,
const double yDiff,
const bool debug);
95 std::vector<edm::EDGetTokenT<CTPPSLocalTrackLiteCollection>>
tracksTokens_;
107 : esTokenBookHistograms_(
112 tracksTags_(iConfig.getParameter<std::
vector<edm::
InputTag>>(
"tracksTags")),
113 dqmDir_(iConfig.getParameter<std::
string>(
"dqm_dir")),
114 debug_(iConfig.getParameter<bool>(
"debug")) {
116 li <<
"parameters:\n";
118 li <<
"* tracksTags:\n";
120 li <<
" " <<
tag <<
",\n";
122 li <<
"* dqm_dir: " <<
dqmDir_ <<
"\n";
123 li <<
"* debug: " << std::boolalpha <<
debug_;
140 bool foundProduct =
false;
164 desc.
add<std::vector<edm::InputTag>>(
"tracksTags", {
edm::InputTag(
"ctppsLocalTrackLiteProducer")});
166 desc.
add<
bool>(
"debug",
false);
181 auto profilePtr = std::make_unique<TProfile>(
183 p_y_diffFN_vs_y = iBooker.
bookProfile(
"p_y_diffFN_vs_y", profilePtr.get());
186 h2_y_diffFN_vs_y = iBooker.
book2DD(
"h2_y_diffFN_vs_y",
198 p_y_diffFN_vs_y->Fill(y, yDiff);
200 h2_y_diffFN_vs_y->Fill(y, yDiff);
216 const double x_min_pix = pixel_x_offset, x_max_pix = pixel_x_offset + n_bins_x * bin_size_x;
217 const double x_min_str = 0., x_max_str = n_bins_x * bin_size_x;
225 iBooker.
book2DD(
"h2_y_vs_x",
";x;y", n_bins_x, x_min_str, x_max_str, n_bins_y, y_min, y_max);
228 iBooker.
book2DD(
"h2_y_vs_x",
";x;y", n_bins_x, x_min_pix, x_max_pix, n_bins_y, y_min, y_max);
232 iBooker.
book2DD(
"h2_y_vs_x",
";x;y", n_bins_x, x_min_str, x_max_str, n_bins_y, y_min, y_max);
235 iBooker.
book2DD(
"h2_y_vs_x",
";x;y", n_bins_x, x_min_pix, x_max_pix, n_bins_y, y_min, y_max);
239 iBooker.
book2DD(
"h2_y_vs_x",
";x;y", n_bins_x, x_min_str, x_max_str, n_bins_y, y_min, y_max);
242 iBooker.
book2DD(
"h2_y_vs_x",
";x;y", n_bins_x, x_min_pix, x_max_pix, n_bins_y, y_min, y_max);
249 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);
251 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);
256 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);
257 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);
262 auto profilePtr = std::make_unique<TProfile>(
"",
263 ";x_{N};x_{F} - x_{N}",
275 sprintf(
buf,
"%.1f-%.1f", x_min, x_max);
286 sprintf(
buf,
"%.1f-%.1f", x_min, x_max);
298 for (
const auto& tr : tracks) {
300 unsigned int rpDecId = rpId.
arm() * 100 + rpId.station() * 10 + rpId.rp();
307 tracksUp.push_back(tr);
309 tracksDw.push_back(tr);
313 for (
const auto& tr : tracksUp)
316 for (
const auto& tr : tracksDw)
327 for (
const auto& tr : tracksUp)
330 for (
const auto& tr : tracksDw)
334 unsigned int pairsSelected = 0;
335 for (
const auto& trUp : tracksUp) {
336 for (
const auto& trDw : tracksDw) {
350 bool cutsPassed =
true;
383 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)
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
const std::vector< edm::InputTag > tracksTags_
std::map< unsigned int, MonitorElement * > m_h2_y_vs_x_aft_sel
MonitorElement * p_x_diffFN_vs_x_N
bool getData(T &iHolder) const
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
MonitorElement * book1DD(TString const &name, TString const &title, int nchX, double lowX, double highX, FUNC onbooking=NOOP())
MonitorElement * h_q_cut_h_aft
const edm::ESGetToken< PPSAlignmentConfiguration, PPSAlignmentConfigurationRcd > esTokenAnalyze_
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())
const std::string dqmDir_
PPSAlignmentWorker(const edm::ParameterSet &iConfig)
if(conf_.getParameter< bool >("UseStripCablingDB"))
const Binning & binning() 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
MonitorElement * h2_y_diffFN_vs_y
double maxRPTracksSize() const
void init(DQMStore::IBooker &iBooker, const PPSAlignmentConfiguration &cfg, const PPSAlignmentConfiguration::SectorConfig &scfg, const std::string &rootDir, bool debug)
Log< level::Info, false > LogInfo
void fill(const double y, const double yDiff, const bool debug)
double minRPTracksSize() const
std::vector< CTPPSLocalTrackLite > CTPPSLocalTrackLiteCollection
Collection of CTPPSLocalTrackLite objects.
T getParameter(std::string const &) const
const edm::ESGetToken< PPSAlignmentConfiguration, PPSAlignmentConfigurationRcd > esTokenBookHistograms_
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
std::map< unsigned int, MonitorElement * > m_h2_y_vs_x_mlt_sel
std::vector< edm::EDGetTokenT< CTPPSLocalTrackLiteCollection > > tracksTokens_
unsigned int diffFN_n_bins_x_
MonitorElement * p_y_diffFN_vs_y
MonitorElement * h_q_cut_v_bef