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

#include <CCalEcalOrganization.hh>

Inheritance diagram for CCalEcalOrganization:
Collaboration diagram for CCalEcalOrganization:

Public Member Functions

 CCalEcalOrganization ()
 
 ~CCalEcalOrganization ()
 
virtual unsigned int GetUnitID (const G4Step *aStep) const
 
- Public Member Functions inherited from CCalVOrganization
 CCalVOrganization ()
 
virtual ~CCalVOrganization ()
 
virtual int Levels (const G4Step *) const
 
virtual void DetectorLevel (const G4Step *, int &, int *, G4String *) const
 

Additional Inherited Members

- Protected Attributes inherited from CCalVOrganization
CCaloOrganization theOrg
 

Detailed Description

Definition at line 35 of file CCalEcalOrganization.hh.

Constructor & Destructor Documentation

CCalEcalOrganization::CCalEcalOrganization ( )
inline

Definition at line 38 of file CCalEcalOrganization.hh.

38 {};
CCalEcalOrganization::~CCalEcalOrganization ( )

Definition at line 36 of file CCalEcalOrganization.cc.

36  {
37  G4cout << " Deleting CCalEcalOrganization" << G4endl;
38 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Member Function Documentation

unsigned int CCalEcalOrganization::GetUnitID ( const G4Step aStep) const
virtual

Implements CCalVOrganization.

Definition at line 41 of file CCalEcalOrganization.cc.

41  {
42 
43  G4TouchableHistory* theTouchable =
45 
46  int idl=0, idn=0;
47  int level = theTouchable->GetHistoryDepth();
48  int idx = theTouchable->GetReplicaNumber( 0 ) - 1;
49  if ( level > 0 ) {
50  idl = theTouchable->GetReplicaNumber( 1 ) - 1;
51  if ( level > 1 ) {
52  idn = theTouchable->GetReplicaNumber( 2 );
53  }
54  }
55 
56  unsigned int idunit = idn*4096 + idl*64 + idx;
57 
58  return idunit;
59 }
G4int GetHistoryDepth() const
const G4VTouchable * GetTouchable() const
G4StepPoint * GetPreStepPoint() const
G4int GetReplicaNumber(G4int depth=0) const

Here is the call graph for this function:


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