Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4ParticlesManager.h
Go to the documentation of this file.
1#ifndef TG4_PARTICLES_MANAGER_H
2#define TG4_PARTICLES_MANAGER_H
3
4//------------------------------------------------
5// The Geant4 Virtual Monte Carlo package
6// Copyright (C) 2007 - 2014 Ivana Hrivnacova
7// All rights reserved.
8//
9// For the licensing terms see geant4_vmc/LICENSE.
10// Contact: root-vmc@cern.ch
11//-------------------------------------------------
12
17
18#include "TG4Globals.h"
19#include "TG4IntMap.h"
20#include "TG4NameMap.h"
21#include "TG4ParticlesChecker.h"
22#include "TG4Verbose.h"
23
24#include <G4ThreeVector.hh>
25#include <globals.hh>
26
27#include <Rtypes.h>
28#include <TMCParticleType.h>
29
30#include <map>
31#include <vector>
32
33class G4DynamicParticle;
35
36class TParticle;
37class TClonesArray;
38
39class TG4UserIon;
40class TG4UserParticle;
41
46
48{
49 public:
51 typedef std::map<G4String, TG4UserIon*> UserIonMap;
52
54 typedef std::vector<TG4UserParticle*> UserParticleVector;
55
57 virtual ~TG4ParticlesManager();
58
59 // static access method
61
62 // methods
63 void DefineParticles();
64 void AddParticle(Int_t pdg, const TString& name, TMCParticleType mcType,
65 Double_t mass, Double_t charge, Double_t lifetime, const TString& pType,
66 Double_t width, Int_t iSpin, Int_t iParity, Int_t iConjugation,
67 Int_t iIsospin, Int_t iIsospinZ, Int_t gParity, Int_t lepton, Int_t baryon,
68 Bool_t stable, Bool_t shortlived = kFALSE, const TString& subType = "",
69 Int_t antiEncoding = 0, Double_t magMoment = 0.0,
70 Double_t excitation = 0.0);
71 void AddIon(
72 const G4String& name, G4int Z, G4int A, G4int Q, G4double excEnergy);
73 void SetUserDecay(Int_t pdg);
74 Bool_t SetDecayMode(Int_t pdg, Float_t bratio[6], Int_t mode[6][3]);
75 // get methods
76 // for G4 particle types
77 G4int GetPDGEncoding(G4ParticleDefinition* particle);
78
79 // for Root particle types;
80 TParticle* GetParticle(const TClonesArray* particles, G4int index) const;
82 const TParticle* particle, G4bool warn = true) const;
83
84 G4DynamicParticle* CreateDynamicParticle(const TParticle* particle) const;
85 G4ThreeVector GetParticlePosition(const TParticle* particle) const;
86 G4ThreeVector GetParticleMomentum(const TParticle* particle) const;
87 G4ThreeVector GetParticlePolarization(const TParticle* particle) const;
88
89 TG4UserIon* GetUserIon(const G4String& ionName, G4bool warn = true) const;
90
91 G4int GetNofUserParticles() const;
92 TG4UserParticle* GetUserParticle(G4int index) const;
93
94 private:
99
100 // methods
101 // G4int GetPDGIonEncoding(G4int Z, G4int A, G4int iso) const;
103 const G4String& name, G4ParticleDefinition* particleDefinition);
104
105 // static data members
107
108 //
109 // data members
110
114
117
120
123};
124
125// inline methods
126
132
133#endif // TG4_PARTICLES_MANAGER_H
Definition of the TG4Globals class and basic container types.
Definition of the TG4IntMap class.
Definition of the TG4NameMap class.
Definition of the TG4ParticlesChecker class.
Definition of the TG4Verbose class.
The map container for associated names.
Definition TG4NameMap.h:31
A helper class for comparing the basic particles properties in between Root and Geant4.
Provides mapping between TDatabasePDG and Geant4 particles.
TG4UserParticle * GetUserParticle(G4int index) const
void AddIon(const G4String &name, G4int Z, G4int A, G4int Q, G4double excEnergy)
UserIonMap fUserIonMap
user defined ions mappped by their names
G4DynamicParticle * CreateDynamicParticle(const TParticle *particle) const
G4ThreeVector GetParticlePolarization(const TParticle *particle) const
TG4ParticlesChecker fParticlesChecker
particles checker
UserParticleVector fUserParticles
vector of user defined particles
G4ParticleDefinition * GetParticleDefinition(const TParticle *particle, G4bool warn=true) const
std::vector< TG4UserParticle * > UserParticleVector
The vector of user particles.
Bool_t SetDecayMode(Int_t pdg, Float_t bratio[6], Int_t mode[6][3])
G4ThreeVector GetParticlePosition(const TParticle *particle) const
G4int GetPDGEncoding(G4ParticleDefinition *particle)
TG4NameMap fParticleNameMap
the mapping between G4 particle names and TDatabasePDG names for special particles
TG4ParticlesManager(const TG4ParticlesManager &right)
Not implemented.
TG4UserIon * GetUserIon(const G4String &ionName, G4bool warn=true) const
TParticle * GetParticle(const TClonesArray *particles, G4int index) const
void AddParticle(Int_t pdg, const TString &name, TMCParticleType mcType, Double_t mass, Double_t charge, Double_t lifetime, const TString &pType, Double_t width, Int_t iSpin, Int_t iParity, Int_t iConjugation, Int_t iIsospin, Int_t iIsospinZ, Int_t gParity, Int_t lepton, Int_t baryon, Bool_t stable, Bool_t shortlived=kFALSE, const TString &subType="", Int_t antiEncoding=0, Double_t magMoment=0.0, Double_t excitation=0.0)
G4ThreeVector GetParticleMomentum(const TParticle *particle) const
static TG4ParticlesManager * fgInstance
this instance
TG4ParticlesManager & operator=(const TG4ParticlesManager &right)
Not implemented.
static TG4ParticlesManager * Instance()
std::map< G4String, TG4UserIon * > UserIonMap
The map of user ions by their names.
void AddParticleToPdgDatabase(const G4String &name, G4ParticleDefinition *particleDefinition)
The class for user ion definition.
Definition TG4UserIon.h:31
The class for user particle definition.
Base class for defining the verbose level and a common messenger.
Definition TG4Verbose.h:36