|
|
|||
File indexing completed on 2026-09-09 08:29:37
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 /// \file G02ChamberParameterisation.cc 0027 /// \brief Implementation of the G02ChamberParameterisation class 0028 0029 // Class G02ChamberParameterisation implementation 0030 // 0031 // ---------------------------------------------------------------------------- 0032 0033 #include "G02ChamberParameterisation.hh" 0034 0035 #include "G4Box.hh" 0036 #include "G4ThreeVector.hh" 0037 #include "G4VPhysicalVolume.hh" 0038 0039 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0040 0041 G02ChamberParameterisation::G02ChamberParameterisation(G4int NoChambers, 0042 G4double startZ, // Z of center of first 0043 G4double spacingZ, // Z spacing of centers 0044 G4double widthChamber, 0045 G4double lengthInitial, G4double lengthFinal) 0046 : G4VPVParameterisation() 0047 { 0048 fNoChambers = NoChambers; 0049 fStartZ = startZ; 0050 fHalfWidth = widthChamber * 0.5; 0051 fSpacing = spacingZ; 0052 fHalfLengthFirst = 0.5 * lengthInitial; 0053 0054 if (NoChambers > 0) { 0055 fHalfLengthIncr = 0.5 * (lengthFinal - lengthInitial) / NoChambers; 0056 if (spacingZ < widthChamber) { 0057 G4Exception("ExN02G02ChamberParameterisation::G02ChamberParameterisation()", "InvalidSetup", 0058 FatalException, "Invalid construction: Width>Spacing"); 0059 } 0060 } 0061 } 0062 0063 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0064 0065 G02ChamberParameterisation::~G02ChamberParameterisation() {} 0066 0067 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0068 0069 void G02ChamberParameterisation::ComputeTransformation(const G4int copyNo, 0070 G4VPhysicalVolume* physVol) const 0071 { 0072 G4double Zposition = fStartZ + (copyNo + 1) * fSpacing; 0073 G4ThreeVector origin(0., 0., Zposition); 0074 physVol->SetTranslation(origin); 0075 physVol->SetRotation(0); 0076 } 0077 0078 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0079 0080 void G02ChamberParameterisation::ComputeDimensions(G4Box& trackerChamber, const G4int copyNo, 0081 const G4VPhysicalVolume*) const 0082 { 0083 G4double halfLength = fHalfLengthFirst + copyNo * fHalfLengthIncr; 0084 trackerChamber.SetXHalfLength(halfLength); 0085 trackerChamber.SetYHalfLength(halfLength); 0086 trackerChamber.SetZHalfLength(fHalfWidth); 0087 } 0088 0089 //....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 |
|