CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrajectoryStateClosestToPoint.cc
Go to the documentation of this file.
3 
4 // Private constructor
5 
7 TrajectoryStateClosestToPoint(const FTS& originalFTS, const GlobalPoint& referencePoint) :
8  theFTS(originalFTS), theRefPoint(referencePoint),valid(true), theFTSavailable(true) {
9  try {
10  theParameters = PerigeeConversions::ftsToPerigeeParameters(originalFTS, referencePoint, thePt);
11  if (theFTS.hasError()) {
13  errorIsAvailable = true;
14  }
15  else {
16  errorIsAvailable = false;
17  }
18  theField = &(originalFTS.parameters().magneticField());
19  } catch (const cms::Exception &ex) {
20  if (ex.category() != "PerigeeConversions") throw;
21  edm::LogWarning("TrajectoryStateClosestToPoint_PerigeeConversions") << "Caught exception " << ex.explainSelf() << ".\n";
22  valid = false;
23  }
24 }
25 
26 
27 
29  if(!isValid()) throw TrajectoryStateException("TrajectoryStateClosestToPoint is invalid and cannot return any parameters");
34  if (errorIsAvailable) {
36  } else {
37  theFTS = FTS(gtp);
38  }
39  theFTSavailable = true;
40 }
PerigeeTrajectoryParameters ftsToPerigeeParameters(const FTS &originalFTS, const GlobalPoint &referencePoint, double &pt)
const GlobalTrajectoryParameters & parameters() const
virtual std::string explainSelf() const
Definition: Exception.cc:146
std::string const & category() const
Definition: Exception.cc:183
TrajectoryStateClosestToPoint()
parameter dimension
GlobalPoint positionFromPerigee(const PerigeeTrajectoryParameters &parameters, const GlobalPoint &referencePoint)
GlobalVector momentumFromPerigee(const AlgebraicVector3 &momentum, const TrackCharge &charge, const GlobalPoint &referencePoint, const MagneticField *field)
CurvilinearTrajectoryError curvilinearError(const PerigeeTrajectoryError &perigeeError, const GlobalTrajectoryParameters &gtp)
const MagneticField & magneticField() const
PerigeeTrajectoryError ftsToPerigeeError(const FTS &originalFTS)
PerigeeTrajectoryParameters theParameters