Skip to content

Commit

Permalink
Update KVertex
Browse files Browse the repository at this point in the history
The fake member is not needed as it can be calculated form other members.
The valid member is added.
  • Loading branch information
JoramBerger committed Nov 30, 2014
1 parent 4be2b0f commit 06f30d4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions DataFormats/interface/KBasic.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ typedef std::vector<KBeamSpot> KBeamSpots;
struct KVertex
{
RMPoint position;
bool fake;

bool valid;
unsigned int nTracks;
float chi2, nDOF;
float chi2;
float nDOF;

ROOT::Math::SMatrix<double, 3, 3, ROOT::Math::MatRepSym<double, 3> > covariance; //< covariance matrix

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

Expand Down
2 changes: 1 addition & 1 deletion DataFormats/test/KDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ std::ostream &operator<<(std::ostream &os, const KGenTau &tau)
std::ostream &operator<<(std::ostream &os, const KVertex &vertex)
{
return os << vertex.position
<< " #Tracks=" << vertex.nTracks << " fake=" << vertex.fake
<< " #Tracks=" << vertex.nTracks << " valid=" << vertex.valid
<< " chi2=" << vertex.chi2 << " DOF=" << vertex.nDOF;
}

Expand Down
2 changes: 1 addition & 1 deletion Producers/interface/KVertexProducer.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class KVertexProducer : public KBaseMultiVectorProducer<edm::View<reco::Vertex>,
static void fillVertex(const SingleInputType &in, SingleOutputType &out)
{
out.position = in.position();
out.fake = in.isFake();
out.valid = in.isValid();
out.nTracks = in.tracksSize();

out.chi2 = in.chi2();
Expand Down

0 comments on commit 06f30d4

Please sign in to comment.