4 // set job and simulation variables as :
5 // root.exe -b -q simrun.C --run <x> --event <y> --process <kPythia6/kPhojet> --field <kNoField/k5kG> --energy <900/10000>
24 for (int i=0; i< gApplication->Argc();i++){
26 printf("Arg %d: %s\n",i,gApplication->Argv(i));
28 if (!(strcmp(gApplication->Argv(i),"--run")))
29 nrun = atoi(gApplication->Argv(i+1));
30 sprintf(srun,"%d",nrun);
32 if (!(strcmp(gApplication->Argv(i),"--event")))
33 nevent = atoi(gApplication->Argv(i+1));
34 sprintf(sevent,"%d",nevent);
36 if (!(strcmp(gApplication->Argv(i),"--process")))
37 sprintf(sprocess, gApplication->Argv(i+1));
39 if (!(strcmp(gApplication->Argv(i),"--field")))
40 sprintf(sfield,gApplication->Argv(i+1));
42 if (!(strcmp(gApplication->Argv(i),"--energy")))
43 sprintf(senergy,gApplication->Argv(i+1));
47 seed = nrun * 100000 + nevent;
48 sprintf(sseed,"%d",seed);
51 fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
52 fprintf(stderr,"!!!! WARNING! Seeding variable for MC is 0 !!!!\n");
53 fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
55 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
56 fprintf(stdout,"!!! MC Seed is %d \n",seed);
57 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
60 // set the seed environment variable
61 gSystem->Setenv("CONFIG_SEED",sseed);
62 gSystem->Setenv("CONFIG_RUN_TYPE",sprocess); // kPythia6 or kPhojet
63 gSystem->Setenv("CONFIG_FIELD",sfield); // kNoField or k5kG
64 gSystem->Setenv("CONFIG_ENERGY",senergy); // 900 or 10000 (GeV)
65 gSystem->Setenv("DC_RUN",srun); // Not used in Config.C
66 gSystem->Setenv("DC_EVENT",sevent); // Not used in Config.C
68 // Needed to produce simulated RAW data
69 gSystem->Setenv("ALIMDC_RAWDB1","./mdc1");
70 gSystem->Setenv("ALIMDC_RAWDB2","./mdc2");
71 gSystem->Setenv("ALIMDC_TAGDB","./mdc1/tag");
72 gSystem->Setenv("ALIMDC_RUNDB","./mdc1/meta");
73 cout<< "SIMRUN:: Run " << gSystem->Getenv("DC_RUN") << " Event " << gSystem->Getenv("DC_EVENT")
74 << " Generator " << gSystem->Getenv("CONFIG_RUN_TYPE")
75 << " Field " << gSystem->Getenv("CONFIG_FIELD")
76 << " Energy " << gSystem->Getenv("CONFIG_ENERGY")
79 cout<<">>>>> SIMULATION <<<<<"<<endl;
80 gSystem->Exec("aliroot -b -q sim.C > sim.log 2>&1");
81 cout<<">>>>> RECONSTRUCTION <<<<<"<<endl;
82 gSystem->Exec("aliroot -b -q rec.C > rec.log 2>&1");
83 cout<<">>>>> TAG <<<<<"<<endl;
84 gSystem->Exec("aliroot -b -q tag.C > tag.log 2>&1");
85 cout<<">>>>> CHECK ESD <<<<<"<<endl;
86 gSystem->Exec("aliroot -b -q CheckESD.C > check.log 2>&1");
87 cout<<">>>>> AOD <<<<<"<<endl;
88 gSystem->Exec("aliroot -b -q CreateAODfromESD.C > aod.log 2>&1");