source: JEM-EUSO/esaf_lal/trunk/esaf/packages/simulation/detector/G4Detector/optics/include/OptUserStackingAction.hh @ 16

Last change on this file since 16 was 16, checked in by moretto, 11 years ago

Initial import of the january version of esaf

File size: 2.3 KB
Line 
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"
12class PhotonsOnPupil;
13class Photon;
14class G4ParticleDefinition;
15class IdealFocalSurface;
16class FocalPlane;
17class EEvent;
18class EVector;
19class G4Track;
20class G4Event;
21class G4TrackInformation;
22class ListPhotonsOnPupil;
23class OptUserStackingAction : public G4UserStackingAction, public G4UserTrackingAction, public G4UserEventAction, public EsafMsgSource, public VirtualTelParm  {
24public:
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
47private:
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
Note: See TracBrowser for help on using the repository browser.