Import Geant4 9.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:58:43 +02:00
parent 96c8bcd0af
commit b79225fb37
7544 changed files with 245407 additions and 91099 deletions
@@ -0,0 +1,157 @@
//
// ********************************************************************
// * 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: DetectorConstruction.hh,v 1.1 2008/11/03 11:48:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// ----------------------------------------------------------------------------
#ifndef DetectorConstruction_h
#define DetectorConstruction_h 1
#include "G4VUserDetectorConstruction.hh"
#include "globals.hh"
class G4Box;
class G4LogicalVolume;
class G4VPhysicalVolume;
class G4Material;
class G4UniformMagField;
class DetectorMessenger;
// ----------------------------------------------------------------------------
class DetectorConstruction : public G4VUserDetectorConstruction
{
public:
DetectorConstruction();
~DetectorConstruction();
public:
void SetAbsorberMaterial (G4String);
void SetAbsorberThickness(G4double);
void SetGapMaterial (G4String);
void SetGapThickness(G4double);
void SetCalorSizeYZ(G4double);
void SetNbOfLayers (G4int);
void SetMagField(G4double);
G4VPhysicalVolume* Construct();
void UpdateGeometry();
public:
void PrintCalorParameters();
G4double GetWorldSizeX() {return WorldSizeX;};
G4double GetWorldSizeYZ() {return WorldSizeYZ;};
G4double GetCalorThickness() {return CalorThickness;};
G4double GetCalorSizeYZ() {return CalorSizeYZ;};
G4int GetNbOfLayers() {return NbOfLayers;};
G4Material* GetAbsorberMaterial() {return AbsorberMaterial;};
G4double GetAbsorberThickness() {return AbsorberThickness;};
G4Material* GetGapMaterial() {return GapMaterial;};
G4double GetGapThickness() {return GapThickness;};
const G4VPhysicalVolume* GetphysiWorld() {return physiWorld;};
const G4VPhysicalVolume* GetAbsorber() {return physiAbsorber;};
const G4VPhysicalVolume* GetGap() {return physiGap;};
private:
G4Material* AbsorberMaterial;
G4double AbsorberThickness;
G4Material* GapMaterial;
G4double GapThickness;
G4int NbOfLayers;
G4double LayerThickness;
G4double CalorSizeYZ;
G4double CalorThickness;
G4Material* defaultMaterial;
G4double WorldSizeYZ;
G4double WorldSizeX;
G4Box* solidWorld; //pointer to the solid World
G4LogicalVolume* logicWorld; //pointer to the logical World
G4VPhysicalVolume* physiWorld; //pointer to the physical World
G4Box* solidCalor; //pointer to the solid Calor
G4LogicalVolume* logicCalor; //pointer to the logical Calor
G4VPhysicalVolume* physiCalor; //pointer to the physical Calor
G4Box* solidLayer; //pointer to the solid Layer
G4LogicalVolume* logicLayer; //pointer to the logical Layer
G4VPhysicalVolume* physiLayer; //pointer to the physical Layer
G4Box* solidAbsorber; //pointer to the solid Absorber
G4LogicalVolume* logicAbsorber; //pointer to the logical Absorber
G4VPhysicalVolume* physiAbsorber; //pointer to the physical Absorber
G4Box* solidGap; //pointer to the solid Gap
G4LogicalVolume* logicGap; //pointer to the logical Gap
G4VPhysicalVolume* physiGap; //pointer to the physical Gap
G4UniformMagField* magField; //pointer to the magnetic field
DetectorMessenger* detectorMessenger; //pointer to the Messenger
private:
void DefineMaterials();
void ComputeCalorParameters();
G4VPhysicalVolume* ConstructCalorimeter();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline void DetectorConstruction::ComputeCalorParameters()
{
// Compute derived parameters of the calorimeter
LayerThickness = AbsorberThickness + GapThickness;
CalorThickness = NbOfLayers*LayerThickness;
WorldSizeX = 1.2*CalorThickness; WorldSizeYZ = 1.2*CalorSizeYZ;
}
// ----------------------------------------------------------------------------
#endif
@@ -0,0 +1,76 @@
//
// ********************************************************************
// * 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: DetectorMessenger.hh,v 1.1 2008/11/03 11:48:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// ----------------------------------------------------------------------------
#ifndef DetectorMessenger_h
#define DetectorMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class DetectorConstruction;
class G4UIdirectory;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithoutParameter;
// ----------------------------------------------------------------------------
class DetectorMessenger: public G4UImessenger
{
public:
DetectorMessenger(DetectorConstruction* );
~DetectorMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
DetectorConstruction* Detector;
G4UIdirectory* decDir;
G4UIdirectory* detDir;
G4UIcmdWithAString* AbsMaterCmd;
G4UIcmdWithAString* GapMaterCmd;
G4UIcmdWithADoubleAndUnit* AbsThickCmd;
G4UIcmdWithADoubleAndUnit* GapThickCmd;
G4UIcmdWithADoubleAndUnit* SizeYZCmd;
G4UIcmdWithAnInteger* NbLayersCmd;
G4UIcmdWithADoubleAndUnit* MagFieldCmd;
G4UIcmdWithoutParameter* UpdateCmd;
};
// ----------------------------------------------------------------------------
#endif
@@ -0,0 +1,68 @@
//
// ********************************************************************
// * 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: EDecayType.hh,v 1.1 2008/11/03 11:48:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// According to EDecayType enum in TPythia6Decayer class in Root:
// http://root.cern.ch/
// see http://root.cern.ch/root/License.html
// ----------------------------------------------------------------------------
#ifndef E_DECAY_TYPE_H
#define E_DECAY_TYPE_H
// Enum of decay mode types
enum EDecayType
{
kSemiElectronic,
kDiElectron,
kSemiMuonic,
kDiMuon,
kBJpsiDiMuon,
kBJpsiDiElectron,
kBPsiPrimeDiMuon,
kBPsiPrimeDiElectron,
kPiToMu,
kKaToMu,
kNoDecay,
kHadronicD,
kOmega,
kPhiKK,
kAll,
kNoDecayHeavy,
kHardMuons,
kBJpsi,
kWToMuon,
kWToCharm,
kWToCharmToMuon,
kZDiMuon,
kMaxDecay
};
// ----------------------------------------------------------------------------
#endif
@@ -0,0 +1,75 @@
//
// ********************************************************************
// * 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 2008/11/03 11:48:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// ----------------------------------------------------------------------------
#ifndef EventAction_h
#define EventAction_h 1
#include "G4UserEventAction.hh"
#include "globals.hh"
class RunAction;
class EventActionMessenger;
// ----------------------------------------------------------------------------
class EventAction : public G4UserEventAction
{
public:
EventAction(RunAction*);
~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;}
void SetPrintModulo(G4int val) {printModulo = val;};
private:
RunAction* runAct;
G4double EnergyAbs, EnergyGap;
G4double TrackLAbs, TrackLGap;
G4int printModulo;
EventActionMessenger* eventMessenger;
};
// ----------------------------------------------------------------------------
#endif
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * 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: EventActionMessenger.hh,v 1.1 2008/11/03 11:48:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// ----------------------------------------------------------------------------
#ifndef EventActionMessenger_h
#define EventActionMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class EventAction;
class G4UIdirectory;
class G4UIcmdWithAnInteger;
// ----------------------------------------------------------------------------
class EventActionMessenger: public G4UImessenger
{
public:
EventActionMessenger(EventAction*);
~EventActionMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
EventAction* eventAction;
G4UIdirectory* eventDir;
G4UIcmdWithAnInteger* PrintCmd;
};
// ----------------------------------------------------------------------------
#endif
@@ -0,0 +1,100 @@
//
// ********************************************************************
// * 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: G4Pythia6Decayer.hh,v 1.2 2008/12/18 12:56:36 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// Implements the G4VExtDecayer abstract class using the Pythia6 interface.
//
// According to TPythia6Decayer class in Root:
// http://root.cern.ch/
// see http://root.cern.ch/root/License.html
// ----------------------------------------------------------------------------
#ifndef G4_PYTHIA6_DECAYER_H
#define G4_PYTHIA6_DECAYER_H
#include "G4VExtDecayer.hh"
#include "G4Pythia6DecayerMessenger.hh"
#include "Pythia6.hh"
#include "EDecayType.hh"
#include "globals.hh"
class Pythia6Particle;
class G4Track;
class G4DecayProducts;
// ----------------------------------------------------------------------------
class G4Pythia6Decayer : public G4VExtDecayer
{
public:
G4Pythia6Decayer();
virtual ~G4Pythia6Decayer();
virtual G4DecayProducts* ImportDecayProducts(const G4Track& track);
void ForceDecayType(EDecayType decayType);
void SetVerboseLevel(G4int verboseLevel) { fVerboseLevel = verboseLevel; }
private:
/// Not implemented
G4Pythia6Decayer(const G4Pythia6Decayer& right);
/// Not implemented
G4Pythia6Decayer& operator=(const G4Pythia6Decayer& right);
G4ParticleDefinition*
GetParticleDefinition(const Pythia6Particle* p,G4bool warn = true) const;
G4DynamicParticle* CreateDynamicParticle(const Pythia6Particle* p) const;
G4ThreeVector GetParticlePosition(const Pythia6Particle* particle) const;
G4ThreeVector GetParticleMomentum(const Pythia6Particle* particle) const;
G4int CountProducts(G4int channel, G4int particle);
void ForceParticleDecay(G4int particle, G4int product, G4int mult);
void ForceParticleDecay(G4int particle,
G4int* products, G4int* mult, G4int npart);
void ForceHadronicD();
void ForceOmega();
void ForceDecay(EDecayType decayType);
void Decay(G4int pdg, const CLHEP::HepLorentzVector& p);
G4int ImportParticles(ParticleVector* particles);
static const EDecayType fgkDefaultDecayType; ///< default decay type
G4Pythia6DecayerMessenger fMessenger; ///< command messenger
G4int fVerboseLevel; ///< verbose level
EDecayType fDecayType; ///< selected decay type
ParticleVector* fDecayProductsArray ; ///< array of decay products
};
// ----------------------------------------------------------------------------
#endif
@@ -0,0 +1,79 @@
//
// ********************************************************************
// * 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: G4Pythia6DecayerMessenger.hh,v 1.1 2008/11/03 11:48:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// Messenger class that defines commands for G4Pythia6Decayer.
//
// Implements command
// - /pythia6Decayer/verbose [level]
// - /pythia6Decayer/forceDecayType [decayType]
// ----------------------------------------------------------------------------
#ifndef G4_PYTHIA6_DECAYER_MESSENGER_H
#define G4_PYTHIA6_DECAYER_MESSENGER_H
#include <G4UImessenger.hh>
#include <globals.hh>
class G4Pythia6Decayer;
class G4UIdirectory;
class G4UIcmdWithAnInteger;
class G4UIcmdWithABool;
// ----------------------------------------------------------------------------
class G4Pythia6DecayerMessenger : public G4UImessenger
{
public:
G4Pythia6DecayerMessenger(G4Pythia6Decayer* pythia6Decayer);
virtual ~G4Pythia6DecayerMessenger();
virtual void SetNewValue(G4UIcommand* command, G4String string);
private:
/// Not implemented
G4Pythia6DecayerMessenger();
/// Not implemented
G4Pythia6DecayerMessenger(const G4Pythia6DecayerMessenger& right);
/// Not implemented
G4Pythia6DecayerMessenger& operator=(const G4Pythia6DecayerMessenger& r);
private:
G4Pythia6Decayer* fPythia6Decayer; ///< associated class
G4UIdirectory* fDirectory; ///< command directory
G4UIcmdWithAnInteger* fVerboseCmd; ///< command: verbose
G4UIcmdWithAnInteger* fDecayTypeCmd; ///< command: forceDEcayeType
};
// ----------------------------------------------------------------------------
#endif
@@ -0,0 +1,69 @@
//
// ********************************************************************
// * 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: PhysicsList.hh,v 1.1 2008/11/03 11:48:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// ----------------------------------------------------------------------------
#ifndef PhysicsList_h
#define PhysicsList_h 1
#include "G4VUserPhysicsList.hh"
#include "globals.hh"
// ----------------------------------------------------------------------------
class PhysicsList: public G4VUserPhysicsList
{
public:
PhysicsList();
~PhysicsList();
// Construct particle and physics
void ConstructParticle();
void ConstructProcess();
void SetCuts();
private:
// these methods Construct particles
void ConstructBosons();
void ConstructLeptons();
void ConstructMesons();
void ConstructBaryons();
// these methods Construct physics processes and register them
void ConstructDecay();
void ConstructEM();
};
// ----------------------------------------------------------------------------
#endif
@@ -0,0 +1,69 @@
//
// ********************************************************************
// * 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: PrimaryGeneratorAction.hh,v 1.1 2008/11/03 11:48:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// ----------------------------------------------------------------------------
#ifndef PrimaryGeneratorAction_h
#define PrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "globals.hh"
class G4ParticleGun;
class G4Event;
class DetectorConstruction;
class PrimaryGeneratorMessenger;
// ----------------------------------------------------------------------------
class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
PrimaryGeneratorAction(DetectorConstruction*);
~PrimaryGeneratorAction();
void GeneratePrimaries(G4Event*);
void SetRndmFlag(G4String val) { rndmFlag = val;}
private:
G4ParticleGun* particleGun; // pointer a to G4 class
DetectorConstruction* Detector; // pointer to the geometry
PrimaryGeneratorMessenger* gunMessenger; // messenger of this class
G4String rndmFlag; // flag for a rndm impact point
};
// ----------------------------------------------------------------------------
#endif
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * 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: PrimaryGeneratorMessenger.hh,v 1.1 2008/11/03 11:48:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------------
#ifndef PrimaryGeneratorMessenger_h
#define PrimaryGeneratorMessenger_h 1
#include "G4UImessenger.hh"
#include "globals.hh"
class PrimaryGeneratorAction;
class G4UIdirectory;
class G4UIcmdWithAString;
// ----------------------------------------------------------------------------
class PrimaryGeneratorMessenger : public G4UImessenger
{
public:
PrimaryGeneratorMessenger(PrimaryGeneratorAction*);
~PrimaryGeneratorMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
PrimaryGeneratorAction* Action;
G4UIdirectory* gunDir;
G4UIcmdWithAString* RndmCmd;
};
// ----------------------------------------------------------------------------
#endif
@@ -0,0 +1,191 @@
//
// ********************************************************************
// * 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: Pythia6.hh,v 1.1 2008/11/03 11:48:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// According to TPythia6 class from Root:
// (The TPythia6 class is an interface class to F77 routines in Pythia6 //
// CERNLIB event generators, written by T.Sjostrand.)
// http://root.cern.ch/
// see http://root.cern.ch/root/License.html
//
// The complete Pythia6 documentation can be found at:
// http://home.thep.lu.se/~torbjorn/pythiaaux/recent.html
//
// ----------------------------------------------------------------------------
// ******************************************************************************
// ******************************************************************************
// ** **
// ** **
// ** *......* Welcome to the Lund Monte Carlo! **
// ** *:::!!:::::::::::* **
// ** *::::::!!::::::::::::::* PPP Y Y TTTTT H H III A **
// ** *::::::::!!::::::::::::::::* P P Y Y T H H I A A **
// ** *:::::::::!!:::::::::::::::::* PPP Y T HHHHH I AAAAA **
// ** *:::::::::!!:::::::::::::::::* P Y T H H I A A **
// ** *::::::::!!::::::::::::::::*! P Y T H H III A A **
// ** *::::::!!::::::::::::::* !! **
// ** !! *:::!!:::::::::::* !! This is PYTHIA version 6.418 **
// ** !! !* -><- * !! Last date of change: 9 Jun 2008 **
// ** !! !! !! **
// ** !! !! !! Now is 0 Jan 2000 at 0:00:00 **
// ** !! !! **
// ** !! lh !! Disclaimer: this program comes **
// ** !! !! without any guarantees. Beware **
// ** !! hh !! of errors and use common sense **
// ** !! ll !! when interpreting results. **
// ** !! !! **
// ** !! Copyright T. Sjostrand (2008) **
// ** **
// ** An archive of program versions and documentation is found on the web: **
// ** http://www.thep.lu.se/~torbjorn/Pythia.html **
// ** **
// ** When you cite this program, the official reference is to the 6.4 manual: **
// ** T. Sjostrand, S. Mrenna and P. Skands, JHEP05 (2006) 026 **
// ** (LU TP 06-13, FERMILAB-PUB-06-052-CD-T) [hep-ph/0603175]. **
// ** **
// ** Also remember that the program, to a large extent, represents original **
// ** physics research. Other publications of special relevance to your **
// ** studies may therefore deserve separate mention. **
// ** **
// ** Main author: Torbjorn Sjostrand; Department of Theoretical Physics, **
// ** Lund University, Solvegatan 14A, S-223 62 Lund, Sweden; **
// ** phone: + 46 - 46 - 222 48 16; e-mail: torbjorn@thep.lu.se **
// ** Author: Stephen Mrenna; Computing Division, GDS Group, **
// ** Fermi National Accelerator Laboratory, MS 234, Batavia, IL 60510, USA; **
// ** phone: + 1 - 630 - 840 - 2556; e-mail: mrenna@fnal.gov **
// ** Author: Peter Skands; Theoretical Physics Department, **
// ** Fermi National Accelerator Laboratory, MS 106, Batavia, IL 60510, USA; **
// ** and CERN/PH, CH-1211 Geneva, Switzerland; **
// ** phone: + 41 - 22 - 767 24 59; e-mail: skands@fnal.gov **
// ** **
// ** **
// ******************************************************************************
#ifndef PYTHIA_Pythia6
#define PYTHIA_Pythia6
#include <vector>
int const KNDCAY = 8000; //should be 4000 for pythia61
struct Pyjets_t
{
int N;
int NPAD;
int K[5][4000];
double P[5][4000];
double V[5][4000];
};
struct Pydat1_t
{
int MSTU[200];
double PARU[200];
int MSTJ[200];
double PARJ[200];
};
struct Pydat3_t
{
int MDCY[3][500];
int MDME[2][KNDCAY];
double BRAT[KNDCAY];
int KFDP[5][KNDCAY];
};
struct Pythia6Particle
{
Pythia6Particle(
int ks, int kf, int parent, int firstChild, int lastChild,
float px, float py, float pz, float energy, float mass,
float vx, float vy, float vz, float time, float lifetime)
: fKS(ks), fKF(kf),
fParent(parent), fFirstChild(firstChild), fLastChild(lastChild),
fPx(px), fPy(py), fPz(pz), fEnergy(energy), fMass(mass),
fVx(vx), fVy(vy), fVz(vz), fTime(time), fLifetime(lifetime) {}
int fKS; // status of particle ( LUJETS K[1] )
int fKF; // KF flavour code ( LUJETS K[2] )
int fParent; // parrent's id ( LUJETS K[3] )
int fFirstChild; // id of first child ( LUJETS K[4] )
int fLastChild; // id of last child ( LUJETS K[5] )
float fPx; // X momenta [GeV/c] ( LUJETS P[1] )
float fPy; // Y momenta [GeV/c] ( LUJETS P[2] )
float fPz; // Z momenta [GeV/c] ( LUJETS P[3] )
float fEnergy; // Energy [GeV] ( LUJETS P[4] )
float fMass; // Mass [Gev/c^2] ( LUJETS P[5] )
float fVx; // X vertex [mm] ( LUJETS V[1] )
float fVy; // Y vertex [mm] ( LUJETS V[2] )
float fVz; // Z vertex [mm] ( LUJETS V[3] )
float fTime; // time of procuction [mm/c]( LUJETS V[4] )
float fLifetime; // proper lifetime [mm/c] ( LUJETS V[5] )
};
typedef std::vector<Pythia6Particle*> ParticleVector;
class Pythia6
{
public:
// ****** constructors and destructor
Pythia6();
virtual ~Pythia6();
static Pythia6 *Instance();
// ****** TPYTHIA routines
//
int Pycomp(int kf);
void Py1ent(int line, int kf, double pe, double theta, double phi);
ParticleVector* ImportParticles();
int ImportParticles(ParticleVector* particles, const char* option="");
// ****** /PYDAT1/
//
void SetMSTJ(int i, int m ) { fPydat1->MSTJ[i-1] = m; }
// ****** /PYDAT3/
//
int GetMDCY(int i, int j) { return fPydat3->MDCY[j-1][i-1]; }
int GetKFDP(int i, int j) { return fPydat3->KFDP[j-1][i-1]; }
void SetMDCY(int i, int j, int m) { fPydat3->MDCY[j-1][i-1] = m; }
void SetMDME(int i, int j, int m) { fPydat3->MDME[j-1][i-1] = m; }
private:
static Pythia6* fgInstance;
ParticleVector* fParticles;
Pyjets_t* fPyjets;
Pydat1_t* fPydat1;
Pydat3_t* fPydat3;
};
#endif
@@ -0,0 +1,65 @@
//
// ********************************************************************
// * 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: RunAction.hh,v 1.1 2008/11/03 11:48:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------------
#ifndef RunAction_h
#define RunAction_h 1
#include "G4UserRunAction.hh"
#include "globals.hh"
// ----------------------------------------------------------------------------
class G4Run;
class RunAction : public G4UserRunAction
{
public:
RunAction();
~RunAction();
void BeginOfRunAction(const G4Run*);
void EndOfRunAction(const G4Run*);
void fillPerEvent(G4double, G4double, G4double, G4double);
private:
G4double sumEAbs, sum2EAbs;
G4double sumEGap, sum2EGap;
G4double sumLAbs, sum2LAbs;
G4double sumLGap, sum2LGap;
};
// ----------------------------------------------------------------------------
#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: SteppingAction.hh,v 1.1 2008/11/03 11:48:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// ----------------------------------------------------------------------------
#ifndef SteppingAction_h
#define SteppingAction_h 1
#include "G4UserSteppingAction.hh"
class DetectorConstruction;
class EventAction;
// ----------------------------------------------------------------------------
class SteppingAction : public G4UserSteppingAction
{
public:
SteppingAction(DetectorConstruction*, EventAction*);
~SteppingAction();
void UserSteppingAction(const G4Step*);
private:
DetectorConstruction* detector;
EventAction* eventaction;
};
// ----------------------------------------------------------------------------
#endif
@@ -0,0 +1,55 @@
//
// ********************************************************************
// * 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: SteppingVerbose.hh,v 1.1 2008/11/03 11:48:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// ----------------------------------------------------------------------------
class SteppingVerbose;
#ifndef SteppingVerbose_h
#define SteppingVerbose_h 1
#include "G4SteppingVerbose.hh"
// ----------------------------------------------------------------------------
class SteppingVerbose : public G4SteppingVerbose
{
public:
SteppingVerbose();
~SteppingVerbose();
void StepInfo();
void TrackingStarted();
};
// ----------------------------------------------------------------------------
#endif