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

#include <CCaloSD.hh>

Inheritance diagram for CCaloSD:
G4VSensitiveDetector

Public Member Functions

 CCaloSD (G4String aSDname, CCalVOrganization *numberingScheme)
 
virtual ~CCaloSD ()
 
void Initialize (G4HCofThisEvent *HCE)
 
G4bool ProcessHits (G4Step *aStep, G4TouchableHistory *ROhist)
 
void EndOfEvent (G4HCofThisEvent *HCE)
 
void clear ()
 
void DrawAll ()
 
void PrintAll ()
 
void SetPrimaryID (int i)
 
int GetPrimaryID ()
 
void SetOrganization (CCalVOrganization *org)
 
- Public Member Functions inherited from G4VSensitiveDetector
 G4VSensitiveDetector (G4String name)
 
 G4VSensitiveDetector (const G4VSensitiveDetector &right)
 
virtual ~G4VSensitiveDetector ()
 
const G4VSensitiveDetectoroperator= (const G4VSensitiveDetector &right)
 
G4int operator== (const G4VSensitiveDetector &right) const
 
G4int operator!= (const G4VSensitiveDetector &right) const
 
G4bool Hit (G4Step *aStep)
 
void SetROgeometry (G4VReadOutGeometry *value)
 
void SetFilter (G4VSDFilter *value)
 
G4int GetNumberOfCollections () const
 
G4String GetCollectionName (G4int id) const
 
void SetVerboseLevel (G4int vl)
 
void Activate (G4bool activeFlag)
 
G4bool isActive () const
 
G4String GetName () const
 
G4String GetPathName () const
 
G4String GetFullPathName () const
 
G4VReadOutGeometryGetROgeometry () const
 
G4VSDFilterGetFilter () const
 
virtual G4VSensitiveDetectorClone () const
 

Additional Inherited Members

- Protected Member Functions inherited from G4VSensitiveDetector
virtual G4int GetCollectionID (G4int i)
 
- Protected Attributes inherited from G4VSensitiveDetector
G4CollectionNameVector collectionName
 
G4String SensitiveDetectorName
 
G4String thePathName
 
G4String fullPathName
 
G4int verboseLevel
 
G4bool active
 
G4VReadOutGeometryROgeometry
 
G4VSDFilterfilter
 

Detailed Description

Definition at line 59 of file CCaloSD.hh.

Constructor & Destructor Documentation

CCaloSD::CCaloSD ( G4String  aSDname,
CCalVOrganization numberingScheme 
)

Definition at line 42 of file CCaloSD.cc.

References CCalSDList::addCalo(), G4VSensitiveDetector::collectionName, G4cout, G4endl, CCalSDList::getInstance(), and G4CollectionNameVector::insert().

42  :
43  G4VSensitiveDetector(name), HCID(-1), SDname(name), theHC(0),
44  CurrentHit(0), theTrack(0), CurrentPV(0), PreviousPV(0), UnitID(0),
45  PreviousUnitID(0), PreStepPoint(0), PostStepPoint(0),
46  theDescription(numberingScheme) {
47 
49 
50  G4cout << "*******************************************************" << G4endl;
51  G4cout << "* *" << G4endl;
52  G4cout << "* Constructing a CCaloSD with name " << name << G4endl;
53  G4cout << "* *" << G4endl;
54  G4cout << "*******************************************************" << G4endl;
55 
57 }
static CCalSDList * getInstance()
Definition: CCalSDList.cc:37
const XML_Char * name
G4GLOB_DLL std::ostream G4cout
void addCalo(nameType name)
Definition: CCalSDList.cc:44
G4VSensitiveDetector(G4String name)
#define G4endl
Definition: G4ios.hh:61
G4CollectionNameVector collectionName
CCaloSD::~CCaloSD ( )
virtual

Definition at line 60 of file CCaloSD.cc.

References G4cout, and G4endl.

60  {
61  G4cout << "CCaloSD: " << SDname << " deleted" << G4endl;
62  if (theDescription)
63  delete theDescription;
64 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Member Function Documentation

void CCaloSD::clear ( void  )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 290 of file CCaloSD.cc.

290  {
291 }
void CCaloSD::DrawAll ( void  )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 294 of file CCaloSD.cc.

294  {
295 }
void CCaloSD::EndOfEvent ( G4HCofThisEvent HCE)
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 281 of file CCaloSD.cc.

281  {
282  summarize();
283 }
int CCaloSD::GetPrimaryID ( )
inline

Definition at line 79 of file CCaloSD.hh.

79 {return PrimaryID;}
void CCaloSD::Initialize ( G4HCofThisEvent HCE)
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 67 of file CCaloSD.cc.

References G4HCofThisEvent::AddHitsCollection(), G4VSensitiveDetector::collectionName, G4cout, G4endl, G4SDManager::GetCollectionID(), and G4SDManager::GetSDMpointer().

67  {
68 
69 #ifdef debug
70  G4cout << "CCaloSD : Initialize called for " << SDname << G4endl;
71 #endif
72  //This initialization is performed at the beginning of an event
73  //------------------------------------------------------------
74 
75  theHC = new CCalG4HitCollection(SDname, collectionName[0]);
76  if (HCID<0)
78  HCE->AddHitsCollection( HCID, theHC );
79 
80  TSID = -2;
81  PrimID = -2;
82  /////PrimaryID = -99; <--- initialized by StackingAction.
83 }
G4int GetCollectionID(G4String colName)
Definition: G4SDManager.cc:131
G4THitsCollection< CCalG4Hit > CCalG4HitCollection
G4GLOB_DLL std::ostream G4cout
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
#define G4endl
Definition: G4ios.hh:61
G4CollectionNameVector collectionName
void CCaloSD::PrintAll ( void  )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 298 of file CCaloSD.cc.

References G4cout, G4endl, G4VHitsCollection::GetName(), and G4THitsCollection< T >::PrintAllHits().

298  {
299  G4cout << "CCaloSD: Collection " << theHC->GetName() << G4endl;
300  theHC->PrintAllHits();
301 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
G4bool CCaloSD::ProcessHits ( G4Step aStep,
G4TouchableHistory ROhist 
)
virtual

Implements G4VSensitiveDetector.

Definition at line 86 of file CCaloSD.cc.

86  {
87 
88  if (aStep == NULL) return true;
89 
90  getStepInfo(aStep);
91  if (hitExists() == false && EdepositEM+EdepositEHAD>0.)
92  createNewHit();
93 
94  return true;
95 }
void CCaloSD::SetOrganization ( CCalVOrganization org)

Definition at line 304 of file CCaloSD.cc.

304  {
305 
306  if (theDescription!=0)
307  delete theDescription;
308  theDescription = org;
309 }
void CCaloSD::SetPrimaryID ( int  i)
inline

Definition at line 74 of file CCaloSD.hh.

References G4cout, and G4endl.

74  {PrimaryID = i;
75 #ifdef debug
76  G4cout << "CCaloSD SetPrimaryID primID =" << i << G4endl;
77 #endif
78  }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

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