AnalysisEfficiency.h 3.38 KB
Newer Older
1
2
3
/**
 * @file
 * @brief Definition of [AnalysisEfficiency] module
4
5
 *
 * @copyright Copyright (c) 2017-2020 CERN and the Corryvreckan authors.
6
7
8
9
10
11
12
13
14
15
16
17
18
 * 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.
 *
 * Contains minimal dummy module to use as a start for the development of your own module
 *
 * Refer to the User's Manual for more details.
 */

#include <iostream>

#include "core/module/Module.hpp"

19
20
21
#include "TEfficiency.h"
#include "TH2D.h"
#include "TNamed.h"
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "TProfile2D.h"

namespace corryvreckan {
    /** @ingroup Modules
     * @brief Module to do function
     *
     * More detailed explanation of module
     */
    class AnalysisEfficiency : public Module {

    public:
        /**
         * @brief Constructor for this unique module
         * @param config Configuration object for this module as retrieved from the steering file
         * @param detector Pointer to the detector for this module instance
         */
38
        AnalysisEfficiency(Configuration& config, std::shared_ptr<Detector> detector);
39
        void initialize() override;
40
        StatusCode run(const std::shared_ptr<Clipboard>& clipboard) override;
41
        void finalize(const std::shared_ptr<ReadonlyClipboard>& clipboard) override;
42
43
44
45

    private:
        std::shared_ptr<Detector> m_detector;

46
        TH1D* hPixelEfficiency;
47
        TH1D* hPixelEfficiencyMatrix;
48

49
50
51
        // Profile version
        TProfile2D* hPixelEfficiencyMap_trackPos_TProfile;
        TProfile2D* hChipEfficiencyMap_trackPos_TProfile;
52
        TProfile2D* hPixelEfficiencyMatrix_TProfile;
53
54
55
56
        TProfile2D* hGlobalEfficiencyMap_trackPos_TProfile;
        TProfile2D* hChipEfficiencyMap_clustPos_TProfile;
        TProfile2D* hGlobalEfficiencyMap_clustPos_TProfile;
        // TEfficiency version
57
58
59
60
61
        TEfficiency* hPixelEfficiencyMap_trackPos;
        TEfficiency* hChipEfficiencyMap_trackPos;
        TEfficiency* hGlobalEfficiencyMap_trackPos;
        TEfficiency* hChipEfficiencyMap_clustPos;
        TEfficiency* hGlobalEfficiencyMap_clustPos;
62

63
        TEfficiency* eTotalEfficiency;
64
65
        TEfficiency* efficiencyColumns;
        TEfficiency* efficiencyRows;
66

67
        TH1D* hDistanceCluster;
68
69
70
71
72
73
74
75
76
77
78
        TH1D* hTimeDiffPrevTrack_assocCluster;
        TH1D* hTimeDiffPrevTrack_noAssocCluster;
        TH1D* hRowDiffPrevTrack_assocCluster;
        TH1D* hColDiffPrevTrack_assocCluster;
        TH1D* hRowDiffPrevTrack_noAssocCluster;
        TH1D* hColDiffPrevTrack_noAssocCluster;
        TH1D* hTrackTimeToPrevHit_matched;
        TH1D* hTrackTimeToPrevHit_notmatched;

        TH2D* hPosDiffPrevTrack_assocCluster;
        TH2D* hPosDiffPrevTrack_noAssocCluster;
79
        TH2D* hDistanceCluster_track;
80
        double m_chi2ndofCut, m_timeCutFrameEdge, m_inpixelBinSize, m_inpixelEdgeCut;
81
        int m_maskedPixelDistanceCut = 1;
82
83
84
85
86
87
        int total_tracks = 0;
        int matched_tracks = 0;

        double last_track_timestamp = 0;
        double last_track_col = 0.;
        double last_track_row = 0.;
88
        double n_track = 0, n_chi2 = 0, n_dut = 0, n_roi = 0, n_masked = 0, n_frameedge = 0;
89
90

        Matrix<double> prev_hit_ts; // matrix containing previous hit timestamp for every pixel
91
92
93
    };

} // namespace corryvreckan