22 struct NoIntersection {
23 bool operator()(
const TVector3&
v)
const {
24 return TMath::IsNaN(v.z());
42 double zmin,
double zmax,
43 double Bb,
double nrl,
44 double sigmaRPhi,
double N)
50 , mZMin(std::
min(zmin, zmax))
51 , mZMax(std::
max(zmin, zmax)) {
58 std::cout << ClassName() <<
" with:" << std::endl <<
63 "\tmagnetic field " <<
mMagField <<
" Tesla\n" <<
65 "\tpoint resolution " <<
mSigmaRPhi * 1.e6 <<
" microns\n" <<
74 TVector3 intersection(0., 0., std::numeric_limits<double>::quiet_NaN());
77 intersection.SetXYZ(radius, 0., z);
87 TVector3 intersection(0., 0., std::numeric_limits<double>::quiet_NaN());
90 intersection.SetXYZ(r, 0., z);
105 std::list<TVector3> xyz;
111 xyz.erase(std::remove_if(xyz.begin(), xyz.end(), NoIntersection()),
117 TVector3 path(0., 0., 0.);
118 if (2 == xyz.size()) {
121 if (xyz.front().Mag() > xyz.back().Mag()) {
122 path = xyz.front() - xyz.back();
124 path = xyz.back() - xyz.front();
147 n = floor(n_float + 0.5);