Message: scoring flux in a box divided in cells in x-y plane with event biasing Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question scoring flux in a box divided in cells in x-y plane with event biasing 

Forum: Biasing and Scoring
Date: 07 Jul, 2013
From: Cristian Bungau <Cristian Bungau>

Hello,

I am trying to score the incoming flux in a box, but have the box divided in x-y plane so I can get the X-Y distribution of incoming particles.

So I have a box in my DetectorConstruction:

  G4Box* TopDetectorSolid = new G4Box("TopDetector", 125.*cm, 150.*cm, 2.5*cm);

  TopDetectorLog = new G4LogicalVolume(TopDetectorSolid, Air,"TopDetector");

  TopDetectorPhys = new G4PVPlacement(0,G4ThreeVector(),
                                      TopDetectorLog,"TopDetector",logicWorld,
                                      false,0);

And to get the flux distribution along the x-y plane (250cm * 300cm), I divide daughter volumes along x-y to which I'll assign different flux scorers:

  G4Box* TopDetectorScorerSolid = new G4Box("TopDetectorScorer", (10./2.)*cm, (12./2.)*cm, 2.5*cm);

  TopDetectorScorerLog = new G4LogicalVolume(TopDetectorScorerSolid, Air,"TopDetectorScorer");

  for (int j = 0; j < 50; j++) {
  for (int i = 0; i < 50; i++) {

TopDetectorScorerPhys = new G4PVPlacement(0,

  G4ThreeVector((250.-(2.*i+1)/2.)*10.*cm,(300.-(2.*j+1)/2.)*12.*cm,0.),
  TopDetectorScorerLog,"TopDetectorScorer",TopDetectorLog,
  false,
  i+50*j // 2500 copies
  );

}}

So I'll have 2500 scorers each attached to one of the copies above.

//----------------------

Also I have to use geometry biasing so I am assigning importance to each volume. For the 2500 copies of the small volumes, I assign the importance like this:

  for (int i=0; i<2500; i++) 
      { 
      istore->AddImportanceGeometryCell(std::pow(2., 7), *TopDetectorScorerPhys, i);
      }

But during the run I get a G4Exception abort message, that one of the copies (replica 687 in this case) does not have an importance assigned to it and it is not in the list, and here it gives all the volumes with the replica numbers, including the one it complains about not being in the list.

I would be very grateful for any help or suggestion,

Thank you very much,

Best regards,

Cristian

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

1 None: Re: scoring flux in a box divided in cells in x-y plane with event biasing   (Tsukasa Aso - 07 Jul, 2013)
(_ More: Re: scoring flux in a box divided in cells in x-y plane with event biasing   (Cristian Bungau - 08 Jul, 2013)
(_ None: Re: scoring flux in a box divided in cells in x-y plane with event biasing   (Eleni - 01 Aug, 2013)
 Add Message Add Message
to: "scoring flux in a box divided in cells in x-y plane with event biasing"

 Subscribe Subscribe

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