10 theChi2(0), theNDF(0), vertexValid(
false), withPrior(
false),
11 theWeightMapIsAvailable(
false), theCovMapAvailable(
false),
12 withRefittedTracks(
false)
17 const std::vector<TransientTrack> &
tracks,
float chi2) :
18 theVertexState(pos, posError), theOriginalTracks(tracks),
19 theChi2(chi2), theNDF(0), vertexValid(
true), withPrior(
false),
20 theWeightMapIsAvailable(
false), theCovMapAvailable(
false),
21 withRefittedTracks(
false)
29 const std::vector<TransientTrack> &
tracks,
float chi2,
float ndf) :
30 theVertexState(pos, posError), theOriginalTracks(tracks),
31 theChi2(chi2), theNDF(ndf), vertexValid(
true), withPrior(
false),
32 theWeightMapIsAvailable(
false), theCovMapAvailable(
false),
33 withRefittedTracks(
false)
41 const std::vector<TransientTrack> &
tracks,
float chi2) :
42 thePriorVertexState(priorPos, priorErr), theVertexState(pos, posError),
43 theOriginalTracks(tracks), theChi2(chi2), theNDF(0), vertexValid(
true),
44 withPrior(
true), theWeightMapIsAvailable(
false), theCovMapAvailable(
false),
45 withRefittedTracks(
false)
54 const std::vector<TransientTrack> &
tracks,
float chi2,
float ndf) :
55 thePriorVertexState(priorPos, priorErr), theVertexState(pos, posError),
56 theOriginalTracks(tracks), theChi2(chi2), theNDF(ndf), vertexValid(
true),
57 withPrior(
true), theWeightMapIsAvailable(
false), theCovMapAvailable(
false),
58 withRefittedTracks(
false)
65 const std::vector<TransientTrack> &
tracks,
float chi2) :
66 theVertexState(state), theOriginalTracks(tracks),
67 theChi2(chi2), theNDF(0), vertexValid(
true), withPrior(
false),
68 theWeightMapIsAvailable(
false), theCovMapAvailable(
false),
69 withRefittedTracks(
false)
76 const std::vector<TransientTrack> &
tracks,
float chi2,
float ndf) :
77 theVertexState(state), theOriginalTracks(tracks),
78 theChi2(chi2), theNDF(ndf), vertexValid(
true), withPrior(
false),
79 theWeightMapIsAvailable(
false), theCovMapAvailable(
false),
80 withRefittedTracks(
false)
88 const std::vector<TransientTrack> &
tracks,
90 thePriorVertexState(prior), theVertexState(state),
91 theOriginalTracks(tracks), theChi2(chi2), theNDF(0), vertexValid(
true),
92 withPrior(
true), theWeightMapIsAvailable(
false), theCovMapAvailable(
false),
93 withRefittedTracks(
false)
102 const std::vector<TransientTrack> &
tracks,
103 float chi2,
float ndf) :
104 thePriorVertexState(prior), theVertexState(state),
105 theOriginalTracks(tracks), theChi2(chi2), theNDF(ndf), vertexValid(
true),
106 withPrior(
true), theWeightMapIsAvailable(
false),
107 theCovMapAvailable(
false), withRefittedTracks(
false)
121 const std::vector<reco::TransientTrack> & refittedTracks)
123 if (refittedTracks.empty())
124 throw VertexException(
"TransientVertex::refittedTracks: No refitted tracks stored in input container");
142 TransientTrackToFloatMap::const_iterator it =
theWeightMap.find(track);
154 throw VertexException(
"TransientVertex::Track-to-track covariance matrices not available");
165 TTtoTTmap::const_iterator it =
theCovMap.find(*tr1);
167 const TTmap & tm = it->second;
168 TTmap::const_iterator nit = tm.find(*tr2);
169 if (nit != tm.end()) {
170 return( nit->second);
173 throw VertexException(
"TransientVertex::requested Track-to-track covariance matrix does not exist");
177 throw VertexException(
"TransientVertex::requested Track-to-track covariance matrix does not exist");
186 std::vector<TransientTrack>::const_iterator it =
198 std::vector<TransientTrack>::const_iterator it =
209 if (!isValid())
return Vertex();
213 theVertexState.error().matrix_new(),
214 totalChiSquared(), degreesOfFreedom(), theOriginalTracks.size() );
215 for (std::vector<TransientTrack>::const_iterator
i = theOriginalTracks.begin();
216 i != theOriginalTracks.end(); ++
i) {
222 if (withRefittedTracks) {
224 vertex.
add((*i).trackBaseRef(), refittedTrack(*i).track(), trackWeight ( *
i ) );
226 vertex.add((*i).trackBaseRef(), trackWeight ( *
i ) );
bool theWeightMapIsAvailable
std::map< reco::TransientTrack, float > TransientTrackToFloatMap
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
reco::TransientTrack refittedTrack(const reco::TransientTrack &track) const
auto const T2 &decltype(t1.eta()) t2
TransientTrackToFloatMap theWeightMap
math::XYZPoint Point
point in the space
std::vector< reco::TransientTrack > theOriginalTracks
float trackWeight(const reco::TransientTrack &track) const
std::vector< reco::TransientTrack > refittedTracks() const
void add(const TrackBaseRef &r, float w=1.0)
add a reference to a Track
reco::TransientTrack originalTrack(const reco::TransientTrack &refTrack) const
std::vector< reco::TransientTrack > theRefittedTracks
AlgebraicMatrix33 tkToTkCovariance(const reco::TransientTrack &t1, const reco::TransientTrack &t2) const
TransientTrackToFloatMap weightMap() const
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepStd< double, 3, 3 > > AlgebraicMatrix33