GENIEGenerator
Loading...
Searching...
No Matches
genie::HEDISGenerator Class Reference

Generates the final state leptonic and hadronic system in v HEDIS interactions. Is a concrete implementation of the EventRecordVisitorI interface. More...

#include <HEDISGenerator.h>

Inheritance diagram for genie::HEDISGenerator:
[legend]
Collaboration diagram for genie::HEDISGenerator:
[legend]

Public Member Functions

 HEDISGenerator ()
 HEDISGenerator (string config)
 ~HEDISGenerator ()
void Initialize (void) const
void ProcessEventRecord (GHepRecord *evrec) const
void Configure (const Registry &config)
void Configure (string config)
Public Member Functions inherited from genie::HadronicSystemGenerator
void AddTargetNucleusRemnant (GHepRecord *event_rec) const
void AddFinalHadronicSyst (GHepRecord *event_rec) const
void PreHadronTransportDecays (GHepRecord *event_rec) const
TLorentzVector Hadronic4pLAB (GHepRecord *event_rec) const
TLorentzVector MomentumTransferLAB (GHepRecord *event_rec) const
TVector3 HCM2LAB (GHepRecord *event_rec) const
int HadronShowerCharge (GHepRecord *event_rec) const
int ResonanceCharge (GHepRecord *event_rec) const
Public Member Functions inherited from genie::EventRecordVisitorI
virtual ~EventRecordVisitorI ()
Public Member Functions inherited from genie::Algorithm
virtual ~Algorithm ()
virtual void FindConfig (void)
virtual const RegistryGetConfig (void) const
RegistryGetOwnedConfig (void)
virtual const AlgIdId (void) const
 Get algorithm ID.
virtual AlgStatus_t GetStatus (void) const
 Get algorithm status.
virtual bool AllowReconfig (void) const
virtual AlgCmp_t Compare (const Algorithm *alg) const
 Compare with input algorithm.
virtual void SetId (const AlgId &id)
 Set algorithm ID.
virtual void SetId (string name, string config)
const AlgorithmSubAlg (const RgKey &registry_key) const
void AdoptConfig (void)
void AdoptSubstructure (void)
virtual void Print (ostream &stream) const
 Print algorithm info.

Private Member Functions

void AddPrimaryLepton (GHepRecord *evrec) const
void LoadConfig (void)

Private Attributes

const EventRecordVisitorIfHadronizationModel

Additional Inherited Members

Static Public Member Functions inherited from genie::Algorithm
static string BuildParamVectKey (const std::string &comm_name, unsigned int i)
static string BuildParamVectSizeKey (const std::string &comm_name)
static string BuildParamMatKey (const std::string &comm_name, unsigned int i, unsigned int j)
static string BuildParamMatRowSizeKey (const std::string &comm_name)
static string BuildParamMatColSizeKey (const std::string &comm_name)
Protected Member Functions inherited from genie::HadronicSystemGenerator
 HadronicSystemGenerator ()
 HadronicSystemGenerator (string name)
 HadronicSystemGenerator (string name, string config)
 ~HadronicSystemGenerator ()
Protected Member Functions inherited from genie::EventRecordVisitorI
 EventRecordVisitorI ()
 EventRecordVisitorI (string name)
 EventRecordVisitorI (string name, string config)
Protected Member Functions inherited from genie::Algorithm
 Algorithm ()
 Algorithm (string name)
 Algorithm (string name, string config)
void Initialize (void)
void DeleteConfig (void)
void DeleteSubstructure (void)
RegistryExtractLocalConfig (const Registry &in) const
RegistryExtractLowerConfig (const Registry &in, const string &alg_key) const
 Split an incoming configuration Registry into a block valid for the sub-algo identified by alg_key.
template<class T>
bool GetParam (const RgKey &name, T &p, bool is_top_call=true) const
template<class T>
bool GetParamDef (const RgKey &name, T &p, const T &def) const
template<class T>
int GetParamVect (const std::string &comm_name, std::vector< T > &v, bool is_top_call=true) const
 Handle to load vectors of parameters.
int GetParamVectKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
template<class T>
int GetParamMat (const std::string &comm_name, TMatrixT< T > &mat, bool is_top_call=true) const
 Handle to load matrix of parameters.
template<class T>
int GetParamMatSym (const std::string &comm_name, TMatrixTSym< T > &mat, bool is_top_call=true) const
int GetParamMatKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
int AddTopRegistry (Registry *rp, bool owns=true)
 add registry with top priority, also update ownership
int AddLowRegistry (Registry *rp, bool owns=true)
 add registry with lowest priority, also update ownership
int MergeTopRegistry (const Registry &r)
int AddTopRegisties (const vector< Registry * > &rs, bool owns=false)
 Add registries with top priority, also udated Ownerships.
Protected Attributes inherited from genie::HadronicSystemGenerator
const EventRecordVisitorIfPreINukeDecayer
Protected Attributes inherited from genie::Algorithm
bool fAllowReconfig
bool fOwnsSubstruc
 true if it owns its substructure (sub-algs,...)
AlgId fID
 algorithm name and configuration set
vector< Registry * > fConfVect
vector< bool > fOwnerships
 ownership for every registry in fConfVect
AlgStatus_t fStatus
 algorithm execution status
AlgMapfOwnedSubAlgMp
 local pool for owned sub-algs (taken out of the factory pool)

Detailed Description

Generates the final state leptonic and hadronic system in v HEDIS interactions. Is a concrete implementation of the EventRecordVisitorI interface.

Author
Alfonso Garcia <alfonsog \at nikhef.nl> NIKHEF
Created:\n August 28, 2019
License:\n Copyright (c) 2003-2025, The GENIE Collaboration
For the full text of the license visit http://copyright.genie-mc.org or see $GENIE/LICENSE

Definition at line 29 of file HEDISGenerator.h.

Constructor & Destructor Documentation

◆ HEDISGenerator() [1/2]

HEDISGenerator::HEDISGenerator ( )

Definition at line 27 of file HEDISGenerator.cxx.

27 :
28HadronicSystemGenerator("genie::HEDISGenerator")
29{
30 this->Initialize();
31}
void Initialize(void) const

References genie::HadronicSystemGenerator::HadronicSystemGenerator(), and Initialize().

◆ HEDISGenerator() [2/2]

HEDISGenerator::HEDISGenerator ( string config)

Definition at line 33 of file HEDISGenerator.cxx.

33 :
34HadronicSystemGenerator("genie::HEDISGenerator", config)
35{
36 this->Initialize();
37}

References genie::HadronicSystemGenerator::HadronicSystemGenerator(), and Initialize().

◆ ~HEDISGenerator()

HEDISGenerator::~HEDISGenerator ( )

Definition at line 39 of file HEDISGenerator.cxx.

40{
41
42}

Member Function Documentation

◆ AddPrimaryLepton()

void HEDISGenerator::AddPrimaryLepton ( GHepRecord * evrec) const
private

Definition at line 66 of file HEDISGenerator.cxx.

67{
68
69 Interaction * interaction = evrec->Summary();
70
71 // Neutrino 4p
72 LongLorentzVector p4v( * evrec->Probe()->P4() );
73 LOG("HEDISGenerator", pINFO) << "NEUTRINO @ LAB' => E = " << p4v.E() << " // m = " << p4v.M() << " // p = " << p4v.P();
74 LOG("HEDISGenerator", pINFO) << " dir = " << p4v.Dx() << " , " << p4v.Dy() << " , " << p4v.Dz();
75
76 // Look-up selected kinematics & other needed kinematical params
77 long double Q2 = interaction->Kine().Q2(true);
78 long double y = interaction->Kine().y(true);
79 long double Ev = p4v.E();
80 long double ml = interaction->FSPrimLepton()->Mass();
81 long double ml2 = powl(ml,2);
82
83 // Compute the final state primary lepton energy and momentum components
84 // along and perpendicular the neutrino direction
85 long double El = (1-y)*Ev;
86 long double plp = El - 0.5*(Q2+ml2)/Ev; // p(//)
87 long double plt = sqrtl(fmaxl(0.,El*El-plp*plp-ml2)); // p(-|)
88 // Randomize transverse components
89 RandomGen * rnd = RandomGen::Instance();
90 long double phi = 2 * constants::kPi * rnd->RndLep().Rndm();
91 long double pltx = plt * cosl(phi);
92 long double plty = plt * sinl(phi);
93
94 // Lepton 4-momentum in the LAB frame
95 LongLorentzVector p4llong( pltx, plty, plp, El );
96 p4llong.Rotate(p4v);
97 LOG("HEDISGenerator", pINFO) << "LEPTON @ LAB' => E = " << p4llong.E() << " // m = " << p4llong.M() << " // p = " << p4llong.P();
98 LOG("HEDISGenerator", pINFO) << " dir = " << p4llong.Dx() << " , " << p4llong.Dy() << " , " << p4llong.Dz();
99
100 // Translate from long double to double
101 TLorentzVector p4l( (double)p4llong.Px(), (double)p4llong.Py(), (double)p4llong.Pz(), (double)p4llong.E() );
102
103 // Add lepton to EventRecord
104 int pdgl = interaction->FSPrimLepton()->PdgCode();
105 evrec->AddParticle(pdgl, kIStStableFinalState, evrec->ProbePosition(),-1,-1,-1, p4l, *(evrec->Probe()->X4()));
106 evrec->Summary()->KinePtr()->SetFSLeptonP4(p4l);
107
108}
#define pINFO
Definition Messenger.h:62
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
const TLorentzVector * P4(void) const
const TLorentzVector * X4(void) const
virtual int ProbePosition(void) const
virtual GHepParticle * Probe(void) const
virtual Interaction * Summary(void) const
virtual void AddParticle(const GHepParticle &p)
const Kinematics & Kine(void) const
Definition Interaction.h:71
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
Kinematics * KinePtr(void) const
Definition Interaction.h:76
double Q2(bool selected=false) const
double y(bool selected=false) const
void SetFSLeptonP4(const TLorentzVector &p4)
static RandomGen * Instance()
Access instance.
Definition RandomGen.cxx:74
TRandom3 & RndLep(void) const
rnd number generator used by final state primary lepton generators
Definition RandomGen.h:62
double Q2(const Interaction *const i)
@ kIStStableFinalState
Definition GHepStatus.h:30

References genie::GHepRecord::AddParticle(), genie::utils::math::LongLorentzVector::Dx(), genie::utils::math::LongLorentzVector::Dy(), genie::utils::math::LongLorentzVector::Dz(), genie::utils::math::LongLorentzVector::E(), genie::Interaction::FSPrimLepton(), genie::RandomGen::Instance(), genie::Interaction::Kine(), genie::Interaction::KinePtr(), genie::kIStStableFinalState, genie::constants::kPi, LOG, genie::utils::math::LongLorentzVector::M(), genie::utils::math::LongLorentzVector::P(), genie::GHepParticle::P4(), pINFO, genie::GHepRecord::Probe(), genie::GHepRecord::ProbePosition(), genie::utils::math::LongLorentzVector::Px(), genie::utils::math::LongLorentzVector::Py(), genie::utils::math::LongLorentzVector::Pz(), genie::Kinematics::Q2(), genie::RandomGen::RndLep(), genie::utils::math::LongLorentzVector::Rotate(), genie::Kinematics::SetFSLeptonP4(), genie::GHepRecord::Summary(), genie::GHepParticle::X4(), and genie::Kinematics::y().

Referenced by ProcessEventRecord().

◆ Configure() [1/2]

void HEDISGenerator::Configure ( const Registry & config)
virtual

Configure the algorithm with an external registry The registry is merged with the top level registry if it is owned, Otherwise a copy of it is added with the highest priority

Reimplemented from genie::Algorithm.

Definition at line 110 of file HEDISGenerator.cxx.

111{
112 Algorithm::Configure(config);
113 this->LoadConfig();
114}
virtual void Configure(const Registry &config)
Definition Algorithm.cxx:62

References genie::Algorithm::Configure(), and LoadConfig().

◆ Configure() [2/2]

void HEDISGenerator::Configure ( string config)
virtual

Configure the algorithm from the AlgoConfigPool based on param_set string given in input An algorithm contains a vector of registries coming from different xml configuration files, which are loaded according a very precise prioriy This methods will load a number registries in order of priority: 1) "Tunable" parameter set from CommonParametes. This is loaded with the highest prioriry and it is designed to be used for tuning procedure Usage not expected from the user. 2) For every string defined in "CommonParame" the corresponding parameter set will be loaded from CommonParameter.xml 3) parameter set specified by the config string and defined in the xml file of the algorithm 4) if config is not "Default" also the Default parameter set from the same xml file will be loaded Effectively this avoids the repetion of a parameter when it is not changed in the requested configuration

Reimplemented from genie::Algorithm.

Definition at line 116 of file HEDISGenerator.cxx.

117{
118 Algorithm::Configure(config);
119 this->LoadConfig();
120}

References genie::Algorithm::Configure(), and LoadConfig().

◆ Initialize()

void HEDISGenerator::Initialize ( void ) const

Definition at line 44 of file HEDISGenerator.cxx.

45{
46
47}

Referenced by HEDISGenerator(), and HEDISGenerator().

◆ LoadConfig()

void HEDISGenerator::LoadConfig ( void )
private

Definition at line 122 of file HEDISGenerator.cxx.

123{
125
126 //-- Get the requested hadronization model
128 dynamic_cast<const EventRecordVisitorI *> (this->SubAlg("Hadronizer"));
129 assert(fHadronizationModel);
130
131}
const Algorithm * SubAlg(const RgKey &registry_key) const
const EventRecordVisitorI * fHadronizationModel

References fHadronizationModel, and genie::Algorithm::SubAlg().

Referenced by Configure(), and Configure().

◆ ProcessEventRecord()

void HEDISGenerator::ProcessEventRecord ( GHepRecord * evrec) const
virtual

Implements genie::EventRecordVisitorI.

Definition at line 49 of file HEDISGenerator.cxx.

50{
51// This method generates the final state hadronic system
52
53 //-- Add the target remnant
54 this->AddTargetNucleusRemnant(evrec);
55 GHepParticle * target = evrec -> TargetNucleus();
57
58 //-- Add the primary lepton
59 this->AddPrimaryLepton(evrec);
60
61 //-- Run the hadronization model and get the fragmentation products
62 fHadronizationModel->ProcessEventRecord(evrec);
63
64}
void SetStatus(GHepStatus_t s)
virtual int RemnantNucleusPosition(void) const
virtual GHepParticle * Particle(int position) const
void AddPrimaryLepton(GHepRecord *evrec) const
void AddTargetNucleusRemnant(GHepRecord *event_rec) const
@ kIStFinalStateNuclearRemnant
Definition GHepStatus.h:38

References AddPrimaryLepton(), genie::HadronicSystemGenerator::AddTargetNucleusRemnant(), fHadronizationModel, genie::kIStFinalStateNuclearRemnant, genie::GHepRecord::Particle(), genie::GHepRecord::RemnantNucleusPosition(), and genie::GHepParticle::SetStatus().

Member Data Documentation

◆ fHadronizationModel

const EventRecordVisitorI* genie::HEDISGenerator::fHadronizationModel
private

Definition at line 51 of file HEDISGenerator.h.

Referenced by LoadConfig(), and ProcessEventRecord().


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