lem::Potential Class Reference

Map of electrostatic potential at each cell. More...

`#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-01-23/LEM/func/Potential.h"`

## Public Member Functions

Potential ()

Potential Downsampled (int factor) const

## Public Attributes

float V [256 *256]

## Detailed Description

Map of electrostatic potential at each cell.

Definition at line 13 of file Potential.h.

## Constructor & Destructor Documentation

 lem::Potential::Potential ( )

Definition at line 15 of file Potential.cxx.

References ana::assert(), and V.

15  : V()
16  {
17  // That "V()" should have taken care of this, check.
18  assert(V[0] == 0);
19  assert(V[256*256-1] == 0);
20  }
assert(nhit_max >=nhit_nbins)
float V[256 *256]
Definition: Potential.h:18

## Member Function Documentation

 Potential lem::Potential::Downsampled ( int factor ) const

Definition at line 23 of file Potential.cxx.

References plot_validation_datamc::c, compare_h5_caf::idx, std::max(), runNovaSAM::ret, and V.

Referenced by lem::FindMatches(), and lem::FindMatchesTranspose::produce().

24  {
25  Potential ret;
26
27  for(int p = 0; p < 256; ++p){
28  for(int c = 0; c < 256; ++c){
29  const int idx = p*256+c;
30
31  const int newp = ((p>>(factor+1))<<1)+p%2;
32  const int newc = c>>factor;
33
34  // Matches indexing in MatchableEvent::Downsampled()
35  const int newidx = (newp<<(8-factor))+newc;
36
37  // Keeping the largest value ensures that the energy calculated from
38  // this potential is a lower bound, as required.
39  ret.V[newidx] = std::max(ret.V[newidx], V[idx]);
40  }
41  }
42
43  return ret;
44  }
T max(const caf::Proxy< T > &a, T b)
const char * p
Definition: xmltok.h:285
float V[256 *256]
Definition: Potential.h:18

## Member Data Documentation

 float lem::Potential::V[256 *256]

Definition at line 18 of file Potential.h.

The documentation for this class was generated from the following files:
• /cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-01-23/LEM/func/Potential.h
• /cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-01-23/LEM/func/Potential.cxx