Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CCalEcal Class Reference

#include <CCalEcal.hh>

Inheritance diagram for CCalEcal:
Collaboration diagram for CCalEcal:

Public Member Functions

 CCalEcal (const G4String &name)
 
virtual ~CCalEcal ()
 
G4String getGenMat () const
 
double getWidBox () const
 
double getLengBox () const
 
double getXpos () const
 
double getYpos () const
 
double getZpos () const
 
double getThetaX () const
 
double getPhiX () const
 
double getThetaY () const
 
double getPhiY () const
 
double getThetaZ () const
 
double getPhiZ () const
 
G4String getLayMat () const
 
int getLayNum () const
 
double getLayRadius () const
 
double getLayAngle () const
 
double getLengFront () const
 
double getLayPar (unsigned int i) const
 
G4String getCrystMat () const
 
int getCrystNum () const
 
double getCrystLength () const
 
double getCrystTol () const
 
double getCrystPar (unsigned int i) const
 
G4String getSuppMat () const
 
double getDxSupp () const
 
double getDySupp () const
 
double getDzSupp () const
 
double getDistSupp () const
 
- Public Member Functions inherited from CCalDetector
 CCalDetector (const G4String &name)
 
virtual ~CCalDetector ()
 
void constructHierarchy ()
 
void construct ()
 
void addDetector (CCalDetector *)
 
G4String Name () const
 
G4String baseFileName () const
 
G4String File () const
 
CCalDetectorgetDaughter (int i) const
 
int getNDaughters () const
 
G4bool operator== (const CCalDetector &left) const
 
G4bool operator!= (const CCalDetector &left) const
 

Protected Member Functions

virtual int readFile ()
 
virtual void constructDaughters ()
 
- Protected Member Functions inherited from CCalDetector
int buildFromFile ()
 

Additional Inherited Members

- Protected Attributes inherited from CCalDetector
G4String detectorName
 
G4String fileName
 
G4String pathName
 
CCalDetectorTable theDetectorsInside
 
int constructFlag
 

Detailed Description

Definition at line 35 of file CCalEcal.hh.

Constructor & Destructor Documentation

CCalEcal::CCalEcal ( const G4String name)
inline

Definition at line 38 of file CCalEcal.hh.

38  :
39  CCalDetector(name) {}
CCalDetector(const G4String &name)
Definition: CCalDetector.cc:44
CCalEcal::~CCalEcal ( )
virtual

Definition at line 37 of file CCalEcal.cc.

37 {}

Member Function Documentation

void CCalEcal::constructDaughters ( )
protectedvirtual

Implements CCalDetector.

Definition at line 111 of file CCalEcal.cc.

111 {}
double CCalEcal::getCrystLength ( ) const
inline

Definition at line 63 of file CCalEcal.hh.

63 {return crystLength;}
G4String CCalEcal::getCrystMat ( ) const
inline

Definition at line 61 of file CCalEcal.hh.

61 {return crystMat;}
int CCalEcal::getCrystNum ( ) const
inline

Definition at line 62 of file CCalEcal.hh.

62 {return crystNum;}
double CCalEcal::getCrystPar ( unsigned int  i) const
inline

Definition at line 65 of file CCalEcal.hh.

65 {return crystPar[i];}
double CCalEcal::getCrystTol ( ) const
inline

Definition at line 64 of file CCalEcal.hh.

64 {return crystTol;}
double CCalEcal::getDistSupp ( ) const
inline

Definition at line 70 of file CCalEcal.hh.

70 {return distSupp;}
double CCalEcal::getDxSupp ( ) const
inline

Definition at line 67 of file CCalEcal.hh.

67 {return dxSupp;}
double CCalEcal::getDySupp ( ) const
inline

Definition at line 68 of file CCalEcal.hh.

68 {return dySupp;}
double CCalEcal::getDzSupp ( ) const
inline

Definition at line 69 of file CCalEcal.hh.

69 {return dzSupp;}
G4String CCalEcal::getGenMat ( ) const
inline

Definition at line 43 of file CCalEcal.hh.

43 {return genMat;}
double CCalEcal::getLayAngle ( ) const
inline

Definition at line 58 of file CCalEcal.hh.

58 {return layAngle;}
G4String CCalEcal::getLayMat ( ) const
inline

Definition at line 55 of file CCalEcal.hh.

55 {return layMat;}
int CCalEcal::getLayNum ( ) const
inline

Definition at line 56 of file CCalEcal.hh.

56 {return layNum;}
double CCalEcal::getLayPar ( unsigned int  i) const
inline

Definition at line 60 of file CCalEcal.hh.

60 {return layPar[i];}
double CCalEcal::getLayRadius ( ) const
inline

Definition at line 57 of file CCalEcal.hh.

57 {return layRadius;}
double CCalEcal::getLengBox ( ) const
inline

Definition at line 45 of file CCalEcal.hh.

45 {return lengBox;}
double CCalEcal::getLengFront ( ) const
inline

Definition at line 59 of file CCalEcal.hh.

59 {return lengFront;}
double CCalEcal::getPhiX ( ) const
inline

Definition at line 50 of file CCalEcal.hh.

50 {return phiX;}

Here is the caller graph for this function:

double CCalEcal::getPhiY ( ) const
inline

Definition at line 52 of file CCalEcal.hh.

52 {return phiY;}

Here is the caller graph for this function:

double CCalEcal::getPhiZ ( ) const
inline

Definition at line 54 of file CCalEcal.hh.

54 {return phiZ;}

Here is the caller graph for this function:

G4String CCalEcal::getSuppMat ( ) const
inline

Definition at line 66 of file CCalEcal.hh.

66 {return suppMat;}
double CCalEcal::getThetaX ( ) const
inline

Definition at line 49 of file CCalEcal.hh.

49 {return thetaX;}

Here is the caller graph for this function:

double CCalEcal::getThetaY ( ) const
inline

Definition at line 51 of file CCalEcal.hh.

51 {return thetaY;}

Here is the caller graph for this function:

double CCalEcal::getThetaZ ( ) const
inline

Definition at line 53 of file CCalEcal.hh.

53 {return thetaZ;}

Here is the caller graph for this function:

double CCalEcal::getWidBox ( ) const
inline

Definition at line 44 of file CCalEcal.hh.

44 {return widBox;}
double CCalEcal::getXpos ( ) const
inline

Definition at line 46 of file CCalEcal.hh.

46 {return xpos;}

Here is the caller graph for this function:

double CCalEcal::getYpos ( ) const
inline

Definition at line 47 of file CCalEcal.hh.

47 {return ypos;}

Here is the caller graph for this function:

double CCalEcal::getZpos ( ) const
inline

Definition at line 48 of file CCalEcal.hh.

48 {return zpos;}

Here is the caller graph for this function:

int CCalEcal::readFile ( )
protectedvirtual

Implements CCalDetector.

Definition at line 39 of file CCalEcal.cc.

39  {
41  //Let's open the file
42  G4cout << " ==> Opening file " << File() << " to read elements..."
43  << G4endl;
44 
45  std::ifstream is;
46  bool ok = openGeomFile(is, pathName, File());
47  if (!ok)
48  return 0;
49 
50  // Find *DO CrystalMatrix
51  findDO(is, G4String("CrystalMatrix"));
52 
53  //Let's read overall box dimensions and positions
54  readName(is,genMat);
55  is >> widBox >> lengBox >> xpos >> ypos >> zpos >> thetaX >> phiX
56  >> thetaY >> phiY >> thetaZ >> phiZ >> jump;
57 #ifdef debug
58  G4cout << tab << "General material: " << genMat << "\tBox dimensions "
59  << widBox << ", " << lengBox << G4endl;
60  G4cout << tab << "Positioned at (" << xpos << ", " << ypos << ", " << zpos
61  << ") with rotation (" << thetaX << ", " << phiX << ", " << thetaY
62  << ", " << phiY << ", " << thetaZ << ", " << phiZ << ")" << G4endl;
63 #endif
64 
65  //Then the layer positions
66  int i=0;
67  readName(is,layMat);
68  is >> layNum >> layRadius >> layAngle >> lengFront;
69  for (i=0; i<5; i++)
70  is >> layPar[i];
71 #ifdef debug
72  G4cout << tab << "Layer material: " << layMat << " Number " << layNum
73  << " Radius " << layRadius << " Angle " << layAngle/deg
74  << " front dist " << lengFront << " Parameters ";
75  for (i=0; i<5; i++)
76  G4cout << layPar[i] << " ";
77  G4cout << G4endl;
78 #endif
79 
80  //Then the crystal positions
81  readName(is,crystMat);
82  is >> crystNum >> crystLength >> crystTol;
83  for (i=0; i<5; i++)
84  is >> crystPar[i];
85 #ifdef debug
86  G4cout << tab << "Crystal material: " << crystMat << " Number " << crystNum
87  << " Length " << crystLength << " Tolerance " << crystTol
88  << " Parameters ";
89  for (i=0; i<5; i++)
90  G4cout << crystPar[i] << " ";
91  G4cout << G4endl;
92 #endif
93 
94  //Then the support material
95  readName(is,suppMat);
96  is >> dxSupp >> dySupp >> dzSupp >> distSupp >> jump;
97 #ifdef debug
98  G4cout << tab << "Support material: " << suppMat << " Dimensions " << dxSupp
99  << ", " << dySupp << ", " << dzSupp << " Distance " << distSupp << G4endl;
100 #endif
101 
103  // Close the file
104  G4cout << " ==> Closing file " << File() << G4endl;
105  is.close();
106 
107  return 1;
108 
109 }
bool openGeomFile(std::ifstream &is, const G4String &pathname, const G4String &filename)
Definition: CCalutils.cc:116
std::istream & jump(std::istream &)
Definition: CCalutils.cc:95
std::ifstream & findDO(std::ifstream &, const G4String &)
Definition: CCalutils.cc:72
std::ifstream & readName(std::ifstream &, G4String &)
Definition: CCalutils.cc:53
G4GLOB_DLL std::ostream G4cout
std::ostream & tab(std::ostream &)
Definition: CCalutils.cc:89
G4String pathName
#define G4endl
Definition: G4ios.hh:61
G4String File() const
Definition: CCalDetector.hh:79
static constexpr double deg
Definition: G4SIunits.hh:152

Here is the call graph for this function:


The documentation for this class was generated from the following files: