Skip to content

Commit afc823d

Browse files
author
Jack Smedley
committed
Add neutron and kaon parameters, remove dependence on input XS file
1 parent 5a02db6 commit afc823d

5 files changed

Lines changed: 109 additions & 7 deletions

File tree

sbncode/SBNEventWeight/Calculators/Geant4/Geant4WeightCalc.cxx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ void Geant4WeightCalc::Configure(fhicl::ParameterSet const& p,
113113
fMakeOutputTrees = pset.get< bool >( "makeoutputtree", false );
114114
std::string mode = pset.get<std::string>("mode");
115115
std::string FracsFileName = pset.get< std::string >( "fracsfile" );
116-
std::string XSecFileName = pset.get< std::string >( "xsecfile" );
117116
std::vector< fhicl::ParameterSet > FitParSets = pset.get< std::vector< fhicl::ParameterSet > >("parameters");
118117
fNsims = pset.get<int> ("number_of_multisims", 0);
119118
fPdg = pset.get<int> ("pdg_to_reweight");
@@ -123,9 +122,8 @@ void Geant4WeightCalc::Configure(fhicl::ParameterSet const& p,
123122
// Prepare random generator
124123
fGaussRandom = new CLHEP::RandGaussQ(engine);
125124

126-
// Get input files
125+
// Get input file
127126
TFile FracsFile( FracsFileName.c_str(), "OPEN" );
128-
TFile XSecFile( XSecFileName.c_str(), "OPEN" );
129127

130128
// Configure G4Reweighter
131129
fParMaker = new G4ReweightParameterMaker( FitParSets, true , fPdg ); //TODO:Do we want check_overlap? Maybe a fcl switch?

sbncode/SBNEventWeight/jobs/geant4/eventweight_geant4_sbn.fcl

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
#include "piplus_reweight_parameters.fcl"
1515
#include "piminus_reweight_parameters.fcl"
1616
#include "proton_reweight_parameters.fcl"
17+
#include "neutron_reweight_parameters.fcl"
18+
#include "kplus_reweight_parameters.fcl"
19+
#include "kminus_reweight_parameters.fcl"
20+
1721
#include "material_parameters.fcl"
1822

1923
BEGIN_PROLOG
@@ -24,7 +28,7 @@ sbn_eventweight_geant4: {
2428
min_weight: 0.0
2529
max_weight: 100
2630

27-
weight_functions_reint: [ reinteractions_piplus , reinteractions_piminus, reinteractions_proton ]
31+
weight_functions_reint: [ reinteractions_piplus , reinteractions_piminus, reinteractions_proton , reinteractions_neutron , reinteractions_kplus , reinteractions_kminus ]
2832

2933
reinteractions_piplus: {
3034
type: Geant4
@@ -34,7 +38,6 @@ sbn_eventweight_geant4: {
3438
mode: multisim
3539
number_of_multisims: 1000
3640
fracsfile: "$SBNDATA_DIR/systematics/reint/g4_fracs_piplus.root"
37-
xsecfile: "$SBNDATA_DIR/systematics/reint/g4_cross_section_piplus.root"
3841
makeoutputtree: true
3942
pdg_to_reweight: 211
4043
debug: true
@@ -48,7 +51,6 @@ sbn_eventweight_geant4: {
4851
mode: multisim
4952
number_of_multisims: 1000
5053
fracsfile: "$SBNDATA_DIR/systematics/reint/g4_fracs_piminus.root"
51-
xsecfile: "$SBNDATA_DIR/systematics/reint/g4_cross_section_piminus.root"
5254
makeoutputtree: true
5355
pdg_to_reweight: -211
5456
debug: true
@@ -62,11 +64,50 @@ sbn_eventweight_geant4: {
6264
mode: multisim
6365
number_of_multisims: 1000
6466
fracsfile: "$SBNDATA_DIR/systematics/reint/g4_fracs_proton.root"
65-
xsecfile: "$SBNDATA_DIR/systematics/reint/g4_cross_section_proton.root"
6667
makeoutputtree: true
6768
pdg_to_reweight: 2212
6869
debug: true
6970
}
71+
72+
reinteractions_neutron: {
73+
type: Geant4
74+
material: @local::LAr
75+
random_seed: 60
76+
parameters: @local::NeutronParameters
77+
mode: multisim
78+
number_of_multisims: 1000
79+
fracsfile: "$SBNDATA_DIR/systematics/reint/g4_fracs_proton.root"
80+
makeoutputtree: true
81+
pdg_to_reweight: 2112
82+
debug: true
83+
}
84+
85+
reinteractions_kplus: {
86+
type: Geant4
87+
material: @local::LAr
88+
random_seed: 60
89+
parameters: @local::KPlusParameters
90+
mode: multisim
91+
number_of_multisims: 1000
92+
fracsfile: "$SBNDATA_DIR/systematics/reint/g4_fracs_proton.root"
93+
makeoutputtree: true
94+
pdg_to_reweight: 321
95+
debug: true
96+
}
97+
98+
reinteractions_kminus: {
99+
type: Geant4
100+
material: @local::LAr
101+
random_seed: 60
102+
parameters: @local::KMinusParameters
103+
mode: multisim
104+
number_of_multisims: 1000
105+
fracsfile: "$SBNDATA_DIR/systematics/reint/g4_fracs_proton.root"
106+
makeoutputtree: true
107+
pdg_to_reweight: -321
108+
debug: true
109+
}
110+
70111
}
71112

72113
# reinteractions_neutron
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
BEGIN_PROLOG
2+
3+
KMinusParameters: [
4+
{
5+
Name: "fKMinusReac"
6+
Cut: "reac"
7+
Range: [10., 2005.]
8+
Nominal: 1
9+
Sigma: 0.2
10+
},
11+
12+
{
13+
Name: "fKMinusElast"
14+
Cut: "elast"
15+
Range: [10.0, 2005.00]
16+
Nominal: 1.0
17+
Sigma: 0.2
18+
}
19+
]
20+
21+
END_PROLOG
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
BEGIN_PROLOG
2+
3+
KPlusParameters: [
4+
{
5+
Name: "fKPlusReac"
6+
Cut: "reac"
7+
Range: [10., 2005.]
8+
Nominal: 1
9+
Sigma: 0.2
10+
},
11+
12+
{
13+
Name: "fKPlusElast"
14+
Cut: "elast"
15+
Range: [10.0, 2005.00]
16+
Nominal: 1.0
17+
Sigma: 0.2
18+
}
19+
]
20+
21+
END_PROLOG
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
BEGIN_PROLOG
2+
3+
NeutronParameters: [
4+
{
5+
Name: "fNeutronReac"
6+
Cut: "reac"
7+
Range: [10., 2005.]
8+
Nominal: 1
9+
Sigma: 0.2
10+
},
11+
12+
{
13+
Name: "fNeutronElast"
14+
Cut: "elast"
15+
Range: [10.0, 2005.00]
16+
Nominal: 1.0
17+
Sigma: 0.2
18+
}
19+
]
20+
21+
END_PROLOG

0 commit comments

Comments
 (0)