LCFIVertex  0.7.2
vertexmultiplicity.cpp
1 #include <algo/inc/vertexmultiplicity.h>
2 #include <inc/vertex.h>
3 #include <inc/decaychain.h>
4 #include <inc/jet.h>
5 
6 #include <vector>
7 #include <string>
8 
9 
10 namespace vertex_lcfi
11 {
12  string VertexMultiplicity::name() const
13  {
14  return _Name;
15  }
16 
17  std::vector<string> VertexMultiplicity::parameterNames() const
18  {
19  return _ParameterNames;
20  }
21 
22  std::vector<string> VertexMultiplicity::parameterValues() const
23  {
24  return _ParameterValues;
25  }
26 
27  void VertexMultiplicity::setStringParameter(const string & Parameter, const string & Value)
28  {
29  this->badParameter(Parameter);
30  }
31 
32  void VertexMultiplicity::setDoubleParameter(const string & Parameter, const double Value)
33  {
34  this->badParameter(Parameter);
35  }
36 
37  void VertexMultiplicity::setPointerParameter(const string & Parameter, void * Value)
38  {
39  this->badParameter(Parameter);
40  }
41 
43  {
44  int totaltracks = 0;
45  if (MyDecayChain->vertices().size()>1) //If we have more than just the IP
46  {
47  //Count tracks in vertices from secondary onwards
48  for (std::vector<Vertex*>::const_iterator iVertex= ++(MyDecayChain->vertices().begin()); iVertex != MyDecayChain->vertices().end() ;++iVertex)
49  {
50  totaltracks += (*iVertex)->tracks( ).size();
51  }
52  }
53  return totaltracks;
54  }
55 }
void setDoubleParameter(const string &Parameter, const double Value)
Set Double Parameter.
int calculateFor(DecayChain *MyDecayChain) const
Run the algorithm on a jet.
void setStringParameter(const string &Parameter, const string &Value)
Set String Parameter.
std::vector< string > parameterNames() const
Parameter Names.
const std::vector< Vertex * > & vertices() const
Vertices contained in DecayChain.
Definition: decaychain.cpp:80
std::vector< string > parameterValues() const
Parameter Values.
void setPointerParameter(const string &Parameter, void *Value)
Set Pointer Parameter.