Skip to Content.
Sympa Menu

opal - [Opal] Fwd: Collimator without surface physics

opal AT lists.psi.ch

Subject: The OPAL Discussion Forum

List archive

[Opal] Fwd: Collimator without surface physics


Chronological Thread 
  • From: Andreas Adelmann <andreas.adelmann AT psi.ch>
  • To: "opal AT lists.psi.ch" <Opal AT lists.psi.ch>
  • Subject: [Opal] Fwd: Collimator without surface physics
  • Date: Mon, 5 Mar 2012 20:01:02 +0100
  • List-archive: <https://lists.web.psi.ch/pipermail/opal/>
  • List-id: The OPAL Discussion Forum <opal.lists.psi.ch>

Forwarded ... 

Begin forwarded message:

From: jjyang <jianjun.yang AT psi.ch>
Date: March 5, 2012 5:31:20 PM GMT+01:00
To: Veenendaal Jeroen <Jeroen.Veenendaal AT psi.ch>
Cc: Adelmann Andreas <andreas.adelmann AT psi.ch>, yuanjie bi <yuanjiebi AT gmail.com>, Zhang Hui <hui.zhang AT psi.ch>, Schippers Jacobus Maarten <marco.schippers AT psi.ch>
Subject: Collimator without surface physics

Hi Jeroen,

I just changed the OPAL code.
Now the CCollimator element can work without surface physics.

if ( no surface physics is not specified  in the input file) {

the particle hitting the collimator will be deleted directly.
Its phase space data are recorded in *.loss file  

} else {

execute  surface physics algorithm.

}

Please make a update and check it with your COMET example.

Cheers,
Jianjun Yang
---------------------------------------------
Post-doctoral
Massachusetts Institute of Technology

Work Address:
Paul Scherrer Institut   WBGB/125
CH-5232 Villigen PSI Switzerland
----------------------------------------------



在 2012-3-2,下午2:11, Yuanjie Bi 写道:

Hi Jianjun,

Yes, you are right. Hope you can complete the apply function, and make
sure it is true only when there is no surface physics.

Best wishes
Yuanjie


2012/3/2, jjyang <jianjun.yang AT psi.ch>:
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?

Jianjun

bool 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 missaligment
  const 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 longitudinal
  range of the collimator
  */

  const double z = R(2) + P(2) * recpgamma;

  // particle is not dead
  bool pdead = false;

  if((z > position_m) && (z <= position_m + getElementLength())) {
      if(isAPepperPot_m) {

          /**
             ------------
             |(0)|  |(0)|
             ----   -----
             |    a)    |
             |          |
             ----   -----
             |(0)|  |(0)|
             yL------------
             xL
             |---| d
             |--| pitch
             Observation: the area in a) is much larger than the
             area(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!
AA
On 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 without
surfacephysics.

Hi Yuanjie,  will the particle just be deleted when it hits the
collimator
if 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
the
collimator. To test this I made a collimator with aperture of 0.

But the particles do not stop.The particles still continu but the
number
of 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 there
something else?

Thank you

Gr
Jeroen 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] Fwd: Collimator without surface physics, Andreas Adelmann, 03/05/2012

Archive powered by MHonArc 2.6.19.

Top of Page