MatchSummary.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file MatchSummary.h
3 /// \brief Simplified Match information, suitable for serialization
4 /// \author Christopher Backhouse - bckhouse@caltech.edu
5 ////////////////////////////////////////////////////////////////////////
6 
7 #ifndef LEM_MATCHSUMMARY_H
8 #define LEM_MATCHSUMMARY_H
9 
10 #include "LEM/func/Match.h"
12 
13 namespace lem
14 {
15  /// Simplified Match information, suitable for serialization
16  struct MatchSummary
17  {
18  MatchSummary() : isSig(false), weight(-1), potential(-1), flipEven(false), flipOdd(false), pe(-1), nhits(-1), length(-1), y(-1), qFrac(-1), trueEVis(-1), selfEnergy(-1), id(-1), run(-1), subrun(-1), event(-1), ccnc(-1), pdg(-1), origPdg(-1), headSeqNo(-1) {}
19 
20  explicit MatchSummary(const Match& m)
21  : isSig(m.evt->IsSig()),
22  weight(m.evt->weight),
23  potential(m.energy),
24  flipEven(m.flipEven),
25  flipOdd(m.flipOdd),
26  pe(m.evt->totalPE),
27  nhits(m.evt->nhits),
28  length(m.evt->Length()),
29  y(m.evt->y),
30  qFrac(m.qfrac),
31  trueEVis(m.evt->trueEVis),
33  id(m.evt->id),
34  run(m.evt->run),
35  subrun(m.evt->subrun),
36  event(m.evt->event),
37  ccnc(m.evt->ccnc),
38  pdg(m.evt->pdg),
39  origPdg(m.evt->origPdg),
40  mode(m.evt->mode),
41  photL0(m.evt->photL0),
42  photL1(m.evt->photL1),
43  photE0(m.evt->photE0),
44  photE1(m.evt->photE1),
45  enrich(m.evt->enrich),
47  {
48  }
49 
50  bool operator<(const MatchSummary& rhs) const {return potential < rhs.potential;}
51 
52  bool isSig;
53  float weight;
54  float potential;
56  float pe;
57  int nhits;
58  int length; ///< In planes
59  float y;
60  float qFrac;
61  float trueEVis;
62  float selfEnergy;
63  int id;
64 
65  int run, subrun, event;
66  int ccnc, pdg, origPdg;
67  int mode;
68 
69  float photL0, photL1;
70  float photE0, photE1;
71 
72  bool enrich;
73 
74  int headSeqNo;
75  };
76 } // namespace
77 
78 #endif
MatchSummary(const Match &m)
Definition: MatchSummary.h:20
PID
Definition: FillPIDs.h:14
Simplified Match information, suitable for serialization.
Definition: MatchSummary.h:16
int evt
double energy
Definition: plottest35.C:25
Information about a LEM match.
Definition: Match.h:17
Definition: run.py:1
bool operator<(const MatchSummary &rhs) const
Definition: MatchSummary.h:50
Attach some information used in matching to an EventSummary.
Information about a LEM match.
int length
In planes.
Definition: MatchSummary.h:58