Changeset 294 for ELYSE/HEAD/source/SteppingAction.cxx
- Timestamp:
- Feb 23, 2007, 2:22:42 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ELYSE/HEAD/source/SteppingAction.cxx
r286 r294 20 20 #include "ELYSE/TrackingAction.hh" 21 21 #include "ELYSE/Trajectory.hh" 22 #include "ELYSE/TrappingVolume.hh"22 //#include "ELYSE/TrappingVolume.hh" 23 23 #include "ELYSE/TrackInformation.hh" 24 24 … … 40 40 G4VPhysicalVolume* thePostPV = thePostPoint->GetPhysicalVolume(); 41 41 42 43 //JEC START debug Optical surface properties 44 // G4StepPoint* pPreStepPoint = theStep->GetPreStepPoint(); 45 // G4cout << "(JEC): UserSteppingAction PrePoint Volume:" << pPreStepPoint->GetPhysicalVolume()->GetName() 46 // << " PostPoint Volume: " << thePostPV->GetName() 47 // << G4endl; 48 // G4LogicalSurface* Surface = 49 // G4LogicalSkinSurface::GetSurface(pPreStepPoint->GetPhysicalVolume()->GetLogicalVolume()); 50 // G4OpticalSurface* OpticalSurface = 0; 51 // if (Surface) OpticalSurface = (G4OpticalSurface*) Surface->GetSurfaceProperty(); 52 // if (OpticalSurface) { 53 // G4cout << "(JEC) UserSteppingAction: Optical Surface Found" << G4endl; 54 // OpticalSurface->DumpInfo(); 55 // G4MaterialPropertiesTable* aMaterialPropertiesTable; 56 // G4MaterialPropertyVector* Rindex; 57 // aMaterialPropertiesTable = OpticalSurface->GetMaterialPropertiesTable(); 58 59 // if (aMaterialPropertiesTable) { 60 // Rindex = aMaterialPropertiesTable->GetProperty("RINDEX"); 61 // if (Rindex) { 62 // G4cout << "(JEC) Found RINDEX properties: " << G4endl; 63 // Rindex->DumpVector(); 64 // } else { 65 // G4cout << "(JEC) NO RINDEX properties " << G4endl; 66 // } 67 // } else { 68 // G4cout << "(JEC) NO MATERIAL properties " << G4endl; 69 // } 70 // } else { 71 // G4cout << "(JEC) NO OpticalSurface " << G4endl; 72 // } 73 42 74 G4OpBoundaryProcessStatus boundaryStatus=Undefined; 43 75 static G4OpBoundaryProcess* boundary=NULL; … … 74 106 75 107 //------------Kill photons entering expHall 108 109 // G4cout << "(JEC) UserSteppingAction: Post Volume " << thePostPV->GetName() 110 // << G4endl; 111 76 112 if(thePostPV->GetName()=="expHall") { 77 113 theTrack->SetTrackStatus(fStopAndKill);} … … 94 130 // Absorption, Detection, NotAtBoundary, 95 131 // SameMaterial, StepTooSmall, NoRINDEX} 96 switch(boundaryStatus){ 97 case FresnelRefraction: 98 G4cout << "(JEC) Status of PostPoint: FresnelRefraction" << G4endl; break; 99 case FresnelReflection: 100 G4cout << "(JEC) Status of PostPoint: FresnelReflection" << G4endl; break; 101 case TotalInternalReflection: 102 G4cout << "(JEC) Status of PostPoint: TotalInternalReflection" << G4endl; break; 103 case LambertianReflection: 104 G4cout << "(JEC) Status of PostPoint: LambertianReflection" << G4endl; break; 105 case LobeReflection: 106 G4cout << "(JEC) Status of PostPoint: LobeReflection" << G4endl; break; 107 case SpikeReflection: 108 G4cout << "(JEC) Status of PostPoint: SpikeReflection" << G4endl; break; 109 case Absorption: 110 G4cout << "(JEC) Status of PostPoint: Absorption" << G4endl; break; 111 112 case Detection: // Note, this assumes that the volume causing detection 113 // is the interface between Tyvek and Air because it is the only one with 114 // 100% efficiency 115 { 116 // Triger sensitive detector manually since photon is 117 // absorbed but status was Detection 118 G4SDManager* SDman = G4SDManager::GetSDMpointer(); 119 //see DetectorConstruction::Construct for the PATH of the Sensitive Volume 120 TrappingVolume* trapVol = 0; 121 if(SDman) trapVol = (TrappingVolume*)SDman->FindSensitiveDetector("/ELYSE/TrappingVolume"); 132 // switch(boundaryStatus){ 133 // case FresnelRefraction: 134 // G4cout << "(JEC) Status of PostPoint: FresnelRefraction" << G4endl; break; 135 // case FresnelReflection: 136 // G4cout << "(JEC) Status of PostPoint: FresnelReflection" << G4endl; break; 137 // case TotalInternalReflection: 138 // G4cout << "(JEC) Status of PostPoint: TotalInternalReflection" << G4endl; break; 139 // case LambertianReflection: 140 // G4cout << "(JEC) Status of PostPoint: LambertianReflection" << G4endl; break; 141 // case LobeReflection: 142 // G4cout << "(JEC) Status of PostPoint: LobeReflection" << G4endl; break; 143 // case SpikeReflection: 144 // G4cout << "(JEC) Status of PostPoint: SpikeReflection" << G4endl; break; 145 // case Absorption: 146 // G4cout << "(JEC) Status of PostPoint: Absorption" << G4endl; break; 147 // case Detection: 148 // G4cout << "(JEC) Status of PostPoint: Detection" << G4endl; break; 149 // case NotAtBoundary: 150 // G4cout << "(JEC) Status of PostPoint: NotAtBoundary" << G4endl; break; 151 // case SameMaterial: 152 // G4cout << "(JEC) Status of PostPoint: SameMaterial" << G4endl; break; 153 // case StepTooSmall: 154 // G4cout << "(JEC) Status of PostPoint: StepTooSmall" << G4endl; break; 155 // case NoRINDEX: 156 // G4cout << "(JEC) Status of PostPoint: NoRINDEX" << G4endl; break; 122 157 123 if(trapVol) { 124 trapVol->ProcessHits_constStep(theStep,0);158 // default: 159 // break; 125 160 126 //------------Save the hit into the track info 127 128 TrackInformation* aInfo = (TrackInformation*)theTrack->GetUserInformation(); 129 G4cout << "(JEC) SteppingAction::opticalphoton detection = " 130 << " " << theTrack << " " << aInfo << G4endl; 131 if(aInfo)aInfo->AddTrackStatusFlag(hitProduced); 132 133 } else { 134 G4cout << "(JEC) UserSteppingAction: FATAL: NO Sensitive Det. FOUND" << G4endl; 135 exit(0); 136 } 137 break; 138 }//case Detection 139 140 case NotAtBoundary: 141 G4cout << "(JEC) Status of PostPoint: NotAtBoundary" << G4endl; break; 142 case SameMaterial: 143 G4cout << "(JEC) Status of PostPoint: SameMaterial" << G4endl; break; 144 case StepTooSmall: 145 G4cout << "(JEC) Status of PostPoint: StepTooSmall" << G4endl; break; 146 case NoRINDEX: 147 G4cout << "(JEC) Status of PostPoint: NoRINDEX" << G4endl; break; 148 149 default: 150 break; 151 152 }//eo switch on boundary values 161 // }//eo switch on boundary values 153 162 154 163 }//test on GeomBoundary
Note: See TracChangeset
for help on using the changeset viewer.