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 
8 #include "QuadExpr.h"
9 
10 /// Allow InductionWireHit and CollectionWireHit to be put in the same maps
11 /// where necessary.
12 class WireHit
13 {
14  // Do not add any virtual functions: will increase memory usage of all wires
15 };
16 
18 {
19 public:
20  InductionWireHit(int chan, double q);
21 
22  //protected:
23  int fChannel;
24 
25  double fCharge;
26 
27  double fPred;
28 };
29 
30 class SpaceCharge;
31 class Neighbour
32 {
33 public:
34  Neighbour(SpaceCharge* sc, double coupling);
35 
37  double fCoupling;
38 };
39 
40 class CollectionWireHit;
41 
43 {
44 public:
45  SpaceCharge(double x, double y, double z,
46  CollectionWireHit* cwire,
47  InductionWireHit* wire1, InductionWireHit* wire2);
48 
49  void AddCharge(double dq);
50 
51  //protected:
52  double fX, fY, fZ;
55 
56  std::vector<Neighbour> fNeighbours;
57 
58  double fPred;
59  double fNeiPotential; ///< Neighbour-induced potential
60 };
61 
63 {
64 public:
65  CollectionWireHit(int chan, double q, const std::vector<SpaceCharge*>& cross);
67 
68  //protected:
69  int fChannel;
70 
71  double fCharge;
72 
73  std::vector<SpaceCharge*> fCrossings;
74 };
75 
76 double Metric(const std::vector<SpaceCharge*>& scs, double alpha);
77 double Metric(const std::vector<CollectionWireHit*>& cwires, double alpha);
78 QuadExpr Metric(const SpaceCharge* sci, const SpaceCharge* scj, double alpha);
79 
80 double SolvePair(CollectionWireHit* cwire,
81  SpaceCharge* sci, SpaceCharge* scj,
82  double xmin, double xmax,
83  double alpha);
84 void Iterate(CollectionWireHit* cwire, double alpha);
85 void Iterate(SpaceCharge* sc, double alpha);
86 void Iterate(const std::vector<CollectionWireHit*>& cwires,
87  const std::vector<SpaceCharge*>& orphanSCs,
88  double alpha);
89 
90 #endif
double Metric(const std::vector< SpaceCharge * > &scs, double alpha)
Definition: Solver.cxx:83
double fCharge
Definition: Solver.h:25
double fPred
Definition: Solver.h:27
std::vector< Neighbour > fNeighbours
Definition: Solver.h:56
double fCoupling
Definition: Solver.h:37
void Iterate(CollectionWireHit *cwire, double alpha)
Definition: Solver.cxx:263
double fNeiPotential
Neighbour-induced potential.
Definition: Solver.h:59
double SolvePair(CollectionWireHit *cwire, SpaceCharge *sci, SpaceCharge *scj, double xmin, double xmax, double alpha)
double fZ
Definition: Solver.h:52
std::vector< SpaceCharge * > fCrossings
Definition: Solver.h:73
InductionWireHit * fWire2
Definition: Solver.h:54
double alpha
Definition: doAna.cpp:15
Definition: Solver.h:12
CollectionWireHit * fCWire
Definition: Solver.h:53
double fCharge
Definition: Solver.h:71
list x
Definition: train.py:276
Vector cross(Vector const &a, Vector const &b)
Return cross product of two vectors.
double fPred
Definition: Solver.h:58
SpaceCharge * fSC
Definition: Solver.h:36