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

#include <CexmcEnergyDepositInCalorimeter.hh>

Inheritance diagram for CexmcEnergyDepositInCalorimeter:
Collaboration diagram for CexmcEnergyDepositInCalorimeter:

Public Member Functions

 CexmcEnergyDepositInCalorimeter (const G4String &name, const CexmcSetup *setup)
 
void PrintAll (void)
 
- Public Member Functions inherited from CexmcEnergyDepositInLeftRightSet
 CexmcEnergyDepositInLeftRightSet (const G4String &name, const CexmcSetup *setup)
 
void PrintAll (void)
 
- Public Member Functions inherited from CexmcSimpleEnergyDeposit
 CexmcSimpleEnergyDeposit (const G4String &name)
 
void Initialize (G4HCofThisEvent *hcOfThisEvent)
 
void EndOfEvent (G4HCofThisEvent *hcOfThisEvent)
 
void DrawAll (void)
 
void PrintAll (void)
 
void clear (void)
 
- Public Member Functions inherited from CexmcPrimitiveScorer
 CexmcPrimitiveScorer (const G4String &name)
 
virtual ~CexmcPrimitiveScorer ()
 
void InitializeMessenger (void)
 
- Public Member Functions inherited from G4VPrimitiveScorer
 G4VPrimitiveScorer (G4String name, G4int depth=0)
 
virtual ~G4VPrimitiveScorer ()
 
G4int GetCollectionID (G4int)
 
void SetUnit (const G4String &unit)
 
const G4StringGetUnit () const
 
G4double GetUnitValue () const
 
void SetMultiFunctionalDetector (G4MultiFunctionalDetector *d)
 
G4MultiFunctionalDetectorGetMultiFunctionalDetector () const
 
G4String GetName () const
 
void SetFilter (G4VSDFilter *f)
 
G4VSDFilterGetFilter () const
 
void SetVerboseLevel (G4int vl)
 
G4int GetVerboseLevel () const
 
void SetNijk (G4int i, G4int j, G4int k)
 

Static Public Member Functions

static G4int GetRow (G4int index)
 
static G4int GetColumn (G4int index)
 
static G4int GetCopyDepth1BitsOffset (void)
 
- Static Public Member Functions inherited from CexmcEnergyDepositInLeftRightSet
static CexmcSide GetSide (G4int index)
 
static G4int GetLeftRightBitsOffset (void)
 

Protected Member Functions

G4int GetIndex (G4Step *step)
 
- Protected Member Functions inherited from CexmcEnergyDepositInLeftRightSet
G4int GetIndex (G4Step *step)
 
- Protected Member Functions inherited from CexmcSimpleEnergyDeposit
G4int GetIndex (G4Step *step)
 
G4bool ProcessHits (G4Step *step, G4TouchableHistory *tHistory)
 
- Protected Member Functions inherited from CexmcPrimitiveScorer
void PrintHeader (G4int nmbOfEntries) const
 
- Protected Member Functions inherited from G4VPrimitiveScorer
void CheckAndSetUnit (const G4String &unit, const G4String &category)
 

Static Protected Attributes

static const G4int copyDepth1BitsOffset = 8
 
- Static Protected Attributes inherited from CexmcEnergyDepositInLeftRightSet
static const G4int leftRightBitsOffset = 16
 

Additional Inherited Members

- Protected Attributes inherited from CexmcEnergyDepositInLeftRightSet
const CexmcSetupsetup
 
- Protected Attributes inherited from CexmcSimpleEnergyDeposit
CexmcEnergyDepositCollectioneventMap
 
- Protected Attributes inherited from G4VPrimitiveScorer
G4String primitiveName
 
G4MultiFunctionalDetectordetector
 
G4VSDFilterfilter
 
G4int verboseLevel
 
G4int indexDepth
 
G4String unitName
 
G4double unitValue
 
G4int fNi
 
G4int fNj
 
G4int fNk
 

Detailed Description

Definition at line 52 of file CexmcEnergyDepositInCalorimeter.hh.

Constructor & Destructor Documentation

CexmcEnergyDepositInCalorimeter::CexmcEnergyDepositInCalorimeter ( const G4String name,
const CexmcSetup setup 
)

Definition at line 54 of file CexmcEnergyDepositInCalorimeter.cc.

55  :
57 {
58 }
CexmcEnergyDepositInLeftRightSet(const G4String &name, const CexmcSetup *setup)

Member Function Documentation

G4int CexmcEnergyDepositInCalorimeter::GetColumn ( G4int  index)
inlinestatic

Definition at line 84 of file CexmcEnergyDepositInCalorimeter.hh.

85 {
86  return index & ( ( 1 << ( copyDepth1BitsOffset - 1 ) ) |
87  ( ( 1 << ( copyDepth1BitsOffset - 1 ) ) - 1 ) );
88 }

Here is the caller graph for this function:

G4int CexmcEnergyDepositInCalorimeter::GetCopyDepth1BitsOffset ( void  )
inlinestatic

Definition at line 91 of file CexmcEnergyDepositInCalorimeter.hh.

92 {
93  return copyDepth1BitsOffset;
94 }
G4int CexmcEnergyDepositInCalorimeter::GetIndex ( G4Step step)
protectedvirtual

Reimplemented from G4VPrimitiveScorer.

Definition at line 61 of file CexmcEnergyDepositInCalorimeter.cc.

62 {
63  G4int ret( 0 );
64  G4StepPoint * preStep( step->GetPreStepPoint() );
65  const G4VTouchable * touchable( preStep->GetTouchable() );
66  const G4NavigationHistory * navHistory( touchable->GetHistory() );
67  G4int navDepth( navHistory->GetDepth() );
68  G4VPhysicalVolume * pVolume( navHistory->GetVolume(
69  navDepth - 2 ) );
70 
71  if ( setup->IsRightCalorimeter( pVolume ) )
72  ret |= 1 << leftRightBitsOffset;
73 
74  ret |= touchable->GetReplicaNumber( 0 );
75  ret |= touchable->GetReplicaNumber( 1 ) << copyDepth1BitsOffset;
76 
77  return ret;
78 }
int G4int
Definition: G4Types.hh:78
G4StepPoint * GetPreStepPoint() const
G4bool IsRightCalorimeter(const G4VPhysicalVolume *pVolume) const
Definition: CexmcSetup.hh:217

Here is the call graph for this function:

G4int CexmcEnergyDepositInCalorimeter::GetRow ( G4int  index)
inlinestatic

Definition at line 76 of file CexmcEnergyDepositInCalorimeter.hh.

77 {
78  index &= ( ( 1 << ( leftRightBitsOffset - 1 ) ) |
79  ( ( 1 << ( leftRightBitsOffset - 1 ) ) - 1 ) );
80  return index >> copyDepth1BitsOffset;
81 }

Here is the caller graph for this function:

void CexmcEnergyDepositInCalorimeter::PrintAll ( void  )
virtual

Reimplemented from G4VPrimitiveScorer.

Definition at line 81 of file CexmcEnergyDepositInCalorimeter.cc.

82 {
83  G4int nmbOfEntries( eventMap->entries() );
84 
85  if ( nmbOfEntries == 0 )
86  return;
87 
88  PrintHeader( nmbOfEntries );
89 
90  for ( CexmcEnergyDepositCollectionData::iterator
91  itr( eventMap->GetMap()->begin() );
92  itr != eventMap->GetMap()->end(); ++itr )
93  {
94  G4bool isRightDetector( itr->first >> leftRightBitsOffset );
95  G4int index( itr->first &
96  ( ( 1 << ( leftRightBitsOffset - 1 ) ) |
97  ( ( 1 << ( leftRightBitsOffset - 1 ) ) - 1 ) ) );
98  G4int copyDepth1( index >> copyDepth1BitsOffset );
99  G4int copyDepth0( index &
100  ( ( 1 << ( copyDepth1BitsOffset - 1 ) ) |
101  ( ( 1 << ( copyDepth1BitsOffset - 1 ) ) - 1 ) ) );
102  const G4String detectorSide( isRightDetector ? "right" : "left" );
103  G4cout << " " << detectorSide << " detector, row " <<
104  copyDepth1 << ", column " << copyDepth0 << G4endl;
105  G4cout << " , energy deposit " <<
106  G4BestUnit( *( itr->second ), "Energy" ) << G4endl;
107  }
108 }
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
G4int entries() const
Definition: G4THitsMap.hh:200
std::map< G4int, T * > * GetMap() const
Definition: G4THitsMap.hh:99
void PrintHeader(G4int nmbOfEntries) const
#define G4endl
Definition: G4ios.hh:61
CexmcEnergyDepositCollection * eventMap

Here is the call graph for this function:

Member Data Documentation

const G4int CexmcEnergyDepositInCalorimeter::copyDepth1BitsOffset = 8
staticprotected

Definition at line 72 of file CexmcEnergyDepositInCalorimeter.hh.


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