Skip to content
Snippets Groups Projects
Commit 51ec1519 authored by de Séréville Nicolas's avatar de Séréville Nicolas
Browse files

+ Update README file

parent c6922545
No related branches found
No related tags found
No related merge requests found
1. Type the following command line to execute the benchmark: 1. Type the following command line to execute the benchmark:
npanalysis -D benchmark_cats.detector -R RunToTreat.txt -C calibration.txt npanalysis -D benchmark_cats.detector -C calibration.txt -R RunToTreat.txt -O benchmark_cats
2. To see the results of the analysis, launch root and execute the macro ShowResult.C 2. To see the results of the analysis and a comparison with a reference, do:
.x ShowResult.C .x ShowResult.C
3. You can compare the results of the benchmark with the reference figure ResultBenchmark.png
TChain* chain=NULL;
////////////////////////////////////////////////////////////////////////////////
void ShowResult()
{
// load chain from resul
LoadChain();
// draw canvas
TCanvas *c1 = new TCanvas("Mask CATS E644 experiment", "Mask CATS E644 experiment", 1200, 600);
c1->Divide(2,1);
c1->Draw();
// draw results from benchmark
c1->cd(1);
chain->Draw("PositionY[0]:PositionX[0]>>h(600,-30,30,600,-30,30)", "", "colz");
TLatex *texO = new TLatex(-17.5, 22, "Obtained");
texO->Draw();
// draw results from reference result
c1->cd(2);
TFile* ref = new TFile("reference.root", "READ");
TH2* href = (TH2*) ref->FindObjectAny("href");
href->Draw("colz");
TLatex *texR = new TLatex(-17.5,22, "Reference");
texR->Draw();
}
////////////////////////////////////////////////////////////////////////////////
void LoadChain()
{
chain = new TChain("PhysicsTree");
chain->Add("../../Outputs/Analysis/benchmark_cats.root");
}
TChain* chain=NULL;
TCanvas* c1=NULL;
void LoadChain();
void ShowResult()
{
LoadChain();
c1 = new TCanvas("Mask CATS E644 experiment","Mask CATS E644 experiment",1200,600);
c1->Divide(2,1);
c1->cd(1);
// Y versus X for CATS1 detector
chain->Draw("PositionY[0]:PositionX[0]>>h(600,-30,30,600,-30,30)","","colz");
TLatex * texO = new TLatex(-17.5,22,"Obtained");
texO->Draw();
c1->cd(2);
TFile* ref = new TFile("reference.root","READ");
TH2* href = (TH2*) ref->FindObjectAny("href");
href->Draw("colz");
TLatex * texR = new TLatex(-17.5,22,"Reference");
texR->Draw();
}
////////////////////////////////////////////////////////////////////////////////
void LoadChain(){
chain = new TChain("PhysicsTree");
chain->Add("../../Outputs/Analysis/benchmark_cats.root");
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment