Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions
CCalHall Class Reference

#include <CCalHall.hh>

Inheritance diagram for CCalHall:
CCalDetector CCalG4Hall

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
 
CCalDetectorTable theDetectorsInside
 
int constructFlag
 
- Static Protected Attributes inherited from CCalDetector
static G4String pathName = getenv("CCAL_GEOMPATH")
 

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.

References CCalDetector::addDetector().

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:87
double CCalHall::getDx_2Hall ( ) const
inline

Definition at line 44 of file CCalHall.hh.

Referenced by CCalG4Hall::constructIn().

44 {return dx_2Hall;}
double CCalHall::getDy_2Hall ( ) const
inline

Definition at line 43 of file CCalHall.hh.

Referenced by CCalG4Hall::constructIn().

43 {return dy_2Hall;}
G4String CCalHall::getMaterial ( ) const
inline

Definition at line 42 of file CCalHall.hh.

Referenced by CCalG4Hall::constructIn().

42 {return genMaterial;}
int CCalHall::readFile ( )
protectedvirtual

Implements CCalDetector.

Definition at line 44 of file CCalHall.cc.

References CCalDetector::File(), findDO(), G4cout, G4endl, jump(), openGeomFile(), CCalDetector::pathName, readName(), and tab().

44  {
45  ///////////////////////////////////////////////////////////////
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 
66  ///////////////////////////////////////////////////////////////
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
static G4String pathName
#define G4endl
Definition: G4ios.hh:61
G4String File() const
Definition: CCalDetector.hh:79

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