Import Geant4 10.0.0 source tree
This commit is contained in:
+14
-25
@@ -23,49 +23,38 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file hadronic/Hadr00/include/HistoMessenger.hh
|
||||
/// \brief Definition of the HistoMessenger class
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// $Id: ActionInitialization.hh 66241 2012-12-13 18:34:42Z gunter $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef HistoMessenger_h
|
||||
#define HistoMessenger_h 1
|
||||
#ifndef ActionInitialization_h
|
||||
#define ActionInitialization_h 1
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4VUserActionInitialization.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class Histo;
|
||||
class G4UIdirectory;
|
||||
class G4UIcommand;
|
||||
class G4UIcmdWithAString;
|
||||
class RunAction;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class HistoMessenger: public G4UImessenger
|
||||
class ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
|
||||
ActionInitialization();
|
||||
|
||||
HistoMessenger(Histo* );
|
||||
virtual ~HistoMessenger();
|
||||
virtual ~ActionInitialization();
|
||||
|
||||
virtual void SetNewValue(G4UIcommand* ,G4String );
|
||||
virtual void Build() const;
|
||||
|
||||
virtual void BuildForMaster() const;
|
||||
|
||||
private:
|
||||
|
||||
Histo* fHisto;
|
||||
|
||||
G4UIdirectory* fHistoDir;
|
||||
G4UIcmdWithAString* fFactoryCmd;
|
||||
G4UIcmdWithAString* fFileCmd;
|
||||
G4UIcommand* fHistoCmd;
|
||||
|
||||
RunAction* masterRunAction;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file hadronic/Hadr00/include/DetectorConstruction.hh
|
||||
/// \brief Definition of the DetectorConstruction class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: DetectorConstruction.hh 77254 2013-11-22 10:08:02Z gcosmo $
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -66,8 +66,6 @@ public:
|
||||
void SetTargetRadius(G4double val);
|
||||
void SetTargetLength(G4double val);
|
||||
|
||||
void UpdateGeometry();
|
||||
|
||||
private:
|
||||
|
||||
DetectorConstruction & operator=(const DetectorConstruction &right);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file hadronic/Hadr00/include/DetectorMessenger.hh
|
||||
/// \brief Definition of the DetectorMessenger class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: DetectorMessenger.hh 77254 2013-11-22 10:08:02Z gcosmo $
|
||||
//
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
@@ -74,17 +74,6 @@ private:
|
||||
G4UIcmdWithAString* fmat1Cmd;
|
||||
G4UIcmdWithADoubleAndUnit* frCmd;
|
||||
G4UIcmdWithADoubleAndUnit* flCmd;
|
||||
G4UIcmdWithAnInteger* fbinCmd;
|
||||
G4UIcmdWithAnInteger* fnOfAbsCmd;
|
||||
G4UIcmdWithAnInteger* fverbCmd;
|
||||
G4UIcmdWithAString* fcsCmd;
|
||||
G4UIcmdWithAString* fpartCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fe1Cmd;
|
||||
G4UIcmdWithADoubleAndUnit* fe2Cmd;
|
||||
G4UIcmdWithADoubleAndUnit* fp1Cmd;
|
||||
G4UIcmdWithADoubleAndUnit* fp2Cmd;
|
||||
G4UIcmdWithoutParameter* fupdateCmd;
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file hadronic/Hadr00/include/EventAction.hh
|
||||
/// \brief Definition of the EventAction class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: EventAction.hh 70760 2013-06-05 12:28:00Z gcosmo $
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -71,7 +71,7 @@ private:
|
||||
EventAction(const EventAction&);
|
||||
|
||||
EventActionMessenger* fEventMessenger;
|
||||
G4UImanager* UI;
|
||||
G4UImanager* fUI;
|
||||
std::vector<G4int> fSelectedEvents;
|
||||
|
||||
G4int fPrintModulo;
|
||||
@@ -81,10 +81,14 @@ private:
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline void EventAction::SetPrintModulo(G4int val)
|
||||
{
|
||||
fPrintModulo = val;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline void EventAction::AddEventToDebug(G4int val)
|
||||
{
|
||||
@@ -92,6 +96,8 @@ inline void EventAction::AddEventToDebug(G4int val)
|
||||
++fSelected;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file hadronic/Hadr00/include/EventActionMessenger.hh
|
||||
/// \brief Definition of the EventActionMessenger class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: EventActionMessenger.hh 68804 2013-04-05 14:01:29Z gcosmo $
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
@@ -1,142 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * 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. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file hadronic/Hadr00/include/Histo.hh
|
||||
/// \brief Definition of the Histo class
|
||||
//
|
||||
// $Id$
|
||||
|
||||
#ifndef Histo_h
|
||||
#define Histo_h 1
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: Histo
|
||||
//
|
||||
// Description: Utility class to hold and manipulate histograms/nTuples
|
||||
//
|
||||
// Author: V.Ivanchenko 30/10/03
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4DataVector.hh"
|
||||
#include <vector>
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class G4RootAnalysisManager;
|
||||
class HistoMessenger;
|
||||
|
||||
class Histo
|
||||
{
|
||||
public:
|
||||
|
||||
Histo();
|
||||
|
||||
~Histo();
|
||||
|
||||
// Book predefined histogramms
|
||||
void Book();
|
||||
|
||||
// Save histogramms to file
|
||||
void Save();
|
||||
|
||||
// In this method 1-D histogramms are predefined
|
||||
void Add1D(const G4String&, const G4String&, G4int nb, G4double x1,
|
||||
G4double x2, G4double u=1.);
|
||||
|
||||
// It change bins and boundaries
|
||||
void SetHisto1D(G4int, G4int, G4double, G4double, G4double);
|
||||
|
||||
// Histogram activation/deactivation
|
||||
void Activate(G4int, G4bool);
|
||||
|
||||
// Histogramms are filled
|
||||
void Fill(G4int, G4double, G4double);
|
||||
|
||||
// Histogramms are scaled
|
||||
void ScaleH1(G4int, G4double);
|
||||
|
||||
// In this method nTuple is booked
|
||||
void AddTuple(const G4String&);
|
||||
|
||||
// In this method nTuple is booked
|
||||
void AddTupleI(const G4String&);
|
||||
void AddTupleF(const G4String&);
|
||||
void AddTupleD(const G4String&);
|
||||
|
||||
// Fill nTuple parameter
|
||||
void FillTupleI(G4int, G4int);
|
||||
void FillTupleF(G4int, G4float);
|
||||
void FillTupleD(G4int, G4double);
|
||||
|
||||
// Save tuple event
|
||||
void AddRow();
|
||||
|
||||
// Set output file
|
||||
void SetFileName(const G4String&);
|
||||
void SetFileType(const G4String&);
|
||||
|
||||
inline void SetVerbose(G4int val) { fVerbose = val; };
|
||||
|
||||
inline G4bool IsActive() const { return fHistoActive; };
|
||||
|
||||
private:
|
||||
|
||||
G4RootAnalysisManager* fManager;
|
||||
HistoMessenger* fMessenger;
|
||||
|
||||
G4String fHistName;
|
||||
G4String fHistType;
|
||||
G4String fTupleName;
|
||||
G4String fTupleTitle;
|
||||
G4int fNHisto;
|
||||
G4int fVerbose;
|
||||
G4bool fDefaultAct;
|
||||
G4bool fHistoActive;
|
||||
G4bool fNtupleActive;
|
||||
|
||||
std::vector<G4int> fHisto;
|
||||
std::vector<G4int> fTupleI;
|
||||
std::vector<G4int> fTupleF;
|
||||
std::vector<G4int> fTupleD;
|
||||
std::vector<G4int> fBins;
|
||||
std::vector<G4bool> fActive;
|
||||
std::vector<G4double> fXmin;
|
||||
std::vector<G4double> fXmax;
|
||||
std::vector<G4double> fUnit;
|
||||
std::vector<G4String> fIds;
|
||||
std::vector<G4String> fTitles;
|
||||
std::vector<G4String> fNtupleI;
|
||||
std::vector<G4String> fNtupleF;
|
||||
std::vector<G4String> fNtupleD;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file hadronic/Hadr00/include/HistoManager.hh
|
||||
/// \brief Definition of the HistoManager class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: HistoManager.hh 75840 2013-11-06 17:28:38Z gcosmo $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
@@ -52,23 +52,20 @@
|
||||
#include "globals.hh"
|
||||
#include "G4Material.hh"
|
||||
|
||||
#include "g4root.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class Histo;
|
||||
class G4ParticleDefinition;
|
||||
class HistoManagerMessenger;
|
||||
|
||||
class HistoManager
|
||||
{
|
||||
public:
|
||||
|
||||
static HistoManager* GetPointer();
|
||||
|
||||
private:
|
||||
|
||||
HistoManager();
|
||||
|
||||
public:
|
||||
|
||||
~HistoManager();
|
||||
|
||||
void BeginOfRun();
|
||||
@@ -88,13 +85,12 @@ public:
|
||||
inline void SetMinMomentum(G4double val);
|
||||
inline void SetMaxMomentum(G4double val);
|
||||
|
||||
inline G4int GetVerbose() const;
|
||||
inline void SetHistoName(G4String& val);
|
||||
|
||||
private:
|
||||
|
||||
static HistoManager* fManager;
|
||||
|
||||
Histo* fHisto;
|
||||
HistoManagerMessenger* fMessenger;
|
||||
G4AnalysisManager* fAnalysisManager;
|
||||
|
||||
const G4ParticleDefinition* fNeutron;
|
||||
|
||||
@@ -110,7 +106,7 @@ private:
|
||||
G4int fBinsE;
|
||||
G4int fBinsP;
|
||||
|
||||
G4bool fIsInitialised;
|
||||
G4String fHistoName;
|
||||
};
|
||||
|
||||
inline void HistoManager::SetParticleName(const G4String& name)
|
||||
@@ -153,9 +149,9 @@ inline void HistoManager::SetMaxMomentum(G4double val)
|
||||
if(val>fMinMomentum) { fMaxMomentum = val; }
|
||||
}
|
||||
|
||||
inline G4int HistoManager::GetVerbose() const
|
||||
inline void HistoManager::SetHistoName(G4String& val)
|
||||
{
|
||||
return fVerbose;
|
||||
fHistoName = val;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * 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. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file hadronic/Hadr00/include/HistoManagerMessenger.hh
|
||||
/// \brief Definition of the HistoManagerMessenger class
|
||||
//
|
||||
// $Id: HistoManagerMessenger.hh 66241 2012-12-13 18:34:42Z gunter $
|
||||
//
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// HistoManagerMessenger
|
||||
//
|
||||
// Created: 20.06.08 V.Ivanchenko
|
||||
//
|
||||
// Modified:
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
#ifndef HistoManagerMessenger_h
|
||||
#define HistoManagerMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
class HistoManager;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithABool;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
class G4UIcmdWithoutParameter;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class HistoManagerMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
|
||||
HistoManagerMessenger(HistoManager* );
|
||||
virtual ~HistoManagerMessenger();
|
||||
|
||||
virtual void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
|
||||
HistoManager* fHisto;
|
||||
|
||||
G4UIcmdWithAnInteger* fbinCmd;
|
||||
G4UIcmdWithAnInteger* fnOfAbsCmd;
|
||||
G4UIcmdWithAnInteger* fverbCmd;
|
||||
G4UIcmdWithAString* fcsCmd;
|
||||
G4UIcmdWithAString* fpartCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fe1Cmd;
|
||||
G4UIcmdWithADoubleAndUnit* fe2Cmd;
|
||||
G4UIcmdWithADoubleAndUnit* fp1Cmd;
|
||||
G4UIcmdWithADoubleAndUnit* fp2Cmd;
|
||||
G4UIcmdWithAString* fFCmd;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file hadronic/Hadr00/include/PrimaryGeneratorAction.hh
|
||||
/// \brief Definition of the PrimaryGeneratorAction class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: PrimaryGeneratorAction.hh 68804 2013-04-05 14:01:29Z gcosmo $
|
||||
//
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file hadronic/Hadr00/include/RunAction.hh
|
||||
/// \brief Definition of the RunAction class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: RunAction.hh 75840 2013-11-06 17:28:38Z gcosmo $
|
||||
//
|
||||
|
||||
#ifndef RunAction_h
|
||||
@@ -49,6 +49,8 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class HistoManager;
|
||||
|
||||
class RunAction : public G4UserRunAction
|
||||
{
|
||||
public: // Without description
|
||||
@@ -64,6 +66,10 @@ public: // With description
|
||||
virtual void EndOfRunAction(const G4Run*);
|
||||
// In this method bookHisto method is called in which histogramms are filled
|
||||
|
||||
private:
|
||||
|
||||
HistoManager* fHisto;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user