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

#include <CCalHall.hh>

Inheritance diagram for CCalHall:
Collaboration diagram for CCalHall:

Public Member Functions

 CCalHall (const G4String &name)
 
virtual ~CCalHall ()
 
G4String getMaterial () const
 
double getDy_2Hall () const
 
double getDx_2Hall () 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 CCalHall.hh.

Constructor & Destructor Documentation

CCalHall::CCalHall ( const G4String name)

Definition at line 40 of file CCalHall.cc.

40 : CCalDetector(name) {}
CCalDetector(const G4String &name)
Definition: CCalDetector.cc:44
CCalHall::~CCalHall ( )
virtual

Definition at line 42 of file CCalHall.cc.

42 {}

Member Function Documentation

void CCalHall::constructDaughters ( )
protectedvirtual

Implements CCalDetector.

Reimplemented in CCalG4Hall.

Definition at line 75 of file CCalHall.cc.

75  {
76  CCalHcal* hcal = new CCalHcal("HadronCalorimeter");
77  addDetector(hcal);
78 
79  CCalEcal* ecal = new CCalEcal("CrystalMatrixModule");
80  addDetector(ecal);
81 }
void addDetector(CCalDetector *)
Definition: CCalDetector.cc:95

Here is the call graph for this function:

double CCalHall::getDx_2Hall ( ) const
inline

Definition at line 44 of file CCalHall.hh.

44 {return dx_2Hall;}

Here is the caller graph for this function:

double CCalHall::getDy_2Hall ( ) const
inline

Definition at line 43 of file CCalHall.hh.

43 {return dy_2Hall;}

Here is the caller graph for this function:

G4String CCalHall::getMaterial ( ) const
inline

Definition at line 42 of file CCalHall.hh.

42 {return genMaterial;}

Here is the caller graph for this function:

int CCalHall::readFile ( )
protectedvirtual

Implements CCalDetector.

Definition at line 44 of file CCalHall.cc.

44  {
46  //Let's open the file
47  G4cout << " ==> Opening file " << File() << " to read elements..."
48  << G4endl;
49 
50  std::ifstream is;
51  bool ok = openGeomFile(is, pathName, File());
52  if (!ok)
53  return 0;
54 
55  // Find *DO HcalTB96
56  findDO(is, G4String("HcalTB96"));
57 
58  // Calorimeter boundaries
59  readName(is,genMaterial);
60  is >> dy_2Hall >> dx_2Hall >> jump;
61 #ifdef debug
62  G4cout << tab << "General material: " << genMaterial << " Size " << dy_2Hall
63  << ", " << dx_2Hall << G4endl;
64 #endif
65 
67  // Close the file
68  G4cout << " ==> Closing file " << File() << G4endl;
69  is.close();
70 
71  return 1;
72 
73 }
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

Here is the call graph for this function:


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