18int main(
int argc,
char* argv[]){
20 cout <<
"please append the root file name" << endl;
21 cout <<
"usage: draw_hadron_check_plots.exe filename" << endl;
25 TString str_filename(argv[1]);
26 TFile *
f =
new TFile(str_filename);
27 TTree *tree = (TTree*)
f->Get(
"n103");
28 TH2F *h =
new TH2F(
"h",
"dE/dx vs momentum", 48, 0.05, 2.45, 160, 0, 2000);
29 TCanvas *c1 =
new TCanvas(
"c1",
"c1",10,10,800,642);
30 tree->Draw(
"dEdx_meas:ptrk>>h");
31 const UInt_t Number = 2;
32 Double_t Red[Number] = { 1.0, 0.2};
33 Double_t Green[Number] = { 1.0, 0.0};
34 Double_t Blue[Number] = { 1.0, 0.0};
35 Double_t Length[Number] = { 0.0, 1.0};
37 TColor::CreateGradientColorTable(Number,Length,Red,Green,Blue,nb);
39 c1->SaveAs(
"temp.eps");
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")