Public Member Functions | Private Member Functions | Private Attributes | List of all members
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:
genie::HadronicSystemGenerator genie::EventRecordVisitorI genie::Algorithm

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. 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 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)
 
- 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. 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
 
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::HadronicSystemGenerator
const EventRecordVisitorIfPreINukeDecayer
 
- 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< boolfOwnerships
 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

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

Author
Alfonso Garcia <alfonsog nikhef.nl> NIKHEF

August 28, 2019

Copyright (c) 2003-2018, 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::HEDISGenerator ( )

Definition at line 35 of file HEDISGenerator.cxx.

35  :
36 HadronicSystemGenerator("genie::HEDISGenerator")
37 {
38  this->Initialize();
39 }
void Initialize(void) const
HEDISGenerator::HEDISGenerator ( string  config)

Definition at line 41 of file HEDISGenerator.cxx.

41  :
42 HadronicSystemGenerator("genie::HEDISGenerator", config)
43 {
44  this->Initialize();
45 }
void Initialize(void) const
static Config * config
Definition: config.cpp:1054
HEDISGenerator::~HEDISGenerator ( )

Definition at line 47 of file HEDISGenerator.cxx.

48 {
49 
50 }

Member Function Documentation

void HEDISGenerator::AddPrimaryLepton ( GHepRecord evrec) const
private

Definition at line 72 of file HEDISGenerator.cxx.

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

117 {
118  Algorithm::Configure(config);
119  this->LoadConfig();
120 }
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
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 122 of file HEDISGenerator.cxx.

123 {
125  this->LoadConfig();
126 }
static Config * config
Definition: config.cpp:1054
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
void HEDISGenerator::Initialize ( void  ) const

Definition at line 52 of file HEDISGenerator.cxx.

53 {
54 
55 }
void HEDISGenerator::LoadConfig ( void  )
private

Definition at line 128 of file HEDISGenerator.cxx.

129 {
131 
132  //-- Get the requested hadronization model
134  dynamic_cast<const EventRecordVisitorI *> (this->SubAlg("Hadronizer"));
135  assert(fHadronizationModel);
136 
137 }
Defines the EventRecordVisitorI interface. Concrete implementations of this interface use the &#39;Visito...
const EventRecordVisitorI * fHadronizationModel
const Algorithm * SubAlg(const RgKey &registry_key) const
Definition: Algorithm.cxx:345
void HEDISGenerator::ProcessEventRecord ( GHepRecord evrec) const
virtual

Implements genie::EventRecordVisitorI.

Definition at line 57 of file HEDISGenerator.cxx.

58 {
59 // This method generates the final state hadronic system
60 
61  //-- Add the target remnant
62  this->AddTargetNucleusRemnant(evrec);
63 
64  //-- Add the primary lepton
65  this->AddPrimaryLepton(evrec);
66 
67  //-- Run the hadronization model and get the fragmentation products
69 
70 }
void AddPrimaryLepton(GHepRecord *evrec) const
virtual void ProcessEventRecord(GHepRecord *event_rec) const =0
void AddTargetNucleusRemnant(GHepRecord *event_rec) const
const EventRecordVisitorI * fHadronizationModel

Member Data Documentation

const EventRecordVisitorI* genie::HEDISGenerator::fHadronizationModel
private

Definition at line 51 of file HEDISGenerator.h.


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