FairRoot/PandaRoot
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
PndPythia8Direct Class Reference

#include <PndPythia8Direct.h>

Inheritance diagram for PndPythia8Direct:

Public Member Functions

 PndPythia8Direct ()
 
virtual ~PndPythia8Direct ()
 
Bool_t ReadEvent (FairPrimaryGenerator *)
 
void SetParameters (char *)
 
void Print ()
 
virtual Bool_t Init ()
 
void SetMom (Double_t mom)
 
void UseRandom1 ()
 
void UseRandom3 ()
 

Protected Member Functions

 ClassDef (PndPythia8Direct, 1)
 

Protected Attributes

Double_t fMom
 
Int_t fPar_it
 
Bool_t fUseRandom1
 
Bool_t fUseRandom3
 

Private Attributes

Pythia fPythia
 
RndmEngine * fRandomEngine
 
char * fParams [100]
 

Detailed Description

Definition at line 54 of file PndPythia8Direct.h.

Constructor & Destructor Documentation

PndPythia8Direct::PndPythia8Direct ( )

default constructor

Definition at line 12 of file PndPythia8Direct.cxx.

13 {
14  fPar_it = 0;
15  fMom = 15.;
16  fUseRandom1 = kFALSE;
17  fUseRandom3 = kTRUE;
18 }
PndPythia8Direct::~PndPythia8Direct ( )
virtual

destructor

Definition at line 55 of file PndPythia8Direct.cxx.

56 {
57 }

Member Function Documentation

PndPythia8Direct::ClassDef ( PndPythia8Direct  ,
 
)
protected
Bool_t PndPythia8Direct::Init ( )
virtual

Definition at line 22 of file PndPythia8Direct.cxx.

References jj.

23 {
24  if (fUseRandom1) fRandomEngine = new PyTr1Rng();
25  if (fUseRandom3) fRandomEngine = new PyTr3Rng();
26 
27  fPythia.setRndmEnginePtr(fRandomEngine);
28 
29  // Set Parameters
30  for(Int_t jj=0; jj<fPar_it; jj++) {
31  fPythia.readString(fParams[jj]);
32  cout<<"fPythia.readString(\""<<fParams[jj]<<"\")"<<endl;
33  }
34  cout<<"Beam Momentum "<<fMom<<endl;
35 
36  // fPythia.init(-2212, 2212, 0., 0., fMom, 0., 0., 0.);
37  // Settings according to the obsolete init function
38  fPythia.settings.mode("Beams:idA", -2212);
39  fPythia.settings.mode("Beams:idB", 2212);
40  fPythia.settings.mode("Beams:frameType", 3);
41  fPythia.settings.parm("Beams:pxA", 0.);
42  fPythia.settings.parm("Beams:pyA", 0.);
43  fPythia.settings.parm("Beams:pzA", fMom);
44  fPythia.settings.parm("Beams:pxB", 0.);
45  fPythia.settings.parm("Beams:pyB", 0.);
46  fPythia.settings.parm("Beams:pzB", 0.);
47  fPythia.init();
48 
49  return kTRUE;
50 }
RndmEngine * fRandomEngine
char * fParams[100]
void PndPythia8Direct::Print ( )

Definition at line 94 of file PndPythia8Direct.cxx.

94  {
95  fPythia.settings.listAll();
96 }
Bool_t PndPythia8Direct::ReadEvent ( FairPrimaryGenerator *  cpg)

public method ReadEvent

Definition at line 61 of file PndPythia8Direct.cxx.

References Double_t, and i.

62 {
63  Int_t npart = 0;
64  while(npart == 0)
65  {
66  fPythia.next();
67  for(int i=0; i<fPythia.event.size(); i++)
68  {
69  if(fPythia.event[i].isFinal())
70  {
71  npart++;
72  };
73  };
74  };
75 
76  for(Int_t ii=0; ii<fPythia.event.size(); ii++)
77  if(fPythia.event[ii].isFinal())
78  {
79  cpg->AddTrack((Int_t)fPythia.event[ii].id(),
80  (Double_t)fPythia.event[ii].px(),(Double_t)fPythia.event[ii].py(),(Double_t)fPythia.event[ii].pz(),
81  0.,0.,0.);
82  };
83 
84  return kTRUE;
85 }
Int_t i
Definition: run_full.C:25
Double_t
void PndPythia8Direct::SetMom ( Double_t  mom)
inline

Definition at line 71 of file PndPythia8Direct.h.

References mom.

71  {
72  fMom = mom;
73  };
Double_t mom
Definition: plot_dirc.C:14
void PndPythia8Direct::SetParameters ( char *  par)

Definition at line 87 of file PndPythia8Direct.cxx.

References par.

88 {
89  fParams[fPar_it] = par;
90  fPar_it++;
91 }
Double_t par[3]
char * fParams[100]
void PndPythia8Direct::UseRandom1 ( )
inline

Definition at line 74 of file PndPythia8Direct.h.

74  {
75  fUseRandom1 = kTRUE;
76  fUseRandom3 = kFALSE;
77  };
void PndPythia8Direct::UseRandom3 ( )
inline

Definition at line 78 of file PndPythia8Direct.h.

78  {
79  fUseRandom1 = kFALSE;
80  fUseRandom3 = kTRUE;
81  };

Member Data Documentation

Double_t PndPythia8Direct::fMom
protected

Definition at line 91 of file PndPythia8Direct.h.

Int_t PndPythia8Direct::fPar_it
protected

Definition at line 92 of file PndPythia8Direct.h.

char* PndPythia8Direct::fParams[100]
private

Definition at line 87 of file PndPythia8Direct.h.

Pythia PndPythia8Direct::fPythia
private

Definition at line 81 of file PndPythia8Direct.h.

RndmEngine* PndPythia8Direct::fRandomEngine
private

Definition at line 86 of file PndPythia8Direct.h.

Bool_t PndPythia8Direct::fUseRandom1
protected

Definition at line 93 of file PndPythia8Direct.h.

Bool_t PndPythia8Direct::fUseRandom3
protected

Definition at line 94 of file PndPythia8Direct.h.


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