data analysis scripts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.6 KiB

  1. {
  2. gROOT->Reset();
  3. TCanvas * c1 = new TCanvas("c1","b0",1200,1200);
  4. c1->Divide(7,7);
  5. TCanvas * c2 = new TCanvas("c2","b1",1200,1200);
  6. c2->Divide(7,7);
  7. TCanvas * c3 = new TCanvas("c3","b2",1200,1200);
  8. c3->Divide(7,7);
  9. TCanvas * c4 = new TCanvas("c4","b3",1200,1200);
  10. c4->Divide(7,7);
  11. // run map in 20 mm steps
  12. // y
  13. // 0,41,42,43,44,45, 0
  14. // 31,15,11, 7,17,23,26
  15. // 32,14,10, 6,16,22,27
  16. //x 33, 3, 2, 1, 4, 5,28
  17. // 34,18,12, 8,20,24,29
  18. // 35,19,13, 9,21,25,30
  19. // 0,36,37,38,39,40, 0
  20. Int_t fileorder[7][7] = {{0,41,42,43,44,45,0},{31,15,11,7,17,23,26},{32,14,10,6,16,22,27},{33,3,2,1,4,5,28},{34,18,12,8,20,24,29},{35,19,13,9,21,25,30},{0,36,37,38,39,40,0}};
  21. TFile *runfile[49];
  22. TLatex label[49];
  23. Int_t counter = 0;
  24. for (int i = 0;i<7;i++){
  25. for (int j = 0;j<7;j++){
  26. if (fileorder[j][i]==0) {
  27. counter++;
  28. continue;
  29. }
  30. runfile[counter] = new TFile(Form("/work/leverington/beamprofilemonitor/hitdata/HIT_17_12_2017/root/run%i.root",fileorder[i][j]),"READ");
  31. c1->cd(counter+1);
  32. sumvector_b0->Draw();
  33. label[counter].DrawLatexNDC(0.5,0.95,Form("Run%i",fileorder[i][j]));
  34. c2->cd(counter+1);
  35. sumvector_b1->Draw();
  36. label[counter].DrawLatexNDC(0.5,0.95,Form("Run%i",fileorder[i][j]));
  37. c3->cd(counter+1);
  38. sumvector_b2->Draw();
  39. label[counter].DrawLatexNDC(0.5,0.95,Form("Run%i",fileorder[i][j]));
  40. c4->cd(counter+1);
  41. sumvector_b3->Draw();
  42. label[counter].DrawLatexNDC(0.5,0.95,Form("Run%i",fileorder[i][j]));
  43. runfile[counter]->Close();
  44. counter++;
  45. }
  46. }
  47. }