/home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/gen/include/RAT/DecayChain_Gen.hh Source File

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/gen/include/RAT/DecayChain_Gen.hh Source File
Ratpac-two
DecayChain_Gen.hh
1 // RAT::DecayChain_Gen
2 // 10-Jan-2006 WGS
3 
4 // Implements a GLG4Sim-style generator for a chain of radioactive
5 // decays. The class we use is DecayChain, prepared by Joe Formaggio
6 // and Jason Detwiler. This class is based on code in
7 // GLG4Sim/GLG4Gen.
8 
9 // To use this generator, the command is:
10 
11 // /generator/add decaychain ISOTOPE:POSITION[:TIME]
12 
13 // (that is, the TIME is optional). ISOTOPE comes from the list in
14 // data/beta_decays.dat; POSITION and TIME are the same as for the
15 // combo generator. For example:
16 
17 // /generator/add decaychain 208Tl:fill
18 
19 // For now, the implicit assumption is that all the isotopes in the
20 // decay chain remain at the fixed point determined by the position
21 // generator (no drifting during decays). There is also no "defering"
22 // of any tracks of emitted particles into other events. "TIME"
23 // refers to the start of the selected decay chain; as with the combo
24 // generator, the default is a poisson.
25 
26 // The location of the file path data/beta_decays.dat is assumed to be
27 // relative to the directory in the RATROOT enviornment variable. If you have
28 // to start RAT from a different location, want to use a different
29 // beta_decays.dat file, etc., you can change the file path by setting
30 // the variable $RATDecayDataDir in your shell environment.
31 
32 #ifndef __RAT_DecayChain_Gen__
33 #define __RAT_DecayChain_Gen__
34 
35 #include <RAT/GLG4Gen.hh>
36 #include <globals.hh>
37 
38 class G4Event;
39 class GLG4TimeGen;
40 class GLG4PosGen;
41 
42 namespace RAT {
43 
44 // Forward declarations in RAT namespace
45 class DecayChain;
46 
47 class DecayChain_Gen : public GLG4Gen {
48  public:
50  virtual ~DecayChain_Gen();
51  virtual void GenerateEvent(G4Event *event);
52  virtual void ResetTime(double offset = 0.0);
53  virtual bool IsRepeatable() const { return true; };
54 
55  virtual void SetState(G4String state);
56  virtual G4String GetState() const;
57 
58  virtual void SetTimeState(G4String state);
59  virtual G4String GetTimeState() const;
60  virtual void SetPosState(G4String state);
61  virtual G4String GetPosState() const;
62 
63  protected:
64  // Generator initialization, specified by the user.
65  G4String stateStr;
66 
67  // The time and position generators specified by the user.
68  GLG4TimeGen *timeGen;
69  GLG4PosGen *posGen;
70 
71  // The decay chain for the isotope selected by the user.
72  DecayChain *fDecayChain;
73 
74  bool fInMiddle; // to start chain from the isotope;
75  bool fInAlphaDecay; // to have only alpha decay
76  bool fInGammaDecay; // to have only gamma decay
77 };
78 
79 } // namespace RAT
80 
81 #endif
Definition: GLG4Gen.hh:14
Definition: GLG4PosGen.hh:18
Definition: GLG4TimeGen.hh:6
Definition: DecayChain_Gen.hh:47
Definition: DecayChain.hh:20
Definition: CCCrossSecMessenger.hh:29