40 std::cout <<
"Static distortion file could not be opened!" << std::endl;
60 std::cout <<
"TimeOrdered distortion file could not be opened!" << std::endl;
88 if (event_num > nentries) event_num = event_num %
nentries;
89 if (event_num % nentries == 0 && event_num != 0)
91 std::cout <<
"Distortion map sequence repeating as of event number " << event_num << std::endl;
102 double r=sqrt(x*x+y*y);
103 double phi=std::atan2(y,x);
110 double cosphi=cos(phi);
111 double sinphi=sin(phi);
112 double dx=dr*cosphi-dphi*sinphi;
119 double r=sqrt(x*x+y*y);
120 double phi=std::atan2(y,x);
127 double cosphi=cos(phi);
128 double sinphi=sin(phi);
129 double dy=dphi*cosphi+dr*sinphi;
136 double r=sqrt(x*x+y*y);
137 double phi=std::atan2(y,x);
166 if (phi < 0) phi += 2 *
M_PI;
167 const int zpart=(z>0?1:0);
169 TH3* hdistortion=
nullptr;
171 if (axis!=
'r' && axis!=
'p' && axis !=
'z'){
172 std::cout <<
"Distortion Requested along axis " << axis <<
" which is invalid. Exiting.\n" << std::endl;
176 double _distortion=0.;
182 hdistortion=
hDRint[zpart];
183 }
else if (axis==
'p'){
184 hdistortion=
hDPint[zpart];
185 }
else if (axis==
'z'){
186 hdistortion=
hDZint[zpart];
189 _distortion+=hdistortion->Interpolate(phi, r, z);
191 std::cout <<
"Static Distortion Requested along axis " << axis <<
", but distortion map does not exist. Exiting.\n" << std::endl;
200 }
else if (axis==
'p'){
202 }
else if (axis==
'z'){
206 _distortion+=hdistortion->Interpolate(phi, r, z);
208 std::cout <<
"Time Series Distortion Requested along axis " << axis <<
", but distortion map does not exist. Exiting.\n" << std::endl;