13 TFile *file = TFile::Open(rootFile);
14 TProfile *hFDCConstants;
15 file->GetObject(
"AlignmentConstants/FDCAlignmentConstants",hFDCConstants);
20 outFile.open(
"cell_offsets.txt");
21 for (
unsigned int i = 1; i<=24; i++){
22 int histIndex = i*1000;
23 outFile << hFDCConstants->GetBinContent(histIndex+1) <<
" " ;
24 outFile << hFDCConstants->GetBinContent(histIndex+100) << endl ;
30 outFile.open(
"cathode_alignment.txt");
31 for (
unsigned int i = 1; i<=24; i++){
32 int histIndex = i*1000;
33 outFile << hFDCConstants->GetBinContent(histIndex+103) <<
" " ;
34 outFile << hFDCConstants->GetBinContent(histIndex+101) <<
" " ;
35 outFile << hFDCConstants->GetBinContent(histIndex+104) <<
" " ;
36 outFile << hFDCConstants->GetBinContent(histIndex+102) << endl ;
42 outFile.open(
"strip_pitches.txt");
43 for (
unsigned int i = 1; i<=24; i++){
44 int histIndex = i*1000;
45 outFile << hFDCConstants->GetBinContent(histIndex+200) <<
" " ;
46 outFile << hFDCConstants->GetBinContent(histIndex+201) <<
" " ;
47 outFile << hFDCConstants->GetBinContent(histIndex+202) <<
" " ;
48 outFile << hFDCConstants->GetBinContent(histIndex+203) <<
" " ;
49 outFile << hFDCConstants->GetBinContent(histIndex+204) <<
" " ;
50 outFile << hFDCConstants->GetBinContent(histIndex+205) <<
" " ;
51 outFile << hFDCConstants->GetBinContent(histIndex+206) <<
" " ;
52 outFile << hFDCConstants->GetBinContent(histIndex+207) <<
" " ;
53 outFile << hFDCConstants->GetBinContent(histIndex+208) <<
" " ;
54 outFile << hFDCConstants->GetBinContent(histIndex+209) << endl;
60 outFile.open(
"wire_alignment.txt");
61 for (
unsigned int i = 1; i<=24; i++){
62 int histIndex = i*1000;
63 outFile << hFDCConstants->GetBinContent(histIndex+2) <<
" 0.0 0.0" << endl;
67 for (
unsigned int i = 1; i<=4; i++){
68 outFile.open(Form(
"t0_package%i.txt",i));
69 for (
unsigned int j=1; j<=6;j++){
70 for (
unsigned int k = 1; k<= 96; k++){
71 int histIndex = ((i-1)*4+j)*1000 + 900;
72 outFile << hFDCConstants->GetBinContent(histIndex+k)<<
" " ;
79 for (
unsigned int i = 1; i<=4; i++){
80 outFile.open(Form(
"gains_package%i.txt",i));
81 for (
unsigned int j=1; j<=6;j++){
82 for (
unsigned int k = 1; k<= 216; k++){
83 int histIndex = ((i-1)*4+j)*1000 + 300;
84 outFile << hFDCConstants->GetBinContent(histIndex+k) <<
" " ;
87 for (
unsigned int k = 1; k<= 216; k++){
88 int histIndex = ((i-1)*4+j)*1000 + 600;
89 outFile << hFDCConstants->GetBinContent(histIndex+k) <<
" " ;
void DumpFDCOffsets(TString rootFile="hd_root.root")