Import Geant4 8.0.0 source tree
This commit is contained in:
@@ -20,6 +20,21 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4GFlashSpot.hh,v 1.3 2005/10/04 09:08:33 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// G4GFlashSpot
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Definition of energy spot for GFlash parameterisation.
|
||||
|
||||
//---------------------------------------------------------------
|
||||
#ifndef G4GFlashSpot_h
|
||||
#define G4GFlashSpot_h
|
||||
|
||||
@@ -30,25 +45,28 @@
|
||||
|
||||
class G4GFlashSpot
|
||||
{
|
||||
public:
|
||||
G4GFlashSpot(const GFlashEnergySpot * aSpot, const G4FastTrack * aTrack, G4TouchableHandle aH)
|
||||
: theSpot(aSpot), theTrack(aTrack), theHandle(aH) {}
|
||||
|
||||
~G4GFlashSpot() {}
|
||||
|
||||
const GFlashEnergySpot * GetEnergySpot() const {return theSpot;}
|
||||
|
||||
const G4FastTrack * GetOriginatorTrack() const {return theTrack;}
|
||||
|
||||
G4TouchableHandle GetTouchableHandle() const {return theHandle;}
|
||||
|
||||
G4ThreeVector GetPosition() const {return GetOriginatorTrack()->GetPrimaryTrack()->GetPosition();}
|
||||
|
||||
private:
|
||||
|
||||
const GFlashEnergySpot * theSpot;
|
||||
const G4FastTrack * theTrack;
|
||||
G4TouchableHandle theHandle;
|
||||
public:
|
||||
|
||||
G4GFlashSpot(const GFlashEnergySpot * aSpot,
|
||||
const G4FastTrack * aTrack, G4TouchableHandle aH)
|
||||
: theSpot(aSpot), theTrack(aTrack), theHandle(aH) {}
|
||||
|
||||
~G4GFlashSpot() {}
|
||||
|
||||
const GFlashEnergySpot * GetEnergySpot() const {return theSpot;}
|
||||
|
||||
const G4FastTrack * GetOriginatorTrack() const {return theTrack;}
|
||||
|
||||
G4TouchableHandle GetTouchableHandle() const {return theHandle;}
|
||||
|
||||
G4ThreeVector GetPosition() const
|
||||
{return GetOriginatorTrack()->GetPrimaryTrack()->GetPosition();}
|
||||
|
||||
private:
|
||||
|
||||
const GFlashEnergySpot * theSpot;
|
||||
const G4FastTrack * theTrack;
|
||||
G4TouchableHandle theHandle;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -20,6 +20,23 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VGFlashSensitiveDetector.hh,v 1.4 2005/10/04 09:08:33 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// G4VGFlashSensitiveDetector
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Abstract base class of the sensitive detector for use with GFlash.
|
||||
// The user's sensitive detector which generates hits must be derived
|
||||
// from this class, and G4VSensitiveDetector.
|
||||
|
||||
//---------------------------------------------------------------
|
||||
#ifndef G4VGFlashSensitiveDetector_h
|
||||
#define G4VGFlashSensitiveDetector_h 1
|
||||
|
||||
@@ -29,72 +46,79 @@
|
||||
#include "GFlashEnergySpot.hh"
|
||||
#include "G4GFlashSpot.hh"
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This is the abstract base class of the sensitive detector for use with GFlash. The user's
|
||||
// sensitive detector which generates hits must be derived from this
|
||||
// class, and G4VSensitiveDetector.
|
||||
|
||||
class G4VGFlashSensitiveDetector
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
G4VGFlashSensitiveDetector() {}
|
||||
G4VGFlashSensitiveDetector(const G4VGFlashSensitiveDetector &) {}
|
||||
// Constructors. The user's concrete class must use one of these constructors
|
||||
// by the constructor initializer of the derived class. The name of
|
||||
// the sensitive detector must be the same as for the corresponding GG4VSensitiveDetector.
|
||||
// Constructors. The user's concrete class must use one of these
|
||||
// constructors by the constructor initializer of the derived class.
|
||||
// The name of the sensitive detector must be the same as for the
|
||||
// corresponding GG4VSensitiveDetector.
|
||||
|
||||
public: // without description
|
||||
|
||||
public:
|
||||
virtual ~G4VGFlashSensitiveDetector() {}
|
||||
|
||||
G4int operator==(const G4VGFlashSensitiveDetector &right) const {return this == &right;}
|
||||
G4int operator!=(const G4VGFlashSensitiveDetector &right) const {return this != &right;};
|
||||
G4int operator==(const G4VGFlashSensitiveDetector &right) const
|
||||
{return this == &right;}
|
||||
G4int operator!=(const G4VGFlashSensitiveDetector &right) const
|
||||
{return this != &right;}
|
||||
|
||||
protected: // with description
|
||||
virtual G4bool ProcessHits(G4GFlashSpot*aSpot,G4TouchableHistory*ROhist) = 0;
|
||||
// The user MUST implement this method for generating hit(s) from the GFlashSpots
|
||||
// Be aware that this method is a protected method and it will be invoked
|
||||
// by Hit() method of the Base class once the Readout geometry that may be associated to the
|
||||
// corresponding G4VSensitiveDetector was taken into account.
|
||||
public: // without description
|
||||
|
||||
|
||||
public: // with description
|
||||
inline G4bool Hit(G4GFlashSpot * aSpot)
|
||||
{
|
||||
// This is the public method invoked by GFlashHitMaker for generating
|
||||
// hits. The actual user's implementation for generating hits must be
|
||||
// implemented in GenerateHits() virtual protected method.
|
||||
|
||||
G4bool result = true;
|
||||
G4VSensitiveDetector * This = dynamic_cast<G4VSensitiveDetector *>(this);
|
||||
if(!This)
|
||||
{
|
||||
G4Exception("Sensitive detector using GFlash needs to also inherit from G4VSensitiveDetector");
|
||||
}
|
||||
G4VSensitiveDetector * This
|
||||
= dynamic_cast<G4VSensitiveDetector *>(this);
|
||||
if(!This)
|
||||
{
|
||||
G4Exception("G4VGFlashSensitiveDetector::Hit()",
|
||||
"InvalidSetup", FatalException,
|
||||
"Needs also to inherit from G4VSensitiveDetector!");
|
||||
}
|
||||
if(This->isActive())
|
||||
{
|
||||
G4VReadOutGeometry * ROgeometry = 0;
|
||||
G4VReadOutGeometry * ROgeometry = 0;
|
||||
G4TouchableHistory* ROhis = 0;
|
||||
|
||||
if(This) ROgeometry = This->GetROgeometry();
|
||||
if(ROgeometry)
|
||||
{
|
||||
// fake pre-step point for touchable from read-out geometry.
|
||||
G4Step fakeStep;
|
||||
G4StepPoint * tmpPoint = fakeStep.GetPreStepPoint();
|
||||
tmpPoint->SetTouchableHandle(aSpot->GetTouchableHandle());
|
||||
tmpPoint->SetPosition(aSpot->GetPosition());
|
||||
tmpPoint->SetMomentumDirection(aSpot->GetOriginatorTrack()->GetPrimaryTrack()->GetMomentumDirection());
|
||||
result = ROgeometry->CheckROVolume(&fakeStep, ROhis);
|
||||
}
|
||||
if(result) result = ProcessHits(aSpot, ROhis);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
return result;
|
||||
if(This) ROgeometry = This->GetROgeometry();
|
||||
if(ROgeometry)
|
||||
{
|
||||
// fake pre-step point for touchable from read-out geometry.
|
||||
G4Step fakeStep;
|
||||
G4StepPoint * tmpPoint = fakeStep.GetPreStepPoint();
|
||||
tmpPoint->SetTouchableHandle(aSpot->GetTouchableHandle());
|
||||
tmpPoint->SetPosition(aSpot->GetPosition());
|
||||
tmpPoint->SetMomentumDirection(aSpot->GetOriginatorTrack()
|
||||
->GetPrimaryTrack()->GetMomentumDirection());
|
||||
result = ROgeometry->CheckROVolume(&fakeStep, ROhis);
|
||||
}
|
||||
if(result) result = ProcessHits(aSpot, ROhis);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
// This is the public method invoked by GFlashHitMaker for generating
|
||||
// hit(s). The actual user's implementation for generating hit(s) must be
|
||||
// implemented in GenerateHits() virtual protected method.
|
||||
|
||||
protected: // with description
|
||||
|
||||
virtual G4bool ProcessHits(G4GFlashSpot*aSpot,
|
||||
G4TouchableHistory*ROhist) = 0;
|
||||
// The user MUST implement this method for generating hit(s) from the
|
||||
// GFlashSpots. Be aware that this method is a protected method and it
|
||||
// will be invoked by Hit() method of the Base class once the Readout
|
||||
// geometry that may be associated to the corresponding
|
||||
// G4VSensitiveDetector was taken into account.
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -20,27 +20,46 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Created by Joanna Weng, 9.11.04
|
||||
//
|
||||
// $Id: GFlashEnergySpot.hh,v 1.4 2005/10/04 09:08:33 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// GFlashEnergySpot
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Alternative definition of energy spot for GFlash parameterisation.
|
||||
|
||||
//
|
||||
// Author: Joanna Weng - 9.11.04
|
||||
//---------------------------------------------------------------
|
||||
#ifndef GFlashEnergySpot_h
|
||||
#define GFlashEnergySpot_h
|
||||
|
||||
#include "G4ThreeVector.hh"
|
||||
|
||||
class GFlashEnergySpot
|
||||
{
|
||||
public:
|
||||
GFlashEnergySpot();
|
||||
GFlashEnergySpot(const G4ThreeVector& point, G4double E);
|
||||
~GFlashEnergySpot();
|
||||
|
||||
inline void SetEnergy(const G4double& E) {Energy = E;}
|
||||
inline G4double GetEnergy() const {return Energy;}
|
||||
|
||||
inline void SetPosition(const G4ThreeVector& point) {Point = point;}
|
||||
inline G4ThreeVector GetPosition() const {return Point;}
|
||||
|
||||
private:
|
||||
G4double Energy; // energy deposition
|
||||
G4ThreeVector Point; // locus of energy deposition
|
||||
public:
|
||||
|
||||
GFlashEnergySpot();
|
||||
GFlashEnergySpot(const G4ThreeVector& point, G4double E);
|
||||
~GFlashEnergySpot();
|
||||
|
||||
inline void SetEnergy(const G4double& E) {Energy = E;}
|
||||
inline G4double GetEnergy() const {return Energy;}
|
||||
|
||||
inline void SetPosition(const G4ThreeVector& point) {Point = point;}
|
||||
inline G4ThreeVector GetPosition() const {return Point;}
|
||||
|
||||
private:
|
||||
|
||||
G4double Energy; // energy deposition
|
||||
G4ThreeVector Point; // locus of energy deposition
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -20,11 +20,25 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Created by Joanna Weng 9.11.2004
|
||||
//
|
||||
// $Id: GFlashHitMaker.hh,v 1.4 2005/10/04 09:08:33 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// GFlashHitMaker
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Singleton for GFlash parameterisation hit creation.
|
||||
|
||||
//
|
||||
// Author: Joanna Weng - 9.11.04
|
||||
//---------------------------------------------------------------
|
||||
#ifndef GFlashHitMaker_h
|
||||
#define GFlashHitMaker_h 1
|
||||
// has singleton semantics
|
||||
|
||||
#include "G4TouchableHandle.hh"
|
||||
#include "G4Navigator.hh"
|
||||
@@ -35,28 +49,26 @@
|
||||
|
||||
class GFlashHitMaker
|
||||
{
|
||||
public:
|
||||
GFlashHitMaker();
|
||||
~GFlashHitMaker();
|
||||
|
||||
void make(GFlashEnergySpot * aSpot, const G4FastTrack * aT );
|
||||
|
||||
private:
|
||||
G4TouchableHandle fTouchableHandle;
|
||||
G4Navigator *fpNavigator;
|
||||
G4bool fNaviSetup;
|
||||
|
||||
private:
|
||||
GFlashHitMaker(const GFlashHitMaker & )
|
||||
{
|
||||
G4Exception("GFlashHitMaker copy constructor not publicly available");
|
||||
}
|
||||
GFlashHitMaker & operator = (const GFlashHitMaker & )
|
||||
{
|
||||
G4Exception("GFlashHitMaker asignment operator not publicly available");
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
GFlashHitMaker();
|
||||
~GFlashHitMaker();
|
||||
|
||||
void make(GFlashEnergySpot * aSpot, const G4FastTrack * aT );
|
||||
|
||||
private:
|
||||
|
||||
G4TouchableHandle fTouchableHandle;
|
||||
G4Navigator *fpNavigator;
|
||||
G4bool fNaviSetup;
|
||||
|
||||
private:
|
||||
|
||||
GFlashHitMaker(const GFlashHitMaker & ) {}
|
||||
GFlashHitMaker & operator = (const GFlashHitMaker & )
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: GFlashHomoShowerParameterisation.hh,v 1.3 2005/11/30 19:29:44 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// GFlashHomoShowerParameterisation
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// GFlash homogeneous shower parameterisation.
|
||||
|
||||
// Author: Joanna Weng - 02.2004
|
||||
// ---------------------------------------------------------------
|
||||
#ifndef GFlashHomoShowerParameterisation_h
|
||||
#define GFlashHomoShowerParameterisation_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "GVFlashHomoShowerTuning.hh"
|
||||
#include "GVFlashShowerParameterisation.hh"
|
||||
|
||||
class G4Material;
|
||||
|
||||
class GFlashHomoShowerParameterisation : public GVFlashShowerParameterisation
|
||||
{
|
||||
public: // with description
|
||||
|
||||
GFlashHomoShowerParameterisation(G4Material * aMat,
|
||||
GVFlashHomoShowerTuning * aPar = 0);
|
||||
~GFlashHomoShowerParameterisation();
|
||||
|
||||
void ComputeRadialParameters(G4double y, G4double Tau);
|
||||
void GenerateLongitudinalProfile(G4double Energy);
|
||||
void ComputeZAX0EFFetc();
|
||||
|
||||
G4double IntegrateEneLongitudinal(G4double LongitudinalStep);
|
||||
G4double IntegrateNspLongitudinal(G4double LongitudinalStep);
|
||||
G4double ComputeTau(G4double LongitudinalPosition);
|
||||
|
||||
G4double GeneratePhi();
|
||||
G4double GenerateRadius(G4int ispot, G4double Energy,
|
||||
G4double LongitudinalPosition);
|
||||
G4double GenerateExponential(G4double Energy);
|
||||
void SetMaterial(G4Material *mat);
|
||||
|
||||
inline G4double GetAveR99() {return (3.5 * Rm);}
|
||||
inline G4double GetAveR90() {return (1.5 * Rm);} //ok
|
||||
|
||||
inline G4double GetAveTmx() {return (X0 * std::exp(AveLogTmaxh));}
|
||||
inline G4double GetAveT99() {return (X0 * AveLogTmaxh/(AveLogAlphah-1.00));}
|
||||
inline G4double GetAveT90() {return (2.5* X0*std::exp( AveLogTmaxh) );}
|
||||
|
||||
inline G4double GetNspot(){ return NSpot;}
|
||||
inline G4double GetX0(){return X0;}
|
||||
inline G4double GetEc(){return Ec;}
|
||||
inline G4double GetRm(){return Rm;}
|
||||
|
||||
private:
|
||||
|
||||
G4Material *material;
|
||||
|
||||
//Resolution
|
||||
G4double ConstantResolution;
|
||||
G4double NoiseResolution;
|
||||
G4double SamplingResolution;
|
||||
|
||||
// parametrization parameters
|
||||
GVFlashHomoShowerTuning * thePar;
|
||||
|
||||
// Cashed parameters:
|
||||
// Longitudinal Coefficients for a homogeneous calo
|
||||
G4double ParAveT1;
|
||||
G4double ParAveA1,ParAveA2,ParAveA3;
|
||||
G4double ParSigLogT1,ParSigLogT2;
|
||||
G4double ParSigLogA1,ParSigLogA2;
|
||||
G4double ParRho1,ParRho2;
|
||||
|
||||
void ComputeLongitudinalParameters(G4double y);
|
||||
void GenerateEnergyProfile(G4double y);
|
||||
void GenerateNSpotProfile(G4double y);
|
||||
|
||||
// Radial Coefficients
|
||||
G4double ParRC1,ParRC2,ParRC3,ParRC4;
|
||||
G4double ParWC1,ParWC2,ParWC3;
|
||||
G4double ParWC4,ParWC5,ParWC6;
|
||||
G4double ParRT1,ParRT2,ParRT3,ParRT4;
|
||||
G4double ParRT5,ParRT6;
|
||||
|
||||
// Spot multiplicity Coefficients
|
||||
G4double ParSpotT1,ParSpotT2,ParSpotA1, ParSpotA2;
|
||||
G4double ParSpotN1,ParSpotN2;
|
||||
|
||||
// PARAMETRISATION variables (Energy & position dependent)
|
||||
// Longitudinal
|
||||
// homogeneous
|
||||
G4double AveLogAlphah,AveLogTmaxh;
|
||||
G4double SigmaLogAlphah,SigmaLogTmaxh;
|
||||
G4double Rhoh;
|
||||
G4double Alphah,Tmaxh,Betah;
|
||||
|
||||
// Multiplicity
|
||||
G4double NSpot,AlphaNSpot,TNSpot,BetaNSpot;
|
||||
|
||||
//Radial
|
||||
G4double RadiusCore, WeightCore,RadiusTail;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Created by J. Weng 02.2004
|
||||
#ifndef GFlashHomoShowerParamterisation_h
|
||||
#define GFlashHomoShowerParamterisation_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "GVFlashHomoShowerTuning.hh"
|
||||
|
||||
class G4Material;
|
||||
class GFlashHomoShowerParamterisation
|
||||
{
|
||||
public:
|
||||
GFlashHomoShowerParamterisation(G4Material * aMat, GVFlashHomoShowerTuning * aPar = 0);
|
||||
~GFlashHomoShowerParamterisation();
|
||||
|
||||
void ComputeRadialParameters(G4double y, G4double Tau);
|
||||
void GenerateLongitudinalProfile(G4double Energy);
|
||||
void ComputeZAX0EFFetc();
|
||||
|
||||
G4double IntegrateEneLongitudinal(G4double LongitudinalStep);
|
||||
G4double IntegrateNspLongitudinal(G4double LongitudinalStep);
|
||||
G4double ComputeTau(G4double LongitudinalPosition);
|
||||
|
||||
G4double GeneratePhi();
|
||||
G4double GenerateRadius(G4int ispot, G4double Energy, G4double LongitudinalPosition);
|
||||
G4double GenerateExponential(G4double Energy);
|
||||
|
||||
//Gets
|
||||
//R
|
||||
inline G4double GetAveR99() {return (3.5 * Rm);}
|
||||
inline G4double GetAveR90() {return (1.5 * Rm);} //ok
|
||||
//T
|
||||
inline G4double GetAveTmx() {return (X0 * std::exp(AveLogTmaxh));} //exp ?
|
||||
inline G4double GetAveT99() {return (X0 * AveLogTmaxh/(AveLogAlphah-1.00));}
|
||||
inline G4double GetAveT90() {return (2.5 * X0 * std::exp( AveLogTmaxh) );}
|
||||
//
|
||||
inline G4double GetNspot(){ return NSpot;}
|
||||
G4double GetEffZ(const G4Material * material);
|
||||
G4double GetEffA(const G4Material * material);
|
||||
G4double gam(G4double x, G4double a) const; // @@@@ gamma function
|
||||
|
||||
private:
|
||||
// medium related quantities
|
||||
G4double density, A, Z, X0, Ec, Rm;
|
||||
G4Material *material;
|
||||
|
||||
public:
|
||||
inline G4double GetX0(){return X0;}
|
||||
inline G4double GetEc(){return Ec;}
|
||||
inline G4double GetRm(){return Rm;}
|
||||
void SetMaterial (G4Material *mat);
|
||||
void PrintMaterial();
|
||||
|
||||
private:
|
||||
//Resolution
|
||||
G4double ConstantResolution;
|
||||
G4double NoiseResolution;
|
||||
G4double SamplingResolution;
|
||||
|
||||
// parametrization parameters
|
||||
GVFlashHomoShowerTuning * thePar;
|
||||
|
||||
// Cashed parameters:
|
||||
// Longitudinal Coefficients for a homogenious calo
|
||||
G4double ParAveT1;
|
||||
G4double ParAveA1,ParAveA2,ParAveA3;
|
||||
G4double ParSigLogT1,ParSigLogT2;
|
||||
G4double ParSigLogA1,ParSigLogA2;
|
||||
G4double ParRho1,ParRho2;
|
||||
|
||||
void ComputeLongitudinalParameters(G4double y);
|
||||
void GenerateEnergyProfile(G4double y);
|
||||
void GenerateNSpotProfile(G4double y);
|
||||
|
||||
// Radial Coefficients
|
||||
G4double ParRC1,ParRC2,ParRC3,ParRC4;
|
||||
G4double ParWC1,ParWC2,ParWC3;
|
||||
G4double ParWC4,ParWC5,ParWC6;
|
||||
G4double ParRT1,ParRT2,ParRT3,ParRT4;
|
||||
G4double ParRT5,ParRT6;
|
||||
|
||||
//Spot multiplicity Coefficients
|
||||
G4double ParSpotT1,ParSpotT2,ParSpotA1, ParSpotA2;
|
||||
G4double ParSpotN1,ParSpotN2;
|
||||
|
||||
//PARAMETRISATION variables (Energy & position dependent)
|
||||
//Longitudinal
|
||||
//homogenous
|
||||
G4double AveLogAlphah,AveLogTmaxh;
|
||||
G4double SigmaLogAlphah,SigmaLogTmaxh;
|
||||
G4double Rhoh;
|
||||
G4double Alphah,Tmaxh,Betah;
|
||||
|
||||
//MMultiplicity
|
||||
G4double NSpot,AlphaNSpot,TNSpot,BetaNSpot;
|
||||
|
||||
//Radial
|
||||
G4double RadiusCore, WeightCore,RadiusTail;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -20,8 +20,23 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Created by Joanna Weng 9.11.2004
|
||||
//
|
||||
// $Id: GFlashParticleBounds.hh,v 1.3 2005/10/04 09:08:33 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// GFlashParticleBounds
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// GFlash parameterisation particle bounds.
|
||||
|
||||
//
|
||||
// Author: Joanna Weng - 9.11.04
|
||||
//---------------------------------------------------------------
|
||||
#ifndef GFlashParticleBounds_h
|
||||
#define GFlashParticleBounds_h
|
||||
|
||||
@@ -29,24 +44,30 @@
|
||||
|
||||
class GFlashParticleBounds
|
||||
{
|
||||
public:
|
||||
GFlashParticleBounds();
|
||||
~GFlashParticleBounds();
|
||||
|
||||
// methods to get/set ELE/Gamma max & min energy bounds
|
||||
G4double GetMinEneToParametrise(G4ParticleDefinition &particleType);
|
||||
G4double GetMaxEneToParametrise(G4ParticleDefinition &particleType);
|
||||
G4double GetEneToKill(G4ParticleDefinition &particleType) ;
|
||||
|
||||
void SetMinEneToParametrise(G4ParticleDefinition &particleType,G4double enemin);
|
||||
void SetMaxEneToParametrise(G4ParticleDefinition &particleType,G4double enemax);
|
||||
void SetEneToKill(G4ParticleDefinition &particleType,G4double enekill);
|
||||
private:
|
||||
|
||||
// electron and positron
|
||||
G4double EMinEneToParametrise;
|
||||
G4double EMaxEneToParametrise;
|
||||
G4double EEneToKill;
|
||||
public: // with description
|
||||
|
||||
GFlashParticleBounds();
|
||||
~GFlashParticleBounds();
|
||||
|
||||
// methods to get/set ELE/Gamma max & min energy bounds
|
||||
|
||||
G4double GetMinEneToParametrise(G4ParticleDefinition &particleType);
|
||||
G4double GetMaxEneToParametrise(G4ParticleDefinition &particleType);
|
||||
G4double GetEneToKill(G4ParticleDefinition &particleType) ;
|
||||
|
||||
void SetMinEneToParametrise(G4ParticleDefinition &particleType,
|
||||
G4double enemin);
|
||||
void SetMaxEneToParametrise(G4ParticleDefinition &particleType,
|
||||
G4double enemax);
|
||||
void SetEneToKill(G4ParticleDefinition &particleType,
|
||||
G4double enekill);
|
||||
|
||||
private:
|
||||
|
||||
// electron and positron
|
||||
G4double EMinEneToParametrise;
|
||||
G4double EMaxEneToParametrise;
|
||||
G4double EEneToKill;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,171 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: GFlashSamplingShowerParameterisation.hh,v 1.3 2005/11/30 19:29:44 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// GFlashSamplingShowerParameterisation
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// GFlash concrete sampling shower parameterisation
|
||||
|
||||
// Author: Joanna Weng - 02.2004
|
||||
//---------------------------------------------------------------
|
||||
#ifndef GFlashSamplingShowerParameterisation_h
|
||||
#define GFlashSamplingShowerParameterisation_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "GFlashSamplingShowerTuning.hh"
|
||||
#include "GVFlashShowerParameterisation.hh"
|
||||
|
||||
class G4Material;
|
||||
|
||||
class GFlashSamplingShowerParameterisation
|
||||
: public GVFlashShowerParameterisation
|
||||
{
|
||||
public:
|
||||
|
||||
GFlashSamplingShowerParameterisation(G4Material* aMat1, G4Material* aMat2,
|
||||
G4double d1, G4double d2,
|
||||
GFlashSamplingShowerTuning * aPar = 0);
|
||||
~GFlashSamplingShowerParameterisation();
|
||||
|
||||
void ComputeRadialParameters(G4double y, G4double Tau);
|
||||
void GenerateLongitudinalProfile(G4double Energy);
|
||||
void ComputeZAX0EFFetc();
|
||||
|
||||
G4double IntegrateEneLongitudinal(G4double LongitudinalStep);
|
||||
G4double IntegrateNspLongitudinal(G4double LongitudinalStep);
|
||||
G4double ComputeTau(G4double LongitudinalPosition);
|
||||
void SetMaterial(G4Material *mat1, G4Material *mat2);
|
||||
G4double GeneratePhi();
|
||||
G4double GenerateRadius(G4int ispot, G4double Energy,
|
||||
G4double LongitudinalPosition);
|
||||
G4double GenerateExponential(G4double Energy);
|
||||
|
||||
inline G4double GetAveR99() {return (3.5 * Rmeff);}
|
||||
inline G4double GetAveR90() {return (1.5 * Rmeff);} //ok
|
||||
//
|
||||
inline G4double GetAveTmx() {return (X0eff*std::exp(AveLogTmax));}
|
||||
inline G4double GetAveT99() {return (X0eff*AveLogTmax/(AveLogAlpha-1.00));}
|
||||
inline G4double GetAveT90() {return (2.5* X0eff* std::exp( AveLogTmax));}
|
||||
//
|
||||
inline G4double GetNspot() {return NSpot;}
|
||||
inline G4double GetX0() {return X0eff;}
|
||||
inline G4double GetEc() {return Eceff;}
|
||||
inline G4double GetRm() {return Rmeff;}
|
||||
|
||||
G4double ApplySampling(const G4double DEne, const G4double Energy);
|
||||
|
||||
private:
|
||||
|
||||
// medium related quantities
|
||||
//
|
||||
G4Material *material1, *material2 ;
|
||||
G4double density1, A1, Z1, X01, Ec1, Rm1, d1;
|
||||
G4double density2, A2, Z2, X02, Ec2, Rm2, d2;
|
||||
G4double Aeff, Rhoeff, X0eff, Eceff, Rmeff, Fs, ehat, Zeff;
|
||||
|
||||
// Resolution
|
||||
//
|
||||
G4double ConstantResolution;
|
||||
G4double NoiseResolution;
|
||||
G4double SamplingResolution;
|
||||
|
||||
// parametrization parameters
|
||||
//
|
||||
GFlashSamplingShowerTuning * thePar;
|
||||
|
||||
// Cashed parameters:
|
||||
// Longitudinal Coefficients for a homogenious calo
|
||||
//
|
||||
G4double ParAveT1, ParAveT2;
|
||||
G4double ParAveA1,ParAveA2, ParAveA3;
|
||||
G4double ParSigLogT1,ParSigLogT2;
|
||||
G4double ParSigLogA1,ParSigLogA2;
|
||||
G4double ParRho1,ParRho2;
|
||||
|
||||
//Cashed parameters:
|
||||
// Longitudinal Coefficients for a sampling calo
|
||||
//
|
||||
G4double ParsAveT1, ParsAveT2;
|
||||
G4double ParsAveA1,ParsAveA2;
|
||||
G4double ParsSigLogT1,ParsSigLogT2;
|
||||
G4double ParsSigLogA1,ParsSigLogA2;
|
||||
G4double ParsRho1,ParsRho2;
|
||||
void ComputeLongitudinalParameters(G4double y);
|
||||
void GenerateEnergyProfile(G4double y);
|
||||
void GenerateNSpotProfile(G4double y);
|
||||
|
||||
// Radial Coefficients homo
|
||||
//
|
||||
G4double ParRC1,ParRC2,ParRC3,ParRC4;
|
||||
G4double ParWC1,ParWC2,ParWC3;
|
||||
G4double ParWC4,ParWC5,ParWC6;
|
||||
G4double ParRT1,ParRT2,ParRT3,ParRT4;
|
||||
G4double ParRT5,ParRT6;
|
||||
|
||||
// Radial Coefficients sampling
|
||||
//
|
||||
G4double ParsRC1,ParsRC2;
|
||||
G4double ParsWC1,ParsWC2;
|
||||
G4double ParsRT1,ParsRT2;
|
||||
|
||||
// Spot multiplicity Coefficients
|
||||
//
|
||||
G4double ParsSpotT1,ParsSpotT2,ParsSpotA1, ParsSpotA2;
|
||||
G4double ParsSpotN1,ParsSpotN2;
|
||||
|
||||
// PARAMETRISATION variables (Energy & position dependent)
|
||||
// Longitudinal
|
||||
// homogeneous
|
||||
//
|
||||
G4double AveLogAlphah,AveLogTmaxh;
|
||||
G4double SigmaLogAlphah,SigmaLogTmaxh;
|
||||
G4double Rhoh;
|
||||
G4double Alphah,Tmaxh,Betah;
|
||||
|
||||
// PARAMETRISATION variables (Energy & position dependent)
|
||||
// Longitudinal
|
||||
// sampling
|
||||
//
|
||||
G4double AveLogAlpha,AveLogTmax;
|
||||
G4double SigmaLogAlpha,SigmaLogTmax;
|
||||
G4double Rho;
|
||||
G4double Alpha,Tmax,Beta;
|
||||
|
||||
// Multiplicity
|
||||
//
|
||||
G4double NSpot,AlphaNSpot,TNSpot,BetaNSpot;
|
||||
|
||||
//Radial
|
||||
//
|
||||
G4double RadiusCore, WeightCore,RadiusTail;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,123 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: GFlashSamplingShowerTuning.hh,v 1.2 2005/11/30 19:17:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// GFlashSamplingShowerTuning
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Tuning class for GFlash homogeneous shower parameterisation.
|
||||
// Definitions:
|
||||
// <t>: shower center of gravity
|
||||
// T: Depth at shower maximum
|
||||
// Ec: Critical energy
|
||||
// X0: Radiation length
|
||||
// y = E/Ec
|
||||
//
|
||||
// Please, see hep-ex/0001020 for details.
|
||||
|
||||
// Author: Joanna Weng - 11.2005
|
||||
//---------------------------------------------------------------
|
||||
#ifndef GFlashSamplingShowerTuning_hh
|
||||
#define GFlashSamplingShowerTuning_hh
|
||||
|
||||
#include "GVFlashHomoShowerTuning.hh"
|
||||
|
||||
class GFlashSamplingShowerTuning : public GVFlashHomoShowerTuning
|
||||
{
|
||||
public: // with description
|
||||
|
||||
G4double ParsAveT1(){ return -0.55;} // t1
|
||||
G4double ParsAveT2(){ return -0.69;} // t2
|
||||
// T_sam = log(exp( log T_hom) + t1*Fs-1 + t2*(1-ehat))
|
||||
|
||||
G4double ParsAveA1(){ return -0.476; } // a1
|
||||
// alpha_sam = log(exp(log alphah_hom) +(a1*Fs-1))
|
||||
|
||||
G4double ParsSigLogT1(){ return -2.5;} // t1
|
||||
G4double ParsSigLogT2(){ return 1.25;} // t2
|
||||
// std::sqrt(var(ln(T_sam))) = 1/(t+t2*ln(y))
|
||||
|
||||
G4double ParsSigLogA1(){ return -0.82;} // a1
|
||||
G4double ParsSigLogA2(){ return 0.79; } // a2
|
||||
// std::sqrt(var(ln(alpha_sam))) = 1/(a1+a2*ln(y))
|
||||
|
||||
G4double ParsRho1(){ return 0.784; } // r1
|
||||
G4double ParsRho2(){ return -0.023;} // r2
|
||||
// Correlation(ln(T),ln(alpha))=r1+r2*ln(y)
|
||||
|
||||
// Radial profiles
|
||||
// f(r) := (1/dE(t))(dE(t,r)/dr)
|
||||
// Ansatz:
|
||||
// f(r) = p(2*r*Rc**2)/(r**2+Rc**2)**2+(1-p)*(2*r*Rt**2)/(r**2+Rt**2)**2,
|
||||
// 0<p<1
|
||||
|
||||
G4double ParsRC1(){ return -0.0203; } // c1
|
||||
G4double ParsRC2(){ return 0.0397; } // c2
|
||||
// Rc_sam = Rc_hom + c1 * (1-ehat) + c2 *Fs-1*exp (-tau)
|
||||
|
||||
G4double ParsRT1(){ return -0.14; } // t1
|
||||
G4double ParsRT2(){ return -0.495; } // t2
|
||||
// Rt_sam = Rc_hom + t1 * (1-ehat) + t2 *Fs-1*exp (-tau)
|
||||
|
||||
G4double ParsWC1(){ return 0.348; } // c1
|
||||
G4double ParsWC2(){ return -0.642;} // c2
|
||||
// W_sam = W_hom + (1-ehat)*(c1 + c2 *Fs-1 * exp (- (tau -1 )**2))
|
||||
|
||||
// Fluctuations on radial profiles through number of spots
|
||||
// The total number of spots needed for a shower is
|
||||
|
||||
G4double ParsSpotN1(){ return 10.3; } // n1
|
||||
G4double ParsSpotN2(){ return 0.959;} // n2
|
||||
// Ns = n1*ln(Z)(E/GeV)**n2
|
||||
|
||||
// The number of spots per longitudinal interval is:
|
||||
// (1/Ns)(dNs(t)/dt) = f(t)
|
||||
// = (beta*t)**(alpha-1)*beta*std::exp(-beta*t)/Gamma(alpha)
|
||||
// <t> = alpha_s/beta_s
|
||||
// Ts = (alpha_s-1)/beta_s
|
||||
// and
|
||||
// Ts = T*(t1+t2*Z)
|
||||
// alpha_s = alpha*(a1+a2*Z)
|
||||
|
||||
G4double ParsSpotT1(){ return 0.813; } // t1
|
||||
G4double ParsSpotT2(){ return 0.0019;} // t2
|
||||
|
||||
G4double ParsSpotA1(){ return 0.844; } //a1
|
||||
G4double ParsSpotA2(){ return 0.0026;} //a2
|
||||
|
||||
// Resolution
|
||||
|
||||
G4double ConstantResolution(){ return 0.00; }
|
||||
G4double NoiseResolution() { return 0.00; } // not used
|
||||
G4double SamplingResolution(){ return 0.11; } // not used
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -20,8 +20,22 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// Created by E.Barberio, Joanna Weng 9.11.2004
|
||||
//
|
||||
// $Id: GFlashShowerModel.hh,v 1.8 2005/11/30 19:29:44 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// GFlashShowerModel
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// GFlash parameterisation shower model.
|
||||
|
||||
// Authors: E.Barberio & Joanna Weng - 9.11.04
|
||||
//---------------------------------------------------------------
|
||||
#ifndef GFlashShowerModel_h
|
||||
#define GFlashShowerModel_h 1
|
||||
|
||||
@@ -37,55 +51,72 @@
|
||||
#include "GFlashHitMaker.hh"
|
||||
#include <vector>
|
||||
|
||||
class GFlashHomoShowerParamterisation;
|
||||
class GVFlashShowerParameterisation;
|
||||
class GFlashHomoShowerParameterisation;
|
||||
class GFlashSamplingShowerParameterisation;
|
||||
|
||||
class GFlashShowerModel : public G4VFastSimulationModel
|
||||
{
|
||||
public:
|
||||
/// Constructor, destructor
|
||||
GFlashShowerModel (G4String, G4LogicalVolume*);
|
||||
GFlashShowerModel (G4String);
|
||||
~GFlashShowerModel ();
|
||||
|
||||
/// Checks whether conditions of fast
|
||||
/// parametrisation are fullfilled
|
||||
G4bool ModelTrigger(const G4FastTrack &);
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
void DoIt(const G4FastTrack&, G4FastStep&);
|
||||
|
||||
// setting
|
||||
inline void SetFlagParamType(G4int I) { FlagParamType = I; }
|
||||
inline void SetFlagParticleContainment(G4int I) { FlagParticleContainment = I; }
|
||||
inline void SetStepInX0(G4double Lenght) { StepInX0=Lenght; }
|
||||
inline void SetParametrisation(GFlashHomoShowerParamterisation &DetectorParametrisation){ Parametrisation=&DetectorParametrisation;}
|
||||
inline void SetHitMaker(GFlashHitMaker &Maker){ HMaker=&Maker;}
|
||||
inline void SetParticleBounds(GFlashParticleBounds &SpecificBound){PBound =&SpecificBound;}
|
||||
|
||||
//getting
|
||||
inline G4int GetFlagParamType() { return FlagParamType; }
|
||||
inline G4int GetFlagParticleContainment() { return FlagParticleContainment; }
|
||||
inline G4double GetStepInX0() { return StepInX0; }
|
||||
// Gets ?
|
||||
GFlashParticleBounds *PBound;
|
||||
|
||||
private:
|
||||
GFlashHomoShowerParamterisation *Parametrisation;
|
||||
GFlashHitMaker *HMaker;
|
||||
GFlashShowerModelMessenger* Messenger;
|
||||
|
||||
//Control Flags
|
||||
G4int FlagParamType; ///0=no GFlash 1=only em showers parametrized
|
||||
G4int FlagParticleContainment; ///0=no check ///1=only fully contained...
|
||||
G4double StepInX0;
|
||||
G4double EnergyStop;
|
||||
|
||||
// private methods
|
||||
void ElectronDoIt(const G4FastTrack&, G4FastStep&);
|
||||
// void GammaDoIt(const G4FastTrack&, G4FastStep&);
|
||||
// void NeutrinoDoIt(const G4FastTrack&, G4FastStep&);
|
||||
G4bool CheckParticleDefAndContainment(const G4FastTrack &fastTrack);
|
||||
G4bool CheckContainment(const G4FastTrack &fastTrack);
|
||||
|
||||
public: // with description
|
||||
|
||||
GFlashShowerModel (G4String, G4Envelope*);
|
||||
GFlashShowerModel (G4String);
|
||||
~GFlashShowerModel ();
|
||||
// Constructors, destructor
|
||||
|
||||
G4bool ModelTrigger(const G4FastTrack &);
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
void DoIt(const G4FastTrack&, G4FastStep&);
|
||||
// Checks whether conditions of fast parameterisation are fullfilled
|
||||
|
||||
// setting
|
||||
|
||||
inline void SetFlagParamType(G4int I)
|
||||
{ FlagParamType = I; }
|
||||
inline void SetFlagParticleContainment(G4int I)
|
||||
{ FlagParticleContainment = I; }
|
||||
inline void SetStepInX0(G4double Lenght)
|
||||
{ StepInX0=Lenght; }
|
||||
inline void SetParameterisation(GVFlashShowerParameterisation &DP)
|
||||
{ Parameterisation=&DP;}
|
||||
inline void SetHitMaker(GFlashHitMaker &Maker)
|
||||
{ HMaker=&Maker; }
|
||||
inline void SetParticleBounds(GFlashParticleBounds &SpecificBound)
|
||||
{ PBound =&SpecificBound; }
|
||||
|
||||
// getting
|
||||
|
||||
inline G4int GetFlagParamType()
|
||||
{ return FlagParamType; }
|
||||
inline G4int GetFlagParticleContainment()
|
||||
{ return FlagParticleContainment; }
|
||||
inline G4double GetStepInX0()
|
||||
{ return StepInX0; }
|
||||
|
||||
public: // without description
|
||||
|
||||
// Gets ?
|
||||
GFlashParticleBounds *PBound;
|
||||
GVFlashShowerParameterisation *Parameterisation;
|
||||
|
||||
private:
|
||||
|
||||
void ElectronDoIt(const G4FastTrack&, G4FastStep&);
|
||||
// void GammaDoIt(const G4FastTrack&, G4FastStep&);
|
||||
// void NeutrinoDoIt(const G4FastTrack&, G4FastStep&);
|
||||
G4bool CheckParticleDefAndContainment(const G4FastTrack &fastTrack);
|
||||
G4bool CheckContainment(const G4FastTrack &fastTrack);
|
||||
|
||||
private:
|
||||
|
||||
GFlashHitMaker *HMaker;
|
||||
GFlashShowerModelMessenger* Messenger;
|
||||
|
||||
//Control Flags
|
||||
G4int FlagParamType; ///0=no GFlash 1=only em showers parametrized
|
||||
G4int FlagParticleContainment; ///0=no check ///1=only fully contained...
|
||||
G4double StepInX0;
|
||||
G4double EnergyStop;
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -20,7 +20,23 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Created by Joanna Weng, 9.11.04
|
||||
//
|
||||
// $Id: GFlashShowerModelMessenger.hh,v 1.3 2005/10/04 09:08:33 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// GFlashShowerModelMessenger
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Messenger for the GFlash parameterisation shower model control.
|
||||
|
||||
//
|
||||
// Author: Joanna Weng - 9.11.04
|
||||
//---------------------------------------------------------------
|
||||
|
||||
#ifndef GFlashShowerModelMessenger_h
|
||||
#define GFlashShowerModelMessenger_h 1
|
||||
@@ -37,37 +53,25 @@ class G4UIcmdWithADouble;
|
||||
|
||||
class GFlashShowerModelMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
GFlashShowerModelMessenger(GFlashShowerModel * myModel);
|
||||
~GFlashShowerModelMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand * command,G4String newValues);
|
||||
G4String GetCurrentValue(G4UIcommand * command);
|
||||
|
||||
private:
|
||||
GFlashShowerModel* myModel;
|
||||
G4UIdirectory* myParaDir;
|
||||
G4UIcmdWithAString* SwitchCmd;
|
||||
G4UIcmdWithAnInteger* FlagCmd;
|
||||
G4UIcmdWithAnInteger* ContCmd; // Containment Check
|
||||
G4UIcmdWithADouble* StepInX0Cmd;
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* EmaxCmd;
|
||||
G4UIcmdWithADoubleAndUnit* EminCmd;
|
||||
G4UIcmdWithADoubleAndUnit* EkillCmd;
|
||||
public:
|
||||
|
||||
GFlashShowerModelMessenger(GFlashShowerModel * myModel);
|
||||
~GFlashShowerModelMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand * command,G4String newValues);
|
||||
G4String GetCurrentValue(G4UIcommand * command);
|
||||
|
||||
private:
|
||||
|
||||
GFlashShowerModel* myModel;
|
||||
G4UIdirectory* myParaDir;
|
||||
G4UIcmdWithAString* SwitchCmd;
|
||||
G4UIcmdWithAnInteger* FlagCmd;
|
||||
G4UIcmdWithAnInteger* ContCmd; // Containment Check
|
||||
G4UIcmdWithADouble* StepInX0Cmd;
|
||||
G4UIcmdWithADoubleAndUnit* EmaxCmd;
|
||||
G4UIcmdWithADoubleAndUnit* EminCmd;
|
||||
G4UIcmdWithADoubleAndUnit* EkillCmd;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -20,103 +20,120 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: GVFlashHomoShowerTuning.hh,v 1.6 2005/11/30 19:17:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// GVFlashHomoShowerTuning
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Tuning class for GFlash homogeneous shower parameterisation.
|
||||
// Definitions:
|
||||
// <t>: shower center of gravity
|
||||
// T: Depth at shower maximum
|
||||
// Ec: Critical energy
|
||||
// X0: Radiation length
|
||||
// y = E/Ec
|
||||
//
|
||||
// Homogeneous media:
|
||||
// Average shower profile
|
||||
// (1/E)(dE(t)/dt) = f(t)
|
||||
// = (beta*t)**(alpha-1)*beta*std::exp(-beta*t)/Gamma(alpha)
|
||||
// where Gamma is the Gamma function
|
||||
//
|
||||
// <t> = alpha/beta
|
||||
// T = (alpha-1)/beta
|
||||
// and
|
||||
// T = ln(y) + t1
|
||||
// alpha = a1+(a2+a3/Z)ln(y)
|
||||
|
||||
// Author: J.P. Wellisch - October 2004
|
||||
//---------------------------------------------------------------
|
||||
#ifndef GVFlashHomoShowerTuning_hh
|
||||
#define GVFlashHomoShowerTuning_hh
|
||||
|
||||
// J.P. Wellisch, Oct. 2004
|
||||
|
||||
class GVFlashHomoShowerTuning
|
||||
{
|
||||
public:
|
||||
// Definitions:
|
||||
// <t>: shower center of gravity
|
||||
// T: Depth at shower maximum
|
||||
// Ec: Critical energy
|
||||
// y = E/Ec
|
||||
// X0: Radiation length
|
||||
|
||||
// Homogeneous media:
|
||||
// Avarage shower profile
|
||||
// (1/E)(dE(t)/dt) = f(t) = (beta*t)**(alpha-1)*beta*std::exp(-beta*t)/Gamma(alpha)
|
||||
// where Gamma: The Gamma function
|
||||
//
|
||||
// <t> = alpha/beta
|
||||
// T = (alpha-1)/beta
|
||||
// and
|
||||
// T = ln(y) + t1
|
||||
// alpha = a1+(a2+a3/Z)ln(y)
|
||||
virtual G4double ParAveT1(){ return -0.858;} // t1
|
||||
virtual G4double ParAveA1(){ return 0.21; } // a1
|
||||
virtual G4double ParAveA2(){ return 0.492; } // a2
|
||||
virtual G4double ParAveA3(){ return 2.38; } // a3
|
||||
|
||||
// std::sqrt(var(ln(T))) = 1/(t+t2*ln(y))
|
||||
virtual G4double ParSigLogT1(){ return -1.4;} // t1
|
||||
virtual G4double ParSigLogT2(){ return 1.26;} // t2
|
||||
|
||||
// std::sqrt(var(ln(alpha))) = 1/(a1+a2*ln(y))
|
||||
virtual G4double ParSigLogA1(){ return -0.58;} // a1
|
||||
virtual G4double ParSigLogA2(){ return 0.86; } // a2
|
||||
|
||||
// Correlation(ln(T),ln(alpha))=r1+r2*ln(y)
|
||||
virtual G4double ParRho1(){ return 0.705; } // r1
|
||||
virtual G4double ParRho2(){ return -0.023;} // r2
|
||||
|
||||
// Radial profiles
|
||||
// f(r) := (1/dE(t))(dE(t,r)/dr)
|
||||
// Ansatz:
|
||||
// f(r) = p(2*r*Rc**2)/(r**2+Rc**2)**2+(1-p)*(2*r*Rt**2)/(r**2+Rt**2)**2, 0<p<1
|
||||
//
|
||||
// Rc (t/T)= z1 +z2*t/T
|
||||
// z1 = c1+c2*ln(E/GeV)
|
||||
// z2 = c3+c4*Z
|
||||
virtual G4double ParRC1(){ return 0.0251; } // c1
|
||||
virtual G4double ParRC2(){ return 0.00319; } // c2
|
||||
virtual G4double ParRC3(){ return 0.1162; } // c3
|
||||
virtual G4double ParRC4(){ return -0.000381;} // c4
|
||||
|
||||
// Rt (t/T)= k1*(std::exp(k3*(t/T-k2))+std::exp(k4*(t/T-k2)))
|
||||
// k1 = t1+t2*Z
|
||||
// k4 = t5+t6*ln(E/GeV)
|
||||
virtual G4double ParRT1(){ return 0.659; } // t1
|
||||
virtual G4double ParRT2(){ return -0.00309;} // t2
|
||||
virtual G4double ParRT3(){ return 0.645; } // k2
|
||||
virtual G4double ParRT4(){ return -2.59; } // k3
|
||||
virtual G4double ParRT5(){ return 0.3585; } // t5
|
||||
virtual G4double ParRT6(){ return 0.0412; } // t6
|
||||
|
||||
// p(t/T) = p1*std::exp((p2-t/T)/p3 - std::exp((p2-t/T)/p3))
|
||||
// p1 = c1+c2*Z
|
||||
// p2 = c3+c4*Z
|
||||
// p3 = c5 + c6*ln(E/GeV)
|
||||
virtual G4double ParWC1(){ return 2.632; } // c1
|
||||
virtual G4double ParWC2(){ return -0.00094;} // c2
|
||||
virtual G4double ParWC3(){ return 0.401; } // c3
|
||||
virtual G4double ParWC4(){ return 0.00187; } // c4
|
||||
virtual G4double ParWC5(){ return 1.313; } // c5
|
||||
virtual G4double ParWC6(){ return -0.0686; } // c6
|
||||
|
||||
// Fluctuations on radial profiles through number of spots
|
||||
// The total number of spots needed for a shower is
|
||||
// Ns = n1*ln(Z)(E/GeV)**n2
|
||||
virtual G4double ParSpotN1(){ return 93.; } // n1
|
||||
virtual G4double ParSpotN2(){ return 0.876;} // n2
|
||||
|
||||
// The number of spots per longitudinal interval is:
|
||||
// (1/Ns)(dNs(t)/dt) = f(t) = (beta*t)**(alpha-1)*beta*std::exp(-beta*t)/Gamma(alpha)
|
||||
// <t> = alpha_s/beta_s
|
||||
// Ts = (alpha_s-1)/beta_s
|
||||
// and
|
||||
// Ts = T*(t1+t2*Z)
|
||||
// alpha_s = alpha*(a1+a2*Z)
|
||||
virtual G4double ParSpotT1(){ return 0.698; } // t1
|
||||
virtual G4double ParSpotT2(){ return 0.00212;} // t2
|
||||
|
||||
virtual G4double ParSpotA1(){ return 0.639; } //a1
|
||||
virtual G4double ParSpotA2(){ return 0.00334;} //a2
|
||||
|
||||
public: // with description
|
||||
|
||||
virtual G4double ParAveT1(){ return -0.812;} // t1
|
||||
virtual G4double ParAveA1(){ return 0.81; } // a1
|
||||
virtual G4double ParAveA2(){ return 0.458; } // a2
|
||||
virtual G4double ParAveA3(){ return 2.26; } // a3
|
||||
|
||||
virtual G4double ParSigLogT1(){ return -1.4;} // t1
|
||||
virtual G4double ParSigLogT2(){ return 1.26;} // t2
|
||||
// std::sqrt(var(ln(T))) = 1/(t+t2*ln(y))
|
||||
|
||||
virtual G4double ParSigLogA1(){ return -0.58;} // a1
|
||||
virtual G4double ParSigLogA2(){ return 0.86; } // a2
|
||||
// std::sqrt(var(ln(alpha))) = 1/(a1+a2*ln(y))
|
||||
|
||||
virtual G4double ParRho1(){ return 0.705; } // r1
|
||||
virtual G4double ParRho2(){ return -0.023;} // r2
|
||||
// Correlation(ln(T),ln(alpha))=r1+r2*ln(y)
|
||||
|
||||
// Radial profiles
|
||||
// f(r) := (1/dE(t))(dE(t,r)/dr)
|
||||
// Ansatz:
|
||||
// f(r) = p(2*r*Rc**2)/(r**2+Rc**2)**2+(1-p)*(2*r*Rt**2)/(r**2+Rt**2)**2,
|
||||
// 0<p<1
|
||||
|
||||
virtual G4double ParRC1(){ return 0.0251; } // c1
|
||||
virtual G4double ParRC2(){ return 0.00319; } // c2
|
||||
virtual G4double ParRC3(){ return 0.1162; } // c3
|
||||
virtual G4double ParRC4(){ return -0.000381;} // c4
|
||||
// Rc (t/T)= z1 +z2*t/T
|
||||
// z1 = c1+c2*ln(E/GeV)
|
||||
// z2 = c3+c4*Z
|
||||
|
||||
virtual G4double ParRT1(){ return 0.659; } // t1
|
||||
virtual G4double ParRT2(){ return -0.00309;} // t2
|
||||
virtual G4double ParRT3(){ return 0.645; } // k2
|
||||
virtual G4double ParRT4(){ return -2.59; } // k3
|
||||
virtual G4double ParRT5(){ return 0.3585; } // t5
|
||||
virtual G4double ParRT6(){ return 0.0412; } // t6
|
||||
// Rt (t/T)= k1*(std::exp(k3*(t/T-k2))+std::exp(k4*(t/T-k2)))
|
||||
// k1 = t1+t2*Z
|
||||
// k4 = t5+t6*ln(E/GeV)
|
||||
|
||||
virtual G4double ParWC1(){ return 2.632; } // c1
|
||||
virtual G4double ParWC2(){ return -0.00094;} // c2
|
||||
virtual G4double ParWC3(){ return 0.401; } // c3
|
||||
virtual G4double ParWC4(){ return 0.00187; } // c4
|
||||
virtual G4double ParWC5(){ return 1.313; } // c5
|
||||
virtual G4double ParWC6(){ return -0.0686; } // c6
|
||||
// p(t/T) = p1*std::exp((p2-t/T)/p3 - std::exp((p2-t/T)/p3))
|
||||
// p1 = c1+c2*Z
|
||||
// p2 = c3+c4*Z
|
||||
// p3 = c5 + c6*ln(E/GeV)
|
||||
|
||||
virtual G4double ParSpotN1(){ return 93.; } // n1
|
||||
virtual G4double ParSpotN2(){ return 0.876;} // n2
|
||||
// Fluctuations on radial profiles through number of spots
|
||||
// The total number of spots needed for a shower is
|
||||
// Ns = n1*ln(Z)(E/GeV)**n2
|
||||
|
||||
// The number of spots per longitudinal interval is:
|
||||
// (1/Ns)(dNs(t)/dt) = f(t)
|
||||
// = (beta*t)**(alpha-1)*beta*std::exp(-beta*t)/Gamma(alpha)
|
||||
// <t> = alpha_s/beta_s
|
||||
// Ts = (alpha_s-1)/beta_s
|
||||
// and
|
||||
// Ts = T*(t1+t2*Z)
|
||||
// alpha_s = alpha*(a1+a2*Z)
|
||||
|
||||
virtual G4double ParSpotT1(){ return 0.698; } // t1
|
||||
virtual G4double ParSpotT2(){ return 0.00212;} // t2
|
||||
|
||||
virtual G4double ParSpotA1(){ return 0.639; } //a1
|
||||
virtual G4double ParSpotA2(){ return 0.00334;} //a2
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: GVFlashShowerParameterisation.hh,v 1.1 2005/11/30 19:29:44 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// GVFlashShowerParameterisation
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Base class for GFlash shower parameterisation.
|
||||
|
||||
// Author: Joanna Weng - 11.2005
|
||||
//---------------------------------------------------------------
|
||||
#ifndef GVFlashShowerParameterisation_h
|
||||
#define GVFlashShowerParameterisation_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "GVFlashHomoShowerTuning.hh"
|
||||
|
||||
class G4Material;
|
||||
|
||||
class GVFlashShowerParameterisation
|
||||
{
|
||||
public: // with description
|
||||
|
||||
GVFlashShowerParameterisation();
|
||||
virtual ~GVFlashShowerParameterisation();
|
||||
|
||||
virtual void ComputeRadialParameters(G4double y, G4double Tau) = 0;
|
||||
virtual void GenerateLongitudinalProfile(G4double Energy) = 0;
|
||||
virtual G4double IntegrateEneLongitudinal(G4double LongitudinalStep) = 0;
|
||||
virtual G4double IntegrateNspLongitudinal(G4double LongitudinalStep) = 0;
|
||||
virtual G4double ComputeTau(G4double LongitudinalPosition) = 0;
|
||||
virtual G4double GenerateRadius(G4int ispot, G4double Energy,
|
||||
G4double LongitudinalPosition) = 0;
|
||||
virtual void ComputeLongitudinalParameters(G4double y) = 0;
|
||||
virtual void GenerateEnergyProfile(G4double y) = 0;
|
||||
virtual void GenerateNSpotProfile(G4double y) = 0;
|
||||
virtual G4double GenerateExponential(G4double Energy) = 0;
|
||||
|
||||
virtual G4double GetAveR99() = 0;
|
||||
virtual G4double GetAveR90() = 0;
|
||||
|
||||
virtual G4double GetAveTmx() = 0;
|
||||
virtual G4double GetAveT99() = 0;
|
||||
virtual G4double GetAveT90() = 0;
|
||||
|
||||
virtual G4double GetNspot() = 0;
|
||||
virtual G4double GetX0() = 0;
|
||||
virtual G4double GetEc() = 0;
|
||||
virtual G4double GetRm() = 0;
|
||||
|
||||
G4double GeneratePhi();
|
||||
G4double GetEffZ(const G4Material * material);
|
||||
G4double GetEffA(const G4Material * material);
|
||||
G4double gam(G4double x, G4double a) const; // @@@@ gamma function
|
||||
void PrintMaterial(const G4Material * mat);
|
||||
|
||||
protected:
|
||||
|
||||
GVFlashHomoShowerTuning * thePar;
|
||||
// Parameterisation parameters
|
||||
G4double density, A, Z, X0, Ec, Rm;
|
||||
// Medium related quantities
|
||||
G4double NSpot;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -20,33 +20,51 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
// $Id: Gamma.hh,v 1.5 2005/10/04 09:08:33 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// Gamma
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Gamma function.
|
||||
|
||||
//---------------------------------------------------------------
|
||||
#ifndef MYGAMMA_H
|
||||
#define MYGAMMA_H
|
||||
|
||||
#include <cmath>
|
||||
|
||||
class MyGamma {
|
||||
public:
|
||||
MyGamma ();
|
||||
~MyGamma();
|
||||
|
||||
double Gamma(double z);
|
||||
double Gamma(double a,double x);
|
||||
private:
|
||||
double GamCf(double a,double x);
|
||||
double GamSer(double a,double x);
|
||||
|
||||
// Abs
|
||||
static short Abs(short d) { return (d > 0) ? d : -d; }
|
||||
static int Abs(int d) { return (d > 0) ? d : -d; }
|
||||
static long Abs(long d) { return (d > 0) ? d : -d; }
|
||||
static float Abs(float d){ return (d > 0) ? d : -d; }
|
||||
static double Abs(double d) { return (d > 0) ? d : -d; }
|
||||
static double LnGamma(double z);
|
||||
static double Log(double x){ return std::log(x); }
|
||||
static double Exp(double x){ return std::exp(x); }
|
||||
|
||||
|
||||
class MyGamma
|
||||
{
|
||||
public:
|
||||
|
||||
MyGamma ();
|
||||
~MyGamma();
|
||||
|
||||
double Gamma(double z);
|
||||
double Gamma(double a,double x);
|
||||
|
||||
private:
|
||||
|
||||
double GamCf(double a,double x);
|
||||
double GamSer(double a,double x);
|
||||
|
||||
// Abs
|
||||
static short Abs(short d) { return (d > 0) ? d : -d; }
|
||||
static int Abs(int d) { return (d > 0) ? d : -d; }
|
||||
static long Abs(long d) { return (d > 0) ? d : -d; }
|
||||
static float Abs(float d) { return (d > 0) ? d : -d; }
|
||||
static double Abs(double d) { return (d > 0) ? d : -d; }
|
||||
static double LnGamma(double z);
|
||||
static double Log(double x) { return std::log(x); }
|
||||
static double Exp(double x) { return std::exp(x); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user