本文整理汇总了C++中TTree::SetMarkerColorAlpha方法的典型用法代码示例。如果您正苦于以下问题:C++ TTree::SetMarkerColorAlpha方法的具体用法?C++ TTree::SetMarkerColorAlpha怎么用?C++ TTree::SetMarkerColorAlpha使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TTree
的用法示例。
在下文中一共展示了TTree::SetMarkerColorAlpha方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: drawCutTrees
void drawCutTrees(const char * filter="sinsub_10_3_ad_2")
{
TFile *f = new TFile (TString::Format("thermalCutTrees_%s.root",filter));
TTree * signal = (TTree*) f->Get("signal_in");
TTree * bg = (TTree*) f->Get("bg_in");
signal->SetMarkerColorAlpha(3,0.05);
signal->SetMarkerStyle(1);
TCanvas * c = new TCanvas(filter,filter,1000,1000);
c->Divide(2,2);
c->cd(1);
gPad->SetLogz();
bg->Draw("coherentHilbertPeak:mapPeak >> h1(100,0,0.5,100,0,300)","","colz");
signal->Draw("coherentHilbertPeak:mapPeak","","psame");
c->cd(2);
bg->Draw("coherentHilbertPeak:mapPeak >> h2(100,0,0.5,100,0,300)","dPhiSun > 10","colz");
signal->Draw("coherentHilbertPeak:mapPeak","","psame");
gPad->SetLogz();
c->cd(3);
bg->Draw("coherentHilbertPeak:mapPeak >> h3(100,0,0.5,100,0,300)","dPhiNorth > 90","colz");
signal->Draw("coherentHilbertPeak:mapPeak","","psame");
gPad->SetLogz();
c->cd(4);
bg->Draw("coherentHilbertPeak:mapPeak >> h4(100,0,0.5,100,0,300)","dPhiNorth > 90 && dPhiSun > 10","colz");
signal->Draw("coherentHilbertPeak:mapPeak","","psame");
gPad->SetLogz();
c = new TCanvas("deconv","deconv",1000,1000);
c->Divide(2,2);
c->cd(1);
gPad->SetLogz();
bg->Draw("deconvHilbertPeak:mapPeak >> h1(100,0,0.5,100,0,300)","","colz");
signal->Draw("deconvHilbertPeak:mapPeak","","psame");
c->cd(2);
bg->Draw("deconvHilbertPeak:mapPeak >> h2(100,0,0.5,100,0,300)","dPhiSun > 10","colz");
signal->Draw("deconvHilbertPeak:mapPeak","","psame");
gPad->SetLogz();
c->cd(3);
bg->Draw("deconvHilbertPeak:mapPeak >> h3(100,0,0.5,100,0,300)","dPhiNorth > 90","colz");
signal->Draw("deconvHilbertPeak:mapPeak","","psame");
gPad->SetLogz();
c->cd(4);
bg->Draw("deconvHilbertPeak:mapPeak >> h4(100,0,0.5,100,0,300)","dPhiNorth > 90 && dPhiSun > 10","colz");
signal->Draw("deconvHilbertPeak:mapPeak","","psame");
gPad->SetLogz();
}
示例2: plot
void plot(){
//TH2F *hframe = new TH2F("hframe","Edep_tot vs. track length p=180MeV/C",50,0,50,100,178.0,179.0);
//TH2F *hframe = new TH2F("hframe","Edep_tot vs. track length p=120MeV/c",50,0,50,100,115.2,116.8);
// TH2F *hframe = new TH2F("hframe","Edep_tot vs. track length p=90MeV/c",500,0,50,100,79.5,83.0);
TH2F *hframe = new TH2F("hframe","Edep_tot vs. track length p=72MeV/c",500,0,50,100,45.5,56.1);
// TH2F *hframe = new TH2F("hframe","Edep_tot vs. track length p=65MeV/c",500,0,50,100,0.5,46.1);
TTree *MyTree = new TTree("MyTree", "MyTree");
MyTree->ReadFile("Rout_proton72mevOnSolenoid3LIV.txt","track:edep");
MyTree->SetMarkerStyle(kCircle);
MyTree->SetMarkerColorAlpha(kRed, 0.35);
hframe->Draw(); //you can set the axis att via hframe->GetXaxis()..
MyTree->Draw("edep:track","","same");
/*
TTree *MyTree1 = new TTree("MyTree1", "MyTree1");
MyTree1->ReadFile("Rout_proton120mevOnSolenoid3STD.txt","track1:edep1");
MyTree1->SetMarkerStyle(kOpenSquare);
MyTree1->SetMarkerColorAlpha(kBlue, 0.35);
MyTree1->Draw("edep1:track1","","same");
*/
}
示例3: kf_plot
void kf_plot(){
TH1F *hframe = new TH1F("hframe","momentum resolution",100,-10.,10.);
hframe->Draw(); //you can set the axis att via hframe->GetXaxis()..
gPad->SetLogx(0);
hframe->GetXaxis()->SetTitle(" #Delta p_T /p_T [%]");
hframe->GetYaxis()->SetTitle("Number of event");
TLatex Tl; Tl.SetTextFont(43); Tl.SetTextSize(20);
double pTresol,pXresol,pYresol;
int nline =0;
TTree *MyTree = new TTree("MyTree", "MyTree");
MyTree->ReadFile("helix_out.txt","pTresol:pXresol:pYresol");
MyTree->SetMarkerStyle(kCircle);
MyTree->SetMarkerColorAlpha(kRed, 0.3);
while(1){
hframe->Fill(pTresol);
nline++;
}
hframe->Draw("same");
Tl.DrawLatex(10, 142, "open: p_T resolution(helix)");
}
示例4: plot2
void plot2(){
TH2F *hframe = new TH2F("hframe","Edep_tot vs. track length for various momenta",50,0,50,1000,0.5,180.0);
hframe->Draw(); //you can set the axis att via hframe->GetXaxis()..
gPad->SetLogx(0);
hframe->GetXaxis()->SetTitle("Track Length [mm]");
hframe->GetYaxis()->SetTitle("Total Energy [MeV]");
TLatex Tl; Tl.SetTextFont(43); Tl.SetTextSize(20);
TTree *MyTree = new TTree("MyTree", "MyTree");
MyTree->ReadFile("Rout_proton65mevOnSolenoid3LIV.txt","track:edep");
MyTree->SetMarkerStyle(kCircle);
MyTree->SetMarkerColorAlpha(kRed, 0.3);
MyTree->Draw("edep:track","","same");
TTree *MyTreeB = new TTree("MyTreeB", "MyTreeB");
MyTreeB->ReadFile("Rout_proton65mevOnSolenoid3STD.txt","trackB:edepB");
MyTreeB->SetMarkerStyle(kFullCircle);
MyTreeB->SetMarkerColorAlpha(kRed, 0.3);
MyTreeB->Draw("edepB:trackB","","same");
Tl.DrawLatex(5, 25, "p_{s} = 65 MeV/c @ vtx=0.0");
TTree *MyTree1 = new TTree("MyTree1", "MyTree1");
MyTree1->ReadFile("Rout_proton72mevOnSolenoid3LIV.txt","track1:edep1");
MyTree1->SetMarkerStyle(kOpenSquare);
MyTree1->SetMarkerColorAlpha(kBlue, 0.3);
MyTree1->Draw("edep1:track1","","same");
TTree *MyTree1B = new TTree("MyTree1B", "MyTree1B");
MyTree1B->ReadFile("Rout_proton72mevOnSolenoid3STD.txt","track1B:edep1B");
MyTree1B->SetMarkerStyle(kFullSquare);
MyTree1B->SetMarkerColorAlpha(kBlue, 0.3);
MyTree1B->Draw("edep1B:track1B","","same");
Tl.DrawLatex(10, 43, "p_{s} = 72 MeV/c");
TTree *MyTree2 = new TTree("MyTree2", "MyTree2");
MyTree2->ReadFile("Rout_proton90mevOnSolenoid3LIV.txt","track2:edep2");
MyTree2->SetMarkerStyle(kOpenTriangleUp);
MyTree2->SetMarkerColorAlpha(kGreen, 0.3);
MyTree2->Draw("edep2:track2","","same");
TTree *MyTree2B = new TTree("MyTree2B", "MyTree2B");
MyTree2B->ReadFile("Rout_proton90mevOnSolenoid3STD.txt","track2B:edep2B");
MyTree2B->SetMarkerStyle(kFullTriangleUp);
MyTree2B->SetMarkerColorAlpha(kGreen, 0.3);
MyTree2B->Draw("edep2B:track2B","","same");
Tl.DrawLatex(15, 70, "p_{s} = 90 MeV/c");
TTree *MyTree3 = new TTree("MyTree3", "MyTree3");
MyTree3->ReadFile("Rout_proton120mevOnSolenoid3LIV.txt","track3:edep3");
MyTree3->SetMarkerStyle(kOpenDiamond);
MyTree3->SetMarkerColorAlpha(kMagenta, 0.3);
MyTree3->Draw("edep3:track3","","same");
TTree *MyTree3B = new TTree("MyTree3B", "MyTree3B");
MyTree3B->ReadFile("Rout_proton120mevOnSolenoid3STD.txt","track3B:edep3B");
MyTree3B->SetMarkerStyle(kFullDiamond);
MyTree3B->SetMarkerColorAlpha(kMagenta, 0.3);
MyTree3B->Draw("edep3B:track3B","","same");
Tl.DrawLatex(20, 105, "p_{s} = 120 MeV/c");
TTree *MyTree4 = new TTree("MyTree4", "MyTree4");
MyTree4->ReadFile("Rout_proton180mevOnSolenoid3LIV.txt","track4:edep4");
MyTree4->SetMarkerStyle(kOpenTriangleDown);
MyTree4->SetMarkerColorAlpha(kBlack, 0.3);
MyTree4->Draw("edep4:track4","","same");
TTree *MyTree4B = new TTree("MyTree4B", "MyTree4B");
MyTree4B->ReadFile("Rout_proton180mevOnSolenoid3STD.txt","track4B:edep4B");
MyTree4B->SetMarkerStyle(kFullTriangleDown);
MyTree4B->SetMarkerColorAlpha(kBlack, 0.3);
MyTree4B->Draw("edep4B:track4B","","same");
Tl.DrawLatex(25, 170, "p_{s} = 180 MeV/c");
Tl.DrawLatex(10, 142, "open:LIV, full:STD,(0.1% lower)");
}