CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
VertexCategories.cc
Go to the documentation of this file.
1 
2 #include <iostream>
3 
5 
6 const char * const VertexCategories::Names[] =
7 {
8  "Fake",
9  "SignalEvent",
10  "BWeakDecay",
11  "CWeakDecay",
12  "TauDecay",
13  "KsDecay",
14  "LambdaDecay",
15  "JpsiDecay",
16  "XiDecay",
17  "OmegaDecay",
18  "SigmaPlusDecay",
19  "SigmaMinusDecay",
20  "LongLivedDecay",
21  "KnownProcess",
22  "UndefinedProcess",
23  "UnknownProcess",
24  "PrimaryProcess",
25  "HadronicProcess",
26  "DecayProcess",
27  "ComptonProcess",
28  "AnnihilationProcess",
29  "EIoniProcess",
30  "HIoniProcess",
31  "MuIoniProcess",
32  "PhotonProcess",
33  "MuPairProdProcess",
34  "ConversionsProcess",
35  "EBremProcess",
36  "SynchrotronRadiationProcess",
37  "MuBremProcess",
38  "MuNuclProcess",
39  "PrimaryVertex",
40  "SecondaryVertex",
41  "TertiaryVertex",
42  "Unknown"
43 };
44 
45 
47 {
48  // Check for all flags down
49  for (std::size_t index = 0; index < flags_.size() - 1; ++index)
50  if (flags_[index]) return;
51  // If all of them are down then it is a unkown track.
52  flags_[Unknown] = true;
53 }
54 
55 
56 std::ostream & operator<< (std::ostream & os, VertexCategories const & classifier)
57 {
58  bool init = true;
59 
60  const VertexCategories::Flags & flags = classifier.flags();
61 
62  // Print out the classification for the track
63  for (std::size_t index = 0; index < flags.size(); ++index)
64  {
65  if (flags[index])
66  {
67  if (init)
68  {
70  init = false;
71  }
72  else
73  os << "::" << VertexCategories::Names[index];
74  }
75  }
76  os << std::endl;
77 
78  return os;
79 }
int init
Definition: HydjetWrapper.h:67
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
std::vector< bool > Flags
Main types associated to the class.
Flags flags_
Flag containers.
const Flags & flags() const
Returns flags with the category descriptions.
static const char *const Names[]
Name of the different categories.