Message: Re: Sensitive detector is triggered only when is the presteppoint Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Sensitive detector is triggered only when is the presteppoint 

Keywords: sensitive detectors poststeppoint presteppoint
Forum: Processes Involving Optical Photons
Date: 27 Sep, 2004
From: Gumplinger Peter <Gumplinger Peter>

Vlasios,

True, sensitive detectors are only triggered when is the PreStepPoint.

However, you can 'trigger' your SD manually. The scheme is shown in the new example (/examples/extended/optical/LXe) which you'll probably find is also a source for a host of 'G4 tricks' and 'how to-s'.

You can make your PMT (photo cathode) a metal volume for which you specify the reflectivity and (detection) efficiency:

  //**Photocathode surface properties
  G4double photocath_EFF[num]={1.,1.}; //Enables 'detection' of photons
  G4double photocath_REFL[num]={0.,0.};
  G4MaterialPropertiesTable* photocath_mt = new G4MaterialPropertiesTable();
  photocath_mt->AddProperty("EFFICIENCY",Ephoton,photocath_EFF,num);
  photocath_mt->AddProperty("REFLECTIVITY",Ephoton,photocath_REFL,num);
  G4OpticalSurface* photocath_opsurf=
    new G4OpticalSurface("photocath_opsurf",glisur,polished,
                         dielectric_metal);
  photocath_opsurf->SetMaterialPropertiesTable(photocath_mt);

In your SteppingAction you could then inquire about the G4OpBoundaryProcess status:

  G4OpBoundaryProcessStatus boundaryStatus=Undefined;
  static G4OpBoundaryProcess* boundary=NULL;

  //find the boundary process only once
  if(!boundary){
    G4ProcessManager* pm
      = theStep->GetTrack()->GetDefinition()->GetProcessManager();
    G4int nprocesses = pm->GetProcessListLength();
    G4ProcessVector* pv = pm->GetProcessList();
    G4int i;
    for( i=0;i<nprocesses;i++){
      if((*pv)[i]->GetProcessName()=="OpBoundary"){
        boundary = (G4OpBoundaryProcess*)(*pv)[i];
        break;
      }
    }
  }

  G4ParticleDefinition* particleType = theTrack->GetDefinition();
  if(particleType==G4OpticalPhoton::OpticalPhotonDefinition()){

    boundaryStatus=boundary->GetStatus();

    if(thePostPoint->GetStepStatus()==fGeomBoundary){

      switch(boundaryStatus){
      case Detection: //Note, this assumes that the volume causing detection
                      //is the photocathode because it is the only one with
                      //non-zero efficiency
        {

        //Trigger sensitive detector manually since photon is
        //absorbed but status was Detection

        G4SDManager* SDman = G4SDManager::GetSDMpointer();
        G4String sdName="/LXeDet/pmtSD";
        LXePMTSD* pmtSD = (LXePMTSD*)SDman
            ->FindSensitiveDetector(sdName);
          if(pmtSD)
            pmtSD->ProcessHits_constStep(theStep,NULL);
          break;
        }    

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

 Add Message Add Message
to: "Re: Sensitive detector is triggered only when is the presteppoint"

 Subscribe Subscribe

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