AliPhysics  9c66e61 (9c66e61)
plotProf.C
Go to the documentation of this file.
1 const int kNSM = 20;
2 
3 void plotProf(const float minRunDiv1k=216,const float maxRunDiv1k=250)
4 { // select range of runnumbers to plot
5  gStyle->SetOptStat(0);
6  TFile *_file0 = TFile::Open("all.root");
7 
8  TString cutStr = "nOk>=3&&nPTot>=3&&aveMax>aveMin&&(aveMax-aveMin)<5";
9 
10  tree->Draw("aveMax-aveMin", cutStr.Data());
11  c1->SetLogz();
12  c1->SaveAs("png/diff.png");
13 
14  char plotFileName[200];
15  char title[100];
16  char iSMCut[200];
17 
18  for (int iSM=0; iSM<kNSM; iSM++) {
19  sprintf(iSMCut,"%s&&iSM==%d", cutStr.Data(), iSM);
20  sprintf(title, "aveMin vs runno: SM==%d", iSM);
21 
22  TProfile *hp = new TProfile("hp",title,100, minRunDiv1k, maxRunDiv1k);
23  tree->Draw("aveMin:runno/1000.>>hp", iSMCut, "colz");
24  hp->SetMinimum(20);
25  sprintf(plotFileName,"png/SM%dProf.png", iSM);
26  c1->SaveAs(plotFileName);
27  delete hp;
28  }
29 
30 }
const char * title
Definition: MakeQAPdf.C:27
const int kNSM
Definition: plotProf.C:1
void plotProf(const float minRunDiv1k=216, const float maxRunDiv1k=250)
Definition: plotProf.C:3