elegent is hosted by Hepforge, IPPP Durham
Elegent
Model.h
1 /********************************************************************************
2 
3  Copyright 2013 Jan Kašpar
4 
5  This file is part of Elegent (http://elegent.hepforge.org/).
6 
7  Elegent 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  Elegent 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 Elegent. If not, see <http://www.gnu.org/licenses/>.
19 
20 ********************************************************************************/
21 
22 #ifndef _elegent_model_
23 #define _elegent_model_
24 
25 #include "TComplex.h"
26 
27 #include <string>
28 
29 namespace Elegent
30 {
31 
35 class Model
36 {
37  public:
39  struct Label
40  {
41  std::string name, variant, version, mode;
42  };
43 
46 
49 
51  std::string CompileFullLabel() const;
52 
54  std::string CompileShortLabel() const;
55 
56  Model() {}
57 
58  virtual ~Model() {}
59 
61  virtual void Init() =0;
62 
64  virtual void Print() const =0;
65 
72  virtual TComplex Amp(double t) const =0;
73 
78  virtual TComplex Prf(double b) const =0;
79 
84  virtual void ForcePresampling(bool /*value*/) {}
85 };
86 
88 extern Model *model;
89 
90 } // namespace
91 
92 #endif
std::string CompileShortLabel() const
compiles a human readable string from shortLabel
Definition: Model.cc:29
Label shortLabel
short label (e.g. for object names in ROOT files)
Definition: Model.h:48
Definition: BHModel.h:28
std::string CompileFullLabel() const
compiles a human readable string from fullLabel
Definition: Model.cc:46
virtual void Print() const =0
prints model info
virtual TComplex Prf(double b) const =0
Profile function (amplitude in b-space).
collection of strings that describe a model instance
Definition: Model.h:39
virtual void Init()=0
sets up model parameters and data members
The base class for hadronic models of (anti)proton-proton elastic scattering.
Definition: Model.h:35
virtual TComplex Amp(double t) const =0
Amplitude in t-space.
Label fullLabel
full label (e.g. for figure legend)
Definition: Model.h:45
virtual void ForcePresampling(bool)
Sets the presampling option, if available.
Definition: Model.h:84