15 TFile *f_in = TFile::Open(fileName.c_str());
17 throw cms::Exception(
"LHCOpticalFunctionsSet") <<
"Cannot open file " << fileName <<
".";
20 for (
unsigned int fi = 0; fi <
nFunctions; ++fi)
23 if (fi ==
evx) tag =
"v_x";
24 else if (fi ==
eLx) tag =
"L_x";
25 else if (fi ==
e14) tag =
"E_14";
26 else if (fi ==
exd) tag =
"x_D";
27 else if (fi ==
evpx) tag =
"vp_x";
28 else if (fi ==
eLpx) tag =
"Lp_x";
29 else if (fi ==
e24) tag =
"E_24";
30 else if (fi ==
expd) tag =
"xp_D";
31 else if (fi ==
e32) tag =
"E_32";
32 else if (fi ==
evy) tag =
"v_y";
33 else if (fi ==
eLy) tag =
"L_y";
34 else if (fi ==
eyd) tag =
"y_D";
35 else if (fi ==
e42) tag =
"E_42";
36 else if (fi ==
evpy) tag =
"vp_y";
37 else if (fi ==
eLpy) tag =
"Lp_y";
38 else if (fi ==
eypd) tag =
"yp_D";
40 throw cms::Exception(
"LHCOpticalFunctionsSet") <<
"Invalid tag for optical functions: \"" << fi <<
"\"";
42 std::string objPath = directoryName +
"/g_" + tag +
"_vs_xi";
43 auto gr_obj =
dynamic_cast<TGraph*
>( f_in->Get(objPath.c_str()) );
45 throw cms::Exception(
"LHCOpticalFunctionsSet") <<
"Cannot load object " << objPath <<
" from file " << fileName <<
".";
50 const unsigned int num_xi_vals = graphs[0]->GetN();
55 for (
unsigned int fi = 0; fi <
nFunctions; ++fi)
58 for (
unsigned int pi = 0;
pi < num_xi_vals; ++
pi)
60 const double xi = graphs[0]->GetX()[
pi];
63 for (
unsigned int fi = 0; fi <
m_fcn_values.size(); ++fi)
LHCOpticalFunctionsSet()=default
std::vector< double > m_xi_values
std::vector< std::vector< double > > m_fcn_values
length unit cm