本文整理汇总了C++中TGraph::IsZombie方法的典型用法代码示例。如果您正苦于以下问题:C++ TGraph::IsZombie方法的具体用法?C++ TGraph::IsZombie怎么用?C++ TGraph::IsZombie使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TGraph
的用法示例。
在下文中一共展示了TGraph::IsZombie方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
//Define canvases to save and check results
Char_t canvas_title[40];
sprintf(canvas_title,"Direct CrossTalk OV = %2.2f V",V_meas);
c1[i] = new TCanvas(canvas_title,canvas_title,100,100,900,700);
sprintf(canvas_title,"Delayed CrossTalk OV = %2.2f V",V_meas);
c2[i] = new TCanvas(canvas_title,canvas_title,100,100,900,700);
sprintf(canvas_title,"After Pulse OV = %2.2f V",V_meas);
c3[i] = new TCanvas(canvas_title,canvas_title,100,100,900,700);
sprintf(canvas_title,"Clean OV = %2.2f V",V_meas);
c4[i] = new TCanvas(canvas_title,canvas_title,100,100,900,700);
Cleanwaves[i]=new TMultiGraph();
sprintf(canvas_title,"Exponential fit, #tau_l OV = %2.2f V",V_meas);
expfit_longtau_c[i] = new TCanvas(canvas_title,canvas_title,300,100,900,500);
sprintf(canvas_title,"Exponential fit OV = %2.2f V",V_meas);
expfit_AP_c[i] = new TCanvas(canvas_title,canvas_title,300,100,900,500);
Expfit_longtau[i]= new TGraph();
Expfit_AP[i]= new TGraph();
//loop over every measurement on a folder
for (int j=0; j<data_size; j++) {
Char_t datafilename[200];
Char_t datashortfilename[100];
sprintf(datafilename,"%s%s/C1H%05i.csv",globalArgs.data_folder,vol_folders.at(i).Data(),j);
sprintf(datashortfilename,"%s_C1H%05i",vol_folders.at(i).Data(),j);
//Get the data of a single file:
waveform = new TGraph(datafilename,"%lg %lg","/t;,");
if (waveform->IsZombie()) continue;
waveform->SetName(datashortfilename);
waveform->SetTitle("");
Int_t ROWS_DATA = waveform->GetN();
Double_t *time = waveform->GetX();
Double_t *volts = waveform->GetY();
Amp = waveform->GetY()[0];
/////////////////////////////////////////////////////
// Data filtering into the different type of events
// direct x-talk AP delayed x-talk
/////////////////////////////////////////////////////
after_pulse = 0;
xtalk_pulse = 0;
direct_xtalk_pulse = 0;
sig_max = 0;
max_cnt = 0;
max_found = 0;
/////////////////////////////////////////////////////
// direct x-talk
for (row = 0; row < ROWS_DATA; row++) {
if ((time[row]>0 * ns)&(volts[row] > direct_xtalk_th_v.at(i) * pe)) {// time larger 0ns
direct_xtalk_pulse++;
}
}
/////////////////////////////////////////////////////
// after-pulse threshold
示例2: AnalysisSparse
//.........这里部分代码省略.........
gr_true_eff->GetErrorX(i), gr_true_eff->GetErrorY(i));
if (!save_output) continue;
gSystem->mkdir(dir_prefix.Data());
tout = Form("%f %f %f %f", oux, ouy, ouxe, ouye);
if (i == 0)
tout = Form("Printf(\"%s\"); > %s/effi_%s", tout.Data(),
dir_prefix.Data(), grapht.Data());
else
tout = Form("Printf(\"%s\"); >> %s/effi_%s", tout.Data(),
dir_prefix.Data(), grapht.Data());
// Printf(":::::: %s", tout.Data());
gROOT->ProcessLine(tout.Data());
}
// ------------------
c = new TCanvas("cfinal", "mc_effi", 1200, 450);
c->Divide(2, 1, 0.001, 0.001); c->Modified(); c->Draw();
c->cd(1);
gr_true->SetMinimum(0);
gr_true->SetTitle(Form("phi (true & raw), %s", gtitle.Data()));
gr_true->SetMarkerColor(kGreen+1);
gr_true->Draw("AP");
gr->SetMarkerColor(kRed+1);
gr->Draw("P");
c->cd(2)->SetGrid();
gr_true_eff->SetMinimum(0);
gr_true_eff->SetTitle(Form("efficiency, %s", grapht.Data()));
gr_true_eff->SetMarkerColor(kGreen+1);
gr_true_eff->Draw("AP");
gr_e->SetMarkerColor(kRed+1);
gr_e->Draw("P");
// c->SaveAs(Form("%s_%s.eps", blabla.Data(), grapht.Data()));
return;
}
// TGraph *geff = new TGraph(Form("effi_raw_%s", grapht.Data()));
// TGraph *geff = new TGraph(Form("effi_true_%s", grapht.Data()));
// TGraph *geff = new TGraph("effi_true_Phi2010_qualityonly");
TGraph *geff = new TGraph("effi_true_PhiNsigma_qualityonly");
if (geff->IsZombie()) return;
geff->SetMarkerStyle(22);
geff->SetMarkerColor(kBlack);
geff->GetXaxis()->SetTitle("p_{t}, GeV/c");
geff->SetTitle(Form("efficiency, %s", grapht.Data()));
c = new TCanvas();
c->SetGrid();
geff->Draw("AP");
Double_t tpcsigma = 9999.9;
if (ilist == 1) tpcsigma = 1.0;
if (ilist == 2) tpcsigma = 1.5;
if (ilist == 3) tpcsigma = 2.0;
if (ilist == 4) tpcsigma = 2.5;
if (ilist == 5) tpcsigma = 3.0;
Double_t sss = TMath::Erf(tpcsigma/TMath::Sqrt(2.0));
if (noSigma) sss = 1.0;
Printf("sigma = %10f", sss);
// for (Int_t i = 0; i < count; i++)
// geff->GetY()[i] = (sss*sss)/(geff->GetY()[i]);
// geff->SetMaximum(1.0);
// geff->Draw("AP");
for (Int_t i = 0; i < count; i++) {
Double_t deno = geff->Eval(grx[i])*sss*sss;
if (deno < 0.00001) deno = 1;
gry_fix[i] = gry[i]/deno;
}
new TCanvas;
TGraph *gr_fix = new TGraph(count, grx, gry_fix);
gr_fix->SetMarkerStyle(21);
gr_fix->SetMarkerColor(hh->GetLineColor());
gr_fix->GetXaxis()->SetTitle("p_{t}, GeV/c");
gr_fix->SetTitle(Form("corrected phi * #sigma^{2}, %s", gtitle.Data()));
if (noSigma)
gr_fix->SetTitle(Form("corrected phi (no #sigma), %s", gtitle.Data()));
gr_fix->Draw("AP");
//---------------------
c = new TCanvas("cfinald", "data_correct", 1200, 450);
c->Divide(2, 1, 0.001, 0.001); c->Modified(); c->Draw();
c->cd(1);
gr->SetMinimum(0);
gr->SetMarkerColor(kBlack);
gr->Draw("AP");
c->cd(2);
gr_fix->SetMinimum(0);
gr_fix->SetMarkerColor(kGreen+3);
gr_fix->Draw("AP");
TString bla9 = Form("qualityonly_PID2_%s", grapht.Data());
if (noSigma) bla9 = Form("%s_noSig.C", bla9.Data());
else bla9 = Form("%s.C", bla9.Data());
// gr_fix->SaveAs(bla9.Data());
// TPad *cp = new TPad("cpf", "", 0.45,0.45,0.99,0.92);
TPad *cp = new TPad("cpf", "", 0.60,0.55,0.99,0.93);
cp->SetLogy(); cp->Draw(); cp->cd();
TGraph *cloneg = ((TGraph *)gr_fix->Clone());
cloneg->SetTitle(); cloneg->SetMarkerSize(0.8);
cloneg->Draw("AP");
// c->SaveAs(Form("%s_%s.eps", blabla.Data(), grapht.Data()));
f->Close();
}