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 "/cvmfs/nova.opensciencegrid.org/externals/genie/v3_00_06_p01/Linux64bit+2.6-2.12-e17-debug/GENIE-Generator/src/Tools/Geometry/PointGeomAnalyzer.h"

Inheritance diagram for genie::geometry::PointGeomAnalyzer:
genie::GeomAnalyzerI

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)
 

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

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 <costas.andreopoulos stfc.ac.uk> University of Liverpool & STFC Rutherford Appleton Lab

July 14, 2005

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

Definition at line 39 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 MECModelEnuComparisons::i, Initialize(), and getGoodRuns4SAM::n.

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)
const Var weight
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:33
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:97
#define pNOTICE
Definition: Messenger.h:62
void push_back(int pdg_code)
Definition: PDGCodeList.cxx:67
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 64 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 65 of file PointGeomAnalyzer.h.

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

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

current generated vertex

Definition at line 63 of file PointGeomAnalyzer.h.

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


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