ROOT logo
void run_all(int id=0, int end=50, int pro=0, int icut=0, int itrig=0){

  gStyle->SetPalette(1);
  gStyle->SetOptStat(0);
  gStyle->SetOptFit(111111);
  gStyle->SetOptFit(0);
  gStyle->SetOptTitle(0);
  //gStyle->SetFillColor(10);
  gStyle->SetCanvasColor(10);
  gStyle->SetFrameBorderMode(0);
  gStyle->SetFrameFillColor(0);
  gStyle->SetCanvasColor(0);
  gStyle->SetPadBorderSize(0);
  gStyle->SetCanvasBorderSize(0);
  //gStyle->SetPadLeftMargin(0.15);
  gStyle->SetPadLeftMargin(0.125);
  gStyle->SetPadBottomMargin(0.125);
  gStyle->SetPadTopMargin(0.1);
  gStyle->SetTitleYOffset(1.3);
  //gStyle->SetPadLeftMargin(0.1);
  cout<<"physics is always fun! "<<endl; 


  gSystem->Load("libCore");// no
  gSystem->Load("libTree");
  gSystem->Load("libGeom");
  gSystem->Load("libVMC");
  gSystem->Load("libXMLIO");// no
  gSystem->Load("libPhysics");
  gSystem->Load("libXMLParser");
  gSystem->Load("libProof");
  gSystem->Load("libMinuit");


  gSystem->Load("libana_sgl.so");
  ana_sgl *ana=new ana_sgl();

  char outputname[100];
  sprintf(outputname,"ntpair_rev2_%d_seg%d_%d_cut%d_trig%d_v2.root", pro, id,end, icut, itrig);


  ana->ana_init(outputname);

 //ana->set_tof_cuts(-3,3);
  //ana->enable_pair_emc_cut(0.7, 1.3);
  //ana->enable_pait_pt_cut(0.4, 20);

  if(pro==1){
    ana->set_veto_for_proton(-2, 3.5);
    ana->set_veto_for_kaon(-2, 3.5);
  }

  //0->MB, 1->SemiCent, 2-->Cent
  if(itrig==0){
    ana->select_trigger(2);
  }else if(itrig==1){
    ana->select_trigger(1);
  }

  if(icut==0){
    ana->reject_conversion(true);
    //ana->set_tpc_dedx_cuts(75, 90);
    ana->set_tpc_dedx_cuts(65, 90);
    ana->enable_pair_phiv_cut(0.6);
  }else if(icut==1){
    //ana->reject_conversion(true);
    //ana->set_tpc_dedx_cuts(80, 85);
    //ana->set_tpc_dedx_cuts(68, 75);
    ana->set_tpc_dedx_cuts(65, 90);
    ana->enable_pair_phiv_cut(0.6);
  }else if(icut==2){
    ana->reject_conversion(true);
    ana->set_tpc_dedx_cuts(75, 90);
    ana->enable_pair_phiv_cut(0.6);
  }else if(icut==3){
    ana->reject_conversion(true);
    ana->set_tpc_dedx_cuts(80, 85);
    ana->enable_pair_phiv_cut(0.6);
  }

  ana->print_cuts();

  if(pro==0){
    ifstream f("list_rev1_0.all");
    int nline = 1418;
  }else if(pro==1){
    ifstream f("list_rev2_6.all");
    int nline = 50;
  }else if(pro==2){
    ifstream f("list_rev2_7.all");
    int nline = 50;
  }


  char inputfilename[100];
  for(int i=0;i<nline;i++){
    f >> inputfilename; 
    if(i>=id && i<end){
      sprintf(inputfilename,"%s",inputfilename);
      ana->loop_a_file(inputfilename);
      cout<<" end of run : "<<i<<endl;
    }
  }

  ana->ana_end();

}

 run_all.C:1
 run_all.C:2
 run_all.C:3
 run_all.C:4
 run_all.C:5
 run_all.C:6
 run_all.C:7
 run_all.C:8
 run_all.C:9
 run_all.C:10
 run_all.C:11
 run_all.C:12
 run_all.C:13
 run_all.C:14
 run_all.C:15
 run_all.C:16
 run_all.C:17
 run_all.C:18
 run_all.C:19
 run_all.C:20
 run_all.C:21
 run_all.C:22
 run_all.C:23
 run_all.C:24
 run_all.C:25
 run_all.C:26
 run_all.C:27
 run_all.C:28
 run_all.C:29
 run_all.C:30
 run_all.C:31
 run_all.C:32
 run_all.C:33
 run_all.C:34
 run_all.C:35
 run_all.C:36
 run_all.C:37
 run_all.C:38
 run_all.C:39
 run_all.C:40
 run_all.C:41
 run_all.C:42
 run_all.C:43
 run_all.C:44
 run_all.C:45
 run_all.C:46
 run_all.C:47
 run_all.C:48
 run_all.C:49
 run_all.C:50
 run_all.C:51
 run_all.C:52
 run_all.C:53
 run_all.C:54
 run_all.C:55
 run_all.C:56
 run_all.C:57
 run_all.C:58
 run_all.C:59
 run_all.C:60
 run_all.C:61
 run_all.C:62
 run_all.C:63
 run_all.C:64
 run_all.C:65
 run_all.C:66
 run_all.C:67
 run_all.C:68
 run_all.C:69
 run_all.C:70
 run_all.C:71
 run_all.C:72
 run_all.C:73
 run_all.C:74
 run_all.C:75
 run_all.C:76
 run_all.C:77
 run_all.C:78
 run_all.C:79
 run_all.C:80
 run_all.C:81
 run_all.C:82
 run_all.C:83
 run_all.C:84
 run_all.C:85
 run_all.C:86
 run_all.C:87
 run_all.C:88
 run_all.C:89
 run_all.C:90
 run_all.C:91
 run_all.C:92
 run_all.C:93
 run_all.C:94
 run_all.C:95
 run_all.C:96
 run_all.C:97
 run_all.C:98
 run_all.C:99
 run_all.C:100
 run_all.C:101
 run_all.C:102
 run_all.C:103
 run_all.C:104
 run_all.C:105
 run_all.C:106
 run_all.C:107
 run_all.C:108
 run_all.C:109