Skip to content

Commit 2612ac9

Browse files
committed
Merge branch 'feature/lynnt_lightcalorimetry'
2 parents 789c8a7 + bf14337 commit 2612ac9

File tree

5 files changed

+72
-2
lines changed

5 files changed

+72
-2
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/**
2+
* @file sbnanaobj/StandardRecord/SRLightCalo.h
3+
* @brief Defines data structures to store light calorimetry info (header only).
4+
* @author Lynn Tung
5+
* @date November 19, 2025
6+
*/
7+
8+
#ifndef SBNANAOBJ_STANDARDRECORD_SRLIGHTCALO_H
9+
#define SBNANAOBJ_STANDARDRECORD_SRLIGHTCALO_H
10+
11+
#include "sbnanaobj/StandardRecord/SRConstants.h"
12+
13+
namespace caf {
14+
15+
/**
16+
* @brief A struct to store the reconstructed visible energy, light, and charge in a recob::Slice.
17+
*
18+
*/
19+
struct SRLightCalo {
20+
float charge = caf::kSignalingNaN; ///< the total charge in the slice (on bestplane) [# electrons]
21+
float light = caf::kSignalingNaN; ///< the reconstructed total number of photons [# photons]
22+
float energy = caf::kSignalingNaN; ///< (charge+light)*scaling, [GeV]
23+
int bestplane = caf::kUninitializedInt; ///< plane with most number of hits
24+
};
25+
}
26+
27+
#endif

sbnanaobj/StandardRecord/SRSlice.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "sbnanaobj/StandardRecord/SRNuID.h"
2020
#include "sbnanaobj/StandardRecord/SRConstants.h"
2121
#include "sbnanaobj/StandardRecord/SRCVNScore.h"
22+
#include "sbnanaobj/StandardRecord/SRLightCalo.h"
2223

2324
#include <climits>
2425

@@ -54,6 +55,8 @@ namespace caf
5455

5556
SRCorrectedOpFlash correctedOpFlash; //!< OpFlash corrected with using tpc information matched to this slice
5657

58+
SRLightCalo lightcalo; // !< Reconstructed visible energy, light, and charge
59+
5760
SRFakeReco fake_reco;
5861

5962
bool is_clear_cosmic { false }; //!< Whether pandora marks the slice as a "clear" cosmic
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/**
2+
* @file sbnanaobj/StandardRecord/SrTrueDeposit.h
3+
* @brief Defines data structures to store summed SimEnergyDeposits (header only).
4+
* @author Lynn Tung
5+
* @date November 18, 2025
6+
*/
7+
8+
#ifndef SBNANAOBJ_STANDARDRECORD_SRTRUEDEPOSIT_H
9+
#define SBNANAOBJ_STANDARDRECORD_SRTRUEDEPOSIT_H
10+
11+
#include "sbnanaobj/StandardRecord/SRConstants.h"
12+
13+
namespace caf {
14+
15+
/**
16+
* @brief A struct to store total true deposited energy, charge, and photons for each MCTruth interaction.
17+
*
18+
*/
19+
struct SRTrueDeposit {
20+
float electrons = caf::kSignalingNaN; ///< total # of electrons from the sites of energy deposition, summed per nu interaction (after recombination, before drift)
21+
float photons = caf::kSignalingNaN; ///< total # of photons from the sites of energy deposition, summed per nu interaction (after recombination, before propagation)
22+
float energy = caf::kSignalingNaN; ///< total **deposited energy**, summed per nu interaction [GeV]
23+
};
24+
}
25+
26+
#endif

sbnanaobj/StandardRecord/SRTruthBranch.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#define SRTRUTHBRANCH_H
66

77
#include "sbnanaobj/StandardRecord/SRTrueInteraction.h"
8+
#include "sbnanaobj/StandardRecord/SRTrueDeposit.h"
89
#include "sbnanaobj/StandardRecord/SRMeVPrtl.h"
910

1011
#include <vector>
@@ -19,6 +20,7 @@ namespace caf
1920
~SRTruthBranch();
2021

2122
std::vector<SRTrueInteraction> nu; ///< Vector of true nu or cosmic
23+
std::vector<SRTrueDeposit> dep; ///< Vector of true energy deposits (summed), same size as nu
2224
size_t nnu; ///< Number of true nu or cosmic
2325

2426
std::vector<SRMeVPrtl> prtl; ///< If present -- information on decay of MeV "Portal" particle

sbnanaobj/StandardRecord/classes_def.xml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,13 @@
9797
<version ClassVersion="11" checksum="1429601394"/>
9898
</class>
9999

100-
<class name="caf::SROpT0Finder" />
100+
<class name="caf::SROpT0Finder" ClassVersion="10">
101+
<version ClassVersion="10" checksum="1191492245"/>
102+
</class>
103+
104+
<class name="caf::SRLightCalo" ClassVersion="10">
105+
<version ClassVersion="10" checksum="1494722949"/>
106+
</class>
101107

102108
<class name="caf::SRSliceRecoBranch" ClassVersion="13">
103109
<version ClassVersion="13" checksum="4211357366"/>
@@ -182,6 +188,10 @@
182188
<version ClassVersion="10" checksum="4056415501"/>
183189
</class>
184190

191+
<class name="caf::SRTrueDeposit" ClassVersion="10">
192+
<version ClassVersion="10" checksum="916262743"/>
193+
</class>
194+
185195
<class name="caf::SRTrueParticlePlaneInfo" ClassVersion="11">
186196
<version ClassVersion="11" checksum="317847253"/>
187197
<version ClassVersion="10" checksum="1689803547"/>
@@ -223,7 +233,8 @@
223233
<version ClassVersion="10" checksum="1609299342"/>
224234
</class>
225235

226-
<class name="caf::SRTruthBranch" ClassVersion="11">
236+
<class name="caf::SRTruthBranch" ClassVersion="12">
237+
<version ClassVersion="12" checksum="3925767433"/>
227238
<version ClassVersion="11" checksum="1553456992"/>
228239
<version ClassVersion="10" checksum="2608785459"/>
229240
</class>
@@ -358,6 +369,7 @@
358369
<class name="std::vector<caf::SRTrueInteraction>" />
359370
<class name="std::vector<caf::SRMultiverse>" />
360371
<class name="std::vector<caf::SRTrueParticle>" />
372+
<class name="std::vector<caf::SRTrueDeposit>" />
361373
<class name="std::vector<caf::SRParticleMatch>" />
362374
<class name="std::vector<caf::SRTrueCaloPoint>" />
363375
<class name="std::vector<caf::SRCaloPoint>" />

0 commit comments

Comments
 (0)