Skip to content

Commit 826feaa

Browse files
authored
Merge pull request #97 from SBNSoftware/feature/munjung-cnn_hit_class_michel
cnnscore
2 parents 77d254d + 5e2c797 commit 826feaa

4 files changed

Lines changed: 52 additions & 0 deletions

File tree

sbnobj/Common/Reco/CNNScore.cc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include "sbnobj/Common/Reco/CNNScore.h"
2+
3+
sbn::PFPCNNScore::PFPCNNScore(float pfpTrackScore, float pfpShowerScore, float pfpNoiseScore, float pfpMichelScore, float pfpEndMichelScore, int nClusters)
4+
: pfpTrackScore(pfpTrackScore)
5+
, pfpShowerScore(pfpShowerScore)
6+
, pfpNoiseScore(pfpNoiseScore)
7+
, pfpMichelScore(pfpMichelScore)
8+
, pfpEndMichelScore(pfpEndMichelScore)
9+
, nClusters(nClusters)
10+
{
11+
}

sbnobj/Common/Reco/CNNScore.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#include <limits>
2+
3+
#ifndef sbnobj_CNNScore_HH
4+
#define sbnobj_CNNScore_HH
5+
6+
namespace sbn {
7+
8+
constexpr float nan_float = std::numeric_limits<float>::signaling_NaN();
9+
10+
class PFPCNNScore {
11+
public:
12+
PFPCNNScore(float pfpTrackScore = nan_float, float pfpShowerScore = nan_float, float pfpNoiseScore = nan_float, float pfpMichelScore = nan_float, float pfpEndMichelScore = nan_float, int nClusters = 0);
13+
14+
float pfpTrackScore; //!< shower score for PFP, average over all associated hits
15+
float pfpShowerScore; //!< shower score for PFP, average over all associated hits
16+
float pfpNoiseScore; //!< shower score for PFP, average over all associated hits
17+
float pfpMichelScore; //!< michel score for PFP, average over all associated hits
18+
float pfpEndMichelScore; //!< end michel score for PFP, average over defined area around the endpoint
19+
int nClusters; //!< number of clusters used for calculating average score
20+
};
21+
}
22+
23+
#endif

sbnobj/Common/Reco/classes.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
#include "sbnobj/Common/Reco/MVAPID.h"
2727
#include "sbnobj/Common/Reco/CRUMBSResult.h"
2828
#include "sbnobj/Common/Reco/OpT0FinderResult.h"
29+
#include "sbnobj/Common/Reco/CNNScore.h"
2930
#include "sbnobj/Common/Reco/TPCPMTBarycenterMatch.h"
3031

32+
3133
#include <utility>
3234
#include <vector>

sbnobj/Common/Reco/classes_def.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,22 @@
9292
<class name="art::Wrapper<art::Assns<recob::OpFlash, sbn::OpT0Finder>>" />
9393
<class name="art::Wrapper<art::Assns<sbn::OpT0Finder, recob::OpFlash, void>>" />
9494

95+
<class name="sbn::PFPCNNScore" ClassVersion="15">
96+
<version ClassVersion="15" checksum="3783368588"/>
97+
<version ClassVersion="14" checksum="3262687246"/>
98+
<version ClassVersion="13" checksum="587801397"/>
99+
<version ClassVersion="12" checksum="2317961223"/>
100+
</class>
101+
<class name="std::vector<sbn::PFPCNNScore>" />
102+
<class name="art::Wrapper<sbn::PFPCNNScore>" />
103+
<class name="art::Wrapper<std::vector<sbn::PFPCNNScore>>" />
104+
105+
<class name="art::Assns<recob::PFParticle,sbn::PFPCNNScore,void>" />
106+
<class name="art::Wrapper<art::Assns<recob::PFParticle,sbn::PFPCNNScore,void>>" />
107+
108+
<class name="art::Assns<sbn::PFPCNNScore,recob::PFParticle,void>" />
109+
<class name="art::Wrapper<art::Assns<sbn::PFPCNNScore,recob::PFParticle,void>>" />
110+
95111
<class name="sbn::ShowerDensityFit" ClassVersion="10">
96112
<version ClassVersion="10" checksum="942453570"/>
97113
</class>

0 commit comments

Comments
 (0)