GENIEGenerator
|
#include <cassert>
#include <cstdlib>
#include <string>
#include <vector>
#include <sstream>
#include <TSystem.h>
#include "Framework/Algorithm/AlgFactory.h"
#include "Framework/Conventions/Controls.h"
#include "Framework/EventGen/EventRecord.h"
#include "Framework/EventGen/EventGeneratorI.h"
#include "Framework/EventGen/EventRecordVisitorI.h"
#include "Framework/EventGen/GMCJMonitor.h"
#include "Framework/GHEP/GHepParticle.h"
#include "Framework/Messenger/Messenger.h"
#include "Framework/Ntuple/NtpWriter.h"
#include "Physics/BeamHNL/HNLDecayMode.h"
#include "Physics/BeamHNL/HNLDecayUtils.h"
#include "Physics/BeamHNL/HNLVertexGenerator.h"
#include "Physics/BeamHNL/HNLFluxContainer.h"
#include "Physics/BeamHNL/HNLFluxCreator.h"
#include "Physics/BeamHNL/HNLDecayer.h"
#include "Physics/BeamHNL/SimpleHNL.h"
#include "Framework/Numerical/RandomGen.h"
#include "Framework/ParticleData/PDGCodes.h"
#include "Framework/ParticleData/PDGUtils.h"
#include "Framework/ParticleData/PDGLibrary.h"
#include "Framework/Utils/StringUtils.h"
#include "Framework/Utils/UnitUtils.h"
#include "Framework/Utils/PrintUtils.h"
#include "Framework/Utils/AppInit.h"
#include "Framework/Utils/TuneId.h"
#include "Framework/Utils/RunOpt.h"
#include "Framework/Utils/CmdLnArgParser.h"
Go to the source code of this file.
Functions | |
void | GetCommandLineArgs (int argc, char **argv) |
void | PrintSyntax (void) |
int | SelectDecayMode (std::vector< HNLDecayMode_t > *intChannels, SimpleHNL sh) |
const EventRecordVisitorI * | HNLGenerator (void) |
TLorentzVector | GeneratePosition (GHepRecord *event) |
int | main (int argc, char **argv) |
Variables | |
string | kDefOptGeomLUnits = "mm" |
string | kDefOptGeomDUnits = "g_cm3" |
NtpMCFormat_t | kDefOptNtpFormat = kNFGHEP |
string | kDefOptEvFilePrefix = "gntp" |
string | kDefOptFluxFilePath = "./input-flux.root" |
string | kDefOptSName = "genie::EventGenerator" |
string | kDefOptSConfig = "BeamHNL" |
string | kDefOptSTune = "GHNL20_00a_00_000" |
Long_t | gOptRunNu = 1000 |
int | gOptNev = 10 |
double | gOptEnergyHNL = -1 |
double | gOptMassHNL = -1 |
double | gOptECoupling = -1 |
double | gOptMCoupling = -1 |
double | gOptTCoupling = -1 |
bool | gOptIsMajorana = false |
bool | gOptIsMonoEnFlux = true |
HNLDecayMode_t | gOptDecayMode = kHNLDcyNull |
std::vector< HNLDecayMode_t > | gOptIntChannels |
string | gOptEvFilePrefix = kDefOptEvFilePrefix |
bool | gOptUsingRootGeom = false |
string | gOptRootGeom |
string | gOptRootGeomTopVol = "" |
double | gOptGeomLUnits = 0 |
long int | gOptRanSeed = -1 |
double | fdx = 0 |
double | fdy = 0 |
double | fdz = 0 |
double | fox = 0 |
double | foy = 0 |
double | foz = 0 |
double | NTP_IS_E = 0. |
double | NTP_IS_PX = 0. |
double | NTP_IS_PY = 0. |
double | NTP_IS_PZ = 0. |
double | NTP_FS0_E = 0. |
double | NTP_FS0_PX = 0. |
double | NTP_FS0_PY = 0. |
double | NTP_FS0_PZ = 0. |
double | NTP_FS1_E = 0. |
double | NTP_FS1_PX = 0. |
double | NTP_FS1_PY = 0. |
double | NTP_FS1_PZ = 0. |
double | NTP_FS2_E = 0. |
double | NTP_FS2_PX = 0. |
double | NTP_FS2_PY = 0. |
double | NTP_FS2_PZ = 0. |
int | NTP_FS0_PDG = 0 |
int | NTP_FS1_PDG = 0 |
int | NTP_FS2_PDG = 0 |
double | CoMLifetime = -1.0 |
double | decayMod = 1.0 |
double | evWeight = 1.0 |
TLorentzVector GeneratePosition | ( | GHepRecord * | event | ) |
Definition at line 711 of file gBeamHNLEvGen.cxx.
References genie::hnl::selector::__attribute__(), fdx, fdy, fdz, fox, foy, foz, genie::RandomGen::Instance(), and genie::RandomGen::RndGeom().
Referenced by main().
void GetCommandLineArgs | ( | int | argc, |
char ** | argv | ||
) |
const EventRecordVisitorI * HNLGenerator | ( | void | ) |
Definition at line 729 of file gBeamHNLEvGen.cxx.
References genie::gAbortingInErr, genie::AlgFactory::GetAlgorithm(), genie::AlgFactory::Instance(), kDefOptSConfig, kDefOptSName, LOG, pDEBUG, pFATAL, and pINFO.
Referenced by main(), and TestDecay().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 219 of file gBeamHNLEvGen.cxx.
References genie::hnl::selector::__attribute__(), genie::NtpWriter::AddEventRecord(), CoMLifetime, genie::NtpWriter::CustomizeFilenamePrefix(), decayMod, e, genie::NtpWriter::EventTree(), evWeight, GeneratePosition(), genie::AlgFactory::GetAlgorithm(), genie::hnl::SimpleHNL::GetCoMLifetime(), GetCommandLineArgs(), genie::hnl::Decayer::GetHNLCouplings(), genie::hnl::Decayer::GetHNLInterestingChannels(), genie::hnl::Decayer::GetHNLLifetime(), genie::hnl::FluxCreator::GetNFluxEntries(), genie::hnl::SimpleHNL::GetValidChannels(), gOptDecayMode, gOptECoupling, gOptEnergyHNL, gOptEvFilePrefix, gOptIntChannels, gOptIsMajorana, gOptIsMonoEnFlux, gOptMassHNL, gOptMCoupling, gOptNev, gOptRanSeed, gOptRootGeom, gOptRunNu, gOptTCoupling, gOptUsingRootGeom, genie::Interaction::HNL(), HNLGenerator(), genie::NtpWriter::Initialize(), genie::Interaction::InitStatePtr(), genie::RandomGen::Instance(), genie::RunOpt::Instance(), genie::AlgFactory::Instance(), genie::hnl::Decayer::IsHNLMajorana(), kDefOptNtpFormat, kDefOptSConfig, genie::hnl::kHNLDcyNull, genie::kIStInitialState, genie::kPdgHNL, genie::kPdgKP, LOG, genie::utils::app_init::MesgThresholds(), NTP_FS0_E, NTP_FS0_PDG, NTP_FS0_PX, NTP_FS0_PY, NTP_FS0_PZ, NTP_FS1_E, NTP_FS1_PDG, NTP_FS1_PX, NTP_FS1_PY, NTP_FS1_PZ, NTP_FS2_E, NTP_FS2_PDG, NTP_FS2_PX, NTP_FS2_PY, NTP_FS2_PZ, NTP_IS_E, NTP_IS_PX, NTP_IS_PY, NTP_IS_PZ, genie::utils::print::P4AsString(), pDEBUG, pINFO, pNOTICE, genie::hnl::Decayer::ProcessEventRecord(), genie::hnl::VertexGenerator::ProcessEventRecord(), genie::hnl::FluxCreator::ProcessEventRecord(), pWARN, genie::utils::app_init::RandGen(), genie::hnl::FluxCreator::RetrieveFluxInfo(), genie::RandomGen::RndGen(), genie::NtpWriter::Save(), SelectDecayMode(), genie::hnl::FluxCreator::SetFirstFluxEntry(), genie::hnl::VertexGenerator::SetGeomFile(), genie::hnl::FluxCreator::SetGeomFile(), genie::hnl::FluxCreator::SetInputFluxPath(), genie::GHepRecord::SetPrintLevel(), genie::InitialState::SetProbeP4(), genie::InitialState::SetProbePdg(), genie::GMCJMonitor::SetRefreshRate(), genie::GHepRecord::SetWeight(), and genie::GMCJMonitor::Update().
void PrintSyntax | ( | void | ) |
int SelectDecayMode | ( | std::vector< HNLDecayMode_t > * | intChannels, |
SimpleHNL | sh | ||
) |
Definition at line 756 of file gBeamHNLEvGen.cxx.
References genie::utils::hnl::AsString(), CoMLifetime, decayMod, genie::hnl::SimpleHNL::GetCoMLifetime(), genie::hnl::selector::GetProbabilities(), genie::hnl::SimpleHNL::GetValidChannels(), gOptMassHNL, genie::RandomGen::Instance(), genie::utils::hnl::IsKinematicallyAllowed(), LOG, pDEBUG, pFATAL, genie::RandomGen::RndGen(), genie::hnl::selector::SelectChannelInclusive(), genie::hnl::selector::SetInterestingChannels(), and genie::hnl::SimpleHNL::SetInterestingChannels().
Referenced by main().
double CoMLifetime = -1.0 |
Definition at line 212 of file gBeamHNLEvGen.cxx.
Referenced by genie::hnl::Decayer::LoadConfig(), main(), ReadInConfig(), SelectDecayMode(), and TestDecay().
double decayMod = 1.0 |
Definition at line 214 of file gBeamHNLEvGen.cxx.
Referenced by main(), and SelectDecayMode().
double evWeight = 1.0 |
Definition at line 216 of file gBeamHNLEvGen.cxx.
Referenced by main().
double fdx = 0 |
Definition at line 198 of file gBeamHNLEvGen.cxx.
Referenced by GeneratePosition().
double fdy = 0 |
Definition at line 199 of file gBeamHNLEvGen.cxx.
Referenced by GeneratePosition().
double fdz = 0 |
Definition at line 200 of file gBeamHNLEvGen.cxx.
Referenced by GeneratePosition().
double fox = 0 |
Definition at line 201 of file gBeamHNLEvGen.cxx.
Referenced by GeneratePosition().
double foy = 0 |
Definition at line 202 of file gBeamHNLEvGen.cxx.
Referenced by GeneratePosition().
double foz = 0 |
Definition at line 203 of file gBeamHNLEvGen.cxx.
Referenced by GeneratePosition().
HNLDecayMode_t gOptDecayMode = kHNLDcyNull |
Definition at line 181 of file gBeamHNLEvGen.cxx.
Referenced by main(), and SelectAnnihilationMode().
double gOptECoupling = -1 |
Definition at line 167 of file gBeamHNLEvGen.cxx.
Referenced by main().
double gOptEnergyHNL = -1 |
Definition at line 165 of file gBeamHNLEvGen.cxx.
Referenced by GenerateOriginMomentum(), main(), ReadInConfig(), and TestDecay().
string gOptEvFilePrefix = kDefOptEvFilePrefix |
Definition at line 184 of file gBeamHNLEvGen.cxx.
double gOptGeomLUnits = 0 |
Definition at line 194 of file gBeamHNLEvGen.cxx.
std::vector< HNLDecayMode_t > gOptIntChannels |
Definition at line 182 of file gBeamHNLEvGen.cxx.
Referenced by main().
bool gOptIsMajorana = false |
Definition at line 171 of file gBeamHNLEvGen.cxx.
Referenced by main().
bool gOptIsMonoEnFlux = true |
Definition at line 179 of file gBeamHNLEvGen.cxx.
Referenced by main().
double gOptMassHNL = -1 |
Definition at line 166 of file gBeamHNLEvGen.cxx.
Referenced by GenerateOriginMomentum(), main(), and SelectDecayMode().
double gOptMCoupling = -1 |
Definition at line 168 of file gBeamHNLEvGen.cxx.
Referenced by main().
int gOptNev = 10 |
Definition at line 163 of file gBeamHNLEvGen.cxx.
long int gOptRanSeed = -1 |
Definition at line 195 of file gBeamHNLEvGen.cxx.
string gOptRootGeom |
Definition at line 186 of file gBeamHNLEvGen.cxx.
string gOptRootGeomTopVol = "" |
Definition at line 193 of file gBeamHNLEvGen.cxx.
Long_t gOptRunNu = 1000 |
Definition at line 162 of file gBeamHNLEvGen.cxx.
double gOptTCoupling = -1 |
Definition at line 169 of file gBeamHNLEvGen.cxx.
Referenced by main().
bool gOptUsingRootGeom = false |
Definition at line 185 of file gBeamHNLEvGen.cxx.
string kDefOptEvFilePrefix = "gntp" |
Definition at line 154 of file gBeamHNLEvGen.cxx.
string kDefOptFluxFilePath = "./input-flux.root" |
Definition at line 155 of file gBeamHNLEvGen.cxx.
string kDefOptGeomDUnits = "g_cm3" |
Definition at line 152 of file gBeamHNLEvGen.cxx.
string kDefOptGeomLUnits = "mm" |
Definition at line 151 of file gBeamHNLEvGen.cxx.
NtpMCFormat_t kDefOptNtpFormat = kNFGHEP |
Definition at line 153 of file gBeamHNLEvGen.cxx.
string kDefOptSConfig = "BeamHNL" |
Definition at line 158 of file gBeamHNLEvGen.cxx.
Referenced by HNLGenerator(), and main().
string kDefOptSName = "genie::EventGenerator" |
Definition at line 157 of file gBeamHNLEvGen.cxx.
Referenced by HNLGenerator(), and main().
string kDefOptSTune = "GHNL20_00a_00_000" |
Definition at line 159 of file gBeamHNLEvGen.cxx.
double NTP_FS0_E = 0. |
Definition at line 206 of file gBeamHNLEvGen.cxx.
Referenced by main().
int NTP_FS0_PDG = 0 |
Definition at line 209 of file gBeamHNLEvGen.cxx.
Referenced by main().
double NTP_FS0_PX = 0. |
Definition at line 206 of file gBeamHNLEvGen.cxx.
Referenced by main().
double NTP_FS0_PY = 0. |
Definition at line 206 of file gBeamHNLEvGen.cxx.
Referenced by main().
double NTP_FS0_PZ = 0. |
Definition at line 206 of file gBeamHNLEvGen.cxx.
Referenced by main().
double NTP_FS1_E = 0. |
Definition at line 207 of file gBeamHNLEvGen.cxx.
Referenced by main().
int NTP_FS1_PDG = 0 |
Definition at line 209 of file gBeamHNLEvGen.cxx.
Referenced by main().
double NTP_FS1_PX = 0. |
Definition at line 207 of file gBeamHNLEvGen.cxx.
Referenced by main().
double NTP_FS1_PY = 0. |
Definition at line 207 of file gBeamHNLEvGen.cxx.
Referenced by main().
double NTP_FS1_PZ = 0. |
Definition at line 207 of file gBeamHNLEvGen.cxx.
Referenced by main().
double NTP_FS2_E = 0. |
Definition at line 208 of file gBeamHNLEvGen.cxx.
Referenced by main().
int NTP_FS2_PDG = 0 |
Definition at line 209 of file gBeamHNLEvGen.cxx.
Referenced by main().
double NTP_FS2_PX = 0. |
Definition at line 208 of file gBeamHNLEvGen.cxx.
Referenced by main().
double NTP_FS2_PY = 0. |
Definition at line 208 of file gBeamHNLEvGen.cxx.
Referenced by main().
double NTP_FS2_PZ = 0. |
Definition at line 208 of file gBeamHNLEvGen.cxx.
Referenced by main().
double NTP_IS_E = 0. |
Definition at line 205 of file gBeamHNLEvGen.cxx.
Referenced by main().
double NTP_IS_PX = 0. |
Definition at line 205 of file gBeamHNLEvGen.cxx.
Referenced by main().
double NTP_IS_PY = 0. |
Definition at line 205 of file gBeamHNLEvGen.cxx.
Referenced by main().
double NTP_IS_PZ = 0. |
Definition at line 205 of file gBeamHNLEvGen.cxx.
Referenced by main().