~mbogomilov/maus/devel3

« back to all changes in this revision

Viewing changes to src/legacy/BeamTools/BTMultipole.cc

  • Committer: Durga Rajaram
  • Date: 2014-01-14 07:07:02 UTC
  • mfrom: (659.1.80 relcand)
  • Revision ID: durga@fnal.gov-20140114070702-2l1fuj1w6rraw7xe
Tags: MAUS-v0.7.6
MAUS-v0.7.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
#include "BeamTools/BTMultipole.hh"
27
27
 
28
 
#include "Interface/Squeal.hh"
 
28
#include "Utils/Exception.hh"
29
29
#include "Interface/Squeak.hh"
30
30
 
31
31
const BTMultipole * BTMultipole::staticMultipole = NULL;
69
69
      if (curvature == "StraightEnds") _curvature = straightEnds;
70
70
      if (curvature == "Constant" || curvature == "") _curvature = constant;
71
71
      if (_width >= fabs(_rCurv))
72
 
        throw(Squeal(Squeal::nonRecoverable,
 
72
        throw(MAUS::Exception(MAUS::Exception::nonRecoverable,
73
73
              "Multipole with width > radius of curvature",
74
74
              "BTMultipole::BTMultipole"));
75
75
      if (_length > fabs(2*pi*_rCurv))
76
 
        throw(Squeal(Squeal::nonRecoverable,
 
76
        throw(MAUS::Exception(MAUS::Exception::nonRecoverable,
77
77
                     "Multipole with bending angle > 360 degrees",
78
78
                     "BTMultipole::BTMultipole"));
79
79
      _endRotation = CLHEP::HepRotation(CLHEP::Hep3Vector(0, 1, 0),
112
112
    case momentumBased:
113
113
      return TransformToRotatedMomentumBased(Point);
114
114
    default:
115
 
      throw(Squeal(Squeal::nonRecoverable, "Did not recognise curvature model",
 
115
      throw(MAUS::Exception(MAUS::Exception::nonRecoverable, "Did not recognise curvature model",
116
116
                   "BTMultipole::TransformToRotated(const double*)"));
117
117
  }
118
118
}
187
187
      return _momentum/EMfield[1]/CLHEP::eplus/CLHEP::c_light;
188
188
    }
189
189
    default:
190
 
      throw(Squeal(Squeal::nonRecoverable, "Did not recognise curvature model",
 
190
      throw(MAUS::Exception(MAUS::Exception::nonRecoverable, "Did not recognise curvature model",
191
191
                   "BTMultipole::RadiusOfCurvature(double)"));
192
192
  }
193
193
}
204
204
    case momentumBased:
205
205
      return TransformToRectangularMomentumBased(point, value);
206
206
    default:
207
 
      throw(Squeal(Squeal::nonRecoverable, "Did not recognise curvature model",
 
207
      throw(MAUS::Exception(MAUS::Exception::nonRecoverable, "Did not recognise curvature model",
208
208
                "BTMultipole::TransformToRectangular(const double*, double*)"));
209
209
  }
210
210
}
349
349
                                           &s, sMax, &h, y);
350
350
      if (status != GSL_SUCCESS) {
351
351
        Print(Squeak::mout(Squeak::debug));
352
 
        throw(Squeal(Squeal::nonRecoverable,
 
352
        throw(MAUS::Exception(MAUS::Exception::nonRecoverable,
353
353
                    "Error calculating reference trajectory",
354
354
                    "BTMultipole::SetupReferenceTrajectory()"));
355
355
      }
389
389
                                         _length, &h, y);
390
390
    if (status != GSL_SUCCESS) {
391
391
      Print(Squeak::mout(Squeak::debug));
392
 
      throw(Squeal(Squeal::nonRecoverable, "Error integrating reference By",
 
392
      throw(MAUS::Exception(MAUS::Exception::nonRecoverable, "Error integrating reference By",
393
393
                   "BTMultipole::SetupMagnitude()"));
394
394
    }
395
395
    step++;