| 9 |
#include <TVector3.h> |
#include <TVector3.h> |
| 10 |
#include <TVector2.h> |
#include <TVector2.h> |
| 11 |
#include <TMath.h> |
#include <TMath.h> |
| 12 |
#include <TRandom3.h> |
#include <TRandom.h> |
| 13 |
|
#include <TF1.h> |
| 14 |
|
|
| 15 |
#include "PamRootManager.h" |
#include "PamRootManager.h" |
| 16 |
|
|
| 79 |
// gen methods |
// gen methods |
| 80 |
|
|
| 81 |
void GenPosition(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax){ |
void GenPosition(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax){ |
| 82 |
SetPosition(frnd->Uniform(xmin,xmax),frnd->Uniform(ymin,ymax),frnd->Uniform(zmin,zmax)); } |
SetPosition(frandom->Uniform(xmin,xmax),frandom->Uniform(ymin,ymax),frandom->Uniform(zmin,zmax)); } |
|
|
|
|
void GenDirection(Double_t thetamin, Double_t thetamax, Double_t phimin, Double_t phimax){ |
|
|
SetDirection(frnd->Uniform(thetamin,thetamax),frnd->Uniform(phimin,phimax)); } |
|
| 83 |
|
|
| 84 |
|
void GenDirection(Double_t thetamin, Double_t thetamax, Double_t phimin, Double_t phimax){ |
| 85 |
|
SetDirection(ftheta->GetRandom(thetamin, thetamax), frandom->Uniform(phimin,phimax)); |
| 86 |
|
} |
| 87 |
//flat spectra generator |
//flat spectra generator |
| 88 |
void GenSpe(Double_t PEmin, Double_t PEmax, Bool_t isEnergy=kFALSE); |
void GenSpe(Double_t PEmin, Double_t PEmax, Bool_t isEnergy=kFALSE); |
| 89 |
//power law spectra, gamma - differential spectral index |
//power law spectra, gamma - differential spectral index |
| 103 |
|
|
| 104 |
Bool_t Getgood(){ return fprim.fGOOD; }; |
Bool_t Getgood(){ return fprim.fGOOD; }; |
| 105 |
|
|
| 106 |
|
//initialize random |
| 107 |
|
void SetRandom(TRandom* random){ |
| 108 |
|
frandom = random; |
| 109 |
|
} |
| 110 |
|
|
| 111 |
//work with collection of primaries |
//work with collection of primaries |
| 112 |
|
|
| 113 |
void Register(){ |
void Register(){ |
| 135 |
Double_t fmass; |
Double_t fmass; |
| 136 |
Double_t fcharge; |
Double_t fcharge; |
| 137 |
TClonesArray* fprimColl; |
TClonesArray* fprimColl; |
| 138 |
|
TRandom* frandom; // Class is not a owner of this object |
| 139 |
TRandom3 * frnd; |
TF1* ftheta; // To generate sherical distributhin in theta-angle |
| 140 |
|
|
| 141 |
ClassDef(PamVMCPrimaryGenerator,1) //PamVMCPrimaryGenerator |
ClassDef(PamVMCPrimaryGenerator,1) //PamVMCPrimaryGenerator |
| 142 |
}; |
}; |