6 using namespace SurfaceSideDefinition;
9 theCombinedStateUp2Date(
false)
12 for (std::vector<TSOS>::const_iterator
i=tsvec.begin();
i!=tsvec.end();
i++) {
14 throw cms::Exception(
"LogicError") <<
"MultiTrajectoryState constructed with invalid state";
16 if (
i->hasError() != tsvec.front().hasError()) {
17 throw cms::Exception(
"LogicError") <<
"MultiTrajectoryState mixes states with and without errors";
19 if ( &
i->surface() != &tsvec.front().surface()) {
20 throw cms::Exception(
"LogicError") <<
"MultiTrajectoryState mixes states with different surfaces";
22 if (
i->surfaceSide() != tsvec.front().surfaceSide()) {
24 <<
"MultiTrajectoryState mixes states defined before and after material";
26 if (
i->localParameters().pzSign()*tsvec.front().localParameters().pzSign()<0. ) {
28 <<
"MultiTrajectoryState mixes states with different signs of local p_z";
30 if (
i==tsvec.begin() ) {
34 throw cms::Exception(
"LogicError") <<
"MultiTrajectoryState constructed on cylinder";
53 <<
"Asking for weight of empty MultiTrajectoryState, returning zero!";
58 for (std::vector<TSOS>::const_iterator it =
theStates.begin(); it !=
theStates.end(); it++) {
68 edm::LogError(
"BasicMultiTrajectoryState") <<
"Trying to rescale errors of empty MultiTrajectoryState!";
72 for (std::vector<TSOS>::iterator it =
theStates.begin(); it !=
theStates.end(); it++) {
73 it->rescaleError(factor);
87 <<
"Asking for magneticField of empty MultiTrajectoryState, returning null pointer!";
102 <<
"Asking for magneticField of empty MultiTrajectoryState, returning atCenterOfSurface!";
116 "BasicMultiTrajectoryState::update(LocalTrajectoryParameters, Surface, ...) called even if canUpdateLocalParameters() is false");
129 "BasicMultiTrajectoryState::update(LocalTrajectoryParameters, LocalTrajectoryError, ...) called even if canUpdateLocalParameters() is false");
void checkCombinedState() const
TrajectoryStateOnSurface combine(const std::vector< TrajectoryStateOnSurface > &tsos) const
const MagneticField * magneticField() const
BasicMultiTrajectoryState()
virtual void update(const LocalTrajectoryParameters &p, const Surface &aSurface, const MagneticField *field, const SurfaceSide side)
void rescaleError(double factor)
MultiTrajectoryStateCombiner theCombiner
bool theCombinedStateUp2Date
std::vector< TSOS > theStates
virtual SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.