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