- By default, grep is case-sensitive (use -i to ignore case).
- By default, grep ignores the context of a string (use -w to match words only).
- By default, grep shows the lines that match (use -v to show those that don't match).
4/28/2010
Grep ignore case
TVector3 is very useful when calculating the distance
TVector3 coreTankVec = stationPos - showerCore ;
TVector3 distanceVector=coreTankVec.Cross(showerAxis);
test_distance=distanceVector.Mag();
TVector3 distanceVector=coreTankVec.Cross(showerAxis);
test_distance=distanceVector.Mag();
Two Important indications about shower primaries
Xmax:
As a shower induced by an heavy nuclei develops earlier and faster, the expected value of Xmax is smaller than in the case of a proton.
Muonic Fraction:
The muonic fraction is expected to be larger in the case of an heavy nuclei.
As a shower induced by an heavy nuclei develops earlier and faster, the expected value of Xmax is smaller than in the case of a proton.
Muonic Fraction:
The muonic fraction is expected to be larger in the case of an heavy nuclei.
4/23/2010
4/19/2010
Overflow and Underflow display in root
gStyle->SetOptStat(111111);
http://root.cern.ch/root/html/TStyle.html
but do not forget to include the library
#include "TStyle.h"
4/16/2010
Combining ps files and pdf files
- Ps files
To merge the files `slide1.ps', `slide2.ps', and `slide3.ps' into a new PostScript file, `slideshow.ps', type:
$ psmerge -oslideshow.ps slide1.ps slide2.ps slide3.ps to install psmerge, in ubuntu type: $ sudo apt-get install psutils
Pdf files
$ sudo apt-get install pdftk
Now you can merge pdf files by putting them in the same directory and typing:
$ pdftk 1.pdf 2.pdf 3.pdf cat output merged.pdf
or if you wish to merge files in alphabetical order you can simply type:
$ pdftk *.pdf cat output merged.pdf
Make Scatter Plot, TGraph is better than TH2F
TGraph *gr1 = new TGraph(10);
gr1->SetFillColor(6);
gr1->SetFillStyle(3005);
gr1->SetLineColor(6);
gr1->SetLineWidth(603);
gr1->SetPoint(0,140,0.5);
gr1->SetPoint(1,130,2.9);
gr1->SetPoint(2,124.677,3.83726);
gr1->SetPoint(3,113.362,6.06903);
gr1->SetPoint(4,108.513,8.00221);
gr1->SetPoint(5,111.746,10.0272);
gr1->SetPoint(6,119.828,12.8419);
gr1->SetPoint(7,135.991,30.0872);
gr1->SetPoint(8,140,40);
gr1->SetPoint(9,135,60);
gr1->Draw("C");
TLatex *tex = new TLatex(140.841,37.9762,
"#leftarrow t #rightarrow bH^{+}, H^{+} #rightarrow #tau#nu");
tex->SetTextColor(6);
tex->Draw();
gr1->SetFillColor(6);
gr1->SetFillStyle(3005);
gr1->SetLineColor(6);
gr1->SetLineWidth(603);
gr1->SetPoint(0,140,0.5);
gr1->SetPoint(1,130,2.9);
gr1->SetPoint(2,124.677,3.83726);
gr1->SetPoint(3,113.362,6.06903);
gr1->SetPoint(4,108.513,8.00221);
gr1->SetPoint(5,111.746,10.0272);
gr1->SetPoint(6,119.828,12.8419);
gr1->SetPoint(7,135.991,30.0872);
gr1->SetPoint(8,140,40);
gr1->SetPoint(9,135,60);
gr1->Draw("C");
TLatex *tex = new TLatex(140.841,37.9762,
"#leftarrow t #rightarrow bH^{+}, H^{+} #rightarrow #tau#nu");
tex->SetTextColor(6);
tex->Draw();
4/11/2010
Use FindRoot in Mathematica
Sometimes Solve or NSolve in Mathematica does not work in Complicated
Equations, for this case, FindRoot is a good tool.
http://reference.wolfram.com/mathematica/ref/FindRoot.html
Equations, for this case, FindRoot is a good tool.
http://reference.wolfram.com/mathematica/ref/FindRoot.html
4/09/2010
Set X axis label
TH1I* particleDistr= new TH1I("particleDistr", "", 13, 1, 14);
particleDistr->GetXaxis()->SetLabelSize(0.08);
particleDistr->GetXaxis()->SetBinLabel(1,"#gamma");
particleDistr->GetXaxis()->SetBinLabel(2,"e^{+}");
particleDistr->GetXaxis()->SetBinLabel(3,"e^{-}");
particleDistr->GetXaxis()->SetBinLabel(4,"#mu^{+}");
particleDistr->GetXaxis()->SetBinLabel(5,"#mu^{-}");
particleDistr->GetXaxis()->SetBinLabel(6,"#tau^{+}");
particleDistr->GetXaxis()->SetBinLabel(7,"#tau^{-}");
particleDistr->GetXaxis()->SetBinLabel(8,"#pi^{0}");
particleDistr->GetXaxis()->SetBinLabel(9,"#pi^{+}");
particleDistr->GetXaxis()->SetBinLabel(10,"#pi^{-}");
particleDistr->GetXaxis()->SetBinLabel(11,"n");
particleDistr->GetXaxis()->SetBinLabel(12,"p^{#pm}");
particleDistr->GetXaxis()->SetBinLabel(13,"?");
fTracesObjects->Add(particleDistr);
particleDistr->GetXaxis()->SetLabelSize(0.08);
particleDistr->GetXaxis()->SetBinLabel(1,"#gamma");
particleDistr->GetXaxis()->SetBinLabel(2,"e^{+}");
particleDistr->GetXaxis()->SetBinLabel(3,"e^{-}");
particleDistr->GetXaxis()->SetBinLabel(4,"#mu^{+}");
particleDistr->GetXaxis()->SetBinLabel(5,"#mu^{-}");
particleDistr->GetXaxis()->SetBinLabel(6,"#tau^{+}");
particleDistr->GetXaxis()->SetBinLabel(7,"#tau^{-}");
particleDistr->GetXaxis()->SetBinLabel(8,"#pi^{0}");
particleDistr->GetXaxis()->SetBinLabel(9,"#pi^{+}");
particleDistr->GetXaxis()->SetBinLabel(10,"#pi^{-}");
particleDistr->GetXaxis()->SetBinLabel(11,"n");
particleDistr->GetXaxis()->SetBinLabel(12,"p^{#pm}");
particleDistr->GetXaxis()->SetBinLabel(13,"?");
fTracesObjects->Add(particleDistr);
订阅:
博文 (Atom)
