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