Pluto v6.3.0
Loading...
Searching...
No Matches
PNNFSI.cc
Go to the documentation of this file.
1
2//
3// NN FSI from the Jost function
4//
5// Author: I. Froehlich
7
8
9using namespace std;
10#include <sstream>
11#include <iostream>
12#include <iomanip>
13
14#include "PNNFSI.h"
15#include "PDynamicData.h"
16
17
19
21 Setup();
22};
23
24PNNFSI::PNNFSI(const Char_t *id, const Char_t *de, Int_t key) :
25 PChannelModel(id, de, key) {
26
27 Setup();
28
29};
30
31void PNNFSI::Setup(void) {
32 n1 = n2 = NULL;
33 daughter_pos = 0;
34 for (int i=0; i<NNFSI_MAX_DAUGHTERS; i++) {
35 daughters[i] = NULL;
36 }
37
38 triplet = 0;
39 a0 = -23.768;
40 r0 = 2.75;
41 is_np = 0;
42}
43
44PDistribution *PNNFSI::Clone(const char *) const {
45 return new PNNFSI((const PNNFSI &)* this);
46};
47
48
49Bool_t PNNFSI::Init(void) {
50
51 //looking for 2 nucleons. This is mandatory
52 n1 = GetParticle("p");
53 n2 = GetParticle("p");
54 if (!n2) {
55 n2 = GetParticle("n");
56 is_np =1;
57 }
58
59 if (!n1 || !n2) {
60 Warning("Init", "No 2 nucleons");
61 return kFALSE;
62 }
63
64 //Now get all daugthers
65 for (int i=0; i<NNFSI_MAX_DAUGHTERS; i++) {
66 daughters[i]= GetParticle("daughter");
67 if (daughters[i]) {
68 daughter_pos++;
69 }
70 }
71
72 return kTRUE;
73};
74
75Double_t PNNFSI::GetWeight(Double_t *mass, Int_t *) {
76 TComplex jost(1.,0.);
77 Double_t k = mass[0]/0.197;
78 Double_t alpha = 1./r0 * (
79 sqrt (1.-2.*r0/a0) +1.
80 );
81 Double_t beta = 1./r0 * (
82 sqrt (1.-2.*r0/a0) -1.
83 );
84 if (!triplet) {
85 TComplex num(k,beta);
86 TComplex denom(k,alpha);
87 jost = num/denom;
88 } else {
89 cout << "TODO" << endl;
90 }
91
92// if (!is_np)
93 return (1./jost.Rho2());
94
95}
96
97Double_t PNNFSI::GetWeight(void) {
98// n1->Print();
99// n2->Print();
100
101 TLorentzVector a = ((TLorentzVector) *n1) + ((TLorentzVector) *n2);
102 TLorentzVector b = ((TLorentzVector) *n1);
103
104 b.Boost(-a.BoostVector());
105
106 Double_t k = b.P();
107 weight = GetWeight(&k);
108
109 return weight;
110}
111
112
113
115
ClassImp(PNNFSI) PNNFSI
Definition PNNFSI.cc:18
#define NNFSI_MAX_DAUGHTERS
Definition PNNFSI.h:12
PParticle * GetParticle(const Char_t *pflag=NULL)
Double_t GetWeight(void)
Definition PNNFSI.cc:97
Bool_t Init(void)
Definition PNNFSI.cc:49
PDistribution * Clone(const char *delme=NULL) const
Definition PNNFSI.cc:44
Double_t mass
PParticle * n1
PParticle * n2