![]() |
|
|||
File indexing completed on 2025-02-23 09:22:29
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // 0027 /// \file B2bChamberParameterisation.cc 0028 /// \brief Implementation of the B2bChamberParameterisation class 0029 0030 #include "B2bChamberParameterisation.hh" 0031 0032 #include "G4SystemOfUnits.hh" 0033 #include "G4ThreeVector.hh" 0034 #include "G4Tubs.hh" 0035 #include "G4VPhysicalVolume.hh" 0036 0037 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0038 0039 B2bChamberParameterisation::B2bChamberParameterisation(G4int noChambers, 0040 G4double startZ, // Z of center of first 0041 G4double spacingZ, // Z spacing of centers 0042 G4double widthChamber, 0043 G4double lengthInitial, G4double lengthFinal) 0044 : G4VPVParameterisation() 0045 { 0046 fNoChambers = noChambers; 0047 fStartZ = startZ; 0048 fHalfWidth = 0.5 * widthChamber; 0049 fSpacing = spacingZ; 0050 fRmaxFirst = 0.5 * lengthInitial; 0051 if (noChambers > 0) { 0052 fRmaxIncr = 0.5 * (lengthFinal - lengthInitial) / (noChambers - 1); 0053 if (spacingZ < widthChamber) { 0054 G4Exception("B2bChamberParameterisation::B2bChamberParameterisation()", "InvalidSetup", 0055 FatalException, "Width>Spacing"); 0056 } 0057 } 0058 } 0059 0060 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0061 0062 B2bChamberParameterisation::~B2bChamberParameterisation() {} 0063 0064 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0065 0066 void B2bChamberParameterisation::ComputeTransformation(const G4int copyNo, 0067 G4VPhysicalVolume* physVol) const 0068 { 0069 // Note: copyNo will start with zero! 0070 G4double Zposition = fStartZ + copyNo * fSpacing; 0071 G4ThreeVector origin(0, 0, Zposition); 0072 physVol->SetTranslation(origin); 0073 physVol->SetRotation(0); 0074 } 0075 0076 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0077 0078 void B2bChamberParameterisation::ComputeDimensions(G4Tubs& trackerChamber, const G4int copyNo, 0079 const G4VPhysicalVolume*) const 0080 { 0081 // Note: copyNo will start with zero! 0082 G4double rmax = fRmaxFirst + copyNo * fRmaxIncr; 0083 trackerChamber.SetInnerRadius(0); 0084 trackerChamber.SetOuterRadius(rmax); 0085 trackerChamber.SetZHalfLength(fHalfWidth); 0086 trackerChamber.SetStartPhiAngle(0. * deg); 0087 trackerChamber.SetDeltaPhiAngle(360. * deg); 0088 } 0089 0090 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |