Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CexmcProductionModel Class Reference

#include <CexmcProductionModel.hh>

Inheritance diagram for CexmcProductionModel:
Collaboration diagram for CexmcProductionModel:

Public Member Functions

 CexmcProductionModel (const G4String &name="unspecified", G4bool fermiMotionIsOn=false)
 
virtual ~CexmcProductionModel ()
 
void ApplyFermiMotion (G4bool on, G4bool fromMessenger=true)
 
void SetAngularRange (G4double top, G4double bottom, G4int nmbOfDivs)
 
void SetAngularRanges (const CexmcAngularRangeList &angularRanges_)
 
void AddAngularRange (G4double top, G4double bottom, G4int nmbOfDivs)
 
void SetProductionModelData (const CexmcProductionModelData &productionModelData_)
 
void PrintInitialData (void) const
 
const CexmcAngularRangeListGetAngularRanges (void) const
 
const CexmcAngularRangeListGetTriggeredAngularRanges (void) const
 
const CexmcProductionModelDataGetProductionModelData (void) const
 
G4bool IsFermiMotionOn (void) const
 
void SetTriggeredAngularRanges (G4double opCosThetaSCM)
 
const G4StringGetName (void) const
 
G4ParticleDefinitionGetIncidentParticle (void) const
 
G4ParticleDefinitionGetNucleusParticle (void) const
 
G4ParticleDefinitionGetOutputParticle (void) const
 
G4ParticleDefinitionGetNucleusOutputParticle (void) const
 

Protected Member Functions

virtual void FermiMotionStatusChangeHook (void)
 

Protected Attributes

G4String name
 
G4bool fermiMotionIsOn
 
CexmcAngularRangeList angularRanges
 
CexmcAngularRangeList angularRangesRef
 
CexmcAngularRangeList triggeredAngularRanges
 
CexmcProductionModelData productionModelData
 
G4ParticleDefinitionincidentParticle
 
G4ParticleDefinitionnucleusParticle
 
G4ParticleDefinitionoutputParticle
 
G4ParticleDefinitionnucleusOutputParticle
 

Detailed Description

Definition at line 60 of file CexmcProductionModel.hh.

Constructor & Destructor Documentation

CexmcProductionModel::CexmcProductionModel ( const G4String name = "unspecified",
G4bool  fermiMotionIsOn = false 
)
explicit

Definition at line 49 of file CexmcProductionModel.cc.

50  :
52  nucleusParticle( NULL ), outputParticle( NULL ),
53  nucleusOutputParticle( NULL ), messenger( NULL )
54 {
55  angularRanges.push_back( CexmcAngularRange( 1.0, -1.0, 0 ) );
56  messenger = new CexmcProductionModelMessenger( this );
57 }
G4ParticleDefinition * nucleusOutputParticle
G4ParticleDefinition * nucleusParticle
G4ParticleDefinition * incidentParticle
CexmcAngularRangeList angularRanges
G4ParticleDefinition * outputParticle
CexmcProductionModel::~CexmcProductionModel ( )
virtual

Definition at line 60 of file CexmcProductionModel.cc.

61 {
62  delete messenger;
63 }

Member Function Documentation

void CexmcProductionModel::AddAngularRange ( G4double  top,
G4double  bottom,
G4int  nmbOfDivs 
)

Definition at line 90 of file CexmcProductionModel.cc.

92 {
93  if ( ! IsValidCandidateForAngularRange( top, bottom, nmbOfDivs ) )
95 
96  if ( ! IsGoodCandidateForAngularRange( top, bottom ) )
98 
99  G4int curIndex( angularRanges.size() );
100  G4double curBottom( top );
101  for ( int i( 0 ); i < nmbOfDivs; ++i )
102  {
103  G4double binWidth( ( top - bottom ) / nmbOfDivs );
104  G4double curTop( curBottom );
105  curBottom -= binWidth;
106  CexmcAngularRange aRange( curTop, curBottom, curIndex + i );
107  angularRanges.push_back( aRange );
108 #ifdef CEXMC_USE_ROOT
109  CexmcHistoManager::Instance()->AddARHistos( aRange );
110 #endif
111  }
112 }
int G4int
Definition: G4Types.hh:78
CexmcAngularRangeList angularRanges
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

void CexmcProductionModel::ApplyFermiMotion ( G4bool  on,
G4bool  fromMessenger = true 
)
inline

Definition at line 142 of file CexmcProductionModel.hh.

144 {
145  if ( fromMessenger )
147 
148  fermiMotionIsOn = on;
149 
151 }
virtual void FermiMotionStatusChangeHook(void)
void ThrowExceptionIfProjectIsRead(CexmcExceptionType type, G4bool extraCond=true)

Here is the call graph for this function:

Here is the caller graph for this function:

void CexmcProductionModel::FermiMotionStatusChangeHook ( void  )
protectedvirtual

Definition at line 129 of file CexmcProductionModel.cc.

130 {
131 }

Here is the caller graph for this function:

const CexmcAngularRangeList & CexmcProductionModel::GetAngularRanges ( void  ) const
inline

Definition at line 184 of file CexmcProductionModel.hh.

185 {
186  return angularRanges;
187 }
CexmcAngularRangeList angularRanges
G4ParticleDefinition * CexmcProductionModel::GetIncidentParticle ( void  ) const
inline

Definition at line 216 of file CexmcProductionModel.hh.

218 {
219  return incidentParticle;
220 }
G4ParticleDefinition * incidentParticle

Here is the caller graph for this function:

const G4String & CexmcProductionModel::GetName ( void  ) const
inline

Definition at line 210 of file CexmcProductionModel.hh.

211 {
212  return name;
213 }
G4ParticleDefinition * CexmcProductionModel::GetNucleusOutputParticle ( void  ) const
inline

Definition at line 237 of file CexmcProductionModel.hh.

239 {
240  return nucleusOutputParticle;
241 }
G4ParticleDefinition * nucleusOutputParticle

Here is the caller graph for this function:

G4ParticleDefinition * CexmcProductionModel::GetNucleusParticle ( void  ) const
inline

Definition at line 223 of file CexmcProductionModel.hh.

225 {
226  return nucleusParticle;
227 }
G4ParticleDefinition * nucleusParticle

Here is the caller graph for this function:

G4ParticleDefinition * CexmcProductionModel::GetOutputParticle ( void  ) const
inline

Definition at line 230 of file CexmcProductionModel.hh.

232 {
233  return outputParticle;
234 }
G4ParticleDefinition * outputParticle

Here is the caller graph for this function:

const CexmcProductionModelData & CexmcProductionModel::GetProductionModelData ( void  ) const
inline

Definition at line 198 of file CexmcProductionModel.hh.

199 {
200  return productionModelData;
201 }
CexmcProductionModelData productionModelData
const CexmcAngularRangeList & CexmcProductionModel::GetTriggeredAngularRanges ( void  ) const
inline

Definition at line 191 of file CexmcProductionModel.hh.

192 {
193  return triggeredAngularRanges;
194 }
CexmcAngularRangeList triggeredAngularRanges
G4bool CexmcProductionModel::IsFermiMotionOn ( void  ) const
inline

Definition at line 204 of file CexmcProductionModel.hh.

205 {
206  return fermiMotionIsOn;
207 }
void CexmcProductionModel::PrintInitialData ( void  ) const
inline

Definition at line 172 of file CexmcProductionModel.hh.

173 {
174  const char * fermiMotionMsg( "Fermi motion in the target is off" );
175  if ( fermiMotionIsOn )
176  fermiMotionMsg = "Fermi motion in the target is on";
177 
178  G4cout << CEXMC_LINE_START << fermiMotionMsg << G4endl;
179  G4cout << CEXMC_LINE_START << "Angular ranges:" << angularRanges;
180 }
G4GLOB_DLL std::ostream G4cout
#define CEXMC_LINE_START
Definition: CexmcCommon.hh:52
CexmcAngularRangeList angularRanges
#define G4endl
Definition: G4ios.hh:61
void CexmcProductionModel::SetAngularRange ( G4double  top,
G4double  bottom,
G4int  nmbOfDivs 
)

Definition at line 66 of file CexmcProductionModel.cc.

68 {
69  if ( ! IsValidCandidateForAngularRange( top, bottom, nmbOfDivs ) )
71 
72  if ( ! IsGoodCandidateForAngularRange( top, bottom ) )
74 
75  angularRanges.clear();
76  G4double curBottom( top );
77  for ( int i( 0 ); i < nmbOfDivs; ++i )
78  {
79  G4double binWidth( ( top - bottom ) / nmbOfDivs );
80  G4double curTop( curBottom );
81  curBottom -= binWidth;
82  angularRanges.push_back( CexmcAngularRange( curTop, curBottom, i ) );
83  }
84 #ifdef CEXMC_USE_ROOT
85  CexmcHistoManager::Instance()->SetupARHistos( angularRanges );
86 #endif
87 }
CexmcAngularRangeList angularRanges
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

void CexmcProductionModel::SetAngularRanges ( const CexmcAngularRangeList angularRanges_)
inline

Definition at line 154 of file CexmcProductionModel.hh.

156 {
157  angularRangesRef = angularRanges_;
159 #ifdef CEXMC_USE_ROOT
160  CexmcHistoManager::Instance()->SetupARHistos( angularRanges );
161 #endif
162 }
CexmcAngularRangeList angularRangesRef
CexmcAngularRangeList angularRanges
void CexmcProductionModel::SetProductionModelData ( const CexmcProductionModelData productionModelData_)
inline

Definition at line 165 of file CexmcProductionModel.hh.

167 {
168  productionModelData = productionModelData_;
169 }
CexmcProductionModelData productionModelData
void CexmcProductionModel::SetTriggeredAngularRanges ( G4double  opCosThetaSCM)

Definition at line 115 of file CexmcProductionModel.cc.

116 {
117  triggeredAngularRanges.clear();
118 
119  for ( CexmcAngularRangeList::iterator k( angularRanges.begin() );
120  k != angularRanges.end(); ++k )
121  {
122  if ( opCosThetaSCM <= k->top && opCosThetaSCM > k->bottom )
124  k->top, k->bottom, k->index ) );
125  }
126 }
CexmcAngularRangeList angularRanges
CexmcAngularRangeList triggeredAngularRanges

Member Data Documentation

CexmcAngularRangeList CexmcProductionModel::angularRanges
protected

Definition at line 120 of file CexmcProductionModel.hh.

CexmcAngularRangeList CexmcProductionModel::angularRangesRef
protected

Definition at line 122 of file CexmcProductionModel.hh.

G4bool CexmcProductionModel::fermiMotionIsOn
protected

Definition at line 118 of file CexmcProductionModel.hh.

G4ParticleDefinition* CexmcProductionModel::incidentParticle
protected

Definition at line 129 of file CexmcProductionModel.hh.

G4String CexmcProductionModel::name
protected

Definition at line 116 of file CexmcProductionModel.hh.

G4ParticleDefinition* CexmcProductionModel::nucleusOutputParticle
protected

Definition at line 135 of file CexmcProductionModel.hh.

G4ParticleDefinition* CexmcProductionModel::nucleusParticle
protected

Definition at line 131 of file CexmcProductionModel.hh.

G4ParticleDefinition* CexmcProductionModel::outputParticle
protected

Definition at line 133 of file CexmcProductionModel.hh.

CexmcProductionModelData CexmcProductionModel::productionModelData
protected

Definition at line 126 of file CexmcProductionModel.hh.

CexmcAngularRangeList CexmcProductionModel::triggeredAngularRanges
protected

Definition at line 124 of file CexmcProductionModel.hh.


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