Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions tracking/macros/D0ResolutionL5.C
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,26 @@ int PA[SIZE_PA] = {10, 20, 40, 85};
float LimAxis;
int color, marker;

void D0ResolutionL5() {
void D0ResolutionL5(const char* modelName = "ILD_l5_v02") {

TCanvas* D0_fit = new TCanvas("D0 fit", "D0 fit", 800, 800);
D0_fit->Print("D0_fit_ILD_l5_v02.pdf[");
D0_fit->Print(Form("D0_fit_%s.pdf[", modelName));

for (int ll = 0; ll < SIZE_M; ll++) {
zeros[ll] = 0;
}
for (int ii = 0; ii < SIZE_PA; ii++) {
for (int i = 0; i < SIZE_M; i++) {

TFile* f =
new TFile(Form("../Results/Analysis/analysis_ILD_l5_v02_MuonsAngle_%d_Mom_%d.root", PA[ii], Mom[i]), "read");
TFile* f = new TFile(Form("../Results/Analysis/"
"analysis_%s_MuonsAngle_%d_Mom_%d.root",
modelName, PA[ii], Mom[i]),
"read");
// TTree *EvalTree = (TTree*)f->Get("EvalTree");
TTree* EvalTree;
f->GetObject("EvalTree", EvalTree);

printf(" I am studying file analysis_MuonsAngle_%d_Mom_%d.root ", PA[ii], Mom[i]);
printf(" I am studying file analysis_%s_MuonsAngle_%d_Mom_%d.root ", modelName, PA[ii], Mom[i]);

vector<float>* recoD0 = 0;
vector<float>* trueD0 = 0;
Expand Down Expand Up @@ -112,14 +114,15 @@ void D0ResolutionL5() {
sigma[i][ii] = (fit1->GetParameter(2));
error_sigma[i][ii] = (fit1->GetParError(2));

// std::cout << " angle " << PA[ii] << " momentum " << Mom[i] << " sigma " << sigma[i][ii] << std::endl ;
// std::cout << " angle " << PA[ii] << " momentum " << Mom[i] << " sigma "
// << sigma[i][ii] << std::endl ;

D0_fit->Print("D0_fit_ILD_l5_v02.pdf", &dummy[0]);
D0_fit->Print(Form("D0_fit_%s.pdf", modelName), &dummy[0]);

} // loop for each .root files, here I have collected sigma and its error
} // polar angle loop

D0_fit->Print("D0_fit_ILD_l5_v02.pdf]");
D0_fit->Print(Form("D0_fit_%s.pdf]", modelName));

float sigma20[SIZE_M];
float error20[SIZE_M];
Expand Down Expand Up @@ -230,5 +233,5 @@ void D0ResolutionL5() {
fpr85->SetLineColor(1);
// fpr85->Draw("same");

c_two->SaveAs("IPResolution_ILD_l5_v02.png");
c_two->SaveAs(Form("IPResolution_%s.png", modelName));
}
12 changes: 6 additions & 6 deletions tracking/macros/PResolutionL5.C
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ int PA[SIZE_PA] = {10, 20, 40, 85};
float LimAxis;
int color, marker;

void PResolutionL5() {
void PResolutionL5(const char* modelName = "ILD_l5_v02") {

TCanvas* PR_fit = new TCanvas("PR fit", "PR fit", 800, 800);
PR_fit->Print("PR_fit_ILD_l5_v02.pdf[");
PR_fit->Print(Form("PR_fit_%s.pdf[", modelName));

for (int ll = 0; ll < SIZE_M; ll++) {
zeros[ll] = 0;
}
for (int ii = 0; ii < SIZE_PA; ii++) {
for (int i = 0; i < SIZE_M; i++) {
TFile* f =
new TFile(Form("../Results/Analysis/analysis_ILD_l5_v02_MuonsAngle_%d_Mom_%d.root", PA[ii], Mom[i]), "read");
new TFile(Form("../Results/Analysis/analysis_%s_MuonsAngle_%d_Mom_%d.root", modelName, PA[ii], Mom[i]), "read");
// TTree *EvalTree = (TTree*)f->Get("EvalTree");
TTree* EvalTree;
f->GetObject("EvalTree", EvalTree);
Expand Down Expand Up @@ -99,12 +99,12 @@ void PResolutionL5() {

// std::cout << " sigma " << sigma[i][ii] <<std::endl ;

PR_fit->Print("PR_fit_ILD_l5_v02.pdf", &dummy[0]);
PR_fit->Print(Form("PR_fit_%s.pdf", modelName), &dummy[0]);

} // loop for each .root files, here I have collected sigma and its error
} // polar angle loop

PR_fit->Print("PR_fit_ILD_l5_v02.pdf]");
PR_fit->Print(Form("PR_fit_%s.pdf]", modelName));

float sigma20[SIZE_M];
float error20[SIZE_M];
Expand Down Expand Up @@ -216,5 +216,5 @@ void PResolutionL5() {
fpr85->SetLineColor(1);
// fpr85->Draw("same");

c_two->SaveAs("PResolution_ILD_l5_v02.png");
c_two->SaveAs(Form("PResolution_%s.png", modelName));
}
6 changes: 3 additions & 3 deletions tracking/macros/meanL5.C
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ int PA[SIZE_PA] = {10, 20, 40, 85};
float LimAxis;
int color, marker;

void meanL5() {
void meanL5(const char* modelName = "ILD_l5_v02") {
for (int ll = 0; ll < SIZE_M; ll++) {
zeros[ll] = 0;
}
Expand Down Expand Up @@ -77,7 +77,7 @@ void meanL5() {
for (int ii = 0; ii < SIZE_PA; ii++) {
for (int i = 0; i < SIZE_M; i++) {
TFile* f1 =
new TFile(Form("../Results/Analysis/analysis_ILD_l5_v02_MuonsAngle_%d_Mom_%d.root", PA[ii], Mom[i]), "read");
new TFile(Form("../Results/Analysis/analysis_%s_MuonsAngle_%d_Mom_%d.root", modelName, PA[ii], Mom[i]), "read");
// TDirectory *d1 = (TDirectory*) f1->Get("MyRecoMCTruthLinker");

TH1F* hOmega = (TH1F*)f1->Get("OmegaPull");
Expand Down Expand Up @@ -399,5 +399,5 @@ void meanL5() {
leg->AddEntry(Muon_plot_omega85, "#theta = 85^{o}", "p");
leg->Draw();

c_two->SaveAs("pull_mean_ILD_l5_v02.png");
c_two->SaveAs(Form("pull_mean_%s.png", modelName));
}
6 changes: 3 additions & 3 deletions tracking/macros/sigmaL5.C
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ int PA[SIZE_PA] = {10, 20, 40, 85};
float LimAxis;
int color, marker;

void sigmaL5() {
void sigmaL5(const char* modelName = "ILD_l5_v02") {
for (int ll = 0; ll < SIZE_M; ll++) {
zeros[ll] = 0;
}
Expand Down Expand Up @@ -77,7 +77,7 @@ void sigmaL5() {
for (int ii = 0; ii < SIZE_PA; ii++) {
for (int i = 0; i < SIZE_M; i++) {
TFile* f1 =
new TFile(Form("../Results/Analysis/analysis_ILD_l5_v02_MuonsAngle_%d_Mom_%d.root", PA[ii], Mom[i]), "read");
new TFile(Form("../Results/Analysis/analysis_%s_MuonsAngle_%d_Mom_%d.root", modelName, PA[ii], Mom[i]), "read");
// TDirectory *d1 = (TDirectory*) f1->Get("MyRecoMCTruthLinker");

TH1F* hOmega = (TH1F*)f1->Get("OmegaPull");
Expand Down Expand Up @@ -400,5 +400,5 @@ void sigmaL5() {
leg->AddEntry(Muon_plot_z085, "#theta = 85^{o}", "p");
leg->Draw();

c_two->SaveAs("pull_sigma_ILD_l5_v02.png");
c_two->SaveAs(Form("pull_sigma_%s.png", modelName));
}
8 changes: 4 additions & 4 deletions tracking/test/run_ILD_l5_v02_singleMuon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ mv analysis_${ILDMODELRECO}_${ILCSOFTVER}_MuonsAngle_*_Mom_*.root ../Results/Ana

cd ../macros

root -b -q D0ResolutionL5.C
root -b -q PResolutionL5.C
root -b -q meanL5.C
root -b -q sigmaL5.C
root -b -q "D0ResolutionL5.C(\"${ILDMODELRECO}\")"
root -b -q "PResolutionL5.C(\"${ILDMODELRECO}\")"
root -b -q "meanL5.C(\"${ILDMODELRECO}\")"
root -b -q "sigmaL5.C(\"${ILDMODELRECO}\")"

OUTPUTPATH=../Results/MonitorPlots

Expand Down
Loading