////////////////////////////////////////////////////////
//  PPropagator Class implementation file
//
//  Can be used for Pion-Nukleon-reactions (see ref. 23)
//
//                    Author:  H. Schuldes / IF
//                    Written: 21.04.09
//
////////////////////////////////////////////////////////

#include "PPropagator.h"


PPropagator::PPropagator(const Char_t *id, const Char_t *de, Int_t key) : 
    PChannelModel(id, de, key) {
    //Constructor
    pid = is_pid;
};


PDistribution* PPropagator::Clone(const char*) const {
    //clone the object
    return new PPropagator((const PPropagator &) *this);
};

TComplex  PPropagator::GetAmplitude(Double_t *mass, Int_t *) {
    
    Double_t x = mass[0];
    
    Double_t M = makeStaticData()->GetParticleMass(pid); 
    Double_t Gamma = makeDynamicData()->GetParticleTotalWidth(mass[0], pid); 

//     if (pid == 52)
// 	Gamma = makeStaticData()->GetParticleTotalWidth(pid); 
//     else  {

// 	Gamma =  makeStaticData()->GetParticleTotalWidth(pid)
// 	    * (M/x) * sqrt(pow((x*x - 4*0.134*0.134) / (M*M-4*0.134*0.134)  ,3));
//     }
	

    Double_t Re = x*x - M*M;
    Double_t Im = Gamma * M;
    TComplex Denom(Re, Im); 
    TComplex Nom(1.,0);
    TComplex S = Nom/Denom; 
    
    return S;    
};

ClassImp(PPropagator)
 PPropagator.cc:1
 PPropagator.cc:2
 PPropagator.cc:3
 PPropagator.cc:4
 PPropagator.cc:5
 PPropagator.cc:6
 PPropagator.cc:7
 PPropagator.cc:8
 PPropagator.cc:9
 PPropagator.cc:10
 PPropagator.cc:11
 PPropagator.cc:12
 PPropagator.cc:13
 PPropagator.cc:14
 PPropagator.cc:15
 PPropagator.cc:16
 PPropagator.cc:17
 PPropagator.cc:18
 PPropagator.cc:19
 PPropagator.cc:20
 PPropagator.cc:21
 PPropagator.cc:22
 PPropagator.cc:23
 PPropagator.cc:24
 PPropagator.cc:25
 PPropagator.cc:26
 PPropagator.cc:27
 PPropagator.cc:28
 PPropagator.cc:29
 PPropagator.cc:30
 PPropagator.cc:31
 PPropagator.cc:32
 PPropagator.cc:33
 PPropagator.cc:34
 PPropagator.cc:35
 PPropagator.cc:36
 PPropagator.cc:37
 PPropagator.cc:38
 PPropagator.cc:39
 PPropagator.cc:40
 PPropagator.cc:41
 PPropagator.cc:42
 PPropagator.cc:43
 PPropagator.cc:44
 PPropagator.cc:45
 PPropagator.cc:46
 PPropagator.cc:47
 PPropagator.cc:48
 PPropagator.cc:49
 PPropagator.cc:50
 PPropagator.cc:51