CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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), positiveOuterStatePz_(outerLocalPzSign>0.),
10  innerStates_(innerStates), positiveInnerStatePz_(innerLocalPzSign>0.),
11  tangents_(tangents) {}
12 
13 std::vector<double>
14 GsfTrackExtra::weights (const std::vector<GsfComponent5D>& states) const
15 {
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();
19  i!=states.end(); ++i ) {
20  *(ir++) = (*i).weight();
21  }
22  return result;
23 }
24 
25 std::vector<GsfTrackExtra::LocalParameterVector>
26 GsfTrackExtra::parameters (const std::vector<GsfComponent5D>& states) const
27 {
28  std::vector<LocalParameterVector> result(states.size());
29  std::vector<LocalParameterVector>::iterator ir(result.begin());
30  for ( std::vector<GsfComponent5D>::const_iterator i=states.begin();
31  i!=states.end(); ++i ) {
32  *(ir++) = (*i).parameters();
33  }
34  return result;
35 }
36 
37 std::vector<GsfTrackExtra::LocalCovarianceMatrix>
38 GsfTrackExtra::covariances (const std::vector<GsfComponent5D>& states) const
39 {
40  std::vector<LocalCovarianceMatrix> result(states.size());
41  std::vector<LocalCovarianceMatrix>::iterator ir(result.begin());
42  for ( std::vector<GsfComponent5D>::const_iterator i=states.begin();
43  i!=states.end(); ++i ) {
44  (*i).covariance(*(ir++));
45  }
46  return result;
47 }
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: mps_fire.py:83
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