PandaRoot
CRes.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 // --------------------------------------------------------------------------
14 // KinTools.cpp - Helper tools for DalitzGUI
15 // --------------------------------------------------------------------------
16 //
17 // Original author: Klaus Goetzen - GSI Darmstadt
18 // Last modified : 2014/08/15
19 // --------------------------------------------------------------------------
20 #pragma once
21 
22 #include <Rtypes.h>
23 #include <iostream>
24 #include "TComplex.h"
25 // #include "TColor.h"
26 #include "TArrayD.h"
27 // #include "TStyle.h"
28 
29 // using std::cout;
30 // using std::endl;
31 // using std::flush;
32 
33 class CRes {
34  public:
35  CRes();
36  CRes(Double_t m0, Double_t G0, Double_t m1, Double_t m2, Double_t Amp = 1.0, Double_t Ph = 0., Int_t J = 0);
37 
38  void Set(Double_t m0, Double_t G0, Double_t m1, Double_t m2, Double_t Amp = 1.0, Double_t Ph = 0., Int_t J = 0);
39 
40  Double_t GetM0() { return fm0; }
41  Double_t GetG0() { return fG0; }
42  Double_t GetAmp() { return fAmp; }
43  Double_t GetPh() { return fPh; }
44  Int_t GetJ() { return fJ; }
45 
46  Double_t GetQ0() { return fq0; }
47 
48  Bool_t GetState() { return fOn; }
49  void SetState(Bool_t st) { fOn = st; }
50 
51  void SetM0(Double_t m0) { fm0 = m0; }
52  void SetG0(Double_t G0) { fG0 = G0; }
53  void SetAmp(Double_t Amp) { fAmp = Amp; }
54  void SetPh(Double_t Ph) { fPh = Ph; }
55  void SetJ(Int_t J) { fJ = J; }
56 
57  TComplex GetCoeff() { return TComplex(fAmp, fPh, true); }
58 
59  void SetCacheLen(Int_t n);
60  Int_t GetCacheLen() { return fnCache; }
61 
62  void SetCache(Int_t i, TComplex c);
63  TComplex GetCache(Int_t i) { return TComplex(fCacheRe[i], fCacheIm[i]); }
64 
65  Bool_t IsCacheValid() { return fCacheValid; }
66  void SetCacheValid(Bool_t v) { fCacheValid = v; }
67 
68  private:
69  Double_t fm0;
70  Double_t fG0;
71  Double_t fAmp;
72  Double_t fPh;
73  Int_t fJ;
74 
75  Double_t fq0;
76 
77  Bool_t fOn;
78  Bool_t fCacheValid;
79 
80  Int_t fnCache;
81 
82  TArrayD fCacheRe;
83  TArrayD fCacheIm;
84 
85  ClassDef(CRes, 1);
86 };
Int_t GetJ()
Definition: CRes.h:44
Double_t GetM0()
Definition: CRes.h:40
void SetAmp(Double_t Amp)
Definition: CRes.h:53
void SetState(Bool_t st)
Definition: CRes.h:49
Definition: CRes.h:33
void SetCacheValid(Bool_t v)
Definition: CRes.h:66
void Set(Double_t m0, Double_t G0, Double_t m1, Double_t m2, Double_t Amp=1.0, Double_t Ph=0., Int_t J=0)
Double_t GetPh()
Definition: CRes.h:43
__m128 v
Definition: P4_F32vec4.h:15
void SetJ(Int_t J)
Definition: CRes.h:55
unsigned int i
Definition: P4_F32vec4.h:33
void SetCacheLen(Int_t n)
Double_t GetQ0()
Definition: CRes.h:46
TComplex GetCache(Int_t i)
Definition: CRes.h:63
Double_t GetAmp()
Definition: CRes.h:42
Bool_t IsCacheValid()
Definition: CRes.h:65
void SetM0(Double_t m0)
Definition: CRes.h:51
void SetPh(Double_t Ph)
Definition: CRes.h:54
Double_t GetG0()
Definition: CRes.h:41
void SetCache(Int_t i, TComplex c)
void SetG0(Double_t G0)
Definition: CRes.h:52
Int_t GetCacheLen()
Definition: CRes.h:60
TComplex GetCoeff()
Definition: CRes.h:57
Bool_t GetState()
Definition: CRes.h:48