Skip to content

Commit 4b0c6a4

Browse files
authored
Merge pull request #42 from DUNE/feature/flash
Feature/flash
2 parents bd34acd + 4b3fe08 commit 4b0c6a4

File tree

5 files changed

+64
-8
lines changed

5 files changed

+64
-8
lines changed

duneanaobj/StandardRecord/SREnums.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#define DUNEANAOBJ_SRENUMS_H
1010

1111
#include <cstddef>
12+
#include <limits>
1213

1314
namespace caf
1415
{
@@ -100,6 +101,20 @@ namespace caf
100101
PartType type = kUnknown; ///< Which of the particle collections this particle lives in
101102
int part = -1; ///< Index of SRParticle in the SRInteraction
102103
};
104+
105+
class FlashMatch
106+
{
107+
private:
108+
109+
static constexpr float NaN = std::numeric_limits<float>::signaling_NaN();
110+
111+
public:
112+
113+
int id = -1; ///< id of the matched flash in SROpticalFlash
114+
float time = NaN; ///< time of the matched flash
115+
float total_pe = NaN; ///< total pe of the matched flash
116+
float hypothesis_pe = NaN; ///< hypothesis pe from reconstruction for this interaction
117+
};
103118

104119
/// Which reconstruction toolkit was used to reconstruct this FD event?
105120
enum FD_RECO_STACK

duneanaobj/StandardRecord/SRMeta.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ namespace caf
1818
public:
1919
bool enabled = false; ///< Does this detector have data present in this event?
2020

21-
unsigned int run = 0;
22-
unsigned int subrun = 0;
23-
unsigned int event = 0;
24-
unsigned int subevt = 0;
21+
int run = -1;
22+
int subrun = -1;
23+
int event = -1;
24+
int subevt = -1;
2525

2626
/// detector-dependent trigger type for the relevant readout window
2727
int triggertype = -1;

duneanaobj/StandardRecord/SRNDLAr.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include "duneanaobj/StandardRecord/SRTrack.h"
1111
#include "duneanaobj/StandardRecord/SRShower.h"
12+
#include "duneanaobj/StandardRecord/SROpticalFlash.h"
1213

1314
namespace caf
1415
{
@@ -21,6 +22,9 @@ namespace caf
2122

2223
std::vector<SRShower> showers;
2324
std::size_t nshowers = 0;
25+
26+
std::vector<FlashMatch> flash; ///< Attributes of matched flash
27+
2428
};
2529

2630
/// The information needed to uniquely identify an ND-LAr reco object
@@ -40,7 +44,8 @@ namespace caf
4044
std::size_t ndlp = 0;
4145
std::vector<SRNDLArInt> pandora; ///< Reconstructed interactions from Pandora
4246
std::size_t npandora = 0;
43-
47+
std::vector<SROpticalFlash> flashes; ///< Collection of flashes
48+
std::size_t nflashes = 0;
4449
/// Convenience function for use mainly with SRNDTrackAssn.
4550
/// Given a specific reco pathway (specified with a SRNDLAr::RECO_STACK value),
4651
/// an interaction index, and a track index, return the associated reco object
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
////////////////////////////////////////////////////////////////////////
2+
/// \file SROpticalFlash.h
3+
/// \brief A general optical flash container
4+
/// \author S. Kumaran <s.kumaran@uci.edu>
5+
6+
7+
#ifndef DUNEANAOBJ_SROPTICALFLASH_H
8+
#define DUNEANAOBJ_SROPTICALFLASH_H
9+
10+
11+
namespace caf
12+
{
13+
/// \brief optical flash candidate
14+
class SROpticalFlash
15+
{
16+
private:
17+
// make the uses of it below more readable
18+
static constexpr float NaN = std::numeric_limits<float>::signaling_NaN();
19+
20+
public:
21+
int id = -1; ///< id of the flash>
22+
int tpc_id = -1; ///< id of the TPC>
23+
double time = NaN; ///< time of the flash w.r.t. trigger time in s
24+
double time_width = NaN; ///< width of the flash in s
25+
float total_pe = NaN; ///< total photoelectrons recorded by all the channels
26+
27+
};
28+
29+
} // caf
30+
31+
#endif //DUNEANAOBJ_SROPTICALFLASH_H

duneanaobj/StandardRecord/classes_def.xml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
<version ClassVersion="10" checksum="175116589"/>
4343
</class>
4444

45-
<class name="caf::SRDetectorMeta" ClassVersion="11">
45+
<class name="caf::SRDetectorMeta" ClassVersion="12">
46+
<version ClassVersion="12" checksum="989983909"/>
4647
<version ClassVersion="11" checksum="810717581"/>
4748
<version ClassVersion="10" checksum="2557124789"/>
4849
</class>
@@ -196,12 +197,16 @@
196197
<class name="std::vector<caf::SRNDTrackAssn>">
197198
</class>
198199

199-
<class name="caf::SRNDLAr" ClassVersion="11">
200+
<class name="caf::SRNDLAr" ClassVersion="12">
201+
<version ClassVersion="12" checksum="620685221"/>
200202
<version ClassVersion="11" checksum="1183768120"/>
201203
<version ClassVersion="10" checksum="3845592869"/>
202204
</class>
203205

204-
<class name="caf::SRNDLArInt" ClassVersion="10">
206+
<class name="caf::SRNDLArInt" ClassVersion="13">
207+
<version ClassVersion="13" checksum="1379574528"/>
208+
<version ClassVersion="12" checksum="947356810"/>
209+
<version ClassVersion="11" checksum="1873045675"/>
205210
<version ClassVersion="10" checksum="947356810"/>
206211
</class>
207212

0 commit comments

Comments
 (0)