Ignore:
Timestamp:
Dec 22, 2010, 3:52:27 PM (15 years ago)
Author:
garnier
Message:

geant4 tag 9.4

Location:
trunk/source/geometry/divisions/src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/geometry/divisions/src/G4PVDivision.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4PVDivision.cc,v 1.22 2008/12/03 16:41:45 arce Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4PVDivision.cc,v 1.24 2010/09/06 09:28:24 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-ref-00 $
    2929//
    3030// class G4PVDivision Implementation file
     
    6262    G4Exception("G4PVDivision::G4PVDivision()", "InvalidSetup",
    6363                FatalException, message_1);
     64    return;
    6465  }
    6566  if (pLogical == pMotherLogical)
    6667  {
    67     G4String message_2 =
    68       "Cannot place a volume inside itself! Volume: " + pName;
     68    G4String message_2 = "Cannot place a volume inside itself! Volume: "+ pName;
    6969    G4Exception("G4PVDivision::G4PVDivision()", "InvalidSetup",
    7070                FatalException, message_2);
     
    9090  if (!pMotherLogical)
    9191  {
    92     G4String message_1 =
    93       "NULL pointer specified as mother! Volume: " + pName;
     92    G4String message_1 = "NULL pointer specified as mother! Volume: " + pName;
    9493    G4Exception("G4PVDivision::G4PVDivision()", "InvalidSetup",
    9594                FatalException, message_1);
     95    return;
    9696  }
    9797  if (pLogical == pMotherLogical)
    9898  {
    99     G4String message_2 =
    100       "Cannot place a volume inside itself! Volume: " + pName;
     99    G4String message_2 = "Cannot place a volume inside itself! Volume: "+ pName;
    101100    G4Exception("G4PVDivision::G4PVDivision()", "InvalidSetup",
    102101                FatalException, message_2);
     
    120119  if (!pMotherLogical)
    121120  {
    122     G4String message_1 =
    123       "NULL pointer specified as mother! Volume: " + pName;
     121    G4String message_1 = "NULL pointer specified as mother! Volume: " + pName;
    124122    G4Exception("G4PVDivision::G4PVDivision()", "InvalidSetup",
    125123                FatalException, message_1);
     124    return;
    126125  }
    127126  if (pLogical == pMotherLogical)
    128127  {
    129     G4String message_2 =
    130       "Cannot place a volume inside itself! Volume: " + pName;
     128    G4String message_2 = "Cannot place a volume inside itself! Volume: "+ pName;
    131129    G4Exception("G4PVDivision::G4PVDivision()", "InvalidSetup",
    132130                FatalException, message_2);
  • trunk/source/geometry/divisions/src/G4PVDivisionFactory.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4PVDivisionFactory.cc,v 1.2 2006/06/29 18:18:33 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4PVDivisionFactory.cc,v 1.3 2010/07/02 10:46:27 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-ref-00 $
    2929//
    3030// class G4PVDivisionFactory Implementation file
     
    137137                "WrongType", FatalException,
    138138                "Unexpected parameterisation type !");
     139    return 0;
    139140  }
     141  else
     142  {
     143    EAxis axis = divParam->GetAxis();
     144    G4int nofDivisions = divParam->GetNoDiv();
     145    G4double width = divParam->GetWidth();
     146    G4double offset = divParam->GetOffset();
    140147
    141   EAxis axis = divParam->GetAxis();
    142   G4int nofDivisions = divParam->GetNoDiv();
    143   G4double width = divParam->GetWidth();
    144   G4double offset = divParam->GetOffset();
    145 
    146   return new G4PVDivision(pName, pLogical, pMotherLogical,
    147                           axis, nofDivisions, width, offset);
     148    return new G4PVDivision(pName, pLogical, pMotherLogical,
     149                            axis, nofDivisions, width, offset);
     150  }
    148151}   
    149152
  • trunk/source/geometry/divisions/src/G4ParameterisationBox.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4ParameterisationBox.cc,v 1.10 2006/06/29 18:18:35 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4ParameterisationBox.cc,v 1.12 2010/11/10 09:15:56 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-ref-00 $
    2929//
    3030// class G4ParameterisationBox Implementation file
     
    3232// 26.05.03 - P.Arce, Initial version
    3333// 08.04.04 - I.Hrivnacova, Implemented reflection
     34// 21.04.10 - M.Asai, Added gaps
    3435// --------------------------------------------------------------------
    3536
     
    152153  G4Box* msol = (G4Box*)(fmotherSolid);
    153154
    154   G4double pDx = fwidth/2.;
     155  G4double pDx = fwidth/2. - fhgap;
    155156  G4double pDy = msol->GetYHalfLength();
    156157  G4double pDz = msol->GetZHalfLength();
     
    254255
    255256  G4double pDx = msol->GetXHalfLength();
    256   G4double pDy = fwidth/2.;
     257  G4double pDy = fwidth/2. - fhgap;
    257258  G4double pDz = msol->GetZHalfLength();
    258259
     
    356357  G4double pDx = msol->GetXHalfLength();
    357358  G4double pDy = msol->GetYHalfLength();
    358   G4double pDz = fwidth/2.;
     359  G4double pDz = fwidth/2. - fhgap;
    359360
    360361  box.SetXHalfLength( pDx );
  • trunk/source/geometry/divisions/src/G4ParameterisationCons.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4ParameterisationCons.cc,v 1.9 2006/06/29 18:18:38 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4ParameterisationCons.cc,v 1.11 2010/11/10 09:15:58 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-ref-00 $
    2929//
    3030// class G4ParameterisationCons Implementation file
     
    3232// 26.05.03 - P.Arce, Initial version
    3333// 08.04.04 - I.Hrivnacova, Implemented reflection
     34// 21.04.10 - M.Asai, Added gaps
    3435// --------------------------------------------------------------------
    3536
     
    188189  G4double pDz = msol->GetZHalfLength();
    189190
     191  G4double d_half_gap = fhgap * pRMax2 / pRMax1;
    190192  //- already rotated  double pSR = foffset + copyNo*fwidth;
    191193  G4double pSPhi = msol->GetStartPhiAngle();
    192194  G4double pDPhi = msol->GetDeltaPhiAngle();;
    193195
    194   cons.SetInnerRadiusMinusZ( pRMin1 );
    195   cons.SetOuterRadiusMinusZ( pRMax1 );
    196   cons.SetInnerRadiusPlusZ( pRMin2 );
    197   cons.SetOuterRadiusPlusZ( pRMax2 );
     196  cons.SetInnerRadiusMinusZ( pRMin1 + fhgap );
     197  cons.SetOuterRadiusMinusZ( pRMax1 - fhgap );
     198  cons.SetInnerRadiusPlusZ( pRMin2 + d_half_gap );
     199  cons.SetOuterRadiusPlusZ( pRMax2 - d_half_gap );
    198200  cons.SetZHalfLength( pDz );
    199201  cons.SetStartPhiAngle( pSPhi );
     
    295297
    296298  //- already rotated  double pSPhi = foffset + copyNo*fwidth;
    297   G4double pSPhi = foffset + msol->GetStartPhiAngle();
    298   G4double pDPhi = fwidth;
     299  G4double pSPhi = foffset + msol->GetStartPhiAngle() + fhgap;
     300  G4double pDPhi = fwidth - 2.*fhgap;
    299301
    300302  cons.SetInnerRadiusMinusZ( pRMin1 );
     
    396398  G4Cons* msol = (G4Cons*)(fmotherSolid);
    397399
    398   G4double mHalfLength = msol->GetZHalfLength();
     400  G4double mHalfLength = msol->GetZHalfLength() - fhgap;
    399401  G4double aRInner = (msol->GetInnerRadiusPlusZ()
    400402                   - msol->GetInnerRadiusMinusZ()) / (2*mHalfLength);
     
    405407  G4double bROuter = (msol->GetOuterRadiusPlusZ()
    406408                   + msol->GetOuterRadiusMinusZ()) / 2;
    407   G4double xMinusZ = -mHalfLength + OffsetZ() + fwidth*copyNo;
    408   G4double xPlusZ  = -mHalfLength + OffsetZ() + fwidth*(copyNo+1);
     409  G4double xMinusZ = -mHalfLength + OffsetZ() + fwidth*copyNo + fhgap;
     410  G4double xPlusZ  = -mHalfLength + OffsetZ() + fwidth*(copyNo+1) - fhgap;
    409411  cons.SetInnerRadiusMinusZ( aRInner * xMinusZ + bRInner );
    410412  cons.SetOuterRadiusMinusZ( aROuter * xMinusZ + bROuter );
     
    412414  cons.SetOuterRadiusPlusZ( aROuter * xPlusZ + bROuter );
    413415 
    414   G4double pDz = fwidth / 2.;
     416  G4double pDz = fwidth / 2. - fhgap;
    415417  G4double pSPhi = msol->GetStartPhiAngle();
    416418  G4double pDPhi = msol->GetDeltaPhiAngle();
  • trunk/source/geometry/divisions/src/G4ParameterisationPara.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4ParameterisationPara.cc,v 1.11 2006/06/29 18:18:42 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4ParameterisationPara.cc,v 1.13 2010/11/10 09:16:03 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-ref-00 $
    2929//
    3030// class G4ParameterisationPara Implementation file
     
    3232// 26.05.03 - P.Arce, Initial version
    3333// 08.04.04 - I.Hrivnacova, Implemented reflection
     34// 21.04.10 - M.Asai, Added gaps
    3435// --------------------------------------------------------------------
    3536
     
    162163
    163164  //---- Get
    164   G4double pDx = fwidth/2.;
     165  G4double pDx = fwidth/2. - fhgap;
    165166  G4double pDy = msol->GetYHalfLength();
    166167  G4double pDz = msol->GetZHalfLength();
     
    265266  //---- Get
    266267  G4double pDx = msol->GetXHalfLength();
    267   G4double pDy = fwidth/2.;
     268  G4double pDy = fwidth/2. - fhgap;
    268269  G4double pDz = msol->GetZHalfLength();
    269270  G4double pAlpha = std::atan(msol->GetTanAlpha());
     
    366367  G4double pDx = msol->GetXHalfLength();
    367368  G4double pDy = msol->GetYHalfLength();
     369  G4double pDz = fwidth/2. - fhgap;
    368370  G4double pAlpha = std::atan(msol->GetTanAlpha());
    369371  G4double pTheta = msol->GetSymAxis().theta();
    370372  G4double pPhi = msol->GetSymAxis().phi();
    371   G4double pDz = fwidth/2.;
    372373 
    373374  para.SetAllParameters ( pDx, pDy, pDz, pAlpha, pTheta, pPhi );
  • trunk/source/geometry/divisions/src/G4ParameterisationPolycone.cc

    r1337 r1347  
    2626//
    2727// $Id: G4ParameterisationPolycone.cc,v 1.17 2009/05/18 19:30:29 ivana Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     28// GEANT4 tag $Name: geant4-09-04-ref-00 $
    2929//
    3030// class G4ParameterisationPolycone Implementation file
  • trunk/source/geometry/divisions/src/G4ParameterisationPolyhedra.cc

    r1337 r1347  
    2626//
    2727// $Id: G4ParameterisationPolyhedra.cc,v 1.19 2009/05/20 08:35:52 ivana Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     28// GEANT4 tag $Name: geant4-09-04-ref-00 $
    2929//
    3030// class G4ParameterisationPolyhedra Implementation file
  • trunk/source/geometry/divisions/src/G4ParameterisationTrd.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4ParameterisationTrd.cc,v 1.16 2008/12/18 12:57:20 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4ParameterisationTrd.cc,v 1.19 2010/11/10 09:16:08 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-ref-00 $
    2929//
    3030// class G4ParameterisationTrd Implementation file
     
    3232// 26.05.03 - P.Arce, Initial version
    3333// 08.04.04 - I.Hrivnacova, Implemented reflection
     34// 21.04.10 - M.Asai, Added gaps
    3435// --------------------------------------------------------------------
    3536
     
    5051                        G4double offset, G4VSolid* msolid,
    5152                        DivisionType divType )
    52   :  G4VDivisionParameterisation( axis, nDiv, width, offset, divType, msolid )
     53  :  G4VDivisionParameterisation( axis, nDiv, width, offset, divType, msolid ),
     54     bDivInTrap(false)
    5355{
    5456  G4Trd* msol = (G4Trd*)(msolid);
     
    141143  G4ThreeVector origin(0.,0.,0.);
    142144  G4double posi;
    143   if( !bDivInTrap ) {
     145  if( !bDivInTrap )
     146  {
    144147    posi = -mdx + foffset + (copyNo+0.5)*fwidth;
    145   } else {
     148  }
     149  else
     150  {
    146151    G4double aveHL = (msol->GetXHalfLength1()+msol->GetXHalfLength2())/2.;
    147152    posi = - aveHL + foffset + (copyNo+0.5)*aveHL/fnDiv*2;
     
    181186  G4double pDy2 = msol->GetYHalfLength2();
    182187  G4double pDz = msol->GetZHalfLength();
    183   G4double pDx = fwidth/2.;
     188  G4double pDx = fwidth/2. - fhgap;
    184189 
    185190  trd.SetAllParameters ( pDx, pDx, pDy1, pDy2, pDz );
     
    203208  else
    204209  {
    205     return theTrap;
     210    return fmotherSolid;
    206211  }
    207212}
     
    232237                          alp,
    233238                          pDy2,
    234                           pDx1,
    235                           pDx2,
     239                          pDx1 - fhgap,
     240                          pDx2 - fhgap * pDx2/pDx1,
    236241                          alp);
    237242
     
    249254{
    250255  G4VDivisionParameterisation::CheckParametersValidity();
    251 
     256/*
    252257  G4Trd* msol = (G4Trd*)(fmotherSolid);
    253258
     
    258263  if( std::fabs(mpDx1 - mpDx2) > kCarTolerance )
    259264  {
    260     return;
    261 
    262265    G4cerr << "ERROR - G4ParameterisationTrdX::CheckParametersValidity()"
    263266           << G4endl
     
    270273                "Invalid solid specification. NOT supported.");
    271274  }
     275*/
    272276}
    273277
     
    370374  G4double pDx2 = msol->GetXHalfLength2();
    371375  G4double pDz = msol->GetZHalfLength();
    372   G4double pDy = fwidth/2.;
     376  G4double pDy = fwidth/2. - fhgap;
    373377 
    374378  trd.SetAllParameters ( pDx1, pDx2, pDy, pDy, pDz );
     
    501505  G4double pDy1 = msol->GetYHalfLength1();
    502506  G4double DDy = (msol->GetYHalfLength2() - msol->GetYHalfLength1() );
    503   G4double pDz = fwidth/2.;
     507  G4double pDz = fwidth/2. - fhgap;
    504508  G4double zLength = 2*msol->GetZHalfLength();
    505509 
    506   trd.SetAllParameters( pDx1+DDx*(OffsetZ()+copyNo*fwidth)/zLength,
    507                         pDx1+DDx*(OffsetZ()+(copyNo+1)*fwidth)/zLength,
    508                         pDy1+DDy*(OffsetZ()+copyNo*fwidth)/zLength,
    509                         pDy1+DDy*(OffsetZ()+(copyNo+1)*fwidth)/zLength, pDz );
     510  trd.SetAllParameters( pDx1+DDx*(OffsetZ()+copyNo*fwidth+fhgap)/zLength,
     511                        pDx1+DDx*(OffsetZ()+(copyNo+1)*fwidth-fhgap)/zLength,
     512                        pDy1+DDy*(OffsetZ()+copyNo*fwidth+fhgap)/zLength,
     513                        pDy1+DDy*(OffsetZ()+(copyNo+1)*fwidth-fhgap)/zLength, pDz );
    510514
    511515#ifdef G4DIVDEBUG
  • trunk/source/geometry/divisions/src/G4ParameterisationTubs.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4ParameterisationTubs.cc,v 1.8 2006/06/29 18:18:50 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4ParameterisationTubs.cc,v 1.10 2010/11/10 09:16:13 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-ref-00 $
    2929//
    3030// class G4ParameterisationTubs Implementation file
     
    3232// 26.05.03 - P.Arce, Initial version
    3333// 08.04.04 - I.Hrivnacova, Implemented reflection
     34// 21.04.10 - M.Asai, Added gaps
    3435// --------------------------------------------------------------------
    3536
     
    156157  G4Tubs* msol = (G4Tubs*)(fmotherSolid);
    157158
    158   G4double pRMin = msol->GetInnerRadius() + foffset + fwidth * copyNo;
    159   G4double pRMax = msol->GetInnerRadius() + foffset + fwidth * (copyNo+1);
     159  G4double pRMin = msol->GetInnerRadius() + foffset + fwidth * copyNo + fhgap;
     160  G4double pRMax = msol->GetInnerRadius() + foffset + fwidth * (copyNo+1) - fhgap;
    160161  G4double pDz = msol->GetZHalfLength();
    161162  //- already rotated  G4double pSR = foffset + copyNo*fwidth;
     
    269270  G4double pDz = msol->GetZHalfLength();
    270271  //----- already rotated in 'ComputeTransformation'
    271   G4double pSPhi = msol->GetStartPhiAngle();
    272   G4double pDPhi = fwidth;
     272  G4double pSPhi = msol->GetStartPhiAngle() + fhgap;
     273  G4double pDPhi = fwidth - 2.*fhgap;
    273274
    274275  tubs.SetInnerRadius( pRMin );
     
    379380  G4double pRMax = msol->GetOuterRadius();
    380381  //  G4double pDz = msol->GetZHalfLength() / GetNoDiv();
    381   G4double pDz = fwidth/2.;
     382  G4double pDz = fwidth/2. - fhgap;
    382383  G4double pSPhi = msol->GetStartPhiAngle();
    383384  G4double pDPhi = msol->GetDeltaPhiAngle();
  • trunk/source/geometry/divisions/src/G4VDivisionParameterisation.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4VDivisionParameterisation.cc,v 1.14 2008/12/03 16:41:15 arce Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4VDivisionParameterisation.cc,v 1.16 2010/11/10 09:16:18 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-ref-00 $
    2929//
    3030// class G4VDivisionParameterisation Implementation file
     
    3232// 26.05.03 - P.Arce, Initial version
    3333// 08.04.04 - I.Hrivnacova, Implemented reflection
     34// 21.04.10 - M.Asai, Added gaps
    3435// --------------------------------------------------------------------
    3536
     
    5051  : faxis(axis), fnDiv( nDiv), fwidth(step), foffset(offset),
    5152    fDivisionType(divType), fmotherSolid( motherSolid ), fReflectedSolid(false),
    52     fDeleteSolid(false) 
     53    fDeleteSolid(false), theVoluFirstCopyNo(1), fhgap(0.)
    5354{
    5455#ifdef G4DIVDEBUG
     
    6162  }
    6263#endif
    63 
    64   theVoluFirstCopyNo = 1;
    6564  kCarTolerance = G4GeometryTolerance::GetInstance()->GetSurfaceTolerance();
    6665}
Note: See TracChangeset for help on using the changeset viewer.