| 29 |
|
|
| 30 |
Int_t fPDG; |
Int_t fPDG; |
| 31 |
Double_t fX0, fY0, fZ0; |
Double_t fX0, fY0, fZ0; |
| 32 |
Double_t fTHETA, fPHI; |
Double_t fTHETA, fPHI; // RADIANTS |
| 33 |
Double_t fP0; |
Double_t fP0; |
| 34 |
Bool_t fGOOD; |
Bool_t fGOOD; |
| 35 |
|
|
| 41 |
{ cout<<"PRIMARY particle infromation:"<<endl; |
{ cout<<"PRIMARY particle infromation:"<<endl; |
| 42 |
cout<<"Pdg="<<fPDG<<endl; //add name later |
cout<<"Pdg="<<fPDG<<endl; //add name later |
| 43 |
cout<<"Position: "<<"("<<fX0<<","<<fY0<<","<<fZ0<<")"<<endl; |
cout<<"Position: "<<"("<<fX0<<","<<fY0<<","<<fZ0<<")"<<endl; |
| 44 |
cout<<"P0, Theta, Phi: "<<fP0<<","<<fTHETA<<","<<fPHI<<endl; |
cout<<"P0, Theta, Phi: "<<fP0<<","<<fTHETA*180./3.1415<<","<<fPHI*180./3.1415<<endl; |
| 45 |
cout<<"GOOD Single Track:"<<fGOOD<<endl; |
cout<<"GOOD Single Track:"<<fGOOD<<endl; |
| 46 |
} |
} |
| 47 |
|
|
| 53 |
class PamVMCPrimaryGenerator : public TObject |
class PamVMCPrimaryGenerator : public TObject |
| 54 |
{ |
{ |
| 55 |
public: |
public: |
| 56 |
PamVMCPrimaryGenerator(TVirtualMCStack* stack); |
PamVMCPrimaryGenerator(TVirtualMCStack* stack, UInt_t seed); |
| 57 |
|
//PamVMCPrimaryGenerator(UInt_t seed); |
| 58 |
PamVMCPrimaryGenerator(); |
PamVMCPrimaryGenerator(); |
| 59 |
|
|
| 60 |
virtual ~PamVMCPrimaryGenerator(); |
virtual ~PamVMCPrimaryGenerator(); |
| 84 |
void GenSphDist(Double_t, Double_t, Double_t, Double_t, Double_t); |
void GenSphDist(Double_t, Double_t, Double_t, Double_t, Double_t); |
| 85 |
|
|
| 86 |
void GenDirection(Double_t thetamin, Double_t thetamax, Double_t phimin, Double_t phimax){ |
void GenDirection(Double_t thetamin, Double_t thetamax, Double_t phimin, Double_t phimax){ |
| 87 |
SetDirection(frnd->Uniform(thetamin,thetamax),frnd->Uniform(phimin,phimax)); } |
SetDirection(frnd->Uniform(thetamin,thetamax),frnd->Uniform(phimin,phimax)); } |
| 88 |
|
|
| 89 |
//flat spectra generator |
//flat spectra generator |
| 90 |
void GenSpe(Double_t PEmin, Double_t PEmax, Bool_t isEnergy=kFALSE); |
void GenSpe(Double_t PEmin, Double_t PEmax, Bool_t isEnergy=kFALSE); |
| 91 |
//power law spectra, gamma - differential spectral index |
//power law spectra, gamma - differential spectral index |
| 92 |
void GenSpe(Double_t PEmin, Double_t PEmax, Double_t gamma, Bool_t isEnergy=kFALSE); |
void GenSpe(Double_t PEmin, Double_t PEmax, Double_t gamma, Bool_t isEnergy=kFALSE); |
| 93 |
|
|
| 94 |
//spherical dist. from radius r, allow only those particles going to cross 3 TOFs |
//spherical dist. from radius r, allow only those particles going to cross 3 TOFs |
| 95 |
void GenSphDist(Double_t); |
void GenSphDist(Double_t); |
| 96 |
|
|
| 97 |
|
|
| 98 |
|
void GenSphPhiThe(Double_t , Double_t , Double_t , Double_t , |
| 99 |
|
Double_t , Double_t ); // cecilia |
| 100 |
|
|
| 101 |
// get methods |
// get methods |
| 102 |
Int_t GetParticle(){ return fprim.fPDG; }; |
Int_t GetParticle(){ return fprim.fPDG; }; |
| 144 |
|
|
| 145 |
TRandom3 * frnd; |
TRandom3 * frnd; |
| 146 |
|
|
| 147 |
ClassDef(PamVMCPrimaryGenerator,1) //PamVMCPrimaryGenerator |
ClassDef(PamVMCPrimaryGenerator,2) //PamVMCPrimaryGenerator |
| 148 |
}; |
}; |
| 149 |
|
|
| 150 |
// inline functions |
// inline functions |