5 #include "G4TrackStatus.hh"
6 #include "G4VProcess.hh"
7 #include "G4VPhysicalVolume.hh"
8 #include "Randomize.hh"
9 #include "G4Navigator.hh"
10 #include "G4TransportationManager.hh"
11 #include "G4ParticleDefinition.hh"
12 #include "G4ParticleTypes.hh"
14 #include "G4PhysicalConstants.hh"
15 #include "G4SystemOfUnits.hh"
24 (
const G4Track* aTrack)
26 G4String WCIDCollectionName = DetConstruct->GetIDCollectionName();
27 G4ClassificationOfNewTrack classification = fWaiting;
28 G4ParticleDefinition* particleType = aTrack->GetDefinition();
32 if( particleType == G4OpticalPhoton::OpticalPhotonDefinition() )
34 G4double photonWavelength = (2.0*M_PI*197.3)/(aTrack->GetTotalEnergy()/eV);
35 G4double ratio = 1./(1.0-0.25);
36 G4double wavelengthQE = 0;
37 if(aTrack->GetCreatorProcess()==NULL) {
38 wavelengthQE = DetConstruct->GetPMTQE(WCIDCollectionName,photonWavelength,1,240,660,ratio);
39 if( G4UniformRand() > wavelengthQE )
40 classification = fKill;
42 else if (((G4VProcess*)(aTrack->GetCreatorProcess()))->GetProcessType()!=3)
44 G4double photonWavelength = (2.0*M_PI*197.3)/(aTrack->GetTotalEnergy()/eV);
47 G4double ratio = 1./(1.0-0.25);
51 G4double wavelengthQE = 0;
52 if (DetConstruct->GetPMT_QE_Method() == 1){
53 wavelengthQE = DetConstruct->GetPMTQE(WCIDCollectionName,photonWavelength,1,240,660,ratio);
54 }
else if (DetConstruct->GetPMT_QE_Method() == 2){
55 wavelengthQE = DetConstruct->GetPMTQE(WCIDCollectionName,photonWavelength,0,240,660,ratio);
56 }
else if (DetConstruct->GetPMT_QE_Method() == 3 || DetConstruct->GetPMT_QE_Method() == 4){
60 if( G4UniformRand() > wavelengthQE )
61 classification = fKill;
65 return classification;
virtual ~WCSimStackingAction()
WCSimStackingAction(WCSimDetectorConstruction *)
virtual void PrepareNewEvent()
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *aTrack)