4 // See the class description in the header file.
6 #include "AliSensitiveDetector.h"
10 AliSensitiveDetector::AliSensitiveDetector(G4String sdName, AliModule* module)
11 : TG4VSensitiveDetector(sdName),
17 AliSensitiveDetector::AliSensitiveDetector(G4String sdName, AliModule* module,
19 : TG4VSensitiveDetector(sdName, id),
25 AliSensitiveDetector::AliSensitiveDetector(const AliSensitiveDetector& right)
26 : TG4VSensitiveDetector(right)
29 fModule = right.fModule;
32 AliSensitiveDetector::AliSensitiveDetector(){
36 AliSensitiveDetector::~AliSensitiveDetector() {
43 AliSensitiveDetector::operator=(const AliSensitiveDetector& right)
45 // check assignement to self
46 if (this == &right) return *this;
48 // base class assignement
49 TG4VSensitiveDetector::operator=(right);
51 fModule = right.fModule;
58 void AliSensitiveDetector::UserProcessHits(const G4Track* track,
61 // Calls StepManager of associated AliModule.
64 // add energy deposit of the current step
66 if (step) gAlice->AddEnergyDeposit(fID, step->GetTotalEnergyDeposit());
69 G4int parentID = track->GetParentID();
71 if (parentID==0) shunt = 1;
72 fModule->SetIshunt(shunt);
74 fModule->StepManager();