Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-12 08:57:47

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 //
0028 //
0029 //---------------------------------------------------------------
0030 //  GEANT 4 class header file
0031 //
0032 //  GFlashSamplingShowerParameterisation
0033 //
0034 //  Class description:
0035 //
0036 //  GFlash concrete sampling shower parameterisation
0037 
0038 // Author: Joanna Weng - 02.2004
0039 //---------------------------------------------------------------
0040 #ifndef GFlashSamplingShowerParameterisation_h
0041 #define GFlashSamplingShowerParameterisation_h 1
0042 
0043 #include "globals.hh"
0044 #include "GFlashSamplingShowerTuning.hh"
0045 #include "GVFlashShowerParameterisation.hh"
0046 
0047 class G4Material;
0048 
0049 class GFlashSamplingShowerParameterisation : public GVFlashShowerParameterisation
0050 {
0051   public:
0052     GFlashSamplingShowerParameterisation(
0053       G4Material* aMat1, G4Material* aMat2, G4double d1, G4double d2,
0054       /// \param aMat1 passive material, \param dd1 - passive layer thickness
0055       /// \param aMat2 active material,  \param dd2 - acive layer thickness
0056 
0057       GFlashSamplingShowerTuning* aPar = 0);
0058     ~GFlashSamplingShowerParameterisation();
0059 
0060     void ComputeRadialParameters(G4double y, G4double Tau);
0061     void GenerateLongitudinalProfile(G4double Energy);
0062     void ComputeZAX0EFFetc();
0063 
0064     G4double IntegrateEneLongitudinal(G4double LongitudinalStep);
0065     G4double IntegrateNspLongitudinal(G4double LongitudinalStep);
0066     G4double ComputeTau(G4double LongitudinalPosition);
0067     void SetMaterial(G4Material* mat1, G4Material* mat2);
0068     G4double GeneratePhi();
0069     G4double GenerateRadius(G4int ispot, G4double Energy, G4double LongitudinalPosition);
0070     G4double GenerateExponential(G4double Energy);
0071 
0072     inline G4double GetAveR99() { return (3.5 * Rmeff); }
0073     inline G4double GetAveR90() { return (1.5 * Rmeff); }  // ok
0074     //
0075     inline G4double GetAveTmx() { return (X0eff * std::exp(AveLogTmax)); }
0076     inline G4double GetAveT99() { return (X0eff * AveLogTmax / (AveLogAlpha - 1.00)); }
0077     inline G4double GetAveT90() { return (2.5 * X0eff * std::exp(AveLogTmax)); }
0078     //
0079     inline G4double GetNspot() { return NSpot; }
0080     inline G4double GetX0() { return X0eff; }
0081     inline G4double GetEc() { return Eceff; }
0082     inline G4double GetRm() { return Rmeff; }
0083     inline G4double GetEffDensity() { return Rhoeff; }
0084 
0085     G4double ApplySampling(const G4double DEne, const G4double Energy);
0086 
0087   private:
0088     // medium related quantities
0089     //
0090     G4Material *material1, *material2;
0091     G4double density1, A1, Z1, X01, Ec1, Rm1, d1;
0092     G4double density2, A2, Z2, X02, Ec2, Rm2, d2;
0093     G4double Aeff, Rhoeff{1.0}, X0eff{1.0}, Eceff{1.0}, Rmeff{1.0}, Fs, ehat, Zeff;
0094 
0095     // Resolution
0096     //
0097     G4double ConstantResolution;
0098     G4double NoiseResolution;
0099     G4double SamplingResolution;
0100 
0101     // parametrization parameters
0102     //
0103     GFlashSamplingShowerTuning* thePar;
0104 
0105     // Cashed parameters:
0106     // Longitudinal Coefficients for a homogenious calo
0107     //
0108     G4double ParAveT1, ParAveT2;
0109     G4double ParAveA1, ParAveA2, ParAveA3;
0110     G4double ParSigLogT1, ParSigLogT2;
0111     G4double ParSigLogA1, ParSigLogA2;
0112     G4double ParRho1, ParRho2;
0113 
0114     // Cashed parameters:
0115     //  Longitudinal Coefficients for a sampling calo
0116     //
0117     G4double ParsAveT1, ParsAveT2;
0118     G4double ParsAveA1, ParsAveA2;
0119     G4double ParsSigLogT1, ParsSigLogT2;
0120     G4double ParsSigLogA1, ParsSigLogA2;
0121     G4double ParsRho1, ParsRho2;
0122     void ComputeLongitudinalParameters(G4double y);
0123     void GenerateEnergyProfile(G4double y);
0124     void GenerateNSpotProfile(G4double y);
0125 
0126     // Radial Coefficients homo
0127     //
0128     G4double ParRC1, ParRC2, ParRC3, ParRC4;
0129     G4double ParWC1, ParWC2, ParWC3;
0130     G4double ParWC4, ParWC5, ParWC6;
0131     G4double ParRT1, ParRT2, ParRT3, ParRT4;
0132     G4double ParRT5, ParRT6;
0133 
0134     // Radial Coefficients sampling
0135     //
0136     G4double ParsRC1, ParsRC2;
0137     G4double ParsWC1, ParsWC2;
0138     G4double ParsRT1, ParsRT2;
0139 
0140     // Spot multiplicity Coefficients
0141     //
0142     G4double ParsSpotT1, ParsSpotT2, ParsSpotA1, ParsSpotA2;
0143     G4double ParsSpotN1, ParsSpotN2;
0144 
0145     // PARAMETRISATION variables (Energy & position dependent)
0146     // Longitudinal
0147     // homogeneous
0148     //
0149     G4double AveLogAlphah, AveLogTmaxh;
0150     G4double SigmaLogAlphah, SigmaLogTmaxh;
0151     G4double Rhoh;
0152     G4double Alphah, Tmaxh, Betah;
0153 
0154     // PARAMETRISATION variables (Energy & position dependent)
0155     // Longitudinal
0156     // sampling
0157     //
0158     G4double AveLogAlpha, AveLogTmax;
0159     G4double SigmaLogAlpha, SigmaLogTmax;
0160     G4double Rho;
0161     G4double Alpha, Tmax, Beta;
0162 
0163     // Multiplicity
0164     //
0165     G4double NSpot, AlphaNSpot, TNSpot, BetaNSpot;
0166 
0167     // Radial
0168     //
0169     G4double RadiusCore, WeightCore, RadiusTail;
0170 };
0171 
0172 #endif