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::geometry::PointGeomAnalyzer Class Reference

The PointGeomAnalyzer class is the simplest implementation of the GeomAnalyserI interface and defines a simple 'point-like' geometry. More...

#include <PointGeomAnalyzer.h>

Inheritance diagram for genie::geometry::PointGeomAnalyzer:
Inheritance graph
[legend]
Collaboration diagram for genie::geometry::PointGeomAnalyzer:
Collaboration graph
[legend]

Public Member Functions

 PointGeomAnalyzer (int tgtpdgc)
 
 PointGeomAnalyzer (unsigned int n, const int tgt_pdg[], const double weight[])
 
 PointGeomAnalyzer (const map< int, double > &tgtmap)
 
 ~PointGeomAnalyzer ()
 
const PDGCodeListListOfTargetNuclei (void)
 
const PathLengthListComputeMaxPathLengths (void)
 
const PathLengthListComputePathLengths (const TLorentzVector &x, const TLorentzVector &p)
 
const TVector3 & GenerateVertex (const TLorentzVector &x, const TLorentzVector &p, int tgtpdg)
 
- Public Member Functions inherited from genie::GeomAnalyzerI
virtual ~GeomAnalyzerI ()
 

Private Member Functions

void Initialize (const map< int, double > &tgtmap)
 
void CleanUp (void)
 

Private Attributes

TVector3 * fCurrVertex
 current generated vertex More...
 
PathLengthListfCurrPathLengthList
 current list of path-lengths More...
 
PDGCodeListfCurrPDGCodeList
 current list of target nuclei More...
 

Additional Inherited Members

- Protected Member Functions inherited from genie::GeomAnalyzerI
 GeomAnalyzerI ()
 

Detailed Description

The PointGeomAnalyzer class is the simplest implementation of the GeomAnalyserI interface and defines a simple 'point-like' geometry.

     Use this geometry analyzer to generate events when you do not want
     to use a detailed GEANT/ROOT geometry description but you only need
     to generate events for a 'single' nuclear target while you still want
     to use the GENIE MC job driver 'loaded' with a GENIE flux driver.
     The geometry can also support a mix of targets, each with its
     corresponding weight.
Author
Costas Andreopoulos <c.andreopoulos cern.ch> University of Liverpool
Created:
July 14, 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 38 of file PointGeomAnalyzer.h.

Constructor & Destructor Documentation

PointGeomAnalyzer::PointGeomAnalyzer ( int  tgtpdgc)

Definition at line 33 of file PointGeomAnalyzer.cxx.

References Initialize().

33  :
35 {
36  map<int,double> tgtmap;
37  tgtmap.insert( map<int, double>::value_type(pdg, 1.) );
38 
39  this->Initialize(tgtmap);
40 }
void Initialize(const map< int, double > &tgtmap)
PointGeomAnalyzer::PointGeomAnalyzer ( unsigned int  n,
const int  tgt_pdg[],
const double  weight[] 
)

Definition at line 42 of file PointGeomAnalyzer.cxx.

References Initialize().

43  :
45 {
46  map<int,double> tgtmap;
47  for(unsigned int i=0; i<n; i++)
48  tgtmap.insert( map<int, double>::value_type(tgtpdgc[i], weight[i]) );
49 
50  this->Initialize(tgtmap);
51 }
void Initialize(const map< int, double > &tgtmap)
PointGeomAnalyzer::PointGeomAnalyzer ( const map< int, double > &  tgtmap)

Definition at line 53 of file PointGeomAnalyzer.cxx.

References Initialize().

53  :
55 {
56  this->Initialize(tgtmap);
57 }
void Initialize(const map< int, double > &tgtmap)
PointGeomAnalyzer::~PointGeomAnalyzer ( )

Definition at line 59 of file PointGeomAnalyzer.cxx.

References CleanUp().

60 {
61  this->CleanUp();
62 }

Member Function Documentation

void PointGeomAnalyzer::CleanUp ( void  )
private

Definition at line 116 of file PointGeomAnalyzer.cxx.

References fCurrPathLengthList, fCurrPDGCodeList, and fCurrVertex.

Referenced by ~PointGeomAnalyzer().

117 {
118  if( fCurrVertex ) delete fCurrVertex;
120  if( fCurrPDGCodeList ) delete fCurrPDGCodeList;
121 }
PDGCodeList * fCurrPDGCodeList
current list of target nuclei
TVector3 * fCurrVertex
current generated vertex
PathLengthList * fCurrPathLengthList
current list of path-lengths
const PathLengthList & PointGeomAnalyzer::ComputeMaxPathLengths ( void  )
virtual

Implements genie::GeomAnalyzerI.

Definition at line 72 of file PointGeomAnalyzer.cxx.

References fCurrPathLengthList.

73 {
74 // this is irrelevant for the 'point' geometry - return a path length of 1.
75 // for the only defined material
76 
77  return *fCurrPathLengthList;
78 }
PathLengthList * fCurrPathLengthList
current list of path-lengths
const PathLengthList & PointGeomAnalyzer::ComputePathLengths ( const TLorentzVector &  x,
const TLorentzVector &  p 
)
virtual

Implements genie::GeomAnalyzerI.

Definition at line 80 of file PointGeomAnalyzer.cxx.

References fCurrPathLengthList.

82 {
83 // this is irrelevant for the 'point' geometry - return a path length of 1.
84 // for the only defined material
85 
86  return *fCurrPathLengthList;
87 }
PathLengthList * fCurrPathLengthList
current list of path-lengths
const TVector3 & PointGeomAnalyzer::GenerateVertex ( const TLorentzVector &  x,
const TLorentzVector &  p,
int  tgtpdg 
)
virtual

Implements genie::GeomAnalyzerI.

Definition at line 89 of file PointGeomAnalyzer.cxx.

References fCurrVertex.

91 {
92 // this is irrelevant for the 'point' geometry - return a vtx at (0,0,0)
93 
94  return *fCurrVertex;
95 }
TVector3 * fCurrVertex
current generated vertex
void PointGeomAnalyzer::Initialize ( const map< int, double > &  tgtmap)
private

Definition at line 97 of file PointGeomAnalyzer.cxx.

References fCurrPathLengthList, fCurrPDGCodeList, fCurrVertex, LOG, pNOTICE, and genie::PDGCodeList::push_back().

Referenced by PointGeomAnalyzer().

98 {
99  fCurrVertex = new TVector3(0,0,0);
100 
102  fCurrPDGCodeList->clear();
103 
104  map<int,double>::const_iterator iter;
105  for(iter = tgtmap.begin(); iter != tgtmap.end(); ++iter) {
106  int tgtpdgc = iter->first;
107  fCurrPDGCodeList->push_back(tgtpdgc);
108  }
109 
110  fCurrPathLengthList = new PathLengthList(tgtmap);
111 
112  LOG("PointGeom", pNOTICE) << *fCurrPDGCodeList;
113  LOG("PointGeom", pNOTICE) << *fCurrPathLengthList;
114 }
PDGCodeList * fCurrPDGCodeList
current list of target nuclei
TVector3 * fCurrVertex
current generated vertex
A list of PDG codes.
Definition: PDGCodeList.h:32
PathLengthList * fCurrPathLengthList
current list of path-lengths
Object to be filled with the neutrino path-length, for all detector geometry materials, when starting from a position x and travelling along the direction of the neutrino 4-momentum.
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
#define pNOTICE
Definition: Messenger.h:61
void push_back(int pdg_code)
Definition: PDGCodeList.cxx:58
const PDGCodeList & PointGeomAnalyzer::ListOfTargetNuclei ( void  )
virtual

Implements genie::GeomAnalyzerI.

Definition at line 64 of file PointGeomAnalyzer.cxx.

References fCurrPDGCodeList.

65 {
66 // pdg code list contains a single code corresponding to the material passed
67 // at the geom analyser ctor
68 
69  return *fCurrPDGCodeList;
70 }
PDGCodeList * fCurrPDGCodeList
current list of target nuclei

Member Data Documentation

PathLengthList* genie::geometry::PointGeomAnalyzer::fCurrPathLengthList
private

current list of path-lengths

Definition at line 63 of file PointGeomAnalyzer.h.

Referenced by CleanUp(), ComputeMaxPathLengths(), ComputePathLengths(), and Initialize().

PDGCodeList* genie::geometry::PointGeomAnalyzer::fCurrPDGCodeList
private

current list of target nuclei

Definition at line 64 of file PointGeomAnalyzer.h.

Referenced by CleanUp(), Initialize(), and ListOfTargetNuclei().

TVector3* genie::geometry::PointGeomAnalyzer::fCurrVertex
private

current generated vertex

Definition at line 62 of file PointGeomAnalyzer.h.

Referenced by CleanUp(), GenerateVertex(), and Initialize().


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