Exemplo n.º 1
0
   virtual void SetUp()
   {
      f_vector_2d_t momentumVec(n_sections, f_vector_t(N_t + 1));
      for (auto &v : momentumVec)
         mymath::linspace(v.data(), p_i, p_f, N_t + 1);

      f_vector_2d_t alphaVec(n_sections , f_vector_t(alpha_order+1, alpha));

      f_vector_t CVec(n_sections, C);

      f_vector_2d_t hVec(n_sections , f_vector_t(N_t + 1, h));

      f_vector_2d_t voltageVec(n_sections , f_vector_t(N_t + 1, V));

      f_vector_2d_t dphiVec(n_sections , f_vector_t(N_t + 1, dphi));


	   Context::GP = new GeneralParameters(N_t, CVec, alphaVec, alpha_order, momentumVec,
                                 proton);

	   Context::Beam = new Beams(N_p, N_b);

	   Context::RfP = new RfParameters(n_sections, hVec, voltageVec, dphiVec);


      longitudinal_bigaussian(tau_0 / 4, 0, -1, false);

	   Context::Slice = new Slices(N_slices);

   }
Exemplo n.º 2
0
   virtual void SetUp()
   {
      f_vector_2d_t momentumVec(n_sections, f_vector_t(N_t + 1, p_i));

      f_vector_2d_t alphaVec(n_sections, f_vector_t(alpha_order + 1, alpha));

      f_vector_t CVec(n_sections, C);

      f_vector_2d_t hVec(n_sections , f_vector_t(N_t + 1, h));

      f_vector_2d_t voltageVec(n_sections , f_vector_t(N_t + 1, V));

      f_vector_2d_t dphiVec(n_sections , f_vector_t(N_t + 1, dphi));

	   Context::GP = new GeneralParameters(N_t, CVec, alphaVec, alpha_order,
                                 momentumVec, proton);

	   Context::Beam = new Beams(N_p, N_b);

	   Context::RfP = new RfParameters(n_sections, hVec, voltageVec, dphiVec);

      // long_tracker = new RingAndRfSection();


	   Context::Slice = new Slices(N_slices, 0,
                         -constant::pi,
                         constant::pi,
                         cuts_unit_type::rad);

   }
Exemplo n.º 3
0
    virtual void SetUp()
    {
        f_vector_2d_t momentumVec(n_sections, f_vector_t(N_t + 1));
        for (auto &v : momentumVec)
            mymath::linspace(v.data(), p_i, 1.01 * p_i, N_t + 1);

        f_vector_2d_t alphaVec(n_sections, f_vector_t(alpha_order, alpha));

        f_vector_t CVec(n_sections, C);

        f_vector_2d_t hVec(n_sections, f_vector_t(N_t + 1, h));

        f_vector_2d_t voltageVec(n_sections, f_vector_t(N_t + 1, V));

        f_vector_2d_t dphiVec(n_sections, f_vector_t(N_t + 1, dphi));

        Context::GP = new GeneralParameters(N_t, CVec, alphaVec,
                                             momentumVec,
                                            GeneralParameters::particle_t::proton);


        auto GP = Context::GP;

        auto Beam = Context::Beam = new Beams(GP, N_p, N_b);

        auto RfP = Context::RfP = new RfParameters(GP, n_sections, hVec,
                voltageVec, dphiVec);


        // RingAndRfSection *long_tracker = new RingAndRfSection();

        // longitudinal_bigaussian(GP, RfP, Beam, tau_0 / 4, 0, -1, false);
        Context::Slice = new Slices(RfP, Beam, N_slices);
    }
Exemplo n.º 4
0
    virtual void SetUp()
    {
        omp_set_num_threads(1);

        f_vector_2d_t momentumVec(n_sections, f_vector_t(N_t + 1, p_i));

        f_vector_2d_t alphaVec(n_sections, f_vector_t(alpha_order, alpha));

        f_vector_t CVec(n_sections, C);

        f_vector_2d_t hVec(n_sections, f_vector_t(N_t + 1, h));

        f_vector_2d_t voltageVec(n_sections, f_vector_t(N_t + 1, V));

        f_vector_2d_t dphiVec(n_sections, f_vector_t(N_t + 1, dphi));

        Context::GP = new GeneralParameters(N_t, CVec, alphaVec,
                                             momentumVec,
                                            GeneralParameters::particle_t::proton);

        // Context::Beam = new Beams(N_p, N_b);

        auto GP = Context::GP;
        auto Beam = Context::Beam = new Beams(GP, N_p, N_b);

        Context::RfP = new RfParameters(GP, n_sections, hVec,
                                        voltageVec, dphiVec);

        RfP1 = new RfParameters(GP, n_sections, hVec, voltageVec, dphiVec);
        RfP2 = new RfParameters(GP, n_sections, hVec, voltageVec, dphiVec);
        long_tracker1 = new RingAndRfSection(RfP1);
        long_tracker2 = new RingAndRfSection(RfP2);
        // long_tracker = new RingAndRfSection(RfP);

        // Context::Slice = new Slices(RfP, Beam, N_slices, 0, -constant::pi, constant::pi,
        //                             cuts_unit_type::rad);
    }