All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FillFlashMatch.cxx
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////
2 // \file FillFlashMatch.cxx
3 // \brief Fill flash match info from multiple algs
4 // \author $Author: psihas@fnal.gov
5 //////////////////////////////////////////////////////////////////////
6 
7 #include "FillFlashMatch.h"
8 
9 namespace caf
10 {
11 
12 
13  //......................................................................
14  void FillSliceFlashMatch(const sbn::SimpleFlashMatch* fmatch /* can be nullptr */,
15  caf::SRSlice& srslice,
16  bool allowEmpty)
17  {
18  if (fmatch == nullptr) {
19  srslice.fmatch.present = false;
20  return;
21  }
22  srslice.fmatch.present = fmatch->present;
23  srslice.fmatch.time = fmatch->time;
24  srslice.fmatch.chargeQ = fmatch->charge.q;
25  srslice.fmatch.lightPE = fmatch->light.pe;
26  srslice.fmatch.score = fmatch->score.total;
27  srslice.fmatch.scoreY = fmatch->score.y;
28  srslice.fmatch.scoreZ = fmatch->score.z;
29  srslice.fmatch.scoreRR = fmatch->score.rr;
30  srslice.fmatch.scoreRatio = fmatch->score.ratio;
31  srslice.fmatch.chargeCenter = fmatch->charge.center;
32  srslice.fmatch.lightCenter = fmatch->light.center;
33  }
34 
35  //......................................................................
36  void FillSliceFlashMatchA(const sbn::SimpleFlashMatch* fmatch /* can be nullptr */,
37  caf::SRSlice& srslice,
38  bool allowEmpty)
39  {
40  if (fmatch == nullptr) {
41  srslice.fmatch_a.present = false;
42  return;
43  }
44  srslice.fmatch_a.present = fmatch->present;
45  srslice.fmatch_a.time = fmatch->time;
46  srslice.fmatch_a.chargeQ = fmatch->charge.q;
47  srslice.fmatch_a.lightPE = fmatch->light.pe;
48  srslice.fmatch_a.score = fmatch->score.total;
49  srslice.fmatch_a.scoreY = fmatch->score.y;
50  srslice.fmatch_a.scoreZ = fmatch->score.z;
51  srslice.fmatch_a.scoreRR = fmatch->score.rr;
52  srslice.fmatch_a.scoreRatio = fmatch->score.ratio;
53  srslice.fmatch_a.chargeCenter = fmatch->charge.center;
54  srslice.fmatch_a.lightCenter = fmatch->light.center;
55  }
56 
57  //......................................................................
58  void FillSliceFlashMatchB(const sbn::SimpleFlashMatch* fmatch /* can be nullptr */,
59  caf::SRSlice& srslice,
60  bool allowEmpty)
61  {
62  if (fmatch == nullptr) {
63  srslice.fmatch_b.present = false;
64  return;
65  }
66  srslice.fmatch_b.present = fmatch->present;
67  srslice.fmatch_b.time = fmatch->time;
68  srslice.fmatch_b.chargeQ = fmatch->charge.q;
69  srslice.fmatch_b.lightPE = fmatch->light.pe;
70  srslice.fmatch_b.score = fmatch->score.total;
71  srslice.fmatch_b.scoreY = fmatch->score.y;
72  srslice.fmatch_b.scoreZ = fmatch->score.z;
73  srslice.fmatch_b.scoreRR = fmatch->score.rr;
74  srslice.fmatch_b.scoreRatio = fmatch->score.ratio;
75  srslice.fmatch_b.chargeCenter = fmatch->charge.center;
76  srslice.fmatch_b.lightCenter = fmatch->light.center;
77  }
78 
79  //......................................................................
80 
81 } // end namespace
bool present
whether there's a match
Definition: SRFlashMatch.h:21
SRFlashMatch fmatch_b
Optical flash-match for this slice of TPC charge.
Definition: SRSlice.h:41
double y
score for y metric
float scoreRR
score for rr metric
Definition: SRFlashMatch.h:30
SRVector3D lightCenter
Weighted center position [cm].
Definition: SRFlashMatch.h:26
double z
score for z metric
float scoreY
score for y metric
Definition: SRFlashMatch.h:28
Flash light
object that contains flash pe and its position
TVector3 center
Weighted center position [cm].
float chargeQ
charge in slc
Definition: SRFlashMatch.h:23
float lightPE
photo-electrons on simple flash
Definition: SRFlashMatch.h:25
double ratio
score for ratio metric
void FillSliceFlashMatchA(const sbn::SimpleFlashMatch *fmatch, caf::SRSlice &srslice, bool allowEmpty)
TVector3 center
Weighted center position [cm].
Score score
overall and partial scores to the match
void FillSliceFlashMatch(const sbn::SimpleFlashMatch *fmatch, caf::SRSlice &srslice, bool allowEmpty)
void FillSliceFlashMatchB(const sbn::SimpleFlashMatch *fmatch, caf::SRSlice &srslice, bool allowEmpty)
float score
total score, sum of terms
Definition: SRFlashMatch.h:27
SRFlashMatch fmatch_a
Optical flash-match for this slice of TPC charge.
Definition: SRSlice.h:40
double rr
score for rr metric
SRVector3D chargeCenter
Weighted center position [cm].
Definition: SRFlashMatch.h:24
required by fuzzyCluster table::sbnd_g4_services gaushitTruthMatch fmatch
Definition: reco_sbnd.fcl:182
An SRSlice contains overarching information for a slice.
Definition: SRSlice.h:24
SRFlashMatch fmatch
Optical flash-match for this slice of TPC charge.
Definition: SRSlice.h:39
Charge charge
object that contains charge and its position
float scoreRatio
score for ratio metric
Definition: SRFlashMatch.h:31
float scoreZ
score for z metric
Definition: SRFlashMatch.h:29
double pe
photo-electrons on flash
bool present
Whether there's a match.
double total
total score, sum of terms
float time
time of flash
Definition: SRFlashMatch.h:22
double time
time of flash