G4NeutronHPField.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 #ifndef G4NeutronHPField_h
00030 #define G4NeutronHPField_h 1
00031 
00032 #include "G4NeutronHPFieldPoint.hh"
00033 #include "G4PhysicsVector.hh"
00034 
00035 class G4NeutronHPField
00036 {
00037   public:
00038   
00039   G4NeutronHPField();
00040   
00041   ~G4NeutronHPField();
00042   
00043   inline void InitY(G4int i, G4int n)
00044   {
00045     Check(i);
00046     theData[i].InitY(n);
00047   }
00048   inline void SetData(G4int i, G4double x, G4int j, G4double y) 
00049   { 
00050     Check(i);
00051     theData[i].SetData(x, j, y);
00052   }
00053   inline void SetEnergy(G4int i, G4double e)
00054   {
00055     Check(i);
00056     theData[i].SetX(e);
00057   }
00058   inline void SetX(G4int i, G4double e)
00059   {
00060     Check(i);
00061     theData[i].SetX(e);
00062   }
00063   inline void SetY(G4int i, G4int j, G4double x)
00064   {
00065     Check(i);
00066     theData[i].SetY(j, x);
00067   }
00068   inline G4double GetEnergy(G4int i) { return theData[i].GetX(); }
00069   inline G4double GetX(G4int i) { return theData[i].GetX(); }
00070   inline G4double GetY(G4int i, G4int j) { return theData[i].GetY(j); }
00071   inline G4NeutronHPFieldPoint & GetPoint(G4int i) { return theData[i]; }
00072   
00073   G4double GetY(G4double e, G4int j);
00074 
00075   inline G4int GetFieldLength() {return nEntries;}
00076 
00077   void Dump();
00078 
00079   private:
00080   
00081   void Check(G4int i);
00082   
00083   G4NeutronHPFieldPoint * theData;
00084   G4int nEntries;
00085   G4int nPoints;
00086 };
00087 
00088 #endif

Generated on Mon May 27 17:49:01 2013 for Geant4 by  doxygen 1.4.7