8 #include <Geant4/G4ThreeVector.hh> 
    9 #include <Geant4/G4RotationMatrix.hh> 
   10 #include <Geant4/G4VPhysicalVolume.hh> 
   11 #include <Geant4/G4LogicalVolume.hh> 
   12 #include <Geant4/G4ReflectedSolid.hh> 
   13 #include <Geant4/G4Tubs.hh> 
   19                                                           G4double width, G4double offset,
 
   20                                                           G4VSolid* msolid, DivisionType divType ) :
 
   21   G4VParameterisationTubs( axis, nDiv, width, offset, msolid, divType )
 
   23   CheckParametersValidity();
 
   24   SetType( 
"DivisionTubsZ" );
 
   36   G4Tubs* msol = (G4Tubs*)(fmotherSolid);
 
   37   double radius = msol->GetInnerRadius();
 
   40   double _centerZ = 0.0;
 
   42   double minZ = -msol->GetZHalfLength() ;
 
   44   double minR = sqrt(radius*radius + minZ*minZ);
 
   45   double minEta = -std::log((minR-minZ)/radius);
 
   46   double maxR = sqrt(radius*radius + maxZ*maxZ);
 
   47   double maxEta = -std::log((maxR-maxZ)/radius);
 
   49   double totalEta = maxEta - minEta;
 
   50   double dEta = totalEta / GetNoDiv();
 
   51   double zmin = _centerZ + radius * std::sinh(minEta);
 
   52   for(
int i=0; i<GetNoDiv(); i++)
 
   55       double etaMin = minEta + dEta * i;
 
   56       double etaMax = etaMin + dEta;
 
   60       double zmax = _centerZ + radius * std::sinh(etaMax);
 
   63       double zpos = (zmin+zmax)/2.0;
 
   64       double zhalf = (zmax-zmin)/2.0;
 
   65       _zpos.push_back(zpos);
 
   66       _zhalf.push_back(zhalf);
 
   91   G4Tubs* msol = (G4Tubs*)(fmotherSolid);
 
   92   return 2*msol->GetZHalfLength();
 
  103   double posi = _zpos.at(copyNo);
 
  104   G4ThreeVector origin(0.,0.,posi); 
 
  105   physVol->SetTranslation( origin );
 
  111     G4cout << 
" PHG4ParameterisationTubsEta::ComputeTransformation()" << G4endl
 
  112            << 
" Position: " << posi << 
" - copyNo: " << copyNo << G4endl
 
  113            << 
" foffset " << foffset/deg << 
" - fwidth " << fwidth/deg
 
  118   ChangeRotMatrix( physVol );
 
  122     G4cout << std::setprecision(8) << 
" PHG4ParameterisationTubsEta " << copyNo
 
  124            << 
" Position: " << origin << 
" - Width: " << fwidth
 
  125            << 
" - Axis: " << faxis  << G4endl; 
 
  133                                                 const G4VPhysicalVolume* )
 const 
  135   G4Tubs* msol = (G4Tubs*)(fmotherSolid);
 
  137   G4double pRMin = msol->GetInnerRadius();
 
  138   G4double pRMax = msol->GetOuterRadius();
 
  141   G4double pDz = _zhalf.at(copyNo);
 
  142   G4double pSPhi = msol->GetStartPhiAngle();
 
  143   G4double pDPhi = msol->GetDeltaPhiAngle();
 
  145   tubs.SetInnerRadius( pRMin );
 
  146   tubs.SetOuterRadius( pRMax );
 
  147   tubs.SetZHalfLength( pDz );
 
  148   tubs.SetStartPhiAngle( pSPhi );
 
  149   tubs.SetDeltaPhiAngle( pDPhi );
 
  153     G4cout << 
" PHG4ParameterisationTubsEta::ComputeDimensions()" << G4endl
 
  154            << 
" pDz: " << pDz << G4endl;
 
virtual void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const
virtual ~PHG4ParameterisationTubsEta()
virtual G4double GetMaxParameter() const
void ComputeDimensions(G4Tubs &tubs, const G4int copyNo, const G4VPhysicalVolume *physVol) const
PHG4ParameterisationTubsEta(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *motherSolid, DivisionType divType=DivNDIVandWIDTH)