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

#include <CexmcTrackPointsInCalorimeter.hh>

Inheritance diagram for CexmcTrackPointsInCalorimeter:
Collaboration diagram for CexmcTrackPointsInCalorimeter:

Public Member Functions

 CexmcTrackPointsInCalorimeter (const G4String &name, const CexmcSetup *setup)
 
void PrintAll (void)
 
- Public Member Functions inherited from CexmcTrackPointsInLeftRightSet
 CexmcTrackPointsInLeftRightSet (const G4String &name, const CexmcSetup *setup)
 
void PrintAll (void)
 
- Public Member Functions inherited from CexmcTrackPoints
 CexmcTrackPoints (const G4String &name)
 
void Initialize (G4HCofThisEvent *hcOfThisEvent)
 
void EndOfEvent (G4HCofThisEvent *hcOfThisEvent)
 
void DrawAll (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 GetCopyDepth0BitsOffset (void)
 
static G4int GetCopyDepth1BitsOffset (void)
 
- Static Public Member Functions inherited from CexmcTrackPointsInLeftRightSet
static CexmcSide GetSide (G4int index)
 
static G4int GetLeftRightBitsOffset (void)
 

Protected Member Functions

G4int GetIndex (G4Step *step)
 
- Protected Member Functions inherited from CexmcTrackPointsInLeftRightSet
G4int GetIndex (G4Step *step)
 
- Protected Member Functions inherited from CexmcTrackPoints
G4int GetTrackId (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 copyDepth0BitsOffset = 8
 
static const G4int copyDepth1BitsOffset = 16
 
- Static Protected Attributes inherited from CexmcTrackPointsInLeftRightSet
static const G4int leftRightBitsOffset = 24
 

Additional Inherited Members

- Protected Attributes inherited from CexmcTrackPointsInLeftRightSet
const CexmcSetupsetup
 
- Protected Attributes inherited from CexmcTrackPoints
CexmcTrackPointsCollectioneventMap
 
- 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 CexmcTrackPointsInCalorimeter.hh.

Constructor & Destructor Documentation

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

Definition at line 54 of file CexmcTrackPointsInCalorimeter.cc.

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

Member Function Documentation

G4int CexmcTrackPointsInCalorimeter::GetColumn ( G4int  index)
inlinestatic

Definition at line 88 of file CexmcTrackPointsInCalorimeter.hh.

89 {
90  index &= ( ( 1 << ( copyDepth1BitsOffset - 1 ) ) |
91  ( ( 1 << ( copyDepth1BitsOffset - 1 ) ) - 1 ) );
92  return index >> copyDepth0BitsOffset;
93 }

Here is the caller graph for this function:

G4int CexmcTrackPointsInCalorimeter::GetCopyDepth0BitsOffset ( void  )
inlinestatic

Definition at line 96 of file CexmcTrackPointsInCalorimeter.hh.

97 {
98  return copyDepth0BitsOffset;
99 }
G4int CexmcTrackPointsInCalorimeter::GetCopyDepth1BitsOffset ( void  )
inlinestatic

Definition at line 102 of file CexmcTrackPointsInCalorimeter.hh.

103 {
104  return copyDepth1BitsOffset;
105 }
G4int CexmcTrackPointsInCalorimeter::GetIndex ( G4Step step)
protectedvirtual

Reimplemented from CexmcTrackPoints.

Definition at line 61 of file CexmcTrackPointsInCalorimeter.cc.

62 {
63  G4int ret( GetTrackId( step ) );
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 ) << copyDepth0BitsOffset;
75  ret |= touchable->GetReplicaNumber( 1 ) << copyDepth1BitsOffset;
76 
77  return ret;
78 }
G4int GetTrackId(G4Step *step)
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 CexmcTrackPointsInCalorimeter::GetRow ( G4int  index)
inlinestatic

Definition at line 80 of file CexmcTrackPointsInCalorimeter.hh.

81 {
82  index &= ( ( 1 << ( leftRightBitsOffset - 1 ) ) |
83  ( ( 1 << ( leftRightBitsOffset - 1 ) ) - 1 ) );
84  return index >> copyDepth1BitsOffset;
85 }

Here is the caller graph for this function:

void CexmcTrackPointsInCalorimeter::PrintAll ( void  )
virtual

Reimplemented from CexmcTrackPoints.

Definition at line 81 of file CexmcTrackPointsInCalorimeter.cc.

82 {
83  G4int nmbOfEntries( eventMap->entries() );
84 
85  if ( nmbOfEntries == 0 )
86  return;
87 
88  PrintHeader( nmbOfEntries );
89 
90  for ( CexmcTrackPointsCollectionData::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  index &= ( 1 << ( copyDepth1BitsOffset - 1 ) ) |
100  ( ( 1 << ( copyDepth1BitsOffset - 1 ) ) - 1 );
101  G4int copyDepth0( index >> copyDepth0BitsOffset );
102  G4int trackId( index &
103  ( ( 1 << ( copyDepth0BitsOffset - 1 ) ) |
104  ( ( 1 << ( copyDepth0BitsOffset - 1 ) ) - 1 ) ) );
105  const G4String detectorSide( isRightDetector ? "right" : "left" );
106  G4cout << " " << detectorSide << " detector, row " <<
107  copyDepth1 << ", column " << copyDepth0 << G4endl;
108  G4cout << " , track id " << trackId << G4endl;
109  G4cout << " , position: " <<
110  G4BestUnit( itr->second->positionLocal, "Length" ) << G4endl;
111  G4cout << " , direction: " <<
112  itr->second->directionLocal << G4endl;
113  G4cout << " , momentum: " <<
114  G4BestUnit( itr->second->momentumAmp, "Energy" ) << G4endl;
115  G4cout << " , particle: "
116  << itr->second->particle->GetParticleName() << G4endl;
117  }
118 }
CexmcTrackPointsCollection * eventMap
#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

Here is the call graph for this function:

Member Data Documentation

const G4int CexmcTrackPointsInCalorimeter::copyDepth0BitsOffset = 8
staticprotected

Definition at line 74 of file CexmcTrackPointsInCalorimeter.hh.

const G4int CexmcTrackPointsInCalorimeter::copyDepth1BitsOffset = 16
staticprotected

Definition at line 76 of file CexmcTrackPointsInCalorimeter.hh.


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