Message: Re: Warning when I use enforced interaction biasing technique Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Warning when I use enforced interaction biasing technique 

Forum: Biasing and Scoring
Re: None Warning when I use enforced interaction biasing technique (Ruirui)
Re: None Re: Warning when I use enforced interaction biasing technique (Marc Verderi)
Re: None Re: Warning when I use enforced interaction biasing technique (Ruirui)
Re: None Re: Warning when I use enforced interaction biasing technique (Marc Verderi)
Date: Sep 10, 07:29
From: Ruirui <Ruirui>

Hi Marc,

Thank you for your reply. So basically I build a simulation for simulating the effectiveness of anti-scatter gird of CT. In the simulation, I collect the deposited energy by X-ray in the detectors. The energy deposited inside the detectors are from two parts, the first one is from the primary photon, and the second one is the from the scattered photon. In the real CT application, we try to reduce the scatter photon as much as possible, so we will use these anti-scatter grid which is usually some thin metal plates.

Below are part of the code for the geometry of these thin plates. The attached firgure shows the geometry.

/ define and place the internal foil

  G4double dX_inf = crystalWrap_dX;
  G4double dY_inf = internalFoilThickness;
  G4double dZ_inf = internalFoilHeight;
  G4double dZ_inw  = 0.8*mm;
  G4Box* solidUpperInterFoil = new G4Box("upperInterFoil", dX_inf*8/2, dY_inf/2, dZ_inf/2);
  G4Box* solidLowerInterFoil = new G4Box("lowerInterFoil", dX_inf/2, dY_inf/2, dZ_inw/2);

  G4LogicalVolume* logicalUpperInterFoil = 
  new G4LogicalVolume(solidUpperInterFoil,          //its solid
		      edgeMat,           //its material
		      "upperInterFoilLV");        //its name

    G4Region *regVol;
    regVol= new G4Region("shieldingPlates");
    G4ProductionCuts* cuts = new G4ProductionCuts;
    cuts->SetProductionCut(0.1*um);
    regVol->SetProductionCuts(cuts);
    logicalUpperInterFoil->SetRegion(regVol);

  G4LogicalVolume* logicalLowerInterFoil =   
  new G4LogicalVolume(solidLowerInterFoil,          //its solid
		      wrap_mat,           //its material
		      "lowerInterFoilLV");        //its name
//    for (G4int icrys = 406; icrys < 407 ; icrys++)
    for (G4int icrys = 0; icrys < nb_cryst-1 ; icrys++) 
    {
    G4double phi = icrys*dPhi+initialAngle-arcAngle/2.0+dPhi/2+dPhi/2;
//     G4double phi = icrys*dPhi;
    G4RotationMatrix rotm  = G4RotationMatrix();
    rotm.rotateY(90*deg);  // rotating from Y Z plane to X Y plane, that is why rotating with respect to Y axis
    rotm.rotateZ(phi);
    G4ThreeVector uz = G4ThreeVector(std::cos(phi),  std::sin(phi),0.);     
    G4ThreeVector position = (ring_R1+ crystalWrap_dZ - 0.5* dZ_inw)*uz;
    G4Transform3D transform = G4Transform3D(rotm,position);

    new G4PVPlacement(transform,             //rotation,position
                      logicalLowerInterFoil,            //its logical volume
                      "lowerInterFoil",             //its name
                      logicRing,             //its mother  volume
                      false,                 //no boolean operation
                      icrys,                 //copy number
                      checkOrNotCheckOverlapping);       // checking overlaps 

    G4ThreeVector positionw = (ring_R1+ crystalWrap_dZ - dZ_inw-0.5*internalFoilHeight)*uz;
    G4Transform3D transformw = G4Transform3D(rotm,positionw);
    new G4PVPlacement(transformw,             //rotation,position
		  logicalUpperInterFoil,            //its logical volume
		  "upperInterFoil",             //its name
		  logicRing,             //its mother  volume
		  false,                 //no boolean operation
		  icrys,                 //copy number
		  checkOrNotCheckOverlapping);       // checking overlaps 
  }

Then in the ConstructSDandField() method, I define put the volume of thin plate to the bias volume. Part of the code is as below:

   // below we start to add the biasing operator to the volume where we need, in this case we use force interaction operator

     // -- Fetch volume for biasing:
  G4LogicalVolume* logicTest = G4LogicalVolumeStore::GetInstance()->GetVolume("upperInterFoilLV");

     // ----------------------------------------------
  // --enforce interaction operator creation and attachment to volume:
  // ----------------------------------------------
  GB02BOptrMultiParticleForceCollision* testMany =  new GB02BOptrMultiParticleForceCollision();
  testMany->AddParticle("gamma"); // we apply this operator to gamma
   testMany->AttachTo(logicTest);

  G4cout << " Attaching biasing operator " << testMany->GetName()
         << " to logical volume " << logicTest->GetName()
         << G4endl;

   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2018/09/10/07.29-91080-Selection_086.png
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2018/09/10/07.29-32398-Selection_013.png

 Add Message Add Message
to: "Re: Warning when I use enforced interaction biasing technique"

 Subscribe Subscribe

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