Skip to content

Commit f1c355f

Browse files
authored
Merge pull request #83 from SBNSoftware/feature/hlay_crt_clustering_cluster
Add CRTCluster object
2 parents 29ed37f + 19171c4 commit f1c355f

2 files changed

Lines changed: 84 additions & 0 deletions

File tree

sbnobj/SBND/CRT/CRTCluster.cxx

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#ifndef SBND_CRTCLUSTER_CXX
2+
#define SBND_CRTCLUSTER_CXX
3+
4+
#include "sbnobj/SBND/CRT/CRTCluster.hh"
5+
6+
namespace sbnd {
7+
8+
namespace crt {
9+
10+
CRTCluster::CRTCluster()
11+
: fTs0 (0)
12+
, fTs1 (0)
13+
, fUnixS (0)
14+
, fNHits (0)
15+
, fTagger (kUndefinedTagger)
16+
, fComposition (kUndefinedSet)
17+
{}
18+
19+
CRTCluster::CRTCluster(uint32_t _ts0, uint32_t _ts1, uint32_t _unixS, uint16_t _nHits, CRTTagger _tagger,
20+
CoordSet _composition)
21+
: fTs0 (_ts0)
22+
, fTs1 (_ts1)
23+
, fUnixS (_unixS)
24+
, fNHits (_nHits)
25+
, fTagger (_tagger)
26+
, fComposition (_composition)
27+
{}
28+
29+
CRTCluster::~CRTCluster() {}
30+
31+
uint32_t CRTCluster::Ts0() const { return fTs0; }
32+
uint32_t CRTCluster::Ts1() const { return fTs1; }
33+
uint32_t CRTCluster::UnixS() const { return fUnixS; }
34+
uint16_t CRTCluster::NHits() const { return fNHits; }
35+
CRTTagger CRTCluster::Tagger() const { return fTagger; }
36+
CoordSet CRTCluster::Composition() const { return fComposition; }
37+
}
38+
}
39+
40+
#endif

sbnobj/SBND/CRT/CRTCluster.hh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* \class CRTCluster
3+
*
4+
* \brief Product to store a cluster of CRTStripHits
5+
*
6+
* \author Henry Lay (h.lay@lancaster.ac.uk)
7+
*
8+
*/
9+
10+
#ifndef SBND_CRTCLUSTER_HH
11+
#define SBND_CRTCLUSTER_HH
12+
13+
#include "sbnobj/SBND/CRT/CRTEnums.hh"
14+
15+
namespace sbnd::crt {
16+
17+
class CRTCluster {
18+
19+
uint32_t fTs0; // T0 counter [ns]
20+
uint32_t fTs1; // T1 counter [ns]
21+
uint32_t fUnixS; // Unixtime of event [s]
22+
uint16_t fNHits; // The number of strip hits forming the cluster
23+
CRTTagger fTagger; // The tagger this cluster exists on
24+
CoordSet fComposition; // What combination of orientations does the cluster make up?
25+
26+
public:
27+
28+
CRTCluster();
29+
30+
CRTCluster(uint32_t _ts0, uint32_t _ts1, uint32_t _unixS, uint16_t _nHits, CRTTagger _tagger,
31+
CoordSet _composition);
32+
33+
virtual ~CRTCluster();
34+
35+
uint32_t Ts0() const;
36+
uint32_t Ts1() const;
37+
uint32_t UnixS() const;
38+
uint16_t NHits() const;
39+
CRTTagger Tagger() const;
40+
CoordSet Composition() const;
41+
};
42+
}
43+
44+
#endif

0 commit comments

Comments
 (0)