Public Member Functions | Private Member Functions | List of all members
genie::DMETargetRemnantGenerator Class Reference

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

#include <DMETargetRemnantGenerator.h>

Inheritance diagram for genie::DMETargetRemnantGenerator:
genie::EventRecordVisitorI genie::Algorithm

Public Member Functions

 DMETargetRemnantGenerator ()
 
 DMETargetRemnantGenerator (string config)
 
 ~DMETargetRemnantGenerator ()
 
void ProcessEventRecord (GHepRecord *evrec) const
 
- Public Member Functions inherited from genie::EventRecordVisitorI
virtual ~EventRecordVisitorI ()
 
- Public Member Functions inherited from genie::Algorithm
virtual ~Algorithm ()
 
virtual void Configure (const Registry &config)
 
virtual void Configure (string config)
 
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 AddElectronNeutrino (GHepRecord *evrec) const
 
void AddTargetNucleusRemnant (GHepRecord *evrec) const
 

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::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::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 all the non-primary lepton final state particles in neutrino-electron events. Is a concrete implementation of the EventRecordVisitorI interface.

Author
Costas Andreopoulos <constantinos.andreopoulos cern.ch> University of Liverpool & STFC Rutherford Appleton Laboratory

July 17, 2005

Copyright (c) 2003-2020, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Definition at line 28 of file DMETargetRemnantGenerator.h.

Constructor & Destructor Documentation

DMETargetRemnantGenerator::DMETargetRemnantGenerator ( )

Definition at line 33 of file DMETargetRemnantGenerator.cxx.

33  :
34 EventRecordVisitorI("genie::DMETargetRemnantGenerator")
35 {
36 
37 }
DMETargetRemnantGenerator::DMETargetRemnantGenerator ( string  config)

Definition at line 39 of file DMETargetRemnantGenerator.cxx.

39  :
40 EventRecordVisitorI("genie::DMETargetRemnantGenerator", config)
41 {
42 
43 }
static Config * config
Definition: config.cpp:1054
DMETargetRemnantGenerator::~DMETargetRemnantGenerator ( )

Definition at line 45 of file DMETargetRemnantGenerator.cxx.

46 {
47 
48 }

Member Function Documentation

void DMETargetRemnantGenerator::AddElectronNeutrino ( GHepRecord evrec) const
private

Definition at line 56 of file DMETargetRemnantGenerator.cxx.

57 {
58  //-- Get all initial & final state particles 4-momenta (in the LAB frame)
59 
60  //incoming v:
61  GHepParticle * nu = evrec->Probe();
62 
63  //struck particle
64  GHepParticle * el = evrec->HitElectron();
65 
66  //final state primary lepton:
68 
69  assert(nu);
70  assert(el);
71  assert(l);
72 
73  //-- Force energy conservation
74  // Pv(Ev,pxv,pyv,pzv) + Pe(En,pxn,pyn,pzn) = Pfsl(El,pxl,pyl,pzl) + Px
75 
76  const TLorentzVector & p4v = *(nu->P4());
77  const TLorentzVector & p4e = *(el->P4());
78  const TLorentzVector & p4l = *(l->P4());
79  const TLorentzVector & p4 = p4v + p4e - p4l;
80 
81  //-- Vtx position
82  const TLorentzVector & vtx = *(nu->X4());
83 
84  LOG("DMETargetRemnant", pINFO) << "Adding final state lepton from e- vtx";
85 
86  const ProcessInfo & proc_info = evrec->Summary()->ProcInfo();
87  int mom = evrec->HitElectronPosition();
88  int pdgc = 0;
89  if (proc_info.IsDarkMatterElectronElastic()) pdgc = kPdgElectron;
90  assert(pdgc!=0);
91  evrec->AddParticle(
92  pdgc,kIStStableFinalState, mom,-1,-1,-1, p4, vtx);
93 }
bool IsDarkMatterElectronElastic(void) const
virtual GHepParticle * HitElectron(void) const
Definition: GHepRecord.cxx:316
virtual Interaction * Summary(void) const
Definition: GHepRecord.cxx:91
const TLorentzVector * P4(void) const
Definition: GHepParticle.h:78
const int kPdgElectron
Definition: PDGCodes.h:35
static QStrList * l
Definition: config.cpp:1044
virtual GHepParticle * Probe(void) const
Definition: GHepRecord.cxx:277
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
Definition: ProcessInfo.h:46
virtual GHepParticle * FinalStatePrimaryLepton(void) const
Definition: GHepRecord.cxx:326
#define pINFO
Definition: Messenger.h:62
virtual int HitElectronPosition(void) const
Definition: GHepRecord.cxx:433
const TLorentzVector * X4(void) const
Definition: GHepParticle.h:79
virtual void AddParticle(const GHepParticle &p)
Definition: GHepRecord.cxx:491
const ProcessInfo & ProcInfo(void) const
Definition: Interaction.h:70
STDHEP-like event record entry that can fit a particle or a nucleus.
Definition: GHepParticle.h:39
void DMETargetRemnantGenerator::AddTargetNucleusRemnant ( GHepRecord evrec) const
private

Definition at line 95 of file DMETargetRemnantGenerator.cxx.

97 {
98 // add the remnant nuclear target at the GHEP record
99 
100  LOG("DMETargetRemnant", pDEBUG) << "Adding final state nucleus";
101 
102  //-- get A,Z for initial state nucleus
103  Interaction * interaction = evrec->Summary();
104  const InitialState & init_state = interaction->InitState();
105 
106  bool is_nucleus = init_state.Tgt().IsNucleus();
107  if (!is_nucleus) {
108  LOG("DMETargetRemnant", pDEBUG)
109  << "Initial state not a nucleus - no remnant nucleus to add";
110  return;
111  }
112  int A = init_state.Tgt().A();
113  int Z = init_state.Tgt().Z();
114 
115  int ipdgc = pdg::IonPdgCode(A, Z);
116  double mass = PDGLibrary::Instance()->Find(ipdgc)->Mass();
117 
118  //-- Add the nucleus to the event record
119  LOG("DMETargetRemnant", pINFO)
120  << "Adding nucleus [A = " << A << ", Z = " << Z
121  << ", pdgc = " << ipdgc << "]";
122 
123  int mom = evrec->TargetNucleusPosition();
124  evrec->AddParticle(
125  ipdgc,kIStStableFinalState, mom,-1,-1,-1, 0,0,0,mass, 0,0,0,0);
126 }
virtual Interaction * Summary(void) const
Definition: GHepRecord.cxx:91
int A(void) const
Definition: Target.h:70
bool IsNucleus(void) const
Definition: Target.cxx:272
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
int Z(void) const
Definition: Target.h:68
#define pINFO
Definition: Messenger.h:62
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:57
int IonPdgCode(int A, int Z)
Definition: PDGUtils.cxx:68
#define A
Definition: memgrp.cpp:38
virtual void AddParticle(const GHepParticle &p)
Definition: GHepRecord.cxx:491
const InitialState & InitState(void) const
Definition: Interaction.h:69
TParticlePDG * Find(int pdgc, bool must_exist=true)
Definition: PDGLibrary.cxx:75
const Target & Tgt(void) const
Definition: InitialState.h:66
virtual int TargetNucleusPosition(void) const
Definition: GHepRecord.cxx:362
Initial State information.
Definition: InitialState.h:48
#define pDEBUG
Definition: Messenger.h:63
void DMETargetRemnantGenerator::ProcessEventRecord ( GHepRecord evrec) const
virtual

Implements genie::EventRecordVisitorI.

Definition at line 50 of file DMETargetRemnantGenerator.cxx.

51 {
52  this -> AddElectronNeutrino (evrec);
53  this -> AddTargetNucleusRemnant (evrec);
54 }
void AddTargetNucleusRemnant(GHepRecord *evrec) const
void AddElectronNeutrino(GHepRecord *evrec) const

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