Message: Re: 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

More Re: scoring flux in a box divided in cells in x-y plane with event biasing 

Forum: Biasing and Scoring
Re: Question scoring flux in a box divided in cells in x-y plane with event biasing (Cristian Bungau)
Re: None Re: scoring flux in a box divided in cells in x-y plane with event biasing (Tsukasa Aso)
Date: 08 Jul, 2013
From: Cristian Bungau <Cristian Bungau>

Hello,

Thank you very much for your reply. I was trying to simplify the numbers I have in my code just to illustrate the case and I did it wrong. Anyway here are the correct numbers:

  G4RotationMatrix* rotDTop = new G4RotationMatrix();
  rotDTop->rotateX(90.*deg);   // Y<->Z

  G4Box* TopDetectorSolid = new G4Box("TopDetector", 120.*cm, 185.*cm, 2.5*cm);

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

  fLogicalVolumeVector.push_back(TopDetectorLog); 

  TopDetectorPhys = new G4PVPlacement(rotDTop,G4ThreeVector(0.,(120.+2.501)*cm,0.),
                                      TopDetectorLog,"TopDetector",logicWorld,
                                      false,0);

  fPhysicalVolumeVector.push_back(TopDetectorPhys);

  G4Box* TopDetectorScorerSolid = new G4Box("TopDetectorScorer", (120./50.)*cm, (185./50.)*cm, 2.5*cm);

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

  fLogicalVolumeVector.push_back(TopDetectorScorerLog); 

  for (int j_coord = 0; j_coord < 50; j_coord++) { 
  for (int i_coord = 0; i_coord < 50; i_coord++) {  

    TopDetectorScorerPhys = new G4PVPlacement(0,G4ThreeVector(
			   -120.*cm + ((120./50.)*2.*(double(i_coord)+(1./2.)))*cm,
			   -185.*cm + ((185./50.)*2.*(double(j_coord)+(1./2.)))*cm,
                           0.),
                                      TopDetectorScorerLog,"TopDetectorScorer",TopDetectorLog,
				      false,
				      i_coord+(50*j_coord) // 2500 copies
                                      );

  }}

  fPhysicalVolumeVector.push_back(TopDetectorScorerPhys);

//*************************-----------------

Now for the importance assignments I use:

  istore->AddImportanceGeometryCell(std::pow(2., 7), *TopDetectorPhys);

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

and during the run I get:

G4Exception: GeomBias0002 issued by G4IStore::Error() GetImportance() - Region does not exist!

Geometry cell, Volume name = TopDetectorScorer, Replica number = 1275, not found in:

Volume name = World, Replica number = 0, importance = 128 Volume name = TopDetector, Replica number = 0, importance = 128 Volume name = TopDetectorScorer, Replica number = 0, importance = 128 Volume name = TopDetectorScorer, Replica number = 1, importance = 128 Volume name = TopDetectorScorer, Replica number = 2, importance = 128 Volume name = TopDetectorScorer, Replica number = 3, importance = 128 Volume name = TopDetectorScorer, Replica number = 4, importance = 128 Volume name = TopDetectorScorer, Replica number = 5, importance = 128 Volume name = TopDetectorScorer, Replica number = 6, importance = 128 Volume name = TopDetectorScorer, Replica number = 7, importance = 128

.......

Volume name = TopDetectorScorer, Replica number = 1275, importance = 128 Volume name = TopDetectorScorer, Replica number = 1276, importance = 128

........

This is what I do not understand, as the volume it complains about is actually in the list.

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   (Eleni - 01 Aug, 2013)
 Add Message Add Message
to: "Re: 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