ROOTPWA
fsVertex.cc
Go to the documentation of this file.
1 
2 //
3 // Copyright 2010
4 //
5 // This file is part of rootpwa
6 //
7 // rootpwa is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // rootpwa is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with rootpwa. If not, see <http://www.gnu.org/licenses/>.
19 //
21 //-------------------------------------------------------------------------
22 // File and Version Information:
23 // $Rev:: $: revision of last commit
24 // $Author:: $: author of last commit
25 // $Date:: $: date of last commit
26 //
27 // Description:
28 // class that describes final state vertex decay topology
29 // class is just used for internal book keeping
30 //
31 //
32 // Author List:
33 // Boris Grube TUM (original author)
34 //
35 //
36 //-------------------------------------------------------------------------
37 
38 
39 #include "conversionUtils.hpp"
40 #include "fsVertex.h"
41 
42 
43 using namespace std;
44 using namespace rpwa;
45 
46 
47 bool fsVertex::_debug = false;
48 
49 
50 fsVertex::fsVertex(const particlePtr& fsParticle)
52 {
53  if (not fsParticle) {
54  printErr << "null pointer to final state particle. aborting." << endl;
55  throw;
56  }
58  if (_debug)
59  printDebug << "constructed " << *this << endl;
60 }
61 
62 
64 {
65  *this = vert;
66 }
67 
68 
70 { }
71 
72 
73 fsVertex*
74 fsVertex::doClone(const bool cloneInParticles,
75  const bool) const
76 {
77  fsVertex* vertexClone = new fsVertex(*this);
78  if (cloneInParticles)
79  vertexClone->cloneInParticles();
80  if (_debug)
81  printDebug << "cloned " << *this << "; " << this << " -> " << vertexClone << " "
82  << ((cloneInParticles ) ? "in" : "ex") << "cluding incoming particles" << std::endl;
83  return vertexClone;
84 }
85 
86 
87 bool
89 {
90  if (_debug)
91  printWarn << "cannot add incoming particle to " << *this << endl;
92  return false;
93 }
94 
95 
96 bool
98 {
99  if (_debug)
100  printWarn << "cannot add outgoing particle to " << *this << endl;
101  return false;
102 }
103 
104 
105 ostream&
106 fsVertex::print(ostream& out) const
107 {
108  out << name() << ": " << fsParticle()->qnSummary();
109  return out;
110 }
111 
112 
113 ostream&
114 fsVertex::dump(ostream& out) const
115 {
116  out << name() << ":" << endl
117  << " final state particle: " << *fsParticle() << endl;
118  return out;
119 }
120 
121 
122 ostream&
123 fsVertex::printPointers(ostream& out) const
124 {
125  out << name() << " " << this << ": final state particle: " << fsParticle() << endl;
126  return out;
127 }