LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
Solver.h
Go to the documentation of this file.
1 // Christopher Backhouse - bckhouse@fnal.gov
2 
3 #ifndef RECO3D_SOLVER_H
4 #define RECO3D_SOLVER_H
5 
6 #include <vector>
7 
9 
12 class WireHit {
13  // Do not add any virtual functions: will increase memory usage of all wires
14 };
15 
16 class InductionWireHit : public WireHit {
17 public:
18  InductionWireHit(int chan, double q);
19 
20  //protected:
21  int fChannel;
22 
23  double fCharge;
24 
25  double fPred;
26 };
27 
28 class SpaceCharge;
29 class Neighbour {
30 public:
31  Neighbour(SpaceCharge* sc, double coupling);
32 
34  double fCoupling;
35 };
36 
37 class CollectionWireHit;
38 
39 class SpaceCharge {
40 public:
41  SpaceCharge(double x,
42  double y,
43  double z,
44  CollectionWireHit* cwire,
45  InductionWireHit* wire1,
46  InductionWireHit* wire2);
47 
48  void AddCharge(double dq);
49 
50  //protected:
51  double fX, fY, fZ;
54 
55  std::vector<Neighbour> fNeighbours;
56 
57  double fPred;
58  double fNeiPotential;
59 };
60 
61 class CollectionWireHit : public WireHit {
62 public:
63  CollectionWireHit(int chan, double q, const std::vector<SpaceCharge*>& cross);
65 
66  //protected:
67  int fChannel;
68 
69  double fCharge;
70 
71  std::vector<SpaceCharge*> fCrossings;
72 };
73 
74 double Metric(const std::vector<SpaceCharge*>& scs, double alpha);
75 double Metric(const std::vector<CollectionWireHit*>& cwires, double alpha);
76 QuadExpr Metric(const SpaceCharge* sci, const SpaceCharge* scj, double alpha);
77 
78 double SolvePair(SpaceCharge* sci, SpaceCharge* scj, double xmin, double xmax, double alpha);
79 void Iterate(CollectionWireHit* cwire, double alpha);
80 void Iterate(SpaceCharge* sc, double alpha);
81 void Iterate(const std::vector<CollectionWireHit*>& cwires,
82  const std::vector<SpaceCharge*>& orphanSCs,
83  double alpha);
84 
85 #endif
Float_t x
Definition: compare.C:6
double Metric(const std::vector< SpaceCharge * > &scs, double alpha)
Definition: Solver.cxx:82
double fCharge
Definition: Solver.h:23
double fPred
Definition: Solver.h:25
Float_t y
Definition: compare.C:6
Double_t z
Definition: plot.C:276
std::vector< Neighbour > fNeighbours
Definition: Solver.h:55
double fCoupling
Definition: Solver.h:34
void Iterate(CollectionWireHit *cwire, double alpha)
Definition: Solver.cxx:260
double SolvePair(SpaceCharge *sci, SpaceCharge *scj, double xmin, double xmax, double alpha)
double fNeiPotential
Neighbour-induced potential.
Definition: Solver.h:58
double fZ
Definition: Solver.h:51
std::vector< SpaceCharge * > fCrossings
Definition: Solver.h:71
InductionWireHit * fWire2
Definition: Solver.h:53
Definition: Solver.h:12
CollectionWireHit * fCWire
Definition: Solver.h:52
Float_t sc
Definition: plot.C:23
double fCharge
Definition: Solver.h:69
Vector cross(Vector const &a, Vector const &b)
Return cross product of two vectors.
double fPred
Definition: Solver.h:57
SpaceCharge * fSC
Definition: Solver.h:33