// This code implementation is the intellectual property of // the GEANT4 collaboration. // // By copying, distributing or modifying the Program (or any work // based on the Program) you indicate your acceptance of this statement, // and all its terms. // // $Id: G4IrregularXrayTRmodel.cc,v 1.1 2000/11/14 16:08:07 gcosmo Exp $ // GEANT4 tag $Name: geant4-03-00 $ // #include "G4IrregularXrayTRmodel.hh" #include "Randomize.hh" #include "G4Gamma.hh" //////////////////////////////////////////////////////////////////////////// // // Constructor, destructor G4IrregularXrayTRmodel::G4IrregularXrayTRmodel(G4Envelope *anEnvelope, G4double a, G4double b) : G4VXrayTRmodel(anEnvelope,a,b) { G4cout<<"Irregular X-ray TR model is called"<GetDefinition()->GetPDGCharge() ; // Now we are ready to Generate TR photons G4double chargeSq = charge*charge ; G4double kinEnergy = fastTrack.GetPrimaryTrack()->GetKineticEnergy() ; G4double mass = fastTrack.GetPrimaryTrack()->GetDefinition()->GetPDGMass() ; G4double gamma = 1.0 + kinEnergy/mass ; // G4cout<<"gamma = "< DistanceToOut(fastTrack.GetPrimaryTrackLocalPosition(), direction) ; G4ThreeVector position = fastTrack.GetPrimaryTrackLocalPosition() + distance*direction ; // Set final position: fastStep.SetPrimaryTrackFinalPosition(position); for(iTkin=0;iTkinGetLowEdgeEnergy(iTkin)) break ; } iPlace = iTkin - 1 ; G4ParticleMomentum particleDir = fastTrack.GetPrimaryTrack()-> GetMomentumDirection() ; if(iTkin == 0) // Tkin is too small, neglect of TR photon generation { return ; } else // general case: Tkin between two vectors of the material { if(iTkin == fTotBin) { numOfTR = RandPoisson::shoot( (*(*fEnergyDistrTable)(iPlace))(0)*chargeSq ) ; } else { E1 = fProtonEnergyVector->GetLowEdgeEnergy(iTkin - 1) ; E2 = fProtonEnergyVector->GetLowEdgeEnergy(iTkin) ; W = 1.0/(E2 - E1) ; W1 = (E2 - TkinScaled)*W ; W2 = (TkinScaled - E1)*W ; numOfTR = RandPoisson::shoot( ( (*(*fEnergyDistrTable)(iPlace))(0)*W1+ (*(*fEnergyDistrTable)(iPlace+1))(0)*W2 ) *chargeSq ) ; } // G4cout<= 0.1 ) theta = 0.1 ; // G4cout<<" : theta = "< DistanceToOut(positionTR,directionTR) ; positionTR = positionTR + distanceTR*directionTR ; fastStep.CreateSecondaryTrack( aPhotonTR, positionTR, fastTrack.GetPrimaryTrack()-> GetGlobalTime() ) ; } kinEnergy -= sumEnergyTR ; fastStep.SetPrimaryTrackFinalKineticEnergy(kinEnergy) ; } } return ; } ***************************************************** */ /////////////////////////////////////////////////////////////////////////// // // Very rough approximation for radiator interference factor for the case of // fully irregular radiator. The plate and gas gap thicknesses are distributed // according to exponent. The mean values of the plate and gas gap thicknesses // are supposed to be much more than XTR formation zones but much less than // mean absorption length of XTR photons in coresponding material. G4double G4IrregularXrayTRmodel::GetStackFactor( G4double energy, G4double gamma, G4double varAngle ) { G4double result, plateFactor, gasFactor, factor ; plateFactor = 1.0/( 1.0 + fPlateThick*GetPlateLinearPhotoAbs(energy) ) ; gasFactor = 1.0/( 1.0 + fGasThick*GetGasLinearPhotoAbs(energy) ) ; factor = plateFactor*gasFactor ; result = ( 1 - pow(factor,fPlateNumber) )/( 1 - factor ) ; result *= 1 + plateFactor ; return result ; } // // ////////////////////////////////////////////////////////////////////////////