Import Geant4 10.0.0 source tree
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B5ActionInitialization.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B5ActionInitialization.hh
|
||||
/// \brief Definition of the B5ActionInitialization class
|
||||
|
||||
#ifndef B5ActionInitialization_h
|
||||
#define B5ActionInitialization_h 1
|
||||
|
||||
#include "G4VUserActionInitialization.hh"
|
||||
|
||||
/// Action initialization class.
|
||||
|
||||
class B5ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
B5ActionInitialization();
|
||||
virtual ~B5ActionInitialization();
|
||||
|
||||
virtual void BuildForMaster() const;
|
||||
virtual void Build() const;
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B5Analysis.hh 66536 2012-12-19 14:32:36Z ihrivnac $
|
||||
//
|
||||
/// \file B5Analysis.hh
|
||||
/// \brief Selection of the analysis technology
|
||||
|
||||
#ifndef B5Analysis_h
|
||||
#define B5Analysis_h 1
|
||||
|
||||
#include "g4root.hh"
|
||||
//#include "g4xml.hh"
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,56 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B5CellParameterisation.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
//
|
||||
/// \file B5CellParameterisation.hh
|
||||
/// \brief Definition of the B5CellParameterisation class
|
||||
|
||||
#ifndef B5CellParameterisation_H
|
||||
#define B5CellParameterisation_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VPVParameterisation.hh"
|
||||
class G4VPhysicalVolume;
|
||||
|
||||
/// EM Calorimeter cell parameterisation
|
||||
|
||||
class B5CellParameterisation : public G4VPVParameterisation
|
||||
{
|
||||
public:
|
||||
B5CellParameterisation();
|
||||
virtual ~B5CellParameterisation();
|
||||
|
||||
virtual void ComputeTransformation(
|
||||
const G4int copyNo,G4VPhysicalVolume *physVol) const;
|
||||
|
||||
private:
|
||||
G4double fXCell[80];
|
||||
G4double fYCell[80];
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,90 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B5DetectorConstruction.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
//
|
||||
/// \file B5DetectorConstruction.hh
|
||||
/// \brief Definition of the B5DetectorConstruction class
|
||||
|
||||
#ifndef B5DetectorConstruction_h
|
||||
#define B5DetectorConstruction_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4FieldManager.hh"
|
||||
|
||||
#include <vector>
|
||||
|
||||
class B5MagneticField;
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4Material;
|
||||
class G4VSensitiveDetector;
|
||||
class G4VisAttributes;
|
||||
class G4GenericMessenger;
|
||||
|
||||
/// Detector construction
|
||||
|
||||
class B5DetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
B5DetectorConstruction();
|
||||
virtual ~B5DetectorConstruction();
|
||||
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
|
||||
void SetArmAngle(G4double val);
|
||||
G4double GetArmAngle() { return fArmAngle; }
|
||||
|
||||
void ConstructMaterials();
|
||||
|
||||
private:
|
||||
void DefineCommands();
|
||||
|
||||
G4GenericMessenger* fMessenger;
|
||||
|
||||
static G4ThreadLocal B5MagneticField* fMagneticField;
|
||||
static G4ThreadLocal G4FieldManager* fFieldMgr;
|
||||
|
||||
G4LogicalVolume* fHodoscope1Logical;
|
||||
G4LogicalVolume* fHodoscope2Logical;
|
||||
G4LogicalVolume* fWirePlane1Logical;
|
||||
G4LogicalVolume* fWirePlane2Logical;
|
||||
G4LogicalVolume* fCellLogical;
|
||||
G4LogicalVolume* fHadCalScintiLogical;
|
||||
G4LogicalVolume* fMagneticLogical;
|
||||
|
||||
std::vector<G4VisAttributes*> fVisAttributes;
|
||||
|
||||
G4double fArmAngle;
|
||||
G4RotationMatrix* fArmRotation;
|
||||
G4VPhysicalVolume* fSecondArmPhys;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,108 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B5DriftChamberHit.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
//
|
||||
/// \file B5DriftChamberHit.hh
|
||||
/// \brief Definition of the B5DriftChamberHit class
|
||||
|
||||
#ifndef B5DriftChamberHit_h
|
||||
#define B5DriftChamberHit_h 1
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
|
||||
class G4AttDef;
|
||||
class G4AttValue;
|
||||
|
||||
/// Drift chamber hit
|
||||
///
|
||||
/// It records:
|
||||
/// - the layer ID
|
||||
/// - the particle time
|
||||
/// - the particle local and global positions
|
||||
|
||||
class B5DriftChamberHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
B5DriftChamberHit();
|
||||
B5DriftChamberHit(G4int z);
|
||||
B5DriftChamberHit(const B5DriftChamberHit &right);
|
||||
virtual ~B5DriftChamberHit();
|
||||
|
||||
const B5DriftChamberHit& operator=(const B5DriftChamberHit &right);
|
||||
int operator==(const B5DriftChamberHit &right) const;
|
||||
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aHit);
|
||||
|
||||
virtual void Draw();
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
virtual void Print();
|
||||
|
||||
void SetLayerID(G4int z) { fLayerID = z; }
|
||||
G4int GetLayerID() const { return fLayerID; }
|
||||
|
||||
void SetTime(G4double t) { fTime = t; }
|
||||
G4double GetTime() const { return fTime; }
|
||||
|
||||
void SetLocalPos(G4ThreeVector xyz) { fLocalPos = xyz; }
|
||||
G4ThreeVector GetLocalPos() const { return fLocalPos; }
|
||||
|
||||
void SetWorldPos(G4ThreeVector xyz) { fWorldPos = xyz; }
|
||||
G4ThreeVector GetWorldPos() const { return fWorldPos; }
|
||||
|
||||
private:
|
||||
G4int fLayerID;
|
||||
G4double fTime;
|
||||
G4ThreeVector fLocalPos;
|
||||
G4ThreeVector fWorldPos;
|
||||
};
|
||||
|
||||
typedef G4THitsCollection<B5DriftChamberHit> B5DriftChamberHitsCollection;
|
||||
|
||||
extern G4ThreadLocal G4Allocator<B5DriftChamberHit>* B5DriftChamberHitAllocator;
|
||||
|
||||
inline void* B5DriftChamberHit::operator new(size_t)
|
||||
{
|
||||
if (!B5DriftChamberHitAllocator)
|
||||
B5DriftChamberHitAllocator = new G4Allocator<B5DriftChamberHit>;
|
||||
return (void*)B5DriftChamberHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void B5DriftChamberHit::operator delete(void* aHit)
|
||||
{
|
||||
B5DriftChamberHitAllocator->FreeSingle((B5DriftChamberHit*) aHit);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B5DriftChamberSD.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
//
|
||||
/// \file B5DriftChamberSD.hh
|
||||
/// \brief Definition of the B5DriftChamberSD class
|
||||
|
||||
#ifndef B5DriftChamberSD_h
|
||||
#define B5DriftChamberSD_h 1
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
|
||||
#include "B5DriftChamberHit.hh"
|
||||
|
||||
class G4Step;
|
||||
class G4HCofThisEvent;
|
||||
class G4TouchableHistory;
|
||||
|
||||
/// Drift chamber sensitive detector
|
||||
|
||||
class B5DriftChamberSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
B5DriftChamberSD(G4String name);
|
||||
virtual ~B5DriftChamberSD();
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent*HCE);
|
||||
virtual G4bool ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist);
|
||||
|
||||
private:
|
||||
B5DriftChamberHitsCollection* fHitsCollection;
|
||||
G4int fHCID;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,113 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B5EmCalorimeterHit.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
//
|
||||
/// \file B5EmCalorimeterHit.hh
|
||||
/// \brief Definition of the B5EmCalorimeterHit class
|
||||
|
||||
#ifndef B5EmCalorimeterHit_h
|
||||
#define B5EmCalorimeterHit_h 1
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
|
||||
class G4AttDef;
|
||||
class G4AttValue;
|
||||
|
||||
/// EM Calorimeter hit
|
||||
///
|
||||
/// It records:
|
||||
/// - the cell ID
|
||||
/// - the energy deposit
|
||||
/// - the cell logical volume, its position and rotation
|
||||
|
||||
class B5EmCalorimeterHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
B5EmCalorimeterHit();
|
||||
B5EmCalorimeterHit(G4int z);
|
||||
B5EmCalorimeterHit(const B5EmCalorimeterHit &right);
|
||||
virtual ~B5EmCalorimeterHit();
|
||||
|
||||
const B5EmCalorimeterHit& operator=(const B5EmCalorimeterHit &right);
|
||||
int operator==(const B5EmCalorimeterHit &right) const;
|
||||
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aHit);
|
||||
|
||||
virtual void Draw();
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
virtual void Print();
|
||||
|
||||
void SetCellID(G4int z) { fCellID = z; }
|
||||
G4int GetCellID() const { return fCellID; }
|
||||
|
||||
void SetEdep(G4double de) { fEdep = de; }
|
||||
void AddEdep(G4double de) { fEdep += de; }
|
||||
G4double GetEdep() const { return fEdep; }
|
||||
|
||||
void SetPos(G4ThreeVector xyz) { fPos = xyz; }
|
||||
G4ThreeVector GetPos() const { return fPos; }
|
||||
|
||||
void SetRot(G4RotationMatrix rmat) { fRot = rmat; }
|
||||
G4RotationMatrix GetRot() const { return fRot; }
|
||||
|
||||
void SetLogV(G4LogicalVolume* val) { fPLogV = val; }
|
||||
const G4LogicalVolume* GetLogV() const { return fPLogV; }
|
||||
|
||||
private:
|
||||
G4int fCellID;
|
||||
G4double fEdep;
|
||||
G4ThreeVector fPos;
|
||||
G4RotationMatrix fRot;
|
||||
const G4LogicalVolume* fPLogV;
|
||||
};
|
||||
|
||||
typedef G4THitsCollection<B5EmCalorimeterHit> B5EmCalorimeterHitsCollection;
|
||||
|
||||
extern G4ThreadLocal G4Allocator<B5EmCalorimeterHit>* B5EmCalorimeterHitAllocator;
|
||||
|
||||
inline void* B5EmCalorimeterHit::operator new(size_t)
|
||||
{
|
||||
if (!B5EmCalorimeterHitAllocator)
|
||||
B5EmCalorimeterHitAllocator = new G4Allocator<B5EmCalorimeterHit>;
|
||||
return (void*)B5EmCalorimeterHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void B5EmCalorimeterHit::operator delete(void* aHit)
|
||||
{
|
||||
B5EmCalorimeterHitAllocator->FreeSingle((B5EmCalorimeterHit*) aHit);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B5EmCalorimeterSD.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
//
|
||||
/// \file B5EmCalorimeterSD.hh
|
||||
/// \brief Definition of the B5EmCalorimeterSD class
|
||||
|
||||
#ifndef B5EmCalorimeterSD_h
|
||||
#define B5EmCalorimeterSD_h 1
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
|
||||
#include "B5EmCalorimeterHit.hh"
|
||||
|
||||
class G4Step;
|
||||
class G4HCofThisEvent;
|
||||
class G4TouchableHistory;
|
||||
|
||||
/// EM calorimeter sensitive detector
|
||||
|
||||
class B5EmCalorimeterSD : public G4VSensitiveDetector
|
||||
{
|
||||
|
||||
public:
|
||||
B5EmCalorimeterSD(G4String name);
|
||||
virtual ~B5EmCalorimeterSD();
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent*HCE);
|
||||
virtual G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
|
||||
|
||||
private:
|
||||
B5EmCalorimeterHitsCollection* fHitsCollection;
|
||||
G4int fHCID;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B5EventAction.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
//
|
||||
/// \file B5EventAction.hh
|
||||
/// \brief Definition of the B5EventAction class
|
||||
|
||||
#ifndef B5EventAction_h
|
||||
#define B5EventAction_h 1
|
||||
|
||||
|
||||
#include "G4UserEventAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
/// Event action
|
||||
|
||||
class B5EventAction : public G4UserEventAction
|
||||
{
|
||||
public:
|
||||
B5EventAction();
|
||||
virtual ~B5EventAction();
|
||||
|
||||
virtual void BeginOfEventAction(const G4Event*);
|
||||
virtual void EndOfEventAction(const G4Event*);
|
||||
|
||||
private:
|
||||
G4int fHHC1ID;
|
||||
G4int fHHC2ID;
|
||||
G4int fDHC1ID;
|
||||
G4int fDHC2ID;
|
||||
G4int fECHCID;
|
||||
G4int fHCHCID;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,113 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B5HadCalorimeterHit.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
//
|
||||
/// \file B5HadCalorimeterHit.hh
|
||||
/// \brief Definition of the B5HadCalorimeterHit class
|
||||
|
||||
#ifndef B5HadCalorimeterHit_h
|
||||
#define B5HadCalorimeterHit_h 1
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
|
||||
class G4AttDef;
|
||||
class G4AttValue;
|
||||
|
||||
/// Hadron Calorimeter hit
|
||||
///
|
||||
/// It records:
|
||||
/// - the cell column ID and row ID
|
||||
/// - the energy deposit
|
||||
/// - the cell position and rotation
|
||||
|
||||
class B5HadCalorimeterHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
B5HadCalorimeterHit();
|
||||
B5HadCalorimeterHit(G4int iCol,G4int iRow);
|
||||
B5HadCalorimeterHit(const B5HadCalorimeterHit &right);
|
||||
virtual ~B5HadCalorimeterHit();
|
||||
|
||||
const B5HadCalorimeterHit& operator=(const B5HadCalorimeterHit &right);
|
||||
int operator==(const B5HadCalorimeterHit &right) const;
|
||||
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aHit);
|
||||
|
||||
virtual void Draw();
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
virtual void Print();
|
||||
|
||||
void SetColumnID(G4int z) { fColumnID = z; }
|
||||
G4int GetColumnID() const { return fColumnID; }
|
||||
|
||||
void SetRowID(G4int z) { fRowID = z; }
|
||||
G4int GetRowID() const { return fRowID; }
|
||||
|
||||
void SetEdep(G4double de) { fEdep = de; }
|
||||
void AddEdep(G4double de) { fEdep += de; }
|
||||
G4double GetEdep() const { return fEdep; }
|
||||
|
||||
void SetPos(G4ThreeVector xyz) { fPos = xyz; }
|
||||
G4ThreeVector GetPos() const { return fPos; }
|
||||
|
||||
void SetRot(G4RotationMatrix rmat) { fRot = rmat; }
|
||||
G4RotationMatrix GetRot() const { return fRot; }
|
||||
|
||||
private:
|
||||
G4int fColumnID;
|
||||
G4int fRowID;
|
||||
G4double fEdep;
|
||||
G4ThreeVector fPos;
|
||||
G4RotationMatrix fRot;
|
||||
};
|
||||
|
||||
typedef G4THitsCollection<B5HadCalorimeterHit> B5HadCalorimeterHitsCollection;
|
||||
|
||||
extern G4ThreadLocal G4Allocator<B5HadCalorimeterHit>* B5HadCalorimeterHitAllocator;
|
||||
|
||||
inline void* B5HadCalorimeterHit::operator new(size_t)
|
||||
{
|
||||
if (!B5HadCalorimeterHitAllocator)
|
||||
B5HadCalorimeterHitAllocator = new G4Allocator<B5HadCalorimeterHit>;
|
||||
return (void*)B5HadCalorimeterHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void B5HadCalorimeterHit::operator delete(void* aHit)
|
||||
{
|
||||
B5HadCalorimeterHitAllocator->FreeSingle((B5HadCalorimeterHit*) aHit);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B5HadCalorimeterSD.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
//
|
||||
/// \file B5HadCalorimeterSD.hh
|
||||
/// \brief Definition of the B5HadCalorimeterSD class
|
||||
|
||||
#ifndef B5HadCalorimeterSD_h
|
||||
#define B5HadCalorimeterSD_h 1
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
|
||||
#include "B5HadCalorimeterHit.hh"
|
||||
|
||||
class G4Step;
|
||||
class G4HCofThisEvent;
|
||||
class G4TouchableHistory;
|
||||
|
||||
/// Hadron calorimeter sensitive detector
|
||||
|
||||
class B5HadCalorimeterSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
B5HadCalorimeterSD(G4String name);
|
||||
virtual ~B5HadCalorimeterSD();
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent*HCE);
|
||||
virtual G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
|
||||
|
||||
private:
|
||||
B5HadCalorimeterHitsCollection* fHitsCollection;
|
||||
G4int fHCID;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,110 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B5HodoscopeHit.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
//
|
||||
/// \file B5HodoscopeHit.hh
|
||||
/// \brief Definition of the B5HodoscopeHit class
|
||||
|
||||
#ifndef B5HodoscopeHit_h
|
||||
#define B5HodoscopeHit_h 1
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
|
||||
class G4AttDef;
|
||||
class G4AttValue;
|
||||
|
||||
/// Hodoscope hit
|
||||
///
|
||||
/// It records:
|
||||
/// - the strip ID
|
||||
/// - the particle time
|
||||
/// - the strip logical volume, its position and rotation
|
||||
|
||||
class B5HodoscopeHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
B5HodoscopeHit(G4int i,G4double t);
|
||||
B5HodoscopeHit(const B5HodoscopeHit &right);
|
||||
virtual ~B5HodoscopeHit();
|
||||
|
||||
const B5HodoscopeHit& operator=(const B5HodoscopeHit &right);
|
||||
int operator==(const B5HodoscopeHit &right) const;
|
||||
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void*aHit);
|
||||
|
||||
void Draw();
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
void Print();
|
||||
|
||||
G4int GetID() const { return fId; }
|
||||
|
||||
void SetTime(G4double val) { fTime = val; }
|
||||
G4double GetTime() const { return fTime; }
|
||||
|
||||
void SetPos(G4ThreeVector xyz) { fPos = xyz; }
|
||||
G4ThreeVector GetPos() const { return fPos; }
|
||||
|
||||
void SetRot(G4RotationMatrix rmat) { fRot = rmat; }
|
||||
G4RotationMatrix GetRot() const { return fRot; }
|
||||
|
||||
void SetLogV(G4LogicalVolume* val) { fPLogV = val; }
|
||||
const G4LogicalVolume* GetLogV() const { return fPLogV; }
|
||||
|
||||
private:
|
||||
G4int fId;
|
||||
G4double fTime;
|
||||
G4ThreeVector fPos;
|
||||
G4RotationMatrix fRot;
|
||||
const G4LogicalVolume* fPLogV;
|
||||
};
|
||||
|
||||
typedef G4THitsCollection<B5HodoscopeHit> B5HodoscopeHitsCollection;
|
||||
|
||||
extern G4ThreadLocal G4Allocator<B5HodoscopeHit>* B5HodoscopeHitAllocator;
|
||||
|
||||
inline void* B5HodoscopeHit::operator new(size_t)
|
||||
{
|
||||
if (!B5HodoscopeHitAllocator)
|
||||
B5HodoscopeHitAllocator = new G4Allocator<B5HodoscopeHit>;
|
||||
return (void*)B5HodoscopeHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void B5HodoscopeHit::operator delete(void*aHit)
|
||||
{
|
||||
B5HodoscopeHitAllocator->FreeSingle((B5HodoscopeHit*) aHit);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B5HodoscopeSD.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
//
|
||||
/// \file B5HodoscopeSD.hh
|
||||
/// \brief Definition of the B5HodoscopeSD class
|
||||
|
||||
#ifndef B5HodoscopeSD_h
|
||||
#define B5HodoscopeSD_h 1
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
#include "B5HodoscopeHit.hh"
|
||||
|
||||
class G4Step;
|
||||
class G4HCofThisEvent;
|
||||
class G4TouchableHistory;
|
||||
|
||||
/// Hodoscope sensitive detector
|
||||
|
||||
class B5HodoscopeSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
B5HodoscopeSD(G4String name);
|
||||
virtual ~B5HodoscopeSD();
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent*HCE);
|
||||
virtual G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
|
||||
|
||||
private:
|
||||
B5HodoscopeHitsCollection* fHitsCollection;
|
||||
G4int fHCID;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B5MagneticField.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
//
|
||||
/// \file B5MagneticField.hh
|
||||
/// \brief Definition of the B5MagneticField class
|
||||
|
||||
#ifndef B5MagneticField_H
|
||||
#define B5MagneticField_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4MagneticField.hh"
|
||||
|
||||
class G4GenericMessenger;
|
||||
|
||||
/// Magnetic field
|
||||
|
||||
class B5MagneticField : public G4MagneticField
|
||||
{
|
||||
public:
|
||||
B5MagneticField();
|
||||
virtual ~B5MagneticField();
|
||||
|
||||
virtual void GetFieldValue(const G4double point[4],double* bField ) const;
|
||||
|
||||
void SetField(G4double val) { fBy = val; }
|
||||
G4double GetField() const { return fBy; }
|
||||
|
||||
private:
|
||||
void DefineCommands();
|
||||
|
||||
G4GenericMessenger* fMessenger;
|
||||
G4double fBy;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,89 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B5PrimaryGeneratorAction.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
//
|
||||
/// \file B5PrimaryGeneratorAction.hh
|
||||
/// \brief Definition of the B5PrimaryGeneratorAction class
|
||||
|
||||
#ifndef B5PrimaryGeneratorAction_h
|
||||
#define B5PrimaryGeneratorAction_h 1
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4ParticleGun;
|
||||
class G4GenericMessenger;
|
||||
class G4Event;
|
||||
class G4ParticleDefinition;
|
||||
|
||||
/// Primary generator
|
||||
///
|
||||
/// A single particle is generated.
|
||||
/// User can select
|
||||
/// - the initial momentum and angle
|
||||
/// - the momentum and angle spreads
|
||||
/// - random selection of a particle type from proton, kaon+, pi+, muon+, e+
|
||||
|
||||
|
||||
class B5PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
B5PrimaryGeneratorAction();
|
||||
virtual ~B5PrimaryGeneratorAction();
|
||||
|
||||
virtual void GeneratePrimaries(G4Event*);
|
||||
|
||||
void SetMomentum(G4double val) { fMomentum = val; }
|
||||
G4double GetMomentum() const { return fMomentum; }
|
||||
|
||||
void SetSigmaMomentum(G4double val) { fSigmaMomentum = val; }
|
||||
G4double GetSigmaMomentum() const { return fSigmaMomentum; }
|
||||
|
||||
void SetSigmaAngle(G4double val) { fSigmaAngle = val; }
|
||||
G4double GetSigmaAngle() const { return fSigmaAngle; }
|
||||
|
||||
void SetRandomize(G4bool val) { fRandomizePrimary = val; }
|
||||
G4bool GetRandomize() const { return fRandomizePrimary; }
|
||||
|
||||
private:
|
||||
void DefineCommands();
|
||||
|
||||
G4ParticleGun* fParticleGun;
|
||||
G4GenericMessenger* fMessenger;
|
||||
G4ParticleDefinition* fPositron;
|
||||
G4ParticleDefinition* fMuon;
|
||||
G4ParticleDefinition* fPion;
|
||||
G4ParticleDefinition* fKaon;
|
||||
G4ParticleDefinition* fProton;
|
||||
G4double fMomentum;
|
||||
G4double fSigmaMomentum;
|
||||
G4double fSigmaAngle;
|
||||
G4bool fRandomizePrimary;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,54 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B5RunAction.hh 74204 2013-10-01 07:04:43Z ihrivnac $
|
||||
//
|
||||
/// \file B5RunAction.hh
|
||||
/// \brief Definition of the B5RunAction class
|
||||
|
||||
#ifndef B5RunAction_h
|
||||
#define B5RunAction_h 1
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4Run;
|
||||
|
||||
/// Run action class
|
||||
|
||||
class B5RunAction : public G4UserRunAction
|
||||
{
|
||||
public:
|
||||
B5RunAction();
|
||||
virtual ~B5RunAction();
|
||||
|
||||
virtual void BeginOfRunAction(const G4Run*);
|
||||
virtual void EndOfRunAction(const G4Run*);
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user