Message: Biasing specific volume Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Biasing specific volume 

Forum: Biasing and Scoring
Date: 30 Mar, 2016
From: Lin Li <Lin Li>

Dear all,
I have a question about how to bias physics process in specific volume. I added a new box in front of the original one in GB01 DetectorConstruction.cc. The code is:
  // -----------------------------------
  // -- volume where biasing is applied:
  // -----------------------------------
    
 //--add a new box
    G4double halfZ = 10*cm;
    G4VSolid* biasTest = new G4Box("test.bias", 1*m, 1*m, halfZ );
    
    G4LogicalVolume* biaslogic = new G4LogicalVolume(biasTest,        // its solid
                                                     defaultMaterial,  // its material
                                                     "bias.logical");  // its name
    
    new G4PVPlacement(0,                                               // no rotation
                      G4ThreeVector(0,0, -50*cm),                       // volume entrance at (0,0,0)
                      biaslogic,                                       // its logical volume
                      "test.bias",                                     // its name
                      logicWorld,                                      // its mother  volume
                      false,                                           // no boolean operation
                      0);                                              // copy number
    
  
    
 //--the orignal one
    
  G4VSolid* solidTest = new G4Box("test.solid", 1*m, 1*m, halfZ );
  
  G4LogicalVolume* logicTest = new G4LogicalVolume(solidTest,        // its solid
                                                   defaultMaterial,  // its material
                                                   "test.logical");  // its name

  new G4PVPlacement(0,                                               // no rotation
                    G4ThreeVector(0,0, halfZ),                       // volume entrance at (0,0,0)
                    logicTest,                                       // its logical volume
                    "test.phys",                                     // its name
                    logicWorld,                                      // its mother  volume
                    false,                                           // no boolean operation
                    0);                                              // copy number
  
  
  return physiWorld;
}

And the biasing volume is the original one "test.logical".
 // -- Fetch volume for biasing:
  G4LogicalVolume* logicTest = G4LogicalVolumeStore::GetInstance()->GetVolume("test.logical");
  
  // ----------------------------------------------
  // -- operator creation and attachment to volume:
  // ----------------------------------------------
  GB01BOptrMultiParticleChangeCrossSection* testMany = 
    new GB01BOptrMultiParticleChangeCrossSection();
  testMany->AddParticle("gamma");
  testMany->AddParticle("neutron");
  testMany->AttachTo(logicTest);
We think the biasing events only could happen in "test.phys" volume. But when we check the result, we can find biasing events in another volume, which is the new one "test.bias".
*********************************************************************************************************
* G4Track Information:   Particle = gamma,   Track ID = 1,   Parent ID = 0
*********************************************************************************************************
Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
0        0        0   -1e+03       100        0        0         0       World initStep
1        0        0     -600       100        0      400       400   test.bias Transportation
2        0        0     -556      6.57        0     43.9       444   test.bias biasWrapper(compt)
3   -0.884     28.5     -485      1.01        0     76.2       520   test.bias biasWrapper(compt)
4    -53.8      135     -453     0.487        0      123       643   test.bias biasWrapper(compt)
5    -60.7      138     -426     0.483        0     28.6       672   test.bias biasWrapper(compt)
6    -66.8      138     -400     0.483        0     26.5       698       World Transportation
7     -161      135 -5.68e-14     0.483        0      411  1.11e+03   test.phys Transportation
8     -179      134     78.1     0.248        0     80.3  1.19e+03   test.phys biasWrapper(compt)
9     -155      185     83.9     0.233        0     56.7  1.25e+03   test.phys biasWrapper(compt)
10     -112      215       93     0.218        0     53.1   1.3e+03   test.phys biasWrapper(compt)
11     -112      216     93.4     0.214        0    0.915   1.3e+03   test.phys biasWrapper(compt)
12     7.18      192      143     0.204        0      131  1.43e+03   test.phys biasWrapper(compt)
13     57.6      206      182     0.204  1.3e-05     65.7   1.5e+03   test.phys biasWrapper(compt)
14     80.4      213      200     0.204        0     29.6  1.53e+03       World Transportation
15    1e+04 3.17e+03 7.86e+03     0.204        0 1.29e+04  1.44e+04  OutOfWorld Transportation

Is this reasonable? Is there a way to bias events only in selected volume, like only in "test.phys" ?
Any help would be appreciated! Thank you.
Best, 
Lin

 Add Message Add Message
to: "Biasing specific volume"

 Subscribe Subscribe

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