Changed j_phi calc
This commit is contained in:
@@ -138,7 +138,9 @@ void CurrentCollector::collect(particle::Particle* particle,
|
||||
|
||||
collectRadialMovement(bin_old, bin_new, weight);
|
||||
collectLongitudinalMovement(bin_old, bin_new, weight);
|
||||
collectAzimuthalMovement(bin_old, bin_new, weight);
|
||||
collectAzimuthalMovement(old_position.cartesianEntries(),
|
||||
particle->cartesianPosition().cartesianEntries(),
|
||||
bin_old, weight);
|
||||
}
|
||||
|
||||
void CurrentCollector::collectRadialMovement(
|
||||
@@ -161,19 +163,19 @@ void CurrentCollector::collectLongitudinalMovement(
|
||||
z_positive_crossings(bin_old(0), bin_old(1)) += weight;
|
||||
}
|
||||
}
|
||||
// does not work!
|
||||
// does not work correctly if \Delta t*v_phi > pi*r!
|
||||
void CurrentCollector::collectAzimuthalMovement(
|
||||
const blitz::TinyVector<double, 3>& old_pos_cart,
|
||||
const blitz::TinyVector<double, 3>& new_pos_cart,
|
||||
const blitz::TinyVector<int, 2>& bin_old,
|
||||
const blitz::TinyVector<int, 2>& bin_new,
|
||||
const double weight) {
|
||||
if ((bin_new(1) < bin_old(1)) ||
|
||||
((bin_old(1) == 0) &&
|
||||
(bin_new(1) == position_binning_.binIndexMax()(1)))) {
|
||||
phi_negative_crossings(bin_old(0), bin_new(1)) += weight;
|
||||
} else if ((bin_new(1) > bin_old(1)) ||
|
||||
((bin_old(1) == position_binning_.binIndexMax()(1)) &&
|
||||
(bin_new(1) == 0))) {
|
||||
phi_positive_crossings(bin_old(0), bin_new(1) - 1) += weight;
|
||||
if(old_pos_cart(0) < 0 && new_pos_cart(0) < 0) {
|
||||
return;
|
||||
}
|
||||
if(old_pos_cart(1) > 0 && new_pos_cart(1) < 0) {
|
||||
phi_negative_crossings(bin_old) += weight;
|
||||
} else if (old_pos_cart(1) < 0 && new_pos_cart(1) > 0) {
|
||||
phi_positive_crossings(bin_old) += weight;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user