SND@LHC Software
Loading...
Searching...
No Matches
tPythia6Generator Class Reference

#include <tPythia6Generator.h>

Inheritance diagram for tPythia6Generator:
Collaboration diagram for tPythia6Generator:

Public Member Functions

 tPythia6Generator ()
 
virtual ~tPythia6Generator ()
 
Bool_t ReadEvent (FairPrimaryGenerator *)
 
virtual Bool_t Init ()
 
void SetMom (Double_t mom)
 
void SetTarget (TString Type, TString Target)
 
void UseDeepCopy ()
 
double getPyint5_XSEC (int i, int j)
 
double getPyint5_NGEN (int i, int j)
 
int getPyint5_NGENPD ()
 

Protected Member Functions

 ClassDef (tPythia6Generator, 1)
 

Protected Attributes

Double_t fMom
 
Bool_t fDeepCopy
 
Bool_t fPionKaonDecay
 
TString fType
 
TString fTarget
 

Private Attributes

TPythia6 * fPythia
 

Detailed Description

Definition at line 12 of file tPythia6Generator.h.

Constructor & Destructor Documentation

◆ tPythia6Generator()

tPythia6Generator::tPythia6Generator ( )

default constructor

Definition at line 10 of file tPythia6Generator.cxx.

11{
12 fMom = 400; // muon
13 fDeepCopy = kFALSE; // copy complete pythia event
14 fPythia = TPythia6::Instance();
15 fPionKaonDecay = kFALSE;
16 fType = "gamma/mu-"; // muon proton scattering
17 fTarget = "p+";
18}

◆ ~tPythia6Generator()

tPythia6Generator::~tPythia6Generator ( )
virtual

destructor

Definition at line 52 of file tPythia6Generator.cxx.

53{
54}

Member Function Documentation

◆ ClassDef()

tPythia6Generator::ClassDef ( tPythia6Generator  ,
 
)
protected

◆ getPyint5_NGEN()

double tPythia6Generator::getPyint5_NGEN ( int  i,
int  j 
)
inline

Definition at line 31 of file tPythia6Generator.h.

31{return fPythia->GetPyint5()->NGEN[i][j];};
int i
Definition ShipAna.py:86

◆ getPyint5_NGENPD()

int tPythia6Generator::getPyint5_NGENPD ( )
inline

Definition at line 32 of file tPythia6Generator.h.

32{return fPythia->GetPyint5()->NGENPD;};

◆ getPyint5_XSEC()

double tPythia6Generator::getPyint5_XSEC ( int  i,
int  j 
)
inline

Definition at line 30 of file tPythia6Generator.h.

30{return fPythia->GetPyint5()->XSEC[i][j];};

◆ Init()

Bool_t tPythia6Generator::Init ( )
virtual

Definition at line 22 of file tPythia6Generator.cxx.

23{
24
25 fPythia->SetMRPY(1,gRandom->GetSeed());
26
27 cout<<"Muon Momentum "<<fMom<<endl;
28
29 if (fPionKaonDecay) {
30// let also pion and kaon decay
31 fPythia->SetMDCY(fPythia->Pycomp(211),1,100);
32 fPythia->SetMDCY(fPythia->Pycomp(321),1,100);
33 }
34 fPythia->SetMSEL(1); // msel 2 includes diffractive parts
35// fPythia->SetMSUB(91,0); // elastic scattering
36 fPythia->SetPARP(2,2); // To get below 10 GeV, you have to change PARP(2)
37
38/* compass settings
39# CKIN(10) = 100
40# MSEL = 2 # include elastic and diffractive to mbias
41# MSTJ = 1 default, string fragmentation
42*/
43
44 fPythia->Initialize("FIXT",fType,fTarget,fMom);
45
46 return kTRUE;
47}

◆ ReadEvent()

Bool_t tPythia6Generator::ReadEvent ( FairPrimaryGenerator *  cpg)

public method ReadEvent

Definition at line 58 of file tPythia6Generator.cxx.

59{
60 Int_t npart = 0;
61 while(npart == 0)
62 {
63 fPythia->GenerateEvent();
64// remove all unnecessary stuff
65 fPythia->Pyedit(2);
66 npart = fPythia->GetN();
67 };
68
69 for(Int_t ii=1; ii<fPythia->GetN()+1; ii++){
70 Bool_t wanttracking=false;
71 if(fPythia->GetK(ii,1) == 1){ wanttracking=true;}
72 Int_t id = fPythia->GetK(ii,2);
73 Double_t z = fPythia->GetV(ii,3)/10.;
74 Double_t x = fPythia->GetV(ii,1)/10.;
75 Double_t y = fPythia->GetV(ii,2)/10.;
76 Double_t pz = fPythia->GetP(ii,3);
77 Double_t px = fPythia->GetP(ii,1);
78 Double_t py = fPythia->GetP(ii,2);
79 Double_t t = fPythia->GetP(ii,2); // time of production, in mm/c (¼ 3.33 × 10−12 s).
80 Int_t im = fPythia->GetV(ii,4);
81 // cout << "debug p6 "<<id<<" "<< pz << endl;
82// copy blind complete pythia event
83 if (fDeepCopy || wanttracking){ cpg->AddTrack(id,px,py,pz,x,y,z,im,wanttracking); }
84 }
85 return kTRUE;
86}

◆ SetMom()

void tPythia6Generator::SetMom ( Double_t  mom)
inline

Definition at line 27 of file tPythia6Generator.h.

27{ fMom = mom; };

◆ SetTarget()

void tPythia6Generator::SetTarget ( TString  Type,
TString  Target 
)
inline

Definition at line 28 of file tPythia6Generator.h.

28{ fType = Type; fTarget=Target;};

◆ UseDeepCopy()

void tPythia6Generator::UseDeepCopy ( )
inline

Definition at line 29 of file tPythia6Generator.h.

29{ fDeepCopy = kTRUE; };

Member Data Documentation

◆ fDeepCopy

Bool_t tPythia6Generator::fDeepCopy
protected

Definition at line 40 of file tPythia6Generator.h.

◆ fMom

Double_t tPythia6Generator::fMom
protected

Definition at line 39 of file tPythia6Generator.h.

◆ fPionKaonDecay

Bool_t tPythia6Generator::fPionKaonDecay
protected

Definition at line 41 of file tPythia6Generator.h.

◆ fPythia

TPythia6* tPythia6Generator::fPythia
private

Definition at line 35 of file tPythia6Generator.h.

◆ fTarget

TString tPythia6Generator::fTarget
protected

Definition at line 43 of file tPythia6Generator.h.

◆ fType

TString tPythia6Generator::fType
protected

Definition at line 42 of file tPythia6Generator.h.


The documentation for this class was generated from the following files: