#include <MultiRefittedTS.h>
Definition at line 17 of file MultiRefittedTS.h.
typedef ReferenceCountingPointer<LinearizedTrackState<5> > MultiRefittedTS::RefCountedLinearizedTrackState |
Definition at line 22 of file MultiRefittedTS.h.
typedef ReferenceCountingPointer<RefittedTrackState<5> > MultiRefittedTS::RefCountedRefittedTrackState |
Definition at line 21 of file MultiRefittedTS.h.
typedef std::vector<RefCountedRefittedTrackState > MultiRefittedTS::RTSvector [private] |
Definition at line 121 of file MultiRefittedTS.h.
MultiRefittedTS::MultiRefittedTS | ( | const std::vector< RefCountedRefittedTrackState > & | prtsComp, |
const Surface & | referenceSurface | ||
) |
Constructor with a reference surface, to be used to assemble the TSOS components on one identical surface.
Definition at line 12 of file MultiRefittedTS.cc.
Referenced by stateWithNewWeight().
: theComponents(prtsComp), ftsAvailable(false), refSurface(&referenceSurface), surf(true) {}
MultiRefittedTS::MultiRefittedTS | ( | const std::vector< RefCountedRefittedTrackState > & | prtsComp, |
const GlobalPoint & | referencePosition | ||
) |
Constructor with a reference position. The surface which is going to be usedto assemble the TSOS components will be the surface perpendicular to the PCA of the state with the highest weight to the reference point.
Definition at line 18 of file MultiRefittedTS.cc.
: theComponents(prtsComp), ftsAvailable(false), refPosition(referencePosition), surf(false) {}
virtual MultiRefittedTS::~MultiRefittedTS | ( | ) | [inline, virtual] |
Definition at line 39 of file MultiRefittedTS.h.
{}
virtual std::vector<ReferenceCountingPointer<RefittedTrackState<5> > > MultiRefittedTS::components | ( | ) | const [inline, virtual] |
Implements RefittedTrackState< 5 >.
Definition at line 99 of file MultiRefittedTS.h.
References theComponents.
{ return theComponents; }
void MultiRefittedTS::computeFreeTrajectoryState | ( | ) | const [private] |
Definition at line 33 of file MultiRefittedTS.cc.
References TransverseImpactPointExtrapolator::extrapolate(), TrajectoryStateOnSurface::freeTrajectoryState(), freeTrajectoryState(), fts, ftsAvailable, refPosition, surf, TrajectoryStateOnSurface::surface(), theComponents, and trajectoryStateOnSurface().
Referenced by freeTrajectoryState().
{ if (surf) { fts = *(trajectoryStateOnSurface(*refSurface).freeTrajectoryState()); } else { double maxWeight = -1.; RTSvector::const_iterator maxIt; for (RTSvector::const_iterator it = theComponents.begin(); it != theComponents.end(); it++) { if ( (**it).weight() > maxWeight ) { maxWeight = (**it).weight(); maxIt = it; } } TransverseImpactPointExtrapolator tipe(&((**maxIt).freeTrajectoryState().parameters().magneticField())); TrajectoryStateOnSurface initialTSOS = tipe.extrapolate((**maxIt).freeTrajectoryState(), refPosition); fts = *(trajectoryStateOnSurface(initialTSOS.surface()).freeTrajectoryState()); } ftsAvailable = true; }
MultiRefittedTS::AlgebraicSymMatrixNN MultiRefittedTS::covariance | ( | void | ) | const [virtual] |
The covariance matrix. Not possible yet for a multi-state, throws an exception.
The covariance matrix
Implements RefittedTrackState< 5 >.
Definition at line 72 of file MultiRefittedTS.cc.
{ throw VertexException ("MultiRefittedTS::freeTrajectoryState(): Don't know how to do that yet..."); }
FreeTrajectoryState MultiRefittedTS::freeTrajectoryState | ( | ) | const [virtual] |
Returns a FreeTrajectoryState. It will be the FTS of the single, collapsed state.
Transformation into a FreeTrajectoryState
Implements RefittedTrackState< 5 >.
Definition at line 27 of file MultiRefittedTS.cc.
References computeFreeTrajectoryState(), fts, and ftsAvailable.
Referenced by computeFreeTrajectoryState(), and transientTrack().
{ if (!ftsAvailable) computeFreeTrajectoryState(); return fts; }
MultiRefittedTS::AlgebraicVectorM MultiRefittedTS::momentumVector | ( | ) | const [virtual] |
Vector containing the parameters describing the momentum as the vertex. These are (signed transverse curvature, theta, phi). Not possible yet for a multi-state, throws an exception.
Vector containing the parameters describing the momentum as the vertex. These are (signed transverse curvature, theta, phi)
Implements RefittedTrackState< 5 >.
Definition at line 93 of file MultiRefittedTS.cc.
{ throw VertexException ("MultiRefittedTS::freeTrajectoryState(): Don't know how to do that yet..."); }
MultiRefittedTS::AlgebraicVectorN MultiRefittedTS::parameters | ( | void | ) | const [virtual] |
Vector containing the refitted track parameters. Not possible yet for a multi-state, throws an exception.
Vector containing the refitted track parameters.
These are (signed transverse curvature, theta, phi, (signed) transverse , longitudinal impact parameter)
Implements RefittedTrackState< 5 >.
Definition at line 62 of file MultiRefittedTS.cc.
{ throw VertexException ("MultiRefittedTS::freeTrajectoryState(): Don't know how to do that yet..."); }
GlobalPoint MultiRefittedTS::position | ( | ) | const [virtual] |
Position at which the momentum is defined. Not possible yet for a multi-state, throws an exception.
Position at which the momentum is defined.
Implements RefittedTrackState< 5 >.
Definition at line 82 of file MultiRefittedTS.cc.
{ throw VertexException ("MultiRefittedTS::freeTrajectoryState(): Don't know how to do that yet..."); }
ReferenceCountingPointer< RefittedTrackState< 5 > > MultiRefittedTS::stateWithNewWeight | ( | const double | newWeight | ) | const [virtual] |
This method is meant to returns a new refitted state of the same type, but with another weight. As we can have several components, each component of the new multi-state will be reweighted so that the sum of all weights is equal to the specified weight. The current state is unchanged.
Implements RefittedTrackState< 5 >.
Definition at line 117 of file MultiRefittedTS.cc.
References MultiRefittedTS(), refPosition, refSurface, surf, theComponents, and weight().
{ if (weight() < DBL_MIN) { throw VertexException ("MultiRefittedTS::stateWithNewWeight(): Can not reweight multi-state with total weight < DBL_MIN"); } double factor = newWeight/weight(); RTSvector reWeightedRTSC; reWeightedRTSC.reserve(theComponents.size()); for (RTSvector::const_iterator it = theComponents.begin(); it != theComponents.end(); it++) { reWeightedRTSC.push_back((**it).stateWithNewWeight((**it).weight()*factor)); } if (surf) { return RefCountedRefittedTrackState(new MultiRefittedTS(reWeightedRTSC, *refSurface)); } else { return RefCountedRefittedTrackState(new MultiRefittedTS(reWeightedRTSC, refPosition)); } }
TrajectoryStateOnSurface MultiRefittedTS::trajectoryStateOnSurface | ( | const Surface & | surface, |
const Propagator & | propagator | ||
) | const [virtual] |
Returns a multi-state TSOS at a given surface, with a given propagator
Implements RefittedTrackState< 5 >.
Definition at line 159 of file MultiRefittedTS.cc.
References theComponents.
{ //fixme... is the propagation done correctly? Is there a gsf propagator? vector<TrajectoryStateOnSurface> tsosComponents; tsosComponents.reserve(theComponents.size()); for (RTSvector::const_iterator it = theComponents.begin(); it != theComponents.end(); it++) { tsosComponents.push_back((**it).trajectoryStateOnSurface(surface, propagator)); } // #ifndef CMS_NO_COMPLEX_RETURNS return TrajectoryStateOnSurface(new BasicMultiTrajectoryState(tsosComponents)); // #else // TrajectoryStateOnSurface result(new BasicMultiTrajectoryState(tsosComponents)); // return result; // #endif }
TrajectoryStateOnSurface MultiRefittedTS::trajectoryStateOnSurface | ( | const Surface & | surface | ) | const [virtual] |
Returns a multi-state TSOS at a given surface
Transformation into a TSOS at a given surface
Implements RefittedTrackState< 5 >.
Definition at line 142 of file MultiRefittedTS.cc.
References theComponents.
Referenced by computeFreeTrajectoryState().
{ vector<TrajectoryStateOnSurface> tsosComponents; tsosComponents.reserve(theComponents.size()); for (RTSvector::const_iterator it = theComponents.begin(); it != theComponents.end(); it++) { tsosComponents.push_back((**it).trajectoryStateOnSurface(surface)); } // #ifndef CMS_NO_COMPLEX_RETURNS return TrajectoryStateOnSurface(new BasicMultiTrajectoryState(tsosComponents)); // #else // TrajectoryStateOnSurface result(new BasicMultiTrajectoryState(tsosComponents)); // return result; // #endif }
reco::TransientTrack MultiRefittedTS::transientTrack | ( | ) | const [virtual] |
Returns a new reco::Track, which can then be made persistent. The parameters are taken from FTS described above.
Implements RefittedTrackState< 5 >.
Definition at line 176 of file MultiRefittedTS.cc.
References TransientTrackFromFTSFactory::build(), and freeTrajectoryState().
{ TransientTrackFromFTSFactory factory; return factory.build(freeTrajectoryState()); }
double MultiRefittedTS::weight | ( | void | ) | const [virtual] |
The weight of this component in a mixture
Implements RefittedTrackState< 5 >.
Definition at line 99 of file MultiRefittedTS.cc.
References gather_cfg::cout, theComponents, totalWeight, and totalWeightAvailable.
Referenced by stateWithNewWeight().
{ if (!totalWeightAvailable) { totalWeight = 0.; if (theComponents.empty()) { cout << "Asking for weight of empty MultiRefittedTS, returning zero!" << endl; } for (RTSvector::const_iterator it = theComponents.begin(); it != theComponents.end(); it++) { totalWeight += (**it).weight(); } } return totalWeight; }
FreeTrajectoryState MultiRefittedTS::fts [mutable, private] |
Definition at line 126 of file MultiRefittedTS.h.
Referenced by computeFreeTrajectoryState(), and freeTrajectoryState().
bool MultiRefittedTS::ftsAvailable [mutable, private] |
Definition at line 124 of file MultiRefittedTS.h.
Referenced by computeFreeTrajectoryState(), and freeTrajectoryState().
const GlobalPoint MultiRefittedTS::refPosition [private] |
Definition at line 127 of file MultiRefittedTS.h.
Referenced by computeFreeTrajectoryState(), and stateWithNewWeight().
Definition at line 128 of file MultiRefittedTS.h.
Referenced by stateWithNewWeight().
const bool MultiRefittedTS::surf [private] |
Definition at line 129 of file MultiRefittedTS.h.
Referenced by computeFreeTrajectoryState(), and stateWithNewWeight().
RTSvector MultiRefittedTS::theComponents [mutable, private] |
Definition at line 123 of file MultiRefittedTS.h.
Referenced by components(), computeFreeTrajectoryState(), stateWithNewWeight(), trajectoryStateOnSurface(), and weight().
double MultiRefittedTS::totalWeight [mutable, private] |
Definition at line 125 of file MultiRefittedTS.h.
Referenced by weight().
bool MultiRefittedTS::totalWeightAvailable [mutable, private] |
Definition at line 124 of file MultiRefittedTS.h.
Referenced by weight().