1 | #ifndef OptUserStackingAction_h |
---|
2 | #define OptUserStackingAction_h 1 |
---|
3 | #include "OptSteppingAction.hh" |
---|
4 | |
---|
5 | #include <G4UserStackingAction.hh> |
---|
6 | #include <G4ThreeVector.hh> |
---|
7 | #include <G4UserTrackingAction.hh> |
---|
8 | #include <G4UserEventAction.hh> |
---|
9 | |
---|
10 | #include "EsafMsgSource.hh" |
---|
11 | #include "VirtualTelParm.hh" |
---|
12 | class PhotonsOnPupil; |
---|
13 | class Photon; |
---|
14 | class G4ParticleDefinition; |
---|
15 | class IdealFocalSurface; |
---|
16 | class FocalPlane; |
---|
17 | class EEvent; |
---|
18 | class EVector; |
---|
19 | class G4Track; |
---|
20 | class G4Event; |
---|
21 | class G4TrackInformation; |
---|
22 | class ListPhotonsOnPupil; |
---|
23 | class OptUserStackingAction : public G4UserStackingAction, public G4UserTrackingAction, public G4UserEventAction, public EsafMsgSource, public VirtualTelParm { |
---|
24 | public: |
---|
25 | OptUserStackingAction(IdealFocalSurface* fs); |
---|
26 | ~OptUserStackingAction(); |
---|
27 | |
---|
28 | virtual void PreUserTrackingAction(const G4Track*); |
---|
29 | virtual void PostUserTrackingAction(const G4Track*); |
---|
30 | virtual void BeginOfEventAction(const G4Event* anEvent); |
---|
31 | virtual void EndOfEventAction(const G4Event* anEvent); |
---|
32 | |
---|
33 | G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack); |
---|
34 | void NewStage(); |
---|
35 | void PrepareNewEvent(); |
---|
36 | void SetPupil(PhotonsOnPupil*); |
---|
37 | void SetNmax(int m) { fNmax=m; } |
---|
38 | void Progress(int, const char*); |
---|
39 | //Photon* GetCurrentPhoton() { return fCurrentPhoton; } |
---|
40 | Photon* UpdateCurrentPhoton(G4Track*); |
---|
41 | |
---|
42 | double GetTimeFirst(){return fTimeFirstPhoton;} |
---|
43 | double GetTimeLast() {return fTimeLastPhoton;} |
---|
44 | void SetTrackHistory(int hist){fTrackHistory=hist;} |
---|
45 | OptSteppingAction* stepping; |
---|
46 | |
---|
47 | private: |
---|
48 | |
---|
49 | bool GoToElectronics(Photon*); |
---|
50 | void Reset(); |
---|
51 | EVector NewInteractionPoint(const Photon *p, double DZ) const; |
---|
52 | G4Track* NewPhoton(Photon*,int,int n=0); |
---|
53 | void CheckTrace(int id,const G4ThreeVector& pos,const G4ThreeVector& mom,double lambda,double time); |
---|
54 | |
---|
55 | G4ParticleDefinition* fPhotonDef; |
---|
56 | |
---|
57 | PhotonsOnPupil* fPupil; |
---|
58 | |
---|
59 | FocalPlane *fFocalPlane; |
---|
60 | IdealFocalSurface* fIdealFocalSurface; |
---|
61 | EEvent* fEv; |
---|
62 | |
---|
63 | float fHuge; |
---|
64 | double fTimeFirstPhoton; |
---|
65 | double fTimeLastPhoton; |
---|
66 | |
---|
67 | int fNTracked; |
---|
68 | int fNG4Tracked; |
---|
69 | int fNmax; |
---|
70 | int fNTotal; |
---|
71 | int fNG4focalplane; |
---|
72 | int fNfocalplane; |
---|
73 | int fNlost; |
---|
74 | int fNoptics; |
---|
75 | int fProgress; |
---|
76 | int fTrackHistory; |
---|
77 | int forigin; |
---|
78 | bool ftus; |
---|
79 | ListPhotonsOnPupil* fPhOnPupil; |
---|
80 | }; |
---|
81 | |
---|
82 | #endif |
---|