13 const float TrackerBoundsRadius = 112;
14 const float TrackerBoundsHalfLength = 273.5;
16 return ((point.
transverse() < TrackerBoundsRadius)
17 && (
abs(point.
z()) < TrackerBoundsHalfLength));
22 template <
unsigned int N>
27 theLinP(linP.
clone()), theUpdator(updator.
clone()),
28 theSmoother(smoother.
clone()), theLTrackFactory ( ltsf.
clone() )
33 template <
unsigned int N>
45 template <
unsigned int N>
59 template <
unsigned int N>
69 template <
unsigned int N>
76 template <
unsigned int N>
84 template <
unsigned int N>
90 if (!insideTrackerBounds(linP)) linP =
GlobalPoint(0,0,0);
93 ROOT::Math::SMatrixIdentity
id;
97 std::vector<RefCountedVertexTrack> vtContainer =
linearizeTracks(tracks, state);
98 return fit(vtContainer, state,
false);
101 template <
unsigned int N>
103 const std::vector<RefCountedVertexTrack> &
tracks,
107 return fit(tracks, state,
true );
110 template <
unsigned int N>
115 GlobalPoint linP = tracks[0]->linearizedTrack()->linearizationPoint();
116 ROOT::Math::SMatrixIdentity
id;
120 return fit(tracks, state,
false);
127 template <
unsigned int N>
133 ROOT::Math::SMatrixIdentity
id;
137 std::vector<RefCountedVertexTrack> vtContainer =
linearizeTracks(tracks, state);
138 return fit(vtContainer, state,
false);
146 template <
unsigned int N>
152 std::vector<RefCountedVertexTrack> vtContainer;
154 if (tracks.size() > 1) {
157 if (!insideTrackerBounds(linP)) linP =
GlobalPoint(0,0,0);
158 ROOT::Math::SMatrixIdentity
id;
168 return fit(vtContainer, beamSpotState,
true);
177 template <
unsigned int N>
179 const std::vector<reco::TransientTrack> &
tracks,
184 std::vector<RefCountedVertexTrack> vtContainer =
linearizeTracks(tracks, state);
185 return fit(vtContainer, state,
true);
192 template <
unsigned int N>
194 const std::vector<RefCountedVertexTrack> &
tracks,
199 return fit(tracks, state,
true);
205 template <
unsigned int N>
206 vector<typename SequentialVertexFitter<N>::RefCountedVertexTrack>
208 const std::vector<reco::TransientTrack> &
tracks,
212 std::vector<RefCountedVertexTrack> finalTracks;
213 finalTracks.reserve(tracks.size());
214 for(vector<reco::TransientTrack>::const_iterator
i = tracks.begin();
215 i != tracks.end();
i++) {
219 finalTracks.push_back(vTrData);
229 template <
unsigned int N>
230 vector<typename SequentialVertexFitter<N>::RefCountedVertexTrack>
232 const std::vector<RefCountedVertexTrack> &
tracks,
237 std::vector<RefCountedVertexTrack> finalTracks;
238 finalTracks.reserve(tracks.size());
239 for(
typename std::vector<RefCountedVertexTrack>::const_iterator
i = tracks.begin();
240 i != tracks.end();
i++) {
242 (**i).linearizedTrack()->stateWithNewLinearizationPoint(linP);
248 finalTracks.push_back(vTrData);
256 template <
unsigned int N>
259 const VertexState priorVertex,
bool withPrior )
const 261 std::vector<RefCountedVertexTrack> initialTracks;
265 CachingVertex<N> returnVertex(priorVertexPosition,priorVertexError,initialTracks,0);
268 priorVertexPosition,priorVertexError,initialTracks,0);
271 std::vector<RefCountedVertexTrack> globalVTracks =
tracks;
274 bool validVertex =
true;
285 for (
typename std::vector<RefCountedVertexTrack>::const_iterator
i 286 = globalVTracks.begin();
i != globalVTracks.end();
i++) {
291 validVertex = fVertex.
isValid();
294 LogDebug(
"RecoVertex/SequentialVertexFitter")
295 <<
"Fitted position is NaN.\n";
299 if (validVertex && !insideTrackerBounds(fVertex.
position())) {
300 LogDebug(
"RecoVertex/SequentialVertexFitter")
301 <<
"Fitted position is out of tracker bounds.\n";
308 ROOT::Math::SMatrixIdentity
id;
315 previousPosition = newPosition;
318 returnVertex = fVertex;
319 globalVTracks.clear();
326 LogDebug(
"RecoVertex/SequentialVertexFitter")
327 <<
"Fitted position is invalid (out of tracker bounds or has NaN). Returned vertex is invalid\n";
332 LogDebug(
"RecoVertex/SequentialVertexFitter")
333 <<
"The maximum number of steps has been exceeded. Returned vertex is invalid\n";
T getParameter(std::string const &) const
std::vector< RefCountedVertexTrack > reLinearizeTracks(const std::vector< RefCountedVertexTrack > &tracks, const VertexState state) const
LinearizationPointFinder * theLinP
const VertexUpdator< N > * vertexUpdator() const
CachingVertex< N > fit(const std::vector< RefCountedVertexTrack > &tracks, const VertexState priorVertex, bool withPrior) const
VertexState const & vertexState() const
VertexUpdator< N > * theUpdator
Global3DPoint GlobalPoint
VertexTrackFactory< N > theVTrackFactory
const AbstractLTSFactory< N > * theLTrackFactory
const AbstractLTSFactory< N > * linearizedTrackStateFactory() const
GlobalPoint position() const
virtual CachingVertex< N > vertex(const std::vector< reco::TransientTrack > &tracks) const
const VertexSmoother< N > * vertexSmoother() const
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
virtual LinearizationPointFinder * clone() const =0
void addParameter(std::string const &name, T const &value)
Abs< T >::type abs(const T &t)
SequentialVertexFitter * clone() const
virtual ~SequentialVertexFitter()
edm::ParameterSet thePSet
GlobalWeight weight() const
virtual GlobalPoint getLinearizationPoint(const std::vector< reco::TransientTrack > &) const =0
const edm::ParameterSet parameterSet() const
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
GlobalPoint position() const
T transverse() const
Another name for perp()
const int maxStep() const
GlobalError error() const
bool hasNan(const GlobalPoint &point) const
std::vector< RefCountedVertexTrack > linearizeTracks(const std::vector< reco::TransientTrack > &tracks, const VertexState state) const
void setDefaultParameters()
const float maxShift() const
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
VertexSmoother< N > * theSmoother
const LinearizationPointFinder * linearizationPointFinder() const