Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-13 08:29:01

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 /// \file TestParameters.cc
0027 /// \brief Implementation of the TestParameters class
0028 
0029 //---------------------------------------------------------------------------
0030 //
0031 // ClassName:   TestParameters
0032 //
0033 // Author:      V.Ivanchenko 01.09.2010
0034 //
0035 //----------------------------------------------------------------------------
0036 //
0037 
0038 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0039 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0040 
0041 #include "TestParameters.hh"
0042 
0043 #include "G4SystemOfUnits.hh"
0044 #include "G4UnitsTable.hh"
0045 
0046 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0047 
0048 TestParameters* TestParameters::fManager = nullptr;
0049 
0050 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0051 
0052 TestParameters* TestParameters::GetPointer()
0053 {
0054   if (!fManager) {
0055     fManager = new TestParameters();
0056   }
0057   return fManager;
0058 }
0059 
0060 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0061 
0062 TestParameters::TestParameters()
0063 {
0064   fMaxEnergy = 100. * CLHEP::keV;
0065 
0066   // normalisation to PAI
0067   // fFactorALICE = 325;
0068 
0069   // normalisation to Opt0
0070   // fFactorALICE = 275;
0071 }
0072 
0073 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0074 
0075 void TestParameters::SetMaxEnergy(G4double value)
0076 {
0077   fMaxEnergy = value;
0078 }
0079 
0080 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0081 
0082 G4double TestParameters::GetMaxEnergy() const
0083 {
0084   return fMaxEnergy;
0085 }
0086 
0087 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0088 
0089 void TestParameters::SetNumberBins(G4int value)
0090 {
0091   fBinsE = value;
0092 }
0093 
0094 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0095 
0096 G4int TestParameters::GetNumberBins() const
0097 {
0098   return fBinsE;
0099 }
0100 
0101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0102 
0103 void TestParameters::SetNumberBinsCluster(G4int value)
0104 {
0105   fBinsCluster = value;
0106 }
0107 
0108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0109 
0110 G4int TestParameters::GetNumberBinsCluster() const
0111 {
0112   return fBinsCluster;
0113 }
0114 
0115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0116 
0117 void TestParameters::SetMaxCluster(G4int value)
0118 {
0119   fMaxCluster = value;
0120 }
0121 
0122 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0123 
0124 G4int TestParameters::GetMaxCluster() const
0125 {
0126   return fMaxCluster;
0127 }
0128 
0129 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0130 
0131 void TestParameters::SetEnergyPerChannel(G4double value)
0132 {
0133   if (value > 0.0) {
0134     fFactorALICE = 1. / value;
0135   }
0136 }
0137 
0138 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0139 
0140 G4double TestParameters::GetFactorALICE() const
0141 {
0142   return fFactorALICE;
0143 }
0144 
0145 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0146 
0147 void TestParameters::SetNormFactor(G4double value)
0148 {
0149   fNormFactor = value;
0150 }
0151 
0152 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0153 
0154 G4double TestParameters::GetNormFactor() const
0155 {
0156   return fNormFactor;
0157 }
0158 
0159 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0160 
0161 void TestParameters::SetEnergySmear(G4double value)
0162 {
0163   fEnergySmear = value;
0164 }
0165 
0166 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0167 
0168 G4double TestParameters::GetEnergySmear() const
0169 {
0170   return fEnergySmear;
0171 }
0172 
0173 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0174 
0175 void TestParameters::SetPositionZ(G4double val)
0176 {
0177   fPositionZ = val;
0178 }
0179 
0180 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0181 
0182 G4double TestParameters::GetPositionZ() const
0183 {
0184   return fPositionZ;
0185 }
0186 
0187 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0188 
0189 void TestParameters::SetBeamEnergy(G4double val)
0190 {
0191   fBeamEnergy = val;
0192 }
0193 
0194 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0195 
0196 G4double TestParameters::GetBeamEnergy() const
0197 {
0198   return fBeamEnergy;
0199 }
0200 
0201 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0202 
0203 void TestParameters::SetBeamParticle(const G4ParticleDefinition* ptr)
0204 {
0205   fParticle = ptr;
0206 }
0207 
0208 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0209 
0210 const G4ParticleDefinition* TestParameters::GetBeamParticle() const
0211 {
0212   return fParticle;
0213 }
0214 
0215 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......