1 |
// $Id: PamVMCApplication.h,v 1.0 2007/06/01 |
2 |
// |
3 |
// Class PamVMCApplication |
4 |
// ----------------------- |
5 |
// Implementation of the TVirtualMCApplication |
6 |
|
7 |
#ifndef PAMVMC_APPLICATION_H |
8 |
#define PAMVMC_APPLICATION_H |
9 |
|
10 |
#include <TVirtualMCApplication.h> |
11 |
#include "TMCVerbose.h" |
12 |
|
13 |
|
14 |
class PamVMCStack; |
15 |
class PamVMCDetectorConstruction; |
16 |
class PamVMCPrimaryGenerator; |
17 |
|
18 |
class PamVMCApplication : public TVirtualMCApplication |
19 |
{ |
20 |
public: |
21 |
PamVMCApplication(const char* name, const char *title); |
22 |
PamVMCApplication(); |
23 |
virtual ~PamVMCApplication(); |
24 |
|
25 |
// static access method |
26 |
static PamVMCApplication* Instance(); |
27 |
|
28 |
// methods |
29 |
void InitMC(const char *setup); |
30 |
void RunMC(Int_t nofEvents); |
31 |
|
32 |
virtual void ConstructGeometry(); |
33 |
virtual void InitGeometry(); |
34 |
virtual void GeneratePrimaries(); |
35 |
virtual void BeginEvent(); |
36 |
virtual void BeginPrimary(); |
37 |
virtual void PreTrack(); |
38 |
virtual void Stepping(); |
39 |
virtual void PostTrack(); |
40 |
virtual void FinishPrimary(); |
41 |
virtual void FinishEvent(); |
42 |
virtual void Field(const Double_t* x, Double_t* b) const; |
43 |
|
44 |
// set methods |
45 |
void SetVerboseLevel(Int_t verboseLevel); |
46 |
|
47 |
// get methods |
48 |
PamVMCPrimaryGenerator* GetPrimaryGenerator() const; |
49 |
|
50 |
|
51 |
private: |
52 |
// methods |
53 |
void RegisterStack(); |
54 |
|
55 |
// data members |
56 |
Int_t fEventNo; |
57 |
|
58 |
TMCVerbose fVerbose; |
59 |
PamVMCStack* fStack; |
60 |
PamVMCDetectorConstruction* fDetConstruction; |
61 |
PamVMCPrimaryGenerator* fPrimaryGenerator; |
62 |
|
63 |
ClassDef(PamVMCApplication,1) //Interface to MonteCarlo application |
64 |
}; |
65 |
|
66 |
// inline functions |
67 |
|
68 |
inline PamVMCApplication* PamVMCApplication::Instance() |
69 |
{ return (PamVMCApplication*)(TVirtualMCApplication::Instance()); } |
70 |
|
71 |
inline void PamVMCApplication::SetVerboseLevel(Int_t verboseLevel) |
72 |
{ fVerbose.SetLevel(verboseLevel); } |
73 |
|
74 |
inline PamVMCPrimaryGenerator* PamVMCApplication::GetPrimaryGenerator() const |
75 |
{ return fPrimaryGenerator; } |
76 |
|
77 |
|
78 |
#endif //PAMVMC_APPLICATION_H |
79 |
|