Skip to content

Instantly share code, notes, and snippets.

@janmayer
Created November 4, 2019 15:17
Show Gist options
  • Save janmayer/f56c58534878e9d6219637469cede7b5 to your computer and use it in GitHub Desktop.
Save janmayer/f56c58534878e9d6219637469cede7b5 to your computer and use it in GitHub Desktop.
clang-format example
// hit fiber number vs. TofD position:
for (Int_t j = ifibcount + 1; j < NOF_FIB_DET; j++) {
detName2 = fDetectorNames[DET_FI_FIRST + j];
fh_Fib_vs_Fib[ifibcount][j] =
new TH2F(Form("fib%s_vs_fib%s", detName, detName2),
Form("Fiber %s vs. Fiber %", detName, detName2),
110, 0, 1100, 110, 0., 1100.);
fh_Fib_vs_Fib[ifibcount][j]->GetYaxis()->SetTitle(Form("Fiber%s", detName2));
fh_Fib_vs_Fib[ifibcount][j]->GetXaxis()->SetTitle(Form("Fiber%s", detName));
;
}
// dx between fibers vs x
for (Int_t j = ifibcount + 1; j < NOF_FIB_DET; j++) {
detName2 = fDetectorNames[DET_FI_FIRST + j];
fh_Fib_dx[ifibcount][j] =
new TH2F(Form("fib%s_fib%s_dx", detName, detName2),
Form("dx of Fiber %s and Fiber %", detName2, detName),
1100, 0, 1100, 1000, -500., 500.);
fh_Fib_dx[ifibcount][j]->GetYaxis()->SetTitle("dx");
fh_Fib_dx[ifibcount][j]->GetXaxis()->SetTitle(Form("Fiber%s", detName));
;
}
// hit fiber number vs. TofD position:
for(Int_t j = ifibcount+1; j < NOF_FIB_DET; j++){
detName2 = fDetectorNames[DET_FI_FIRST + j];
fh_Fib_vs_Fib[ifibcount][j] = new TH2F(Form("fib%s_vs_fib%s",detName,detName2),
Form("Fiber %s vs. Fiber %",detName,detName2), 110,0,1100,110, 0., 1100.);
fh_Fib_vs_Fib[ifibcount][j]->GetYaxis()->SetTitle(Form("Fiber%s",detName2));
fh_Fib_vs_Fib[ifibcount][j]->GetXaxis()->SetTitle(Form("Fiber%s",detName));;
}
// dx between fibers vs x
for(Int_t j = ifibcount+1; j < NOF_FIB_DET; j++){
detName2 = fDetectorNames[DET_FI_FIRST + j];
fh_Fib_dx[ifibcount][j] = new TH2F(Form("fib%s_fib%s_dx",detName,detName2),
Form("dx of Fiber %s and Fiber %",detName2,detName), 1100,0,1100,1000, -500., 500.);
fh_Fib_dx[ifibcount][j]->GetYaxis()->SetTitle("dx");
fh_Fib_dx[ifibcount][j]->GetXaxis()->SetTitle(Form("Fiber%s",detName));;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment