er  dev
ERIonMixGenerator.h
1 /********************************************************************************
2  * Copyright (C) Joint Institute for Nuclear Research *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence version 3 (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 
9 #ifndef ERIonMixGenerator_H
10 #define ERIonMixGenerator_H
11 
12 #include <map>
13 
14 #include "Rtypes.h" // for Double_t, Int_t, etc
15 
16 #include "FairGenerator.h" // for FairGenerator
17 
18 #include "ERIonGenerator.h"
19 
20 class FairIon;
21 class FairPrimaryGenerator;
22 
37 {
38 
39  public:
40 
43 
51  ERIonMixGenerator(const Char_t* ionName, Int_t mult);
52 
53 
64  ERIonMixGenerator(TString name, Int_t z, Int_t a, Int_t q, Int_t mult);
65 
67  virtual ~ERIonMixGenerator();
68 
81  void AddBackgroundIon(TString name, Int_t z, Int_t a, Int_t q, Double_t newIonProb);
82 
87  Bool_t ReadEvent(FairPrimaryGenerator* primGen);
88 
89  private:
90  std::map<Double_t, TString> fBgIons;
91  Double_t fSumProbability;
92 
94  ERIonMixGenerator& operator=(const ERIonMixGenerator&);
95 
96  ClassDef(ERIonMixGenerator,1)
97 };
98 
99 
100 #endif
101 
std::map< Double_t, TString > fBgIons
Background ion names with emegence probability.
Double_t fSumProbability
Background ions summary probability.
virtual ~ERIonMixGenerator()
Destructor.
Bool_t ReadEvent(FairPrimaryGenerator *primGen)
Method ReadEvent Generates <mult> of the specified ions and hands hem to the FairPrimaryGenerator.
Class for the generation different ions during one simulation.
void AddBackgroundIon(TString name, Int_t z, Int_t a, Int_t q, Double_t newIonProb)
Adds background ions with probability of appearance in simulation. Probability of primary ion is 1...
Class for the generation ion.