VMC Examples Version 6.6
Loading...
Searching...
No Matches
PrimaryGenerator.h
Go to the documentation of this file.
1#ifndef PRIMARY_GENERATOR_H
2#define PRIMARY_GENERATOR_H
3
4//------------------------------------------------
5// The Virtual Monte Carlo examples
6// Copyright (C) 2007 - 2015 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 TR/include/PrimaryGenerator.h
14/// \brief Definition of the PrimaryGenerator class
15///
16/// Geant4 TestEm10 adapted to Virtual Monte Carlo.
17///
18/// \author I. Hrivnacova; IPN, Orsay
19
20#include <TVirtualMCApplication.h>
21
22class TVirtualMCStack;
23
24namespace VMC
25{
26namespace TR
27{
28
29/// \ingroup TR
30/// \brief The primary generator
31///
32/// \date 18/12/2015
33/// \author I. Hrivnacova; IPN, Orsay
34
36{
37 public:
41 virtual ~PrimaryGenerator();
42
43 // methods
44 virtual void GeneratePrimaries();
45
46 void SetNofPrimaries(Int_t nofPrimaries);
47
48 private:
49 // methods
50 void GenerateOnePrimary();
51
52 // data members
53 TVirtualMCStack* fStack; ///< VMC stack
54 Int_t fNofPrimaries; ///< Number of primary particles
55
56 ClassDef(PrimaryGenerator, 1) // PrimaryGenerator
57};
58
59// inline functions
60
61/// Set the number of particles to be generated
62/// \param nofPrimaries The number of particles to be generated
63inline void PrimaryGenerator::SetNofPrimaries(Int_t nofPrimaries)
64{
65 fNofPrimaries = nofPrimaries;
66}
67
68} // namespace TR
69} // namespace VMC
70
71#endif // PRIMARY_GENERATOR_H
The primary generator.
TVirtualMCStack * fStack
VMC stack.
void SetNofPrimaries(Int_t nofPrimaries)
Int_t fNofPrimaries
Number of primary particles.