![]() |
|
|||
File indexing completed on 2025-02-23 09:19:39
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: CCalHall.cc 0028 // Description: CCalHall Geometry factory class for the experimental hall 0029 /////////////////////////////////////////////////////////////////////////////// 0030 #include "CCalHall.hh" 0031 0032 #include <fstream> 0033 #include "CCalutils.hh" 0034 0035 #include "CCalHcal.hh" 0036 #include "CCalEcal.hh" 0037 0038 //#define debug 0039 0040 CCalHall::CCalHall(const G4String &name): CCalDetector(name) {} 0041 0042 CCalHall::~CCalHall() {} 0043 0044 G4int CCalHall::readFile() { 0045 /////////////////////////////////////////////////////////////// 0046 //Let's open the file 0047 G4cout << " ==> Opening file " << File() << " to read elements..." 0048 << G4endl; 0049 0050 std::ifstream is; 0051 G4bool ok = openGeomFile(is, pathName, File()); 0052 if (!ok) 0053 return 0; 0054 0055 // Find *DO HcalTB96 0056 findDO(is, G4String("HcalTB96")); 0057 0058 // Calorimeter boundaries 0059 readName(is,genMaterial); 0060 is >> dy_2Hall >> dx_2Hall >> jump; 0061 #ifdef debug 0062 G4cout << tab << "General material: " << genMaterial << " Size " << dy_2Hall 0063 << ", " << dx_2Hall << G4endl; 0064 #endif 0065 0066 /////////////////////////////////////////////////////////////// 0067 // Close the file 0068 G4cout << " ==> Closing file " << File() << G4endl; 0069 is.close(); 0070 0071 return 1; 0072 0073 } 0074 0075 void CCalHall::constructDaughters() { 0076 CCalHcal* hcal = new CCalHcal("HadronCalorimeter"); 0077 addDetector(hcal); 0078 0079 CCalEcal* ecal = new CCalEcal("CrystalMatrixModule"); 0080 addDetector(ecal); 0081 }
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |