Skip to content

Commit 5e0bbfa

Browse files
committed
Remove stale code used for debugging updates to GReWeightXSecMEC
1 parent 5361df0 commit 5e0bbfa

1 file changed

Lines changed: 6 additions & 55 deletions

File tree

‎src/RwCalculators/GReWeightXSecMEC.cxx‎

Lines changed: 6 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@
3838
#include "RwFramework/GSystSet.h"
3939
#include "RwFramework/GSystUncertainty.h"
4040

41-
// Standard library includes
42-
#include <iomanip>
43-
4441
// GNU Scientific library includes
4542
#include <gsl/gsl_sf_legendre.h>
4643

@@ -61,9 +58,6 @@ namespace {
6158
return temp_map;
6259
}
6360

64-
// Counter for loop over events
65-
int current_event = 0;
66-
6761
//// MECGenerator::SelectEmpiricalKinematics() uses bogus hard-coded
6862
//// limits which are copied below for consistency.
6963
//// TODO: Do something better in MECGenerator, then change this
@@ -279,24 +273,14 @@ double GReWeightXSecMEC::CalcWeight(const genie::EventRecord& event)
279273
bool is_mec = event.Summary()->ProcInfo().IsMEC();
280274
if ( !is_mec ) return 1.;
281275

282-
current_event++;
283-
std::cout << "Event: " << current_event << " <-- New event" << std::endl;
284276
double weight = this->CalcWeightNorm( event );
285-
std::cout << "Weight norm: " << weight << std::endl;
286277
weight *= this->CalcWeightAngularDist( event );
287-
std::cout << "Weight ang: " << weight << std::endl;
288278
weight *= this->CalcWeightAngularDistLegendre( event );
289-
std::cout << "Weight ang Legendre: " << weight << std::endl;
290279
weight *= this->CalcWeightPNDelta( event );
291-
std::cout << "Weight pndel: " << weight << std::endl;
292280
weight *= this->CalcWeightXSecShape( event );
293-
std::cout << "Weight xsecshape: " << weight << std::endl;
294281
weight *= this->CalcWeightXSecShape_Empirical( event );
295-
std::cout << "Weight xsecshape_empirical: " << weight << std::endl;
296282
weight *= this->CalcWeightXSecShape_Martini( event );
297-
std::cout << "Weight xsecshape_martini: " << weight << std::endl;
298283
weight *= this->CalcWeightEnergyDependence( event );
299-
std::cout << "Weight edep: " << weight << std::endl;
300284
return weight;
301285
}
302286
//_______________________________________________________________________________________
@@ -424,9 +408,7 @@ double GReWeightXSecMEC::CalcWeightAngularDist(const genie::EventRecord& event)
424408
double twk_dial = std::max( std::min(1., fDecayAngTwkDial), -1. );
425409
double twk_dial2 = fDecayAng2TwkDial;
426410

427-
if( twk_dial2 == 0 ) twk_dial2 = 1.0;
428-
429-
std::cout << "twk_dial = " << twk_dial << "; twk_dial2 = " << twk_dial2 << std::endl << std::endl;
411+
if ( twk_dial2 == 0 ) twk_dial2 = 1.0;
430412

431413
// If the tweak dials are set to zero (or are really small) then just return a
432414
// weight of unity
@@ -661,8 +643,6 @@ double GReWeightXSecMEC::CalcWeightAngularDistLegendre(const genie::EventRecord&
661643
// the angle is divided by \Pi/2 and subtracted by 1 such that the argument of P_l(x) is
662644
// within [-1,1]. The factor 3 is to enhance the effect of the reweighting as P_l(x) < 1.
663645

664-
std::cout << "Legendre polynomial P_l( " << 1 << " , " << std::cos(theta_N1) << ") = " << gsl_sf_legendre_Pl(1, std::cos(theta_N1)) << std::endl;
665-
666646
double weight = CalcWeightDecayAngMECLegendre(theta_N1, twk_dial, twk_dial2, twk_dial3, twk_dial4, twk_dial5, twk_dial6);
667647

668648
return weight;
@@ -1024,9 +1004,6 @@ double GReWeightXSecMEC::CalcWeightXSecShape(const genie::EventRecord& event)
10241004
// input tune, compute the differential and total cross section of GENIE's
10251005
// Valencia MEC (alternative) model.
10261006

1027-
std::cout << "Input (default) CCMEC cross section model name: " << cc_def_alg_name << std::endl;
1028-
std::cout << "Alternative CCMEC cross section model name: " << cc_alt_alg_name << std::endl;
1029-
10301007
diff_xsec_alt = fXSecAlgCCAlt_Nieves->XSec( interaction, kPSTlctl );
10311008
tot_xsec_alt = this->GetXSecIntegral( fXSecAlgCCAlt_Nieves, interaction );
10321009
}
@@ -1035,9 +1012,6 @@ double GReWeightXSecMEC::CalcWeightXSecShape(const genie::EventRecord& event)
10351012
// input tune, compute the differential and total cross section of GENIE's
10361013
// SuSAv2 MEC (alternative) model.
10371014

1038-
std::cout << "Input (default) CCMEC cross section model: " << cc_def_alg_name << std::endl;
1039-
std::cout << "Alternative CCMEC cross section model: " << cc_alt2_alg_name << std::endl;
1040-
10411015
diff_xsec_alt = fXSecAlgCCAlt_SuSAv2->XSec( interaction, kPSTlctl );
10421016
tot_xsec_alt = this->GetXSecIntegral( fXSecAlgCCAlt_SuSAv2, interaction );
10431017
}
@@ -1046,26 +1020,17 @@ double GReWeightXSecMEC::CalcWeightXSecShape(const genie::EventRecord& event)
10461020
// model from the input tune, compute the differential and total cross section of GENIE's
10471021
// SuSAv2 MEC (alternative) model.
10481022

1049-
std::cout << "Input (default) CCMEC cross section model: " << cc_def_alg_name << std::endl;
1050-
std::cout << "Alternative CCMEC cross section model: " << cc_alt2_alg_name << std::endl;
1051-
10521023
diff_xsec_alt = fXSecAlgCCAlt_SuSAv2->XSec( interaction, kPSTlctl );
10531024
tot_xsec_alt = this->GetXSecIntegral( fXSecAlgCCAlt_SuSAv2, interaction );
10541025
}
10551026
else {
1056-
// If the Empirical or any other model is the default CCMEC cross section model
1057-
// from the input tune, just return a weight of 1 as there are currently no
1058-
// plans to have either model as the default model.
1059-
1060-
LOG("ReW", pWARN) << "MEC xsecshape reweighting for other CCMEC models but SuSAv2 or Valencia model not implemented";
1061-
std::cout << "Input (default) CCMEC cross section model: Other, i.e. " << cc_def_alg_name << std::endl;
1062-
std::cout << "MEC xsecshape reweighting for other CCMEC models but SuSAv2, Valencia or Martini-Ericson-Chanfray-Marteau model not implemented" << std::endl;
1027+
// If the Empirical or any other model is the default CCMEC cross section
1028+
// model from the input tune, just return a weight of 1 as there are
1029+
// currently no plans to have either model as the default model.
1030+
LOG("ReW", pWARN) << "Unrecognized MEC model requested for MEC"
1031+
" xsec shape reweighting";
10631032
}
10641033

1065-
//LOG("RwMEC", pERROR) << "diff_xsec_alt = " << diff_xsec_alt << ", tot_xsec_alt = " << tot_xsec_alt;
1066-
1067-
//if ( tot_xsec_alt == 0. && diff_xsec_alt != 0. ) LOG("RwMEC", pERROR) << "OH NO!";
1068-
10691034
// Protect against NaNs when the total cross section for the alternative
10701035
// model is zero
10711036
if ( tot_xsec_alt == 0. ) {
@@ -1202,12 +1167,6 @@ double GReWeightXSecMEC::CalcWeightXSecShape_Empirical(const genie::EventRecord&
12021167
//double W = interaction->Kine().W();
12031168
//double Q2 = interaction->Kine().Q2();
12041169

1205-
//LOG("RwMEC", pERROR) << "NIEVES: W = " << W << ", Q2 = " << Q2;
1206-
//if ( rW.min <= W && rW.max >= W && rQ2.min <= Q2 && rQ2.max >= Q2 ) {
1207-
1208-
std::cout << "Input (default) CCMEC cross section model: " << cc_def_alg_name << std::endl;
1209-
std::cout << "Alternative CCMEC cross section model: " << cc_alt3_alg_name << std::endl;
1210-
12111170
// Once the CCMEC Martini model is available, just change fXSecAlgCCAlt3
12121171
// (reweight from SuSAv2 or Valencia to the Empirical model) to
12131172
// fXSecAlgCCAlt4 (reweight from SuSAv2 or Valencia to the Martini model)
@@ -1390,9 +1349,6 @@ double GReWeightXSecMEC::CalcWeightXSecShape_Martini(const genie::EventRecord& e
13901349
// input tune, compute the differential and total cross section of GENIE's
13911350
// Martini-Ericson-Chanfray-Marteau MEC (alternative) model
13921351

1393-
std::cout << "Input (default) CCMEC cross section model: " << cc_def_alg_name << std::endl;
1394-
std::cout << "Alternative CCMEC cross section model: " << cc_alt4_alg_name << std::endl;
1395-
13961352
diff_xsec_alt = fXSecAlgCCAlt_Martini->XSec( interaction, kPSTlctl );
13971353
tot_xsec_alt = this->GetXSecIntegral( fXSecAlgCCAlt_Martini, interaction );
13981354
}
@@ -1401,9 +1357,6 @@ double GReWeightXSecMEC::CalcWeightXSecShape_Martini(const genie::EventRecord& e
14011357
// input tune, compute the differential and total cross section of GENIE's
14021358
// Valencia MEC (alternative) model
14031359

1404-
std::cout << "Input (default) CCMEC cross section model: " << cc_def_alg_name << std::endl;
1405-
std::cout << "Alternative CCMEC cross section model: " << cc_alt_alg_name << std::endl;
1406-
14071360
diff_xsec_alt = fXSecAlgCCAlt_Nieves->XSec( interaction, kPSTlctl );
14081361
tot_xsec_alt = this->GetXSecIntegral( fXSecAlgCCAlt_Nieves, interaction );
14091362
}
@@ -1413,8 +1366,6 @@ double GReWeightXSecMEC::CalcWeightXSecShape_Martini(const genie::EventRecord& e
14131366
// plans to have any other model as the default model.
14141367

14151368
LOG("ReW", pWARN) << "MEC xsecshape reweighting for other CCMEC models but Valencia, SuSAv2 or Martini model not implemented";
1416-
std::cout << "Input (default) CCMEC cross section model: Other, i.e. " << cc_def_alg_name << std::endl;
1417-
std::cout << "MEC xsecshape reweighting for other CCMEC models but SuSAv2 or Valencia model not implemented" << std::endl;
14181369
}
14191370

14201371
//LOG("RwMEC", pERROR) << "diff_xsec_alt = " << diff_xsec_alt << ", tot_xsec_alt = " << tot_xsec_alt;

0 commit comments

Comments
 (0)