Go to the source code of this file.
|
double | Metric (const std::vector< SpaceCharge * > &scs, double alpha) |
|
double | Metric (const std::vector< CollectionWireHit * > &cwires, double alpha) |
|
QuadExpr | Metric (const SpaceCharge *sci, const SpaceCharge *scj, double alpha) |
|
double | SolvePair (CollectionWireHit *cwire, SpaceCharge *sci, SpaceCharge *scj, double xmin, double xmax, double alpha) |
|
void | Iterate (CollectionWireHit *cwire, double alpha) |
|
void | Iterate (SpaceCharge *sc, double alpha) |
|
void | Iterate (const std::vector< CollectionWireHit * > &cwires, const std::vector< SpaceCharge * > &orphanSCs, double alpha) |
|
Definition at line 263 of file Solver.cxx.
268 for(
unsigned int i = 0; i+1 <
N; ++i){
271 for(
unsigned int j = i+1; j <
N; ++j){
274 const double x =
SolvePair(cwire, sci, scj, alpha);
void AddCharge(double dq)
process_name opflash particleana ie x
std::vector< SpaceCharge * > fCrossings
double SolvePair(CollectionWireHit *cwire, SpaceCharge *sci, SpaceCharge *scj, double alpha)
process_name largeant stream1 can override from command line with o or output physics producers generator N
Definition at line 286 of file Solver.cxx.
297 x = std::max(xmin, x);
299 const double chisq_new = chisq.
Eval(x);
304 const double chisq_n = chisq.
Eval(xmin);
306 if(chisq_n < chisq_new)
void AddCharge(double dq)
process_name opflash particleana ie x
process_name pandoraGausCryo1 vertexChargeCryo1 vertexStubCryo1 xmin
double Metric(double q, double p)
double Eval(double x) const
Definition at line 313 of file Solver.cxx.
319 unsigned int cwireIdx = 0;
320 if (!cwires.empty()){
322 Iterate(cwires[cwireIdx], alpha);
324 const unsigned int prime = 1299827;
325 cwireIdx = (cwireIdx+prime)%cwires.size();
326 }
while(cwireIdx != 0);
void Iterate(CollectionWireHit *cwire, double alpha)
double Metric |
( |
const std::vector< SpaceCharge * > & |
scs, |
|
|
double |
alpha |
|
) |
| |
Definition at line 83 of file Solver.cxx.
87 std::set<InductionWireHit*> iwires;
89 if(sc->fWire1) iwires.insert(sc->fWire1);
90 if(sc->fWire2) iwires.insert(sc->fWire2);
93 ret -= alpha*
sqr(sc->fPred);
96 ret -= alpha * sc->fPred * sc->fNeiPotential;
101 ret +=
Metric(iwire->fCharge, iwire->fPred);
double Metric(double q, double p)
Definition at line 108 of file Solver.cxx.
110 std::vector<SpaceCharge*> scs;
112 scs.insert(scs.end(), cwire->fCrossings.begin(), cwire->fCrossings.end());
113 return Metric(scs, alpha);
double Metric(double q, double p)
Definition at line 117 of file Solver.cxx.
125 const double scip = sci->
fPred;
126 const double scjp = scj->
fPred;
129 ret -= alpha*
sqr(scip + x);
130 ret -= alpha*
sqr(scjp - x);
141 ret += 2 * alpha * (scip +
x) * scjp * n.
fCoupling;
142 ret += 2 * alpha * (scjp - x) * scip * n.
fCoupling;
145 ret -= 2 * alpha * (scip +
x) * (scjp - x) * n.
fCoupling;
155 const double qi1 = iwire1 ? iwire1->
fCharge : 0;
156 const double pi1 = iwire1 ? iwire1->
fPred : 0;
158 const double qj1 = jwire1 ? jwire1->
fCharge : 0;
159 const double pj1 = jwire1 ? jwire1->
fPred : 0;
161 if(iwire1 == jwire1){
163 if(iwire1) ret +=
Metric(qi1, pi1);
166 if(iwire1) ret +=
Metric(qi1, pi1 + x);
167 if(jwire1) ret +=
Metric(qj1, pj1 - x);
173 const double qi2 = iwire2 ? iwire2->
fCharge : 0;
174 const double pi2 = iwire2 ? iwire2->
fPred : 0;
176 const double qj2 = jwire2 ? jwire2->
fCharge : 0;
177 const double pj2 = jwire2 ? jwire2->
fPred : 0;
179 if(iwire2 == jwire2){
180 if(iwire2) ret +=
Metric(qi2, pi2);
183 if(iwire2) ret +=
Metric(qi2, pi2 + x);
184 if(jwire2) ret +=
Metric(qj2, pj2 - x);
process_name opflash particleana ie x
std::vector< Neighbour > fNeighbours
double fNeiPotential
Neighbour-induced potential.
InductionWireHit * fWire2
InductionWireHit * fWire1
double Metric(double q, double p)