26 #include <RAT/BirksLaw.hh>
28 #include <RAT/Quadrature.hh>
29 #include <RAT/QuenchingCalculator.hh>
31 #include "G4DynamicParticle.hh"
32 #include "G4Material.hh"
33 #include "G4MaterialPropertiesTable.hh"
34 #include "G4OpticalPhoton.hh"
35 #include "G4ParticleChange.hh"
36 #include "G4ParticleMomentum.hh"
37 #include "G4PhysicsOrderedFreeVector.hh"
38 #include "G4PhysicsTable.hh"
40 #include "G4ThreeVector.hh"
41 #include "G4UImessenger.hh"
42 #include "G4VProcess.hh"
45 #include "local_g4compat.hh"
46 #include "templates.hh"
54 GLG4DummyProcess(
const G4String &aName =
"NoName", G4ProcessType aType = fNotDefined) : G4VProcess(aName, aType){};
57 virtual G4double AlongStepGetPhysicalInteractionLength(
const G4Track & , G4double ,
58 G4double , G4double & ,
63 virtual G4double AtRestGetPhysicalInteractionLength(
const G4Track & , G4ForceCondition * ) {
67 virtual G4double PostStepGetPhysicalInteractionLength(
const G4Track & , G4double ,
68 G4ForceCondition * ) {
72 virtual G4VParticleChange *PostStepDoIt(
const G4Track & ,
const G4Step & ) {
return 0; };
74 virtual G4VParticleChange *AlongStepDoIt(
const G4Track & ,
const G4Step & ) {
return 0; };
75 virtual G4VParticleChange *AtRestDoIt(
const G4Track & ,
const G4Step & ) {
return 0; };
182 G4PhysicsOrderedFreeVector *fSpectrumIntegral;
183 G4PhysicsOrderedFreeVector *fReemissionIntegral;
184 G4PhysicsOrderedFreeVector *fTimeIntegral;
185 G4PhysicsOrderedFreeVector *fReemissionTimeIntegral;
186 std::vector<G4PhysicsOrderedFreeVector *> fReemissionTimeVector;
187 std::vector<G4PhysicsOrderedFreeVector *> fReemissionSpectrumVector;
188 int fOwnSpectrumIntegral, fOwnTimeIntegral, fOwnReemissionTimeIntegral, fOwnReemissionTimeVector;
189 G4double fResolutionScale;
190 G4double fBirksConstant;
192 G4double fLightYield;
193 G4MaterialPropertyVector *fQuenchingArray;
198 void Build(
const G4String &name,
const G4String &matName,
int material_index,
199 G4MaterialPropertiesTable *matprops);
213 void Build(
const G4String &newname);
220 void IncUsedBy(
void) { ++fUsedByCount; }
221 void DecUsedBy(
void) {
222 if (--fUsedByCount <= 0)
delete this;
224 const Entry *GetEntry(
int i)
const {
return fData + i; }
225 void Dump(
void)
const;
232 GLG4Scint(
const G4String &tableName =
"", G4double lowerMassLimit = 0.0);
242 G4VParticleChange *PostPostStepDoIt(
const G4Track &aTrack,
const G4Step &aStep);
244 G4double GetLowerMassLimit(
void)
const;
246 void DumpInfo()
const;
248 MyPhysicsTable *GetMyPhysicsTable(
void)
const;
250 G4int GetVerboseLevel(
void)
const;
251 void SetVerboseLevel(
int level);
254 void SetNewValue(G4UIcommand *command, G4String newValues);
255 G4String GetCurrentValue(G4UIcommand *command);
261 static G4VParticleChange *GenericPostPostStepDoIt(
const G4Step *pStep);
264 static unsigned int fsScintillatedCount;
265 static unsigned int fsReemittedCount;
266 static void ResetPhotonCount(
unsigned int sCt = 0,
unsigned int rCt = 0) {
267 fsScintillatedCount = sCt;
268 fsReemittedCount = rCt;
270 static unsigned int GetScintillatedCount() {
return fsScintillatedCount; }
271 static unsigned int GetReemittedCount() {
return fsReemittedCount; }
273 static void GetTotEdepAll(G4double &totEdep, G4double &totEdepQuenched, G4double &totEdepTime,
274 G4ThreeVector &scintCentroidSum) {
276 totEdepQuenched = fTotEdepQuenched;
277 totEdepTime = fTotEdepTime;
278 scintCentroidSum = fScintCentroidSum;
281 static void SetTotEdep(G4double &totEdep, G4double &totEdepQuenched, G4double &totEdepTime,
282 G4ThreeVector &scintCentroidSum) {
284 fTotEdepQuenched = totEdepQuenched;
285 fTotEdepTime = totEdepTime;
286 fScintCentroidSum = scintCentroidSum;
289 static void ResetTotEdep() {
290 fTotEdep = fTotEdepQuenched = fTotEdepTime = 0.0;
291 fScintCentroidSum *= 0.0;
293 static G4double GetTotEdep() {
return fTotEdep; }
294 static G4double GetTotEdepQuenched() {
return fTotEdepQuenched; }
295 static G4double GetTotEdepTime() {
return fTotEdepTime; }
296 static G4bool GetDoScintillation() {
return fDoScintillation; }
297 static G4ThreeVector GetScintCentroidSum() {
return fScintCentroidSum * (1.0 / fTotEdepQuenched); }
309 MyPhysicsTable *fMyPhysicsTable;
312 G4double fLowerMassLimit;
315 G4ParticleChange fAParticleChange;
328 static G4UIdirectory *fGLG4ScintDir;
331 static G4int fMaxTracksPerStep;
334 static G4double fMeanPhotonsPerSecondary;
337 static G4bool fDoScintillation;
340 static G4bool fDoReemission;
345 static G4double fTotEdep;
346 static G4double fTotEdepQuenched;
347 static G4double fTotEdepTime;
348 static G4ThreeVector fScintCentroidSum;
353 static std::list<GLG4DummyProcess *> fReemissionProcessVector;
356 static G4double fQuenchingFactor;
358 static G4bool fUserQF;
359 static G4String fPrimaryName;
361 static G4double fPrimaryEnergy;
365 static G4double GetQuenchingFactor() {
return fQuenchingFactor; }
366 static void SetQuenchingFactor(G4double qf);
368 static G4double GetPrimaryEnergy() {
return fPrimaryEnergy; }
369 static void SetPrimaryEnergy(G4double pe) { fPrimaryEnergy = pe; }
370 static G4String GetPrimaryName() {
return fPrimaryName; }
371 static void SetPrimaryName(G4String pn) { fPrimaryName = pn; }
380 inline void GLG4Scint::DumpInfo()
const {
381 if (fMyPhysicsTable) {
382 RAT::info <<
"GLG4Scint[" << *(fMyPhysicsTable->fName) <<
"] {" << newline
383 <<
" fLowerMassLimit=" << fLowerMassLimit << newline;
384 if (fVerboseLevel >= 2) fMyPhysicsTable->Dump();
385 RAT::info <<
"}" << newline;
389 inline G4double GLG4Scint::GetLowerMassLimit(
void)
const {
return fLowerMassLimit; }
391 inline void GLG4Scint::SetVerboseLevel(
int level) { fVerboseLevel = level; }
392 inline G4int GLG4Scint::GetVerboseLevel(
void)
const {
return fVerboseLevel; }
Definition: GLG4Scint.hh:52
Definition: GLG4Scint.hh:180
Definition: GLG4Scint.hh:177
Definition: GLG4Scint.hh:164
static std::vector< GLG4Scint * > fMasterVectorOfGLG4Scint
Definition: GLG4Scint.hh:325
Interface for calculating quenched energy deposits.
Definition: QuenchingCalculator.hh:23