/[PAMELA software]/PamVMC/include/PamVMCApplication.h
ViewVC logotype

Contents of /PamVMC/include/PamVMCApplication.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Fri Jun 12 18:39:16 2009 UTC (15 years, 6 months ago) by pam-rm2
Branch: MAIN
CVS Tags: v1r0
Changes since 1.1: +14 -10 lines
File MIME type: text/plain
- Introduced user-defined names of output files and random seeds number.
Users can do it use options of PamVMCApplication constructor:
PamVMCApplication(const char* name,  const char *title, const char*
filename="pamtest", Int_t seed=0).
The Random object that I use is TRandom3 object which has astronomical
large period (in case of default initialization 0). All random generators
in the code use this object by calling of gRandom singleton which keeps
it.

- Corrected TOF digitization routine. No problems with TDC hits due to
hadronic interactions anymore.

- Some small changes was done to compile code under Root 5.23. +
geant4_vmc v. 2.6 without any warnings

- Some classes of PamG4RunConfiguartion was changed for geant4_vmc v.
2.6.Some obsolete classes was deleted as soon as developers implemented
regions.

- Navigation was changed from "geomRootToGeant4" to "geomRoot", because on
VMC web page written that as soon as Geant4 has no option ONLY/MANY
translation of overlapped geometry to Geant4 through VGM could be wrong.
I'd like to stay with Root navigation:
http://root.cern.ch/root/vmc/Geant4VMC.html. This should be default
option.

- New Tracker digitization routine written by Sergio was implemented

- PamVMC again became compatible with geant4_vmc v.2.5 and ROOT 5.20.
 The problem was that ROOT developers introduced in TVirtualMC class a new
method SetMagField and new base class:TVirtualMagField from which
user-defined classes shoukd be derived

1 // $Id: PamVMCApplication.h,v 1.0 2007/06/01
2 //
3 // Class PamVMCApplication
4 // -----------------------
5 // Implementation of the TVirtualMCApplication
6
7 #define PAMFIELD 1
8
9 #ifndef PAMVMC_APPLICATION_H
10 #define PAMVMC_APPLICATION_H
11
12 #include <TVirtualMCApplication.h>
13 #include <TMCVerbose.h>
14 #include <TRandom.h>
15
16 #include "PamVMCDetectorSD.h"
17
18 #include "PamVMCPrimaryGenerator.h"
19 #include "PamVMCDetector.h"
20 #include "PamVMCDetPamela.h"
21 #include "PamVMCFieldMgr.h"
22
23 #include "PamRootManager.h"
24 #include "PamVMCDetectorHit.h"
25 #include <TMap.h>
26
27
28 #ifdef PAMFIELD
29 #include "TrkParams.h"
30 #endif
31
32 //class PamVMCDetector;
33
34 class PamVMCStack;
35 //class PamVMCDetectorConstruction;
36 class PamVMCPrimaryGenerator;
37
38
39 class PamVMCDetPamela;
40
41 class PamVMCApplication : public TVirtualMCApplication
42 {
43 public:
44 PamVMCApplication(const char* name, const char *title, const char* filename="pamtest", Int_t seed=0);
45
46 virtual ~PamVMCApplication();
47
48 // static access method
49 static PamVMCApplication* Instance();
50
51 // methods
52 void InitMC(const char *setup);
53 void RunMC(Int_t nofEvents);
54 void AddIons();
55
56 virtual void ConstructGeometry();
57 virtual void InitGeometry();
58 virtual void GeneratePrimaries();
59 virtual void BeginEvent();
60 virtual void BeginPrimary();
61 virtual void PreTrack();
62 virtual void Stepping();
63 virtual void PostTrack();
64 virtual void FinishPrimary();
65 virtual void FinishEvent();
66 virtual void FinishRun();
67 #if ROOT_VERSION_CODE < 333572
68 virtual void Field(const Double_t* x, Double_t* b) const;
69 #endif
70 // set methods
71 void SetVerboseLevel(Int_t verboseLevel);
72
73 // get methods
74 PamVMCPrimaryGenerator* GetPrimaryGenerator() const;
75
76
77
78 private:
79
80 Bool_t IsInsideCavity();
81
82 // data members
83 Int_t fEventNo;
84 TMCVerbose fVerbose;
85 PamVMCStack* fStack;
86 PamVMCDetPamela* fdetector;
87 PamVMCPrimaryGenerator* fPrimaryGenerator;
88 PamRootManager fRootManager;
89 TRandom3* frandom;
90 fin fdstatus;
91
92
93
94
95
96
97 #ifdef PAMFIELD
98 // TrkLevel2 pamfield;
99 #endif
100 ClassDef(PamVMCApplication,1) //Interface to MonteCarlo application
101 };
102
103 // inline functions
104
105 inline PamVMCApplication* PamVMCApplication::Instance()
106 { return (PamVMCApplication*)(TVirtualMCApplication::Instance()); }
107
108 inline void PamVMCApplication::SetVerboseLevel(Int_t verboseLevel)
109 { fVerbose.SetLevel(verboseLevel); }
110
111 inline PamVMCPrimaryGenerator* PamVMCApplication::GetPrimaryGenerator() const
112 { return fPrimaryGenerator; }
113
114
115
116 #endif //PAMVMC_APPLICATION_H
117

  ViewVC Help
Powered by ViewVC 1.1.23