Skip to content

Commit 6c48718

Browse files
committedApr 3, 2017
Tided up electron scattering plots and added sorting for Q0 bins. Removed isShape requirement for electron scattering data and added seperate interaction modes for GENIE-e- scattering so that the PDG plots are filled correctly. Fixed a bug in the InputWeight in the GENIEInputHandler. Added option to save all stack histograms seperately to make error bands for stack histograms easier to produce.
1 parent ff53362 commit 6c48718

File tree

9 files changed

+612
-411
lines changed

9 files changed

+612
-411
lines changed
 

‎app/PrepareGENIE.cxx

+116-101
Large diffs are not rendered by default.

‎data/Electron/all12Csamples.xml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<sample name="ElectronData_6_12_0.160_36.000_Barreau:1983ht" input="gntpfile" />
2+
<sample name="ElectronData_6_12_0.161_60.000_Barreau:1983ht" input="gntpfile" />
3+
<sample name="ElectronData_6_12_0.200_36.000_Barreau:1983ht" input="gntpfile" />
4+
<sample name="ElectronData_6_12_0.200_60.000_Barreau:1983ht" input="gntpfile" />
5+
<sample name="ElectronData_6_12_0.240_36.000_Barreau:1983ht" input="gntpfile" />
6+
<sample name="ElectronData_6_12_0.240_60.000_Barreau:1983ht" input="gntpfile" />
7+
<sample name="ElectronData_6_12_0.280_60.000_Barreau:1983ht" input="gntpfile" />
8+
<sample name="ElectronData_6_12_0.320_36.000_Barreau:1983ht" input="gntpfile" />
9+
<sample name="ElectronData_6_12_0.320_60.000_Barreau:1983ht" input="gntpfile" />
10+
<sample name="ElectronData_6_12_0.361_60.000_Barreau:1983ht" input="gntpfile" />
11+
<sample name="ElectronData_6_12_0.400_36.000_Barreau:1983ht" input="gntpfile" />
12+
<sample name="ElectronData_6_12_0.401_60.000_Barreau:1983ht" input="gntpfile" />
13+
<sample name="ElectronData_6_12_0.440_60.000_Barreau:1983ht" input="gntpfile" />
14+
<sample name="ElectronData_6_12_0.480_36.000_Barreau:1983ht" input="gntpfile" />
15+
<sample name="ElectronData_6_12_0.480_60.000_Barreau:1983ht" input="gntpfile" />
16+
<sample name="ElectronData_6_12_0.500_60.000_Whitney:1974hr" input="gntpfile" />
17+
<sample name="ElectronData_6_12_0.519_60.000_Barreau:1983ht" input="gntpfile" />
18+
<sample name="ElectronData_6_12_0.560_36.000_Barreau:1983ht" input="gntpfile" />
19+
<sample name="ElectronData_6_12_0.560_60.000_Barreau:1983ht" input="gntpfile" />
20+
<sample name="ElectronData_6_12_0.560_145.000_Barreau:1983ht" input="gntpfile" />
21+
<sample name="ElectronData_6_12_0.620_36.000_Barreau:1983ht" input="gntpfile" />
22+
<sample name="ElectronData_6_12_0.620_60.000_Barreau:1983ht" input="gntpfile" />
23+
<sample name="ElectronData_6_12_0.680_36.000_Barreau:1983ht" input="gntpfile" />
24+
<sample name="ElectronData_6_12_0.680_60.000_Barreau:1983ht" input="gntpfile" />
25+
<sample name="ElectronData_6_12_0.730_37.100_O'Connell:1987ag" input="gntpfile" />
26+
<sample name="ElectronData_6_12_0.961_37.500_Sealock:1989nx" input="gntpfile" />
27+
<sample name="ElectronData_6_12_1.108_37.500_Sealock:1989nx" input="gntpfile" />
28+
<sample name="ElectronData_6_12_1.299_37.500_Sealock:1989nx" input="gntpfile" />
29+
<sample name="ElectronData_6_12_1.300_11.950_Baran:1988tw" input="gntpfile" />
30+
<sample name="ElectronData_6_12_1.300_13.540_Baran:1988tw" input="gntpfile" />
31+
<sample name="ElectronData_6_12_1.500_11.950_Baran:1988tw" input="gntpfile" />
32+
<sample name="ElectronData_6_12_1.500_13.540_Baran:1988tw" input="gntpfile" />
33+
<sample name="ElectronData_6_12_1.501_37.500_Sealock:1989nx" input="gntpfile" />
34+
<sample name="ElectronData_6_12_1.650_11.950_Baran:1988tw" input="gntpfile" />
35+
<sample name="ElectronData_6_12_1.650_13.540_Baran:1988tw" input="gntpfile" />
36+
<sample name="ElectronData_6_12_1.930_16.000_Bagdasaryan:1988hp" input="gntpfile" />
37+
<sample name="ElectronData_6_12_1.930_18.000_Bagdasaryan:1988hp" input="gntpfile" />
38+
<sample name="ElectronData_6_12_2.000_15.000_Zeller:1973ge" input="gntpfile" />
39+
<sample name="ElectronData_6_12_2.015_35.510_Arrington:1995hs" input="gntpfile" />
40+
<sample name="ElectronData_6_12_2.020_15.022_Day:1993md" input="gntpfile" />
41+
<sample name="ElectronData_6_12_2.020_20.016_Day:1993md" input="gntpfile" />
42+
<sample name="ElectronData_6_12_2.130_16.000_Bagdasaryan:1988hp" input="gntpfile" />
43+
<sample name="ElectronData_6_12_2.130_18.000_Bagdasaryan:1988hp" input="gntpfile" />
44+
<sample name="ElectronData_6_12_2.500_15.000_Zeller:1973ge" input="gntpfile" />
45+
<sample name="ElectronData_6_12_2.700_15.000_Zeller:1973ge" input="gntpfile" />
46+
<sample name="ElectronData_6_12_3.188_47.680_Arrington:1995hs" input="gntpfile" />
47+
<sample name="ElectronData_6_12_3.595_16.020_Day:1993md" input="gntpfile" />
48+
<sample name="ElectronData_6_12_3.595_20.016_Day:1993md" input="gntpfile" />
49+
<sample name="ElectronData_6_12_3.595_25.012_Day:1993md" input="gntpfile" />
50+
<sample name="ElectronData_6_12_3.595_30.010_Day:1993md" input="gntpfile" />
51+
<sample name="ElectronData_6_12_3.605_16.020_Day:1993md" input="gntpfile" />
52+
<sample name="ElectronData_6_12_4.045_15.000_Arrington:1998ps" input="gntpfile" />
53+
<sample name="ElectronData_6_12_4.045_23.000_Arrington:1998ps" input="gntpfile" />
54+
<sample name="ElectronData_6_12_4.045_30.000_Arrington:1998ps" input="gntpfile" />
55+
<sample name="ElectronData_6_12_4.045_37.000_Arrington:1998ps" input="gntpfile" />
56+
<sample name="ElectronData_6_12_4.045_45.000_Arrington:1998ps" input="gntpfile" />
57+
<sample name="ElectronData_6_12_4.045_55.000_Arrington:1998ps" input="gntpfile" />
58+
<sample name="ElectronData_6_12_4.045_74.000_Arrington:1998ps" input="gntpfile" />
59+
<sample name="ElectronData_6_12_4.212_53.389_Arrington:1995hs" input="gntpfile" />
60+
<sample name="ElectronData_6_12_5.120_56.639_Arrington:1995hs" input="gntpfile" />
61+
<sample name="ElectronData_6_12_5.766_18.00_Fomin:2010ei" input="gntpfile" />
62+
<sample name="ElectronData_6_12_5.766_22.00_Fomin:2010ei" input="gntpfile" />
63+
<sample name="ElectronData_6_12_5.766_26.00_Fomin:2010ei" input="gntpfile" />
64+
<sample name="ElectronData_6_12_5.766_32.00_Fomin:2010ei" input="gntpfile" />
65+
<sample name="ElectronData_6_12_5.766_40.00_Fomin:2010ei" input="gntpfile" />
66+
<sample name="ElectronData_6_12_5.766_50.00_Fomin:2010ei" input="gntpfile" />

‎data/Electron/listdatasets.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
uid = "ElectronData_" + z + "_" + a + "_" + e + "_" + t + "_" + s
1515
if (uid not in uniquelist):
1616
uniquelist.append(uid)
17-
print uid
17+
print sys.argv[2] + uid + sys.argv[3]
1818

1919

2020

‎parameters/config.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232

3333
<config Electron_NThetaBins='4' />
3434
<config Electron_NEnergyBins='4' />
35-
<config Electron_ThetaWidth='1.0' />
36-
<config Electron_EnergyWidth='0.100' />
35+
<config Electron_ThetaWidth='2.0' />
36+
<config Electron_EnergyWidth='0.10' />
3737

3838
<!-- # Input Configs -->
3939
<!-- # ###################################################### -->

‎src/Electron/ElectronScattering_DurhamData.cxx

+132-34
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,30 @@ ElectronScattering_DurhamData::ElectronScattering_DurhamData(nuiskey samplekey)
3535
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG/NORM/MASK", "FIX/DIAG");
3636
fSettings.SetXTitle("q0");
3737
fSettings.SetYTitle("#sigma");
38+
// fIsRawEvents = true;
3839

3940
FinaliseSampleSettings();
4041

42+
// Plot Setup -------------------------------------------------------
43+
SetDataFromName(fSettings.GetS("name"));
44+
SetCovarFromDiagonal();
45+
4146
// Scaling Setup ---------------------------------------------------
4247
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
4348
// fScaleFactor = ((GetEventHistogram()->Integral("width") * 1E-38 / (fNEvents + 0.)) / TotalIntegratedFlux());
44-
fScaleFactor = 1.0;
49+
EnuMin = fZLowLim;
50+
EnuMax = fZHighLim;
4551

46-
// Plot Setup -------------------------------------------------------
47-
SetDataFromName(fSettings.GetS("name"));
48-
SetCovarFromDiagonal();
52+
double sigscale = GetEventHistogram()->Integral() * 1E-38 / double(fNEvents) / TotalIntegratedFlux();
53+
double dangle = 2 * M_PI * fabs((1. - cos(fYLowLim * M_PI / 180.)) - (1. - cos(fYHighLim * M_PI / 180.)));
54+
fScaleFactor = sigscale / dangle / fZCenter;
55+
56+
57+
std::cout << "Event Integral = " << GetEventHistogram()->Integral("width") << std::endl;
58+
std::cout << "Flux Integral = " << TotalIntegratedFlux("width") << " " << fZLowLim << " " << fZHighLim << std::endl;
59+
std::cout << "DAngle = " << dangle << std::endl;
60+
std::cout << "sigscale = " << sigscale << std::endl;
61+
std::cout << "fZCenter = " << fZCenter << std::endl;
4962

5063
// Finish up
5164
FinaliseMeasurement();
@@ -80,7 +93,13 @@ void ElectronScattering_DurhamData::SetDataFromName(std::string name) {
8093
thetabinedges.push_back( fYCenter + thetawidth * (double(i)) );
8194
}
8295
for (int i = -nebins; i <= nebins; i++) {
83-
ebinedges.push_back( fZCenter + ewidth * (double(i)) );
96+
double newval = fZCenter + ewidth * (double(i));
97+
98+
if (newval < 0.0) newval = 0.0;
99+
if (newval < GetEventHistogram()->GetXaxis()->GetXmin()) newval = GetEventHistogram()->GetXaxis()->GetXmin();
100+
if (newval > GetEventHistogram()->GetXaxis()->GetXmax()) newval = GetEventHistogram()->GetXaxis()->GetXmax();
101+
if (std::find(ebinedges.begin(), ebinedges.end(), newval) != ebinedges.end()) continue;
102+
ebinedges.push_back(newval);
84103
}
85104

86105
// Determine target
@@ -102,6 +121,7 @@ void ElectronScattering_DurhamData::SetDataFromName(std::string name) {
102121
std::vector<double> errorx;
103122
std::vector<double> pointy;
104123
std::vector<double> errory;
124+
double scalef = 1.E-38 * 1.E5;
105125

106126
while (std::getline(mask >> std::ws, line, '\n')) {
107127
// std::cout << "Line = " << line << std::endl;
@@ -116,23 +136,71 @@ void ElectronScattering_DurhamData::SetDataFromName(std::string name) {
116136
if (sstring.compare(lineentries[7])) continue;
117137

118138
std::cout << "Registering data point : " << line << std::endl;
119-
120139
std::cout << "Adding Graph Point : " << GeneralUtils::StrToDbl(lineentries[4]) << " " << GeneralUtils::StrToDbl(lineentries[5]) << std::endl;
121-
pointx.push_back(GeneralUtils::StrToDbl(lineentries[4]));
122-
errorx.push_back(0.0);
123-
pointy.push_back(GeneralUtils::StrToDbl(lineentries[5]));
124-
errory.push_back(GeneralUtils::StrToDbl(lineentries[6]));
140+
141+
// Loop through x and y points and find a place to insert
142+
if (pointx.empty()) {
143+
pointx.push_back(GeneralUtils::StrToDbl(lineentries[4]));
144+
errorx.push_back(0.0);
145+
pointy.push_back(GeneralUtils::StrToDbl(lineentries[5]) * scalef);
146+
errory.push_back(GeneralUtils::StrToDbl(lineentries[6]) * scalef);
147+
148+
} else {
149+
for (size_t j = 0; j < pointx.size(); j++) {
150+
151+
if (GeneralUtils::StrToDbl(lineentries[4]) < pointx[j] && j == 0) {
152+
std::cout << "Inserting at start point iterator " << std::endl;
153+
pointx.insert(pointx.begin() + j, GeneralUtils::StrToDbl(lineentries[4]));
154+
errorx.insert(errorx.begin() + j, 0.0);
155+
pointy.insert(pointy.begin() + j, GeneralUtils::StrToDbl(lineentries[5]) * scalef);
156+
errory.insert(errory.begin() + j, GeneralUtils::StrToDbl(lineentries[6]) * scalef);
157+
break;
158+
159+
} else if (GeneralUtils::StrToDbl(lineentries[4]) > pointx[j] && j == pointx.size() - 1) {
160+
std::cout << "Pushing back data point " << std::endl;
161+
pointx.push_back(GeneralUtils::StrToDbl(lineentries[4]));
162+
errorx.push_back(0.0);
163+
pointy.push_back(GeneralUtils::StrToDbl(lineentries[5]) * scalef);
164+
errory.push_back(GeneralUtils::StrToDbl(lineentries[6]) * scalef);
165+
break;
166+
167+
} else if (GeneralUtils::StrToDbl(lineentries[4]) > pointx[j - 1] && GeneralUtils::StrToDbl(lineentries[4]) < pointx[j]) {
168+
std::cout << "Inserting at point iterator = " << j << std::endl;
169+
170+
pointx.insert(pointx.begin() + j, GeneralUtils::StrToDbl(lineentries[4]));
171+
errorx.insert(errorx.begin() + j, 0.0);
172+
pointy.insert(pointy.begin() + j, GeneralUtils::StrToDbl(lineentries[5]) * scalef);
173+
errory.insert(errory.begin() + j, GeneralUtils::StrToDbl(lineentries[6]) * scalef);
174+
break;
175+
}
176+
}
177+
178+
179+
180+
}
181+
182+
// pointx.push_back(GeneralUtils::StrToDbl(lineentries[4]));
183+
// errorx.push_back(0.0);
184+
// pointy.push_back(GeneralUtils::StrToDbl(lineentries[5]));
185+
// errory.push_back(GeneralUtils::StrToDbl(lineentries[6]));
125186

126187
i++;
127188
}
128189

190+
for (int i = 0; i < pointx.size(); i++) {
191+
std::cout << "Q0 Point " << i << " = " << pointx[i] << std::endl;
192+
}
193+
194+
129195
fDataGraph = new TGraphErrors(pointx.size(), &pointx[0], &pointy[0], &errorx[0], &errory[0]);
196+
fDataGraph->SetNameTitle((fName + "_data_GRAPH").c_str(), (fName + "_data_GRAPH").c_str());
197+
130198

131-
// Now form an effective data and mc histogram
199+
// Now form an effective data and mc histogram
132200
std::vector<double> q0binedges;
133201
const double* x = fDataGraph->GetX();
134202

135-
// Loop over graph and get mid way point between each data point.
203+
// Loop over graph and get mid way point between each data point.
136204
for (int i = 0; i < fDataGraph->GetN(); i++) {
137205
std::cout << "X Point = " << x[i] << std::endl;
138206

@@ -147,9 +215,13 @@ void ElectronScattering_DurhamData::SetDataFromName(std::string name) {
147215
// Set half distance to point below
148216
q0binedges.push_back(x[i] - ((x[i] - x[i - 1]) / 2.0));
149217
}
150-
151218
}
152219

220+
// Bubble Sort
221+
222+
223+
224+
153225
for (int i = 0; i < q0binedges.size(); i++) {
154226
std::cout << "Q0 Edge " << i << " = " << q0binedges[i] << std::endl;
155227
}
@@ -161,8 +233,8 @@ void ElectronScattering_DurhamData::SetDataFromName(std::string name) {
161233
std::cout << "theta Edge " << i << " = " << thetabinedges[i] << std::endl;
162234
}
163235

164-
// Form the data hist, mchist, etc
165-
fDataHist = new TH1D("electron_data", "electron_data",
236+
// Form the data hist, mchist, etc
237+
fDataHist = new TH1D((fName + "_data").c_str(), (fName + "_data").c_str(),
166238
q0binedges.size() - 1, &q0binedges[0]);
167239
fMCHist = (TH1D*) fDataHist->Clone("MC");
168240

@@ -179,25 +251,34 @@ void ElectronScattering_DurhamData::SetDataFromName(std::string name) {
179251

180252

181253

182-
fMCScan_Q0vsThetavsE = new TH3D("mc_q0vsthetavse", "mc_q0vsthetavse",
254+
fMCScan_Q0vsThetavsE = new TH3D((fName + "_MC_q0vsthetavse").c_str(), "MC_q0vsthetavse",
183255
q0binedges.size() - 1, &q0binedges[0],
184256
thetabinedges.size() - 1, &thetabinedges[0],
185257
ebinedges.size() - 1 , &ebinedges[0]);
186258
fMCScan_Q0vsThetavsE->Reset();
187-
fMCScan_Q0vsTheta = new TH2D("mc_q0vstheta", "mc_q0vstheta",
259+
fMCScan_Q0vsTheta = new TH2D((fName + "_MC_q0vstheta").c_str(), "MC_q0vstheta",
188260
q0binedges.size() - 1, &q0binedges[0],
189261
thetabinedges.size() - 1, &thetabinedges[0]);
190262
fMCScan_Q0vsTheta->Reset();
191263

192-
fMCScan_Q0vsE = new TH2D("mc_q0vse", "mc_q0vse",
264+
fMCScan_Q0vsE = new TH2D((fName + "_MC_q0vse").c_str(), "MC_q0vse",
193265
q0binedges.size() - 1, &q0binedges[0],
194266
ebinedges.size() - 1 , &ebinedges[0]);
195267
fMCScan_Q0vsE->Reset();
268+
269+
fXLowLim = fMCScan_Q0vsThetavsE->GetXaxis()->GetBinLowEdge(1);
270+
fXHighLim = fMCScan_Q0vsThetavsE->GetXaxis()->GetBinLowEdge(fMCScan_Q0vsThetavsE->GetNbinsX() + 2);
271+
272+
fYLowLim = fMCScan_Q0vsThetavsE->GetYaxis()->GetBinLowEdge(1);
273+
fYHighLim = fMCScan_Q0vsThetavsE->GetYaxis()->GetBinLowEdge(fMCScan_Q0vsThetavsE->GetNbinsY() + 2);
274+
275+
fZLowLim = fMCScan_Q0vsThetavsE->GetZaxis()->GetBinLowEdge(1);
276+
fZHighLim = fMCScan_Q0vsThetavsE->GetZaxis()->GetBinLowEdge(fMCScan_Q0vsThetavsE->GetNbinsZ() + 2);
196277
}
197278

198279

199280
//********************************************************************
200-
void ElectronScattering_DurhamData::FillEventVariables(FitEvent *event) {
281+
void ElectronScattering_DurhamData::FillEventVariables(FitEvent * event) {
201282
//********************************************************************
202283

203284
if (event->NumFSParticle(11) == 0)
@@ -208,28 +289,31 @@ void ElectronScattering_DurhamData::FillEventVariables(FitEvent *event) {
208289

209290
double q0 = fabs(ein->fP.E() - eout->fP.E()) / 1000.0;
210291
double E = ein->fP.E() / 1000.0;
211-
double theta = ein->fP.Vect().Angle(eout->fP.Vect()) * 180;
292+
double theta = ein->fP.Vect().Angle(eout->fP.Vect()) * 180. / M_PI;
212293

213294
fXVar = q0;
214295
fYVar = theta;
215296
fZVar = E;
216297

217-
std::cout << "Got Event " << q0 << " " << theta << " " << E << std::endl;
298+
// std::cout << "Got Event " << q0 << " " << theta << " " << E << std::endl;
218299

219300
return;
220301
};
221302

222303
//********************************************************************
223-
bool ElectronScattering_DurhamData::isSignal(FitEvent *event) {
304+
bool ElectronScattering_DurhamData::isSignal(FitEvent * event) {
224305
//********************************************************************
225306

226307
if (event->NumFSParticle(11) == 0)
227308
return false;
228309

310+
// std::cout << "fXVar = " << fXVar << " " << fXLowLim << " " << fXHighLim << std::endl;
311+
// std::cout << "fYVar = " << fYVar << " " << fYLowLim << " " << fYHighLim << std::endl;
312+
// std::cout << "fZVar = " << fZVar << " " << fZLowLim << " " << fZHighLim << std::endl;
229313

230-
// if (fXVar < fXLowLim or fXVar > fXHighLim) return false;
231-
// if (fYVar < fYLowLim or fYVar > fYHighLim) return false;
232-
// if (fZVar < fZLowLim or fZVar > fZHighLim) return false;
314+
if (fXVar < fXLowLim or fXVar > fXHighLim) return false;
315+
if (fYVar < fYLowLim or fYVar > fYHighLim) return false;
316+
if (fZVar < fZLowLim or fZVar > fZHighLim) return false;
233317

234318
return true;
235319
};
@@ -238,30 +322,44 @@ bool ElectronScattering_DurhamData::isSignal(FitEvent *event) {
238322
void ElectronScattering_DurhamData::FillHistograms() {
239323
//********************************************************************
240324

325+
Measurement1D::FillHistograms();
326+
241327
if (Signal) {
242328
fMCScan_Q0vsThetavsE->Fill(fXVar, fYVar, fZVar);
243-
244-
fMCHist->Fill(fXVar);
245-
fMCScan_Q0vsTheta->Fill(fXVar, fYVar);
246-
fMCScan_Q0vsE->Fill(fXVar, fZVar);
247-
}
329+
fMCScan_Q0vsTheta->Fill(fXVar, fYVar);
330+
fMCScan_Q0vsE->Fill(fXVar, fZVar);
331+
}
248332
}
333+
// Weight = 1.0;
334+
// if (Signal) {
335+
// fMCHist->Fill(fXVar, Weight);
336+
// fMCFine->Fill(fXVar, Weight);
337+
// fMCStat->Fill(fXVar, 1.0);
338+
339+
// if (fMCHist_Modes) fMCHist_Modes->Fill(Mode, fXVar, Weight);
340+
// }
341+
// }
249342

250343
void ElectronScattering_DurhamData::ResetAll() {
344+
Measurement1D::ResetAll();
251345
fMCScan_Q0vsThetavsE->Reset();
346+
fMCScan_Q0vsTheta->Reset();
347+
fMCScan_Q0vsE->Reset();
252348
}
253349

254350
void ElectronScattering_DurhamData::ApplyNormScale(double norm) {
351+
Measurement1D::ApplyNormScale(norm);
255352
fMCScan_Q0vsThetavsE->Scale(1.0 / norm);
256353
fMCScan_Q0vsTheta->Scale(1.0 / norm);
257354
fMCScan_Q0vsE->Scale(1.0 / norm);
258-
fMCHist->Scale(1.0 / norm);
259355
}
260356

261357
//********************************************************************
262358
void ElectronScattering_DurhamData::ScaleEvents() {
263359
//********************************************************************
360+
Measurement1D::ScaleEvents();
264361

362+
/*
265363
fMCScan_Q0vsThetavsE->Scale(fScaleFactor, "width");
266364
267365
// Project into fMCScan_Q0vsTheta
@@ -300,7 +398,7 @@ void ElectronScattering_DurhamData::ScaleEvents() {
300398
}
301399
302400
fMCHist->Scale(fDataHist->Integral() / fMCHist->Integral());
303-
401+
*/
304402
}
305403

306404
//********************************************************************
@@ -312,13 +410,13 @@ int ElectronScattering_DurhamData::GetNDOF() {
312410

313411
void ElectronScattering_DurhamData::Write(std::string drawOpts) {
314412

413+
Measurement1D::Write(drawOpts);
414+
315415
fMCScan_Q0vsThetavsE->Write();
316416
fMCScan_Q0vsTheta->Write();
317417
fMCScan_Q0vsE->Write();
318418
fDataGraph->Write();
319419

320-
Measurement1D::Write(drawOpts);
321-
322420
}
323421

324422
double ElectronScattering_DurhamData::GetLikelihood() {

‎src/FCN/JointFCN.cxx

+2
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,8 @@ void JointFCN::ReconfigureUsingManager() {
601601
curevent->RWWeight = FitBase::GetRW()->CalcWeight(curevent);
602602
curevent->Weight = curevent->RWWeight * curevent->InputWeight;
603603
double rwweight = curevent->Weight;
604+
// std::cout << "RWWeight = " << curevent->RWWeight << " " << curevent->InputWeight << std::endl;
605+
604606

605607
// Logging
606608
if (LOG_LEVEL(REC)) {

‎src/FitBase/GENIEInputHandler.cxx

+290-271
Large diffs are not rendered by default.

‎src/Reweight/GENIEWeightEngine.cxx

+1
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ double GENIEWeightEngine::CalcWeight(BaseFitEvt* evt) {
160160

161161
// Make nom weight
162162
rw_weight = fGenieRW->CalcWeight(*(evt->genie_event->event));
163+
std::cout << "Returning GENIE Weight for electron scattering = " << rw_weight << std::endl;
163164
#endif
164165

165166
// Return rw_weight

‎src/Utils/StackBase.cxx

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ void StackBase::Write() {
9393
bool saveseperate = FitPar::Config().GetParB("WriteSeperateStacks");
9494
for (size_t i = 0; i < fAllLabels.size(); i++) {
9595

96-
// if (!IncludeInStack(fAllHists[i])) continue;
97-
// if (!IncludeInStack(i)) continue;
96+
if (!IncludeInStack(fAllHists[i])) continue;
97+
if (!IncludeInStack(i)) continue;
9898

9999
fAllHists[i]->SetTitle( fAllTitles[i].c_str() );
100100
fAllHists[i]->GetXaxis()->SetTitle( fXTitle.c_str() );

0 commit comments

Comments
 (0)
Please sign in to comment.