1 void selectAllM2(
const char* infile,
const char* outfile=
""){
6 cout <<
" selectAllM2, input: " << infile << endl;
8 gSystem->Load(
"StEStructPoolSupport.so");
10 TFile * tf=
new TFile(infile);
13 cout<<
"error opening file "<<endl;
18 gSystem->Exec(
"mkdir -p all soft hard SS AS other");
29 TString fname = infile;
30 if(outfile[0]) fname = outfile;
32 cout <<
"Writing to " << fname << endl;
43 ts =
"soft/"; ts+=fname;
44 cout <<
" writing " << ts << endl;
45 adder.addCuts(ts,tf,ns,num);
49 ts =
"hard/"; ts+=fname;
50 cout <<
" writing " << ts << endl;
51 adder.addCuts(ts,tf,nh,num);
55 ts =
"other/"; ts+=fname;
56 cout <<
" writing " << ts << endl;
57 adder.addCuts(ts,tf,nh,num);
61 ts =
"SS/"; ts+=fname;
62 cout <<
" writing " << ts << endl;
63 adder.addCuts(ts,tf,nss,num);
67 ts =
"AS/"; ts+=fname;
68 cout <<
" writing " << ts << endl;
69 adder.addCuts(ts,tf,nas,num);
72 int nall[6] = {0,1,2,3,4,5};
73 ts =
"all/"; ts+=fname;
74 cout <<
" writing " << ts << endl;
75 adder.addCuts(ts,tf,nall,num);