Import Geant4 9.4.0 source tree
This commit is contained in:
@@ -1,75 +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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: AnaEx01AnalysisManager.hh,v 1.9 2006/06/29 16:33:15 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef AnaEx01AnalysisManager_h
|
||||
#define AnaEx01AnalysisManager_h 1
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
|
||||
class G4Run;
|
||||
class G4Event;
|
||||
class G4Step;
|
||||
|
||||
namespace AIDA {
|
||||
class IAnalysisFactory;
|
||||
class ITree;
|
||||
class IHistogram1D;
|
||||
class ITuple;
|
||||
}
|
||||
|
||||
class AnaEx01AnalysisManager {
|
||||
public:
|
||||
AnaEx01AnalysisManager(AIDA::IAnalysisFactory*);
|
||||
virtual ~AnaEx01AnalysisManager();
|
||||
public:
|
||||
virtual void BeginOfRun(const G4Run*);
|
||||
virtual void EndOfRun(const G4Run*);
|
||||
virtual void BeginOfEvent(const G4Event*);
|
||||
virtual void EndOfEvent(const G4Event*);
|
||||
virtual void Step(const G4Step*);
|
||||
private:
|
||||
int fCalorimeterCollID;
|
||||
AIDA::IAnalysisFactory* fAIDA;
|
||||
AIDA::ITree* fTree;
|
||||
AIDA::IHistogram1D* fEAbs;
|
||||
AIDA::IHistogram1D* fLAbs;
|
||||
AIDA::IHistogram1D* fEGap;
|
||||
AIDA::IHistogram1D* fLGap;
|
||||
AIDA::ITuple* fTuple;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
class AnaEx01AnalysisManager;
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,101 +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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: AnaEx01CalorHit.hh,v 1.4 2006/06/29 16:33:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef AnaEx01CalorHit_h
|
||||
#define AnaEx01CalorHit_h 1
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class AnaEx01CalorHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
|
||||
AnaEx01CalorHit();
|
||||
~AnaEx01CalorHit();
|
||||
AnaEx01CalorHit(const AnaEx01CalorHit&);
|
||||
const AnaEx01CalorHit& operator=(const AnaEx01CalorHit&);
|
||||
int operator==(const AnaEx01CalorHit&) const;
|
||||
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
|
||||
void Draw();
|
||||
void Print();
|
||||
|
||||
public:
|
||||
|
||||
void AddAbs(G4double de, G4double dl) {EdepAbs += de; TrackLengthAbs += dl;};
|
||||
void AddGap(G4double de, G4double dl) {EdepGap += de; TrackLengthGap += dl;};
|
||||
|
||||
G4double GetEdepAbs() { return EdepAbs; };
|
||||
G4double GetTrakAbs() { return TrackLengthAbs; };
|
||||
G4double GetEdepGap() { return EdepGap; };
|
||||
G4double GetTrakGap() { return TrackLengthGap; };
|
||||
|
||||
private:
|
||||
|
||||
G4double EdepAbs, TrackLengthAbs;
|
||||
G4double EdepGap, TrackLengthGap;
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
typedef G4THitsCollection<AnaEx01CalorHit> AnaEx01CalorHitsCollection;
|
||||
|
||||
extern G4Allocator<AnaEx01CalorHit> AnaEx01CalorHitAllocator;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline void* AnaEx01CalorHit::operator new(size_t)
|
||||
{
|
||||
void* aHit;
|
||||
aHit = (void*) AnaEx01CalorHitAllocator.MallocSingle();
|
||||
return aHit;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline void AnaEx01CalorHit::operator delete(void* aHit)
|
||||
{
|
||||
AnaEx01CalorHitAllocator.FreeSingle((AnaEx01CalorHit*) aHit);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,52 +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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: AnaEx01EventAction.hh,v 1.6 2006/06/29 16:33:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef AnaEx01EventAction_h
|
||||
#define AnaEx01EventAction_h
|
||||
|
||||
#include "G4UserEventAction.hh"
|
||||
|
||||
class AnaEx01AnalysisManager;
|
||||
|
||||
class AnaEx01EventAction : public G4UserEventAction {
|
||||
public:
|
||||
AnaEx01EventAction(AnaEx01AnalysisManager* = 0);
|
||||
virtual ~AnaEx01EventAction();
|
||||
public:
|
||||
virtual void BeginOfEventAction(const G4Event*);
|
||||
virtual void EndOfEventAction(const G4Event*);
|
||||
private:
|
||||
AnaEx01AnalysisManager* fAnalysisManager;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,87 +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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: AnaEx01PhysicsList.hh,v 1.4 2006/06/29 16:33:29 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef AnaEx01PhysicsList_h
|
||||
#define AnaEx01PhysicsList_h 1
|
||||
|
||||
#include "G4VUserPhysicsList.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class AnaEx01PhysicsList: public G4VUserPhysicsList
|
||||
{
|
||||
public:
|
||||
AnaEx01PhysicsList();
|
||||
~AnaEx01PhysicsList();
|
||||
|
||||
protected:
|
||||
// Construct particle and physics
|
||||
void ConstructParticle();
|
||||
void ConstructProcess();
|
||||
|
||||
void SetCuts();
|
||||
|
||||
public:
|
||||
// Set/Get cut values
|
||||
void SetCutForGamma(G4double);
|
||||
void SetCutForElectron(G4double);
|
||||
void SetCutForProton(G4double);
|
||||
G4double GetCutForGamma() const;
|
||||
G4double GetCutForElectron() const;
|
||||
G4double GetCutForProton() const;
|
||||
|
||||
protected:
|
||||
// these methods Construct particles
|
||||
void ConstructBosons();
|
||||
void ConstructLeptons();
|
||||
void ConstructMesons();
|
||||
void ConstructBaryons();
|
||||
|
||||
protected:
|
||||
// these methods Construct physics processes and register them
|
||||
void ConstructGeneral();
|
||||
void ConstructEM();
|
||||
|
||||
private:
|
||||
G4double cutForGamma;
|
||||
G4double cutForElectron;
|
||||
G4double cutForProton;
|
||||
G4double currentDefaultCut;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1,61 +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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: AnaEx01SteppingVerbose.hh,v 1.4 2006/06/29 16:33:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// AnaEx01SteppingVerbose.hh
|
||||
//
|
||||
// Description:
|
||||
// This class manages the verbose outputs in G4SteppingManager.
|
||||
// It inherits from G4SteppingVerbose
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
class AnaEx01SteppingVerbose;
|
||||
|
||||
#ifndef AnaEx01SteppingVerbose_h
|
||||
#define AnaEx01SteppingVerbose_h 1
|
||||
|
||||
#include "G4SteppingVerbose.hh"
|
||||
|
||||
class AnaEx01SteppingVerbose : public G4SteppingVerbose {
|
||||
public:
|
||||
// Constructor/Destructor
|
||||
AnaEx01SteppingVerbose();
|
||||
~AnaEx01SteppingVerbose();
|
||||
//
|
||||
void StepInfo();
|
||||
void TrackingStarted();
|
||||
//
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
+16
-21
@@ -24,16 +24,16 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: AnaEx01DetectorConstruction.hh,v 1.4 2006/06/29 16:33:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: DetectorConstruction.hh,v 1.1 2010/11/08 10:38:44 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef AnaEx01DetectorConstruction_h
|
||||
#define AnaEx01DetectorConstruction_h 1
|
||||
#ifndef DetectorConstruction_h
|
||||
#define DetectorConstruction_h 1
|
||||
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "globals.hh"
|
||||
@@ -42,18 +42,16 @@ class G4Box;
|
||||
class G4LogicalVolume;
|
||||
class G4VPhysicalVolume;
|
||||
class G4Material;
|
||||
class G4UniformMagField;
|
||||
class AnaEx01DetectorMessenger;
|
||||
class AnaEx01CalorimeterSD;
|
||||
class DetectorMessenger;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class AnaEx01DetectorConstruction : public G4VUserDetectorConstruction
|
||||
class DetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
|
||||
AnaEx01DetectorConstruction();
|
||||
~AnaEx01DetectorConstruction();
|
||||
DetectorConstruction();
|
||||
~DetectorConstruction();
|
||||
|
||||
public:
|
||||
|
||||
@@ -65,8 +63,6 @@ class AnaEx01DetectorConstruction : public G4VUserDetectorConstruction
|
||||
|
||||
void SetCalorSizeYZ(G4double);
|
||||
void SetNbOfLayers (G4int);
|
||||
|
||||
void SetMagField(G4double);
|
||||
|
||||
G4VPhysicalVolume* Construct();
|
||||
|
||||
@@ -132,10 +128,7 @@ class AnaEx01DetectorConstruction : public G4VUserDetectorConstruction
|
||||
G4LogicalVolume* logicGap; //pointer to the logical Gap
|
||||
G4VPhysicalVolume* physiGap; //pointer to the physical Gap
|
||||
|
||||
G4UniformMagField* magField; //pointer to the magnetic field
|
||||
|
||||
AnaEx01DetectorMessenger* detectorMessenger; //pointer to the Messenger
|
||||
AnaEx01CalorimeterSD* calorimeterSD; //pointer to the sensitive detector
|
||||
DetectorMessenger* detectorMessenger; //pointer to the Messenger
|
||||
|
||||
private:
|
||||
|
||||
@@ -144,9 +137,9 @@ class AnaEx01DetectorConstruction : public G4VUserDetectorConstruction
|
||||
G4VPhysicalVolume* ConstructCalorimeter();
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline void AnaEx01DetectorConstruction::ComputeCalorParameters()
|
||||
inline void DetectorConstruction::ComputeCalorParameters()
|
||||
{
|
||||
// Compute derived parameters of the calorimeter
|
||||
LayerThickness = AbsorberThickness + GapThickness;
|
||||
@@ -155,5 +148,7 @@ inline void AnaEx01DetectorConstruction::ComputeCalorParameters()
|
||||
WorldSizeX = 1.2*CalorThickness; WorldSizeYZ = 1.2*CalorSizeYZ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
+16
-14
@@ -24,50 +24,52 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: AnaEx01DetectorMessenger.hh,v 1.4 2006/06/29 16:33:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: DetectorMessenger.hh,v 1.1 2010/11/08 10:38:44 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef AnaEx01DetectorMessenger_h
|
||||
#define AnaEx01DetectorMessenger_h 1
|
||||
#ifndef DetectorMessenger_h
|
||||
#define DetectorMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
class AnaEx01DetectorConstruction;
|
||||
class DetectorConstruction;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
class G4UIcmdWithoutParameter;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class AnaEx01DetectorMessenger: public G4UImessenger
|
||||
class DetectorMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
AnaEx01DetectorMessenger(AnaEx01DetectorConstruction* );
|
||||
~AnaEx01DetectorMessenger();
|
||||
DetectorMessenger(DetectorConstruction* );
|
||||
~DetectorMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
AnaEx01DetectorConstruction* AnaEx01Detector;
|
||||
DetectorConstruction* Detector;
|
||||
|
||||
G4UIdirectory* AnaEx01detDir;
|
||||
G4UIdirectory* N03Dir;
|
||||
G4UIdirectory* detDir;
|
||||
G4UIcmdWithAString* AbsMaterCmd;
|
||||
G4UIcmdWithAString* GapMaterCmd;
|
||||
G4UIcmdWithADoubleAndUnit* AbsThickCmd;
|
||||
G4UIcmdWithADoubleAndUnit* GapThickCmd;
|
||||
G4UIcmdWithADoubleAndUnit* SizeYZCmd;
|
||||
G4UIcmdWithAnInteger* NbLayersCmd;
|
||||
G4UIcmdWithADoubleAndUnit* MagFieldCmd;
|
||||
G4UIcmdWithoutParameter* UpdateCmd;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: EventAction.hh,v 1.1 2010/11/08 10:38:44 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef EventAction_h
|
||||
#define EventAction_h 1
|
||||
|
||||
#include "G4UserEventAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class RunAction;
|
||||
class HistoManager;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class EventAction : public G4UserEventAction
|
||||
{
|
||||
public:
|
||||
EventAction(RunAction*, HistoManager*);
|
||||
virtual ~EventAction();
|
||||
|
||||
void BeginOfEventAction(const G4Event*);
|
||||
void EndOfEventAction(const G4Event*);
|
||||
|
||||
void AddAbs(G4double de, G4double dl) {EnergyAbs += de; TrackLAbs += dl;};
|
||||
void AddGap(G4double de, G4double dl) {EnergyGap += de; TrackLGap += dl;};
|
||||
|
||||
private:
|
||||
RunAction* runAct;
|
||||
HistoManager* histoManager;
|
||||
|
||||
G4double EnergyAbs, EnergyGap;
|
||||
G4double TrackLAbs, TrackLGap;
|
||||
|
||||
G4int printModulo;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+38
-27
@@ -23,46 +23,57 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: HistoManager.hh,v 1.1 2010/11/08 10:38:44 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// $Id: AnaEx01PrimaryGeneratorAction.hh,v 1.4 2006/06/29 16:33:31 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
#ifndef HistoManager_h
|
||||
#define HistoManager_h 1
|
||||
|
||||
#ifndef AnaEx01PrimaryGeneratorAction_h
|
||||
#define AnaEx01PrimaryGeneratorAction_h 1
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4ParticleGun;
|
||||
class G4Event;
|
||||
class AnaEx01DetectorConstruction;
|
||||
class AnaEx01PrimaryGeneratorMessenger;
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
namespace AIDA {
|
||||
class IAnalysisFactory;
|
||||
class ITree;
|
||||
class IHistogram1D;
|
||||
class ITuple;
|
||||
}
|
||||
const G4int MaxHisto = 5;
|
||||
|
||||
class AnaEx01PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class HistoManager
|
||||
{
|
||||
public:
|
||||
AnaEx01PrimaryGeneratorAction(AnaEx01DetectorConstruction*);
|
||||
~AnaEx01PrimaryGeneratorAction();
|
||||
|
||||
HistoManager();
|
||||
~HistoManager();
|
||||
|
||||
void book();
|
||||
void save();
|
||||
|
||||
public:
|
||||
void GeneratePrimaries(G4Event*);
|
||||
void SetRndmFlag(G4String val) { rndmFlag = val;}
|
||||
void FillHisto(G4int id, G4double bin, G4double weight = 1.0);
|
||||
void Normalize(G4int id, G4double fac);
|
||||
|
||||
private:
|
||||
G4ParticleGun* particleGun; //pointer a to G4 service class
|
||||
AnaEx01DetectorConstruction* AnaEx01Detector; //pointer to the geometry
|
||||
void FillNtuple(G4int column, G4double value);
|
||||
void AddRowNtuple();
|
||||
|
||||
AnaEx01PrimaryGeneratorMessenger* gunMessenger; //messenger of this class
|
||||
G4String rndmFlag; //flag for a random impact point
|
||||
void PrintStatistic();
|
||||
|
||||
private:
|
||||
|
||||
AIDA::IAnalysisFactory* af;
|
||||
AIDA::ITree* tree;
|
||||
|
||||
AIDA::IHistogram1D* histo[MaxHisto];
|
||||
AIDA::ITuple* ntupl;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+28
-21
@@ -24,37 +24,44 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: AnaEx01PrimaryGeneratorMessenger.hh,v 1.4 2006/06/29 16:33:33 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: PhysicsList.hh,v 1.1 2010/11/08 10:38:44 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef AnaEx01PrimaryGeneratorMessenger_h
|
||||
#define AnaEx01PrimaryGeneratorMessenger_h 1
|
||||
#ifndef PhysicsList_h
|
||||
#define PhysicsList_h 1
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#include "G4VUserPhysicsList.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class AnaEx01PrimaryGeneratorAction;
|
||||
class G4UIcmdWithAString;
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class AnaEx01PrimaryGeneratorMessenger: public G4UImessenger
|
||||
class PhysicsList: public G4VUserPhysicsList
|
||||
{
|
||||
public:
|
||||
AnaEx01PrimaryGeneratorMessenger(AnaEx01PrimaryGeneratorAction*);
|
||||
~AnaEx01PrimaryGeneratorMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
AnaEx01PrimaryGeneratorAction* AnaEx01Action;
|
||||
G4UIcmdWithAString* RndmCmd;
|
||||
public:
|
||||
PhysicsList();
|
||||
virtual ~PhysicsList();
|
||||
|
||||
// Construct particle and physics
|
||||
void ConstructParticle();
|
||||
void ConstructProcess();
|
||||
|
||||
void SetCuts();
|
||||
|
||||
private:
|
||||
|
||||
// these methods Construct physics processes and register them
|
||||
void ConstructDecay();
|
||||
void ConstructEM();
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
+22
-28
@@ -24,47 +24,41 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: AnaEx01CalorimeterSD.hh,v 1.4 2006/06/29 16:33:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: PrimaryGeneratorAction.hh,v 1.1 2010/11/08 10:38:44 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef AnaEx01CalorimeterSD_h
|
||||
#define AnaEx01CalorimeterSD_h 1
|
||||
#ifndef PrimaryGeneratorAction_h
|
||||
#define PrimaryGeneratorAction_h 1
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class AnaEx01DetectorConstruction;
|
||||
class G4HCofThisEvent;
|
||||
class G4Step;
|
||||
#include "AnaEx01CalorHit.hh"
|
||||
class G4ParticleGun;
|
||||
class G4Event;
|
||||
class DetectorConstruction;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class AnaEx01CalorimeterSD : public G4VSensitiveDetector
|
||||
class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
|
||||
AnaEx01CalorimeterSD(G4String, AnaEx01DetectorConstruction* );
|
||||
~AnaEx01CalorimeterSD();
|
||||
public:
|
||||
PrimaryGeneratorAction(DetectorConstruction*);
|
||||
virtual ~PrimaryGeneratorAction();
|
||||
|
||||
void Initialize(G4HCofThisEvent*);
|
||||
G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
void EndOfEvent(G4HCofThisEvent*);
|
||||
void clear();
|
||||
void DrawAll();
|
||||
void PrintAll();
|
||||
void GeneratePrimaries(G4Event*);
|
||||
|
||||
private:
|
||||
|
||||
AnaEx01CalorHitsCollection* CalCollection;
|
||||
AnaEx01DetectorConstruction* Detector;
|
||||
G4int* HitID;
|
||||
private:
|
||||
G4ParticleGun* particleGun; //pointer a to G4 class
|
||||
DetectorConstruction* Detector; //pointer to the geometry
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+30
-11
@@ -24,28 +24,47 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: AnaEx01RunAction.hh,v 1.6 2006/06/29 16:33:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: RunAction.hh,v 1.1 2010/11/08 10:38:44 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef AnaEx01RunAction_h
|
||||
#define AnaEx01RunAction_h
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef RunAction_h
|
||||
#define RunAction_h 1
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class AnaEx01AnalysisManager;
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class AnaEx01RunAction : public G4UserRunAction {
|
||||
public:
|
||||
AnaEx01RunAction(AnaEx01AnalysisManager* = 0);
|
||||
~AnaEx01RunAction();
|
||||
class G4Run;
|
||||
class HistoManager;
|
||||
|
||||
class RunAction : public G4UserRunAction
|
||||
{
|
||||
public:
|
||||
RunAction(HistoManager*);
|
||||
virtual ~RunAction();
|
||||
|
||||
void BeginOfRunAction(const G4Run*);
|
||||
void EndOfRunAction(const G4Run*);
|
||||
void EndOfRunAction(const G4Run*);
|
||||
|
||||
void fillPerEvent(G4double, G4double, G4double, G4double);
|
||||
|
||||
private:
|
||||
AnaEx01AnalysisManager* fAnalysisManager;
|
||||
HistoManager* histoManager;
|
||||
|
||||
G4double sumEAbs, sum2EAbs;
|
||||
G4double sumEGap, sum2EGap;
|
||||
|
||||
G4double sumLAbs, sum2LAbs;
|
||||
G4double sumLGap, sum2LGap;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
+22
-10
@@ -24,25 +24,37 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: AnaEx01SteppingAction.hh,v 1.6 2006/06/29 16:33:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: SteppingAction.hh,v 1.1 2010/11/08 10:38:44 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef AnaEx01SteppingAction_h
|
||||
#define AnaEx01SteppingAction_h
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef SteppingAction_h
|
||||
#define SteppingAction_h 1
|
||||
|
||||
#include "G4UserSteppingAction.hh"
|
||||
|
||||
class AnaEx01AnalysisManager;
|
||||
class DetectorConstruction;
|
||||
class EventAction;
|
||||
|
||||
class AnaEx01SteppingAction : public G4UserSteppingAction {
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class SteppingAction : public G4UserSteppingAction
|
||||
{
|
||||
public:
|
||||
AnaEx01SteppingAction(AnaEx01AnalysisManager* = 0);
|
||||
virtual ~AnaEx01SteppingAction();
|
||||
virtual void UserSteppingAction(const G4Step*);
|
||||
SteppingAction(DetectorConstruction*, EventAction*);
|
||||
virtual ~SteppingAction();
|
||||
|
||||
void UserSteppingAction(const G4Step*);
|
||||
|
||||
private:
|
||||
AnaEx01AnalysisManager* fAnalysisManager;
|
||||
DetectorConstruction* detector;
|
||||
EventAction* eventaction;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user