FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairIonGenerator.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 // -------------------------------------------------------------------------
9 // ----- FairIonGenerator header file -----
10 // ----- Created 09/07/04 by V. Friese / D.Bertini -----
11 // -------------------------------------------------------------------------
12 
17 #ifndef FAIRIONGENERATOR_H
18 #define FAIRIONGENERATOR_H
19 
20 #include "FairBaseMCGenerator.h" // for FairGenerator
21 
22 #include <Rtypes.h> // for Double_t, Int_t, etc
23 
24 class FairIon;
26 
28 {
29  public:
32 
42  FairIonGenerator(const Char_t* ionName,
43  Int_t mult,
44  Double_t px,
45  Double_t py,
46  Double_t pz,
47  Double_t vx = 0,
48  Double_t vy = 0,
49  Double_t vz = 0);
50 
63  FairIonGenerator(Int_t z,
64  Int_t a,
65  Int_t q,
66  Int_t mult,
67  Double_t px,
68  Double_t py,
69  Double_t pz,
70  Double_t vx = 0,
71  Double_t vy = 0,
72  Double_t vz = 0);
73 
75  virtual ~FairIonGenerator();
76 
78  void SetCharge(Int_t charge) { fQ = charge; }
79  void SetExcitationEnergy(Double_t eExc);
80  void SetMass(Double_t mass);
81 
86  virtual Bool_t ReadEvent(FairPrimaryGenerator* primGen);
87 
89  virtual FairGenerator* CloneGenerator() const;
90 
91  private:
92  static Int_t fgNIon;
93  Double_t fPx, fPy, fPz; // Momentum components [GeV] per nucleon
94  FairIon* fIon; // Pointer to the FairIon to be generated
95  Int_t fQ; // Electric charge [e]
96 
98  FairIonGenerator& operator=(const FairIonGenerator&);
99 
100  ClassDef(FairIonGenerator, 2);
101 };
102 
103 #endif
void SetMass(Double_t mass)
void SetExcitationEnergy(Double_t eExc)
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
virtual FairGenerator * CloneGenerator() const
void SetCharge(Int_t charge)