GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
genie::HENuElGenerator Class Reference

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

#include <HENuElGenerator.h>

Inheritance diagram for genie::HENuElGenerator:
Inheritance graph
[legend]
Collaboration diagram for genie::HENuElGenerator:
Collaboration graph
[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. More...
 
virtual AlgStatus_t GetStatus (void) const
 Get algorithm status. More...
 
virtual bool AllowReconfig (void) const
 
virtual AlgCmp_t Compare (const Algorithm *alg) const
 Compare with input algorithm. More...
 
virtual void SetId (const AlgId &id)
 Set algorithm ID. More...
 
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. More...
 

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. More...
 
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. More...
 
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. More...
 
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 More...
 
int AddLowRegistry (Registry *rp, bool owns=true)
 add registry with lowest priority, also update ownership More...
 
int MergeTopRegistry (const Registry &r)
 
int AddTopRegisties (const vector< Registry * > &rs, bool owns=false)
 Add registries with top priority, also udated Ownerships. More...
 
- Protected Attributes inherited from genie::Algorithm
bool fAllowReconfig
 
bool fOwnsSubstruc
 true if it owns its substructure (sub-algs,...) More...
 
AlgId fID
 algorithm name and configuration set More...
 
vector< Registry * > fConfVect
 
vector< bool > fOwnerships
 ownership for every registry in fConfVect More...
 
AlgStatus_t fStatus
 algorithm execution status More...
 
AlgMapfOwnedSubAlgMp
 local pool for owned sub-algs (taken out of the factory pool) More...
 

Detailed Description

Generator for high energy neutrino-electron scattering.

Author
Alfonso Garcia <aagarciasoto km3net.de> IFIC & Harvard University
Created:
Dec 8, 2021
License:
Copyright (c) 2003-2024, 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 HENuElGenerator.h.

Constructor & Destructor Documentation

HENuElGenerator::HENuElGenerator ( )

Definition at line 44 of file HENuElGenerator.cxx.

References born.

44  :
45 EventRecordVisitorI("genie::HENuElGenerator")
46 {
47  born = new Born();
48 }
Born level nu-electron cross section.
Definition: Born.h:26
HENuElGenerator::HENuElGenerator ( string  config)

Definition at line 50 of file HENuElGenerator.cxx.

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

Definition at line 56 of file HENuElGenerator.cxx.

57 {
58 
59 }

Member Function Documentation

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.

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

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

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

142 {
143  Algorithm::Configure(config);
144  this->LoadConfig();
145 }
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
void HENuElGenerator::LoadConfig ( void  )
private

Definition at line 147 of file HENuElGenerator.cxx.

Referenced by Configure().

148 {
149 
150 
151 }
void HENuElGenerator::ProcessEventRecord ( GHepRecord event) const
virtual

Implements genie::EventRecordVisitorI.

Definition at line 61 of file HENuElGenerator.cxx.

References genie::utils::math::LongLorentzVector::BoostZ(), born, genie::utils::math::LongLorentzVector::E(), genie::Interaction::FSPrimLepton(), genie::Interaction::FSPrimLeptonPdg(), genie::Kinematics::GetKV(), genie::Born::GetReAlpha(), genie::Born::GetS(), genie::Born::GetT(), 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::units::s, and genie::GHepParticle::X4().

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 }
bool IsWeakCC(void) const
const int kPdgNuE
Definition: PDGCodes.h:28
double GetT(double mlin, double mlout, double s, double costhCM)
Definition: Born.cxx:200
static RandomGen * Instance()
Access instance.
Definition: RandomGen.cxx:71
const TLorentzVector * P4(void) const
Definition: GHepParticle.h:78
static constexpr double s
Definition: Units.h:95
static const double kElectronMass
A singleton holding random number generator classes. All random number generation in GENIE should tak...
Definition: RandomGen.h:29
int FSPrimLeptonPdg(void) const
final state primary lepton pdg
double GetReAlpha(void)
Definition: Born.h:32
int Pdg(void) const
Definition: GHepParticle.h:63
Summary information for an interaction.
Definition: Interaction.h:56
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
Definition: ProcessInfo.h:46
const Kinematics & Kine(void) const
Definition: Interaction.h:71
double GetKV(KineVar_t kv) const
Definition: Kinematics.cxx:323
double GetS(double mlin, double Enuin)
Definition: Born.cxx:195
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
const TLorentzVector * X4(void) const
Definition: GHepParticle.h:79
const InitialState & InitState(void) const
Definition: Interaction.h:69
const ProcessInfo & ProcInfo(void) const
Definition: Interaction.h:70
double ProbeE(RefFrame_t rf) const
STDHEP-like event record entry that can fit a particle or a nucleus.
Definition: GHepParticle.h:39
Initial State information.
Definition: InitialState.h:48

Member Data Documentation

Born* genie::HENuElGenerator::born
private

Definition at line 48 of file HENuElGenerator.h.

Referenced by HENuElGenerator(), and ProcessEventRecord().


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