CMS 3D CMS Logo

DisplacedVertexCluster.cc
Go to the documentation of this file.
2 
4  const double rParam)
5  : valid_(true),
6  rParam2_(rParam * rParam),
7  sumOfCenters_(trackClusterPtr->vertex()),
8  centerOfMass_(trackClusterPtr->vertex()) {
9  constituents_.push_back(trackClusterPtr);
10 }
11 
13  for (const auto &trackCluster : other.constituents())
14  constituents_.push_back(trackCluster);
15  sumOfCenters_ += other.sumOfCenters();
16  centerOfMass_ = sumOfCenters_ * (1.0 / constituents_.size());
17 }
18 
20  if (entities_.first->valid() && entities_.second->valid())
21  return (entities_.first->centerOfMass() - entities_.second->centerOfMass()).mag2();
23 }
std::vector< const reco::VertexCompositeCandidate * > constituents_
std::pair< DisplacedVertexClusterItr, DisplacedVertexClusterItr > entities_
static const uint16_t valid_
Definition: Constants.h:17
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
void merge(const DisplacedVertexCluster &other)