Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

LCDG4CalSDNonProj Class Reference

#include <LCDG4CalSDNonProj.hh>

Inheritance diagram for LCDG4CalSDNonProj:

Inheritance graph
[legend]
Collaboration diagram for LCDG4CalSDNonProj:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LCDG4CalSDNonProj (G4String name, const XERCES_CPP_NAMESPACE::DOM_Element &voldb)
 ~LCDG4CalSDNonProj ()
unsigned int findCell (const G4ThreeVector &position)
G4ThreeVector getCellCenter (unsigned int cellIndex)
unsigned int getIndex1 (unsigned int cellIndex) const
unsigned int getIndex2 (unsigned int cellIndex) const
unsigned int getIndex3 (unsigned int cellIndex) const

Private Attributes

const NonProjCalGeomParamshcalpar
const NonProjCalGeometryhcal

Constructor & Destructor Documentation

LCDG4CalSDNonProj::LCDG4CalSDNonProj G4String  name,
const XERCES_CPP_NAMESPACE::DOM_Element &  voldb
 

LCDG4CalSDNonProj::~LCDG4CalSDNonProj  ) 
 

Definition at line 74 of file LCDG4CalSDNonProj.cc.

00074                                       {
00075 }


Member Function Documentation

unsigned int LCDG4CalSDNonProj::findCell const G4ThreeVector &  position  )  [virtual]
 

Implements LCDG4CalSD.

Definition at line 78 of file LCDG4CalSDNonProj.cc.

References NonProjCalGeometry::getClosestCell(), hcal, and NPCellID::packIn32Bits().

00078                                                                  {
00079   NPCellID npid = hcal->getClosestCell(pos);
00080   unsigned int cellIndex = npid.packIn32Bits();
00081   return cellIndex;
00082 }

G4ThreeVector LCDG4CalSDNonProj::getCellCenter unsigned int  cellIndex  )  [virtual]
 

Implements LCDG4CalSD.

Definition at line 85 of file LCDG4CalSDNonProj.cc.

References NonProjCalGeometry::getCellCenter(), getIndex1(), getIndex2(), hcal, and LCDG4CalSD::index.

00085                                                                      {
00086 
00087   // Important: set geometry-dependent indices: index[2] and index[3]
00088   // convenience aliases
00089   unsigned int& iphi = index[2];
00090   unsigned int& iz   = index[3];
00091   iphi = getIndex1(cellIndex);
00092   iz   = getIndex2(cellIndex);
00093   NPCellID npid(cellIndex);
00094   G4ThreeVector cellcenter(hcal->getCellCenter(npid));
00095   return cellcenter;
00096 }

unsigned int LCDG4CalSDNonProj::getIndex1 unsigned int  cellIndex  )  const [virtual]
 

Implements LCDG4CalSD.

Definition at line 106 of file LCDG4CalSDNonProj.cc.

Referenced by getCellCenter().

00106                                                                       {
00107   return (cellIndex & 0x3fff);
00108 }

unsigned int LCDG4CalSDNonProj::getIndex2 unsigned int  cellIndex  )  const [virtual]
 

Implements LCDG4CalSD.

Definition at line 111 of file LCDG4CalSDNonProj.cc.

Referenced by getCellCenter().

00111                                                                       {
00112 //   int izAux = (cellIndex>>14)&0xfff;
00113 //   if(izAux&0x800) izAux |= ~0xfff;        // account for sign bit
00114 //   unsigned int iz = izAux;
00115   return (cellIndex >> 14) & 0xfff;
00116 }

unsigned int LCDG4CalSDNonProj::getIndex3 unsigned int  cellIndex  )  const [virtual]
 

Implements LCDG4CalSD.

Definition at line 119 of file LCDG4CalSDNonProj.cc.

00119                                                                       {
00120   return (cellIndex >> 26) & 0x3f;
00121 }


Member Data Documentation

const NonProjCalGeometry* LCDG4CalSDNonProj::hcal [private]
 

Definition at line 41 of file LCDG4CalSDNonProj.hh.

Referenced by findCell(), and getCellCenter().

const NonProjCalGeomParams* LCDG4CalSDNonProj::hcalpar [private]
 

Definition at line 40 of file LCDG4CalSDNonProj.hh.


The documentation for this class was generated from the following files:
Generated on Thu Oct 7 18:45:05 2004 for LCDG4 by doxygen 1.3.4