Geant4  10.02.p03
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 ()
 

Private Attributes

G4String genMat
 
double widBox
 
double lengBox
 
double xpos
 
double ypos
 
double zpos
 
double thetaX
 
double phiX
 
double thetaY
 
double phiY
 
double thetaZ
 
double phiZ
 
G4String layMat
 
int layNum
 
double layRadius
 
double layAngle
 
double lengFront
 
double layPar [5]
 
G4String crystMat
 
int crystNum
 
double crystLength
 
double crystTol
 
double crystPar [5]
 
G4String suppMat
 
double dxSupp
 
double dySupp
 
double dzSupp
 
double distSupp
 

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::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
Here is the call graph for this function:

◆ ~CCalEcal()

CCalEcal::~CCalEcal ( )
virtual

Definition at line 37 of file CCalEcal.cc.

37 {}
Here is the caller graph for this function:

Member Function Documentation

◆ constructDaughters()

void CCalEcal::constructDaughters ( )
protectedvirtual

Implements CCalDetector.

Definition at line 111 of file CCalEcal.cc.

111 {}
Here is the caller graph for this function:

◆ getCrystLength()

double CCalEcal::getCrystLength ( ) const
inline

Definition at line 63 of file CCalEcal.hh.

63 {return crystLength;}
double crystLength
Definition: CCalEcal.hh:89
Here is the caller graph for this function:

◆ getCrystMat()

G4String CCalEcal::getCrystMat ( ) const
inline

Definition at line 61 of file CCalEcal.hh.

61 {return crystMat;}
G4String crystMat
Definition: CCalEcal.hh:87
Here is the caller graph for this function:

◆ getCrystNum()

int CCalEcal::getCrystNum ( ) const
inline

Definition at line 62 of file CCalEcal.hh.

62 {return crystNum;}
int crystNum
Definition: CCalEcal.hh:88
Here is the caller graph for this function:

◆ getCrystPar()

double CCalEcal::getCrystPar ( unsigned int  i) const
inline

Definition at line 65 of file CCalEcal.hh.

65 {return crystPar[i];}
double crystPar[5]
Definition: CCalEcal.hh:91
Here is the caller graph for this function:

◆ getCrystTol()

double CCalEcal::getCrystTol ( ) const
inline

Definition at line 64 of file CCalEcal.hh.

64 {return crystTol;}
double crystTol
Definition: CCalEcal.hh:90
Here is the caller graph for this function:

◆ getDistSupp()

double CCalEcal::getDistSupp ( ) const
inline

Definition at line 70 of file CCalEcal.hh.

70 {return distSupp;}
double distSupp
Definition: CCalEcal.hh:94
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDxSupp()

double CCalEcal::getDxSupp ( ) const
inline

Definition at line 67 of file CCalEcal.hh.

67 {return dxSupp;}
double dxSupp
Definition: CCalEcal.hh:93
Here is the caller graph for this function:

◆ getDySupp()

double CCalEcal::getDySupp ( ) const
inline

Definition at line 68 of file CCalEcal.hh.

68 {return dySupp;}
double dySupp
Definition: CCalEcal.hh:93
Here is the caller graph for this function:

◆ getDzSupp()

double CCalEcal::getDzSupp ( ) const
inline

Definition at line 69 of file CCalEcal.hh.

69 {return dzSupp;}
double dzSupp
Definition: CCalEcal.hh:93
Here is the caller graph for this function:

◆ getGenMat()

G4String CCalEcal::getGenMat ( ) const
inline

Definition at line 43 of file CCalEcal.hh.

43 {return genMat;}
G4String genMat
Definition: CCalEcal.hh:78
Here is the caller graph for this function:

◆ getLayAngle()

double CCalEcal::getLayAngle ( ) const
inline

Definition at line 58 of file CCalEcal.hh.

58 {return layAngle;}
double layAngle
Definition: CCalEcal.hh:84
Here is the caller graph for this function:

◆ getLayMat()

G4String CCalEcal::getLayMat ( ) const
inline

Definition at line 55 of file CCalEcal.hh.

55 {return layMat;}
G4String layMat
Definition: CCalEcal.hh:82
Here is the caller graph for this function:

◆ getLayNum()

int CCalEcal::getLayNum ( ) const
inline

Definition at line 56 of file CCalEcal.hh.

56 {return layNum;}
int layNum
Definition: CCalEcal.hh:83
Here is the caller graph for this function:

◆ getLayPar()

double CCalEcal::getLayPar ( unsigned int  i) const
inline

Definition at line 60 of file CCalEcal.hh.

60 {return layPar[i];}
double layPar[5]
Definition: CCalEcal.hh:86
Here is the caller graph for this function:

◆ getLayRadius()

double CCalEcal::getLayRadius ( ) const
inline

Definition at line 57 of file CCalEcal.hh.

57 {return layRadius;}
double layRadius
Definition: CCalEcal.hh:84
Here is the caller graph for this function:

◆ getLengBox()

double CCalEcal::getLengBox ( ) const
inline

Definition at line 45 of file CCalEcal.hh.

45 {return lengBox;}
double lengBox
Definition: CCalEcal.hh:79
Here is the caller graph for this function:

◆ getLengFront()

double CCalEcal::getLengFront ( ) const
inline

Definition at line 59 of file CCalEcal.hh.

59 {return lengFront;}
double lengFront
Definition: CCalEcal.hh:85
Here is the caller graph for this function:

◆ getPhiX()

double CCalEcal::getPhiX ( ) const
inline

Definition at line 50 of file CCalEcal.hh.

50 {return phiX;}
double phiX
Definition: CCalEcal.hh:81
Here is the caller graph for this function:

◆ getPhiY()

double CCalEcal::getPhiY ( ) const
inline

Definition at line 52 of file CCalEcal.hh.

52 {return phiY;}
double phiY
Definition: CCalEcal.hh:81
Here is the caller graph for this function:

◆ getPhiZ()

double CCalEcal::getPhiZ ( ) const
inline

Definition at line 54 of file CCalEcal.hh.

54 {return phiZ;}
double phiZ
Definition: CCalEcal.hh:81
Here is the caller graph for this function:

◆ getSuppMat()

G4String CCalEcal::getSuppMat ( ) const
inline

Definition at line 66 of file CCalEcal.hh.

66 {return suppMat;}
G4String suppMat
Definition: CCalEcal.hh:92
Here is the caller graph for this function:

◆ getThetaX()

double CCalEcal::getThetaX ( ) const
inline

Definition at line 49 of file CCalEcal.hh.

49 {return thetaX;}
double thetaX
Definition: CCalEcal.hh:81
Here is the caller graph for this function:

◆ getThetaY()

double CCalEcal::getThetaY ( ) const
inline

Definition at line 51 of file CCalEcal.hh.

51 {return thetaY;}
double thetaY
Definition: CCalEcal.hh:81
Here is the caller graph for this function:

◆ getThetaZ()

double CCalEcal::getThetaZ ( ) const
inline

Definition at line 53 of file CCalEcal.hh.

53 {return thetaZ;}
double thetaZ
Definition: CCalEcal.hh:81
Here is the caller graph for this function:

◆ getWidBox()

double CCalEcal::getWidBox ( ) const
inline

Definition at line 44 of file CCalEcal.hh.

44 {return widBox;}
double widBox
Definition: CCalEcal.hh:79
Here is the caller graph for this function:

◆ getXpos()

double CCalEcal::getXpos ( ) const
inline

Definition at line 46 of file CCalEcal.hh.

46 {return xpos;}
double xpos
Definition: CCalEcal.hh:80
Here is the caller graph for this function:

◆ getYpos()

double CCalEcal::getYpos ( ) const
inline

Definition at line 47 of file CCalEcal.hh.

47 {return ypos;}
double ypos
Definition: CCalEcal.hh:80
Here is the caller graph for this function:

◆ getZpos()

double CCalEcal::getZpos ( ) const
inline

Definition at line 48 of file CCalEcal.hh.

48 {return zpos;}
double zpos
Definition: CCalEcal.hh:80
Here is the caller graph for this function:

◆ readFile()

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 }
int crystNum
Definition: CCalEcal.hh:88
double thetaY
Definition: CCalEcal.hh:81
double crystLength
Definition: CCalEcal.hh:89
double xpos
Definition: CCalEcal.hh:80
bool openGeomFile(std::ifstream &is, const G4String &pathname, const G4String &filename)
Definition: CCalutils.cc:116
int layNum
Definition: CCalEcal.hh:83
double dySupp
Definition: CCalEcal.hh:93
double crystPar[5]
Definition: CCalEcal.hh:91
G4String genMat
Definition: CCalEcal.hh:78
std::istream & jump(std::istream &)
Definition: CCalutils.cc:95
std::ifstream & findDO(std::ifstream &, const G4String &)
Definition: CCalutils.cc:72
double ypos
Definition: CCalEcal.hh:80
double thetaZ
Definition: CCalEcal.hh:81
G4String crystMat
Definition: CCalEcal.hh:87
double layAngle
Definition: CCalEcal.hh:84
double thetaX
Definition: CCalEcal.hh:81
double lengBox
Definition: CCalEcal.hh:79
G4String suppMat
Definition: CCalEcal.hh:92
std::ifstream & readName(std::ifstream &, G4String &)
Definition: CCalutils.cc:53
G4GLOB_DLL std::ostream G4cout
static const double deg
Definition: G4SIunits.hh:151
std::ostream & tab(std::ostream &)
Definition: CCalutils.cc:89
double dxSupp
Definition: CCalEcal.hh:93
double phiY
Definition: CCalEcal.hh:81
G4String pathName
double lengFront
Definition: CCalEcal.hh:85
double layRadius
Definition: CCalEcal.hh:84
double phiX
Definition: CCalEcal.hh:81
double zpos
Definition: CCalEcal.hh:80
double widBox
Definition: CCalEcal.hh:79
#define G4endl
Definition: G4ios.hh:61
double distSupp
Definition: CCalEcal.hh:94
G4String layMat
Definition: CCalEcal.hh:82
double layPar[5]
Definition: CCalEcal.hh:86
double dzSupp
Definition: CCalEcal.hh:93
G4String File() const
Definition: CCalDetector.hh:79
double phiZ
Definition: CCalEcal.hh:81
double crystTol
Definition: CCalEcal.hh:90
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ crystLength

double CCalEcal::crystLength
private

Definition at line 89 of file CCalEcal.hh.

◆ crystMat

G4String CCalEcal::crystMat
private

Definition at line 87 of file CCalEcal.hh.

◆ crystNum

int CCalEcal::crystNum
private

Definition at line 88 of file CCalEcal.hh.

◆ crystPar

double CCalEcal::crystPar[5]
private

Definition at line 91 of file CCalEcal.hh.

◆ crystTol

double CCalEcal::crystTol
private

Definition at line 90 of file CCalEcal.hh.

◆ distSupp

double CCalEcal::distSupp
private

Definition at line 94 of file CCalEcal.hh.

◆ dxSupp

double CCalEcal::dxSupp
private

Definition at line 93 of file CCalEcal.hh.

◆ dySupp

double CCalEcal::dySupp
private

Definition at line 93 of file CCalEcal.hh.

◆ dzSupp

double CCalEcal::dzSupp
private

Definition at line 93 of file CCalEcal.hh.

◆ genMat

G4String CCalEcal::genMat
private

Definition at line 78 of file CCalEcal.hh.

◆ layAngle

double CCalEcal::layAngle
private

Definition at line 84 of file CCalEcal.hh.

◆ layMat

G4String CCalEcal::layMat
private

Definition at line 82 of file CCalEcal.hh.

◆ layNum

int CCalEcal::layNum
private

Definition at line 83 of file CCalEcal.hh.

◆ layPar

double CCalEcal::layPar[5]
private

Definition at line 86 of file CCalEcal.hh.

◆ layRadius

double CCalEcal::layRadius
private

Definition at line 84 of file CCalEcal.hh.

◆ lengBox

double CCalEcal::lengBox
private

Definition at line 79 of file CCalEcal.hh.

◆ lengFront

double CCalEcal::lengFront
private

Definition at line 85 of file CCalEcal.hh.

◆ phiX

double CCalEcal::phiX
private

Definition at line 81 of file CCalEcal.hh.

◆ phiY

double CCalEcal::phiY
private

Definition at line 81 of file CCalEcal.hh.

◆ phiZ

double CCalEcal::phiZ
private

Definition at line 81 of file CCalEcal.hh.

◆ suppMat

G4String CCalEcal::suppMat
private

Definition at line 92 of file CCalEcal.hh.

◆ thetaX

double CCalEcal::thetaX
private

Definition at line 81 of file CCalEcal.hh.

◆ thetaY

double CCalEcal::thetaY
private

Definition at line 81 of file CCalEcal.hh.

◆ thetaZ

double CCalEcal::thetaZ
private

Definition at line 81 of file CCalEcal.hh.

◆ widBox

double CCalEcal::widBox
private

Definition at line 79 of file CCalEcal.hh.

◆ xpos

double CCalEcal::xpos
private

Definition at line 80 of file CCalEcal.hh.

◆ ypos

double CCalEcal::ypos
private

Definition at line 80 of file CCalEcal.hh.

◆ zpos

double CCalEcal::zpos
private

Definition at line 80 of file CCalEcal.hh.


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