Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:07

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: Riccardo Capra <capra@ge.infn.it>
0029 //
0030 // History:
0031 // -----------
0032 // 30 Jun 2005  RC                  Created
0033 // 14 Oct 2007  MGP                 Removed inheritance from concrete class G4ShellEMDataSet
0034 // 15 Jul 2009  N.A.Karakatsanis    New methods added for loading logarithmic data
0035 //                                  to enhance computing performance of interpolation
0036 //
0037 // -------------------------------------------------------------------
0038 
0039 // Class description:
0040 // Low Energy Electromagnetic Physics
0041 // Data set for an electromagnetic physics process
0042 // A strategy pattern is used to encapsulate algorithms for data interpolation
0043 // Further documentation available from http://www.ge.infn.it/geant4/lowE
0044 
0045 // -------------------------------------------------------------------
0046 
0047 #ifndef  G4DNACROSSSECTIONDATASET_HH
0048 #define  G4DNACROSSSECTIONDATASET_HH 1
0049 
0050 #include <CLHEP/Units/SystemOfUnits.h>
0051 
0052 #include "G4ShellEMDataSet.hh"
0053 
0054 class G4DNACrossSectionDataSet : public G4VEMDataSet
0055 { 
0056 
0057 public:
0058   G4DNACrossSectionDataSet() = delete;
0059   G4DNACrossSectionDataSet(G4VDataSetAlgorithm* algo, 
0060                G4double xUnit=CLHEP::MeV, 
0061                G4double dataUnit=CLHEP::barn);
0062 
0063   ~G4DNACrossSectionDataSet() override;
0064   
0065   G4DNACrossSectionDataSet(const G4DNACrossSectionDataSet & copy) = delete;
0066   G4DNACrossSectionDataSet& operator=(const G4DNACrossSectionDataSet & right) = delete;
0067 
0068   G4double FindValue(G4double e, G4int componentId=0) const override;
0069   
0070   void PrintData() const override;
0071 
0072   const G4VEMDataSet*  GetComponent(G4int componentId) const override 
0073   { return components[componentId]; }
0074 
0075   void AddComponent(G4VEMDataSet* dataSet) override 
0076   { components.push_back(dataSet); }
0077 
0078   size_t NumberOfComponents() const override 
0079   { return components.size(); }
0080 
0081   const G4DataVector& GetEnergies(G4int componentId) const override 
0082   { return GetComponent(componentId)->GetEnergies(0); }
0083 
0084   const G4DataVector& GetData(G4int componentId) const override 
0085   { return GetComponent(componentId)->GetData(0); }
0086 
0087   const G4DataVector& GetLogEnergies(G4int componentId) const override 
0088   { return GetComponent(componentId)->GetLogEnergies(0); }
0089 
0090   const G4DataVector& GetLogData(G4int componentId) const override 
0091   { return GetComponent(componentId)->GetLogData(0); }
0092 
0093   void SetEnergiesData(G4DataVector* x, G4DataVector* values, G4int componentId) override;
0094 
0095   void SetLogEnergiesData(G4DataVector* x,
0096                                   G4DataVector* values,
0097                                   G4DataVector* log_x, 
0098                                   G4DataVector* log_values,
0099                                   G4int componentId) override;
0100 
0101   G4bool LoadData(const G4String & argFileName) override;
0102   G4bool LoadNonLogData(const G4String & argFileName) override;
0103 
0104   G4bool SaveData(const G4String & argFileName) const override;
0105  
0106   G4double RandomSelect(G4int /*componentId */) const override { return -1.; };
0107 
0108 
0109   //   void CleanUpComponents();
0110    
0111 private:
0112 
0113   G4String FullFileName(const G4String & argFileName) const;
0114 
0115   std::vector<G4VEMDataSet*> components;          // Owned pointers
0116 
0117   G4int z;
0118 
0119   G4VDataSetAlgorithm* algorithm;           // Owned pointer 
0120   
0121   G4double unitEnergies;
0122   G4double unitData; 
0123 
0124   G4double GetUnitEnergies() const { return unitEnergies; }
0125   G4double GetUnitData() const { return unitData; }
0126   const G4VDataSetAlgorithm* GetAlgorithm() const { return algorithm; }
0127    
0128   void CleanUpComponents();
0129 
0130 
0131 };
0132 #endif /* G4DNACROSSSECTIONDATASET_HH */