FindMatches.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file FindMatches.h
3 /// \brief Core of the LEM match-finding algorithm
4 /// \author Christopher Backhouse - bckhouse@caltech.edu
5 ////////////////////////////////////////////////////////////////////////
6
7 #ifndef LEM_FINDMATCHES_H
8 #define LEM_FINDMATCHES_H
9
10 #include "LEM/func/Match.h"
11 #include "LEM/func/Potential.h"
12
13 #include <set>
14 #include <vector>
15
16 namespace lem
17 {
19
20  /// Collection of Potential objects with odd and/or even view flipped
22  {
23  Potential V[2][2]; // [flipEven][flipOdd]
24  };
25
26  class EventSummary;
27  class MatchableEvent;
28
29  const unsigned int kMaxNumMatches = 1001;
30
31  float CalcEnergy(const Potential& Va,
32  const MatchableEvent& a, const MatchableEvent& b);
33
34  double FracChargeMatched(const EventSummary& a, const EventSummary& b,
35  bool flipEven, bool flipOdd);
36
37  void FillPotential(const EventSummary& trial, Potential& V,
38  bool flipEven, bool flipOdd);
39
40  void FillPotential(const EventSummary& trial, FlippedPotentials& V);
41
42  std::vector<Match> FindMatches(const MatchableEvent& trial,
43  unsigned int libSize,
44  const MatchableEvent* lib,
45  const MatchableEvent* libDownsample, int factor,
47  unsigned int numMatches = kMaxNumMatches,
48  int enrich = 2, // [no, only, both]
53  bool useDownsample = true);
54
55 } // namespace
56
57 #endif
Map of electrostatic potential at each cell.
Simple representation of event for LEM use.
Definition: EventSummary.h:26
float CalcEnergy(const Potential &Va, const MatchableEvent &a, const MatchableEvent &b)
Definition: FindMatches.cxx:21
Attach some information used in matching to an EventSummary.
const unsigned int kMaxNumMatches
Definition: FindMatches.h:29
Map of electrostatic potential at each cell.
Definition: Potential.h:13
Definition: __init__.py:1
PID
Definition: FillPIDs.h:14
Potential V[2][2]
Definition: FindMatches.h:23
std::vector< Match > FindMatches(const MatchableEvent &trial, unsigned int libSize, const MatchableEvent *lib, const MatchableEvent *libDownsample, int factor, const std::multiset< float > &alreadyInput, unsigned int numMatches, int enrich, const Heads *heads, int headIdx, bool flipHeadEven, bool flipHeadOdd, bool useDownsample)
const double a
double FracChargeMatched(const EventSummary &a, const EventSummary &b, bool flipEven, bool flipOdd)
Definition: FindMatches.cxx:37
Mapping from a subset of the library to their best matches.