Skip to content

Commit 0344164

Browse files
authored
Merge pull request #55 from sindhu-ku/develop
Add tpc variable for flash
2 parents 3156638 + bd29c4e commit 0344164

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

larcv/core/DataFormat/Flash.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace larcv {
99

1010
Flash::Flash(double time, double timeWidth, double absTime, unsigned int frame,
11-
std::vector<double> PEPerOpDet,
11+
std::vector<double> PEPerOpDet, unsigned int tpc,
1212
bool inBeamFrame, int onBeamTime, double fastToTotal,
1313
double xCenter, double xWidth,
1414
double yCenter, double yWidth,
@@ -18,6 +18,7 @@ namespace larcv {
1818
InstanceID_t id)
1919
: _id(id)
2020
, _time(time)
21+
, _tpc(tpc)
2122
, _timeWidth(timeWidth)
2223
, _absTime (absTime)
2324
, _frame (frame)

larcv/core/DataFormat/Flash.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace larcv {
2828

2929
/// Default constructor
3030
Flash(double time=0, double timeWidth=0, double absTime=0, unsigned int frame=0,
31-
std::vector<double> PEPerOpDet=std::vector<double>(0),
31+
std::vector<double> PEPerOpDet=std::vector<double>(0), unsigned int tpc=100,
3232
bool inBeamFrame=0, int onBeamTime=0, double fastToTotal=1,
3333
double xCenter=0, double xWidth=0,
3434
double yCenter=0, double yWidth=0,
@@ -45,6 +45,7 @@ namespace larcv {
4545
/// Getters
4646
inline InstanceID_t id () const { return _id; }
4747
inline double time () const { return _time; }
48+
inline unsigned int tpc () const { return _tpc; }
4849
inline double timeWidth () const { return _timeWidth; }
4950
inline double absTime () const { return _absTime; }
5051
inline unsigned int frame () const { return _frame; }
@@ -64,6 +65,7 @@ namespace larcv {
6465
/// Setters
6566
inline void id (InstanceID_t id ) { _id = id; }
6667
inline void time (double time) { _time = time; }
68+
inline void tpc (unsigned int tpc) { _tpc = tpc; }
6769
inline void timeWidth (double timeWidth) { _timeWidth = timeWidth; }
6870
inline void absTime (double absTime) { _absTime = absTime; }
6971
inline void frame (unsigned int frame) { _frame = frame; }
@@ -86,6 +88,7 @@ namespace larcv {
8688

8789
InstanceID_t _id; ///< "ID" of this flash in FlashSet collection
8890
double _time; ///< Time on @ref DetectorClocksHardwareTrigger "trigger time scale" [us]
91+
unsigned int _tpc; ///< ID of the hit TPC (0-7)
8992
double _timeWidth; ///< Width of the flash in time [us]
9093
double _absTime; ///< Time by PMT readout clock
9194
unsigned int _frame; ///< Frame number

0 commit comments

Comments
 (0)