Commit 560c909b authored by ext-calvo_p's avatar ext-calvo_p
Browse files

loss position in m

parent d3f954c4
......@@ -201,7 +201,7 @@ void ParallelCyclotronTracker::bgf_main_collision_test() {
int res = bgf_m->partInside(itsBunch_m->R[i], itsBunch_m->P[i], dtime, itsBunch_m->PType[i], itsBunch_m->Q[i], intecoords, triId);
//int res = bgf_m->partInside(itsBunch_m->R[i]*1.0e-3, itsBunch_m->P[i], dtime, itsBunch_m->PType[i], itsBunch_m->Q[i], intecoords, triId);
if(res >= 0) {
lossDs_m->addParticle(itsBunch_m->R[i]*1000, itsBunch_m->P[i],
lossDs_m->addParticle(itsBunch_m->R[i], itsBunch_m->P[i],
itsBunch_m->ID[i], itsBunch_m->getT()*1e9,
turnnumber_m, itsBunch_m->bunchNum[i]);
itsBunch_m->Bin[i] = -1;
......
......@@ -353,7 +353,7 @@ bool Cyclotron::apply(const size_t &id, const double &t, Vector_t &E, Vector_t &
<< ": Particle " << id
<< " out of the global aperture of cyclotron!" << endl;
gmsgALL << level4 << getName()
<< ": Coords: "<< RefPartBunch_m->R[id] << endl;
<< ": Coords: "<< RefPartBunch_m->R[id] << " m" << endl;
} else{
flagNeedUpdate = apply(RefPartBunch_m->R[id], RefPartBunch_m->P[id], t, E, B);
......@@ -362,7 +362,7 @@ bool Cyclotron::apply(const size_t &id, const double &t, Vector_t &E, Vector_t &
<< ": Particle "<< id
<< " out of the field map boundary!" << endl;
gmsgALL << level4 << getName()
<< ": Coords: "<< RefPartBunch_m->R[id] << endl;
<< ": Coords: "<< RefPartBunch_m->R[id] << " m" << endl;
}
}
......
......@@ -106,6 +106,7 @@ bool Stripper::doCheck(PartBunchBase<double, 3> *bunch, const int turnnumber, co
strippoint(0) = (B_m * B_m * bunch->R[i](0) - A_m * B_m* bunch->R[i](1) - A_m * C_m) / (R_m * R_m);
strippoint(1) = (A_m * A_m * bunch->R[i](1) - A_m * B_m* bunch->R[i](0) - B_m * C_m) / (R_m * R_m);
strippoint(2) = bunch->R[i](2);
strippoint = strippoint*0.001; // mm->m
lossDs_m->addParticle(strippoint, bunch->P[i], bunch->ID[i], t+dt,
turnnumber, bunch->bunchNum[i]);
......
......@@ -179,7 +179,7 @@ void BeamStrippingPhysics::doPhysics(PartBunchBase<double, 3> *bunch) {
}
if (pdead_GS == true || pdead_LS == true) {
lossDs_m->addParticle(bunch->R[i], bunch->P[i], bunch->ID[i],
lossDs_m->addParticle(bunch->R[i]*0.001, bunch->P[i], bunch->ID[i],
bunch->getT()*1e9, 0, bunch->bunchNum[i]);
if (stop) {
bunch->Bin[i] = -1;
......
......@@ -104,7 +104,7 @@ private:
void writeHeaderASCII() {
if(Ippl::myNode() == 0) {
//FIXME Issue #45 (Cyclotron units)
os_m << "# Element " << element_m << " x (mm), y (mm), z (mm), px ( ), py ( ), pz ( ), id";
os_m << "# Element " << element_m << " x (m), y (m), z (m), px ( ), py ( ), pz ( ), id";
if (time_m.size() != 0) {
os_m << ", turn, bunchNumber, time (ns) ";
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment