8 #include "TClonesArray.h"
10 #include "TLorentzVector.h"
18 #include "FairPrimaryGenerator.h"
41 fInputFile =
new TFile(fFileName);
42 if(fParam){cout<<
"choosing parametrization modell"<<endl;}
44 cout<<
" Random events gerated from a TH2D P(th) dist-->GiBUU Modell"<<endl;
45 fInputHist = (TH2F*) fInputFile->Get(
"source");
64 cout <<
"-E PndCorrDistGenerator: Input file nor open!" << endl;
74 phi = gRandom->Uniform(0,360)* TMath::DegToRad();
92 lan =
new TF1(
"lan",
"1.03980e+03*TMath::Landau(x,[0],[1],0)",fTheLow,fTheHigh);
93 lan->SetParameters(1.10093e+01,4.65284e+00);
96 theta = lan->GetRandom();
105 mean_p = MeanMomentum(
theta);
106 p = MaxBoltDistP(mean_p);
117 fInputHist->GetRandom2(
theta,p);
135 primGen->AddTrack(3312, px, py, pz, 0., 0., 0.);
148 cout <<
"-I PndCorrDistGenerator: Closing input file " << fFileName
159 cout <<
"-I PndCorrDistGenerator: Calculating Mean Momentum as function of theta" << endl;
161 Double_t fitval = TMath::Exp((4.93964e-01)-(thet*1.41427e-02));
173 EK = gamma*1.321 - 1.321;
179 limLow = MeanP*0.882;
180 limHigh = MeanP*1.085;
183 TF1* MBol =
new TF1(
"mb",
"TMath::Gaus(x,[0],[1])",limLow,limHigh);
190 MBol->SetParameter(0,MeanP);
191 MBol->SetParameter(1,
sigma);
193 cout <<
"-I PndCorrDistGenerator: Calculating Momentum distribution via MB <v >" << endl;
194 Double_t fitval = MBol->GetRandom();
friend F32vec4 exp(const F32vec4 &a)
Double_t MeanMomentum(Double_t thet)
static T Sqrt(const T &x)
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
FairPrimaryGenerator * primGen
Double_t MaxBoltDistP(Double_t MeanP)
virtual ~PndCorrDistGenerator()