Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 /// \file electromagnetic/TestEm8/src/TestPara 26 /// \file electromagnetic/TestEm8/src/TestParameters.cc 27 /// \brief Implementation of the TestParameter 27 /// \brief Implementation of the TestParameters class 28 // 28 // >> 29 // $Id: TestParameters.cc 78707 2014-01-17 16:02:01Z gcosmo $ 29 // 30 // 30 //-------------------------------------------- 31 //--------------------------------------------------------------------------- 31 // 32 // 32 // ClassName: TestParameters 33 // ClassName: TestParameters 33 // 34 // 34 // Author: V.Ivanchenko 01.09.2010 35 // Author: V.Ivanchenko 01.09.2010 35 // 36 // 36 //-------------------------------------------- 37 //---------------------------------------------------------------------------- 37 // 38 // 38 39 39 //....oooOO0OOooo........oooOO0OOooo........oo 40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 40 //....oooOO0OOooo........oooOO0OOooo........oo 41 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 41 42 42 #include "TestParameters.hh" 43 #include "TestParameters.hh" 43 << 44 #include "G4SystemOfUnits.hh" << 45 #include "G4UnitsTable.hh" 44 #include "G4UnitsTable.hh" >> 45 #include "G4SystemOfUnits.hh" 46 46 47 //....oooOO0OOooo........oooOO0OOooo........oo 47 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 48 48 49 TestParameters* TestParameters::fManager = nul << 49 TestParameters* TestParameters::fManager = 0; 50 50 51 //....oooOO0OOooo........oooOO0OOooo........oo 51 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 52 52 53 TestParameters* TestParameters::GetPointer() 53 TestParameters* TestParameters::GetPointer() 54 { 54 { 55 if (!fManager) { << 55 if(!fManager) { 56 fManager = new TestParameters(); 56 fManager = new TestParameters(); 57 } 57 } 58 return fManager; 58 return fManager; 59 } 59 } 60 60 61 //....oooOO0OOooo........oooOO0OOooo........oo 61 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 62 62 63 TestParameters::TestParameters() 63 TestParameters::TestParameters() 64 { 64 { 65 fMaxEnergy = 100. * CLHEP::keV; << 65 fMaxEnergy = 100.*keV; >> 66 fBinsE = 100; >> 67 fBinsCluster = 1; >> 68 fMaxCluster = 1500; >> 69 fNormFactor = 1.0; >> 70 fEnergySmear = 0.0; >> 71 fPositionZ = 0.0; 66 72 67 // normalisation to PAI 73 // normalisation to PAI 68 // fFactorALICE = 325; << 74 fFactorALICE = 325; 69 75 70 // normalisation to Opt0 76 // normalisation to Opt0 71 // fFactorALICE = 275; << 77 //fFactorALICE = 275; 72 } 78 } 73 79 74 //....oooOO0OOooo........oooOO0OOooo........oo 80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 75 81 >> 82 TestParameters::~TestParameters() >> 83 {} >> 84 >> 85 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... >> 86 76 void TestParameters::SetMaxEnergy(G4double val 87 void TestParameters::SetMaxEnergy(G4double value) 77 { 88 { 78 fMaxEnergy = value; 89 fMaxEnergy = value; 79 } 90 } 80 91 81 //....oooOO0OOooo........oooOO0OOooo........oo 92 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 82 93 83 G4double TestParameters::GetMaxEnergy() const 94 G4double TestParameters::GetMaxEnergy() const 84 { 95 { 85 return fMaxEnergy; 96 return fMaxEnergy; 86 } 97 } 87 98 88 //....oooOO0OOooo........oooOO0OOooo........oo 99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 89 100 90 void TestParameters::SetNumberBins(G4int value 101 void TestParameters::SetNumberBins(G4int value) 91 { 102 { 92 fBinsE = value; 103 fBinsE = value; 93 } 104 } 94 105 95 //....oooOO0OOooo........oooOO0OOooo........oo 106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 96 107 97 G4int TestParameters::GetNumberBins() const 108 G4int TestParameters::GetNumberBins() const 98 { 109 { 99 return fBinsE; 110 return fBinsE; 100 } 111 } 101 112 102 //....oooOO0OOooo........oooOO0OOooo........oo 113 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 103 114 104 void TestParameters::SetNumberBinsCluster(G4in 115 void TestParameters::SetNumberBinsCluster(G4int value) 105 { 116 { 106 fBinsCluster = value; 117 fBinsCluster = value; 107 } 118 } 108 119 109 //....oooOO0OOooo........oooOO0OOooo........oo 120 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 110 121 111 G4int TestParameters::GetNumberBinsCluster() c 122 G4int TestParameters::GetNumberBinsCluster() const 112 { 123 { 113 return fBinsCluster; 124 return fBinsCluster; 114 } 125 } 115 126 116 //....oooOO0OOooo........oooOO0OOooo........oo 127 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 117 << 128 118 void TestParameters::SetMaxCluster(G4int value 129 void TestParameters::SetMaxCluster(G4int value) 119 { 130 { 120 fMaxCluster = value; 131 fMaxCluster = value; 121 } 132 } 122 133 123 //....oooOO0OOooo........oooOO0OOooo........oo 134 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 124 135 125 G4int TestParameters::GetMaxCluster() const 136 G4int TestParameters::GetMaxCluster() const 126 { 137 { 127 return fMaxCluster; 138 return fMaxCluster; 128 } 139 } 129 140 130 //....oooOO0OOooo........oooOO0OOooo........oo 141 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 131 142 132 void TestParameters::SetEnergyPerChannel(G4dou 143 void TestParameters::SetEnergyPerChannel(G4double value) 133 { 144 { 134 if (value > 0.0) { << 145 if(value > 0.0) { fFactorALICE = 1./value; } 135 fFactorALICE = 1. / value; << 136 } << 137 } 146 } 138 147 139 //....oooOO0OOooo........oooOO0OOooo........oo 148 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 140 149 141 G4double TestParameters::GetFactorALICE() cons 150 G4double TestParameters::GetFactorALICE() const 142 { 151 { 143 return fFactorALICE; 152 return fFactorALICE; 144 } 153 } 145 154 146 //....oooOO0OOooo........oooOO0OOooo........oo 155 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 147 156 148 void TestParameters::SetNormFactor(G4double va 157 void TestParameters::SetNormFactor(G4double value) 149 { 158 { 150 fNormFactor = value; 159 fNormFactor = value; 151 } 160 } 152 161 153 //....oooOO0OOooo........oooOO0OOooo........oo 162 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 154 163 155 G4double TestParameters::GetNormFactor() const 164 G4double TestParameters::GetNormFactor() const 156 { 165 { 157 return fNormFactor; 166 return fNormFactor; 158 } 167 } 159 168 160 //....oooOO0OOooo........oooOO0OOooo........oo 169 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 161 170 162 void TestParameters::SetEnergySmear(G4double v 171 void TestParameters::SetEnergySmear(G4double value) 163 { 172 { 164 fEnergySmear = value; 173 fEnergySmear = value; 165 } 174 } 166 175 167 //....oooOO0OOooo........oooOO0OOooo........oo 176 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 168 177 169 G4double TestParameters::GetEnergySmear() cons 178 G4double TestParameters::GetEnergySmear() const 170 { 179 { 171 return fEnergySmear; 180 return fEnergySmear; 172 } 181 } 173 182 174 //....oooOO0OOooo........oooOO0OOooo........oo 183 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 175 184 176 void TestParameters::SetPositionZ(G4double val 185 void TestParameters::SetPositionZ(G4double val) 177 { 186 { 178 fPositionZ = val; 187 fPositionZ = val; 179 } 188 } 180 189 181 //....oooOO0OOooo........oooOO0OOooo........oo 190 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 182 191 183 G4double TestParameters::GetPositionZ() const 192 G4double TestParameters::GetPositionZ() const 184 { 193 { 185 return fPositionZ; 194 return fPositionZ; 186 } << 187 << 188 //....oooOO0OOooo........oooOO0OOooo........oo << 189 << 190 void TestParameters::SetBeamEnergy(G4double va << 191 { << 192 fBeamEnergy = val; << 193 } << 194 << 195 //....oooOO0OOooo........oooOO0OOooo........oo << 196 << 197 G4double TestParameters::GetBeamEnergy() const << 198 { << 199 return fBeamEnergy; << 200 } << 201 << 202 //....oooOO0OOooo........oooOO0OOooo........oo << 203 << 204 void TestParameters::SetBeamParticle(const G4P << 205 { << 206 fParticle = ptr; << 207 } << 208 << 209 //....oooOO0OOooo........oooOO0OOooo........oo << 210 << 211 const G4ParticleDefinition* TestParameters::Ge << 212 { << 213 return fParticle; << 214 } 195 } 215 196 216 //....oooOO0OOooo........oooOO0OOooo........oo 197 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 217 198