GENIEGenerator
Loading...
Searching...
No Matches
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:
[legend]
Collaboration diagram for genie::geometry::PointGeomAnalyzer:
[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
PathLengthListfCurrPathLengthList
 current list of path-lengths
PDGCodeListfCurrPDGCodeList
 current list of target nuclei

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 \at cern.ch> University of Liverpool
Created:\n July 14, 2005
License:\n Copyright (c) 2003-2025, 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() [1/3]

PointGeomAnalyzer::PointGeomAnalyzer ( int tgtpdgc)

Definition at line 33 of file PointGeomAnalyzer.cxx.

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(void)

References genie::GeomAnalyzerI::GeomAnalyzerI(), and Initialize().

◆ PointGeomAnalyzer() [2/3]

PointGeomAnalyzer::PointGeomAnalyzer ( unsigned int n,
const int tgt_pdg[],
const double weight[] )

Definition at line 42 of file PointGeomAnalyzer.cxx.

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}

References genie::GeomAnalyzerI::GeomAnalyzerI(), and Initialize().

◆ PointGeomAnalyzer() [3/3]

PointGeomAnalyzer::PointGeomAnalyzer ( const map< int, double > & tgtmap)

Definition at line 53 of file PointGeomAnalyzer.cxx.

53 :
55{
56 this->Initialize(tgtmap);
57}

References genie::GeomAnalyzerI::GeomAnalyzerI(), and Initialize().

◆ ~PointGeomAnalyzer()

PointGeomAnalyzer::~PointGeomAnalyzer ( )

Definition at line 59 of file PointGeomAnalyzer.cxx.

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

References CleanUp().

Member Function Documentation

◆ CleanUp()

void PointGeomAnalyzer::CleanUp ( void )
private

Definition at line 116 of file PointGeomAnalyzer.cxx.

117{
118 if( fCurrVertex ) delete fCurrVertex;
121}
PDGCodeList * fCurrPDGCodeList
current list of target nuclei
TVector3 * fCurrVertex
current generated vertex
PathLengthList * fCurrPathLengthList
current list of path-lengths

References fCurrPathLengthList, fCurrPDGCodeList, and fCurrVertex.

Referenced by ~PointGeomAnalyzer().

◆ ComputeMaxPathLengths()

const PathLengthList & PointGeomAnalyzer::ComputeMaxPathLengths ( void )
virtual

Implements genie::GeomAnalyzerI.

Definition at line 72 of file PointGeomAnalyzer.cxx.

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}

References fCurrPathLengthList.

◆ ComputePathLengths()

const PathLengthList & PointGeomAnalyzer::ComputePathLengths ( const TLorentzVector & x,
const TLorentzVector & p )
virtual

Implements genie::GeomAnalyzerI.

Definition at line 80 of file PointGeomAnalyzer.cxx.

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}

References fCurrPathLengthList.

◆ GenerateVertex()

const TVector3 & PointGeomAnalyzer::GenerateVertex ( const TLorentzVector & x,
const TLorentzVector & p,
int tgtpdg )
virtual

Implements genie::GeomAnalyzerI.

Definition at line 89 of file PointGeomAnalyzer.cxx.

91{
92// this is irrelevant for the 'point' geometry - return a vtx at (0,0,0)
93
94 return *fCurrVertex;
95}

References fCurrVertex.

◆ Initialize()

void PointGeomAnalyzer::Initialize ( const map< int, double > & tgtmap)
private

Definition at line 97 of file PointGeomAnalyzer.cxx.

98{
99 fCurrVertex = new TVector3(0,0,0);
100
101 fCurrPDGCodeList = new PDGCodeList;
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}
#define pNOTICE
Definition Messenger.h:61
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96

References fCurrPathLengthList, fCurrPDGCodeList, fCurrVertex, LOG, and pNOTICE.

◆ ListOfTargetNuclei()

const PDGCodeList & PointGeomAnalyzer::ListOfTargetNuclei ( void )
virtual

Implements genie::GeomAnalyzerI.

Definition at line 64 of file PointGeomAnalyzer.cxx.

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}

References fCurrPDGCodeList.

Member Data Documentation

◆ fCurrPathLengthList

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().

◆ fCurrPDGCodeList

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().

◆ fCurrVertex

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: