File indexing completed on 2025-02-23 09:19:38
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030 #include "CCalEcal.hh"
0031
0032 #include <fstream>
0033 #include "CCalutils.hh"
0034 #include "G4SystemOfUnits.hh"
0035
0036
0037
0038 CCalEcal::~CCalEcal() {}
0039
0040 G4int CCalEcal::readFile() {
0041
0042
0043 G4cout << " ==> Opening file " << File() << " to read elements..."
0044 << G4endl;
0045
0046 std::ifstream is;
0047 G4bool ok = openGeomFile(is, pathName, File());
0048 if (!ok)
0049 return 0;
0050
0051
0052 findDO(is, G4String("CrystalMatrix"));
0053
0054
0055 readName(is,genMat);
0056 is >> widBox >> lengBox >> xpos >> ypos >> zpos >> thetaX >> phiX
0057 >> thetaY >> phiY >> thetaZ >> phiZ >> jump;
0058 #ifdef debug
0059 G4cout << tab << "General material: " << genMat << "\tBox dimensions "
0060 << widBox << ", " << lengBox << G4endl;
0061 G4cout << tab << "Positioned at (" << xpos << ", " << ypos << ", " << zpos
0062 << ") with rotation (" << thetaX << ", " << phiX << ", " << thetaY
0063 << ", " << phiY << ", " << thetaZ << ", " << phiZ << ")" << G4endl;
0064 #endif
0065
0066
0067 G4int i=0;
0068 readName(is,layMat);
0069 is >> layNum >> layRadius >> layAngle >> lengFront;
0070 for (i=0; i<5; i++)
0071 is >> layPar[i];
0072 #ifdef debug
0073 G4cout << tab << "Layer material: " << layMat << " Number " << layNum
0074 << " Radius " << layRadius << " Angle " << layAngle/deg
0075 << " front dist " << lengFront << " Parameters ";
0076 for (i=0; i<5; i++)
0077 G4cout << layPar[i] << " ";
0078 G4cout << G4endl;
0079 #endif
0080
0081
0082 readName(is,crystMat);
0083 is >> crystNum >> crystLength >> crystTol;
0084 for (i=0; i<5; i++)
0085 is >> crystPar[i];
0086 #ifdef debug
0087 G4cout << tab << "Crystal material: " << crystMat << " Number " << crystNum
0088 << " Length " << crystLength << " Tolerance " << crystTol
0089 << " Parameters ";
0090 for (i=0; i<5; i++)
0091 G4cout << crystPar[i] << " ";
0092 G4cout << G4endl;
0093 #endif
0094
0095
0096 readName(is,suppMat);
0097 is >> dxSupp >> dySupp >> dzSupp >> distSupp >> jump;
0098 #ifdef debug
0099 G4cout << tab << "Support material: " << suppMat << " Dimensions " << dxSupp
0100 << ", " << dySupp << ", " << dzSupp << " Distance " << distSupp << G4endl;
0101 #endif
0102
0103
0104
0105 G4cout << " ==> Closing file " << File() << G4endl;
0106 is.close();
0107
0108 return 1;
0109
0110 }
0111
0112 void CCalEcal::constructDaughters() {}