VMC Examples Version 6.6
Loading...
Searching...
No Matches
Ex01Particle.h
Go to the documentation of this file.
1#ifndef Ex01_PARTICLE_H
2#define Ex01_PARTICLE_H
3
4//------------------------------------------------
5// The Virtual Monte Carlo examples
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
13/// \file Ex01Particle.h
14/// \brief Definition of the Ex01Particle class
15///
16/// Geant4 ExampleN01 adapted to Virtual Monte Carlo
17///
18/// \author I. Hrivnacova; IPN, Orsay
19
20#include <TObject.h>
21
22class TParticle;
23
24/// \ingroup E01
25/// \brief Extended TParticle with pointers to mother and daughter
26/// particles
27///
28/// \date 05/04/2002
29/// \author I. Hrivnacova; IPN, Orsay
30
31class Ex01Particle : public TObject
32{
33 public:
34 Ex01Particle(Int_t id, TParticle* particle);
35 Ex01Particle(Int_t id, TParticle* particle, Ex01Particle* mother);
37 virtual ~Ex01Particle();
38
39 // methods
40 void SetMother(Ex01Particle* particle);
41 void AddDaughter(Ex01Particle* particle);
42
43 // get methods
44 Int_t GetID() const;
45 TParticle* GetParticle() const;
46 Ex01Particle* GetMother() const;
47 Int_t GetNofDaughters() const;
48 Ex01Particle* GetDaughter(Int_t i) const;
49
50 private:
51 // data members
52 Int_t fID; ///< The particle Id
53 TParticle* fParticle; ///< The particle definition
54 Ex01Particle* fMother; ///< The particle mother
55 TObjArray* fDaughters; ///< The particle daughters
56
57 ClassDef(Ex01Particle, 1) // Extended TParticle
58};
59
60#endif // Ex01_PARTICLE_H
Extended TParticle with pointers to mother and daughter particles.
void AddDaughter(Ex01Particle *particle)
TParticle * fParticle
The particle definition.
TObjArray * fDaughters
The particle daughters.
Int_t GetNofDaughters() const
Ex01Particle * fMother
The particle mother.
Ex01Particle * GetDaughter(Int_t i) const
void SetMother(Ex01Particle *particle)
Ex01Particle * GetMother() const
Int_t GetID() const
virtual ~Ex01Particle()
Int_t fID
The particle Id.
TParticle * GetParticle() const