opal AT lists.psi.ch
Subject: The OPAL Discussion Forum
List archive
- From: jjyang <jianjun.yang AT psi.ch>
- To: Andreas Adelmann <andreas.adelmann AT psi.ch>
- Cc: yuanjie bi <yuanjiebi AT gmail.com>, Veenendaal Jeroen <Jeroen.Veenendaal AT psi.ch>, "opal AT lists.psi.ch" <Opal AT lists.psi.ch>
- Subject: [Opal] Re: Discussion on Collimators
- Date: Fri, 2 Mar 2012 10:32:47 +0100
- List-archive: <https://lists.web.psi.ch/pipermail/opal/>
- List-id: The OPAL Discussion Forum <opal.lists.psi.ch>
Hi Andreas,
Well, This maybe not very effective.
For example, in CYCL in order to save time the collimator is not checked every step, but for any turn when the bunch's radial and azimuth position is close to it like this:
if( r1 > r_start - 10.0 && r1 < r_end + 10.0 )if( theta1 > theta_start - 10.0 && r1 < theta_end + 10.0 )
{...}
In compact cyclotorn, you don't know the particle will hit the collimator.
While in the T, it is check only on time on its z location (position_m) like this:
if((z > position_m) && (z <= position_m + getElementLength()))
{...}
If we merge all types of collimators in one, the different concepts comes together, this will cause confusing for both T and CYCL user, and for developer.
Jianjun
在 2012-3-2,上午10:11, Andreas Adelmann 写道:
Here a naive question: why do we need a ccollimator at all?If we are in a Cyclotron we simply specify (more) attributes such as radii and azimuthal positions.With this we avoid an inflation of elements !Thoughts about this !??AAOn Mar 2, 2012, at 9:59 AM, jjyang wrote:Hi Yuanjie,I tried to call this function this morning, it does not work.When I read the code in Collimator::apply ( as following in blue), it seems designed for ecollimator, not ccollimator,I did not see it use any parameters of ccollimator, like anglestart, angleend, rstart, rend.I think we need to do some coding for ccollimator before we can use it.What is your thought on this?Jianjunbool Collimator::apply(const int &i, const double &t, Vector_t &E, Vector_t &B) {const Vector_t &R = RefPartBunch_m->R[i] - Vector_t(dx_m, dy_m, ds_m); // including the missaligmentconst Vector_t &P = RefPartBunch_m->P[i];const double recpgamma = Physics::c * RefPartBunch_m->getdT() / sqrt(1.0 + dot(P, P));/**check if we are in the longitudinalrange of the collimator*/const double z = R(2) + P(2) * recpgamma;// particle is not deadbool pdead = false;if((z > position_m) && (z <= position_m + getElementLength())) {if(isAPepperPot_m) {/**------------|(0)| |(0)|---- -----| a) || |---- -----|(0)| |(0)|yL------------xL|---| d|--| pitchObservation: the area in a) is much larger than thearea(s) (0). In a) particles are lost in (0)particles they are not lost.*/const double h = pitch_m;const double xL = - 0.5 * h * (nHolesX_m - 1);const double yL = - 0.5 * h * (nHolesY_m - 1);bool alive = false;for(int m = 0; (m < nHolesX_m && (!alive)); m++) {for(int n = 0; (n < nHolesY_m && (!alive)); n++) {double x_m = xL + (m * h);double y_m = yL + (n * h);/** are we in a) ? */double rr = std::pow((R(0) - x_m) / rHole_m, 2) + std::pow((R(1) - y_m) / rHole_m, 2);alive = (rr < 1.0);}}pdead = !alive;} else if(isASlit_m) {// if ( (abs(R(0) >= getXsize()) || (abs(R(1) >= getYsize()))))if(R(0) <= -getXsize() || R(1) <= -getYsize() || R(0) >= getXsize() || R(1) >= getYsize())pdead = true;} else {// case of an elliptic collimator}if(pdead) {double frac = (R(2) - position_m) / P(2) * recpgamma;PosX_m.push_back(R(0));PosY_m.push_back(R(1));PosZ_m.push_back(z);MomentumX_m.push_back(P(0));MomentumY_m.push_back(P(1));MomentumZ_m.push_back(P(2));time_m.push_back(t + frac * RefPartBunch_m->getdT());id_m.push_back(i);}}return pdead;}在 2012-3-2,上午9:44, Andreas Adelmann 写道:That is exactly how I remember too!AAOn Mar 2, 2012, at 3:10 AM, Yuanjie Bi wrote:Hi Jianjun and Jeroen,
Without any surfacephysics, you can use the function Collimator::apply
in Collimator.cpp to remove particles hitting on the collimator. It
checks the shape the of collimator and then removes partilces on it.
Best wishes
Yuanjie
2012/3/1, jjyang <jianjun.yang AT psi.ch>:Hi Jeroen, I am not sure whether the ccollimator can work withoutsurfacephysics.Hi Yuanjie, will the particle just be deleted when it hits the collimatorif no surfacephysics is specified to it ?Cheers,Jianjun在 2012-3-1,下午2:34, Veenendaal Jeroen 写道:Dear Yang Jianjun,I am trying to put a collimator in it without any surfacephysics.Andreas told me that without this the particle will stop when it hits thecollimator. To test this I made a collimator with aperture of 0.But the particles do not stop.The particles still continu but the numberof turns they need to go to 250 MeV is higher than without the collimator.So my question is:Is the particle slow down and than accelerated again? Or is theresomething else?Thank youGrJeroen Veenendaal------
Dr. sc. math. Andreas (Andy) Adelmann
Staff Scientist
Paul Scherrer Institut WLGB/132 CH-5232 Villigen PSI
Phone Office: xx41 56 310 42 33 Fax: xx41 56 310 31 91
Phone Home: xx41 62 891 91 44
-------------------------------------------------------
Thursdays: ETH CAB H 83.1 +41 44 632 36 72
============================================
The more exotic, the more abstract the knowledge,
the more profound will be its consequences.
Leon Lederman
============================================------
Dr. sc. math. Andreas (Andy) Adelmann
Staff Scientist
Paul Scherrer Institut WLGB/132 CH-5232 Villigen PSI
Phone Office: xx41 56 310 42 33 Fax: xx41 56 310 31 91
Phone Home: xx41 62 891 91 44
-------------------------------------------------------
Thursdays: ETH CAB H 83.1 +41 44 632 36 72
============================================
The more exotic, the more abstract the knowledge,
the more profound will be its consequences.
Leon Lederman
============================================
- [Opal] Discussion on Collimators, Andreas Adelmann, 03/02/2012
- [Opal] Re: Discussion on Collimators, jjyang, 03/02/2012
- [Opal] Re: Discussion on Collimators, Andreas Adelmann, 03/02/2012
- Re: [Opal] Re: Discussion on Collimators, jjyang, 03/02/2012
- [Opal] Re: Discussion on Collimators, Andreas Adelmann, 03/02/2012
- [Opal] Re: Discussion on Collimators, jjyang, 03/02/2012
Archive powered by MHonArc 2.6.19.