CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
CMSNeutronXS Class Reference

#include <CMSNeutronXS.h>

Inheritance diagram for CMSNeutronXS:

Public Member Functions

 CMSNeutronXS (const G4String &nam, G4int ver)
 
virtual void ConstructParticle ()
 
virtual void ConstructProcess ()
 
virtual ~CMSNeutronXS ()
 

Private Attributes

G4int verbose
 

Detailed Description

Definition at line 7 of file CMSNeutronXS.h.

Constructor & Destructor Documentation

CMSNeutronXS::CMSNeutronXS ( const G4String &  nam,
G4int  ver 
)

Definition at line 14 of file CMSNeutronXS.cc.

14  :
15  G4VPhysicsConstructor("Neutron XS"), verbose(ver) {}
CMSNeutronXS::~CMSNeutronXS ( )
virtual

Definition at line 17 of file CMSNeutronXS.cc.

17 {}

Member Function Documentation

void CMSNeutronXS::ConstructParticle ( )
virtual

Definition at line 19 of file CMSNeutronXS.cc.

19 {}
void CMSNeutronXS::ConstructProcess ( )
virtual

Definition at line 21 of file CMSNeutronXS.cc.

References i, and n.

21  {
22 
23  G4NeutronInelasticXS* xinel = new G4NeutronInelasticXS();
24  G4NeutronCaptureXS* xcap = new G4NeutronCaptureXS();
25 
26  const G4ParticleDefinition* neutron = G4Neutron::Neutron();
27  if(verbose > 1) {
28  G4cout << "### CMSNeutronXS: use alternative neutron X-sections"
29  << G4endl;
30  }
31 
32  G4ProcessVector* pv = neutron->GetProcessManager()->GetProcessList();
33  G4int n = pv->size();
34  G4HadronicProcess* had = 0;
35  for(G4int i=0; i<n; i++) {
36  if(fHadronInelastic == ((*pv)[i])->GetProcessSubType()) {
37  had = static_cast<G4HadronicProcess*>((*pv)[i]);
38  had->AddDataSet(xinel);
39  } else if(fCapture == ((*pv)[i])->GetProcessSubType()) {
40  had = static_cast<G4HadronicProcess*>((*pv)[i]);
41  had->AddDataSet(xcap);
42  }
43  }
44 }
int i
Definition: DBlmapReader.cc:9

Member Data Documentation

G4int CMSNeutronXS::verbose
private

Definition at line 18 of file CMSNeutronXS.h.