16 #ifdef __FastCaloSimStandAlone__
25 #include "GaudiKernel/SystemOfUnits.h"
41 const float Ekin = truth->
Ekin();
43 Einit = simulstate.
E();
46 if (Einit <
m_hist.GetXaxis()->GetBinLowEdge(1)) {
47 Emean =
m_hist.GetBinContent(1) * Einit;
49 if (Einit >
m_hist.GetXaxis()->GetBinUpEdge(
m_hist.GetNbinsX())) {
50 Emean =
m_hist.GetBinContent(
m_hist.GetNbinsX()) * Einit;
52 Emean =
m_hist.GetBinContent(
m_hist.GetXaxis()->FindBin(Einit)) * Einit;
58 <<
" and E=" << Einit);
62 simulstate.
set_E(Emean);
69 bool shortprint =
opt.Index(
"short") >= 0;
71 TString optprint =
opt;
72 optprint.ReplaceAll(
"short",
"");
78 <<
"histNbins=" <<
m_hist.GetNbinsX() <<
" "
79 <<
m_hist.GetXaxis()->GetBinLowEdge(1) <<
"<=Ekin<="
94 hist =
new TH1F(
"h1",
"h1 title", 16, 0., 512.);
95 hist->SetBinContent(1, 0.687165);
96 hist->SetBinContent(2, 0.756837);
97 hist->SetBinContent(3, 0.836673);
98 hist->SetBinContent(4, 0.896336);
99 hist->SetBinContent(5, 0.889785);
100 hist->SetBinContent(6, 0.901266);
101 hist->SetBinContent(7, 0.888937);
102 hist->SetBinContent(8, 0.919943);
103 hist->SetBinContent(9, 0.941806);
104 hist->SetBinContent(10, 0.934668);
105 hist->SetBinContent(11, 0.939502);
106 hist->SetBinContent(12, 0.940796);
107 hist->SetBinContent(13, 0.945894);
108 hist->SetBinContent(14, 0.955445);
109 hist->SetBinContent(15, 0.955593);
110 hist->SetBinContent(16, 0.943673);
114 hdraw->SetMarkerColor(46);
115 hdraw->SetMarkerStyle(8);
118 "testTFCSEnergyInterpolationHistogram",
119 "test TFCSEnergyInterpolationHistogram");
121 test.set_Ekin_nominal(0.5 *
122 (hdraw->GetXaxis()->GetBinLowEdge(1) +
123 hdraw->GetXaxis()->GetBinUpEdge(hdraw->GetNbinsX())));
124 test.set_Ekin_min(hdraw->GetXaxis()->GetBinLowEdge(1));
125 test.set_Ekin_max(hdraw->GetXaxis()->GetBinUpEdge(hdraw->GetNbinsX()));
126 test.set_eta_nominal(0.225);
127 test.set_eta_min(0.2);
128 test.set_eta_max(0.25);
136 TGraph *
gr =
new TGraph();
137 gr->SetNameTitle(
"testTFCSEnergyInterpolationHistogramLogX",
138 "test TFCSEnergyInterpolationHistogram");
139 gr->GetXaxis()->SetTitle(
"Ekin [MeV]");
140 gr->GetYaxis()->SetTitle(
"<E(reco)>/Ekin(true)");
143 for (
float Ekin =
std::max(
test.Ekin_min() * 0.25, 0.1);
144 Ekin <=
test.Ekin_max() * 4; Ekin *= 1.05) {
146 truth->SetPxPyPzE(Ekin, 0, 0, Ekin);
147 simulstate->
set_E(Ekin);
151 gr->SetPoint(
ip, Ekin, simulstate->
E() / Ekin);
157 #if defined(__FastCaloSimStandAlone__)
158 TCanvas *
c =
new TCanvas(hdraw->GetName(), hdraw->GetTitle());
160 gr->Draw(
"same,APL");