38 cet::search_path sp(
"FW_SEARCH_PATH");
39 sp.find_file(fInputFilename, fname);
41 std::unique_ptr<TFile> infile(
new TFile(fname.c_str(),
"READ"));
44 throw cet::exception(
"SpaceChargeSBND") <<
"Could not find the space charge effect file '" << fname <<
"'!\n";
48 std::cout <<
"begin loading voxelized TH3s..." << std::endl;
51 TH3F* hTrueFwdX = (TH3F*) infile->Get(
"TrueFwd_Displacement_X");
52 TH3F* hTrueFwdY = (TH3F*) infile->Get(
"TrueFwd_Displacement_Y");
53 TH3F* hTrueFwdZ = (TH3F*) infile->Get(
"TrueFwd_Displacement_Z");
54 TH3F* hTrueBkwdX = (TH3F*) infile->Get(
"TrueBkwd_Displacement_X");
55 TH3F* hTrueBkwdY = (TH3F*) infile->Get(
"TrueBkwd_Displacement_Y");
56 TH3F* hTrueBkwdZ = (TH3F*) infile->Get(
"TrueBkwd_Displacement_Z");
57 TH3F* hTrueEFieldX = (TH3F*) infile->Get(
"True_ElecField_X");
58 TH3F* hTrueEFieldY = (TH3F*) infile->Get(
"True_ElecField_Y");
59 TH3F* hTrueEFieldZ = (TH3F*) infile->Get(
"True_ElecField_Z");
65 hTrueFwdX->SetDirectory(0);
66 hTrueFwdY->SetDirectory(0);
67 hTrueFwdZ->SetDirectory(0);
68 hTrueBkwdX->SetDirectory(0);
69 hTrueBkwdY->SetDirectory(0);
70 hTrueBkwdZ->SetDirectory(0);
71 hTrueEFieldX->SetDirectory(0);
72 hTrueEFieldY->SetDirectory(0);
73 hTrueEFieldZ->SetDirectory(0);
77 hTrueBkwdX, hTrueBkwdY, hTrueBkwdZ,
78 hTrueEFieldX, hTrueEFieldY, hTrueEFieldZ};
81 std::cout <<
"...finished loading TH3s" << std::endl;
88 gSpatialGraphX[i][j] = (TGraph*)infile->Get(Form(
"deltaX/g%i_%i", i, j));
93 for(
int i = 0; i < initialSpatialFitPolN[1] + 1; i++)
95 for(
int j = 0; j < intermediateSpatialFitPolN[1] + 1; j++)
97 gSpatialGraphY[i][j] = (TGraph*)infile->Get(Form(
"deltaY/g%i_%i", i, j));
102 for(
int i = 0; i < initialSpatialFitPolN[2] + 1; i++)
104 for(
int j = 0; j < intermediateSpatialFitPolN[2] + 1; j++)
106 gSpatialGraphZ[i][j] = (TGraph*)infile->Get(Form(
"deltaZ/g%i_%i", i, j));
120 gEFieldGraphX[i][j] = (TGraph*)infile->Get(Form(
"deltaEx/g%i_%i", i, j));
125 for(
int i = 0; i < initialEFieldFitPolN[1] + 1; i++)
127 for(
int j = 0; j < intermediateEFieldFitPolN[1] + 1; j++)
129 gEFieldGraphY[i][j] = (TGraph*)infile->Get(Form(
"deltaEy/g%i_%i", i, j));
134 for(
int i = 0; i < initialEFieldFitPolN[2] + 1; i++)
136 for(
int j = 0; j < intermediateEFieldFitPolN[2] + 1; j++)
138 gEFieldGraphZ[i][j] = (TGraph*)infile->Get(Form(
"deltaEz/g%i_%i", i, j));
148 std::cout <<
"fRepresentationType not known!!!" << std::endl;
TF1 * initialEFieldFitFunctionZ
std::string fInputFilename
int initialSpatialFitPolN[3]
TGraph * gSpatialGraphY[99][99]
TF1 * intermediateSpatialFitFunctionX[99]
int intermediateSpatialFitPolN[3]
TGraph * gSpatialGraphX[99][99]
TF1 * intermediateEFieldFitFunctionY[99]
TF1 * intermediateSpatialFitFunctionY[99]
bool fEnableCalSpatialSCE
TGraph * gEFieldGraphZ[99][99]
TF1 * intermediateEFieldFitFunctionX[99]
int intermediateEFieldFitPolN[3]
TF1 * initialSpatialFitFunctionZ
int initialEFieldFitPolN[3]
TGraph * gEFieldGraphX[99][99]
TF1 * initialEFieldFitFunctionY
TF1 * initialSpatialFitFunctionY
TGraph * gSpatialGraphZ[99][99]
TF1 * intermediateEFieldFitFunctionZ[99]
TF1 * initialSpatialFitFunctionX
TF1 * initialEFieldFitFunctionX
std::string fRepresentationType
std::vector< TH3F * > SCEhistograms
TF1 * intermediateSpatialFitFunctionZ[99]
TGraph * gEFieldGraphY[99][99]
bool fEnableSimSpatialSCE
BEGIN_PROLOG could also be cout