-
Notifications
You must be signed in to change notification settings - Fork 2
Add RecHit #5
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
base: main
Are you sure you want to change the base?
Add RecHit #5
Changes from all commits
d9f71f2
a2ca5b2
668f31e
a5f1b5a
807d28d
2ebed80
9d4c399
56e7960
5580f28
e12c868
b8212b5
7ac38a0
e9c61ea
9286927
07ca11d
9b7c58c
ddac47a
48f111f
e87e1bc
71ab115
b84aa05
de59998
c65136c
8cd7edc
9a581d2
38cd925
0971774
8a7efd7
0554e47
4ac87a3
8f776e3
8989d3c
888722b
33c6eee
6678dd8
46f207b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| #pragma once | ||
|
|
||
| #include <array> | ||
| #include <cstdint> | ||
|
|
||
| #include "SHiP/SimHit.hpp" | ||
|
|
||
| namespace SHiP { | ||
|
|
||
| /// Reconstructed particle | ||
| struct RecHit { | ||
| std::int32_t detectorId{0}; | ||
| std::int32_t trackId{0}; | ||
| std::int32_t pdgCode{0}; | ||
| std::array<double, 3> position{0, 0, 0}; ///< Hit position [mm] | ||
| std::array<double, 3> momentum{0, 0, 0}; ///< Momentum at hit [GeV/c] | ||
| double energyDeposit{0}; ///< Energy deposited [GeV] | ||
| double time{0}; ///< Global time [ns] | ||
| double pathLength{0}; ///< Step length [mm] | ||
| }; | ||
|
|
||
| inline RecHit fromSimHit(SimHit const& sp) { | ||
| return {.detectorId = sp.detectorId, | ||
| .trackId = sp.trackId, | ||
| .pdgCode = sp.pdgCode, | ||
| .position = sp.position, | ||
| .momentum = sp.momentum, | ||
| .energyDeposit = sp.energyDeposit, | ||
| .time = sp.time, | ||
| .pathLength = sp.pathLength}; | ||
| } | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| } // namespace SHiP | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| #pragma once | ||
|
|
||
| #include <array> | ||
| #include <vector> | ||
| #include <cstdint> | ||
|
|
||
| namespace SHiP { | ||
|
|
||
| /// Reconstructed particle | ||
|
mesmith75 marked this conversation as resolved.
|
||
| struct TrackFitResult { | ||
| std::int32_t nMeas{0}; | ||
| std::int32_t fitStatus{1}; // 0 = success, 1 = failure | ||
| double chi2{0}; | ||
| std::int32_t ndf{0}; | ||
| double qoverp{0}; | ||
| double phi{0}; | ||
| double theta{0}; | ||
| double time{0}; | ||
| std::array<double, 3> refLoc{0,0,0}; | ||
| std::vector<double> inputMeasurementsX{}; | ||
| std::vector<double> inputMeasurementsY{}; | ||
| std::vector<double> fittedMeasurementsX{}; | ||
| std::vector<double> fittedMeasurementsY{}; | ||
| std::vector<double> residualsX{}; | ||
| std::vector<double> residualsY{}; | ||
| }; | ||
| } // namespace SHiP | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #pragma once | ||
| #include "SHiP/RecHit.hpp" | ||
|
|
||
| namespace SHiP { | ||
|
|
||
| /// Hit reconstructed by the calorimeter | ||
| struct CaloHit{ | ||
| RecHit recHit; ///< The reconstructed hit | ||
| }; | ||
|
|
||
| } // namespace SHiP |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is currently unused. Was the intention to use this as the type of
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is used in the digitisation and will be in the reconstruction. I guess we could use it in Aegir too. The point is to make sure that each detector always uses something consistent. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| // SHiP/DetectorID.hpp | ||
|
mesmith75 marked this conversation as resolved.
|
||
| #pragma once | ||
|
|
||
| #include <cstdint> | ||
|
|
||
| namespace SHiP { | ||
|
|
||
| enum class DetectorID : std::int32_t { | ||
| StrawTubes = 2, | ||
| Calorimeter = 3, | ||
| UpstreamTagger = 0, | ||
| SurroundTagger = 1, | ||
| TimingDetector = 4 | ||
| }; | ||
|
|
||
| } // namespace SHiP | ||
|
mesmith75 marked this conversation as resolved.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #pragma once | ||
| #include "SHiP/RecHit.hpp" | ||
|
|
||
| namespace SHiP { | ||
|
|
||
| /// Hit reconstructed by the SBT (Surround Background Tagger) | ||
| struct SBTHit{ | ||
| RecHit recHit; ///< The reconstructed hit | ||
| }; | ||
|
|
||
| } // namespace SHiP |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #pragma once | ||
| #include "SHiP/RecHit.hpp" | ||
|
|
||
| namespace SHiP { | ||
|
|
||
| /// Hit reconstructed by a layer of the straw tubes spectrometer | ||
| struct StrawTubesHit{ | ||
| RecHit recHit; ///< The reconstructed hit | ||
| }; | ||
|
|
||
| } // namespace SHiP |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #pragma once | ||
| #include "SHiP/RecHit.hpp" | ||
|
|
||
| namespace SHiP { | ||
|
|
||
| /// Hit reconstructed by the timing detector | ||
| struct TimeDetHit{ | ||
| RecHit recHit; ///< The reconstructed hit | ||
| }; | ||
|
|
||
| } // namespace SHiP |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #pragma once | ||
| #include "SHiP/RecHit.hpp" | ||
|
|
||
| namespace SHiP { | ||
|
|
||
| /// Hit reconstructed by the UBT (Upstream Background Tagger) | ||
| struct UBTHit{ | ||
| RecHit recHit; ///< The reconstructed hit | ||
| }; | ||
|
|
||
| } // namespace SHiP |
Uh oh!
There was an error while loading. Please reload this page.