StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
AgUDecay.h
1 #ifndef __AgUDecay_h__
2 #define __AgUDecay_h__
3 
4 #include "TObject.h"
5 #include "TLorentzVector.h"
6 #include "StarDecayManager.h"
7 class TClonesArray;
8 
9 class TVirtualMCDecayer;
10 class TParticle;
11 
18 class AgUDecay : public TObject
19 {
20 public:
21 
22  static AgUDecay &instance(){ return sInstance; }
23  void SetDecayer( StarDecayManager *dcay = 0 ){ mDecayer = dcay; }
24 
25  static StarDecayManager *Manager(){
27  instance().SetDecayer( d );
28  return d;
29  };
30 
31  int operator()();
32 
33  enum DiscoveryPolicy_t
34  {
35  kDecay = 0, // Decayer handles the decay (may miss materials)
36  kSpawn // Add particle to G3 and DB
37  };
38 
39  void SetDiscovery( DiscoveryPolicy_t p ){ mDiscovery = p; }
40 
42  static void setParticleStop( const int pdgid ){ mParticleStop[pdgid]=1; }
43 
44 private:
45 protected:
46 
47  AgUDecay();
48  virtual ~AgUDecay();
49 
50  static AgUDecay sInstance;
51 
52  StarDecayManager *mDecayer;
53  TClonesArray *mArray;
54  TLorentzVector mP;
55 
56  DiscoveryPolicy_t mDiscovery;
57  int mNextG3id;
58 
59  static std::map<int, int> mParticleStop;
60 
61  double StackParticleForTransport( const TParticle* particle );
62  bool MayTransport( const TParticle* particle );
63 
64  int mNonConservation;
65 
66  ClassDef(AgUDecay,1);
67 };
68 
69 #endif
Interface between starsim and virtual decayer (VMC implementation)
Definition: AgUDecay.h:18
Connects VMC to class(es) which handle particle decays.
static void setParticleStop(const int pdgid)
Debug method. Will throw an exception when pdgid is decayed.
Definition: AgUDecay.h:42