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

Generator for high energy neutrino-electron scattering. More...

#include <HENuElGenerator.h>

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

Public Member Functions

 HENuElGenerator ()
 HENuElGenerator (string config)
 ~HENuElGenerator ()
void ProcessEventRecord (GHepRecord *event) const
void Configure (const Registry &config)
void Configure (string config)
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 LoadConfig (void)

Private Attributes

Bornborn

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::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::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

Generator for high energy neutrino-electron scattering.

Author
Alfonso Garcia <aagarciasoto \at km3net.de> IFIC & Harvard University
Created:\n Dec 8, 2021
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 28 of file HENuElGenerator.h.

Constructor & Destructor Documentation

◆ HENuElGenerator() [1/2]

HENuElGenerator::HENuElGenerator ( )

Definition at line 44 of file HENuElGenerator.cxx.

44 :
45EventRecordVisitorI("genie::HENuElGenerator")
46{
47 born = new Born();
48}

References born, and genie::EventRecordVisitorI::EventRecordVisitorI().

◆ HENuElGenerator() [2/2]

HENuElGenerator::HENuElGenerator ( string config)

Definition at line 50 of file HENuElGenerator.cxx.

50 :
51EventRecordVisitorI("genie::HENuElGenerator", config)
52{
53
54}

References genie::EventRecordVisitorI::EventRecordVisitorI().

◆ ~HENuElGenerator()

HENuElGenerator::~HENuElGenerator ( )

Definition at line 56 of file HENuElGenerator.cxx.

57{
58
59}

Member Function Documentation

◆ Configure() [1/2]

void HENuElGenerator::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 135 of file HENuElGenerator.cxx.

136{
137 Algorithm::Configure(config);
138 this->LoadConfig();
139}
virtual void Configure(const Registry &config)
Definition Algorithm.cxx:62

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

◆ Configure() [2/2]

void HENuElGenerator::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 141 of file HENuElGenerator.cxx.

142{
143 Algorithm::Configure(config);
144 this->LoadConfig();
145}

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

◆ LoadConfig()

void HENuElGenerator::LoadConfig ( void )
private

Definition at line 147 of file HENuElGenerator.cxx.

148{
149
150
151}

Referenced by Configure(), and Configure().

◆ ProcessEventRecord()

void HENuElGenerator::ProcessEventRecord ( GHepRecord * event) const
virtual

Implements genie::EventRecordVisitorI.

Definition at line 61 of file HENuElGenerator.cxx.

62{
63
64 Interaction * interaction = event->Summary();
65 const InitialState & init_state = interaction->InitState();
66 const ProcessInfo & proc_info = interaction->ProcInfo();
67
68 //incoming v & struck particle & remnant nucleus
69 GHepParticle * nu = event->Probe();
70
71 GHepParticle * target = event -> TargetNucleus();
72 if(target) event->AddParticle(target->Pdg(), kIStFinalStateNuclearRemnant, 1,-1,-1,-1, *(target->P4()), *(target->X4()) );
73
74 TVector3 unit_nu = nu->P4()->Vect().Unit();
75
76 bool isCC = proc_info.IsWeakCC();
77
78 long double mlout = interaction->FSPrimLepton()->Mass(); //mass of charged lepton
79 long double mlin = kElectronMass; //mass of incoming charged lepton
80
81 long double Enuin = init_state.ProbeE(kRfLab);
82 long double s = born->GetS(mlin,Enuin);
83
84 long double n1 = interaction->Kine().GetKV(kKVn1);
85 long double n2 = interaction->Kine().GetKV(kKVn2);
86
87 long double costhCM = n1;
88 long double sinthCM = sqrtl(1-costhCM*costhCM);
89
90 long double t = born->GetT( mlin, mlout, s, n1 );
91 long double zeta = born->GetReAlpha()/kPi*(2.0*logl(sqrtl(-t)/kElectronMass)-1.0);
92 long double omx = powl(n2, 1.0/zeta );
93 long double s_r = s*( 1.-omx );
94
95 // Boost velocity CM -> LAB
96 long double EnuinCM = (s_r-mlin*mlin)/sqrtl(s_r)/2.;
97 long double beta = (powl(Enuin,2)-powl(EnuinCM,2))/(powl(Enuin,2)+powl(EnuinCM,2));
98
99 // Final state primary lepton PDG code
100 int pdgl = interaction->FSPrimLeptonPdg();
101 assert(pdgl!=0);
102
103 long double ElpoutCM = (s_r+mlout*mlout)/sqrtl(s_r)/2.;
104 long double EnuoutCM = (s_r-mlout*mlout)/sqrtl(s_r)/2.;
105 LongLorentzVector p4_lpout( 0., EnuoutCM*sinthCM, EnuoutCM*costhCM, ElpoutCM );
106 LongLorentzVector p4_nuout( 0., -EnuoutCM*sinthCM, -EnuoutCM*costhCM, EnuoutCM );
107
108 p4_lpout.BoostZ(beta);
109 p4_nuout.BoostZ(beta);
110
111 TLorentzVector p4lp_o( (double)p4_lpout.Px(), (double)p4_lpout.Py(), (double)p4_lpout.Pz(), (double)p4_lpout.E() );
112 TLorentzVector p4nu_o( (double)p4_nuout.Px(), (double)p4_nuout.Py(), (double)p4_nuout.Pz(), (double)p4_nuout.E() );
113
114 // Randomize transverse components
115 RandomGen * rnd = RandomGen::Instance();
116 double phi = 2* kPi * rnd->RndLep().Rndm();
117 p4lp_o.RotateZ(phi);
118 p4nu_o.RotateZ(phi);
119
120 //rotate from LAB=[0,0,Ev,Ev]->[px,py,pz,E]
121 p4lp_o.RotateUz(unit_nu);
122 p4nu_o.RotateUz(unit_nu);
123
124 int pdgvout = 0;
125 if (isCC) pdgvout = kPdgNuE;
126 else pdgvout = nu->Pdg();
127
128 // Create a GHepParticle and add it to the event record
129 event->AddParticle( pdgl, kIStStableFinalState, 4, -1, -1, -1, p4lp_o, *(nu->X4()) );
130 event->AddParticle( pdgvout, kIStStableFinalState, 4, -1, -1, -1, p4nu_o, *(nu->X4()) );
131 event->Summary()->KinePtr()->SetFSLeptonP4(p4lp_o);
132
133}
int Pdg(void) const
const TLorentzVector * P4(void) const
const TLorentzVector * X4(void) const
double ProbeE(RefFrame_t rf) const
const Kinematics & Kine(void) const
Definition Interaction.h:71
int FSPrimLeptonPdg(void) const
final state primary lepton pdg
const ProcessInfo & ProcInfo(void) const
Definition Interaction.h:70
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
const InitialState & InitState(void) const
Definition Interaction.h:69
double GetKV(KineVar_t kv) const
bool IsWeakCC(void) const
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
@ kIStFinalStateNuclearRemnant
Definition GHepStatus.h:38
@ kIStStableFinalState
Definition GHepStatus.h:30
@ kKVn2
Definition KineVar.h:62
@ kKVn1
Definition KineVar.h:61
const int kPdgNuE
Definition PDGCodes.h:28
@ kRfLab
Definition RefFrame.h:26

References genie::utils::math::LongLorentzVector::BoostZ(), born, genie::utils::math::LongLorentzVector::E(), genie::Interaction::FSPrimLepton(), genie::Interaction::FSPrimLeptonPdg(), genie::Kinematics::GetKV(), genie::Interaction::InitState(), genie::RandomGen::Instance(), genie::ProcessInfo::IsWeakCC(), genie::constants::kElectronMass, genie::Interaction::Kine(), genie::kIStFinalStateNuclearRemnant, genie::kIStStableFinalState, genie::kKVn1, genie::kKVn2, genie::kPdgNuE, genie::constants::kPi, genie::kRfLab, genie::GHepParticle::P4(), genie::GHepParticle::Pdg(), genie::InitialState::ProbeE(), genie::Interaction::ProcInfo(), genie::utils::math::LongLorentzVector::Px(), genie::utils::math::LongLorentzVector::Py(), genie::utils::math::LongLorentzVector::Pz(), genie::RandomGen::RndLep(), and genie::GHepParticle::X4().

Member Data Documentation

◆ born

Born* genie::HENuElGenerator::born
private

Definition at line 47 of file HENuElGenerator.h.

Referenced by HENuElGenerator(), and ProcessEventRecord().


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