LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
evgen::GENIEGen Class Reference

A module to check the results from the Monte Carlo generator. More...

Inheritance diagram for evgen::GENIEGen:
art::EDProducer art::ProducerBase art::Consumer art::EngineCreator art::ProductRegistryHelper

Public Types

using ModuleType = EDProducer
 
using WorkerType = WorkerT< EDProducer >
 
template<typename UserConfig , typename KeysToIgnore = void>
using Table = ProducerBase::Table< UserConfig, KeysToIgnore >
 

Public Member Functions

 GENIEGen (fhicl::ParameterSet const &pset)
 
virtual ~GENIEGen ()
 
void produce (art::Event &evt)
 
void beginJob ()
 
void beginRun (art::Run &run)
 
void endSubRun (art::SubRun &sr)
 
template<typename PROD , BranchType B = InEvent>
ProductID getProductID (std::string const &instanceName={}) const
 
template<typename PROD , BranchType B>
ProductID getProductID (ModuleDescription const &moduleDescription, std::string const &instanceName) const
 
bool modifiesEvent () const
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< T > consumes (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< T > consumesView (InputTag const &it)
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< T > mayConsume (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< T > mayConsumeView (InputTag const &it)
 
base_engine_tcreateEngine (seed_t seed)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label)
 
seed_t get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1)
 

Static Public Member Functions

static cet::exempt_ptr< Consumernon_module_context ()
 

Protected Member Functions

CurrentProcessingContext const * currentContext () const
 
void validateConsumedProduct (BranchType const bt, ProductInfo const &pi)
 
void prepareForJob (fhicl::ParameterSet const &pset)
 
void showMissingConsumes () const
 

Private Member Functions

std::string ParticleStatus (int StatusCode)
 
std::string ReactionChannel (int ccnc, int mode)
 
void FillHistograms (simb::MCTruth mc)
 

Private Attributes

evgb::GENIEHelperfGENIEHelp
 GENIEHelper object. More...
 
bool fDefinedVtxHistRange
 
std::vector< double > fVtxPosHistRange
 use defined hist range; it is useful to have for asymmetric ranges like in DP FD. More...
 
int fPassEmptySpills
 whether or not to kill evnets with no interactions More...
 
TStopwatch fStopwatch
 
double fGlobalTimeOffset
 keep track of how long it takes to run the job More...
 
double fRandomTimeOffset
 The start of a simulated "beam gate". More...
 
::sim::BeamType_t fBeamType
 The width of a simulated "beam gate". More...
 
TH1F * fGenerated [6]
 The type of beam. More...
 
TH1F * fVertexX
 vertex location of generated events in x More...
 
TH1F * fVertexY
 vertex location of generated events in y More...
 
TH1F * fVertexZ
 vertex location of generated events in z More...
 
TH2F * fVertexXY
 vertex location in xy More...
 
TH2F * fVertexXZ
 vertex location in xz More...
 
TH2F * fVertexYZ
 vertex location in yz More...
 
TH1F * fDCosX
 direction cosine in x More...
 
TH1F * fDCosY
 direction cosine in y More...
 
TH1F * fDCosZ
 direction cosine in z More...
 
TH1F * fMuMomentum
 momentum of outgoing muons More...
 
TH1F * fMuDCosX
 direction cosine of outgoing mu in x More...
 
TH1F * fMuDCosY
 direction cosine of outgoing mu in y More...
 
TH1F * fMuDCosZ
 direction cosine of outgoing mu in z More...
 
TH1F * fEMomentum
 momentum of outgoing electrons More...
 
TH1F * fEDCosX
 direction cosine of outgoing e in x More...
 
TH1F * fEDCosY
 direction cosine of outgoing e in y More...
 
TH1F * fEDCosZ
 direction cosine of outgoing e in z More...
 
TH1F * fCCMode
 CC interaction mode. More...
 
TH1F * fNCMode
 CC interaction mode. More...
 
TH1F * fDeltaE
 difference in neutrino energy from MCTruth::Enu() vs TParticle More...
 
TH1F * fECons
 histogram to determine if energy is conserved in the event More...
 

Detailed Description

A module to check the results from the Monte Carlo generator.

Note on random number generator

GENIE uses a TRandom generator for its purposes. Since art's RandomNumberGenerator service only provides CLHEP::HepRandomEngine, the standard LArSoft/art mechanism for handling the random stream can't be used. GENIEHelper, interface to GENIE provided by nutools, creates a TRandom that GENIE can use. It initializes it with a random seed read from RandomSeed configuration parameter. This and all the other parameters are inherited from the art module (that is, GENIEGen) configuration. LArSoft meddles with this mechanism to provide support for the standard "Seed" parameter and NuRandomService service.

Configuration parameters

  • RandomSeed (integer, optional): if specified, this value is used as seed for GENIE random number generator engine
  • Seed (unsigned integer, optional): if specified, this value is used as seed for GENIE random number generator engine; if RandomSeed is also specified, this value is ignored (but in the future this could turn into a configuration error)

As custom, if the random seed is not provided by the configuration, one is fetched from NuRandomService (if available), with the behaviour in lar::util::FetchRandomSeed().

Definition at line 90 of file GENIEGen_module.cc.

Member Typedef Documentation

using art::EDProducer::ModuleType = EDProducer
inherited

Definition at line 34 of file EDProducer.h.

template<typename UserConfig , typename KeysToIgnore = void>
using art::EDProducer::Table = ProducerBase::Table<UserConfig, KeysToIgnore>
inherited

Definition at line 43 of file EDProducer.h.

using art::EDProducer::WorkerType = WorkerT<EDProducer>
inherited

Definition at line 35 of file EDProducer.h.

Constructor & Destructor Documentation

evgen::GENIEGen::GENIEGen ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 154 of file GENIEGen_module.cc.

References fBeamType, fGENIEHelp, fStopwatch, fhicl::ParameterSet::get(), fhicl::ParameterSet::get_if_present(), sim::kBNB, sim::kNuMI, geo::kUnknown, fhicl::ParameterSet::put(), geo::GeometryCore::ROOTFile(), geo::GeometryCore::ROOTGeoManager(), seed, and geo::GeometryCore::TotalMass().

155  : fGENIEHelp(0)
156  , fDefinedVtxHistRange (pset.get< bool >("DefinedVtxHistRange"))
157  , fVtxPosHistRange (pset.get< std::vector<double> >("VtxPosHistRange"))
158  , fPassEmptySpills (pset.get< bool >("PassEmptySpills"))
159  , fGlobalTimeOffset(pset.get< double >("GlobalTimeOffset",0))
160  , fRandomTimeOffset(pset.get< double >("RandomTimeOffset",1600.)) // BNB default value
161  , fBeamType(::sim::kBNB)
162  {
163  fStopwatch.Start();
164 
165  produces< std::vector<simb::MCTruth> >();
166  produces< std::vector<simb::MCFlux> >();
167  produces< std::vector<simb::GTruth> >();
168  produces< sumdata::RunData, art::InRun >();
169  produces< sumdata::POTSummary, art::InSubRun >();
170  produces< art::Assns<simb::MCTruth, simb::MCFlux> >();
171  produces< art::Assns<simb::MCTruth, simb::GTruth> >();
172  produces< std::vector<sim::BeamGateInfo> >();
173 
174  std::string beam_type_name = pset.get<std::string>("BeamName");
175 
176  if(beam_type_name == "numi")
177 
179 
180  else if(beam_type_name == "booster")
181 
183 
184  else
185 
187 
189 
190  signed int temp_seed; // the seed read by GENIEHelper is a signed integer...
191  fhicl::ParameterSet GENIEconfig(pset);
192  if (!GENIEconfig.get_if_present("RandomSeed", temp_seed)) { // TODO use has_key() when it becomes available
193  // no RandomSeed specified; check for the LArSoft-style "Seed" instead:
194  // obtain the random seed from a service,
195  // unless overridden in configuration with key "Seed"
196  unsigned int seed;
197  if (!GENIEconfig.get_if_present("Seed", seed))
198  seed = art::ServiceHandle<rndm::NuRandomService>()->getSeed();
199 
200  // The seed is not passed to RandomNumberGenerator,
201  // since GENIE uses a TRandom generator that is owned by the GENIEHelper.
202  // Instead, we explicitly configure the random seed for GENIEHelper:
203  GENIEconfig.put("RandomSeed", seed);
204  } // if no RandomSeed present
205 
206  fGENIEHelp = new evgb::GENIEHelper(GENIEconfig,
207  geo->ROOTGeoManager(),
208  geo->ROOTFile(),
209  geo->TotalMass(pset.get< std::string>("TopVolume").c_str()));
210 
211  }
Unknown view.
Definition: geo_types.h:83
TGeoManager * ROOTGeoManager() const
Access to the ROOT geometry description manager.
std::string ROOTFile() const
Returns the full directory path to the geometry file source.
::sim::BeamType_t fBeamType
The width of a simulated "beam gate".
NuMI.
Definition: BeamTypes.h:12
double TotalMass() const
Returns the total mass [kg] of the specified volume (default: world).
long seed
Definition: chem4.cc:68
int fPassEmptySpills
whether or not to kill evnets with no interactions
evgb::GENIEHelper * fGENIEHelp
GENIEHelper object.
double fGlobalTimeOffset
keep track of how long it takes to run the job
BNB.
Definition: BeamTypes.h:11
TStopwatch fStopwatch
Namespace collecting geometry-related classes utilities.
std::vector< double > fVtxPosHistRange
use defined hist range; it is useful to have for asymmetric ranges like in DP FD. ...
double fRandomTimeOffset
The start of a simulated "beam gate".
evgen::GENIEGen::~GENIEGen ( )
virtual

Definition at line 214 of file GENIEGen_module.cc.

References fGENIEHelp, and fStopwatch.

215  {
216  if(fGENIEHelp) delete fGENIEHelp;
217  fStopwatch.Stop();
218  mf::LogInfo("GENIEProductionTime") << "real time to produce file: " << fStopwatch.RealTime();
219  }
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
evgb::GENIEHelper * fGENIEHelp
GENIEHelper object.
TStopwatch fStopwatch

Member Function Documentation

void evgen::GENIEGen::beginJob ( )
virtual

Reimplemented from art::EDProducer.

Definition at line 222 of file GENIEGen_module.cc.

References geo::GeometryCore::DetHalfHeight(), geo::GeometryCore::DetHalfWidth(), geo::GeometryCore::DetLength(), fCCMode, fDCosX, fDCosY, fDCosZ, fDefinedVtxHistRange, fDeltaE, fECons, fEDCosX, fEDCosY, fEDCosZ, fEMomentum, fGenerated, fGENIEHelp, fMuDCosX, fMuDCosY, fMuDCosZ, fMuMomentum, fNCMode, fVertexX, fVertexXY, fVertexXZ, fVertexY, fVertexYZ, fVertexZ, fVtxPosHistRange, evgb::GENIEHelper::Initialize(), art::TFileDirectory::make(), x, y, and z.

222  {
224 
225  // Get access to the TFile service.
227 
228  fGenerated[0] = tfs->make<TH1F>("fGenerated_necc","", 100, 0.0, 20.0);
229  fGenerated[1] = tfs->make<TH1F>("fGenerated_nebcc","", 100, 0.0, 20.0);
230  fGenerated[2] = tfs->make<TH1F>("fGenerated_nmcc","", 100, 0.0, 20.0);
231  fGenerated[3] = tfs->make<TH1F>("fGenerated_nmbcc","", 100, 0.0, 20.0);
232  fGenerated[4] = tfs->make<TH1F>("fGenerated_nnc","", 100, 0.0, 20.0);
233  fGenerated[5] = tfs->make<TH1F>("fGenerated_nbnc","", 100, 0.0, 20.0);
234 
235  fDCosX = tfs->make<TH1F>("fDCosX", ";dx/ds", 200, -1., 1.);
236  fDCosY = tfs->make<TH1F>("fDCosY", ";dy/ds", 200, -1., 1.);
237  fDCosZ = tfs->make<TH1F>("fDCosZ", ";dz/ds", 200, -1., 1.);
238 
239  fMuMomentum = tfs->make<TH1F>("fMuMomentum", ";p_{#mu} (GeV/c)", 500, 0., 50.);
240  fMuDCosX = tfs->make<TH1F>("fMuDCosX", ";dx/ds;", 200, -1., 1.);
241  fMuDCosY = tfs->make<TH1F>("fMuDCosY", ";dy/ds;", 200, -1., 1.);
242  fMuDCosZ = tfs->make<TH1F>("fMuDCosZ", ";dz/ds;", 200, -1., 1.);
243 
244  fEMomentum = tfs->make<TH1F>("fEMomentum", ";p_{e} (GeV/c)", 500, 0., 50.);
245  fEDCosX = tfs->make<TH1F>("fEDCosX", ";dx/ds;", 200, -1., 1.);
246  fEDCosY = tfs->make<TH1F>("fEDCosY", ";dy/ds;", 200, -1., 1.);
247  fEDCosZ = tfs->make<TH1F>("fEDCosZ", ";dz/ds;", 200, -1., 1.);
248 
249  fCCMode = tfs->make<TH1F>("fCCMode", ";CC Interaction Mode;", 4, 0., 4.);
250  fCCMode->GetXaxis()->SetBinLabel(1, "QE");
251  fCCMode->GetXaxis()->SetBinLabel(2, "Res");
252  fCCMode->GetXaxis()->SetBinLabel(3, "DIS");
253  fCCMode->GetXaxis()->SetBinLabel(4, "Coh");
254  fCCMode->GetXaxis()->CenterLabels();
255 
256  fNCMode = tfs->make<TH1F>("fNCMode", ";NC Interaction Mode;", 4, 0., 4.);
257  fNCMode->GetXaxis()->SetBinLabel(1, "QE");
258  fNCMode->GetXaxis()->SetBinLabel(2, "Res");
259  fNCMode->GetXaxis()->SetBinLabel(3, "DIS");
260  fNCMode->GetXaxis()->SetBinLabel(4, "Coh");
261  fNCMode->GetXaxis()->CenterLabels();
262 
263  fDeltaE = tfs->make<TH1F>("fDeltaE", ";#Delta E_{#nu} (GeV);", 200, -1., 1.);
264  fECons = tfs->make<TH1F>("fECons", ";#Delta E(#nu,lepton);", 500, -5., 5.);
265 
267  double x = 2.1*geo->DetHalfWidth();
268  double y = 2.1*geo->DetHalfHeight();
269  double z = 2.*geo->DetLength();
270  int xdiv = TMath::Nint(2*x/5.);
271  int ydiv = TMath::Nint(2*y/5.);
272  int zdiv = TMath::Nint(2*z/5.);
273 
274  if (fDefinedVtxHistRange == false)
275  {
276  fVertexX = tfs->make<TH1F>("fVertexX", ";x (cm)", xdiv, -0.1*x, x);
277  fVertexY = tfs->make<TH1F>("fVertexY", ";y (cm)", ydiv, -y, y);
278  fVertexZ = tfs->make<TH1F>("fVertexZ", ";z (cm)", zdiv, -0.1*z, z);
279 
280  fVertexXY = tfs->make<TH2F>("fVertexXY", ";x (cm);y (cm)", xdiv, -0.1*x, x, ydiv, -y, y);
281  fVertexXZ = tfs->make<TH2F>("fVertexXZ", ";z (cm);x (cm)", zdiv, -0.2*z, z, xdiv, -0.1*x, x);
282  fVertexYZ = tfs->make<TH2F>("fVertexYZ", ";z (cm);y (cm)", zdiv, -0.2*z, z, ydiv, -y, y);
283  }
284  else
285  {
286  fVertexX = tfs->make<TH1F>("fVertexX", ";x (cm)", xdiv, fVtxPosHistRange[0], fVtxPosHistRange[1]);
287  fVertexY = tfs->make<TH1F>("fVertexY", ";y (cm)", ydiv, fVtxPosHistRange[2], fVtxPosHistRange[3]);
288  fVertexZ = tfs->make<TH1F>("fVertexZ", ";z (cm)", zdiv, fVtxPosHistRange[4], fVtxPosHistRange[5]);
289 
290  fVertexXY = tfs->make<TH2F>("fVertexXY", ";x (cm);y (cm)", xdiv, fVtxPosHistRange[0], fVtxPosHistRange[1], ydiv, fVtxPosHistRange[2], fVtxPosHistRange[3]);
291  fVertexXZ = tfs->make<TH2F>("fVertexXZ", ";z (cm);x (cm)", zdiv, fVtxPosHistRange[4], fVtxPosHistRange[5], xdiv, fVtxPosHistRange[0], fVtxPosHistRange[1]);
292  fVertexYZ = tfs->make<TH2F>("fVertexYZ", ";z (cm);y (cm)", zdiv, fVtxPosHistRange[4], fVtxPosHistRange[5], ydiv, fVtxPosHistRange[2], fVtxPosHistRange[3]);
293  }
294 
295  }
TH1F * fVertexX
vertex location of generated events in x
Float_t x
Definition: compare.C:6
TH1F * fMuDCosZ
direction cosine of outgoing mu in z
TH2F * fVertexXZ
vertex location in xz
geo::Length_t DetHalfWidth(geo::TPCID const &tpcid) const
Returns the half width of the active volume of the specified TPC.
TH1F * fDeltaE
difference in neutrino energy from MCTruth::Enu() vs TParticle
TH2F * fVertexXY
vertex location in xy
TH1F * fMuDCosY
direction cosine of outgoing mu in y
Float_t y
Definition: compare.C:6
Double_t z
Definition: plot.C:279
TH1F * fNCMode
CC interaction mode.
TH1F * fDCosZ
direction cosine in z
geo::Length_t DetHalfHeight(geo::TPCID const &tpcid) const
Returns the half height of the active volume of the specified TPC.
TH1F * fEDCosY
direction cosine of outgoing e in y
TH1F * fCCMode
CC interaction mode.
evgb::GENIEHelper * fGENIEHelp
GENIEHelper object.
TH1F * fEDCosX
direction cosine of outgoing e in x
TH1F * fMuDCosX
direction cosine of outgoing mu in x
TH1F * fGenerated[6]
The type of beam.
geo::Length_t DetLength(geo::TPCID const &tpcid) const
Returns the length of the active volume of the specified TPC.
TH1F * fDCosY
direction cosine in y
TH1F * fEMomentum
momentum of outgoing electrons
T * make(ARGS...args) const
TH2F * fVertexYZ
vertex location in yz
TH1F * fECons
histogram to determine if energy is conserved in the event
TH1F * fEDCosZ
direction cosine of outgoing e in z
TH1F * fDCosX
direction cosine in x
Namespace collecting geometry-related classes utilities.
TH1F * fMuMomentum
momentum of outgoing muons
TH1F * fVertexY
vertex location of generated events in y
std::vector< double > fVtxPosHistRange
use defined hist range; it is useful to have for asymmetric ranges like in DP FD. ...
TH1F * fVertexZ
vertex location of generated events in z
void evgen::GENIEGen::beginRun ( art::Run run)
virtual

Reimplemented from art::EDProducer.

Definition at line 298 of file GENIEGen_module.cc.

References geo::GeometryCore::DetectorName(), and art::Run::put().

299  {
300 
301  // grab the geometry object to see what geometry we are using
303  std::unique_ptr<sumdata::RunData> runcol(new sumdata::RunData(geo->DetectorName()));
304 
305  run.put(std::move(runcol));
306 
307  return;
308  }
art::ProductID put(std::unique_ptr< PROD > &&)
Definition: Run.h:148
std::string DetectorName() const
Returns a string with the name of the detector, as configured.
Namespace collecting geometry-related classes utilities.
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::consumes ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::consumes ( InputTag const &  it)
inherited

Definition at line 147 of file Consumer.h.

References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

148 {
149  if (!moduleContext_)
150  return ProductToken<T>::invalid();
151 
152  consumables_[BT].emplace_back(ConsumableType::Product,
153  TypeID{typeid(T)},
154  it.label(),
155  it.instance(),
156  it.process());
157  return ProductToken<T>{it};
158 }
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
template<typename T , art::BranchType BT>
void art::Consumer::consumesMany ( )
inherited

Definition at line 162 of file Consumer.h.

163 {
164  if (!moduleContext_)
165  return;
166 
167  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
168 }
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::consumesView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::consumesView ( InputTag const &  it)
inherited

Definition at line 172 of file Consumer.h.

References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

173 {
174  if (!moduleContext_)
175  return ViewToken<T>::invalid();
176 
177  consumables_[BT].emplace_back(ConsumableType::ViewElement,
178  TypeID{typeid(T)},
179  it.label(),
180  it.instance(),
181  it.process());
182  return ViewToken<T>{it};
183 }
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
EngineCreator::base_engine_t & EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited

Definition at line 32 of file EngineCreator.cc.

References art::EngineCreator::rng().

34 {
35  return rng()->createEngine(
36  placeholder_schedule_id(), seed, kind_of_engine_to_make);
37 }
long seed
Definition: chem4.cc:68
static art::ServiceHandle< art::RandomNumberGenerator > & rng()
EngineCreator::base_engine_t & EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited

Definition at line 40 of file EngineCreator.cc.

References art::EngineCreator::rng().

43 {
44  return rng()->createEngine(
45  placeholder_schedule_id(), seed, kind_of_engine_to_make, engine_label);
46 }
long seed
Definition: chem4.cc:68
static art::ServiceHandle< art::RandomNumberGenerator > & rng()
CurrentProcessingContext const * art::EDProducer::currentContext ( ) const
protectedinherited

Definition at line 120 of file EDProducer.cc.

References art::EDProducer::current_context_.

121  {
122  return current_context_.get();
123  }
CPC_exempt_ptr current_context_
Definition: EDProducer.h:116
void evgen::GENIEGen::endSubRun ( art::SubRun sr)
virtual

Reimplemented from art::EDProducer.

Definition at line 311 of file GENIEGen_module.cc.

References fGENIEHelp, art::SubRun::put(), evgb::GENIEHelper::TotalExposure(), sumdata::POTSummary::totgoodpot, and sumdata::POTSummary::totpot.

312  {
313 
314  std::unique_ptr<sumdata::POTSummary> p(new sumdata::POTSummary());
315 
316  p->totpot = fGENIEHelp->TotalExposure();
317  p->totgoodpot = fGENIEHelp->TotalExposure();
318 
319  sr.put(std::move(p));
320 
321  return;
322  }
evgb::GENIEHelper * fGENIEHelp
GENIEHelper object.
double TotalExposure() const
Definition: GENIEHelper.h:66
ProductID put(std::unique_ptr< PROD > &&)
void evgen::GENIEGen::FillHistograms ( simb::MCTruth  mc)
private

< fill the vertex histograms from the neutrino - that is always particle 0 in the list

look for the outgoing lepton in the particle stack just interested in the first one

Definition at line 474 of file GENIEGen_module.cc.

References simb::MCNeutrino::CCNC(), DEFINE_ART_MODULE, simb::MCParticle::E(), energy, fCCMode, fDCosX, fDCosY, fDCosZ, fECons, fEDCosX, fEDCosY, fEDCosZ, fEMomentum, fGenerated, fMuDCosX, fMuDCosY, fMuDCosZ, fMuMomentum, fNCMode, fVertexX, fVertexXY, fVertexXZ, fVertexY, fVertexYZ, fVertexZ, simb::MCTruth::GetNeutrino(), simb::MCTruth::GetParticle(), simb::kCC, art::left(), LOG_DEBUG, simb::MCNeutrino::Mode(), simb::MCTruth::NParticles(), simb::MCNeutrino::Nu(), simb::MCParticle::P(), part, ParticleStatus(), simb::MCParticle::PdgCode(), simb::MCParticle::Px(), simb::MCParticle::Py(), simb::MCParticle::Pz(), ReactionChannel(), simb::MCParticle::Vx(), simb::MCParticle::Vy(), and simb::MCParticle::Vz().

Referenced by produce().

475  {
476  // Decide which histograms to put the spectrum in
477  int id = -1;
478  if (mc.GetNeutrino().CCNC()==simb::kCC) {
479  fCCMode->Fill(mc.GetNeutrino().Mode());
480  if (mc.GetNeutrino().Nu().PdgCode() == 12) id = 0;
481  else if (mc.GetNeutrino().Nu().PdgCode() == -12) id = 1;
482  else if (mc.GetNeutrino().Nu().PdgCode() == 14) id = 2;
483  else if (mc.GetNeutrino().Nu().PdgCode() == -14) id = 3;
484  else return;
485  }
486  else {
487  fNCMode->Fill(mc.GetNeutrino().Mode());
488  if (mc.GetNeutrino().Nu().PdgCode() > 0) id = 4;
489  else id = 5;
490  }
491  if (id==-1) abort();
492 
493  // Fill the specta histograms
494  fGenerated[id]->Fill(mc.GetNeutrino().Nu().E() );
495 
498  simb::MCNeutrino mcnu = mc.GetNeutrino();
499  const simb::MCParticle nu = mcnu.Nu();
500 
501  fVertexX->Fill(nu.Vx());
502  fVertexY->Fill(nu.Vy());
503  fVertexZ->Fill(nu.Vz());
504 
505  fVertexXY->Fill(nu.Vx(), nu.Vy());
506  fVertexXZ->Fill(nu.Vz(), nu.Vx());
507  fVertexYZ->Fill(nu.Vz(), nu.Vy());
508 
509  double mom = nu.P();
510  if(std::abs(mom) > 0.){
511  fDCosX->Fill(nu.Px()/mom);
512  fDCosY->Fill(nu.Py()/mom);
513  fDCosZ->Fill(nu.Pz()/mom);
514  }
515 
516 
517  LOG_DEBUG("GENIEInteractionInformation")
518  << std::endl
519  << "REACTION: " << ReactionChannel(mc.GetNeutrino().CCNC(),mc.GetNeutrino().Mode())
520  << std::endl
521  << "-----------> Particles in the Stack = " << mc.NParticles() << std::endl
522  << std::setiosflags(std::ios::left)
523  << std::setw(20) << "PARTICLE"
524  << std::setiosflags(std::ios::left)
525  << std::setw(32) << "STATUS"
526  << std::setw(18) << "E (GeV)"
527  << std::setw(18) << "m (GeV/c2)"
528  << std::setw(18) << "Ek (GeV)"
529  << std::endl << std::endl;
530 
531  const TDatabasePDG* databasePDG = TDatabasePDG::Instance();
532 
533  // Loop over the particle stack for this event
534  for(int i = 0; i < mc.NParticles(); ++i){
536  std::string name = databasePDG->GetParticle(part.PdgCode())->GetName();
537  int code = part.StatusCode();
538  std::string status = ParticleStatus(code);
539  double mass = part.Mass();
540  double energy = part.E();
541  double Ek = (energy-mass); // Kinetic Energy (GeV)
542  if(status=="kIStStableFinalState"||status=="kIStHadronInTheNucleus")
543  LOG_DEBUG("GENIEFinalState")
544  << std::setiosflags(std::ios::left) << std::setw(20) << name
545  << std::setiosflags(std::ios::left) << std::setw(32) <<status
546  << std::setw(18)<< energy
547  << std::setw(18)<< mass
548  << std::setw(18)<< Ek <<std::endl;
549  else
550  LOG_DEBUG("GENIEFinalState")
551  << std::setiosflags(std::ios::left) << std::setw(20) << name
552  << std::setiosflags(std::ios::left) << std::setw(32) << status
553  << std::setw(18) << energy
554  << std::setw(18) << mass <<std::endl;
555  }
556 
557 
558  if(mc.GetNeutrino().CCNC() == simb::kCC){
559 
562  for(int i = 0; i < mc.NParticles(); ++i){
564  if(abs(part.PdgCode()) == 11){
565  fEMomentum->Fill(part.P());
566  fEDCosX->Fill(part.Px()/part.P());
567  fEDCosY->Fill(part.Py()/part.P());
568  fEDCosZ->Fill(part.Pz()/part.P());
569  fECons->Fill(nu.E() - part.E());
570  break;
571  }
572  else if(abs(part.PdgCode()) == 13){
573  fMuMomentum->Fill(part.P());
574  fMuDCosX->Fill(part.Px()/part.P());
575  fMuDCosY->Fill(part.Py()/part.P());
576  fMuDCosZ->Fill(part.Pz()/part.P());
577  fECons->Fill(nu.E() - part.E());
578  break;
579  }
580  }// end loop over particles
581  }//end if CC interaction
582 
583  return;
584  }
TH1F * fVertexX
vertex location of generated events in x
std::string ParticleStatus(int StatusCode)
double E(const int i=0) const
Definition: MCParticle.h:237
TH1F * fMuDCosZ
direction cosine of outgoing mu in z
TH2F * fVertexXZ
vertex location in xz
int PdgCode() const
Definition: MCParticle.h:216
int CCNC() const
Definition: MCNeutrino.h:152
const simb::MCNeutrino & GetNeutrino() const
Definition: MCTruth.h:74
double Py(const int i=0) const
Definition: MCParticle.h:235
TH2F * fVertexXY
vertex location in xy
std::string ReactionChannel(int ccnc, int mode)
TH1F * fMuDCosY
direction cosine of outgoing mu in y
const simb::MCParticle & Nu() const
Definition: MCNeutrino.h:150
double Px(const int i=0) const
Definition: MCParticle.h:234
int NParticles() const
Definition: MCTruth.h:72
TH1F * fNCMode
CC interaction mode.
TH1F * fDCosZ
direction cosine in z
TH1F * fEDCosY
direction cosine of outgoing e in y
TH1F * fCCMode
CC interaction mode.
double P(const int i=0) const
Definition: MCParticle.h:238
TString part[npart]
Definition: Style.C:32
TH1F * fEDCosX
direction cosine of outgoing e in x
double energy
Definition: plottest35.C:25
TH1F * fMuDCosX
direction cosine of outgoing mu in x
TH1F * fGenerated[6]
The type of beam.
TH1F * fDCosY
direction cosine in y
const simb::MCParticle & GetParticle(int i) const
Definition: MCTruth.h:73
double Vx(const int i=0) const
Definition: MCParticle.h:225
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:104
TH1F * fEMomentum
momentum of outgoing electrons
TH2F * fVertexYZ
vertex location in yz
TH1F * fECons
histogram to determine if energy is conserved in the event
double Pz(const int i=0) const
Definition: MCParticle.h:236
double Vz(const int i=0) const
Definition: MCParticle.h:227
#define LOG_DEBUG(id)
TH1F * fEDCosZ
direction cosine of outgoing e in z
TH1F * fDCosX
direction cosine in x
Event generator information.
Definition: MCNeutrino.h:18
TH1F * fMuMomentum
momentum of outgoing muons
int Mode() const
Definition: MCNeutrino.h:153
TH1F * fVertexY
vertex location of generated events in y
TH1F * fVertexZ
vertex location of generated events in z
double Vy(const int i=0) const
Definition: MCParticle.h:226
EngineCreator::seed_t EngineCreator::get_seed_value ( fhicl::ParameterSet const &  pset,
char const  key[] = "seed",
seed_t const  implicit_seed = -1 
)
inherited

Definition at line 49 of file EngineCreator.cc.

References fhicl::ParameterSet::get().

Referenced by art::MixFilter< T >::initEngine_().

52 {
53  auto const& explicit_seeds = pset.get<std::vector<int>>(key, {});
54  return explicit_seeds.empty() ? implicit_seed : explicit_seeds.front();
55 }
template<typename PROD , BranchType B>
ProductID art::EDProducer::getProductID ( std::string const &  instanceName = {}) const
inlineinherited

Definition at line 123 of file EDProducer.h.

References art::EDProducer::moduleDescription_.

124  {
125  return ProducerBase::getProductID<PROD, B>(moduleDescription_,
126  instanceName);
127  }
ModuleDescription moduleDescription_
Definition: EDProducer.h:115
template<typename PROD , BranchType B>
ProductID art::ProducerBase::getProductID ( ModuleDescription const &  moduleDescription,
std::string const &  instanceName 
) const
inherited

Definition at line 56 of file ProducerBase.h.

References B, and art::ModuleDescription::moduleLabel().

Referenced by art::ProducerBase::modifiesEvent().

58  {
59  auto const& pd =
60  get_ProductDescription<PROD>(B, md.moduleLabel(), instanceName);
61  return pd.productID();
62  }
Int_t B
Definition: plot.C:25
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::mayConsume ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::mayConsume ( InputTag const &  it)
inherited

Definition at line 190 of file Consumer.h.

References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

191 {
192  if (!moduleContext_)
193  return ProductToken<T>::invalid();
194 
195  consumables_[BT].emplace_back(ConsumableType::Product,
196  TypeID{typeid(T)},
197  it.label(),
198  it.instance(),
199  it.process());
200  return ProductToken<T>{it};
201 }
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
template<typename T , art::BranchType BT>
void art::Consumer::mayConsumeMany ( )
inherited

Definition at line 205 of file Consumer.h.

206 {
207  if (!moduleContext_)
208  return;
209 
210  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
211 }
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::mayConsumeView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::mayConsumeView ( InputTag const &  it)
inherited

Definition at line 215 of file Consumer.h.

References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

216 {
217  if (!moduleContext_)
218  return ViewToken<T>::invalid();
219 
220  consumables_[BT].emplace_back(ConsumableType::ViewElement,
221  TypeID{typeid(T)},
222  it.label(),
223  it.instance(),
224  it.process());
225  return ViewToken<T>{it};
226 }
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
bool art::ProducerBase::modifiesEvent ( ) const
inlineinherited

Definition at line 40 of file ProducerBase.h.

References art::ProducerBase::getProductID().

41  {
42  return true;
43  }
std::string evgen::GENIEGen::ParticleStatus ( int  StatusCode)
private

Definition at line 403 of file GENIEGen_module.cc.

References sim::ParticleStatusName().

Referenced by FillHistograms().

404  {
405  int code = StatusCode;
406  std::string ParticleStatusName;
407 
408  switch(code)
409  {
410  case -1:
411  ParticleStatusName = "kIStUndefined";
412  break;
413  case 0:
414  ParticleStatusName = "kIStInitialState";
415  break;
416  case 1:
417  ParticleStatusName = "kIStStableFinalState";
418  break;
419  case 2:
420  ParticleStatusName = "kIStIntermediateState";
421  break;
422  case 3:
423  ParticleStatusName = "kIStDecayedState";
424  break;
425  case 11:
426  ParticleStatusName = "kIStNucleonTarget";
427  break;
428  case 12:
429  ParticleStatusName = "kIStDISPreFragmHadronicState";
430  break;
431  case 13:
432  ParticleStatusName = "kIStPreDecayResonantState";
433  break;
434  case 14:
435  ParticleStatusName = "kIStHadronInTheNucleus";
436  break;
437  case 15:
438  ParticleStatusName = "kIStFinalStateNuclearRemnant";
439  break;
440  case 16:
441  ParticleStatusName = "kIStNucleonClusterTarget";
442  break;
443  default:
444  ParticleStatusName = "Status Unknown";
445  }
446  return ParticleStatusName;
447  }
std::string ParticleStatusName(int code)
Describes the status of a particle (simb::MCParticle::StatusCode()).
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited

Definition at line 89 of file Consumer.cc.

References fhicl::ParameterSet::get_if_present().

Referenced by art::EDProducer::doBeginJob(), art::EDFilter::doBeginJob(), and art::EDAnalyzer::doBeginJob().

90 {
91  if (!moduleContext_)
92  return;
93 
94  pset.get_if_present("errorOnMissingConsumes", requireConsumes_);
95  for (auto& consumablesPerBranch : consumables_) {
96  cet::sort_all(consumablesPerBranch);
97  }
98 }
bool requireConsumes_
Definition: Consumer.h:137
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
void evgen::GENIEGen::produce ( art::Event evt)
virtual

Implements art::EDProducer.

Definition at line 325 of file GENIEGen_module.cc.

References util::CreateAssn(), sim::dump::DumpGTruth(), sim::dump::DumpMCTruth(), fBeamType, fGENIEHelp, fGlobalTimeOffset, FillHistograms(), fPassEmptySpills, fRandomTimeOffset, simb::MCTruth::GetNeutrino(), simb::MCNeutrino::InteractionType(), simb::kNuanceOffset, LOG_DEBUG, simb::MCTruth::NeutrinoSet(), art::Event::put(), evgb::GENIEHelper::Sample(), and evgb::GENIEHelper::Stop().

326  {
327  std::unique_ptr< std::vector<simb::MCTruth> > truthcol (new std::vector<simb::MCTruth>);
328  std::unique_ptr< std::vector<simb::MCFlux> > fluxcol (new std::vector<simb::MCFlux >);
329  std::unique_ptr< std::vector<simb::GTruth> > gtruthcol (new std::vector<simb::GTruth >);
330  std::unique_ptr< art::Assns<simb::MCTruth, simb::MCFlux> > tfassn(new art::Assns<simb::MCTruth, simb::MCFlux>);
331  std::unique_ptr< art::Assns<simb::MCTruth, simb::GTruth> > tgtassn(new art::Assns<simb::MCTruth, simb::GTruth>);
332  std::unique_ptr< std::vector<sim::BeamGateInfo> > gateCollection(new std::vector<sim::BeamGateInfo>);
333 
334  while(truthcol->size() < 1){
335  while(!fGENIEHelp->Stop()){
336 
337  simb::MCTruth truth;
338  simb::MCFlux flux;
339  simb::GTruth gTruth;
340 
341  // GENIEHelper returns a false in the sample method if
342  // either no neutrino was generated, or the interaction
343  // occurred beyond the detector's z extent - ie something we
344  // would never see anyway.
345  if(fGENIEHelp->Sample(truth, flux, gTruth)){
346 
347  truthcol ->push_back(truth);
348  fluxcol ->push_back(flux);
349  gtruthcol->push_back(gTruth);
350  util::CreateAssn(*this, evt, *truthcol, *fluxcol, *tfassn, fluxcol->size()-1, fluxcol->size());
351  util::CreateAssn(*this, evt, *truthcol, *gtruthcol, *tgtassn, gtruthcol->size()-1, gtruthcol->size());
352 
353  FillHistograms(truth);
354 
355  // check that the process code is not unsupported by GENIE
356  // (see issue #18025 for reference);
357  // if it is, print all the information we can about this truth record
358  if (truth.NeutrinoSet() && (truth.GetNeutrino().InteractionType() == simb::kNuanceOffset)) {
359  mf::LogWarning log("GENIEmissingProcessMapping");
360  log << "Found an interaction that is not represented by the interaction type code in GENIE:"
361  "\nMCTruth record:"
362  "\n"
363  ;
364  sim::dump::DumpMCTruth(log, truth, 2U); // 2 trajectory points per line
365  log <<
366  "\nGENIE truth record:"
367  "\n"
368  ;
369  sim::dump::DumpGTruth(log, gTruth);
370  } // if
371 
372  }// end if genie was able to make an event
373 
374  }// end event generation loop
375 
376  // check to see if we are to pass empty spills
377  if(truthcol->size() < 1 && fPassEmptySpills){
378  LOG_DEBUG("GENIEGen") << "no events made for this spill but "
379  << "passing it on and ending the event anyway";
380  break;
381  }
382 
383  }// end loop while no interactions are made
384 
385  // Create a simulated "beam gate" for these neutrino events.
386  // We're creating a vector of these because, in a
387  // distant-but-possible future, we may be generating more than one
388  // beam gate within a simulated time window.
389  gateCollection->push_back(sim::BeamGateInfo( fGlobalTimeOffset, fRandomTimeOffset, fBeamType ));
390 
391  // put the collections in the event
392  evt.put(std::move(truthcol));
393  evt.put(std::move(fluxcol));
394  evt.put(std::move(gtruthcol));
395  evt.put(std::move(tfassn));
396  evt.put(std::move(tgtassn));
397  evt.put(std::move(gateCollection));
398 
399  return;
400  }
const simb::MCNeutrino & GetNeutrino() const
Definition: MCTruth.h:74
void DumpGTruth(Stream &&out, simb::GTruth const &truth, std::string indent, std::string firstIndent)
Dumps the content of the GENIE truth in the output stream.
Definition: MCDumpers.h:379
bool Sample(simb::MCTruth &truth, simb::MCFlux &flux, simb::GTruth &gtruth)
offset to account for adding in Nuance codes to this enum
Definition: MCNeutrino.h:99
::sim::BeamType_t fBeamType
The width of a simulated "beam gate".
ProductID put(std::unique_ptr< PROD > &&product)
Definition: Event.h:102
int InteractionType() const
Definition: MCNeutrino.h:154
int fPassEmptySpills
whether or not to kill evnets with no interactions
evgb::GENIEHelper * fGENIEHelp
GENIEHelper object.
double fGlobalTimeOffset
keep track of how long it takes to run the job
void DumpMCTruth(Stream &&out, simb::MCTruth const &truth, unsigned int pointsPerLine, std::string indent, std::string firstIndent)
Dumps the content of the specified MC truth in the output stream.
Definition: MCDumpers.h:346
bool CreateAssn(PRODUCER const &prod, art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t indx=UINT_MAX)
Creates a single one-to-one association.
#define LOG_DEBUG(id)
bool NeutrinoSet() const
Definition: MCTruth.h:75
Event generator information.
Definition: MCTruth.h:30
void FillHistograms(simb::MCTruth mc)
size_t size() const
Definition: DataViewImpl.cc:34
double fRandomTimeOffset
The start of a simulated "beam gate".
std::string evgen::GENIEGen::ReactionChannel ( int  ccnc,
int  mode 
)
private

Definition at line 450 of file GENIEGen_module.cc.

Referenced by FillHistograms().

451  {
452  std::string ReactionChannelName=" ";
453 
454  if(ccnc==0)
455  ReactionChannelName = "kCC";
456  else if(ccnc==1)
457  ReactionChannelName = "kNC";
458  else std::cout<<"Current mode unknown!! "<<std::endl;
459 
460  if(mode==0)
461  ReactionChannelName += "_kQE";
462  else if(mode==1)
463  ReactionChannelName += "_kRes";
464  else if(mode==2)
465  ReactionChannelName += "_kDIS";
466  else if(mode==3)
467  ReactionChannelName += "_kCoh";
468  else std::cout<<"interaction mode unknown!! "<<std::endl;
469 
470  return ReactionChannelName;
471  }
void art::Consumer::showMissingConsumes ( ) const
protectedinherited

Definition at line 125 of file Consumer.cc.

Referenced by art::EDProducer::doEndJob(), art::EDFilter::doEndJob(), art::EDAnalyzer::doEndJob(), and art::RootOutput::endJob().

126 {
127  if (!moduleContext_)
128  return;
129 
130  // If none of the branches have missing consumes statements, exit early.
131  if (std::all_of(cbegin(missingConsumes_),
132  cend(missingConsumes_),
133  [](auto const& perBranch) { return perBranch.empty(); }))
134  return;
135 
136  constexpr cet::HorizontalRule rule{60};
137  mf::LogPrint log{"MTdiagnostics"};
138  log << '\n'
139  << rule('=') << '\n'
140  << "The following consumes (or mayConsume) statements are missing from\n"
141  << module_context(moduleDescription_) << '\n'
142  << rule('-') << '\n';
143 
144  cet::for_all_with_index(
145  missingConsumes_, [&log](std::size_t const i, auto const& perBranch) {
146  for (auto const& pi : perBranch) {
147  log << " "
148  << assemble_consumes_statement(static_cast<BranchType>(i), pi)
149  << '\n';
150  }
151  });
152  log << rule('=');
153 }
cet::exempt_ptr< ModuleDescription const > moduleDescription_
Definition: Consumer.h:140
constexpr T pi()
Returns the constant pi (up to 35 decimal digits of precision)
bool moduleContext_
Definition: Consumer.h:136
ConsumableProductSets missingConsumes_
Definition: Consumer.h:139
void art::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited

Definition at line 101 of file Consumer.cc.

References art::errors::ProductRegistrationFailure.

103 {
104  // Early exits if consumes tracking has been disabled or if the
105  // consumed product is an allowed consumable.
106  if (!moduleContext_)
107  return;
108 
109  if (cet::binary_search_all(consumables_[bt], pi))
110  return;
111 
112  if (requireConsumes_) {
114  "Consumer: an error occurred during validation of a "
115  "retrieved product\n\n")
116  << "The following consumes (or mayConsume) statement is missing from\n"
117  << module_context(moduleDescription_) << ":\n\n"
118  << " " << assemble_consumes_statement(bt, pi) << "\n\n";
119  }
120 
121  missingConsumes_[bt].insert(pi);
122 }
cet::exempt_ptr< ModuleDescription const > moduleDescription_
Definition: Consumer.h:140
bool requireConsumes_
Definition: Consumer.h:137
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
constexpr T pi()
Returns the constant pi (up to 35 decimal digits of precision)
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
ConsumableProductSets missingConsumes_
Definition: Consumer.h:139

Member Data Documentation

::sim::BeamType_t evgen::GENIEGen::fBeamType
private

The width of a simulated "beam gate".

Definition at line 116 of file GENIEGen_module.cc.

Referenced by GENIEGen(), and produce().

TH1F* evgen::GENIEGen::fCCMode
private

CC interaction mode.

Definition at line 142 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

TH1F* evgen::GENIEGen::fDCosX
private

direction cosine in x

Definition at line 128 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

TH1F* evgen::GENIEGen::fDCosY
private

direction cosine in y

Definition at line 129 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

TH1F* evgen::GENIEGen::fDCosZ
private

direction cosine in z

Definition at line 130 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

bool evgen::GENIEGen::fDefinedVtxHistRange
private

Definition at line 108 of file GENIEGen_module.cc.

Referenced by beginJob().

TH1F* evgen::GENIEGen::fDeltaE
private

difference in neutrino energy from MCTruth::Enu() vs TParticle

Definition at line 145 of file GENIEGen_module.cc.

Referenced by beginJob().

TH1F* evgen::GENIEGen::fECons
private

histogram to determine if energy is conserved in the event

Definition at line 146 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

TH1F* evgen::GENIEGen::fEDCosX
private

direction cosine of outgoing e in x

Definition at line 138 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

TH1F* evgen::GENIEGen::fEDCosY
private

direction cosine of outgoing e in y

Definition at line 139 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

TH1F* evgen::GENIEGen::fEDCosZ
private

direction cosine of outgoing e in z

Definition at line 140 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

TH1F* evgen::GENIEGen::fEMomentum
private

momentum of outgoing electrons

Definition at line 137 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

TH1F* evgen::GENIEGen::fGenerated[6]
private

The type of beam.

Spectra as generated

Definition at line 118 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

evgb::GENIEHelper* evgen::GENIEGen::fGENIEHelp
private

GENIEHelper object.

Definition at line 107 of file GENIEGen_module.cc.

Referenced by beginJob(), endSubRun(), GENIEGen(), produce(), and ~GENIEGen().

double evgen::GENIEGen::fGlobalTimeOffset
private

keep track of how long it takes to run the job

Definition at line 114 of file GENIEGen_module.cc.

Referenced by produce().

TH1F* evgen::GENIEGen::fMuDCosX
private

direction cosine of outgoing mu in x

Definition at line 133 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

TH1F* evgen::GENIEGen::fMuDCosY
private

direction cosine of outgoing mu in y

Definition at line 134 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

TH1F* evgen::GENIEGen::fMuDCosZ
private

direction cosine of outgoing mu in z

Definition at line 135 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

TH1F* evgen::GENIEGen::fMuMomentum
private

momentum of outgoing muons

Definition at line 132 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

TH1F* evgen::GENIEGen::fNCMode
private

CC interaction mode.

Definition at line 143 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

int evgen::GENIEGen::fPassEmptySpills
private

whether or not to kill evnets with no interactions

Definition at line 111 of file GENIEGen_module.cc.

Referenced by produce().

double evgen::GENIEGen::fRandomTimeOffset
private

The start of a simulated "beam gate".

Definition at line 115 of file GENIEGen_module.cc.

Referenced by produce().

TStopwatch evgen::GENIEGen::fStopwatch
private

Definition at line 112 of file GENIEGen_module.cc.

Referenced by GENIEGen(), and ~GENIEGen().

TH1F* evgen::GENIEGen::fVertexX
private

vertex location of generated events in x

Definition at line 120 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

TH2F* evgen::GENIEGen::fVertexXY
private

vertex location in xy

Definition at line 124 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

TH2F* evgen::GENIEGen::fVertexXZ
private

vertex location in xz

Definition at line 125 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

TH1F* evgen::GENIEGen::fVertexY
private

vertex location of generated events in y

Definition at line 121 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

TH2F* evgen::GENIEGen::fVertexYZ
private

vertex location in yz

Definition at line 126 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

TH1F* evgen::GENIEGen::fVertexZ
private

vertex location of generated events in z

Definition at line 122 of file GENIEGen_module.cc.

Referenced by beginJob(), and FillHistograms().

std::vector< double > evgen::GENIEGen::fVtxPosHistRange
private

use defined hist range; it is useful to have for asymmetric ranges like in DP FD.

Definition at line 109 of file GENIEGen_module.cc.

Referenced by beginJob().


The documentation for this class was generated from the following file: