Pluto v6.3.0
Loading...
Searching...
No Matches
PTCrossWeight.h
Go to the documentation of this file.
1// Author: I. Froehlich
2// Written: 31.1.2008
3// Revised:
4
5#ifndef _PTCROSSWEIGHT_H_
6#define _PTCROSSWEIGHT_H_
7
8#define TCROSS_MAX_DAUGHTERS 10
9
10#include "TF1.h"
11#include "TF2.h"
12#include "PChannelModel.h"
13#include "TLorentzVector.h"
14#include "TGraph.h"
15#include "TSpline.h"
16
18
19 public:
21 PTCrossWeight(const Char_t *id, const Char_t *de, Int_t key);
22 PDistribution* Clone(const char*delme=NULL) const;
23
24 Bool_t Init(void);
25
27
28 Double_t GetWeight(void);
29 Double_t GetWeight(Double_t *mass, Int_t *didx=NULL);
30
31 void SetCrossSection(TF1 *c) {
32 //Sets cross section as a function of excess energy
33 tcross = c;
34 };
35
36 void SetCrossSection(TGraph *f, Bool_t useSpline=kFALSE) {
37 //Sets cross section as a function of excess energy
38 tcrossg = f;
39 spline = useSpline;
40 if (spline) g_spline = new TSpline3("", f);
41 };
42
43 void SetCrossSection(Double_t f) {
44 //Sets cross section as a constant -> overrides everything
45 tcross = NULL;
46 tcrossg = NULL;
47 tcrossc = f;
48 };
49
50 void SetScaling(Double_t scal) {
51 scaling = scal;
52 };
53
54 void SetExcessEnergy(Bool_t a, Bool_t b) {
55 isExcessEnergy = a;
56 isMevEnergy = b;
57 };
58
59 private:
60
61 TF1 *tcross;
62 TGraph *tcrossg;
63 Double_t tcrossc;
64 TSpline3 *g_spline;
65 Bool_t spline;
66 Double_t scaling;
67
68 Bool_t isExcessEnergy, isMevEnergy;
69
70 PParticle *daughters[TCROSS_MAX_DAUGHTERS], *beam, *target, *parent;
71 int daughter_pos;
72
73 ClassDef(PTCrossWeight, 0) //Total cross section weights
74
75};
76
77#endif
78
79
#define TCROSS_MAX_DAUGHTERS
TFile * f
Definition analyze_g12C.C:8
virtual Double_t GetWeight(Double_t *mass, Int_t *didx=NULL)
void SetScaling(Double_t scal)
void SetCrossSection(Double_t f)
void SetCrossSection(TGraph *f, Bool_t useSpline=kFALSE)
PDistribution * Clone(const char *delme=NULL) const
void SetCrossSection(TF1 *c)
Double_t GetWeight(Double_t *mass, Int_t *didx=NULL)
Double_t GetWeight(void)
Bool_t Init(void)
void SetExcessEnergy(Bool_t a, Bool_t b)
PTCrossWeight(const Char_t *id, const Char_t *de, Int_t key)
PChannel * c[]
PParticle * target
Definition fermi_dd.C:9
Double_t mass
PParticle * beam