Pluto v6.3.0
Loading...
Searching...
No Matches
PFermiMomentum.h
Go to the documentation of this file.
1// Author: I. Froehlich
2// Written: 23.6.2007
3// Revised:
4
5#ifndef _PFERMIMOMENTUM_H_
6#define _PFERMIMOMENTUM_H_
7
8#include "TF1.h"
9#include "TF2.h"
10#include "TGraph.h"
11#include "TSpline.h"
12#include "PChannelModel.h"
13#include "PAdaptiveMeshN.h"
14
15
17
18 public:
20 PFermiMomentum(const Char_t *id, const Char_t *de, Int_t key);
22
23 PDistribution *Clone(const char *delme=NULL) const;
24
25 Bool_t Init(void);
26 Bool_t Prepare(void);
27 Bool_t IsNotRejected(void);
28 int GetDepth(int i);
29
30 void Print(const Option_t *delme=NULL) const; //Debug info
31 void SubPrint(Int_t opt) const;
32
34 Double_t GetWeight(Double_t *mass, Int_t *didx=NULL);
35
36 Bool_t SampleMomentum(void);
37
39 Bool_t SampleMass(void);
40
41 void SetMomentumFunction(TGraph *f, Bool_t useSpline=kFALSE) {
42 mom = f;
43 spline = useSpline;
44 if (spline) g_spline = new TSpline3("",f);
45 };
46
47 virtual Double_t Eval(Double_t x, Double_t y = 0, Double_t z = 0, Double_t t = 0) const;
48 virtual Double_t EvalPar(const Double_t *x, const Double_t *params);
49 //TF1 wrapper
50
51 protected:
52
53 double SampleFermi(double &px, double &py, double &pz);
54
55 private:
56
57 PParticle *beam;
58 PParticle *target;
59 PParticle *spectator;
60 PParticle *parent;
61 PParticle *p1,*p2;
62 PParticle *composite;
63 Int_t num_of_realevents, num_of_sampledevents;
64 Int_t didx_composite;
65 PChannelModel *composite_model;
66 Int_t tcross_key;
67 Int_t debug_print;
68 Double_t px, py, pz, participant_mass;
69 TLorentzVector my_beam;
70 PAdaptiveMeshN *mesh;
71
72 TGraph *mom;
73 TSpline3 *g_spline;
74 Bool_t spline;
75
76
77 ClassDef(PFermiMomentum, 0) // Quasifree scattering using deuteron wave function
78};
79
80#endif
81
82
TFile * f
Definition analyze_g12C.C:8
virtual Bool_t SampleMass(Double_t *mass, Int_t *didx=NULL)
virtual Double_t GetWeight(void)
Bool_t IsNotRejected(void)
double SampleFermi(double &px, double &py, double &pz)
Bool_t Init(void)
virtual Double_t EvalPar(const Double_t *x, const Double_t *params)
Bool_t SampleMomentum(void)
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
void SetMomentumFunction(TGraph *f, Bool_t useSpline=kFALSE)
PFermiMomentum(const Char_t *id, const Char_t *de, Int_t key)
Double_t GetWeight(Double_t *mass, Int_t *didx=NULL)
void SubPrint(Int_t opt) const
PDistribution * Clone(const char *delme=NULL) const
Bool_t SampleMass(void)
Bool_t Prepare(void)
void Print(const Option_t *delme=NULL) const
int GetDepth(int i)
Double_t mass