Changeset 1347 for trunk/source/event/include/G4SPSRandomGenerator.hh
- Timestamp:
- Dec 22, 2010, 3:52:27 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/event/include/G4SPSRandomGenerator.hh
r816 r1347 136 136 #include "G4DataInterpolation.hh" 137 137 138 class G4SPSRandomGenerator 139 { 138 class G4SPSRandomGenerator { 140 139 public: 141 G4SPSRandomGenerator (); 142 ~G4SPSRandomGenerator (); 143 144 // static G4SPSRandomGenerator* getInstance (); 145 146 // Biasing Methods 147 void SetXBias(G4ThreeVector); 148 void SetYBias(G4ThreeVector); 149 void SetZBias(G4ThreeVector); 150 void SetThetaBias(G4ThreeVector); 151 void SetPhiBias(G4ThreeVector); 152 void SetEnergyBias(G4ThreeVector); 153 void SetPosThetaBias(G4ThreeVector); 154 void SetPosPhiBias(G4ThreeVector); 155 G4double GenRandX(); 156 G4double GenRandY(); 157 G4double GenRandZ(); 158 G4double GenRandTheta(); 159 G4double GenRandPhi(); 160 G4double GenRandEnergy(); 161 G4double GenRandPosTheta(); 162 G4double GenRandPosPhi(); 163 164 inline void SetIntensityWeight(G4double weight) {bweights[8]=weight;}; 165 166 inline G4double GetBiasWeight() 167 { return bweights[0]*bweights[1]*bweights[2]*bweights[3]*bweights[4]*bweights[5]*bweights[6]*bweights[7]*bweights[8];}; 168 169 // method to re-set the histograms 170 void ReSetHist(G4String); 171 172 // Set the verbosity level. 173 void SetVerbosity(G4int a) {verbosityLevel = a; } ; 140 G4SPSRandomGenerator(); 141 ~G4SPSRandomGenerator(); 142 143 // static G4SPSRandomGenerator* getInstance (); 144 145 // Biasing Methods 146 void SetXBias(G4ThreeVector); 147 void SetYBias(G4ThreeVector); 148 void SetZBias(G4ThreeVector); 149 void SetThetaBias(G4ThreeVector); 150 void SetPhiBias(G4ThreeVector); 151 void SetEnergyBias(G4ThreeVector); 152 void SetPosThetaBias(G4ThreeVector); 153 void SetPosPhiBias(G4ThreeVector); 154 G4double GenRandX(); 155 G4double GenRandY(); 156 G4double GenRandZ(); 157 G4double GenRandTheta(); 158 G4double GenRandPhi(); 159 G4double GenRandEnergy(); 160 G4double GenRandPosTheta(); 161 G4double GenRandPosPhi(); 162 163 inline void SetIntensityWeight(G4double weight) { 164 bweights[8] = weight; 165 } 166 ; 167 168 inline G4double GetBiasWeight() { 169 return bweights[0] * bweights[1] * bweights[2] * bweights[3] 170 * bweights[4] * bweights[5] * bweights[6] * bweights[7] 171 * bweights[8]; 172 } 173 ; 174 175 // method to re-set the histograms 176 void ReSetHist(G4String); 177 178 // Set the verbosity level. 179 void SetVerbosity(G4int a) { 180 verbosityLevel = a; 181 } 182 ; 174 183 175 184 private: 176 185 177 // static G4SPSRandomGenerator *instance; 178 179 G4bool XBias, IPDFXBias; 180 G4PhysicsOrderedFreeVector XBiasH; 181 G4PhysicsOrderedFreeVector IPDFXBiasH; 182 G4bool YBias, IPDFYBias; 183 G4PhysicsOrderedFreeVector YBiasH; 184 G4PhysicsOrderedFreeVector IPDFYBiasH; 185 G4bool ZBias, IPDFZBias; 186 G4PhysicsOrderedFreeVector ZBiasH; 187 G4PhysicsOrderedFreeVector IPDFZBiasH; 188 G4bool ThetaBias, IPDFThetaBias; 189 G4PhysicsOrderedFreeVector ThetaBiasH; 190 G4PhysicsOrderedFreeVector IPDFThetaBiasH; 191 G4bool PhiBias, IPDFPhiBias; 192 G4PhysicsOrderedFreeVector PhiBiasH; 193 G4PhysicsOrderedFreeVector IPDFPhiBiasH; 194 G4bool EnergyBias, IPDFEnergyBias; 195 G4PhysicsOrderedFreeVector EnergyBiasH; 196 G4PhysicsOrderedFreeVector IPDFEnergyBiasH; 197 G4bool PosThetaBias, IPDFPosThetaBias; 198 G4PhysicsOrderedFreeVector PosThetaBiasH; 199 G4PhysicsOrderedFreeVector IPDFPosThetaBiasH; 200 G4bool PosPhiBias, IPDFPosPhiBias; 201 G4PhysicsOrderedFreeVector PosPhiBiasH; 202 G4PhysicsOrderedFreeVector IPDFPosPhiBiasH; 203 204 G4double bweights[9]; //record x,y,z,theta,phi,energy,posThet,posPhi,intensity weights 205 206 // Verbosity 207 G4int verbosityLevel; 208 209 G4PhysicsOrderedFreeVector ZeroPhysVector ; // for re-set only 210 186 // static G4SPSRandomGenerator *instance; 187 188 G4bool XBias, IPDFXBias; 189 G4PhysicsOrderedFreeVector XBiasH; 190 G4PhysicsOrderedFreeVector IPDFXBiasH; 191 G4bool YBias, IPDFYBias; 192 G4PhysicsOrderedFreeVector YBiasH; 193 G4PhysicsOrderedFreeVector IPDFYBiasH; 194 G4bool ZBias, IPDFZBias; 195 G4PhysicsOrderedFreeVector ZBiasH; 196 G4PhysicsOrderedFreeVector IPDFZBiasH; 197 G4bool ThetaBias, IPDFThetaBias; 198 G4PhysicsOrderedFreeVector ThetaBiasH; 199 G4PhysicsOrderedFreeVector IPDFThetaBiasH; 200 G4bool PhiBias, IPDFPhiBias; 201 G4PhysicsOrderedFreeVector PhiBiasH; 202 G4PhysicsOrderedFreeVector IPDFPhiBiasH; 203 G4bool EnergyBias, IPDFEnergyBias; 204 G4PhysicsOrderedFreeVector EnergyBiasH; 205 G4PhysicsOrderedFreeVector IPDFEnergyBiasH; 206 G4bool PosThetaBias, IPDFPosThetaBias; 207 G4PhysicsOrderedFreeVector PosThetaBiasH; 208 G4PhysicsOrderedFreeVector IPDFPosThetaBiasH; 209 G4bool PosPhiBias, IPDFPosPhiBias; 210 G4PhysicsOrderedFreeVector PosPhiBiasH; 211 G4PhysicsOrderedFreeVector IPDFPosPhiBiasH; 212 213 G4double alpha; // for biasing energy 214 215 G4double bweights[9]; //record x,y,z,theta,phi,energy,posThet,posPhi,intensity weights 216 217 // Verbosity 218 G4int verbosityLevel; 219 220 G4PhysicsOrderedFreeVector ZeroPhysVector; // for re-set only 221 211 222 }; 212 223 213 214 224 #endif 215 225 216 217 218
Note: See TracChangeset
for help on using the changeset viewer.