Skip to content

Commit 06f30d4

Browse files
committed
Update KVertex
The fake member is not needed as it can be calculated form other members. The valid member is added.
1 parent 4be2b0f commit 06f30d4

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

DataFormats/interface/KBasic.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,14 @@ typedef std::vector<KBeamSpot> KBeamSpots;
4141
struct KVertex
4242
{
4343
RMPoint position;
44-
bool fake;
45-
44+
bool valid;
4645
unsigned int nTracks;
47-
float chi2, nDOF;
46+
float chi2;
47+
float nDOF;
48+
49+
ROOT::Math::SMatrix<double, 3, 3, ROOT::Math::MatRepSym<double, 3> > covariance; //< covariance matrix
4850

49-
ROOT::Math::SMatrix<double, 3, 3, ROOT::Math::MatRepSym<double, 3> > covariance;
51+
inline bool fake() const { return (chi2 == 0 && nDOF == 0 && nTracks == 0); };
5052
};
5153
typedef std::vector<KVertex> KVertices;
5254

DataFormats/test/KDebug.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ std::ostream &operator<<(std::ostream &os, const KGenTau &tau)
9191
std::ostream &operator<<(std::ostream &os, const KVertex &vertex)
9292
{
9393
return os << vertex.position
94-
<< " #Tracks=" << vertex.nTracks << " fake=" << vertex.fake
94+
<< " #Tracks=" << vertex.nTracks << " valid=" << vertex.valid
9595
<< " chi2=" << vertex.chi2 << " DOF=" << vertex.nDOF;
9696
}
9797

Producers/interface/KVertexProducer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class KVertexProducer : public KBaseMultiVectorProducer<edm::View<reco::Vertex>,
2222
static void fillVertex(const SingleInputType &in, SingleOutputType &out)
2323
{
2424
out.position = in.position();
25-
out.fake = in.isFake();
25+
out.valid = in.isValid();
2626
out.nTracks = in.tracksSize();
2727

2828
out.chi2 = in.chi2();

0 commit comments

Comments
 (0)