#include <BasicMultiTrajectoryState.h>
Definition at line 10 of file BasicMultiTrajectoryState.h.
typedef TrajectoryStateOnSurface BasicMultiTrajectoryState::TSOS [private] |
Definition at line 12 of file BasicMultiTrajectoryState.h.
BasicMultiTrajectoryState::BasicMultiTrajectoryState | ( | const std::vector< TSOS > & | tsvec | ) |
Definition at line 8 of file BasicMultiTrajectoryState.cc.
References Exception, i, and theStates.
: theCombinedStateUp2Date( false) { theStates.reserve(tsvec.size()); for (std::vector<TSOS>::const_iterator i=tsvec.begin(); i!=tsvec.end(); i++) { if (!i->isValid()) { throw cms::Exception("LogicError") << "MultiTrajectoryState constructed with invalid state"; } if (i->hasError() != tsvec.front().hasError()) { throw cms::Exception("LogicError") << "MultiTrajectoryState mixes states with and without errors"; } if ( &i->surface() != &tsvec.front().surface()) { throw cms::Exception("LogicError") << "MultiTrajectoryState mixes states with different surfaces"; } if ( i->surfaceSide() != tsvec.front().surfaceSide()) { throw cms::Exception("LogicError") << "MultiTrajectoryState mixes states defined before and after material"; } if ( i->localParameters().pzSign()*tsvec.front().localParameters().pzSign()<0. ) { throw cms::Exception("LogicError") << "MultiTrajectoryState mixes states with different signs of local p_z"; } if ( i==tsvec.begin() ) { // only accept planes!! const BoundPlane* bp = dynamic_cast<const BoundPlane*>(&i->surface()); if ( bp==0 ) throw cms::Exception("LogicError") << "MultiTrajectoryState constructed on cylinder"; } theStates.push_back( *i); } }
BasicMultiTrajectoryState::BasicMultiTrajectoryState | ( | ) | [inline] |
virtual bool BasicMultiTrajectoryState::canUpdateLocalParameters | ( | ) | const [inline, virtual] |
Implements BasicTrajectoryState.
Definition at line 132 of file BasicMultiTrajectoryState.h.
{ return false; }
const CartesianTrajectoryError& BasicMultiTrajectoryState::cartesianError | ( | ) | const [inline, virtual] |
Implements BasicTrajectoryState.
Definition at line 62 of file BasicMultiTrajectoryState.h.
References TrajectoryStateOnSurface::cartesianError(), checkCombinedState(), and theCombinedState.
{ checkCombinedState(); return theCombinedState.cartesianError(); }
TrackCharge BasicMultiTrajectoryState::charge | ( | void | ) | const [inline, virtual] |
Implements BasicTrajectoryState.
Definition at line 47 of file BasicMultiTrajectoryState.h.
References TrajectoryStateOnSurface::charge(), checkCombinedState(), and theCombinedState.
{ checkCombinedState(); return theCombinedState.charge(); }
void BasicMultiTrajectoryState::checkCombinedState | ( | ) | const [private] |
Definition at line 40 of file BasicMultiTrajectoryState.cc.
References MultiTrajectoryStateCombiner::combine(), theCombinedState, theCombinedStateUp2Date, theCombiner, and theStates.
Referenced by cartesianError(), charge(), curvilinearError(), freeTrajectoryState(), globalDirection(), globalMomentum(), globalParameters(), globalPosition(), localDirection(), localError(), localMomentum(), localParameters(), localPosition(), signedInverseMomentum(), and transverseCurvature().
{ if (theCombinedStateUp2Date) return; theCombinedState = theCombiner.combine( theStates); theCombinedStateUp2Date = true; }
virtual BasicMultiTrajectoryState* BasicMultiTrajectoryState::clone | ( | void | ) | const [inline, virtual] |
Implements BasicTrajectoryState.
Definition at line 121 of file BasicMultiTrajectoryState.h.
References BasicMultiTrajectoryState().
{ return new BasicMultiTrajectoryState(*this); }
virtual std::vector<TrajectoryStateOnSurface> BasicMultiTrajectoryState::components | ( | ) | const [inline, virtual] |
Reimplemented from BasicTrajectoryState.
Definition at line 125 of file BasicMultiTrajectoryState.h.
References theStates.
{ return theStates; }
const CurvilinearTrajectoryError& BasicMultiTrajectoryState::curvilinearError | ( | ) | const [inline, virtual] |
Implements BasicTrajectoryState.
Definition at line 67 of file BasicMultiTrajectoryState.h.
References checkCombinedState(), TrajectoryStateOnSurface::curvilinearError(), and theCombinedState.
{ checkCombinedState(); return theCombinedState.curvilinearError(); }
FreeTrajectoryState* BasicMultiTrajectoryState::freeTrajectoryState | ( | bool | withErrors = true | ) | const [inline, virtual] |
Implements BasicTrajectoryState.
Definition at line 72 of file BasicMultiTrajectoryState.h.
References checkCombinedState(), TrajectoryStateOnSurface::freeTrajectoryState(), and theCombinedState.
{ checkCombinedState(); return theCombinedState.freeTrajectoryState(withErrors); }
GlobalVector BasicMultiTrajectoryState::globalDirection | ( | ) | const [inline, virtual] |
Implements BasicTrajectoryState.
Definition at line 42 of file BasicMultiTrajectoryState.h.
References checkCombinedState(), TrajectoryStateOnSurface::globalDirection(), and theCombinedState.
{ checkCombinedState(); return theCombinedState.globalDirection(); }
GlobalVector BasicMultiTrajectoryState::globalMomentum | ( | ) | const [inline, virtual] |
Implements BasicTrajectoryState.
Definition at line 37 of file BasicMultiTrajectoryState.h.
References checkCombinedState(), TrajectoryStateOnSurface::globalMomentum(), and theCombinedState.
{ checkCombinedState(); return theCombinedState.globalMomentum(); }
const GlobalTrajectoryParameters& BasicMultiTrajectoryState::globalParameters | ( | void | ) | const [inline, virtual] |
Implements BasicTrajectoryState.
Definition at line 27 of file BasicMultiTrajectoryState.h.
References checkCombinedState(), TrajectoryStateOnSurface::globalParameters(), and theCombinedState.
{ checkCombinedState(); return theCombinedState.globalParameters(); }
GlobalPoint BasicMultiTrajectoryState::globalPosition | ( | ) | const [inline, virtual] |
Implements BasicTrajectoryState.
Definition at line 32 of file BasicMultiTrajectoryState.h.
References checkCombinedState(), TrajectoryStateOnSurface::globalPosition(), and theCombinedState.
{ checkCombinedState(); return theCombinedState.globalPosition(); }
bool BasicMultiTrajectoryState::hasError | ( | void | ) | const [inline, virtual] |
Implements BasicTrajectoryState.
Definition at line 22 of file BasicMultiTrajectoryState.h.
bool BasicMultiTrajectoryState::isValid | ( | void | ) | const [inline, virtual] |
Implements BasicTrajectoryState.
Definition at line 20 of file BasicMultiTrajectoryState.h.
References theStates.
Referenced by hasError(), and surface().
LocalVector BasicMultiTrajectoryState::localDirection | ( | ) | const [inline, virtual] |
Implements BasicTrajectoryState.
Definition at line 94 of file BasicMultiTrajectoryState.h.
References checkCombinedState(), TrajectoryStateOnSurface::localDirection(), and theCombinedState.
{ checkCombinedState(); return theCombinedState.localDirection(); }
const LocalTrajectoryError& BasicMultiTrajectoryState::localError | ( | ) | const [inline, virtual] |
Implements BasicTrajectoryState.
Definition at line 99 of file BasicMultiTrajectoryState.h.
References checkCombinedState(), TrajectoryStateOnSurface::localError(), and theCombinedState.
{ checkCombinedState(); return theCombinedState.localError(); }
LocalVector BasicMultiTrajectoryState::localMomentum | ( | ) | const [inline, virtual] |
Implements BasicTrajectoryState.
Definition at line 89 of file BasicMultiTrajectoryState.h.
References checkCombinedState(), TrajectoryStateOnSurface::localMomentum(), and theCombinedState.
{ checkCombinedState(); return theCombinedState.localMomentum(); }
const LocalTrajectoryParameters& BasicMultiTrajectoryState::localParameters | ( | ) | const [inline, virtual] |
Implements BasicTrajectoryState.
Definition at line 79 of file BasicMultiTrajectoryState.h.
References checkCombinedState(), TrajectoryStateOnSurface::localParameters(), and theCombinedState.
{ checkCombinedState(); return theCombinedState.localParameters(); }
LocalPoint BasicMultiTrajectoryState::localPosition | ( | ) | const [inline, virtual] |
Implements BasicTrajectoryState.
Definition at line 84 of file BasicMultiTrajectoryState.h.
References checkCombinedState(), TrajectoryStateOnSurface::localPosition(), and theCombinedState.
{ checkCombinedState(); return theCombinedState.localPosition(); }
const MagneticField * BasicMultiTrajectoryState::magneticField | ( | ) | const [virtual] |
Implements BasicTrajectoryState.
Definition at line 79 of file BasicMultiTrajectoryState.cc.
References theStates.
{ // // Magnetic field should be identical in all components: // avoid forcing the combination of states and take value from 1st component! // if (theStates.empty()) { edm::LogError("BasicMultiTrajectoryState") << "Asking for magneticField of empty MultiTrajectoryState, returning null pointer!"; return 0; } return theStates.front().magneticField(); }
void BasicMultiTrajectoryState::rescaleError | ( | double | factor | ) | [virtual] |
Rescaling the error of the mixture with a given factor. Please note that this rescaling is imposed on each of the components of the mixture and does therefore not exactly correspond to rescaling theCombinedState with the same factor.
Implements BasicTrajectoryState.
Definition at line 65 of file BasicMultiTrajectoryState.cc.
References theCombinedStateUp2Date, and theStates.
{ if (theStates.empty()) { edm::LogError("BasicMultiTrajectoryState") << "Trying to rescale errors of empty MultiTrajectoryState!"; return; } for (std::vector<TSOS>::iterator it = theStates.begin(); it != theStates.end(); it++) { it->rescaleError(factor); } theCombinedStateUp2Date = false; }
double BasicMultiTrajectoryState::signedInverseMomentum | ( | ) | const [inline, virtual] |
Implements BasicTrajectoryState.
Definition at line 52 of file BasicMultiTrajectoryState.h.
References checkCombinedState(), TrajectoryStateOnSurface::signedInverseMomentum(), and theCombinedState.
{ checkCombinedState(); return theCombinedState.signedInverseMomentum(); }
const Surface& BasicMultiTrajectoryState::surface | ( | ) | const [inline, virtual] |
Implements BasicTrajectoryState.
Definition at line 104 of file BasicMultiTrajectoryState.h.
References Exception, isValid(), and theStates.
{ if (!isValid()) throw cms::Exception("LogicError") << "surface() called for invalid MultiTrajectoryState"; return theStates.front().surface(); }
SurfaceSide BasicMultiTrajectoryState::surfaceSide | ( | ) | const [virtual] |
Position relative to material, defined relative to momentum vector.
Implements BasicTrajectoryState.
Definition at line 94 of file BasicMultiTrajectoryState.cc.
References SurfaceSideDefinition::atCenterOfSurface, and theStates.
{ // // SurfaceSide should be identical in all components: // avoid forcing the combination of states and take value from 1st component! // if (theStates.empty()) { edm::LogError("BasicMultiTrajectoryState") << "Asking for magneticField of empty MultiTrajectoryState, returning atCenterOfSurface!"; return atCenterOfSurface; } return theStates.front().surfaceSide(); }
double BasicMultiTrajectoryState::transverseCurvature | ( | ) | const [inline, virtual] |
Implements BasicTrajectoryState.
Definition at line 57 of file BasicMultiTrajectoryState.h.
References checkCombinedState(), theCombinedState, and TrajectoryStateOnSurface::transverseCurvature().
{ checkCombinedState(); return theCombinedState.transverseCurvature(); }
void BasicMultiTrajectoryState::update | ( | const LocalTrajectoryParameters & | p, |
const Surface & | aSurface, | ||
const MagneticField * | field, | ||
const SurfaceSide | side | ||
) | [virtual] |
Implements BasicTrajectoryState.
Definition at line 110 of file BasicMultiTrajectoryState.cc.
References Exception.
{ throw cms::Exception("LogicError", "BasicMultiTrajectoryState::update(LocalTrajectoryParameters, Surface, ...) called even if canUpdateLocalParameters() is false"); }
void BasicMultiTrajectoryState::update | ( | const LocalTrajectoryParameters & | p, |
const LocalTrajectoryError & | err, | ||
const Surface & | aSurface, | ||
const MagneticField * | field, | ||
const SurfaceSide | side, | ||
double | weight | ||
) | [virtual] |
Implements BasicTrajectoryState.
Definition at line 121 of file BasicMultiTrajectoryState.cc.
References Exception.
{ throw cms::Exception("LogicError", "BasicMultiTrajectoryState::update(LocalTrajectoryParameters, LocalTrajectoryError, ...) called even if canUpdateLocalParameters() is false"); }
double BasicMultiTrajectoryState::weight | ( | ) | const [virtual] |
Reimplemented from BasicTrajectoryState.
Definition at line 49 of file BasicMultiTrajectoryState.cc.
References theStates.
{ if (theStates.empty()) { edm::LogError("BasicMultiTrajectoryState") << "Asking for weight of empty MultiTrajectoryState, returning zero!"; return 0.; } double sumw = 0.; for (std::vector<TSOS>::const_iterator it = theStates.begin(); it != theStates.end(); it++) { sumw += it->weight(); } return sumw; }
TSOS BasicMultiTrajectoryState::theCombinedState [mutable, private] |
Definition at line 147 of file BasicMultiTrajectoryState.h.
Referenced by cartesianError(), charge(), checkCombinedState(), curvilinearError(), freeTrajectoryState(), globalDirection(), globalMomentum(), globalParameters(), globalPosition(), localDirection(), localError(), localMomentum(), localParameters(), localPosition(), signedInverseMomentum(), and transverseCurvature().
bool BasicMultiTrajectoryState::theCombinedStateUp2Date [mutable, private] |
Definition at line 148 of file BasicMultiTrajectoryState.h.
Referenced by checkCombinedState(), and rescaleError().
Definition at line 149 of file BasicMultiTrajectoryState.h.
Referenced by checkCombinedState().
std::vector<TSOS> BasicMultiTrajectoryState::theStates [private] |
Definition at line 145 of file BasicMultiTrajectoryState.h.
Referenced by BasicMultiTrajectoryState(), checkCombinedState(), components(), hasError(), isValid(), magneticField(), rescaleError(), surface(), surfaceSide(), and weight().