Functions | Variables
gRwght1Param.cxx File Reference
#include <string>
#include <sstream>
#include <cassert>
#include <TSystem.h>
#include <TFile.h>
#include <TTree.h>
#include <TArrayF.h>
#include "EVGCore/EventRecord.h"
#include "GHEP/GHepParticle.h"
#include "Ntuple/NtpMCFormat.h"
#include "Ntuple/NtpMCTreeHeader.h"
#include "Ntuple/NtpMCEventRecord.h"
#include "Messenger/Messenger.h"
#include "Numerical/RandomGen.h"
#include "PDG/PDGCodes.h"
#include "PDG/PDGCodeList.h"
#include "ReWeight/GReWeightI.h"
#include "ReWeight/GSystSet.h"
#include "ReWeight/GSyst.h"
#include "ReWeight/GReWeight.h"
#include "ReWeight/GReWeightNuXSecNCEL.h"
#include "ReWeight/GReWeightNuXSecCCQE.h"
#include "ReWeight/GReWeightNuXSecCCRES.h"
#include "ReWeight/GReWeightNuXSecCOH.h"
#include "ReWeight/GReWeightNonResonanceBkg.h"
#include "ReWeight/GReWeightFGM.h"
#include "ReWeight/GReWeightDISNuclMod.h"
#include "ReWeight/GReWeightResonanceDecay.h"
#include "ReWeight/GReWeightFZone.h"
#include "ReWeight/GReWeightINuke.h"
#include "ReWeight/GReWeightAGKY.h"
#include "ReWeight/GReWeightNuXSecCCQEaxial.h"
#include "ReWeight/GReWeightNuXSecCCQEvec.h"
#include "ReWeight/GReWeightNuXSecNCRES.h"
#include "ReWeight/GReWeightNuXSecDIS.h"
#include "Utils/AppInit.h"
#include "Utils/RunOpt.h"
#include "Utils/CmdLnArgParser.h"

Go to the source code of this file.

Functions

void GetCommandLineArgs (int argc, char **argv)
 
void PrintSyntax (void)
 
void GetEventRange (Long64_t nev_in_file, Long64_t &nfirst, Long64_t &nlast)
 
int main (int argc, char **argv)
 

Variables

string gOptInpFilename
 name for input file (contains input event tree) More...
 
string gOptOutFilename
 name for output file (contains the output weight tree) More...
 
Long64_t gOptNEvt1
 range of events to process (1st input, if any) More...
 
Long64_t gOptNEvt2
 range of events to process (2nd input, if any) More...
 
GSyst_t gOptSyst
 input systematic param More...
 
int gOptInpNTwk
 

of tweaking dial values in the specified range

More...
 
double gOptMinTwk
 Minimum value of tweaked dial. More...
 
double gOptMaxTwk
 Maximum value of tweaked dial. More...
 
PDGCodeList gOptNu (false)
 neutrinos to consider More...
 
long int gOptRanSeed
 random number seed More...
 

Function Documentation

void GetCommandLineArgs ( int  argc,
char **  argv 
)

Definition at line 358 of file gRwght1Param.cxx.

359 {
360  LOG("grwght1scan", pINFO)
361  << "*** Parsing command line arguments";
362 
363  LOG("grwght1scan", pINFO) << "Parsing command line arguments";
364 
365  // Common run options. Set defaults and read.
366  RunOpt::Instance()->ReadFromCommandLine(argc,argv);
367 
368  // Parse run options for this app
369 
370  CmdLnArgParser parser(argc,argv);
371 
372  // get GENIE event sample
373  if(parser.OptionExists('f')) {
374  LOG("grwght1scan", pINFO) << "Reading event sample filename";
375  gOptInpFilename = parser.ArgAsString('f');
376  } else {
377  LOG("grwght1scan", pFATAL)
378  << "Unspecified input filename - Exiting";
379  gAbortingInErr = true;
380  PrintSyntax();
381  exit(1);
382  }
383 
384  // range of event numbers to process
385  if ( parser.OptionExists('n') ) {
386  //
387  LOG("grwght1scan", pINFO) << "Reading number of events to analyze";
388  string nev = parser.ArgAsString('n');
389  if (nev.find(",") != string::npos) {
390  vector<long> vecn = parser.ArgAsLongTokens('n',",");
391  if(vecn.size()!=2) {
392  LOG("grwght1scan", pFATAL) << "Invalid syntax";
393  gAbortingInErr = true;
394  PrintSyntax();
395  exit(1);
396  }
397  // User specified a comma-separated set of values n1,n2.
398  // Use [n1,n2] as the event range to process.
399  gOptNEvt1 = vecn[0];
400  gOptNEvt2 = vecn[1];
401  } else {
402  // User specified a single number n.
403  // Use [0,n] as the event range to process.
404  gOptNEvt1 = -1;
405  gOptNEvt2 = parser.ArgAsLong('n');
406  }
407  } else {
408  LOG("grwght1scan", pINFO)
409  << "Unspecified number of events to analyze - Use all";
410  gOptNEvt1 = -1;
411  gOptNEvt2 = -1;
412  }
413  LOG("grwght1scan", pDEBUG)
414  << "Input event range: " << gOptNEvt1 << ", " << gOptNEvt2;
415 
416  // get the number of tweak dials to scan
417  if(parser.OptionExists('t')) {
418  LOG("grwght1scan", pINFO)
419  << "Reading number of tweak dial values";
420  gOptInpNTwk = parser.ArgAsInt('t');
421  if(gOptInpNTwk % 2 == 0)
422  {
423  gOptInpNTwk+=1;
424  }
425  if(gOptInpNTwk < 3)
426  {
427  LOG("grwght1scan", pFATAL)
428  << "Specified number of tweak dial is too low, min value is 3 - Exiting";
429  gAbortingInErr = true;
430  PrintSyntax();
431  exit(1);
432  }
433  } else {
434  LOG("grwght1scan", pFATAL)
435  << "Unspecified number of tweak dials - Exiting";
436  gAbortingInErr = true;
437  PrintSyntax();
438  exit(1);
439  }
440 
441  // get the systematics
442  if(parser.OptionExists('s')) {
443  LOG("grwght1scan", pINFO)
444  << "Reading input systematic parameter";
445  string systematic = parser.ArgAsString('s');
446  gOptSyst = GSyst::FromString(systematic);
447  if(gOptSyst == kNullSystematic) {
448  LOG("grwght1scan", pFATAL) << "Unknown systematic: " << systematic;
449  gAbortingInErr = true;
450  PrintSyntax();
451  exit(1);
452  }
453  } else {
454  LOG("grwght1scan", pFATAL)
455  << "You need to specify a systematic param using -s";
456  gAbortingInErr = true;
457  PrintSyntax();
458  exit(1);
459  }
460 
461  // output weight file
462  if(parser.OptionExists('o')) {
463  LOG("grwght1scan", pINFO) << "Reading requested output filename";
464  gOptOutFilename = parser.ArgAsString('o');
465  } else {
466  LOG("grwght1scan", pINFO) << "Setting default output filename";
467  ostringstream nm;
468  nm << "weights_" << GSyst::AsString(gOptSyst) << ".root";
469  gOptOutFilename = nm.str();
470  }
471 
472  // which species to reweight?
473  if(parser.OptionExists('p')) {
474  LOG("grwght1scan", pINFO)
475  << "Reading input list of neutrino codes";
476  vector<int> vecpdg = parser.ArgAsIntTokens('p',",");
477  if(vecpdg.size()==0) {
478  LOG("grwght1scan", pFATAL)
479  << "Empty list of neutrino codes!?";
480  gAbortingInErr = true;
481  PrintSyntax();
482  exit(1);
483  }
484  vector<int>::const_iterator it = vecpdg.begin();
485  for( ; it!=vecpdg.end(); ++it) {
486  gOptNu.push_back(*it);
487  }
488  } else {
489  LOG("grwght1scan", pINFO)
490  << "Considering all neutrino species";
497  }
498 
499  // random number seed
500  if( parser.OptionExists("seed") ) {
501  LOG("grwght1scan", pINFO) << "Reading random number seed";
502  gOptRanSeed = parser.ArgAsLong("seed");
503  } else {
504  LOG("grwght1scan", pINFO) << "Unspecified random number seed - Using default";
505  gOptRanSeed = -1;
506  }
507 
508  // min and max tweak values
509  if( parser.OptionExists("min-tweak") ) {
510  gOptMinTwk = parser.ArgAsDouble("min-tweak");
511  } else {
512  gOptMinTwk = -5;
513  }
514  if( parser.OptionExists("max-tweak") ) {
515  gOptMaxTwk = parser.ArgAsDouble("max-tweak");
516  } else {
517  gOptMaxTwk = -5;
518  }
519 
520 }
Resonance_t FromString(const char *res)
string -> resonance id
string gOptOutFilename
name for output file (contains the output weight tree)
const int kPdgNuE
Definition: PDGCodes.h:25
const int kPdgAntiNuE
Definition: PDGCodes.h:26
long int gOptRanSeed
random number seed
#define pFATAL
Definition: Messenger.h:47
const int kPdgNuMu
Definition: PDGCodes.h:27
std::string AsString(TrkPoint_t trkpt)
Long64_t gOptNEvt2
range of events to process (2nd input, if any)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:87
intermediate_table::const_iterator const_iterator
void PrintSyntax(void)
GSyst_t gOptSyst
input systematic param
#define pINFO
Definition: Messenger.h:53
const int kPdgAntiNuTau
Definition: PDGCodes.h:30
const int kPdgAntiNuMu
Definition: PDGCodes.h:28
double gOptMinTwk
Minimum value of tweaked dial.
PDGCodeList gOptNu(false)
neutrinos to consider
const int kPdgNuTau
Definition: PDGCodes.h:29
string gOptInpFilename
name for input file (contains input event tree)
Long64_t gOptNEvt1
range of events to process (1st input, if any)
Command line argument parser.
int gOptInpNTwk
of tweaking dial values in the specified range
bool gAbortingInErr
Definition: Messenger.cxx:56
void push_back(int pdg_code)
Definition: PDGCodeList.cxx:67
#define pDEBUG
Definition: Messenger.h:54
double gOptMaxTwk
Maximum value of tweaked dial.
void GetEventRange ( Long64_t  nev_in_file,
Long64_t &  nfirst,
Long64_t &  nlast 
)

Definition at line 522 of file gRwght1Param.cxx.

523 {
524  nfirst = 0;
525  nlast = 0;
526 
527  if(gOptNEvt1>=0 && gOptNEvt2>=0) {
528  // Input was `-n N1,N2'.
529  // Process events [N1,N2].
530  // Note: Incuding N1 and N2.
531  nfirst = gOptNEvt1;
532  nlast = TMath::Min(nev_in_file-1, gOptNEvt2);
533  }
534  else
535  if(gOptNEvt1<0 && gOptNEvt2>=0) {
536  // Input was `-n N'.
537  // Process first N events [0,N).
538  // Note: Event N is not included.
539  nfirst = 0;
540  nlast = TMath::Min(nev_in_file-1, gOptNEvt2-1);
541  }
542  else
543  if(gOptNEvt1<0 && gOptNEvt2<0) {
544  // No input. Process all events.
545  nfirst = 0;
546  nlast = nev_in_file-1;
547  }
548 
549  assert(nfirst < nlast && nfirst >= 0 && nlast <= nev_in_file-1);
550 }
Long64_t gOptNEvt2
range of events to process (2nd input, if any)
Long64_t gOptNEvt1
range of events to process (1st input, if any)
int main ( int  argc,
char **  argv 
)

Definition at line 145 of file gRwght1Param.cxx.

146 {
147  GetCommandLineArgs (argc, argv);
148 
149  utils::app_init::MesgThresholds(RunOpt::Instance()->MesgThresholdFiles());
151  GHepRecord::SetPrintLevel(RunOpt::Instance()->EventRecordPrintLevel());
152 
153  // Get the input event sample
154  TTree * tree = 0;
155  NtpMCTreeHeader * thdr = 0;
156  TFile file(gOptInpFilename.c_str(),"READ");
157  tree = dynamic_cast <TTree *> ( file.Get("gtree") );
158  thdr = dynamic_cast <NtpMCTreeHeader *> ( file.Get("header") );
159  LOG("grwght1scan", pNOTICE) << "Input tree header: " << *thdr;
160  if(!tree){
161  LOG("grwght1scan", pFATAL)
162  << "Can't find a GHEP tree in input file: "<< file.GetName();
163  gAbortingInErr = true;
164  PrintSyntax();
165  exit(1);
166  }
167  NtpMCEventRecord * mcrec = 0;
168  tree->SetBranchAddress("gmcrec", &mcrec);
169 
170  Long64_t nev_in_file = tree->GetEntries();
171 
172  // The tweaking dial takes N values between [-1,1]
173 
174  const int n_points = gOptInpNTwk;
175  const float twk_dial_min = gOptMinTwk;
176  const float twk_dial_max = gOptMaxTwk;
177  const float twk_dial_step = (twk_dial_max - twk_dial_min) / (n_points-1);
178 
179  // Work-out the range of events to process
180  Long64_t nfirst = 0;
181  Long64_t nlast = 0;
182  GetEventRange(nev_in_file, nfirst, nlast);
183 
184  Long64_t nev = (nlast - nfirst + 1);
185 
186  //
187  // Summarize
188  //
189 
190  LOG("grwght1scan", pNOTICE)
191  << "\n"
192  << "\n** grwght1scan: Will start processing events promptly."
193  << "\nHere is a summary of inputs: "
194  << "\n - Input event file: " << gOptInpFilename
195  << "\n - Processing: " << nev << " events in the range [" << nfirst << ", " << nlast << "]"
196  << "\n - Systematic parameter to tweak: " << GSyst::AsString(gOptSyst)
197  << "\n - Number of tweak dial values in [" << gOptMinTwk << ", " << gOptMaxTwk << "] : " << gOptInpNTwk
198  << "\n - Neutrino species to reweight : " << gOptNu
199  << "\n - Output weights to be saved in : " << gOptOutFilename
200  << "\n - Specified random number seed : " << gOptRanSeed
201  << "\n\n";
202 
203 
204  // Declare the weights and twkdial arrays
205  const int n_events = (const int) nev;
206  float weights [n_events][n_points];
207  float twkdials [n_events][n_points];
208 
209  // Create a GReWeight object and add to it a set of weight calculators
210 
211  GReWeight rw;
212  rw.AdoptWghtCalc( "xsec_ncel", new GReWeightNuXSecNCEL );
213  rw.AdoptWghtCalc( "xsec_ccqe", new GReWeightNuXSecCCQE );
214  rw.AdoptWghtCalc( "xsec_ccqe_axial", new GReWeightNuXSecCCQEaxial );
215  rw.AdoptWghtCalc( "xsec_ccqe_vec", new GReWeightNuXSecCCQEvec );
216  rw.AdoptWghtCalc( "xsec_ccres", new GReWeightNuXSecCCRES );
217  rw.AdoptWghtCalc( "xsec_ncres", new GReWeightNuXSecNCRES );
218  rw.AdoptWghtCalc( "xsec_nonresbkg", new GReWeightNonResonanceBkg );
219  rw.AdoptWghtCalc( "xsec_coh", new GReWeightNuXSecCOH );
220  rw.AdoptWghtCalc( "xsec_dis", new GReWeightNuXSecDIS );
221  rw.AdoptWghtCalc( "nuclear_qe", new GReWeightFGM );
222  rw.AdoptWghtCalc( "nuclear_dis", new GReWeightDISNuclMod );
223  rw.AdoptWghtCalc( "hadro_res_decay", new GReWeightResonanceDecay );
224  rw.AdoptWghtCalc( "hadro_fzone", new GReWeightFZone );
225  rw.AdoptWghtCalc( "hadro_intranuke", new GReWeightINuke );
226  rw.AdoptWghtCalc( "hadro_agky", new GReWeightAGKY );
227 
228  // Get GSystSet and include the (single) input systematic parameter
229 
230  GSystSet & syst = rw.Systematics();
231  syst.Init(gOptSyst);
232 
233  // Fine-tune weight calculators
234 
236  // By default GReWeightNuXSecCCQE is in `NormAndMaShape' mode
237  // where Ma affects the shape of dsigma/dQ2 and a different param affects the normalization
238  // If the input is MaCCQE, switch the weight calculator to `Ma' mode
239  GReWeightNuXSecCCQE * rwccqe =
240  dynamic_cast<GReWeightNuXSecCCQE *> (rw.WghtCalc("xsec_ccqe"));
241  rwccqe->SetMode(GReWeightNuXSecCCQE::kModeMa);
242  }
244  // As above, but for the GReWeightNuXSecCCRES weight calculator
245  GReWeightNuXSecCCRES * rwccres =
246  dynamic_cast<GReWeightNuXSecCCRES *> (rw.WghtCalc("xsec_ccres"));
247  rwccres->SetMode(GReWeightNuXSecCCRES::kModeMaMv);
248  }
250  // As above, but for the GReWeightNuXSecNCRES weight calculator
251  GReWeightNuXSecNCRES * rwncres =
252  dynamic_cast<GReWeightNuXSecNCRES *> (rw.WghtCalc("xsec_ncres"));
253  rwncres->SetMode(GReWeightNuXSecNCRES::kModeMaMv);
254  }
257  // Similarly for the GReWeightNuXSecDIS weight calculator.
258  // There the default behaviour is for the Aht, Bht, CV1u and CV2u Bodek-Yang
259  // params to affects both normalization and dsigma/dxdy shape.
260  // Switch mode if a shape-only param is specified.
261  GReWeightNuXSecDIS * rwdis =
262  dynamic_cast<GReWeightNuXSecDIS *> (rw.WghtCalc("xsec_dis"));
263  rwdis->SetMode(GReWeightNuXSecDIS::kModeABCV12uShape);
264  }
265 
266  // Twk dial loop
267  for(int ith_dial = 0; ith_dial < n_points; ith_dial++){
268 
269  // Set non-default values and re-configure.
270  double twk_dial = twk_dial_min + ith_dial * twk_dial_step;
271  LOG("grwght1scan", pNOTICE)
272  << "\n\nReconfiguring systematic: " << GSyst::AsString(gOptSyst)
273  << " - Setting tweaking dial to: " << twk_dial;
274  syst.Set(gOptSyst, twk_dial);
275  rw.Reconfigure();
276 
277  // Event loop
278  for(int iev = nfirst; iev <= nlast; iev++) {
279 
280  if(iev%100 == 0) {
281  LOG("grwght1scan", pNOTICE)
282  << "***** Currently at event number: "<< iev;
283  }
284 
285  // Get next event
286  tree->GetEntry(iev);
287  EventRecord & event = *(mcrec->event);
288  LOG("grwght1scan", pINFO) << "Event: " << iev << "\n" << event;
289 
290  // Reset arrays
291  int idx = iev - nfirst;
292  weights [idx][ith_dial] = -99999.0;
293  twkdials [idx][ith_dial] = twk_dial;
294 
295  // Reweight this event?
296  int nupdg = event.Probe()->Pdg();
297  bool do_reweight = gOptNu.ExistsInPDGCodeList(nupdg);
298 
299  // Calculate weight
300  double wght=1.;
301  if(do_reweight) {
302  wght = rw.CalcWeight(event);
303  }
304 
305  // Print/store
306  LOG("grwght1scan", pDEBUG)
307  << "Overall weight = " << wght;
308  weights[idx][ith_dial] = wght;
309 
310  // Clean-up
311  mcrec->Clear();
312 
313  } // evt loop
314  } // twk_dial loop
315 
316  // Close event file
317  file.Close();
318 
319  //
320  // Save weights
321  //
322 
323  // Make an output tree for saving the weights. As only considering
324  // varying a single systematic use this for name of tree.
325  TFile * wght_file = new TFile(gOptOutFilename.c_str(), "RECREATE");
326  TTree * wght_tree = new TTree(GSyst::AsString(gOptSyst).c_str(), "GENIE weights tree");
327  int branch_eventnum = 0;
328  TArrayF * branch_weight_array = new TArrayF(n_points);
329  TArrayF * branch_twkdials_array = new TArrayF(n_points);
330  wght_tree->Branch("eventnum", &branch_eventnum);
331  wght_tree->Branch("weights", &branch_weight_array);
332  wght_tree->Branch("twkdials", &branch_twkdials_array);
333 
334  for(int iev = nfirst; iev <= nlast; iev++) {
335  int idx = iev - nfirst;
336  branch_eventnum = iev;
337  for(int ith_dial = 0; ith_dial < n_points; ith_dial++){
338  LOG("grwght1scan", pDEBUG)
339  << "Filling tree with wght = " << weights[idx][ith_dial]
340  << ", twk dial = "<< twkdials[idx][ith_dial];
341  branch_weight_array -> AddAt (weights [idx][ith_dial], ith_dial);
342  branch_twkdials_array -> AddAt (twkdials[idx][ith_dial], ith_dial);
343  } // twk_dial loop
344  wght_tree->Fill();
345  }
346 
347  wght_file->cd();
348  wght_tree->Write();
349  delete wght_tree;
350  wght_tree = 0;
351  wght_file->Close();
352 
353  LOG("grwght1scan", pNOTICE) << "Done!";
354 
355  return 0;
356 }
Reweighting GENIE DIS neutrino-nucleus cross sections.
void RandGen(long int seed)
Definition: AppInit.cxx:37
tweak Mv CCRES, affects d2sigma(CCRES)/dWdQ2 both in shape and normalization
Definition: GSyst.h:59
string gOptOutFilename
name for output file (contains the output weight tree)
MINOS-style ntuple record. Each such ntuple record holds a generated EventRecord object. Ntuples of this type are intended for feeding GENIE events into other applications (for example the GEANT4 based MC generation framework of an experiment) if no direct interface exists.
Reweighting the GENIE AGKY (free-nucleon) hadronization model.
Definition: GReWeightAGKY.h:39
Reweighting CCQE GENIE neutrino cross sections.
long int gOptRanSeed
random number seed
void GetEventRange(Long64_t nev_in_file, Long64_t &nfirst, Long64_t &nlast)
#define pFATAL
Definition: Messenger.h:47
tweak the Bodek-Yang model parameter B_{ht} - shape only effect to d2sigma(DIS)/dxdy ...
Definition: GSyst.h:91
Reweighting NCEL GENIE neutrino cross sections.
Reweight GENIE NC resonance neutrino-production cross section. Basically a clone of the corresponding...
bool ExistsInPDGCodeList(int pdg_code) const
std::string AsString(TrkPoint_t trkpt)
void Reconfigure(void)
reconfigure weight calculators with new params
Definition: GReWeight.cxx:74
GReWeightI * WghtCalc(string name)
access a weight calculator by name
Definition: GReWeight.cxx:61
void Set(GSyst_t syst, double current_value)
Definition: GSystSet.cxx:89
Reweighting vector form factors in GENIE CCQE neutrino cross section calculations.
void Init(GSyst_t syst, double init=0., double min=-1., double max=+1., double step=0.05)
Definition: GSystSet.cxx:42
Reweighting vector form factors in GENIE CCQE neutrino cross section calculations.
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:87
void PrintSyntax(void)
Reweighting the Fermi Gas nuclear model.
Definition: GReWeightFGM.h:46
GSyst_t gOptSyst
input systematic param
MINOS-style Ntuple Class to hold an output MC Tree Header.
Reweighting the formation zone model.
#define pINFO
Definition: Messenger.h:53
double gOptMinTwk
Minimum value of tweaked dial.
void AdoptWghtCalc(string name, GReWeightI *wcalc)
add concrete weight calculator, transfers ownership
Definition: GReWeight.cxx:54
PDGCodeList gOptNu(false)
neutrinos to consider
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
Definition: EventRecord.h:38
void GetCommandLineArgs(int argc, char **argv)
tweak Mv NCRES, affects d2sigma(NCRES)/dWdQ2 both in shape and normalization
Definition: GSyst.h:64
tweak the Bodek-Yang model parameter A_{ht} - shape only effect to d2sigma(DIS)/dxdy ...
Definition: GSyst.h:90
tweak Ma CCRES, affects d2sigma(CCRES)/dWdQ2 both in shape and normalization
Definition: GSyst.h:58
Reweighting the DIS nuclear modification model.
string gOptInpFilename
name for input file (contains input event tree)
tweak Ma CCQE, affects dsigma(CCQE)/dQ2 both in shape and normalization
Definition: GSyst.h:52
tweak the Bodek-Yang model parameter CV1u - shape only effect to d2sigma(DIS)/dxdy ...
Definition: GSyst.h:92
double CalcWeight(const genie::EventRecord &event)
calculate weight for input event
Definition: GReWeight.cxx:99
Reweighting resonance decays.
void MesgThresholds(string inpfile)
Reweight GENIE CC resonance neutrino-production.
#define pNOTICE
Definition: Messenger.h:52
GSystSet & Systematics(void)
set of enabled systematic params & values
Definition: GReWeight.cxx:69
void Clear(Option_t *opt="")
int gOptInpNTwk
of tweaking dial values in the specified range
bool gAbortingInErr
Definition: Messenger.cxx:56
tweak the Bodek-Yang model parameter CV2u - shape only effect to d2sigma(DIS)/dxdy ...
Definition: GSyst.h:93
Set of systematics to be considered by the reweighting package.
Definition: GSystSet.h:37
Interface to the GENIE event reweighting engines.
Definition: GReWeight.h:40
EventRecord * event
event
Reweighting GENIE coherent neutrino-nucleus cross sections.
Reweighting non-resonance background level.
Reweighting GENIE INTRANUKE/hA hadron transport model.
#define pDEBUG
Definition: Messenger.h:54
double gOptMaxTwk
Maximum value of tweaked dial.
tweak Ma NCRES, affects d2sigma(NCRES)/dWdQ2 both in shape and normalization
Definition: GSyst.h:63
void PrintSyntax ( void  )

Definition at line 552 of file gRwght1Param.cxx.

553 {
554  LOG("grwght1scan", pFATAL)
555  << "\n\n"
556  << "grwght1scan \n"
557  << " -f input_event_file \n"
558  << " [-n n1[,n2]] \n"
559  << " -s systematic \n"
560  << " -t n_twk_diall_values \n"
561  << " [--min-tweak minimum_tweak_value] \n"
562  << " [--max-tweak maximum_tweak_value] \n"
563  << " [-p neutrino_codes] \n"
564  << " [-o output_weights_file] \n"
565  << " [--seed random_number_seed] \n"
566  << " [--message-thresholds xml_file]\n"
567  << " [--event-record-print-level level]\n\n\n"
568  << " See the GENIE Physics and User manual for more details";
569 }
#define pFATAL
Definition: Messenger.h:47
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:87

Variable Documentation

string gOptInpFilename

name for input file (contains input event tree)

Definition at line 133 of file gRwght1Param.cxx.

int gOptInpNTwk

of tweaking dial values in the specified range

Definition at line 138 of file gRwght1Param.cxx.

double gOptMaxTwk

Maximum value of tweaked dial.

Definition at line 140 of file gRwght1Param.cxx.

double gOptMinTwk

Minimum value of tweaked dial.

Definition at line 139 of file gRwght1Param.cxx.

Long64_t gOptNEvt1

range of events to process (1st input, if any)

Definition at line 135 of file gRwght1Param.cxx.

Long64_t gOptNEvt2

range of events to process (2nd input, if any)

Definition at line 136 of file gRwght1Param.cxx.

PDGCodeList gOptNu(false)

neutrinos to consider

string gOptOutFilename

name for output file (contains the output weight tree)

Definition at line 134 of file gRwght1Param.cxx.

long int gOptRanSeed

random number seed

Definition at line 142 of file gRwght1Param.cxx.

GSyst_t gOptSyst

input systematic param

Definition at line 137 of file gRwght1Param.cxx.