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