Message: Detection of photons on photocathode Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Detection of photons on photocathode 

Forum: Processes Involving Optical Photons
Date: 21 Jun, 2013
From: Lafont Fabien <Lafont Fabien>

Hello all,

As mentioned in the title I am simulating the detection of phtons by a photocathode. I have read more or less every post and examples dealing with this type of simulation but for few days I kept stuck.

My objectives are :

- Detect the hits of photons - Score the total number of photons coming to the photocathode - Divide my photocathode into sectors (pixels) in order to able to count photons coming to each pixel.

My questions are :

- must the whole readout geometry (i.e. the set of all divisions) have the same dimensions of the photocathode ? In my example I would like my readout geometry be a square matrix divided into square pixel. My photocathode is a tub. - Since the detection of optical photons is done by using surface, I implemented my own SteppingAction (I followed the examples) and SensitiveDetector class. But how can I return the right touchable history to be able to get the replica number of the hitted sector ?

For the moment, I succeed the to invoke my sensitive detector class when a photon hit the photocathode but the copy number and the replica number are both 0. I have also a "<trackercollection> is ambiguous error". I cannot explain any of these errors.

Could some experts help me ? Many thanks in advance.

Here some abstracts of my code :

//##################################################################### // Define my sensitive detector into detectorConstruction class //#####################################################################

SourceReadoutGeometry* PhotocathodeReadout = new SourceReadoutGeometry("PhotocathodeReadout");
	PhotocathodeReadout->BuildROGeometry();
	PhotocathodeReadout->SetName("PhotocathodeReadout");

	G4String PhotocathodeTrackerSDname = "/SourceDetector/PhotocathodeTrackerSD";
	PhotocathodeTrackerSD* photocathodeTrackerSD = new PhotocathodeTrackerSD( PhotocathodeTrackerSDname);
	photocathodeTrackerSD->SetROgeometry(PhotocathodeReadout);
	photocathodeTrackerSD->SetAnalManag(AnalManag);
	SDman->AddNewDetector( photocathodeTrackerSD );
	PhotocathodeLog->SetSensitiveDetector( photocathodeTrackerSD );

//##################################################################### // My readout geometry //#####################################################################

 // Photocathode volume:
  G4VSolid * PhotocathodeReadoutBox = new G4Box("PhotocathodeReadoutBox",photocathode_radius, photocathode_radius,half_thickness);
  G4LogicalVolume * PhotocathodeReadoutLog = new G4LogicalVolume(PhotocathodeReadoutBox,dummyMat,"PhotocathodeReadoutLogical",0,0,0);
  G4VPhysicalVolume * PhotocathodeReadoutPhys = new G4PVPlacement(0,G4ThreeVector(),"PhotocathodeReadoutPhysical",PhotocathodeReadoutLog,
                        WorldReadoutPhys,false,0);

  // -------------------------------
  // Photocathode readout division:
  // -------------------------------
  // X division : 1000 sectors
  G4VSolid * PhotocathodeReadoutXDivisionBox = new G4Box("PhotocathodeReadoutXDivision",photocathode_radius, photocathode_radius,half_thickness);
  G4LogicalVolume * PhotocathodeReadoutXDivisionLog = new G4LogicalVolume(PhotocathodeReadoutXDivisionBox, dummyMat, "PhotocathodeReadoutXDivisionLogical",0,0,0);
  G4VPhysicalVolume * PhotocathodeReadoutXDivisionPhys 
	  = new G4PVReplica("PhotocathodeReadoutXDivisionPhysical", PhotocathodeReadoutXDivisionLog, PhotocathodeReadoutPhys, kXAxis, 1000, photocathode_radius*2/1000);
  // Y division : 1000 sectors:
  G4VSolid * PhotocathodeReadoutCellBox = new G4Box("PhotocathodeReadoutcellBox",photocathode_radius, photocathode_radius,half_thickness);
  G4LogicalVolume * PhotocathodeReadoutCellLog = new G4LogicalVolume(PhotocathodeReadoutCellBox, dummyMat, "PhotocathodeReadoutcellLogical",0,0,0);
  G4VPhysicalVolume * PhotocathodeReadoutCellPhys =
      new G4PVReplica("PhotocathodeReadoutcellPhysical", PhotocathodeReadoutCellLog, PhotocathodeReadoutXDivisionPhys, kYAxis, 1000, photocathode_radius*2/1000);

//##################################################################### // Abstract of SteppingAction //#####################################################################

    		  case Absorption:
			 {
				  //Triger sensitive detector manually since photon is
				  //absorbed but status was Detection
				  G4SDManager* SDman = G4SDManager::GetSDMpointer();
				  G4String sdName="/SourceDetector/PhotocathodeTrackerSD";

				  PhotocathodeTrackerSD* photocathodeTrackerSD = (PhotocathodeTrackerSD*)SDman->FindSensitiveDetector(sdName);
				  G4TouchableHistory* ROHist = (G4TouchableHistory*)thePrePoint->GetTouchable();
				  G4double edep = thePostPoint->GetKineticEnergy();
				  if(photocathodeTrackerSD)photocathodeTrackerSD->ProcessHits_constStep(edep, theStep,ROHist);
				  break;
			  }

//##################################################################### // Abstract Sensitive detector class //#####################################################################

void PhotocathodeTrackerSD::Initialize(G4HCofThisEvent* HCE)
{
	trackerCollection = new PhotocathodeTrackerHitsCollection(SensitiveDetectorName,collectionName[0]); 
	static int HCID = -1;
	if(HCID<0)
	{ 
		HCID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]); 
	};
	HCE->AddHitsCollection( HCID, trackerCollection ); 
	while (initialize ==false)
	{
	  	//Initialization
		for (G4int i=1;i<=1350;i++)
		{
			AbsorbedPhotonTable[i-1][0]=(4.200-(i-1)*0.001)*eV;
			AbsorbedPhotonTable[i-1][1]=0;
		}
			//Initialization
		for (G4int i=1;i<=1000;i++)
		{
			for (G4int j=1;j<=1000;j++)
			{
				SectorTable[i-1][j-1]=0;
			}
		}
		initialize =true;
	}
}

G4bool PhotocathodeTrackerSD::ProcessHits(G4Step* aStep,G4TouchableHistory* ReadoutHistory)
{
	return false;
}

G4bool PhotocathodeTrackerSD::ProcessHits_constStep(G4double edep, const G4Step* aStep,G4TouchableHistory* ReadoutHistory)
{
	if(edep==0.) {G4cout << "bug" << G4endl;return false;}

	G4int CopyX = ReadoutHistory->GetReplicaNumber(0);
	G4int CopyY = ReadoutHistory->GetReplicaNumber(1);
	G4int CopyN = ReadoutHistory->GetVolume()->GetCopyNo();
	//G4int CopyPhi = ReadoutHistory->GetReplicaNumber(1);
	G4cout << "CopyRho : " << CopyX << "CopyPhi : " << CopyY << G4endl;
	G4cout << "CopyNumero : " << CopyN << G4endl;

	PhotocathodeTrackerHit* newHit = new PhotocathodeTrackerHit();
	newHit->SetTrackID(aStep->GetTrack()->GetTrackID());
	newHit->SetEdep((edep)*MeV);
	newHit->SetPos(aStep->GetPostStepPoint()->GetPosition());

......

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Feedback: Re: Detection of photons on photocathode   (Gumplinger Peter - 24 Jun, 2013)
 Add Message Add Message
to: "Detection of photons on photocathode"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews