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

Generates the final state primary lepton in neutrino-electron events. Is a concrete implementation of the EventRecordVisitorI interface. More...

#include <DMEOutgoingDarkGenerator.h>

Inheritance diagram for genie::DMEOutgoingDarkGenerator:
Inheritance graph
[legend]
Collaboration diagram for genie::DMEOutgoingDarkGenerator:
Collaboration graph
[legend]

Public Member Functions

 DMEOutgoingDarkGenerator ()
 
 DMEOutgoingDarkGenerator (string config)
 
 ~DMEOutgoingDarkGenerator ()
 
void ProcessEventRecord (GHepRecord *event_rec) const
 
- Public Member Functions inherited from genie::OutgoingDarkGenerator
virtual void SetPolarization (GHepRecord *ev) const
 
virtual TVector3 NucRestFrame2Lab (GHepRecord *ev) const
 
virtual void AddToEventRecord (GHepRecord *ev, int pdgc, const TLorentzVector &p4) 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...
 

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::OutgoingDarkGenerator
 OutgoingDarkGenerator ()
 
 OutgoingDarkGenerator (string name)
 
 OutgoingDarkGenerator (string name, string config)
 
virtual ~OutgoingDarkGenerator ()
 
void LoadConfig (void)
 
- 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::OutgoingDarkGenerator
bool fApplyCoulombCorrection
 
- 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

Generates the final state primary lepton in neutrino-electron events. Is a concrete implementation of the EventRecordVisitorI interface.

Author
Costas Andreopoulos <c.andreopoulos cern.ch> University of Liverpool
Created:
July 13, 2005
License:
Copyright (c) 2003-2024, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Definition at line 27 of file DMEOutgoingDarkGenerator.h.

Constructor & Destructor Documentation

DMEOutgoingDarkGenerator::DMEOutgoingDarkGenerator ( )

Definition at line 37 of file DMEOutgoingDarkGenerator.cxx.

37  :
38 OutgoingDarkGenerator("genie::DMEOutgoingDarkGenerator")
39 {
40 
41 }
DMEOutgoingDarkGenerator::DMEOutgoingDarkGenerator ( string  config)

Definition at line 43 of file DMEOutgoingDarkGenerator.cxx.

43  :
44 OutgoingDarkGenerator("genie::DMEOutgoingDarkGenerator", config)
45 {
46 
47 }
DMEOutgoingDarkGenerator::~DMEOutgoingDarkGenerator ( )

Definition at line 49 of file DMEOutgoingDarkGenerator.cxx.

50 {
51 
52 }

Member Function Documentation

void DMEOutgoingDarkGenerator::ProcessEventRecord ( GHepRecord event_rec) const
virtual

Reimplemented from genie::OutgoingDarkGenerator.

Definition at line 54 of file DMEOutgoingDarkGenerator.cxx.

References genie::OutgoingDarkGenerator::AddToEventRecord(), genie::Interaction::FSPrimLepton(), genie::Interaction::FSPrimLeptonPdg(), genie::Interaction::InitState(), genie::RandomGen::Instance(), genie::constants::kElectronMass, genie::Interaction::Kine(), genie::constants::kPi, genie::kRfLab, LOG, genie::GHepParticle::P4(), pINFO, pNOTICE, genie::GHepRecord::Probe(), genie::InitialState::ProbeE(), pWARN, genie::utils::kinematics::Q2(), genie::RandomGen::RndLep(), genie::OutgoingDarkGenerator::SetPolarization(), genie::GHepRecord::Summary(), and genie::Kinematics::y().

55 {
56 // This method generates the final state primary lepton for DME events
57 
58  Interaction * interaction = evrec->Summary();
59  const InitialState & init_state = interaction->InitState();
60 
61  // Get selected kinematics
62  double y = interaction->Kine().y(true);
63  assert(y>0 && y<1);
64 
65  // Final state primary lepton PDG code
66  int pdgc = interaction->FSPrimLeptonPdg();
67  assert(pdgc!=0);
68 
69  // Compute the neutrino and muon energy
70  double Ev = init_state.ProbeE(kRfLab);
71  double El = y*Ev;
72 
73  LOG("LeptonicVertex", pINFO)
74  << "Ev = " << Ev << ", y = " << y << ", -> El = " << El;
75 
76  // Compute the momentum transfer and scattering angle
77  double Ev2 = TMath::Power(Ev,2);
78  double El2 = TMath::Power(El,2);
79  double me = kElectronMass;
80  double ml = interaction->FSPrimLepton()->Mass();
81  double ml2 = TMath::Power(ml,2);
82  double pl = TMath::Sqrt(El2-ml2);
83  double pv = TMath::Sqrt(Ev2-ml2);
84 
85  assert(El2>=ml2&&Ev2>=ml2);
86 
87  double Q2 = 2*(Ev-El)*me;
88  double costh = (El*Ev - ml2 -0.5*Q2)/pl/pv;
89  double sinth = TMath::Sqrt( TMath::Max(0., 1-TMath::Power(costh,2.)) );
90 
91  LOG("LeptonicVertex", pNOTICE)
92  << "Q2 = " << Q2 << ", cos(theta) = " << costh;
93 
94  //warn about overflow in costheta and ignore it if it is small or abort
95  if( TMath::Abs(costh)>1 ) {
96  LOG("LeptonicVertex", pWARN)
97  << "El = " << El << ", Ev = " << Ev << ", cos(theta) = " << costh;
98  //if(TMath::Abs(costh)-1<0.3) costh = 1.0; //why?
99  }
100  assert(TMath::Abs(costh)<=1);
101 
102  // Compute the p components along and perpendicular the v direction
103  double plp = pl * costh; // p(//)
104  double plt = pl * sinth; // p(-|)
105 
106  LOG("LeptonicVertex", pNOTICE)
107  << "fsl: E = " << El << ", |p//| = " << plp << "[pT] = " << plt;
108 
109  // Randomize transverse components
110  RandomGen * rnd = RandomGen::Instance();
111  double phi = 2*kPi * rnd->RndLep().Rndm();
112  double pltx = plt * TMath::Cos(phi);
113  double plty = plt * TMath::Sin(phi);
114 
115  // Take a unit vector along the neutrino direction
116  TVector3 unit_nudir = evrec->Probe()->P4()->Vect().Unit();
117 
118  // Rotate lepton momentum vector from the reference frame (x'y'z') where
119  // {z':(neutrino direction), z'x':(theta plane)} to the LAB
120  TVector3 p3l(pltx,plty,plp);
121  p3l.RotateUz(unit_nudir);
122 
123  // Lepton 4-momentum in the LAB
124  TLorentzVector p4l(p3l,El);
125 
126  // Create a GHepParticle and add it to the event record
127  this->AddToEventRecord(evrec, pdgc, p4l);
128 
129  // Set final state lepton polarization
130  this->SetPolarization(evrec);
131 }
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:1077
static RandomGen * Instance()
Access instance.
Definition: RandomGen.cxx:71
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 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
virtual void SetPolarization(GHepRecord *ev) const
const Kinematics & Kine(void) const
Definition: Interaction.h:71
virtual void AddToEventRecord(GHepRecord *ev, int pdgc, const TLorentzVector &p4) const
#define pINFO
Definition: Messenger.h:62
#define pWARN
Definition: Messenger.h:60
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
const InitialState & InitState(void) const
Definition: Interaction.h:69
#define pNOTICE
Definition: Messenger.h:61
double ProbeE(RefFrame_t rf) const
Initial State information.
Definition: InitialState.h:48

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