ROOTPWA
isobarDecayVertex.h
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 decay vertex of isobar into two particles
29 // the isobar -> particle1 + particle 2 vertex has exactly one
30 // incoming parent and two outgoing daughter particle
31 //
32 //
33 // Author List:
34 // Boris Grube TUM (original author)
35 //
36 //
37 //-------------------------------------------------------------------------
38 
39 
40 #ifndef ISOBARDECAYVERTEX_H
41 #define ISOBARDECAYVERTEX_H
42 
43 
44 #include "interactionVertex.h"
45 #include "massDependence.h"
46 
47 
48 namespace rpwa {
49 
50 
52  typedef boost::shared_ptr<isobarDecayVertex> isobarDecayVertexPtr;
53 
54 
56 
57  public:
58 
60  const particlePtr& daughter1,
61  const particlePtr& daughter2,
62  const unsigned int L = 0,
63  const unsigned int S = 0,
66  virtual ~isobarDecayVertex();
67 
70  const bool cloneOutParticles = false) const
72 
73  virtual bool addInParticle (const particlePtr&);
74  virtual bool addOutParticle(const particlePtr&);
75 
76  // isobar decay specific accessors
77  inline particlePtr& parent () { return inParticles ()[0]; }
78  inline particlePtr& daughter1() { return outParticles()[0]; }
79  inline particlePtr& daughter2() { return outParticles()[1]; }
80  inline const particlePtr& parent () const { return inParticles ()[0]; }
81  inline const particlePtr& daughter1() const { return outParticles()[0]; }
82  inline const particlePtr& daughter2() const { return outParticles()[1]; }
83 
84  const TLorentzVector& calcParentLzVec();
85 
86  int calcParentCharge ();
87  int calcParentBaryonNmb();
88 
89  inline unsigned int L() const { return _L; }
90  inline unsigned int S() const { return _S; }
91 
92  inline void setL(const unsigned int L) { _L = L; }
93  inline void setS(const unsigned int S) { _S = S; }
94 
95  inline std::complex<double> massDepAmplitude() const { return _massDep->amp(*this); }
96  inline const massDependencePtr& massDependence () const { return _massDep; }
97  inline void setMassDependence(const massDependencePtr& massDep) { _massDep = massDep; }
98 
99  bool checkConsistency();
100 
101  virtual std::ostream& print (std::ostream& out) const;
102  virtual std::ostream& dump (std::ostream& out) const;
103  virtual std::ostream& printPointers(std::ostream& out) const;
104 
105  virtual std::string name() const { return "isobarDecayVertex"; }
106 
107  static bool debug() { return _debug; }
108  static void setDebug(const bool debug = true) { _debug = debug; }
109 
110 
111  protected:
112 
113  virtual isobarDecayVertex* doClone(const bool cloneInParticles,
114  const bool cloneOutParticles) const;
115 
116  virtual bool isEqualTo(const interactionVertex& vert) const;
117 
118  private:
119 
120  bool checkMultiplicativeQn(const int parentQn,
121  const int daughter1Qn,
122  const int daughter2Qn,
123  const std::string& qnName = "");
124  bool checkAdditiveQn (const int parentQn,
125  const int daughter1Qn,
126  const int daughter2Qn,
127  const std::string& qnName = "");
128 
129  unsigned int _L;
130  unsigned int _S;
131 
133 
134  static bool _debug;
135 
136  };
137 
138 
139  inline
142  const particlePtr& daughter1,
143  const particlePtr& daughter2,
144  const unsigned int L = 0,
145  const unsigned int S = 0,
147  {
148  isobarDecayVertexPtr vert(new isobarDecayVertex(parent, daughter1, daughter2, L, S, massDep));
149  return vert;
150  }
151 
152 
153  inline
154  std::ostream&
155  operator <<(std::ostream& out,
156  const isobarDecayVertex& vert)
157  {
158  return vert.print(out);
159  }
160 
161 
162 } // namespace rpwa
163 
164 
165 #endif // ISOBARDECAYVERTEX_H