[819] | 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: G4HEPlot.hh,v 1.9 2006/06/29 20:29:37 gunter Exp $ |
---|
[962] | 28 | // GEANT4 tag $Name: geant4-09-02-ref-02 $ |
---|
[819] | 29 | // |
---|
| 30 | // |
---|
| 31 | // G4 Gheisha friend class G4HEPlot -- header file |
---|
| 32 | // last modified: H. Fesefeldt 18-November-1996 |
---|
| 33 | |
---|
| 34 | #include <stdio.h> |
---|
| 35 | #include "globals.hh" |
---|
| 36 | |
---|
| 37 | class G4HEPlot |
---|
| 38 | { |
---|
| 39 | public: |
---|
| 40 | G4double Xstart; |
---|
| 41 | G4double Xbin; |
---|
| 42 | G4double Weight; |
---|
| 43 | G4int Nbin; |
---|
| 44 | G4int Entries; |
---|
| 45 | G4int EntriesOverflow; |
---|
| 46 | G4int EntriesUnderflow; |
---|
| 47 | G4double WeightOverflow; |
---|
| 48 | G4double WeightUnderflow; |
---|
| 49 | G4double* Xvalue; |
---|
| 50 | G4double* Yvalue; |
---|
| 51 | |
---|
| 52 | G4HEPlot(){ }; |
---|
| 53 | |
---|
| 54 | ~G4HEPlot(){ }; |
---|
| 55 | |
---|
| 56 | G4double getWeight() |
---|
| 57 | { return Weight;}; |
---|
| 58 | |
---|
| 59 | G4double getWeightUnderflow() |
---|
| 60 | { return WeightUnderflow; }; |
---|
| 61 | |
---|
| 62 | G4double getWeightOverflow() |
---|
| 63 | { return WeightOverflow;}; |
---|
| 64 | |
---|
| 65 | G4int getNumberOfEntries() |
---|
| 66 | { return Entries;}; |
---|
| 67 | |
---|
| 68 | G4int getNumberOfEntriesOverflow() |
---|
| 69 | { return EntriesOverflow;}; |
---|
| 70 | |
---|
| 71 | G4int getNumberOfEntriesUnderflow() |
---|
| 72 | { return EntriesUnderflow;}; |
---|
| 73 | |
---|
| 74 | G4int getNumberOfBins() |
---|
| 75 | { return Nbin;}; |
---|
| 76 | |
---|
| 77 | G4double getBinsize() |
---|
| 78 | { return Xbin;}; |
---|
| 79 | |
---|
| 80 | G4double getXstart() |
---|
| 81 | { return Xstart;}; |
---|
| 82 | |
---|
| 83 | void Init(G4int nbin, G4double xstart, G4double Xbin); |
---|
| 84 | |
---|
| 85 | void Add( G4double s1, G4double s2, const G4HEPlot & p1, const G4HEPlot & p2 ); |
---|
| 86 | |
---|
| 87 | void Multiply( G4double s1, G4double s2, const G4HEPlot & p1, const G4HEPlot & p2 ); |
---|
| 88 | |
---|
| 89 | void Divide( G4double s1, G4double s2, const G4HEPlot & p1, const G4HEPlot & p2 ); |
---|
| 90 | |
---|
| 91 | void Scale( G4double s, const G4HEPlot & p); |
---|
| 92 | |
---|
| 93 | void XScale( G4double a, G4double b); |
---|
| 94 | |
---|
| 95 | void Shift( G4int nshift); |
---|
| 96 | |
---|
| 97 | void Log( G4double s, const G4HEPlot & p); |
---|
| 98 | |
---|
| 99 | void Sqrt( G4double s, const G4HEPlot & p); |
---|
| 100 | |
---|
| 101 | void Reset(); |
---|
| 102 | |
---|
| 103 | void LinearFit(G4double& a, G4double& b); |
---|
| 104 | |
---|
| 105 | void Fill(G4double x, G4double w); |
---|
| 106 | |
---|
| 107 | void Print(G4String name, G4int i); |
---|
| 108 | |
---|
| 109 | void DumpToFile(G4int aPlot, G4String aName); |
---|
| 110 | |
---|
| 111 | void GetFromFile(G4int aPlot, G4String aName); |
---|
| 112 | |
---|
| 113 | }; |
---|
| 114 | |
---|