]>
Commit | Line | Data |
---|---|---|
a6fbea2b | 1 | //#define VERBOSEARGS |
2 | ||
3 | { | |
4 | // set job and simulation variables as : | |
5 | // root run.C --run <x> --event <y> --process <proc> --minhard <min> --maxhard <max> --minpt <minpt> | |
6 | ||
7 | int nrun = 0; | |
8 | int nevent = 0; | |
9 | int seed = 0; | |
10 | ||
11 | char sseed[1024]; | |
12 | char srun[1024]; | |
13 | char sevent[1024]; | |
14 | char sprocess[1024]; | |
15 | char sminpthard[1024]; | |
16 | char smaxpthard[1024]; | |
17 | char sminptgammapi0[1024]; | |
18 | char squench[1024]; | |
19 | char sqhat[1024]; | |
20 | ||
21 | sprintf(srun,""); | |
22 | sprintf(sevent,""); | |
23 | sprintf(sprocess,""); | |
24 | sprintf(sminpthard,""); | |
25 | sprintf(smaxpthard,""); | |
26 | sprintf(sminptgammapi0,""); | |
27 | sprintf(squench,""); | |
28 | sprintf(sqhat,""); | |
29 | ||
30 | for (int i=0; i< gApplication->Argc();i++){ | |
31 | #ifdef VERBOSEARGS | |
32 | printf("Arg %d: %s\n",i,gApplication->Argv(i)); | |
33 | #endif | |
34 | if (!(strcmp(gApplication->Argv(i),"--run"))) | |
35 | nrun = atoi(gApplication->Argv(i+1)); | |
36 | sprintf(srun,"%d",nrun); | |
37 | if (!(strcmp(gApplication->Argv(i),"--event"))) | |
38 | nevent = atoi(gApplication->Argv(i+1)); | |
39 | sprintf(sevent,"%d",nevent); | |
40 | ||
41 | if (!(strcmp(gApplication->Argv(i),"--process"))) | |
42 | sprintf(sprocess, gApplication->Argv(i+1)); | |
43 | ||
44 | if (!(strcmp(gApplication->Argv(i),"--minhard"))) | |
45 | sprintf(sminpthard,gApplication->Argv(i+1)); | |
46 | ||
47 | if (!(strcmp(gApplication->Argv(i),"--maxhard"))) | |
48 | sprintf(smaxpthard,gApplication->Argv(i+1)); | |
49 | ||
50 | if (!(strcmp(gApplication->Argv(i),"--minpt"))) | |
51 | sprintf(sminptgammapi0,gApplication->Argv(i+1)); | |
52 | ||
53 | if (!(strcmp(gApplication->Argv(i),"--quench"))) | |
54 | sprintf(squench,gApplication->Argv(i+1)); | |
55 | ||
56 | if (!(strcmp(gApplication->Argv(i),"--qhat"))) | |
57 | sprintf(sqhat,gApplication->Argv(i+1)); | |
58 | ||
59 | } | |
a6fbea2b | 60 | |
61 | seed = nrun * 100000 + nevent; | |
62 | sprintf(sseed,"%d",seed); | |
63 | ||
64 | if (seed==0) { | |
65 | fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); | |
66 | fprintf(stderr,"!!!! WARNING! Seeding variable for MC is 0 !!!!\n"); | |
67 | fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); | |
68 | } else { | |
69 | fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); | |
70 | fprintf(stdout,"!!! MC Seed is %d \n",seed); | |
71 | fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); | |
72 | } | |
73 | ||
74 | // set the seed environment variable | |
75 | gSystem->Setenv("CONFIG_SEED",sseed); | |
76 | gSystem->Setenv("DC_RUN",srun); | |
77 | gSystem->Setenv("DC_EVENT",sevent); | |
78 | gSystem->Setenv("DC_RUN_TYPE",sprocess);//"kPyGammaJetPHOS"); | |
79 | gSystem->Setenv("PTHARDMIN",sminpthard);//"20"); | |
80 | gSystem->Setenv("PTHARDMAX",smaxpthard);//"30"); | |
81 | ||
82 | gSystem->Setenv("PTGAMMAPI0MIN",sminptgammapi0);//"1"); | |
83 | gSystem->Setenv("QUENCHING",squench); | |
84 | gSystem->Setenv("QHAT",sqhat); | |
85 | ||
86 | ||
87 | gSystem->Setenv("ECMS","14000"); | |
88 | gSystem->Setenv("ALIMDC_RAWDB1","./mdc1"); | |
89 | gSystem->Setenv("ALIMDC_RAWDB2","./mdc2"); | |
90 | gSystem->Setenv("ALIMDC_TAGDB","./mdc1/tag"); | |
91 | gSystem->Setenv("ALIMDC_RUNDB","./mdc1/meta"); | |
92 | cout<< "SIMRUN:: Run " << gSystem->Getenv("DC_RUN") << " Event " << gSystem->Getenv("DC_EVENT") | |
93 | << " Process " << gSystem->Getenv("DC_RUN_TYPE") | |
94 | << " minpthard " << gSystem->Getenv("PTHARDMIN") | |
95 | << " maxpthard " << gSystem->Getenv("PTHARDMAX") | |
96 | << " minpt " << gSystem->Getenv("PTGAMMAPI0MIN") | |
97 | << endl; | |
98 | //gSystem->Exec("cp $ROOTSYS/etc/system.rootrc .rootrc"); | |
99 | cout<<">>>>> SIMULATION <<<<<"<<endl; | |
100 | gSystem->Exec("aliroot -b -q sim.C > sim.log 2>&1"); | |
69c4e539 | 101 | cout<<">>>>> SIMULATION QA <<<<<"<<endl; |
a002cebe | 102 | gSystem->Exec("aliroot -b -q simqa.C > simqa.log 2>&1"); |
a6fbea2b | 103 | cout<<">>>>> RECONSTRUCTION <<<<<"<<endl; |
1921ef1f | 104 | gSystem->Exec("rm galice.root"); |
105 | gSystem->Exec("Aliroot -b -q rec.C > rec.log 2>&1"); | |
69c4e539 | 106 | cout<<">>>>> RECONSTRUCTION QA <<<<<"<<endl; |
a002cebe | 107 | gSystem->Exec("aliroot -b -q recqa.C > recqa.log 2>&1"); |
a6fbea2b | 108 | cout<<">>>>> TAG <<<<<"<<endl; |
a002cebe | 109 | if( gSystem->Getenv("ALIEN_JDL_OUTPUTDIR")) |
110 | gSystem->Exec("aliroot -b -q tag.C > tag.log 2>&1"); | |
a6fbea2b | 111 | cout<<">>>>> CHECK ESD <<<<<"<<endl; |
112 | gSystem->Exec("aliroot -b -q CheckESD.C > check.log 2>&1"); | |
113 | ||
114 | } |