18 theWeightMapIsAvailable(
false),
19 theCovMapAvailable(
false),
20 withRefittedTracks(
false) {}
24 const std::vector<TransientTrack>&
tracks,
32 theWeightMapIsAvailable(
false),
33 theCovMapAvailable(
false),
34 withRefittedTracks(
false) {
41 const std::vector<TransientTrack>&
tracks,
43 : theVertexState(
pos,
time, posTimeError),
49 theWeightMapIsAvailable(
false),
50 theCovMapAvailable(
false),
51 withRefittedTracks(
false) {
57 const std::vector<TransientTrack>&
tracks,
66 theWeightMapIsAvailable(
false),
67 theCovMapAvailable(
false),
68 withRefittedTracks(
false) {}
73 const std::vector<TransientTrack>&
tracks,
76 : theVertexState(
pos,
time, posTimeError),
82 theWeightMapIsAvailable(
false),
83 theCovMapAvailable(
false),
84 withRefittedTracks(
false) {}
90 const std::vector<TransientTrack>&
tracks,
92 : thePriorVertexState(priorPos, priorErr),
99 theWeightMapIsAvailable(
false),
100 theCovMapAvailable(
false),
101 withRefittedTracks(
false) {
106 const double priorTime,
111 const std::vector<TransientTrack>&
tracks,
113 : thePriorVertexState(priorPos, priorTime, priorErr),
115 theOriginalTracks(
tracks),
120 theWeightMapIsAvailable(
false),
121 theCovMapAvailable(
false),
122 withRefittedTracks(
false) {
130 const std::vector<TransientTrack>&
tracks,
133 : thePriorVertexState(priorPos, priorErr),
135 theOriginalTracks(
tracks),
140 theWeightMapIsAvailable(
false),
141 theCovMapAvailable(
false),
142 withRefittedTracks(
false) {}
145 const double priorTime,
150 const std::vector<TransientTrack>&
tracks,
153 : thePriorVertexState(priorPos, priorTime, priorErr),
155 theOriginalTracks(
tracks),
160 theWeightMapIsAvailable(
false),
161 theCovMapAvailable(
false),
162 withRefittedTracks(
false) {}
165 : theVertexState(
state),
166 theOriginalTracks(
tracks),
171 theWeightMapIsAvailable(
false),
172 theCovMapAvailable(
false),
173 withRefittedTracks(
false) {
178 const std::vector<TransientTrack>&
tracks,
181 : theVertexState(
state),
182 theOriginalTracks(
tracks),
187 theWeightMapIsAvailable(
false),
188 theCovMapAvailable(
false),
189 withRefittedTracks(
false) {}
193 const std::vector<TransientTrack>&
tracks,
195 : thePriorVertexState(
prior),
196 theVertexState(
state),
197 theOriginalTracks(
tracks),
202 theWeightMapIsAvailable(
false),
203 theCovMapAvailable(
false),
204 withRefittedTracks(
false) {
210 const std::vector<TransientTrack>&
tracks,
213 : thePriorVertexState(
prior),
214 theVertexState(
state),
215 theOriginalTracks(
tracks),
220 theWeightMapIsAvailable(
false),
221 theCovMapAvailable(
false),
222 withRefittedTracks(
false) {}
231 throw VertexException(
"TransientVertex::refittedTracks: No refitted tracks stored in input container");
243 std::vector<TransientTrack>::const_iterator foundTrack =
256 throw VertexException(
"TransientVertex::Track-to-track covariance matrices not available");
267 TTtoTTmap::const_iterator
it =
theCovMap.find(*tr1);
270 TTmap::const_iterator nit = tm.find(*tr2);
271 if (nit != tm.end()) {
272 return (nit->second);
274 throw VertexException(
"TransientVertex::requested Track-to-track covariance matrix does not exist");
277 throw VertexException(
"TransientVertex::requested Track-to-track covariance matrix does not exist");
283 throw VertexException(
"TransientVertex::requested No refitted tracks stored in vertex");
287 "TransientVertex::requested Refitted track not found in list.\n address used for comparison: ")
295 throw VertexException(
"TransientVertex::requested No refitted tracks stored in vertex");
298 throw VertexException(
"transientVertex::requested Track not found in list.\n address used for comparison: ")
299 <<
track.basicTransientTrack();
311 theVertexState.error4D().matrix4D(),
312 theVertexState.time(),
315 theOriginalTracks.size());
316 for (std::vector<TransientTrack>::const_iterator
i = theOriginalTracks.begin();
i != theOriginalTracks.end(); ++
i) {
322 if (withRefittedTracks) {
333 using namespace reco;
340 vtxCompPtrCand.
setCovariance(vertexState().error4D().matrix4D());
341 vtxCompPtrCand.
setChi2AndNdof(totalChiSquared(), degreesOfFreedom());
345 for (std::vector<reco::TransientTrack>::const_iterator
tt = theOriginalTracks.begin();
tt != theOriginalTracks.end();
352 edm::LogError(
"DynamicCastingFailed") <<
"Casting of TransientTrack to CandidatePtrTransientTrack failed!";
360 vtxCompPtrCand.
setP4(p4);
361 return vtxCompPtrCand;
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepStd< double, 3, 3 > > AlgebraicMatrix33
reco::TransientTrack refittedTrack(const reco::TransientTrack &track) const
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
CandidatePtr candidate() const override
bool theWeightMapIsAvailable
std::map< reco::TransientTrack, float > TransientTrackToFloatMap
reco::TransientTrack originalTrack(const reco::TransientTrack &refTrack) const
Log< level::Error, false > LogError
std::map< reco::TransientTrack, TTmap > TTtoTTmap
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::map< reco::TransientTrack, AlgebraicMatrix33 > TTmap
TransientTrackToFloatMap weightMap() const
void setVertex(const Point &vertex) override
set vertex
void setTime(double time)
TransientTrackToFloatMap theWeightMap
math::XYZPoint Point
point in the space
std::vector< reco::TransientTrack > theOriginalTracks
AlgebraicMatrix33 tkToTkCovariance(const reco::TransientTrack &t1, const reco::TransientTrack &t2) const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
static int position[264][3]
void setCovariance(const CovarianceMatrix &m)
set covariance matrix
void addDaughter(const CandidatePtr &)
add a daughter via a reference
float trackWeight(const reco::TransientTrack &track) const
math::XYZPoint Point
point in the space
std::vector< reco::TransientTrack > theRefittedTracks
void setChi2AndNdof(double chi2, double ndof)
set chi2 and ndof
const BasicTransientTrack * basicTransientTrack() const
void setP4(const LorentzVector &p4) final
set 4-momentum
float trackWeight(const reco::Vertex &sv, const reco::TransientTrack &track)
std::vector< reco::TransientTrack > const & refittedTracks() const
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector