Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/Geant4/G4MicroElecCrossSectionDataSet.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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