Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:17:08

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 //
0028 // Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
0029 //
0030 // History:
0031 // -----------
0032 //  28 Nov 2001  Elena Guardincerri   Created
0033 //  2001 - 2009  Alfonso Mantero      Mantained
0034 // -------------------------------------------------------------------
0035 
0036 //for the documentation of this class see also G4EMDataSet class
0037 
0038 #ifndef FluoDataSet_hh
0039 #define FluoDataSet_hh 1
0040 
0041 #include <CLHEP/Units/SystemOfUnits.h>
0042 
0043 #include "globals.hh"
0044 #include "G4DataVector.hh"
0045 #include "G4VEMDataSet.hh"
0046 
0047 class G4VDataSetAlgorithm;
0048 
0049 class XrayFluoDataSet : public G4VEMDataSet {
0050 
0051 public:
0052 
0053   XrayFluoDataSet(G4int Z,
0054           G4DataVector* points, 
0055           G4DataVector* values,
0056           const G4VDataSetAlgorithm* interpolation,
0057           G4double unitE = CLHEP::MeV, G4double unitData = CLHEP::barn);
0058   
0059   XrayFluoDataSet(G4int Z,
0060           const G4String& dataFile,
0061           const G4VDataSetAlgorithm* interpolation,
0062           G4double unitE = CLHEP::MeV, G4double unitData = CLHEP::barn);
0063 
0064   ~XrayFluoDataSet();
0065  
0066   //find the value corresponding to the energy e in the set
0067   //identified by id
0068   G4double FindValue(G4double e, G4int) const;
0069 
0070   virtual const G4VEMDataSet* GetComponent(G4int) const { return 0;} 
0071 
0072   virtual void AddComponent(G4VEMDataSet*) { }
0073 
0074   virtual size_t NumberOfComponents() const { return 0; }
0075 
0076   virtual void SetEnergiesData(G4DataVector*, G4DataVector*, int
0077     = 0) {}
0078 
0079   virtual G4bool SaveData(const G4String&) const {return true;}
0080 
0081   virtual G4double RandomSelect(int = 0) const {return 0;}
0082 
0083   void PrintData() const;
0084 
0085   const G4DataVector& GetEnergies(G4int) const { return *energies; }
0086   const G4DataVector& GetData(G4int) const { return *data; }
0087   
0088   virtual const G4DataVector& GetLogEnergies(G4int ) const { return *energies; }
0089   virtual const G4DataVector& GetLogData(G4int ) const { return *data; }
0090   //  void SetEnergiesData(G4DataVector* x, G4DataVector* data, G4int component=0) {;}
0091   
0092   virtual void SetLogEnergiesData(G4DataVector* ,
0093                                   G4DataVector* ,
0094                                   G4DataVector* ,
0095                                   G4DataVector* ,
0096                                   G4int ) {;}
0097 
0098   virtual G4bool LoadNonLogData(const G4String& ) {return false;}
0099 
0100 //  G4bool SaveData(const G4String& fileName) const {return 0;}
0101 
0102 
0103 
0104 private:
0105 
0106 
0107   G4bool LoadData(const G4String& dataFile);
0108 
0109   G4int FindBinLocation(G4double energy) const;
0110 
0111   G4DataVector* energies; // Owned pointer
0112   G4DataVector* data;     // Owned pointer
0113 
0114   const G4VDataSetAlgorithm* algorithm; // Not owned pointer 
0115   
0116   G4double unit1;
0117   G4double unit2;
0118 
0119   size_t numberOfBins;
0120 
0121 };
0122 
0123 #endif