51 lines
1.7 KiB
C
51 lines
1.7 KiB
C
{
|
|
TFile *file0 = TFile::Open("SimAnasen1.root");
|
|
file0->ls();
|
|
TTree *tree1 = (TTree*)(file0->Get("tree1"));
|
|
new TBrowser();
|
|
tree1->Draw("Tb:thetab","","col");
|
|
tree1->Draw("Tb:thetab","vZ>-140 && vZ<-130", "box same");
|
|
TH2F *h2 = new TH2F("EPCvEsx3", "EPC x sin(thetab) vs Esx3;Esx3;EPC * sin(thetab * TMath::DegToRad())", 200, 0, 0, 200, 0, 0); //arguments are (name, title, nbinsX, xlow, xup, nbinsY, ylow, yup)
|
|
tree1->Draw("EPC*sin(thetab * TMath::DegToRad()):Esx3 >> EPCvEsx3", "Esx3 > 0", "colz");
|
|
|
|
/*
|
|
new TCanvas();
|
|
TH2F *h3 = new TH2F(
|
|
"hExReconVsVZ",
|
|
"Ex_recon vs vZ;vZ (mm);Excitation energy (MeV)",
|
|
100, 0, 0,
|
|
100, -1, 0
|
|
);
|
|
tree1->Draw("Ex_recon:vZ>>hExReconVsVZ", "sx3ID >= 0", "colz");
|
|
|
|
TH2F *h4 = new TH2F(
|
|
"hExVsVZ",
|
|
"",
|
|
100, 0, 0,
|
|
100, -1, 0
|
|
);
|
|
tree1->Draw("Ex:vZ>>hExVsVZ", "sx3ID >= 0", "box same");*/
|
|
/*
|
|
new TCanvas();
|
|
tree1->Draw("originalEnergy:Tb", "sx3ID >=0", "");
|
|
TF1 *f_diagonal = new TF1("f_diagonal", "x", 0, 200); // assuming the range for Tb is 0 to 200
|
|
f_diagonal->SetLineColor(kRed);
|
|
f_diagonal->SetLineStyle(2);
|
|
f_diagonal->Draw("same");*/
|
|
/*
|
|
TH2F *h5 = new TH2F("Excitation Energy vs vZ", "Excitation Energy vs vZ;vZ (mm);Excitation energy (MeV)", 300, 0, 0, 300, 0, 0); //arguments are (name, title, nbinsX, xlow, xup, nbinsY, ylow, yup)
|
|
tree1->Draw("Ex_recon:vZ >> hExReconVsVZ", "sx3ID >= 0", "colz");
|
|
tree1->Draw("Ex:vZ >> h5", "sx3ID >= 0 && EPC >= 0.03", "same");
|
|
*/
|
|
new TCanvas("c1", "Canvas", 900, 600);
|
|
tree1->Draw("Ex_recon:vZ_recon>>h2(800,-500,300,110,-1,10)", "sx3ID >=0", "colz");
|
|
tree1->Draw("Ex:vZ", "sx3ID >=0", "same");
|
|
c1->SaveAs("Ex_recon.png");
|
|
|
|
new TCanvas("c2", "Canvas", 900, 600);
|
|
tree1->Draw("theta_recon:thetab", "sx3ID >=0", "");
|
|
c2->SaveAs("theta_recon_vs_thetab.png");
|
|
|
|
|
|
}
|