1 #ifndef TotemRPProtonTransportParametrization_LHC_OPTICS_APPROXIMATOR_H 2 #define TotemRPProtonTransportParametrization_LHC_OPTICS_APPROXIMATOR_H 37 double nominal_beam_momentum);
43 void Train(TTree *inp_tree,
46 int max_degree_x = 10,
47 int max_degree_tx = 10,
48 int max_degree_y = 10,
49 int max_degree_ty = 10,
50 bool common_terms =
false,
51 double *prec =
nullptr);
52 void Test(TTree *inp_tree,
56 void TestAperture(TTree *in_tree,
59 double ParameterOutOfRangePenalty(
double par_m[],
bool invert_beam_coord_sytems =
true)
const;
66 bool Transport(
const double *
in,
68 bool check_apertures =
false,
69 bool invert_beam_coord_sytems =
true)
const;
72 bool check_apertures =
false,
73 bool invert_beam_coord_sytems =
true)
const;
80 bool Transport2D(
const double *in,
82 bool check_apertures =
false,
83 bool invert_beam_coord_sytems =
true)
const;
85 bool Transport_m_GeV(
double in_pos[3],
86 double in_momentum[3],
88 double out_momentum[3],
90 double z2_z1_dist)
const;
92 void PrintInputRange();
93 bool CheckInputRange(
const double *in,
bool invert_beam_coord_sytems =
true)
const;
94 void AddRectEllipseAperture(
96 void PrintOpticalFunctions();
99 const std::vector<std::string> &input_vars);
108 void GetLineariasedTransportMatrixX(
double mad_init_x,
114 double d_mad_x = 10
e-6,
115 double d_mad_thx = 10
e-6);
124 void GetLineariasedTransportMatrixY(
double mad_init_x,
130 double d_mad_y = 10
e-6,
131 double d_mad_thy = 10
e-6);
133 double GetDx(
double mad_init_x,
138 double d_mad_xi = 0.001);
139 double GetDxds(
double mad_init_x,
144 double d_mad_xi = 0.001);
150 void GetLinearApproximation(
double atPoint[],
173 friend class ProtonTransportFunctionsESSource;
193 void AllocateErrorHists(TH1D *err_hists[4]);
194 void AllocateErrorInputCorHists(TH2D *err_inp_cor_hists[4][5]);
195 void AllocateErrorOutputCorHists(TH2D *err_out_cor_hists[4][5]);
197 void DeleteErrorHists(TH1D *err_hists[4]);
198 void DeleteErrorCorHistograms(TH2D *err_cor_hists[4][5]);
200 void FillErrorHistograms(
double errors[4], TH1D *err_hists[4]);
201 void FillErrorDataCorHistograms(
double errors[4],
double var[5], TH2D *err_cor_hists[4][5]);
203 void WriteHistograms(TH1D *err_hists[4],
204 TH2D *err_inp_cor_hists[4][5],
205 TH2D *err_out_cor_hists[4][5],
224 bool CheckAperture(
const double *in,
bool invert_beam_coord_sytems =
true)
const;
232 #endif //TotemRPProtonTransportParametrization_LHC_OPTICS_APPROXIMATOR_H
std::vector< LHCApertureApproximator > apertures_
apertures on the way
beam_type GetBeamType() const
TMultiDimFet theta_x_parametrisation
polynomial approximation for theta_x
double nominal_beam_momentum_
GeV/c.
double s_begin_
begin of transport along the reference orbit
double nominal_beam_energy_
GeV.
TMultiDimFet theta_y_parametrisation
polynomial approximation for theta_y
parametrization
specify parametrization (see SWGuidePATKinematicResolutions for more details)
bool trained_
trained polynomials
std::vector< TMultiDimFet * > out_polynomials
Class finds the parametrisation of MADX proton transport and transports the protons according to it 5...
DecomposeProduct< arg, typename Div::arg > D
double s_end_
end of transport along the reference orbit
std::vector< std::string > coord_names
pointers to polynomials
TMultiDimFet y_parametrisation
polynomial approximation for y
TMultiDimFet x_parametrisation
polynomial approximation for x