00001 //First run scan_embed.C to generate root file with all the histograms 00002 // V. May 31 2007 - Cristina 00003 //================================================== 00004 //V2 Revised February 2009 - Cristina 00005 // plots of dca and nfit (eta and pt) dependant simultaneously are being added 00006 //============================================================ 00007 00008 00009 #ifndef __CINT__ 00010 #include "TROOT.h" 00011 #include "TSystem.h" 00012 #include <iostream.h> 00013 #include "TH1.h" 00014 #include "TH2.h" 00015 #include "TH3.h" 00016 #include "TFile.h" 00017 #include "TTree.h" 00018 #include "TChain.h" 00019 #include "TTreeHelper.h" 00020 #include "TText.h" 00021 #include "TLatex.h" 00022 #include "TAttLine.h" 00023 #include "TCanvas.h" 00024 #endif 00025 00026 static Int_t iCanvas = 1 ; 00027 //P08id_testXXXXXX_Phi_PiPlus_histo_040709.rootP08id_test_Phi_PiPlus_histo_031509.root" 00028 00029 void plot_embed( 00030 const Char_t* inputFileName = "~/Embed/P08id_testXXXXXX_Phi_PiPlus_histo_040709.root", 00031 const Int_t id=11 00032 ) 00033 { 00034 Int_t plot = 0; 00035 const TString PathSave = "/Embed/"; 00036 00037 //id -> is for the reconstructed track or Daughter 00038 00039 gROOT->LoadMacro("StRoot/macros/embedding/Utility.C"); 00040 // gStyle->SetOptStat(0); 00041 gStyle->SetOptFit(0); 00042 00043 //Labels ->These will appear in plots and when saving them 00044 00045 Char_t *Prod ="P08id"; 00046 Char_t *Particle = "Phi";//This is the particle embedded 00047 Char_t *Daughter ="Pion";//reconstructing on this Daughter 00048 Char_t *Date= "031509"; 00049 00050 char text1[80]; 00051 sprintf(text1,"P08id Phi");//this is going to show in all the histograms 00052 TLatex t; 00053 t.SetTextSize(0.07); 00054 t.SetTextColor(1); 00055 t.SetNDC(); 00056 00057 char title[100]; 00058 char gif[400]; 00059 00060 float mass2 = -1.0; 00061 TString tag("K"); 00062 TString tagTex("K"); 00063 00064 if (id == 8) { tag = "Piplus"; tagTex = "#pi^{+}"; Char_t * Daughter = "Piplus" ;mass2 = 0.019;} 00065 if (id == 9) { tag = "Piminus"; tagTex = "#pi^{-}"; Char_t * Daughter = "Piminus"; mass2 = 0.019;} 00066 if (id == 11) { tag = "Kplus"; tagTex = "K^{+}"; Char_t * Daughter = "Kplus"; mass2 = 0.245;} 00067 if (id == 12) { tag = "Kminus"; tagTex = "K^{-}"; Char_t * Daughter = "Kminus";mass2 = 0.245;} 00068 if (id == 14) { tag = "Proton"; tagTex = "p"; Char_t * Daughter = "Proton";mass2 = 0.880;} 00069 if (id == 15) { tag = "Pbar"; tagTex = "#bar{p}"; Char_t * Daughter = "Pbar"; mass2 = 0.880;} 00070 if (id == 50) { tag = "Phi"; tagTex = "#phi"; mass2 = 1.020;} 00071 if (id == 2) { tag = "Eplus"; tagTex = "e^{+}"; mass2 = 0.511;} 00072 if (id == 1) { tag = "Dmeson"; tagTex = "D"; mass2 = 1.864;} 00073 00074 00075 //============================================================== 00076 //Cloning Histograms 00077 //============================================================== 00078 00079 00080 TFile* file = TFile::Open(inputFileName); 00081 if(!file || !file->IsOpen()){ 00082 cout << "can't open " << inputFileName << endl; 00083 return; 00084 } 00085 00086 TH3D *hDca1 = (TH3D*) file-> Get("hDca");//DCA 00087 TH3D *hNfit1 = (TH3D*) file-> Get("hNfit");//Nfit 00088 00089 00090 TH2D *hPtM_E1 = (TH2D*) file-> Get("hPtM_E");//Energy Loss 00091 TH2F *dedx1 = (TH2F*) file-> Get("dedx"); 00092 00093 TH3D *hDcaG1 = (TH3D*) file-> Get("hDcaG");//DCA 00094 TH3D *hNfitG1 = (TH3D*) file-> Get("hNfitG");//Nfit 00095 00096 TH2F *dedxG1 = (TH2F*) file-> Get("dedxG"); 00097 TH1D *PhiG1 = (TH1D*) file-> Get("PhiG"); 00098 00099 TH2D *vxy1 = (TH2D*) file-> Get("vxy"); 00100 00101 TH1D *vz1 = (TH1D*) file-> Get("vz"); 00102 TH1D *dvx1 = (TH1D*) file-> Get("dvx"); 00103 TH1D *dvy1 = (TH1D*) file-> Get("dvy"); 00104 TH1D *dvz1 = (TH1D*) file-> Get("dvz"); 00105 00106 TH1D *PhiMc1 = (TH1D*) file-> Get("PhiMc"); 00107 TH1D *EtaMc1 = (TH1D*) file-> Get("EtaMc"); 00108 TH1D *YMc1 = (TH1D*) file-> Get("YMc"); 00109 TH1D *PtMc1 = (TH1D*) file-> Get("PtMc"); 00110 TH3D *PtYPhiMc1= (TH3D*) file-> Get("PtYPhiMc"); 00111 00112 TH1D *PhiM1 = (TH1D*) file-> Get("PhiM"); 00113 TH1D *EtaM1 = (TH1D*) file-> Get("EtaM"); 00114 TH1D *YM1 = (TH1D*) file-> Get("YM"); 00115 TH1D *PtM1 = (TH1D*) file-> Get("PtM"); 00116 TH3D *PtYPhiM1 = (TH3D*) file-> Get("PtYPhiM"); 00117 00118 TH2D *PtM_eff1 = (TH2D*) file->Get("PtM_E");//efficiency 00119 00120 //if you have MuDst hist 00121 00122 TH2D *dedx1R = (TH2D*) file-> Get("dedxR"); 00123 00124 //3D histos 00125 00126 TH3D *hDcaM = (TH3D*) file-> Get("hPtEtaDcaM");//DCA 00127 TH3D *hDcaG = (TH3D*) file-> Get("hPtEtaDcaG");//DCA 00128 TH3D *hDcaR = (TH3D*) file-> Get("hPtEtaDcaR"); 00129 00130 TH3D *hNfitM = (TH3D*) file-> Get("hPtEtaNfitM");//Nfit 00131 TH3D *hNfitR = (TH3D*) file-> Get("hPtEtaNfitR");// 00132 TH3D *hNfitG = (TH3D*) file-> Get("hPtEtaNfitG");//Nfit 00133 00134 00135 const int nch1 = 0; 00136 const int nch2 = 1000; 00137 00138 //The Following bins are for the 3X3 matrix of eta,pt d 00139 00140 const int nEtaBin=3; 00141 const Double_t eta[nEtaBin+1]= {0.2,0.5,0.8,1.0}; 00142 00143 const int nPtBin=3; 00144 const Double_t pt[nPtBin+1] = {0.5,0.6,0.8,1.0}; 00145 00146 00147 //============================================================= 00148 //Delta Vertex position 00149 //========================================================= 00150 /* 00151 TCanvas *cdv= new TCanvas("cdv","Delta Vertex position",700, 500); 00152 cdv->Divide(3, 1); 00153 00154 cdv_1->cd(); 00155 // dvx1->Rebin(2); 00156 dvx1->SetXTitle("#Delta VX"); 00157 dvx1->SetAxisRange(-1.5, 1.5, "X"); 00158 dvx1->Draw(); 00159 00160 cdv_2->cd(); 00161 dvy1->SetXTitle("#Delta VY"); 00162 dvy1->SetAxisRange(-1.5, 1.5, "X"); 00163 dvy1->Draw(); 00164 00165 cdv_3->cd(); 00166 dvz1->SetXTitle("#Delta VZ"); 00167 dvz1->SetAxisRange(-1.5, 1.5, "X"); 00168 dvz1->Draw(); 00169 00170 00171 t.DrawLatex(0.3, 0.9, text1); 00172 00173 cdv->Update(); 00174 00175 if (plot) 00176 { 00177 sprintf(gif,"~/Embed/%s/%s/DeltaVertex_%s_%s_%s_%sXXXXXXXXX.gif",Prod, Particle, Prod, Particle,Daughter, Date); 00178 // sprintf(gif,"~/Embed/Test_DeltaVertex_%s_%s_%s_%sXXXXXXXXX.gif", Prod, Particle,Daughter, Date); 00179 // sprintf(gif,PathSave+"Test.gif");//, Prod, Particle,Daughter, Date); 00180 cdv->SaveAs(gif); 00181 } 00182 00183 // return; 00184 00185 00186 //============================================================= 00187 //Vertex position 00188 //========================================================= 00189 00190 00191 TCanvas *cv= new TCanvas("cv","Vertex position",600, 400); 00192 cv->Divide(2,1); 00193 00194 cv_1->cd(); 00195 vz1->Rebin(2); 00196 vz1->SetXTitle("Vertex Z"); 00197 vz1->Draw(); 00198 00199 cv_2->cd(); 00200 00201 vxy1->Draw("colz"); 00202 vxy1->SetAxisRange(-1.5, 1.5, "X"); 00203 vxy1->SetAxisRange(-1.5, 1.5, "Y"); 00204 vxy1->SetXTitle ("vertex X"); 00205 vxy1->SetYTitle ("vertex Y"); 00206 00207 //keyLine(.2, 1.05,Prod,1); 00208 //keyLine(.2, 1.00,Particle,1); 00209 t.DrawLatex(0.3, 0.9, text1); 00210 00211 cv->Update(); 00212 00213 if (plot) 00214 { 00215 sprintf(gif,"~/Embed/%s/%s/Vertex_%s_%s_%s_%s.gif",Prod, Particle, Prod, Particle, Daughter,Date); 00216 cv->SaveAs(gif); 00217 } 00218 // return; 00219 00220 //============================================================= 00221 //dEdx 00222 //========================================================= 00223 00224 00225 TCanvas *cdedx= new TCanvas("cdedx","dEdx vs P",600, 600); 00226 // gStyle->SetPalette(1); 00227 00228 cdedx->SetGridx(0); 00229 cdedx->SetGridy(0); 00230 cdedx->SetLeftMargin(0.15); 00231 cdedx->SetRightMargin(0.05); 00232 cdedx->cd(); 00233 00234 dedxG1->SetTitle("dEdx vs P "); 00235 dedxG1->SetXTitle("Momentum (GeV/c)"); 00236 dedxG1->SetYTitle("dE/dx (x10^{-6})"); 00237 00238 dedxG1->SetMarkerStyle(1); 00239 dedxG1->SetMarkerSize(0.2); 00240 dedxG1->SetMarkerColor(4); 00241 dedxG1->SetAxisRange(0, 8., "X"); 00242 dedxG1->SetAxisRange(0, 8., "Y"); 00243 00244 00245 dedx1->SetTitle("dEdx vs P "); 00246 dedx1->SetXTitle("Momentum (GeV/c)"); 00247 dedx1->SetYTitle("dE/dx (x10^{-6})"); 00248 dedx1->SetAxisRange(0, 8., "X"); 00249 dedx1->SetAxisRange(0, 8., "Y"); 00250 dedx1->SetMarkerStyle(1); 00251 dedx1->SetMarkerSize(2); 00252 dedx1->SetMarkerColor(2); 00253 00254 dedx1R->SetAxisRange(0, 8., "X"); 00255 dedx1R->SetAxisRange(0, 8., "Y"); 00256 dedx1R->SetMarkerStyle(1); 00257 dedx1R->SetMarkerSize(0.2); 00258 dedx1R->SetMarkerColor(1); 00259 00260 //dedx1R->Draw(); 00261 dedxG1->Draw();//"colz"); 00262 dedx1->Draw("same"); 00263 // dedx1R->Draw("same"); 00264 t.SetTextSize(0.05); 00265 t.DrawLatex(0.3, 0.9, text1); 00266 //keyLine(.2, 1.05,Prod,1); 00267 //keyLine(.2, 1.00,Particle,1); 00268 00269 keySymbol(.4, .87, "Matched Tracks_"+tagTex,2,20, 0.03); 00270 keySymbol(.4, .82, "Ghost Tracks",4,20,0.03); 00271 // keySymbol(.4, .82, "MuDst Tracks_"+tagTex,1,20,0.03); 00272 00273 cdedx->Update(); 00274 if(plot) 00275 { 00276 00277 // sprintf(gif,"~/Embed/%s/%s/Dedx_%s_%s_%s_%s.gif",Prod, Particle, Prod, Particle,Daughter, Date); 00278 // cdedx->SaveAs(gif); 00279 } 00280 // return; 00281 00282 00283 //============================================================= 00284 //pt vs y of mc tracks 00285 //========================================================= 00286 00287 00288 TCanvas *c11= new TCanvas("c11","PT VS Y",400, 400); 00289 00290 c11->SetGridx(0); 00291 c11->SetGridy(0); 00292 c11->cd(); 00293 00294 TH2D *hPt_Y = (TH2D*)PtYPhiMc1->Project3D("XY"); 00295 hPt_Y->SetTitle("pT Vs Y of MC tracks"); 00296 hPt_Y->SetYTitle ("pT (GeV/c)"); 00297 hPt_Y->SetXTitle ("Y"); 00298 hPt_Y->SetAxisRange(-1.2, 1.2, "X"); 00299 hPt_Y->SetAxisRange(0, 2.5, "Y"); 00300 hPt_Y->Draw(); 00301 00302 t.SetTextSize(0.05); 00303 t.DrawLatex(0.3, 0.9, text1); 00304 00305 c11->Update(); 00306 // sprintf(gif,"~/embedding/%s/%s/pT_Y_%s_%s_%s_%s.gif",Prod, Particle, Prod, Particle,Daughter, Date); 00307 // c11->SaveAs(gif); 00308 00309 00310 //============================================================= 00311 //pt vs phi of mc tracks 00312 //========================================================= 00313 00314 00315 00316 TCanvas *c12= new TCanvas("c12","pT VS PHI",400, 400); 00317 00318 c12->SetGridx(0); 00319 c12->SetGridy(0); 00320 c12->cd(); 00321 00322 TH2D *hPt_Phi = (TH2D*)PtYPhiMc1->Project3D("XZ"); 00323 hPt_Phi->SetTitle("pT Vs Phi of MC tracks"); 00324 hPt_Phi->SetYTitle ("p_{T} (GeV/c)"); 00325 hPt_Phi->SetXTitle ("Phi"); 00326 hPt_Phi->SetAxisRange(-3.4, 3.4, "X"); 00327 hPt_Phi->SetAxisRange(0, 2.5, "Y"); 00328 hPt_Phi->Draw(); 00329 t.SetTextSize(0.05); 00330 t.DrawLatex(0.3, 0.9, text1); 00331 // keySymbol(.2, 1.05,Prod,1); 00332 // keySymbol(.4, 1.05,Particle,1); 00333 00334 c12->Update(); 00335 // sprintf(gif,"~/embedding/%s/%s/pT_Phi_%s_%s_%s_%s.gif",Prod, Particle, Prod, Particle, Daughter, Date); 00336 // c12->SaveAs(gif); 00337 // return; 00338 00339 //================================================== 00340 //y vs phi of mc tracks 00341 //=================================================== 00342 TCanvas *cyphi= new TCanvas("cyphi","Y VS PHI",400, 400); 00343 00344 cyphi->SetGridx(0); 00345 cyphi->SetGridy(0); 00346 cyphi->cd(); 00347 00348 TH2D *hY_Phi = (TH2D*)PtYPhiMc1->Project3D("YZ"); 00349 hY_Phi->SetTitle("Y Vs Phi of MC tracks"); 00350 hY_Phi->SetYTitle ("Y (GeV/c)"); 00351 hY_Phi->SetXTitle ("Phi"); 00352 hY_Phi->SetAxisRange(-3.4, 3.4, "X"); 00353 hY_Phi->SetAxisRange(-1.2, 1.2, "Y"); 00354 hY_Phi->Draw(); 00355 00356 // keySymbol(.2, 1.05,Prod,1); 00357 // keySymbol(.4, 1.05,Particle,1); 00358 t.SetTextSize(0.05); 00359 t.DrawLatex(0.3, 0.9, text1); 00360 cyphi->Update(); 00361 if (plot) 00362 { 00363 00364 sprintf(gif,"~/embedding/%s/%s/Y_phi_%s_%s_%s_%s.gif",Prod, Particle, Prod, Particle, Daughter,Date); 00365 cyphi->SaveAs(gif); 00366 } 00367 00368 // return; 00369 00370 //===================================================== 00371 //pt 00372 //========================================================= 00373 00374 TCanvas *cpt= new TCanvas("cpt","Pt",500, 500); 00375 00376 cpt->SetGridx(0); 00377 cpt->SetGridy(0); 00378 cpt->cd(); 00379 gStyle->SetOptDate(0); 00380 00381 PtM1->Rebin(2); 00382 PtM1->Scale(1/2); 00383 PtM1->Scale(PtM1->GetSum()); 00384 00385 PtMc1->Rebin(2); 00386 PtMc1->Scale(1/2); 00387 PtMc1->Scale(PtMc1->GetSum()); 00388 00389 PtMc1->SetLineColor(1); 00390 PtMc1->SetTitle("p_{T}"); 00391 PtMc1->SetXTitle ("pT (GeV/c)"); 00392 00393 PtMc1->SetAxisRange(0.0, 8, "X"); 00394 PtMc1->SetAxisRange(0.0, 1.2*PtM1->GetMaximum(), "Y"); 00395 PtMc1->Draw(); 00396 00397 PtM1->SetLineColor(2); 00398 PtM1->Draw("same"); 00399 00400 t.SetTextSize(0.05); 00401 t.DrawLatex(0.3, 0.9, text1); 00402 00403 keyLine(.4, 0.80,"MC tracks",1); 00404 keyLine(.4, 0.75,"MatGlobal RC tracks "+tagTex,2); 00405 00406 cpt->Update(); 00407 00408 if (plot) 00409 { 00410 sprintf(gif,"~/embedding/%s/%s/pT_%s_%s_%s_%s.gif",Prod, Particle, Prod, Particle,Daughter, Date); 00411 cpt->SaveAs(gif); 00412 } 00413 // return; 00414 00415 //====================================================== 00416 //phi 00417 //============================================================== 00418 00419 00420 TCanvas *cphi= new TCanvas("cphi","PHI",500, 500); 00421 cphi->SetGridx(0); 00422 cphi->SetGridy(0); 00423 00424 00425 cphi->cd(); 00426 00427 PhiMc1->Rebin(2); 00428 PhiMc1->SetLineColor(1); 00429 PhiMc1->Scale(1/2); 00430 PhiMc1->Scale(PhiMc1->GetSum()); 00431 00432 PhiMc1->SetTitle("Phi"); 00433 PhiMc1->SetXTitle ("Phi"); 00434 PhiMc1->Draw(); 00435 00436 //Reconstructed 00437 PhiM1->Rebin(2); 00438 PhiM1->Scale(1/2); 00439 PhiM1->Scale(PhiM1->GetSum()); 00440 00441 PhiMc1->SetAxisRange(-3.3, 3.3, "X"); 00442 PhiMc1->SetAxisRange(0, 1.2*PhiMc1->GetMaximum(), "Y"); 00443 00444 PhiM1->SetLineColor(2); 00445 PhiM1->Draw("same"); 00446 00447 PhiG1->Rebin(2); 00448 PhiG1->Scale(1/2); 00449 00450 PhiG1->Scale(PhiMc1->GetSum()/PhiG1->GetSum()*0.4);//this is just for dAu run 8 00451 PhiG1->SetLineColor(3); 00452 PhiG1->Draw("same"); 00453 00454 t.SetTextSize(0.05); 00455 t.DrawLatex(0.3, 0.9, text1); 00456 00457 keyLine(.3, 0.18,"MC tracks",1); 00458 keyLine(.3, 0.13,"MatGlobal RC tracks "+tagTex,2); 00459 keyLine(.3, 0.10,"Ghost tracks (rescaled)",3); 00460 00461 cphi->Update(); 00462 if (plot) 00463 { 00464 sprintf(gif,"~/embedding/%s/%s/Phi_%s_%s_%s_%s.gif",Prod, Particle, Prod, Particle,Daughter, Date); 00465 cphi->SaveAs(gif); 00466 } 00467 // return; 00468 00469 //======================================================== 00470 //rapidity 00471 //====================================================== 00472 00473 TCanvas *cy= new TCanvas("cy","Rapidity",500, 500); 00474 00475 cy->SetGridx(0); 00476 cy->SetGridy(0); 00477 cy->cd(); 00478 00479 //embedded 00480 00481 00482 YMc1->SetLineColor(1); 00483 YMc1->SetTitle("Rapidity"); 00484 YMc1->SetXTitle ("y"); 00485 yMc1->SetAxisRange(-1.2, 1.2, "X"); 00486 YMc1->SetAxisRange(0, 1.4* YMc1->GetMaximum(), "Y"); 00487 YMc1->Draw(); 00488 00489 //Reco 00490 00491 YM1->SetLineColor(2); 00492 YM1->Draw("same"); 00493 00494 00495 t.SetTextSize(0.05); 00496 t.DrawLatex(0.3, 0.9, text1); 00497 00498 keyLine(.3, 0.21,"MC tracks",1); 00499 keyLine(.3, 0.15,"MatGlobal RC tracks "+tagTex,2); 00500 00501 00502 cy->Update(); 00503 00504 if (plot) 00505 { 00506 sprintf(gif,"~/embedding/%s/%s/Rapidity_%s_%s_%s_%s.gif",Prod, Particle, Prod, Particle,Daughter, Date); 00507 cy->SaveAs(gif); 00508 } 00509 // return; 00510 00511 */ 00512 //============================================================ 00513 //Dca vs Eta vs pt 00514 //============================================================ 00515 00516 TCanvas *cde= new TCanvas("cde","DCA_Eta",900, 900); 00517 00518 cde->Divide(nPtBin,nEtaBin);//etabin 00519 cde->SetGridx(0); 00520 cde->SetGridy(0); 00521 00522 //Matched (Bins for Multiplicity) 00523 00524 TH1D *hpt = (TH1D*)hDcaM->Project3D("X"); 00525 00526 00527 for (Int_t ipt=0; ipt <nPtBin ; ipt++) 00528 { 00529 Int_t bin_pt1 = hpt->FindBin(pt[ipt]); 00530 Int_t bin_pt2 = hpt->FindBin(pt[ipt+1]);//this should be the same for both graphs (for 3 graphs) 00531 00532 00533 TString nameM = "hDcaM"; 00534 TString nameR = "hDcaR"; 00535 TString nameG = "hDcaG"; 00536 00537 TH1D *hEtaM = (TH1D*)hDcaM->Project3D("Y"); 00538 TH1D *hEtaR = (TH1D*)hDcaR->Project3D("Y"); 00539 TH1D *hEtaG = (TH1D*)hDcaG->Project3D("Y"); 00540 00541 00542 for(int ieta=0; ieta<nEtaBin ; ieta++) 00543 { 00544 cde->cd(3*ipt+ieta+1); 00545 00546 Double_t SumMC=0; 00547 Double_t SumR=0; 00548 Double_t SumG=0; 00549 00550 Int_t bin_eta1 = hEtaM->FindBin(eta[ieta]); 00551 Int_t bin_eta2 = hEtaM->FindBin(eta[ieta+1]); 00552 00553 TH1D *hDcaMNew= (TH1D*)hDcaM->ProjectionZ(nameM+ieta,bin_pt1, bin_pt2, bin_eta1, bin_eta2); 00554 00555 // hDcaMNew->Sumw2(); 00556 00557 // maxMc = hDcaMNew->GetMaximum(); 00558 //SumMC = hDcaMNew->GetSum(); 00559 00560 for(int kkk=1;kkk<hDcaMNew->GetNbinsX();kkk++) 00561 { 00562 SumMC += hDcaMNew->GetBinContent(kkk); 00563 } 00564 00565 hDcaMNew->Scale(1./SumMC); 00566 hDcaMNew->SetLineColor(2); 00567 hDcaMNew->SetXTitle("Dca (cm)"); 00568 00569 sprintf(title," %.2f GeV < pT < %.2f GeV - %.2f GeV/c < Eta < %.2f GeV/c", pt[ipt],pt[ipt+1], eta[ieta],eta[ieta+1]); 00570 hDcaMNew->SetTitle(title); 00571 00572 //----Now MuDSt 00573 00574 Int_t bin_eta1R = hEtaR->FindBin(eta[ieta]); 00575 Int_t bin_eta2R = hEtaR->FindBin(eta[ieta+1]); 00576 00577 TH1D *hDcaRNew= (TH1D*)hDcaR->ProjectionZ(nameR+ieta,bin_pt1, bin_pt2, bin_eta1R, bin_eta2R); 00578 // hDcaRNew->Sumw2(); 00579 00580 // SumR = hDcaRNew->GetSum(); 00581 for(int kkk=1;kkk<hDcaRNew->GetNbinsX();kkk++) 00582 { 00583 SumR += hDcaRNew->GetBinContent(kkk); 00584 00585 } 00586 00587 hDcaRNew->Scale(1./SumR); 00588 00589 00590 //---Now Ghost 00591 00592 Int_t bin_eta1G = hEtaG->FindBin(eta[ieta]); 00593 Int_t bin_eta2G = hEtaG->FindBin(eta[ieta+1]); 00594 00595 TH1D *hDcaGNew = (TH1D*)hDcaG->ProjectionZ(nameG+ieta, bin_pt1, bin_pt2, bin_eta1G, bin_eta2G); 00596 // hDcaGNew->Sumw2(); 00597 00598 // SumG = hDcaGNew->GetSum(); 00599 00600 for(int kkk=1; kkk<hDcaGNew->GetNbinsX();kkk++) 00601 { 00602 SumG += hDcaGNew->GetBinContent(kkk); 00603 00604 } 00605 00606 00607 hDcaGNew->Scale(1./SumG); 00608 hDcaGNew->SetLineColor(4); 00609 00610 hDcaMNew->Draw(); 00611 hDcaRNew->Draw("esame"); 00612 // hDcaGNew->Draw("esame"); 00613 00614 00615 t.SetTextSize(0.045); 00616 t.DrawLatex(0.4, 0.9, text1); 00617 00618 t.SetTextSize(0.045); 00619 t.SetTextColor(2); 00620 t.DrawLatex(0.4, 0.8, "Matched Global "+tagTex); 00621 00622 t.SetTextSize(0.045); 00623 t.SetTextColor(1); 00624 t.DrawLatex(0.4, 0.75, "MuDst"); 00625 00626 t.SetTextSize(0.045); 00627 t.SetTextColor(1); 00628 t.DrawLatex(0.4, 0.70, "Ghost Tracks"); 00629 00630 cde->Update(); 00631 00632 } 00633 00634 00635 } 00636 cde->Update(); 00637 // sprintf(gif," ~/embedding/%s/%s/dca_eta_pt_%s_%s_%s_%s.gif",Prod, Particle, Prod, Particle, Daughter,Date); 00638 // cde->SaveAs(gif); 00639 return; 00640 00641 //=============================================== 00642 //nfit vs eta vs pt 00643 //==================================================== 00644 00645 TCanvas *cn= new TCanvas("cn","NFIT",1000, 800); 00646 cn->Divide(nPtBin,nEtaBin); 00647 cn->SetGridx(0); 00648 cn->SetGridy(0); 00649 00650 //Bins for Multiplicity -Matched tracks 00651 00652 TH1D *hpt = (TH1D*)hNfitM->Project3D("X"); 00653 00654 for (Int_t ipt=0; ipt <nPtBin ; ipt++) 00655 { 00656 00657 Int_t bin_pt1 = hpt->FindBin(pt[ipt]); 00658 Int_t bin_pt2 = hpt->FindBin(pt[ipt+1]);//this should be the same for both graphs (for 3 graphs) 00659 00660 TString nameM = "hNfitM"; 00661 TString nameR = "hNfitR"; 00662 TString nameG = "hNfitG"; 00663 00664 TH1D *hEtaM = (TH1D*)hNfitM->Project3D("Y"); 00665 TH1D *hEtaR = (TH1D*)hNfitR->Project3D("Y"); 00666 TH1D *hEtaG = (TH1D*)hNfitG->Project3D("Y"); 00667 00668 00669 for(int ieta=0; ieta<nEtaBin ; ieta++) 00670 00671 { 00672 cn->cd(3*ipt+ieta+1); 00673 00674 Double_t SumM=0; 00675 Double_t SumR=0; 00676 Double_t SumG=0; 00677 00678 Int_t bin_eta1 = hEtaM->FindBin(eta[ieta]); 00679 Int_t bin_eta2 = hEtaM->FindBin(eta[ieta+1]); 00680 00681 00682 TH1D *hNfitMNew= (TH1D*)hNfitM->ProjectionZ(nameM+ieta,bin_pt1, bin_pt2, bin_eta1, bin_eta2); 00683 hNfitMNew->Sumw2(); 00684 00685 for(int kkk=1;kkk<hNfitMNew->GetNbinsX();kkk++)SumM += hNfitMNew->GetBinContent(kkk); 00686 cout<<SumM<<endl; 00687 00688 hNfitMNew->Scale(1./SumM); 00689 hNfitMNew ->SetLineColor(2); 00690 hNfitMNew->Draw(); 00691 00692 hNfitMNew->SetXTitle("Nfit"); 00693 00694 sprintf(title," %.2f GeV < pT < %.2f GeV - %.2f GeV/c < Eta < %.2f GeV/c", pt[ipt],pt[ipt+1], eta[ieta],eta[ieta+1]); 00695 hNfitMNew->SetTitle(title); 00696 00697 //----Now MuDSt 00698 00699 Int_t bin_eta1R = hEtaR->FindBin(eta[ieta]); 00700 Int_t bin_eta2R = hEtaR->FindBin(eta[ieta+1]); 00701 00702 TH1D *hNfitRNew= (TH1D*)hNfitR->ProjectionZ(nameR+ieta,bin_pt1, bin_pt2, bin_eta1R, bin_eta2R); 00703 00704 hNfitRNew->Sumw2(); 00705 SumR = hNfitRNew->GetSum(); 00706 00707 for(int kkk=1;kkk<hNfitR->GetNbinsX();kkk++)SumR += hNfitR->GetBinContent(kkk); 00708 cout<<SumR<<endl; 00709 hNfitRNew->Scale(1./SumR); 00710 hNfitRNew->Draw("esame"); 00711 00712 00713 //Now Ghost 00714 00715 Int_t bin_eta1G = hEtaG->FindBin(eta[ieta]); 00716 Int_t bin_eta2G = hEtaG->FindBin(eta[ieta+1]); 00717 00718 00719 TH1D *hNfitGNew = (TH1D*)hNfitG->ProjectionZ(nameG+ieta,bin_pt1, bin_pt2, bin_eta1, bin_eta2); 00720 hNfitGNew->Sumw2(); 00721 00722 SumG = hNfitRNew->GetSum(); 00723 for(int kkk=1;kkk<hNfitGNew->GetNbinsX();kkk++)SumG += hNfitGNew->GetBinContent(kkk); 00724 cout<<SumG<<endl; 00725 00726 hNfitGNew->Scale(1./SumG); 00727 hNfitGNew ->SetLineColor(4); 00728 // hNfitGNew->Draw("same"); 00729 00730 t.SetTextSize(0.045); 00731 t.DrawLatex(0.4, 0.9, text1); 00732 00733 t.SetTextSize(0.045); 00734 t.SetTextColor(2); 00735 t.DrawLatex(0.4, 0.8, "Matched Global "+tagTex); 00736 00737 t.SetTextSize(0.045); 00738 t.SetTextColor(1); 00739 t.DrawLatex(0.4, 0.75, "MuDst"); 00740 00741 cn->Update(); 00742 // keyLine(0.2, 0.80,"Ghost Tracks",4); 00743 } 00744 00745 } 00746 cn->Update(); 00747 sprintf(gif,"~/embedding/%s/%s/Nfit_eta_pt_%s_%s_%s_%s.gif",Prod, Particle, Prod, Particle,Daughter, Date); 00748 cn->SaveAs(gif); 00749 00750 return; 00751 } 00752 00753 00754 //===================================================================== 00755 //Following you can use them if need them. 00756 // Inludes, MIPS, Efficiency, Energy Lost, Dca (just Pt dependant), and NFit ( just pt dependant)// 00757 00758 /* 00759 //================================================================================== 00760 //MIPS (just for pions) 00761 //============================================================= 00762 00763 if (id==8 || id==9) 00764 { 00765 00766 TCanvas *c9= new TCanvas("c9","MIPS",500, 500); 00767 00768 c9->SetGridx(0); 00769 c9->SetGridy(0); 00770 c9->SetLeftMargin(0.15); 00771 c9->SetRightMargin(0.05); 00772 c9->cd(); 00773 00774 double pt1 = 0.4; 00775 double pt2 = 0.6; 00776 00777 dedxG1 -> ProjectionX("rpx"); 00778 00779 int blG = rpx->FindBin(pt1); 00780 int bhG = rpx->FindBin(pt2); 00781 00782 cout<<blG<<endl; 00783 cout<<bhG<<endl; 00784 00785 dedxG1->ProjectionY("rpy",blG,bhG); 00786 rpy->SetTitle("MIPS"); 00787 rpy->SetMarkerStyle(22); 00788 // rpy->SetMarkerColor(2); 00789 rpy->SetAxisRange(1.3, 4, "X"); 00790 00791 //dedxG1->Draw(); 00792 00793 dedx1->ProjectionX("mpx"); 00794 00795 int blm = mpx->FindBin(pt1); 00796 int bhm = mpx->FindBin(pt2); 00797 00798 cout<<blm<<endl; 00799 cout<<bhm<<endl; 00800 00801 dedx1->ProjectionY("mpy", blm,bhm); 00802 00803 mpy->SetAxisRange(0.5, 6, "X"); 00804 mpy->SetMarkerStyle(22); 00805 mpy->SetMarkerColor(2); 00806 00807 float max_rpy = rpy->GetMaximum(); 00808 max_rpy /= 1.*mpy->GetMaximum(); 00809 mpy->Scale(max_rpy); 00810 00811 cout<<"max_rpy is: "<<max_rpy<<endl; 00812 cout<<"mpy is: "<<mpy<<endl; 00813 00814 rpy->Sumw2(); 00815 mpy->Sumw2(); 00816 00817 rpy->Fit("gaus","","",1,4); 00818 mpy->Fit("gaus","","", 1, 4); 00819 mpy->GetFunction("gaus")->SetLineColor(2); 00820 00821 rpy->SetAxisRange(0.5 ,6.0, "X"); 00822 mpy->Draw(); 00823 rpy->Draw("same"); 00824 00825 float mipMc = mpy->GetFunction("gaus")->GetParameter(1);//mean 00826 float mipGhost = rpy->GetFunction("gaus")->GetParameter(1); 00827 00828 float sigmaMc = mpy->GetFunction("gaus")->GetParameter(2);//mean 00829 float sigmaGhost = rpy->GetFunction("gaus")->GetParameter(2); 00830 00831 char label1[80]; 00832 char label2[80]; 00833 char label3[80]; 00834 char label4[80]; 00835 00836 00837 sprintf(label1,"mip MC %.3f",mipMc); 00838 sprintf(label2,"mip Ghost %.3f",mipGhost); 00839 sprintf(label3,"sigma MC %.3f",sigmaMc); 00840 sprintf(label4,"sigma Ghost %.3f",sigmaGhost); 00841 00842 keySymbol(.5, .9, label1,2,1); 00843 keySymbol(.5, .85, label3,2,1); 00844 00845 keySymbol(.5, .75, label2,1,1); 00846 keySymbol(.5, .70, label4,1,1); 00847 00848 keyLine(.2, 1.05,text1,1); 00849 00850 char name[30]; 00851 sprintf(name,"%.2f GeV/c < Pt < %.2f GeV/c",pt1, pt2); 00852 keySymbol(0.3, 0.65, name, 1, 1, 0.04); 00853 00854 00855 c9->Update(); 00856 00857 }//close if pion 00858 00859 00860 // pfx1->SetMarkerStyle(2,1); 00861 00862 00863 00864 //================================================================ 00865 //DCA (pt) 00866 //================================================================== 00867 /* 00868 00869 TCanvas *c= new TCanvas("c","DCA",400, 800); 00870 c->Divide(1,nPtBin); 00871 c->SetGridx(0); 00872 c->SetGridy(0); 00873 00874 //Matched (Bins for Multiplicity) 00875 00876 TH1D *hX1 = (TH1D*)hDca1->Project3D("X"); 00877 00878 Int_t bin_nch1 = hX1->FindBin(nch1); 00879 Int_t bin_nch2 = hX1->FindBin(nch2);//this should be the same for both graphs (for 3 graphs) 00880 00881 cout<<bin_nch1<<" "<<bin_nch2<<endl; 00882 00883 //Bins for Pt 00884 00885 TString name1 = "hDca1"; 00886 TString namer1 = "hDcar1"; 00887 00888 TString namexx = "hDca"; 00889 00890 00891 TH1D *hY1 = (TH1D*)hDca1->Project3D("Y"); 00892 TH1D *hY1_r = (TH1D*)hDca1r->Project3D("Y"); 00893 00894 TH1D *hYG = (TH1D*)hDcaG1->Project3D("Y"); 00895 00896 for(Int_t i=0; i<nPtBin ; i++) 00897 { 00898 c->cd(i+1); 00899 00900 Double_t Sum1_MC=0; 00901 Double_t Sum1_Real=0; 00902 Double_t Sum_MC=0; 00903 00904 Int_t bin_ptl_1 = hY1->FindBin(pt[i]); 00905 Int_t bin_pth_1 = hY1->FindBin(pt[i+1]); 00906 00907 TH1D *hDcaNew1= (TH1D*)hDca1->ProjectionZ(name1+i,bin_nch1, bin_nch2, bin_ptl_1, bin_pth_1); 00908 //Sum1_MC = hDcaNew1 ->GetSum(); 00909 for(int kkk=1;kkk<hDcaNew1->GetNbinsX();kkk++)Sum1_MC += hDcaNew1->GetBinContent(kkk); 00910 cout<<Sum1_MC<<endl; 00911 00912 hDcaNew1->Scale(1./Sum1_MC); 00913 hDcaNew1 ->SetLineColor(2); 00914 hDcaNew1->Draw(); 00915 00916 hDcaNew1->SetXTitle("Dca (cm)"); 00917 00918 //sprintf(title," %.2f GeV < pT < %.2f GeV, %d < nch < %d", pt[i],pt[i+1],nch1,nch2); 00919 sprintf(title," %.2f GeV/c < pT < %.2f GeV/c", pt[i],pt[i+1]); 00920 //hDcaNew1->SetTitle("Scale factor = 1.38"); 00921 hDcaNew1->SetTitle(title); 00922 00923 //----Now MuDSt 00924 00925 Int_t bin_ptrl_1r = hY1_r->FindBin(pt[i]); 00926 Int_t bin_ptrh_1r = hY1_r->FindBin(pt[i+1]); 00927 00928 TH1D *hDca_r1= (TH1D*)hDca1r->ProjectionZ(namer1+i,bin_nch1, bin_nch2, bin_ptrl_1r, bin_ptrh_1r); 00929 //Sum1_Real = hDca_r1 ->GetSum(); 00930 for(int kkk=1;kkk<hDca_r1->GetNbinsX();kkk++)Sum1_Real += hDca_r1->GetBinContent(kkk); 00931 cout<<Sum1_Real<<endl; 00932 00933 hDca_r1->Scale(1./Sum1_Real); 00934 //hDca_r1->Draw("same"); 00935 00936 //Now Previous Embedding 00937 00938 Int_t bin_ptl = hYG->FindBin(pt[i]); 00939 Int_t bin_pth = hYG->FindBin(pt[i+1]); 00940 00941 TH1D *hDcaNew = (TH1D*)hDcaG1->ProjectionZ(namexx+i,bin_nch1, bin_nch2, bin_ptl, bin_pth); 00942 //Sum_MC = hDcaNew ->GetSum(); 00943 for(int kkk=1;kkk<hDcaNew->GetNbinsX();kkk++)Sum_MC += hDcaNew->GetBinContent(kkk); 00944 cout<<Sum_MC<<endl; 00945 00946 hDcaNew->Scale(1./Sum_MC); 00947 hDcaNew ->SetLineColor(4); 00948 hDcaNew->Draw("same"); 00949 00950 //keySymbol(.4, .95,text1,1,1); 00951 keyLine(0.4, 0.90,"MatGlobal Tracks",2); 00952 //keyLine(0.4, 0.85,"MuDst",1); 00953 keyLine(0.4, 0.80,"Ghost Tracks",4); 00954 } 00955 00956 00957 c->Update(); 00958 c->SaveAs("/home/mcsuarez/Embed/P08id/dca_f1.38.gif"); 00959 00960 00961 00962 00963 //=================================================== 00964 //NFIT 00965 //============================================================= 00966 00967 TCanvas *c1= new TCanvas("c1","NFIT",400, 800); 00968 c1->Divide(1,nPtBin); 00969 c1->SetGridx(0); 00970 c1->SetGridy(0); 00971 00972 //Bins for Multiplicity -Matched tracks 00973 00974 TH1D *hX1 = (TH1D*)hNfit1->Project3D("X"); 00975 00976 Int_t bin_nch1 = hX1->FindBin(nch1); 00977 Int_t bin_nch2 = hX1->FindBin(nch2);//this should be the same for both graphs (for 3 graphs) 00978 00979 //Bins for Pt 00980 00981 TString name_nfit1 = "hNfit1"; 00982 TString name_nfitr1 = "hNfitr1"; 00983 TString name_nfit = "hNfit"; 00984 00985 TH1D *hY1 = (TH1D*)hNfit1->Project3D("Y"); 00986 TH1D *hY1_r = (TH1D*)hNfit1r->Project3D("Y"); 00987 TH1D *hYG = (TH1D*)hNfitG1->Project3D("Y"); 00988 00989 for(Int_t i=0; i<nPtBin ; i++) 00990 00991 { 00992 c1->cd(i+1); 00993 00994 Double_t Sum1_Nfit_MC = 0; 00995 Double_t Sum1_Nfit_Real = 0; 00996 Double_t Sum_Nfit_MC = 0; 00997 00998 Int_t bin_ptl_1 = hY1->FindBin(pt[i]); 00999 Int_t bin_pth_1 = hY1->FindBin(pt[i+1]); 01000 01001 TH1D *hNfitNew1= (TH1D*)hNfit1->ProjectionZ(name_nfit1+i,bin_nch1, bin_nch2, bin_ptl_1, bin_pth_1); 01002 //Sum1_Nfit_MC = hNfitNew1 ->GetSum(); 01003 for(int kkk=1;kkk<hNfitNew1->GetNbinsX();kkk++)Sum1_Nfit_MC += hNfitNew1->GetBinContent(kkk); 01004 cout<<Sum1_Nfit_MC<<endl; 01005 01006 hNfitNew1->Scale(1./Sum1_Nfit_MC); 01007 hNfitNew1 ->SetLineColor(2); 01008 hNfitNew1->Draw(); 01009 01010 hNfitNew1->SetXTitle("Nfit"); 01011 01012 //sprintf(title," %.2f GeV < pT < %.2f GeV, %d < nch < %d", pt[i],pt[i+1],nch1,nch2); 01013 sprintf(title," %.2f GeV/c < pT < %.2f GeV/c", pt[i],pt[i+1],nch1,nch2); 01014 //hNfitNew1->SetTitle("Scale factor = 1.38"); 01015 hNfitNew1->SetTitle(title); 01016 01017 //----Now MuDSt 01018 01019 Int_t bin_ptrl_1r = hY1_r->FindBin(pt[i]); 01020 Int_t bin_ptrh_1r = hY1_r->FindBin(pt[i+1]); 01021 01022 TH1D *hNfit_r1= (TH1D*)hNfit1r->ProjectionZ(name_nfitr1+i,bin_nch1, bin_nch2, bin_ptrl_1r, bin_ptrh_1r); 01023 //Sum1_Nfit_Real = hNfit_r1 ->GetSum(); 01024 01025 for(int kkk=1;kkk<hNfit_r1->GetNbinsX();kkk++)Sum1_Nfit_Real += hNfit_r1->GetBinContent(kkk); 01026 cout<<Sum1_Nfit_Real<<endl; 01027 hNfit_r1->Scale(1./Sum1_Nfit_Real); 01028 //hNfit_r1->Draw("same"); 01029 01030 //Now Previous Embedding 01031 01032 Int_t bin_ptl = hYG->FindBin(pt[i]); 01033 Int_t bin_pth = hYG->FindBin(pt[i+1]); 01034 01035 TH1D *hNfitNew = (TH1D*)hNfitG1->ProjectionZ(name_nfit+i,bin_nch1, bin_nch2, bin_ptl, bin_pth); 01036 //Sum_Nfit_MC = hNfitNew ->GetSum(); 01037 for(int kkk=1;kkk<hNfitNew->GetNbinsX();kkk++)Sum_Nfit_MC += hNfitNew->GetBinContent(kkk); 01038 cout<<Sum_Nfit_MC<<endl; 01039 01040 hNfitNew->Scale(1./Sum_Nfit_MC); 01041 hNfitNew ->SetLineColor(4); 01042 hNfitNew->Draw("same"); 01043 01044 //keySymbol(.2, .95,text1,1,1); 01045 keyLine(0.2, 0.90,"MatGlobal Tracks",2); 01046 //keyLine(0.2, 0.85,"MuDst",1); 01047 keyLine(0.2, 0.80,"Ghost Tracks",4); 01048 } 01049 01050 c1->Update(); 01051 c1->SaveAs("/home/mcsuarez/Embed/P08id/nfit_f1.38.gif"); 01052 01053 return; 01054 01055 01056 01057 // =============================================================== 01058 //Efficiency vs pT 01059 //this make sense just when reconstructed particels is the same as embedded (?) 01060 01061 void PlotEfficiency(const TH1* hData, const TH1* hMC) 01062 { 01063 TCanvas *c1= new TCanvas(Form("c%d", iCanvas), Form("c%d", iCanvas)); 01064 hData->Rebin(2); 01065 hMC->Rebin(2); 01066 01067 TH1* hRatio = (TH1D*) hData->Clone(); 01068 hRatio->Divide(hMC); 01069 hRatio->SetLineColor(1); 01070 hRatio->SetMarkerStyle(23); 01071 hRatio->SetMarkerColor(1); 01072 hRatio->SetXTitle ("p_{T} (GeV/c)"); 01073 hRatio->SetAxisRange(0.0, 6.0, "X"); 01074 01075 hRatio->Draw(); 01076 01077 c1->cd(); 01078 c1->Update(); 01079 c1->SaveAs("eff.gif"); 01080 01081 // PtM2->Rebin(2); 01082 // PtMc2->Rebin(2); 01083 // 01084 // PtM2->Divide(PtMc2); 01085 // PtM2->SetLineColor(9); 01086 // PtM2->SetMarkerStyle(21); 01087 // PtM2->SetMarkerColor(9); 01088 // PtM2->Draw("same"); 01089 // 01090 // PtM3->Rebin(2); 01091 // PtMc3->Rebin(2); 01092 // 01093 // PtM3->Divide(PtMc2); 01094 // PtM3->SetLineColor(2); 01095 // PtM3->SetMarkerStyle(22); 01096 // PtM3->SetMarkerColor(2); 01097 // PtM3->Draw("same"); 01098 01099 01100 //============================================================ 01101 // Vertex xx yy zz 01102 //Not too much sense 01103 01104 TCanvas *cv1= new TCanvas("cv1","Vertex position",600, 400); 01105 01106 cv1->Divide(3,1); 01107 01108 cv1_1->cd(); 01109 01110 vxx1->SetXTitle("MonteCarlo Vertex X"); 01111 vxx1->SetYTitle("Matched Vertex X"); 01112 01113 vxx1->Draw(); 01114 01115 cv1_2->cd(); 01116 01117 vyy1->SetXTitle("MonteCarlo Vertex Y"); 01118 vyy1->SetYTitle("Matched Vertex Y"); 01119 vyy1->Draw(); 01120 01121 cv1_3->cd(); 01122 01123 vzz1->SetXTitle("MonteCarlo Vertex Z"); 01124 vzz1->SetYTitle("Matched Vertex Z"); 01125 vzz1->Draw(); 01126 01127 cv1->Update(); 01128 cv1->SaveAs("/home/mcsuarez/Embed/P08id/Vertex_xyz.gif"); 01129 01130 01131 01132 //======================================================================== 01133 //Energy loss 01134 //================================================================= 01135 01136 TCanvas *c7= new TCanvas("c7","Energy Loss",400, 400); 01137 01138 c7->SetGridx(0); 01139 c7->SetGridy(0); 01140 c7->SetLeftMargin(0.20); 01141 c7->SetRightMargin(0.05); 01142 c7->cd(); 01143 01144 hPtM_E1->ProfileX("pfx"); 01145 pfx->SetAxisRange(-0.01, 0.01, "Y"); 01146 pfx->SetAxisRange(0, 2.5, "X"); 01147 pfx->GetYaxis()->SetDecimals(); 01148 pfx->SetMarkerStyle(23); 01149 pfx->SetMarkerSize(0.038); 01150 pfx->SetMarkerColor(4); 01151 pfx->SetLineColor(4); 01152 pfx->SetXTitle ("Pt-Reco"); 01153 pfx->SetYTitle ("ptM - PtMc"); 01154 pfx->SetTitleOffset(2,"Y"); 01155 01156 pfx->Draw(); 01157 01158 01159 hPtM_E1->ProfileX("pfx1"); 01160 pfx1->SetAxisRange(-0.007, 0.007, "Y"); 01161 pfx1->GetYaxis()->SetDecimals(); 01162 pfx1->SetLineColor(2); 01163 pfx1->SetMarkerSize(0.035); 01164 pfx1->SetXTitle ("Pt-Reco"); 01165 pfx1->SetYTitle ("ptM - PtMc"); 01166 pfx1->SetTitleOffset(2,"Y"); 01167 01168 pfx1->Draw("same"); 01169 01170 01171 c7->Update(); 01172 c7->SaveAs("/home/mcsuarez/Embed/P08id/eloss_f1.38.gif"); 01173 01174 01175 //==================================================== 01176 //Dedx (p08ic) 01177 //======================================================= 01178 01179 01180 TCanvas *c88= new TCanvas("c88","dEdx vs P (P08ic)", 600, 600); 01181 01182 c88->SetGridx(0); 01183 c88->SetGridy(0); 01184 c88->SetLeftMargin(0.15); 01185 c88->SetRightMargin(0.05); 01186 c88->cd(); 01187 gStyle->SetOptDate(0); 01188 01189 dedx1R->SetTitle("dEdx vs P (P08ic)"); 01190 dedx1R->SetXTitle("Momentum P (GeV/c)"); 01191 dedx1R->SetYTitle("dE/dx (x10^{-6})"); 01192 dedx1R->SetAxisRange(0, 5., "X"); 01193 dedx1R->SetAxisRange(0, 8., "Y"); 01194 dedx1R->SetMarkerColor(1); 01195 dedx1R->Draw();//"colz"); 01196 01197 c88->Update(); 01198 c88->SaveAs("dedx_p08ic.gif"); 01199 */
1.5.9