Message: Replicated touchable's copy/replica numbers always zero ?? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Replicated touchable's copy/replica numbers always zero ?? 

Keywords: Replicas, parameterised volumes, copy number, replica number
Forum: Geometry
Date: 27 Dec, 2006
From: Ken Teh <teh@anl.gov>

I have created an array of silicon strip detectors with G4PVReplica as follows (I am replicating along the y-axis):

  astrip = new Strip(arrayname, silicon, sensitive_detector);
  xarray = astrip->xlength();
  yarray = nstrips * astrip->ylength();   // nstrips along y-axis
  zarray = astrip->zlength();

  arraysolid = new G4Box(arrayname, xarray/2.0, ...);
  arraylog = new G4LogicalVolume(arraysolid, silicon, arrayname);
  replicated = new G4PVReplica(astrip->name(), astrip->logical(),
    arraylog, kYAxis, nstrips, ay/nstrips);

My Strip actually has 2 box solids: the active volume to which the 'sensitive_detector' is applied when creating its logical volume, and a larger volume in which the active volume is placed via a simple PVPlacement. The larger volume provides "dead" areas. The expressions, 'astrip->logical()', 'astrip->xlength()', etc., refer to the larger volume. It must since I must fill the mother array volume when replicating.

Visually, everything checks out. The sensitive detector also works. If I set nstrips = 2 and shoot my particle along the z-axis, I don't get any hits as expected. If I set nstrips = 3 and do the same, I get hits.

Next, I reprogram my gun to spray particles randomly over the cross-sectional area of the silicon array. Here I have made nstrips = 2 for my array, so I can see particles incident at both positive and negative y's. In my G4VSensitiveDetector sub-class ProcessHits() method, I extract both the copy and replica numbers.

  spre = s->GetPreStepPoint();
  ...
  newhit->SetCopyNo(spre->GetTouchableHandle()->GetCopyNumber());
  newhit->SetRepNo(spre->GetTouchableHandle()->GetReplicaNumber());

I find they are always zero. I would have expected 0 or 1 depending on whether y is negative or positive.

I did a similar construction with G4PVParameterised and it worked as expected. In this case, my Strip detector was a single "active" solid. I constructed the "dead" areas by replicating the active solid inside an array solid whose dimensions were larger than nstrips times the dimensions of the active solid.

What am I missing between these 2 constructions? Btw, what is the difference when G4VSensitiveDetector::ProcessHits() returns true and false?

Thanks!

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

 Add Message Add Message
to: "Replicated touchable's copy/replica numbers always zero ??"

 Subscribe Subscribe

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


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]