00001
00002
00003
00004
00005
00006
00007
00008 #ifndef EventHeaderSvc_h
00009 #define EventHeaderSvc_h 1
00010
00011 #include "myglobals.hh"
00012 #include <string>
00013
00014 class G4Event;
00015 class PrimaryGeneratorAction;
00016
00017 class EventHeaderSvc
00018 {
00019 public:
00020 EventHeaderSvc();
00021 ~EventHeaderSvc();
00022
00023 static EventHeaderSvc* GetEventHeaderSvc();
00024
00025 void SetBranch();
00026
00027 void ReadOutputCard(G4String filename);
00028
00029 void SetValue(const G4Event* evt, int runNb = 0, double w = 1);
00030
00031 void SetSeedsValue();
00032
00033 void SetInitialMomentum(double, double, double);
00034 void SetInitialPosition(double x, double y, double z){ix=x;iy=y;iz=z;}
00035 void SetInitialParticle(const std::string& name){i_particleName=name;}
00036
00037
00038 void set_run_num(int val){run_num = val;};
00039 void set_evt_num(int val){evt_num = val;};
00040 void set_R0(double val){R0 = val;};
00041 void set_R1(double val){R1 = val;};
00042 void set_weight(double val){weight = val;};
00043
00044 int get_R0(){return R0;};
00045 int get_R1(){return R1;};
00046
00047 private:
00048
00049 void ReSet();
00050
00051 void ShowOutCard();
00052
00053 static EventHeaderSvc* fEventHeaderSvc;
00054
00055 int run_num;
00056 int evt_num;
00057 int R0;
00058 int R1;
00059 double ipx, ipy, ipz;
00060 double ix, iy, iz;
00061 double weight;
00062 std::string i_particleName;
00063
00064 bool flag_run_num;
00065 bool flag_evt_num;
00066 bool flag_R0;
00067 bool flag_R1;
00068 bool flag_ipx;
00069 bool flag_ipy;
00070 bool flag_ipz;
00071 bool flag_position;
00072 bool flag_pid;
00073 bool flag_weight;
00074
00075 PrimaryGeneratorAction* pPrimaryGeneratorAction;
00076 };
00077
00078 #endif
00079