00001 #ifndef REACTOREVENT_HH
00002 #define REACTOREVENT_HH
00003 #include <math.h>
00004 #include <iostream.h>
00005 #include "ReactorConstants.hh"
00006
00007
00008 class ReactorEvent{
00009
00010 public:
00011
00012 ReactorEvent(double newRmaxgen=k.Rmaxgen,
00013 double newEmin=k.Emin,
00014 double newEmax=k.Emax,
00015 int newXCorder=k.XCorder);
00016 ~ReactorEvent();
00017 ReactorEvent(const ReactorEvent& Event);
00018 ReactorEvent& operator=(const ReactorEvent& rhs);
00019
00020
00021
00022 double XCReweight();
00023 double XCReweight(double Enu);
00024 double XCReweight(ReactorEvent& Event);
00025
00026 double GetXCWeight() const {return XCWeight;}
00027 double GetFluxWeight() const {return FluxWeight;}
00028 double GetEnu() const {return Pnubar[0];}
00029 double GetPositronKE() const {return Ppositron[4];}
00030 double GetPositronCosTheta() const {return Ppositron[3]/Ppositron[5];}
00031 double GetPositronPhi() const {return atan2(Ppositron[2],Ppositron[1]);}
00032 double* const GetPositronPxyz(){return Ppositron+1;}
00033 double GetNeutronKE()const {return Pneutron[4];}
00034 double GetNeutronCosTheta() const {return Pneutron[3]/Pneutron[5];}
00035 double GetNeutronPhi() const {return atan2(Pneutron[2],Pneutron[1]);}
00036 double* const GetNeutronPxyz(){return Pneutron+1;}
00037
00038 double GetNubarTime() const {return Rnubar[0];}
00039 double GetPositronTime() const {return Rpositron[0];}
00040 double GetNeutronTime() const {return Rneutron[0];}
00041 double GetNubarVertexR() const {return Rnubar[4];}
00042 double GetNubarVertexCosTheta() const {return Rnubar[5];}
00043 double GetNubarVertexPhi() const {return Rnubar[6];}
00044 double* const GetNubarVertexXYZ() {return Rnubar+1;}
00045 double GetPositronVertexR() const {return Rpositron[4];}
00046 double GetPositronVertexCosTheta() const {return Rpositron[5];}
00047 double GetPositronVertexPhi() const {return Rpositron[6];}
00048 double* const GetPositronVertexXYZ() {return Rpositron+1;}
00049 double GetNeutronVertexR() const {return Rneutron[4];}
00050 double GetNeutronVertexCosTheta() const {return Rneutron[5];}
00051 double GetNeutronVertexPhi() const {return Rneutron[6];}
00052 double* const GetNeutronVertexXYZ() {return Rneutron+1;}
00053
00054 void SetPositronVertex(double* rpos){
00055 for(int i=0;i<Rdim;i++)Rpositron[i]=*(rpos+i);}
00056 void SetNeutronVertex(double* rneu){
00057 for(int i=0;i<Rdim;i++)Rneutron[i]=*(rneu+i);}
00058
00059 private:
00060
00061 static ReactorConstants k;
00062
00063 int XCorder;
00064 double Emin;
00065 double Emax;
00066 double Rmaxgen;
00067
00068 double XCWeight;
00069 double FluxWeight;
00070
00071 static const int Pdim = 6;
00072 double Pnubar[Pdim];
00073 double Pneutron[Pdim];
00074 double Ppositron[Pdim];
00075
00076 static const int Rdim = 7;
00077 double Rnubar[Rdim];
00078 double Rneutron[Rdim];
00079 double Rpositron[Rdim];
00080 };
00081 #endif