Message: Re: Placing Daughter Volumes within repeated Mother Volume Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Placing Daughter Volumes within repeated Mother Volume 

Keywords: Volume Placement
Forum: Geometry
Re: Question Placing Daughter Volumes within repeated Mother Volume (Andre)
Re: Question Re: Placing Daughter Volumes within repeated Mother Volume (Gabriele Cosmo)
Date: 15 Aug, 2007
From: <aj_labelle@laurentian.ca>

  // Odd numbers of elements?:
    if(2*(nelj/2)==nelj){ jmin=-nelj/2; jmax=nelj/2; jmin=-jmax; joff=.5; }
    else{jmin=-nelj/2; jmax=nelj/2+1; joff=0.; }
    if(2*(nelk/2)==nelk){ kmin=-nelk/2; kmax=nelk/2; kmin=-kmax; koff=.5; }
    else{kmin=-nelk/2; kmax=nelk/2+1; koff=0.; }

    // Loops start:
    for(G4int k=kmin-nelkextra;k<kmax+nelkextra;k++) {
      G4double Pos_z = (koff+k)*2.*size_z ;

      if(2*(neli/2)==neli){iflag=0;}
      else{iflag=1;}
      for(G4int j=jmin-neljextra;j<jmax+neljextra;j++){
        G4double Pos_y = (joff+j)*size_y ;

        if(iflag){imin=-neli/2; imax=neli/2+1; ioff=0.; iflag=0;}
        else{imin=-neli/2; imax=neli/2; imin=-imax; ioff=.5; iflag=1;}
        for(G4int i=imin-neliextra;i<imax+neliextra;i++){
          G4double Pos_x = (ioff+i)*2.*size_x ;
          G4int Element_ID = i + imax*j + imax*jmax*k ;
        if(Coating){
          TheEpoxyBlock_phys = new G4PVPlacement
        (0,G4ThreeVector(Pos_x, Pos_y, Pos_z), TheEpoxyBlock_log,name="EpBlock",World_log,false,Element_ID);
//        TheLeadBlock_phys = new G4PVPlacement
//          (0,G4ThreeVector(Pos_x, Pos_y, Pos_z),TheLeadBlock_log,name="PbBlock",World_log,false,Element_ID);
          moderatorPoly_phys = new G4PVPlacement
          (0,G4ThreeVector(Pos_x,Pos_y,Pos_z), moderatorPoly_log,name="Moderator",World_log,false,Element_ID) ;

        } else {

          TheLeadBlock_phys = new G4PVPlacement
          (0,G4ThreeVector(Pos_x,Pos_y,Pos_z), TheLeadBlock_log,name="PbBlock",World_log,false,Element_ID) ;
          moderatorPoly_phys = new G4PVPlacement
          (0,G4ThreeVector(Pos_x,Pos_y,Pos_z), moderatorPoly_log,name="Moderator",World_log,false,Element_ID) ;
        }

          if(i<imin || i>=imax || j<jmin || j>=jmax || k<kmin || k>=kmax) {
            HeNonCounter_phys = new G4PVPlacement
              (0,G4ThreeVector(Pos_x,Pos_y+Rdist,Pos_z), HeNonCounter_log,name="NonCounter",World_log,false,Element_ID) ;
            HeNonCounter_phys = new G4PVPlacement
          (0,G4ThreeVector(Pos_x,Pos_y-Rdist,Pos_z), HeNonCounter_log,name="Counter",World_log,false,Element_ID) ;
            HeNonCounter_phys = new G4PVPlacement
              (0,G4ThreeVector(Pos_x+Rdist,Pos_y,Pos_z), HeNonCounter_log,name="Counter",World_log,false,Element_ID) ;
            HeNonCounter_phys = new G4PVPlacement
              (0,G4ThreeVector(Pos_x-Rdist,Pos_y,Pos_z), HeNonCounter_log,name="Counter",World_log,false,Element_ID);
            //BF3NonCounter_phys = new G4PVPlacement
            //  (0,G4ThreeVector(Pos_x,Pos_y,Pos_z), BF3NonCounter_log,name="NonCounter",World_log,false,Element_ID) ;
            //HeNonCounter_phys = new G4PVPlacement
              //(0,G4ThreeVector(Pos_x,Pos_y,Pos_z), HeNonCounter_log,name="NonCounter",World_log,false,Element_ID) ;
          } else {
            HeCounter_phys = new G4PVPlacement
            (0,G4ThreeVector(Pos_x,Pos_y+Rdist,Pos_z), HeCounter_log,name="Counter",World_log,false,Element_ID) ;
            HeCounter_phys = new G4PVPlacement
            (0,G4ThreeVector(Pos_x,Pos_y-Rdist,Pos_z), HeCounter_log,name="Counter",World_log,false,Element_ID) ;
            HeCounter_phys = new G4PVPlacement
            (0,G4ThreeVector(Pos_x+Rdist,Pos_y,Pos_z), HeCounter_log,name="Counter",World_log,false,Element_ID) ;
   HeCounter_phys = new G4PVPlacement
            (0,G4ThreeVector(Pos_x-Rdist,Pos_y,Pos_z), HeCounter_log,name="Counter",World_log,false,Element_ID);
            //BF3Counter_phys = new G4PVPlacement
            //  (0,G4ThreeVector(Pos_x,Pos_y,Pos_z), BF3Counter_log,name="RealCounter",World_log,false,Element_ID) ;
            //HeCounter_phys = new G4PVPlacement
        //                        (0,G4ThreeVector(Pos_x,Pos_y,Pos_z), HeCounter_log,name="Counter",World_log,false,Element_ID) ;
          }
        }
      }
    }

  }
  }
if(Coating){
          TheLeadBlock_phys = new G4PVPlacement
          (0,G4ThreeVector(0.,0.,0.),TheLeadBlock_log,name="PbBlock",TheEpoxyBlock_log,false,0);}

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

1 Question: Re: Placing Daughter Volumes within repeated Mother Volume   (Gabriele Cosmo - 15 Aug, 2007)
1 None: Re: Placing Daughter Volumes within repeated Mother Volume   (Andre - 15 Aug, 2007)
(_ More: Re: Placing Daughter Volumes within repeated Mother Volume   (Gabriele Cosmo - 15 Aug, 2007)
3 None: Re: Placing Daughter Volumes within repeated Mother Volume   (Andre - 15 Aug, 2007)
1 More: Re: Placing Daughter Volumes within repeated Mother Volume   (Gabriele Cosmo - 15 Aug, 2007)
 Add Message Add Message
to: "Re: Placing Daughter Volumes within 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 ]