CMS 3D CMS Logo

Public Member Functions | Private Attributes

CMSNeutronXS Class Reference

#include <CMSNeutronXS.h>

List of all members.

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.

                                                     :
  G4VPhysicsConstructor("Neutron XS"), verbose(ver) {}
CMSNeutronXS::~CMSNeutronXS ( ) [virtual]

Definition at line 17 of file CMSNeutronXS.cc.

{}

Member Function Documentation

void CMSNeutronXS::ConstructParticle ( ) [virtual]

Definition at line 19 of file CMSNeutronXS.cc.

{}
void CMSNeutronXS::ConstructProcess ( ) [virtual]

Definition at line 21 of file CMSNeutronXS.cc.

References i, and n.

                                    {

  G4NeutronInelasticXS* xinel = new G4NeutronInelasticXS();
  G4NeutronCaptureXS* xcap = new G4NeutronCaptureXS();

  const G4ParticleDefinition* neutron = G4Neutron::Neutron();
  if(verbose > 1) {
    G4cout << "### CMSNeutronXS: use alternative neutron X-sections"
           << G4endl;
  }

  G4ProcessVector* pv = neutron->GetProcessManager()->GetProcessList();
  G4int n = pv->size();
  G4HadronicProcess* had = 0;
  for(G4int i=0; i<n; i++) {
    if(fHadronInelastic == ((*pv)[i])->GetProcessSubType()) {
      had = static_cast<G4HadronicProcess*>((*pv)[i]);
      had->AddDataSet(xinel);
    } else if(fCapture == ((*pv)[i])->GetProcessSubType()) {
      had = static_cast<G4HadronicProcess*>((*pv)[i]);
      had->AddDataSet(xcap);
    }
  }
}

Member Data Documentation

G4int CMSNeutronXS::verbose [private]

Definition at line 18 of file CMSNeutronXS.h.