CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GsfTrackExtra.cc
Go to the documentation of this file.
2 using namespace reco;
3 
4 GsfTrackExtra::GsfTrackExtra(const std::vector<GsfComponent5D>& outerStates,
5  const double& outerLocalPzSign,
6  const std::vector<GsfComponent5D>& innerStates,
7  const double& innerLocalPzSign,
8  const std::vector<GsfTangent>& tangents)
9  : outerStates_(outerStates),
10  positiveOuterStatePz_(outerLocalPzSign > 0.),
11  innerStates_(innerStates),
12  positiveInnerStatePz_(innerLocalPzSign > 0.),
13  tangents_(tangents) {}
14 
15 std::vector<double> GsfTrackExtra::weights(const std::vector<GsfComponent5D>& states) const {
16  std::vector<double> result(states.size());
17  std::vector<double>::iterator ir(result.begin());
18  for (std::vector<GsfComponent5D>::const_iterator i = states.begin(); i != states.end(); ++i) {
19  *(ir++) = (*i).weight();
20  }
21  return result;
22 }
23 
24 std::vector<GsfTrackExtra::LocalParameterVector> GsfTrackExtra::parameters(
25  const std::vector<GsfComponent5D>& states) const {
26  std::vector<LocalParameterVector> result(states.size());
27  std::vector<LocalParameterVector>::iterator ir(result.begin());
28  for (std::vector<GsfComponent5D>::const_iterator i = states.begin(); i != states.end(); ++i) {
29  *(ir++) = (*i).parameters();
30  }
31  return result;
32 }
33 
34 std::vector<GsfTrackExtra::LocalCovarianceMatrix> GsfTrackExtra::covariances(
35  const std::vector<GsfComponent5D>& states) const {
36  std::vector<LocalCovarianceMatrix> result(states.size());
37  std::vector<LocalCovarianceMatrix>::iterator ir(result.begin());
38  for (std::vector<GsfComponent5D>::const_iterator i = states.begin(); i != states.end(); ++i) {
39  (*i).covariance(*(ir++));
40  }
41  return result;
42 }
tuple result
Definition: mps_fire.py:311
std::vector< LocalCovarianceMatrix > covariances(const std::vector< GsfComponent5D > &states) const
extract covariance matrices from states
std::vector< double > weights(const std::vector< GsfComponent5D > &states) const
extract weights from states
std::vector< LocalParameterVector > parameters(const std::vector< GsfComponent5D > &states) const
extract parameters from states
GsfTrackExtra()
default constructor
Definition: GsfTrackExtra.h:30