GENIE2ART.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file GENIE2ART.h
3 /// \brief Functions for transforming GENIE objects into ART objects (and back)
4 ///
5 /// \version $Id: GENIE2ART.h,v 1.0 2016-04-20 18:42:01 rhatcher Exp $
6 /// \author rhatcher@fnal.gov
7 /// Parts taken from GENIEHelper & NuReweight classes
8 ///
9 ////////////////////////////////////////////////////////////////////////
10 #ifndef EVGB_GENIE2ART_H
11 #define EVGB_GENIE2ART_H
12 
13 #include <string>
14 
15 /// GENIE neutrino interaction simulation objects
16 namespace genie {
17  class EventRecord;
18  class GFluxI;
19  namespace flux {
20  class GNuMIFlux;
21  class GNuMIFluxPassThroughInfo;
22  class GSimpleNtpFlux;
23  class GSimpleNtpEntry;
24  class GSimpleNtpNuMI;
25  class GSimpleNtpAux;
26  class GSimpleNtpMeta;
27  class GDk2NuFlux;
28  }
29 }
30 namespace bsim {
31  class Dk2Nu;
32  class NuChoice;
33  class DkMeta;
34 }
35 
36 /// ART objects
37 namespace simb {
38  class MCTruth;
39  class GTruth;
40  class MCFlux;
41 }
42 
43 /// ROOT objects
44 class TLorentzVector;
45 
46 namespace evgb {
47 
48 
49  // utility function: if s starts w/ $, get env var, otherwise return as is
51 
52  void SetEventGeneratorListAndTune(const std::string& evtlistname = "",
53  const std::string& tunename = "${GENIE_XSEC_TUNE}");
54 
55  // adapted from GENIEHelper
56  void FillMCTruth(const genie::EventRecord* grec,
57  double spillTime,
58  simb::MCTruth& mctruth);
59  void FillMCTruth(const genie::EventRecord* grec,
60  TLorentzVector& vtxOffset,
61  simb::MCTruth& mctruth);
62  void FillGTruth(const genie::EventRecord* grec,
63  simb::GTruth& gtruth);
64 
65  /// return genie::EventRecord pointer; callee takes possession
66  // adapted from NuReweight
67  //
69  const simb::GTruth& gtruth,
70  bool useFirstTrajPosition = true);
71 
72  void FillMCFlux(genie::GFluxI* fdriver, simb::MCFlux& mcflux);
73 
75  simb::MCFlux& mcflux);
77  double dk2gen,
78  simb::MCFlux& flux);
79 
81  simb::MCFlux& mcflux);
82  void FillMCFlux(const genie::flux::GSimpleNtpEntry* nflux_entry,
83  const genie::flux::GSimpleNtpNuMI* nflux_numi,
84  const genie::flux::GSimpleNtpAux* nflux_aux,
85  const genie::flux::GSimpleNtpMeta* nflux_meta,
86  simb::MCFlux& flux);
87 
88  void FillMCFlux(genie::flux::GDk2NuFlux* gdk2nu,
89  simb::MCFlux& mcflux);
90  void FillMCFlux(const bsim::Dk2Nu* dk2nu,
91  const bsim::NuChoice* nuchoice,
92  simb::MCFlux& flux);
93 
94 } // end-of-namespace evgb
95 
96 #endif // EVGB_GENIE2ART_H
void FillMCFlux(const bsim::Dk2Nu *dk2nu, const bsim::NuChoice *nuchoice, simb::MCFlux &flux)
Definition: GENIE2ART.cxx:1083
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:26
A GENIE flux driver using a simple ntuple format.
std::string string
Definition: nybbler.cc:12
genie::EventRecord * RetrieveGHEP(const simb::MCTruth &truth, const simb::GTruth &gtruth, bool useFirstTrajPosition=true)
return genie::EventRecord pointer; callee takes possession
Definition: GENIE2ART.cxx:455
Definition: GENIE2ART.h:30
A GENIE flux driver encapsulating the NuMI neutrino flux. It reads-in the official GNUMI neutrino flu...
Definition: GNuMIFlux.h:217
std::string ExpandEnvVar(const std::string &s)
Definition: GENIE2ART.cxx:97
Base utilities and modules for event generation and detector simulation.
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
Definition: EventRecord.h:38
void FillMCTruth(const genie::EventRecord *grec, TLorentzVector &vtxOffset, simb::MCTruth &mctruth)
Definition: GENIE2ART.cxx:188
void SetEventGeneratorListAndTune(const std::string &evtlistname="", const std::string &tunename="${GENIE_XSEC_TUNE}")
Definition: GENIE2ART.cxx:127
Physics generators for neutrinos, cosmic rays, and others.
Definition: CRYHelper.cxx:33
void FillGTruth(const genie::EventRecord *grec, simb::GTruth &gtruth)
Definition: GENIE2ART.cxx:351
Event generator information.
Definition: MCTruth.h:32
static QCString * s
Definition: config.cpp:1042
GENIE Interface for user-defined flux classes.
Definition: GFluxI.h:37