Geant4_10
G4LPhysicsFreeVector.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4LPhysicsFreeVector.cc 74256 2013-10-02 14:24:02Z gcosmo $
28 //
29 //
30 // --------------------------------------------------------------------
31 // Class G4LPhysicsFreeVector
32 // Derived from base class G4PhysicsVector
33 // This is a free vector for Low Energy Physics cross section data
34 //
35 // F.W. Jones, TRIUMF, 04-JUN-96
36 //
37 // Modified:
38 // 19 Jun. 2009, V.Ivanchenko : removed hidden bin
39 // 19 Jun. 2009, V.Ivanchenko : removed FindBinLocation
40 //
41 // --------------------------------------------------------------------
42 
43 #include "G4LPhysicsFreeVector.hh"
44 #include "G4SystemOfUnits.hh"
45 #include "G4ios.hh"
46 
47 // --------------------------------------------------------------------
48 
50  : G4PhysicsVector()
51 {
53 }
54 
55 // --------------------------------------------------------------------
56 
58  G4double binmin,
59  G4double binmax)
60  : G4PhysicsVector()
61 {
63 
64  edgeMin = binmin;
65  edgeMax = binmax;
66  numberOfNodes = nbin;
67  binVector.reserve(numberOfNodes);
68  dataVector.reserve(numberOfNodes);
69  for (size_t i=0; i<numberOfNodes; i++)
70  {
71  binVector.push_back(0.0);
72  dataVector.push_back(0.0);
73  }
74 }
75 
76 // --------------------------------------------------------------------
77 
79 {
80 }
81 
82 // --------------------------------------------------------------------
83 
85 {
86  for (size_t i = 0; i < numberOfNodes; i++)
87  {
88  G4cout << binVector[i] << " " << dataVector[i]/millibarn << G4endl;
89  }
90 }
91 
92 // --------------------------------------------------------------------
G4PVDataVector dataVector
G4PVDataVector binVector
int millibarn
Definition: hepunit.py:40
G4GLOB_DLL std::ostream G4cout
G4PhysicsVectorType type
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76