Re: vmc and sensitive volumes in G3/G4

From: Ivana Hrivnacova <Ivana.Hrivnacova_at_cern.ch>
Date: Thu, 12 May 2011 17:23:52 +0200

Hi Filimon,

The VMC design does not apply the concept of sensitive volume and requires to call TVirtualMCApplication::Stepping at each step. This call is done via TG4SensitiveDetector::ProcessHits(). Currently it is not possible to inactivate these sensitive detectors via a Geant4 based commands, it may have sense only for application with an empty Stepping function.

Do you really have an application which does nothing in Stepping()? If so, it would make sense to implement such an option and see what you gain in performance. Let me know.

Best regards,

Ivana

On 05/12/2011 04:19 PM, Filimon Roukoutakis wrote:
> Hi, I am in the process of optimizing my VMC application and have a
> question about the handling of sensitive detectors and scoring in
> general. From the VMC examples (e.g. E03) it is assumed that the
> selection is done within the TVirtualMCApplication::Stepping (possibly
> through invoking a MySensitiveDetector::ProcessHits method which
> contains for example a gMC->GetVolId and comparing with volumes ids of
> interest). However, looking at the output of BuildPhysics we can see for
> E03 that the number of sensitive detectors is the same as the number of
> logical volumes.
> **********************************************
> GEANT4 Geometry statistics:
> 6 logical volumes
> 5 physical volumes
> 13 materials
> 9 user limits
> 6 sensitive detectors
> **********************************************
>
>
> phot: for gamma SubType= 12
>
> I was wandering what is the impact on this on performance. Is it correct
> to assume that ProcessHits is called for all defined sensitive detectors
> as in the vanilla G4, or is it avoided somehow within the TGeant4 by
> doing something equivalent to (G4 code inside TGeant4)
>
> myLogicalVolume->SetSensitiveDetector(nullptr)
>
> If it is not done, is there a way to deactivate sensitive volumes
> through TGeant4 interface?
>
> Thanks,
> filimon
>

-- 
==============================================================
e-mail:  Ivana.Hrivnacova_at_cern.ch
address: Institut de Physique Nucléaire, 91406 Orsay, France
phone:   +33 169156594
==============================================================
Received on Thu May 12 2011 - 17:23:48 CEST

This archive was generated by hypermail 2.2.0 : Thu May 12 2011 - 23:25:01 CEST