00001
00010 #include "ReactorFortran.hh"
00011 #include "ReactorConstants.hh"
00012 #include "ReactorEvent.hh"
00013 #include "ReactorDetector.hh"
00014 #include "ReactorXC.hh"
00015 #include "ReactorNtuple.hh"
00016 #include <iostream.h>
00017 #include <math.h>
00018 #include <string.h>
00019
00026 int main(){
00027
00028
00029
00030
00031
00032 int nevents = 100000;
00033 double rmaxgen=225;
00034 int fast=0;
00035 char* fileName="/local/data14/reactorfsim/cf252_pmtradon_100k.ntuple";
00036 char* ntName="event data";
00037
00038
00039
00040 int luxury = 2;
00041 int seed = 8796896;
00042 int k1=0;
00043 int k2=0;
00044 rluxgo_(luxury,seed,k1,k2);
00045
00046
00047
00048 hbook_init__();
00049
00050 int iostat;
00051 int ntLun=99;
00052 int ntBuf=1024;
00053 char* dirName = "TEST";
00054 char* chopt = "N";
00055 hropen_(ntLun,dirName,fileName,chopt,ntBuf,iostat,
00056 strlen(dirName),strlen(fileName),strlen(chopt));
00057
00058
00059
00060
00061
00062 ReactorDetector DetectorA;
00063 DetectorA.SetParam_FastNeutronOption(fast);
00064 DetectorA.SetParam_R0(175);
00065 DetectorA.SetParam_R1(200);
00066 DetectorA.SetParam_R2(275);
00067 ReactorNtuple ModelA(1,"model A",dirName);
00068
00069
00070
00071 for (int events = 0;events<nevents;events++){
00072
00073
00074
00075 ReactorEvent Event(nevents,rmaxgen);
00076
00077
00078
00079 DetectorA.LightsOut(Event);
00080 ModelA.Fill(Event,DetectorA);
00081
00082 }
00083
00084
00085
00086 hldir_(" "," ",strlen(" "),strlen(" "));
00087 char dirName2[strlen(dirName)+2];
00088 *dirName2='\0';
00089 strcat(dirName2,"//");
00090 strcat(dirName2,dirName);
00091 hcdir_(dirName2," ",strlen(dirName2),strlen(" "));
00092 int outopt = 0;
00093 int icycle;
00094 hrout_(outopt,icycle," ",strlen(" "));
00095 hrend_(dirName,strlen(dirName));
00096 }