-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTrackingInfo.h
86 lines (74 loc) · 2.75 KB
/
TrackingInfo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/**
* @file
* @brief Definition of module TrackingInfo
*
* @copyright Copyright (c) 2020-2023 CERN, LUXE, TAU and the Corryvreckan 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.
*/
#ifndef TrackingInfo_H
#define TrackingInfo_H
#include <TCanvas.h>
#include <TH1F.h>
#include <TH2F.h>
#include <TTree.h>
#include <iostream>
#include "core/module/Module.hpp"
#include "objects/Cluster.hpp"
#include "objects/Pixel.hpp"
#include "objects/Track.hpp"
namespace corryvreckan {
/** @ingroup TrackingInfo
* @brief Dump the details of the telescope tracks
*
* Go over through track on the clipboard and extra information and store on TTree object(s).
*/
class TrackingInfo : public Module {
public:
/**
* @brief Constructor for TrackingInfo
* @param config Configuration object for this module as retrieved from the steering file
* @param detectors Vector of pointers to the detectors
*/
TrackingInfo(Configuration& config, std::vector<std::shared_ptr<Detector>> detectors);
/**
* @brief [Initialise TrackingInfo]
*/
void initialize() override;
/**
* @brief [Run the function of TrackingInfo]
*/
StatusCode run(const std::shared_ptr<Clipboard>& clipboard) override;
/**
* @brief [Finalise TrackingInfo]
*/
void finalize(const std::shared_ptr<ReadonlyClipboard>& clipboard) override;
private:
// Event counter
int m_eventNumber;
// Common information
uint32_t triggerId; std::vector<uint32_t> triggerId_vec;
double triggerTimestamp; std::vector<double> triggerTimestamp_vec;
// Storage TTree objects
TTree* Tracks;
std::vector<ushort> trackId_vec;
std::vector<double> x_dut, y_dut;
std::vector<double> chi2_vec; std::vector<uint> ndof_vec;
std::vector<uint> num_cluster_vec;
// Storage TTree objects
TTree* TTracks;
ushort trackId;
std::vector<double> x_tel, y_tel, z_tel;
std::vector<double> ax_tel, ay_tel, az_tel;
std::vector<double> x_res, y_res, z_res;
std::vector<double> x_hit, y_hit, z_hit;
std::vector<double> x_uncertainty, y_uncertainty;
double chi2; uint ndof;
ushort num_cluster;
ushort cluster_status; // Bitwise cluster status code (e.g. 111011)
// Parameters
double z_dut_;
};
} // namespace corryvreckan
#endif // TrackingInfo_H