Message: Re: Primitive Scorer in repeated mother volume Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Primitive Scorer in repeated mother volume 

Forum: Hits, Digitization and Pileup
Re: Question Primitive Scorer in repeated mother volume (Suhaili Zakaria)
Re: None Re: Primitive Scorer in repeated mother volume (Tsukasa Aso)
Re: Question Re: Primitive Scorer in repeated mother volume (Suhaili Zakaria)
Date: 30 Mar, 2009
From: Tsukasa Aso <Tsukasa Aso>

Hi, 

 The score value you get will be the sum of four detectors in this case.

Please modify your code as follows if you want to distinguish thoes values
for each detectors.

1)When you place the mother volume using a placement physical volume 
for each detector by G4PVPlacement,You can specify its copy number 
in the argument. G4PVPlacement has several constructor, for example,

G4PVPlacement (G4RotationMatrix *pRot, const G4ThreeVector &tlate, G4LogicalVolume *pCurrentLogical, const G4String &pName, G4LogicalVolume *pMotherLogical, G4bool pMany, G4int pCopyNo, G4bool pSurfChk=false)
                               -------------<= This gives copy No.!
 

2) This copy number can be used to identify the volume.
You need to modify the GetIndex() method in your primitive scorer.

For example, I assume your collimator is placed 
by parameterisation and the number is less than 10000.
And, the geometry hierarchy is as follows.


Mother           Daughter            SubDauther
(Replica Level2)(Replica Level1)    (Replica Level0)
Detector Head + Detector
              + Collimator Volume - many collimator holes as parameterisation
                                    ( Number of holes is NCOL. )



G4int RE02PSPassageCellFlux::GetIndex(G4Step* aStep)
{
  const G4VTouchable* touchable = aStep->GetPreStepPoint()->GetTouchable();
  G4int HeadNumber = touchable->GetReplicaNumber(2);
  G4int ColimatorNumber = touchable->GetReplicaNumber(0);
  return  HeadNumber*10000+CollmatorNumber;
}

 You can distinguish the head number by looking the index  by
index%10000 in this example.

(please be carefull the replication level depends on your geometry hierarchy.)

I hope this is the answer for your question. 

Regards,
Tsukasa Aso

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

1 None: Re: Primitive Scorer in repeated mother volume   (Suhaili Zakaria - 31 Mar, 2009)
 Add Message Add Message
to: "Re: Primitive Scorer in repeated mother volume"

 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 ]