Files
geant4/examples/advanced/xray_fluorescence/include/XrayFluoRunAction.hh
T
2016-06-09 10:56:29 +02:00

124 lines
4.0 KiB
C++

//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: XrayFluoRunAction.hh
// GEANT4 tag $Name: xray_fluo-V03-02-00
//
// Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
//
// History:
// -----------
// 28 Nov 2001 Elena Guardincerri Created
//
// -------------------------------------------------------------------
#ifndef XrayFluoRunAction_h
#define XrayFluoRunAction_h 1
#include "G4UserRunAction.hh"
#include "globals.hh"
#include <map>
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class G4Run;
class XrayFluoDataSet;
class G4DataVector;
class XrayFluoRunAction : public G4UserRunAction
{
public:
XrayFluoRunAction();
~XrayFluoRunAction();
const XrayFluoDataSet* GetSet();
const XrayFluoDataSet* GetGammaSet();
const XrayFluoDataSet* GetAlphaSet();
// const XrayFluoDataSet* GetEfficiencySet();
G4DataVector* GetEnergies();
G4DataVector* GetData();
public:
void BeginOfRunAction(const G4Run*);
void EndOfRunAction(const G4Run*);
//returns the sum of the element of data
G4double GetDataSum();
//calulates the maximum integer contained in energy
//choose from dataMap and energyMap the set of values
//corresponding to the calculated integer
//returns a value of energy chosen randomly from this set
// G4double GetInfData(G4double energy, G4double random, G4int posIndex);
//calulates the minimum integer contained in energy
//choose from dataMap and energyMap the set of values
//corresponding to the calculated integer
//returns a value of energy chosen randomly from this set
// G4double GetSupData(G4double energy, G4double random, G4int posIndex);
private:
const XrayFluoDataSet* dataSet;
//stores the data of the incident gamma spectrum
const XrayFluoDataSet* dataGammaSet;
//stores the data of the incident alpha spectrum
const XrayFluoDataSet* dataAlphaSet;
//stores the data of the efficience of the detector
//const XrayFluoDataSet* efficiencySet;
//stores the energy data of the proton and alpha spectra
G4DataVector* energies;
//stores the data of the proton and alpha spectra
G4DataVector* data;
//stores the energy data (first column of the file) of the
//response function
//std::map<G4int,G4DataVector*,std::less<G4int> > energyMap;
//stores the values (second column of the file) of the
//response function
//std::map<G4int,G4DataVector*,std::less<G4int> > dataMap;
//read the data for protons and alpha spectra
void ReadData(G4double,G4String);
//read the data for the response function if the detector
//void ReadResponse(const G4String& fileName);
};
#endif