src/modules/DetectorHistogrammer/DetectorHistogrammerModule.hpp
Definition of detector histogramming module. More…
Namespaces
Name |
---|
allpix Helper class to hold support layers for a detector model. |
Classes
Name | |
---|---|
class | allpix::DetectorHistogrammerModule Module to plot the final digitized pixel data. |
Detailed Description
Definition of detector histogramming module.
Copyright: Copyright (c) 2017-2024 CERN and the Allpix Squared authors. This software is distributed under the terms of the MIT License, copied verbatim in the file “LICENSE.md”. In applying this license, CERN does not waive the privileges and immunities granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction. SPDX-License-Identifier: MIT
Source code
#ifndef ALLPIX_MODULE_DETECTOR_HISTOGRAMMER_H
#define ALLPIX_MODULE_DETECTOR_HISTOGRAMMER_H
#include <atomic>
#include <memory>
#include <string>
#include <vector>
#include <TH1I.h>
#include <TH2I.h>
#include <TProfile.h>
#include <TProfile2D.h>
#include "core/config/Configuration.hpp"
#include "core/geometry/GeometryManager.hpp"
#include "core/messenger/Messenger.hpp"
#include "core/module/Event.hpp"
#include "core/module/Module.hpp"
#include "Cluster.hpp"
#include "objects/PixelHit.hpp"
#include "tools/ROOT.h"
namespace allpix {
class DetectorHistogrammerModule : public Module {
public:
DetectorHistogrammerModule(Configuration& config, Messenger*, std::shared_ptr<Detector>);
void initialize() override;
void run(Event*) override;
void finalize() override;
private:
std::vector<Cluster> doClustering(std::shared_ptr<PixelHitMessage>& pixels_message) const;
static std::vector<const MCParticle*> getPrimaryParticles(std::shared_ptr<MCParticleMessage>& mcparticle_message);
Messenger* messenger_;
std::shared_ptr<Detector> detector_;
// Statistics
std::atomic<unsigned long> total_hits_{};
// Cut criteria for efficiency measurement:
ROOT::Math::XYVector matching_cut_{};
// Reference track resolution
ROOT::Math::XYVector track_resolution_{};
// Histograms to output
Histogram<TH2D> hit_map, hit_map_global, hit_map_local, hit_map_local_mc, charge_map, cluster_map, polar_hit_map;
Histogram<TProfile2D> cluster_size_map_local, cluster_size_map, cluster_size_x_map, cluster_size_y_map;
Histogram<TProfile2D> cluster_charge_map, seed_charge_map;
Histogram<TProfile2D> residual_map, residual_x_map, residual_y_map, residual_detector, residual_x_detector,
residual_y_detector;
Histogram<TH1D> residual_x, residual_y, residual_r, residual_phi;
Histogram<TProfile> residual_x_vs_x, residual_y_vs_y, residual_x_vs_y, residual_y_vs_x;
Histogram<TProfile2D> efficiency_map, efficiency_local, efficiency_detector;
Histogram<TProfile> efficiency_vs_x, efficiency_vs_y;
Histogram<TH1D> event_size;
Histogram<TH1D> cluster_size, cluster_size_x, cluster_size_y;
Histogram<TH1D> n_cluster;
Histogram<TH1D> cluster_charge, pixel_charge, total_charge, cluster_seed_charge;
};
} // namespace allpix
#endif /* ALLPIX_MODULE_DETECTOR_HISTOGRAMMER_H */
Updated on 2024-12-13 at 08:31:37 +0000