void ResultsSumm(TString path="/panda/myResults/RK/HIMster/mom_15/200samp_1e4/"){ //Read data from files ------------------------------------------------------------------------------ double Pbeam = 15; const int th1=0; const int th2=393; //const int nq=2; //double q[nq]={-3,-2,-1,1,2,3}; const int nq=1; double q[nq]={-1}; int forwAss=0; //0=false, propagation with beam assumption // int forwAss=1; int xycut=1; //we are interesting only in x-y values in LMD range int thphcut[2]={0,1}; //no cut, with cut // const int npbeam = 9; // int dpbeam[npbeam] = {-80,-40,-20,-10,0,10,20,40,80}; const int npbeam = 7; int dpbeam[npbeam] = {-80,-60,-40,-20,-10,0,10}; // int dpbeam[npbeam] = {-95,-90,-80,-60,-40,-20,-10,0,10}; // int dpbeam[npbeam] = {-80,-40}; double pbeamval[npbeam]; for(int ip=0;ip correct assumtion in back-propagation // TString normName = path+"/backward/Prop_By_th_"; // normName+=th1; // normName+="_"; // normName+=th2; // normName+="_mrad_"; // normName +=Pbeam; // normName +="_PLUS_"; // normName+=0; // normName+="procent_q_"; // normName+=-1; // normName+="_isFfB_"; // normName+=0; // normName+="_isXYcut_"; // normName+=1; // normName+="_isTHPHcut_"; // normName+=1; // normName+=".root"; // TFile *f_out = new TFile(normName,"READ"); // TTree *tProp = (TTree*)f_out->Get("tByPropout"); // //double normEv = tProp->GetEntries(); // double normEv = 200*1e4; // // double norm_pr = 100./normEv; // double norm_pr = 1./normEv; // cout<<"norm_pr = "<Get("tByPropout"); // // double normEv = tProp->GetEntries(); double normEv = 200*1e4; // double norm_pr = 100./normEv; double norm_pr = 1./normEv; // cout<<"normEv = "<Get("tByPropout"); //if(tProp0) // cReachLMDxy_bp[ich][im] = norm_pr*double(tProp0->GetEntries()); cReachLMDxy_bp[ich][im] = norm_pr*double(tProp0->GetEntries()); errcReachLMDxy_bp[ich][im] = 3*norm_pr*TMath::Sqrt(cReachLMDxy_bp[ich][im]*(normEv-cReachLMDxy_bp[ich][im])); // errcReachLMDxy_bp[ich][im] = TMath::Sqrt(cReachLMDxy_bp[ich][im]*cReachLMDxy_bp[ich][im]*(1+cReachLMDxy_bp[ich][im])); // else // cReachLMDxy_bp[ich][im] = 0; // f_out0->Close(); f_out1 = new TFile(momName1,"READ"); TTree *tProp1 = (TTree*)f_out1->Get("tByPropout"); // if(tProp1) cReachLMDxythph_bp[ich][im] = norm_pr*double(tProp1->GetEntries()); // cReachLMDxythph_bp[ich][im] = double(tProp1->GetEntries()); errcReachLMDxythph_bp[ich][im] = 3*norm_pr*TMath::Sqrt(cReachLMDxythph_bp[ich][im]*(normEv-cReachLMDxythph_bp[ich][im])); // errcReachLMDxythph_bp[ich][im] = TMath::Sqrt(cReachLMDxythph_bp[ich][im]*cReachLMDxythph_bp[ich][im]*(1+cReachLMDxythph_bp[ich][im])); // errcReachLMDxythph_bp[ich][im] = norm_pr*TMath::Sqrt(cReachLMDxythph_bp[ich][im]); // else // cReachLMDxythph_bp[ich][im] = 0; // f_out1->Close(); cout<<" cReachLMDxy_bp[ich][im] = "<< cReachLMDxy_bp[ich][im] <<" +/- "<SetFillColor(0); leg->SetTextFont(42); leg->SetTextSize(0.04); TGraphErrors *grReachLMDxy_bp[nq]; TGraphErrors *grReachLMDxythph_bp[nq]; TMultiGraph *mgrReachLMDxy_bp = new TMultiGraph(); // TMultiGraph *mgrReachLMDxythph_bp = new TMultiGraph(); TString legstr_xy ="(x,y) cut"; TString legstr_xyth="(x,y) & (#hat{#theta},#hat{#phi}) cut"; for (int ich=0;ichSetHeader(legtit); leg->AddEntry((TObject*)0,legtit,""); grReachLMDxy_bp[ich] = new TGraphErrors(npbeam,pbeamval,cReachLMDxy_bp[ich],0,errcReachLMDxy_bp[ich]); grReachLMDxythph_bp[ich] = new TGraphErrors(npbeam,pbeamval,cReachLMDxythph_bp[ich],0,errcReachLMDxythph_bp[ich]); grReachLMDxy_bp[ich]->SetMarkerStyle(24); grReachLMDxythph_bp[ich]->SetMarkerStyle(20); grReachLMDxy_bp[ich]->SetMarkerSize(3.5); grReachLMDxythph_bp[ich]->SetMarkerSize(3.5); if(q[ich]<0){ grReachLMDxy_bp[ich]->SetMarkerColor(kOrange+1+ich); grReachLMDxythph_bp[ich]->SetMarkerColor(kOrange+1+ich); } else{ grReachLMDxy_bp[ich]->SetMarkerColor(kTeal+2+ich); grReachLMDxythph_bp[ich]->SetMarkerColor(kTeal+2+ich); } mgrReachLMDxy_bp->Add(grReachLMDxy_bp[ich]); mgrReachLMDxy_bp->Add(grReachLMDxythph_bp[ich]); leg->AddEntry(grReachLMDxy_bp[ich],legstr_xy,"PE"); leg->AddEntry(grReachLMDxythph_bp[ich],legstr_xyth,"PE"); } mgrReachLMDxy_bp->Draw("APL"); mgrReachLMDxy_bp->GetXaxis()->SetTitle("P, GeV/c"); // mgrReachLMDxy_bp->GetYaxis()->SetTitle("#frac{N_{rec}}{N^{#bar{p}}_{rec}}, %"); mgrReachLMDxy_bp->GetYaxis()->SetTitle("#frac{N_{rec}}{N_{sim}}"); leg->Draw(); // [END] Plot results ------------------------------------------------------------------------------- }