YAP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MassShape.h
Go to the documentation of this file.
1 /* YAP - Yet another PWA toolkit
2  Copyright 2015, Technische Universitaet Muenchen,
3  Authors: Daniel Greenwald, Johannes Rauch
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
20 
21 #ifndef yap_MassShape_h
22 #define yap_MassShape_h
23 
24 #include "fwd/CachedValue.h"
25 #include "fwd/DataPartition.h"
26 #include "fwd/DecayChannel.h"
27 #include "fwd/Model.h"
28 #include "fwd/Parameter.h"
29 #include "fwd/ParticleCombination.h"
30 #include "fwd/ParticleFactory.h"
31 #include "fwd/Resonance.h"
32 #include "fwd/StatusManager.h"
33 
34 #include "AmplitudeComponent.h"
35 
36 #include <complex>
37 #include <memory>
38 #include <string>
39 
40 namespace yap {
41 
47 {
48 public:
49 
51  MassShape();
52 
56  virtual const std::complex<double> value(const DataPoint& d, const std::shared_ptr<ParticleCombination>& pc) const override final;
57 
61  virtual void calculate(DataPartition& D) const override final;
62 
66  virtual void setParameters(const ParticleTableEntry& entry)
67  { }
68 
70  virtual bool consistent() const;
71 
74  { return Resonance_; }
75 
77  virtual void updateCalculationStatus(StatusManager& D) const override final;
78 
80  const Model* model() const override;
81 
83  virtual void checkDecayChannel(const DecayChannel& c) const
84  {}
85 
88  friend class Resonance;
89 
90 protected:
91 
93  virtual void setResonance(Resonance* r);
94 
97  virtual void addDecayChannel(std::shared_ptr<DecayChannel> c)
98  {}
99 
101  std::shared_ptr<ComplexCachedValue> T()
102  { return T_; }
103 
105  const std::shared_ptr<ComplexCachedValue> T() const
106  { return const_cast<MassShape*>(this)->T(); }
107 
112  virtual void calculateT(DataPartition& D, const std::shared_ptr<ParticleCombination>& pc, unsigned si) const = 0;
113 
114 private:
115 
118 
120  std::shared_ptr<ComplexCachedValue> T_;
121 
122 };
123 
124 }
125 
126 #endif
virtual bool consistent() const
Check consistency of object.
Definition: MassShape.cxx:52
virtual void addDecayChannel(std::shared_ptr< DecayChannel > c)
Definition: MassShape.h:97
std::shared_ptr< ComplexCachedValue > T()
access cached dynamic amplitude
Definition: MassShape.h:101
virtual void updateCalculationStatus(StatusManager &D) const overridefinal
update the calculationStatus for a DataPartition
Definition: MassShape.cxx:39
Data container for storing particle information in database.
Definition: ParticleFactory.h:43
virtual void setParameters(const ParticleTableEntry &entry)
Definition: MassShape.h:66
virtual void checkDecayChannel(const DecayChannel &c) const
Check if a DecayChannel is valid for this MassShape; will throw if invalid.
Definition: MassShape.h:83
const std::shared_ptr< ComplexCachedValue > T() const
access cached dynamic amplitude (const)
Definition: MassShape.h:105
std::shared_ptr< ComplexCachedValue > T_
cached dynamic amplitude
Definition: MassShape.h:120
Definition: AmplitudeComponent.h:82
Class for holding data and cached values per data point for fast calculation.
Definition: DataPoint.h:35
Resonance * Resonance_
raw pointer to resonance that owns this mass shape
Definition: MassShape.h:117
virtual void calculate(DataPartition &D) const overridefinal
Definition: MassShape.cxx:23
Class defining a partition of the DataSet.
Definition: DataPartition.h:158
Definition: StatusManager.h:32
Class implementing a PWA model.
Definition: Model.h:56
virtual const std::complex< double > value(const DataPoint &d, const std::shared_ptr< ParticleCombination > &pc) const overridefinal
Definition: MassShape.cxx:46
Resonance * resonance() const
get raw pointer to owning resonance
Definition: MassShape.h:73
virtual void calculateT(DataPartition &D, const std::shared_ptr< ParticleCombination > &pc, unsigned si) const =0
MassShape()
Constructor.
Definition: MassShape.cxx:16
Class for a particle that will decay and has a mass shape.
Definition: Resonance.h:47
Abstract base class for all mass shapes.
Definition: MassShape.h:46
virtual void setResonance(Resonance *r)
Set raw pointer to owning Resonance.
Definition: MassShape.cxx:66
const Model * model() const override
get raw pointer to Model through resonance
Definition: MassShape.cxx:75
Class implementing a decay channel.
Definition: DecayChannel.h:40