4 // set job and simulation variables as :
5 // --run <x> --event <y> --bmin <min> --bmax <max> --quench <quench> --qhat <shad> --etamin <etamin> --etamax <etamax> --phimin <phimin> --phimax <phimax>
6 // root simrun.C --run 1 --event 10 --bmin 0 --bmax 3 --quench 1 --qhat 1 --etamin -2 --etamax 2 --phimin 0 --phimax 6.283185
12 // float minpthard = -1;
13 // float maxpthard = -1;
14 // float minptgammapi0 = 1;
40 for (int i=0; i< gApplication->Argc();i++){
42 printf("Arg %d: %s\n",i,gApplication->Argv(i));
44 if (!(strcmp(gApplication->Argv(i),"--run")))
45 nrun = atoi(gApplication->Argv(i+1));
46 sprintf(srun,"%d",nrun);
47 if (!(strcmp(gApplication->Argv(i),"--event")))
48 nevent = atoi(gApplication->Argv(i+1));
49 sprintf(sevent,"%d",nevent);
51 if (!(strcmp(gApplication->Argv(i),"--bmin")))
52 sprintf(sbmin,gApplication->Argv(i+1));
54 if (!(strcmp(gApplication->Argv(i),"--bmax")))
55 sprintf(sbmax,gApplication->Argv(i+1));
57 if (!(strcmp(gApplication->Argv(i),"--etamin")))
58 sprintf(setamin,gApplication->Argv(i+1));
60 if (!(strcmp(gApplication->Argv(i),"--etamax")))
61 sprintf(setamax,gApplication->Argv(i+1));
63 if (!(strcmp(gApplication->Argv(i),"--phimin")))
64 sprintf(sphimin,gApplication->Argv(i+1));
66 if (!(strcmp(gApplication->Argv(i),"--phimax")))
67 sprintf(sphimax,gApplication->Argv(i+1));
69 if (!(strcmp(gApplication->Argv(i),"--quench")))
70 sprintf(squench,gApplication->Argv(i+1));
72 if (!(strcmp(gApplication->Argv(i),"--qhat")))
73 sprintf(sqhat,gApplication->Argv(i+1));
77 seed = nrun * 100000 + nevent;
78 sprintf(sseed,"%d",seed);
81 fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
82 fprintf(stderr,"!!!! WARNING! Seeding variable for MC is 0 !!!!\n");
83 fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
85 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
86 fprintf(stdout,"!!! MC Seed is %d \n",seed);
87 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
90 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
91 fprintf(stdout,"!!! Run is %d \n",nrun);
92 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
94 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
95 fprintf(stdout,"!!! Event is %d \n",nevent);
96 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
98 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
99 fprintf(stdout,"!!! b min is %s \n",sbmin);
100 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
102 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
103 fprintf(stdout,"!!! bmax is %s \n",sbmax);
104 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
106 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
107 fprintf(stdout,"!!! eta min is %s \n",setamin);
108 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
110 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
111 fprintf(stdout,"!!! eta max is %s \n",setamax);
112 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
114 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
115 fprintf(stdout,"!!! phi min is %s \n",sphimin);
116 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
118 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
119 fprintf(stdout,"!!! phi max is %s \n",sphimax);
120 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
122 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
123 fprintf(stdout,"!!! Quenching is %s \n",squench);
124 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
126 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
127 fprintf(stdout,"!!! Shadowing is %s \n",sqhat);
128 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
131 // set the seed environment variable
132 gSystem->Setenv("CONFIG_SEED",sseed);
133 gSystem->Setenv("DC_RUN",srun);
134 gSystem->Setenv("DC_EVENT",sevent);
135 gSystem->Setenv("CONFIG_BMIN",sbmin);//"20");
136 gSystem->Setenv("CONFIG_BMAX",sbmax);//"30");
137 gSystem->Setenv("QUENCH",squench);
138 gSystem->Setenv("QHAT",sqhat);
139 gSystem->Setenv("CONFIG_ETAMIN",setamin);//"20");
140 gSystem->Setenv("CONFIG_ETAMAX",setamax);//"30");
141 gSystem->Setenv("CONFIG_PHIMIN",sphimin);//"20");
142 gSystem->Setenv("CONFIG_PHIMAX",sphimax);//"30");
143 // gSystem->Exec("cp $ROOTSYS/etc/system.rootrc .rootrc");
144 cout << ">>>>>> SIMULATION <<<<<<" << endl;
145 gSystem->Exec("aliroot -b -q \"sim.C(2)\" > sim.log 2>&1");
146 cout << ">>>>>> RECONSTRUCTION <<<<<<" << endl;
147 gSystem->Exec("aliroot -b -q rec.C > rec.log 2>&1");
148 cout << ">>>>>> TAG <<<<<<" << endl;
149 gSystem->Exec("aliroot -b -q tag.C > tag.log 2>&1");
150 cout << ">>>>>> CHECK ESD <<<<<<" << endl;
151 gSystem->Exec("aliroot -b -q CheckESD.C > check.log 2>&1");