13 const float TrackerBoundsRadius = 112;
14 const float TrackerBoundsHalfLength = 273.5;
16 return ((point.
transverse() < TrackerBoundsRadius) && (
abs(point.
z()) < TrackerBoundsHalfLength));
20 template <
unsigned int N>
25 : theLinP(linP.
clone()),
26 theUpdator(updator.
clone()),
27 theSmoother(smoother.
clone()),
28 theLTrackFactory(ltsf.
clone()) {
32 template <
unsigned int N>
46 template <
unsigned int N>
57 template <
unsigned int N>
65 template <
unsigned int N>
71 template <
unsigned int N>
78 template <
unsigned int N>
82 if (!insideTrackerBounds(linP))
86 ROOT::Math::SMatrixIdentity
id;
90 std::vector<RefCountedVertexTrack> vtContainer =
linearizeTracks(tracks, state);
91 return fit(vtContainer, state,
false);
94 template <
unsigned int N>
98 return fit(tracks, state,
true);
101 template <
unsigned int N>
104 GlobalPoint linP = tracks[0]->linearizedTrack()->linearizationPoint();
105 ROOT::Math::SMatrixIdentity
id;
109 return fit(tracks, state,
false);
115 template <
unsigned int N>
119 ROOT::Math::SMatrixIdentity
id;
123 std::vector<RefCountedVertexTrack> vtContainer =
linearizeTracks(tracks, state);
124 return fit(vtContainer, state,
false);
131 template <
unsigned int N>
135 std::vector<RefCountedVertexTrack> vtContainer;
137 if (tracks.size() > 1) {
140 if (!insideTrackerBounds(linP))
142 ROOT::Math::SMatrixIdentity
id;
152 return fit(vtContainer, beamSpotState,
true);
160 template <
unsigned int N>
165 std::vector<RefCountedVertexTrack> vtContainer =
linearizeTracks(tracks, state);
166 return fit(vtContainer, state,
true);
173 template <
unsigned int N>
178 return fit(tracks, state,
true);
183 template <
unsigned int N>
185 const std::vector<reco::TransientTrack>&
tracks,
const VertexState state)
const {
187 std::vector<RefCountedVertexTrack> finalTracks;
188 finalTracks.reserve(tracks.size());
189 for (vector<reco::TransientTrack>::const_iterator
i = tracks.begin();
i != tracks.end();
i++) {
192 finalTracks.push_back(vTrData);
201 template <
unsigned int N>
203 const std::vector<RefCountedVertexTrack>&
tracks,
const VertexState state)
const {
205 std::vector<RefCountedVertexTrack> finalTracks;
206 finalTracks.reserve(tracks.size());
207 for (
typename std::vector<RefCountedVertexTrack>::const_iterator
i = tracks.begin();
i != tracks.end();
i++) {
213 finalTracks.push_back(vTrData);
220 template <
unsigned int N>
223 bool withPrior)
const {
224 std::vector<RefCountedVertexTrack> initialTracks;
228 CachingVertex<N> returnVertex(priorVertexPosition, priorVertexError, initialTracks, 0);
231 priorVertexPosition, priorVertexError, priorVertexPosition, priorVertexError, initialTracks, 0);
234 std::vector<RefCountedVertexTrack> globalVTracks =
tracks;
237 bool validVertex =
true;
248 for (
typename std::vector<RefCountedVertexTrack>::const_iterator
i = globalVTracks.begin();
249 i != globalVTracks.end();
256 validVertex = fVertex.
isValid();
259 LogDebug(
"RecoVertex/SequentialVertexFitter") <<
"Fitted position is NaN.\n";
263 if (validVertex && !insideTrackerBounds(fVertex.
position())) {
264 LogDebug(
"RecoVertex/SequentialVertexFitter") <<
"Fitted position is out of tracker bounds.\n";
271 ROOT::Math::SMatrixIdentity
id;
277 previousPosition = newPosition;
280 returnVertex = fVertex;
281 globalVTracks.clear();
286 LogDebug(
"RecoVertex/SequentialVertexFitter")
287 <<
"Fitted position is invalid (out of tracker bounds or has NaN). Returned vertex is invalid\n";
292 LogDebug(
"RecoVertex/SequentialVertexFitter")
293 <<
"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
~SequentialVertexFitter() override
const AbstractLTSFactory< N > * theLTrackFactory
const AbstractLTSFactory< N > * linearizedTrackStateFactory() const
GlobalPoint position() const
SequentialVertexFitter * clone() const override
const VertexSmoother< N > * vertexSmoother() const
virtual LinearizationPointFinder * clone() const =0
void addParameter(std::string const &name, T const &value)
Abs< T >::type abs(const T &t)
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
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
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
CachingVertex< N > vertex(const std::vector< reco::TransientTrack > &tracks) const override