Skip to content

Commit 916c65a

Browse files
wdconincveprblmdiefent
authored
feat: add Truthiness datatype for Monte Carlo comparisons (#128)
### Briefly, what does this PR introduce? This PR adds a datatype to record the "[truthiness](https://en.wikipedia.org/wiki/Truthiness)" (as mathematically defined...) for a reconstructed event; where truthiness is the "quality of seeming or being felt to be true, even if not necessarily true," or in this case also "the amount of confidently proclaiming the wrong thing to be true." Mathematically, truthiness is a non-negative value that is zero only for perfectly reconstructed events (positive-definite), and is radially increasing in the error of the reconstruction (greater error leads to greater truthiness). It is possible to define truthiness in multiple ways, but we will typically use some combination of the following components: - a &chi;<sup>2</sup> measure on associated reconstructed and generated particles, with normalization given by the determined uncertainty in the reconstruction (if available) or 1 GeV otherwise, - a positive penalty term for discrete reconstruction errors, such as PID mis-identification (where weighting can be used to penalize some mis-identification more than others), - a positive penalty term for generated particles that should have been reconstructed, but weren't, - a positive penalty term for reconstructed particles that were not part of the original event record. There are non-reconstruction reasons why the truthiness will be non-zero in realistic scenarios: - multiple-scattering effects will cause the event to lose momentum starting from the true value, deviating both in direction and magnitude in a consistent direction, - secondary particles will be generated in materials or along bent trajectories, leading to additional reconstructed particles corresponding to e.g. hard bremsstrahlung gammas in the electromagnetic calorimeters, - primary particles (in particular are low energies) may be absorbed in support structures, leading to their absence in the reconstructed event. Nevertheless, the decrease of the overall average event truthiness for the same geometry and input hit collections is intended to indicate an improved reconstruction, and converse. ### What kind of change does this PR introduce? - [ ] Bug fix (issue #__) - [x] New feature (issue: store truthiness for event reconstruction) - [ ] Documentation update - [ ] Other: __ ### Please check if this PR fulfills the following: - [ ] Tests for the changes have been added - [ ] Documentation has been added / updated - [ ] Changes have been communicated to collaborators ### Does this PR introduce breaking changes? What changes might users need to make to their code? No. ### Does this PR change default behavior? No. --------- Co-authored-by: Dmitry Kalinkin <[email protected]> Co-authored-by: Markus Diefenthaler <[email protected]>
1 parent e10b7c5 commit 916c65a

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ project(EDM4EIC
77
LANGUAGES CXX)
88

99
SET( ${PROJECT_NAME}_VERSION_MAJOR 8 )
10-
SET( ${PROJECT_NAME}_VERSION_MINOR 4 )
10+
SET( ${PROJECT_NAME}_VERSION_MINOR 5 )
1111
SET( ${PROJECT_NAME}_VERSION_PATCH 0 )
1212
SET( ${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}" )
1313

edm4eic.yaml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
## If there are schema version changes that can be evolved, see the podio documentation
1010
## for an example: https://github.com/AIDASoft/podio/tree/master/tests/schema_evolution
1111
##
12-
schema_version: 840
12+
schema_version: 850
1313

1414
options :
1515
# should getters / setters be prefixed with get / set?
@@ -200,6 +200,13 @@ components:
200200
- bool TOTInProgress // Flag which indicates if TOT calculation is ongoing, ADC value may be corrupted if this is true
201201
- bool TOTComplete // Flag which indicates if a TOT calculation is complete and TOT value is valid
202202

203+
## Event-level truthiness information
204+
edm4eic::TruthinessContribution:
205+
Members:
206+
- float pid // Contribution of PID matching to truthiness
207+
- float energy // Contribution of energy matching to truthiness
208+
- float momentum // Contribution of momentum matching to truthiness
209+
203210
datatypes:
204211

205212
edm4eic::Tensor:
@@ -540,7 +547,7 @@ datatypes:
540547
- edm4eic::ReconstructedParticle hadrons // Reconstructed hadrons used in calculation
541548

542549
## ==========================================================================
543-
## Data-Montecarlo relations
550+
## Data-Monte Carlo relations
544551
## ==========================================================================
545552

546553
edm4eic::MCRecoParticleAssociation:
@@ -623,6 +630,27 @@ datatypes:
623630
- edm4eic::Track from // reference to the track
624631
- edm4eic::ProtoCluster to // reference to the protocluster
625632

633+
## ==========================================================================
634+
## Data-Monte Carlo comparisons
635+
## ==========================================================================
636+
637+
edm4eic::Truthiness:
638+
Description: "Positive-definite convex norm of how confidently wrong the reconstruction is,
639+
with non-negative contributions from various aspects of the reconstruction,
640+
where a zero value indicates a perfect reconstruction."
641+
Author: "W. Deconinck, S. Colbert"
642+
Members:
643+
- float truthiness // Overall truthiness of the entire event
644+
- edm4eic::TruthinessContribution associationContribution // Contribution from all associated particles
645+
- float unassociatedMCParticlesContribution // Contribution from unassociated MC particles
646+
- float unassociatedRecoParticlesContribution // Contribution from unassociated reconstructed particles
647+
VectorMembers:
648+
- edm4eic::TruthinessContribution associationContributions // Contribution from associated particles
649+
OneToManyRelations:
650+
- edm4eic::MCRecoParticleAssociation associations // Reference to the associated particles
651+
- edm4hep::MCParticle unassociatedMCParticles // Reference to the unassociated MC particles
652+
- edm4eic::ReconstructedParticle unassociatedRecoParticles // Reference to the unassociated reconstructed particles
653+
626654
links:
627655
edm4eic::TrackProtoClusterLink:
628656
Description: "Link between a ProtoCluster and a Track"

0 commit comments

Comments
 (0)