CMS 3D CMS Logo

CustomParticle.h
Go to the documentation of this file.
1 #ifndef SimG4Core_CustomPhysics_CustomParticle_h
2 #define SimG4Core_CustomPhysics_CustomParticle_h 1
3 
4 #include "G4ParticleDefinition.hh"
5 #include "globals.hh"
6 
7 // ######################################################################
8 // ### CustomParticle ###
9 // ######################################################################
10 
11 class CustomParticle : public G4ParticleDefinition {
12 public:
13  CustomParticle(const G4String& aName,
14  G4double mass,
15  G4double width,
16  G4double charge,
17  G4int iSpin,
18  G4int iParity,
19  G4int iConjugation,
20  G4int iIsospin,
21  G4int iIsospin3,
22  G4int gParity,
23  const G4String& pType,
24  G4int lepton,
25  G4int baryon,
26  G4int encoding,
27  G4bool stable,
28  G4double lifetime,
29  G4DecayTable* decaytable);
30 
31 private:
32  G4ParticleDefinition* m_cloud;
33  G4ParticleDefinition* m_spec;
34 
35 public:
36  void SetCloud(G4ParticleDefinition* theCloud);
37  void SetSpectator(G4ParticleDefinition* theSpectator);
38  G4ParticleDefinition* GetCloud();
39  G4ParticleDefinition* GetSpectator();
40  ~CustomParticle() override {}
41 };
42 
43 inline void CustomParticle::SetCloud(G4ParticleDefinition* theCloud) { m_cloud = theCloud; }
44 inline G4ParticleDefinition* CustomParticle::GetCloud() { return m_cloud; }
45 inline void CustomParticle::SetSpectator(G4ParticleDefinition* theSpectator) { m_spec = theSpectator; }
46 inline G4ParticleDefinition* CustomParticle::GetSpectator() { return m_spec; }
47 
48 #endif
CustomParticle(const G4String &aName, G4double mass, G4double width, G4double charge, G4int iSpin, G4int iParity, G4int iConjugation, G4int iIsospin, G4int iIsospin3, G4int gParity, const G4String &pType, G4int lepton, G4int baryon, G4int encoding, G4bool stable, G4double lifetime, G4DecayTable *decaytable)
G4ParticleDefinition * m_spec
static const int stable
Definition: TopGenEvent.h:11
void SetCloud(G4ParticleDefinition *theCloud)
G4ParticleDefinition * GetCloud()
~CustomParticle() override
void SetSpectator(G4ParticleDefinition *theSpectator)
G4ParticleDefinition * GetSpectator()
G4ParticleDefinition * m_cloud