Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Enhance RootTrackParameterWriter with residuals and pulls #3666

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the Acts project.
//
// Copyright (C) 2017-2018 CERN for the benefit of the Acts project
// Copyright (C) 2017-2024 CERN for the benefit of the Acts project
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -23,9 +23,6 @@

class TFile;
class TTree;
namespace ActsFatras {
class Barcode;
} // namespace ActsFatras

namespace ActsExamples {
struct AlgorithmContext;
Expand Down Expand Up @@ -95,29 +92,68 @@ class RootTrackParameterWriter final : public TrackParameterWriter {
ReadDataHandle<HitSimHitsMap> m_inputMeasurementSimHitsMap{
this, "InputMeasurementSimHitsMap"};

std::mutex m_writeMutex; ///< Mutex used to protect multi-threaded writes
TFile* m_outputFile{nullptr}; ///< The output file
TTree* m_outputTree{nullptr}; ///< The output tree
int m_eventNr{0}; ///< the event number of

float m_loc0{NaNfloat}; ///< loc0
float m_loc1{NaNfloat}; ///< loc1
float m_phi{NaNfloat}; ///< phi
float m_theta{NaNfloat}; ///< theta
float m_qop{NaNfloat}; ///< q/p
float m_time{NaNfloat}; ///< time
float m_p{NaNfloat}; ///< p
float m_pt{NaNfloat}; ///< pt
float m_eta{NaNfloat}; ///< eta

int m_t_charge{0}; ///< Truth particle charge
float m_t_loc0{NaNfloat}; ///< Truth parameter loc0
float m_t_loc1{NaNfloat}; ///< Truth parameter loc1
float m_t_phi{NaNfloat}; ///< Truth parameter phi
float m_t_theta{NaNfloat}; ///< Truth parameter theta
float m_t_qop{NaNfloat}; ///< Truth parameter qop
float m_t_time{NaNfloat}; ///< Truth parameter time
bool m_truthMatched = false; ///< Whether the seed is matched with truth
/// Mutex used to protect multi-threaded writes
std::mutex m_writeMutex;
TFile* m_outputFile{nullptr};
TTree* m_outputTree{nullptr};

int m_eventNr{0};

int m_volumeId{0};
int m_layerId{0};
int m_surfaceId{0};

// Track parameters
float m_loc0{NaNfloat};
float m_loc1{NaNfloat};
float m_phi{NaNfloat};
float m_theta{NaNfloat};
float m_qop{NaNfloat};
float m_time{NaNfloat};

float m_err_loc0{NaNfloat};
float m_err_loc1{NaNfloat};
float m_err_phi{NaNfloat};
float m_err_theta{NaNfloat};
float m_err_qop{NaNfloat};
float m_err_time{NaNfloat};

int m_charge{0};
float m_p{NaNfloat};
float m_pt{NaNfloat};
float m_eta{NaNfloat};

// Truth parameters
/// Whether the seed is matched with truth
bool m_t_matched{false};
std::uint64_t m_t_particleId{0};
unsigned int m_nMajorityHits{0};

float m_t_loc0{NaNfloat};
float m_t_loc1{NaNfloat};
float m_t_phi{NaNfloat};
float m_t_theta{NaNfloat};
float m_t_qop{NaNfloat};
float m_t_time{NaNfloat};

int m_t_charge{0};
float m_t_p{NaNfloat};
float m_t_pt{NaNfloat};
float m_t_eta{NaNfloat};

float m_res_loc0{NaNfloat};
float m_res_loc1{NaNfloat};
float m_res_phi{NaNfloat};
float m_res_theta{NaNfloat};
float m_res_qop{NaNfloat};
float m_res_time{NaNfloat};

float m_pull_loc0{NaNfloat};
float m_pull_loc1{NaNfloat};
float m_pull_phi{NaNfloat};
float m_pull_theta{NaNfloat};
float m_pull_qop{NaNfloat};
float m_pull_time{NaNfloat};
};

} // namespace ActsExamples
Loading
Loading