Back to home page

EIC code displayed by LXR

 
 

    


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

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 //  MR - 04/04/2012
0027 //  Based on G4DNACrossSectionDataSet
0028 // 
0029 
0030 #ifndef  G4MICROELECCROSSSECTIONDATASET_NEW_HH
0031 #define  G4MICROELECCROSSSECTIONDATASET_NEW_HH 1
0032 
0033 #include <CLHEP/Units/SystemOfUnits.h>
0034 #include "G4ShellEMDataSet.hh"
0035 
0036 class G4MicroElecCrossSectionDataSet_new : public G4VEMDataSet
0037 { 
0038 public:
0039   explicit G4MicroElecCrossSectionDataSet_new(G4VDataSetAlgorithm* algo, 
0040                           G4double xUnit=CLHEP::MeV, 
0041                           G4double dataUnit=CLHEP::barn);
0042   ~G4MicroElecCrossSectionDataSet_new() override;
0043 
0044   G4double FindValue(G4double e, G4int componentId=0) const override;
0045   G4double FindShellValue(G4double argEnergy, G4int shell) const;
0046   void PrintData(void) const override;
0047   const G4VEMDataSet*  GetComponent(G4int componentId) const override 
0048     { return components[componentId]; }
0049   void AddComponent(G4VEMDataSet* dataSet) override 
0050     { components.push_back(dataSet); }
0051   size_t NumberOfComponents(void) const override
0052     { return components.size(); }
0053   const G4DataVector& GetEnergies(G4int componentId) const override 
0054     { return GetComponent(componentId)->GetEnergies(0); }
0055   const G4DataVector& GetData(G4int componentId) const override 
0056     { return GetComponent(componentId)->GetData(0); }
0057   const G4DataVector& GetLogEnergies(G4int componentId) const override
0058     { return GetComponent(componentId)->GetLogEnergies(0); }
0059   const G4DataVector& GetLogData(G4int componentId) const override
0060     { return GetComponent(componentId)->GetLogData(0); }
0061   void SetEnergiesData(G4DataVector* x, G4DataVector* values, G4int componentId) override;
0062   void SetLogEnergiesData(G4DataVector* x,
0063               G4DataVector* values,
0064               G4DataVector* log_x, 
0065               G4DataVector* log_values,
0066               G4int componentId) override;
0067   G4bool LoadData(const G4String & argFileName) override;
0068   G4bool LoadNonLogData(const G4String & argFileName) override;
0069   G4bool SaveData(const G4String & argFileName) const override;
0070   G4double RandomSelect(G4int /*componentId */) const  override
0071         { return -1.; };
0072 
0073   G4MicroElecCrossSectionDataSet_new(const G4MicroElecCrossSectionDataSet_new & copy) = delete;
0074   G4MicroElecCrossSectionDataSet_new& operator=(const G4MicroElecCrossSectionDataSet_new & right) = delete;
0075 
0076 private:
0077   G4String FullFileName(const G4String & argFileName) const;
0078   G4double GetUnitEnergies() const { return unitEnergies; }
0079   G4double GetUnitData() const { return unitData; }
0080   const G4VDataSetAlgorithm* GetAlgorithm() const { return algorithm; }
0081   void CleanUpComponents();
0082 
0083   std::vector<G4VEMDataSet*> components;          // Owned pointers
0084  
0085   G4VDataSetAlgorithm* algorithm;           // Owned pointer 
0086   G4double unitEnergies;
0087   G4double unitData; 
0088 };
0089 #endif