]>
Commit | Line | Data |
---|---|---|
06f630bb | 1 | void run_all(int id=0, int end=50, int pro=0, int icut=0, int itrig=0){ |
2 | ||
3 | gStyle->SetPalette(1); | |
4 | gStyle->SetOptStat(0); | |
5 | gStyle->SetOptFit(111111); | |
6 | gStyle->SetOptFit(0); | |
7 | gStyle->SetOptTitle(0); | |
8 | //gStyle->SetFillColor(10); | |
9 | gStyle->SetCanvasColor(10); | |
10 | gStyle->SetFrameBorderMode(0); | |
11 | gStyle->SetFrameFillColor(0); | |
12 | gStyle->SetCanvasColor(0); | |
13 | gStyle->SetPadBorderSize(0); | |
14 | gStyle->SetCanvasBorderSize(0); | |
15 | //gStyle->SetPadLeftMargin(0.15); | |
16 | gStyle->SetPadLeftMargin(0.125); | |
17 | gStyle->SetPadBottomMargin(0.125); | |
18 | gStyle->SetPadTopMargin(0.1); | |
19 | gStyle->SetTitleYOffset(1.3); | |
20 | //gStyle->SetPadLeftMargin(0.1); | |
21 | cout<<"physics is always fun! "<<endl; | |
22 | ||
23 | ||
24 | gSystem->Load("libCore");// no | |
25 | gSystem->Load("libTree"); | |
26 | gSystem->Load("libGeom"); | |
27 | gSystem->Load("libVMC"); | |
28 | gSystem->Load("libXMLIO");// no | |
29 | gSystem->Load("libPhysics"); | |
30 | gSystem->Load("libXMLParser"); | |
31 | gSystem->Load("libProof"); | |
32 | gSystem->Load("libMinuit"); | |
33 | ||
34 | ||
b0635849 | 35 | gSystem->Load("libana_sgl"); |
06f630bb | 36 | ana_sgl *ana=new ana_sgl(); |
37 | ||
38 | char outputname[100]; | |
39 | sprintf(outputname,"ntpair_rev2_%d_seg%d_%d_cut%d_trig%d_v2.root", pro, id,end, icut, itrig); | |
40 | ||
41 | ||
42 | ana->ana_init(outputname); | |
43 | ||
44 | //ana->set_tof_cuts(-3,3); | |
45 | //ana->enable_pair_emc_cut(0.7, 1.3); | |
46 | //ana->enable_pait_pt_cut(0.4, 20); | |
47 | ||
48 | if(pro==1){ | |
49 | ana->set_veto_for_proton(-2, 3.5); | |
50 | ana->set_veto_for_kaon(-2, 3.5); | |
51 | } | |
52 | ||
53 | //0->MB, 1->SemiCent, 2-->Cent | |
54 | if(itrig==0){ | |
55 | ana->select_trigger(2); | |
56 | }else if(itrig==1){ | |
57 | ana->select_trigger(1); | |
58 | } | |
59 | ||
60 | if(icut==0){ | |
61 | ana->reject_conversion(true); | |
62 | //ana->set_tpc_dedx_cuts(75, 90); | |
63 | ana->set_tpc_dedx_cuts(65, 90); | |
64 | ana->enable_pair_phiv_cut(0.6); | |
65 | }else if(icut==1){ | |
66 | //ana->reject_conversion(true); | |
67 | //ana->set_tpc_dedx_cuts(80, 85); | |
68 | //ana->set_tpc_dedx_cuts(68, 75); | |
69 | ana->set_tpc_dedx_cuts(65, 90); | |
70 | ana->enable_pair_phiv_cut(0.6); | |
71 | }else if(icut==2){ | |
72 | ana->reject_conversion(true); | |
73 | ana->set_tpc_dedx_cuts(75, 90); | |
74 | ana->enable_pair_phiv_cut(0.6); | |
75 | }else if(icut==3){ | |
76 | ana->reject_conversion(true); | |
77 | ana->set_tpc_dedx_cuts(80, 85); | |
78 | ana->enable_pair_phiv_cut(0.6); | |
79 | } | |
80 | ||
81 | ana->print_cuts(); | |
82 | ||
83 | if(pro==0){ | |
84 | ifstream f("list_rev1_0.all"); | |
85 | int nline = 1418; | |
86 | }else if(pro==1){ | |
87 | ifstream f("list_rev2_6.all"); | |
88 | int nline = 50; | |
89 | }else if(pro==2){ | |
90 | ifstream f("list_rev2_7.all"); | |
91 | int nline = 50; | |
92 | } | |
93 | ||
94 | ||
95 | char inputfilename[100]; | |
96 | for(int i=0;i<nline;i++){ | |
97 | f >> inputfilename; | |
98 | if(i>=id && i<end){ | |
99 | sprintf(inputfilename,"%s",inputfilename); | |
100 | ana->loop_a_file(inputfilename); | |
101 | cout<<" end of run : "<<i<<endl; | |
102 | } | |
103 | } | |
104 | ||
105 | ana->ana_end(); | |
106 | ||
107 | } | |
108 |