]>
Commit | Line | Data |
---|---|---|
676fb573 | 1 | // $Id$ // |
2 | // Category: geometry | |
3 | // | |
4 | // See the class description in the header file. | |
5 | ||
6 | #include "AliLegoSensitiveDetector.h" | |
7 | #include "AliLego.h" | |
8 | ||
9 | #include "TG4StepManager.h" | |
10 | ||
11 | AliLegoSensitiveDetector::AliLegoSensitiveDetector( | |
12 | G4String name, AliLego* lego, | |
13 | G4VSensitiveDetector* standardSD) | |
14 | : TG4VSensitiveDetector(name), | |
15 | fLego(lego), | |
16 | fStandardSD(standardSD), | |
17 | fStepManager(TG4StepManager::Instance()) | |
18 | { | |
19 | // | |
20 | } | |
21 | ||
22 | AliLegoSensitiveDetector::AliLegoSensitiveDetector( | |
23 | const AliLegoSensitiveDetector& right) | |
24 | : TG4VSensitiveDetector(right) | |
25 | { | |
26 | // | |
27 | fLego = right.fLego; | |
28 | fStandardSD = right.fStandardSD; | |
29 | fStepManager = right.fStepManager; | |
30 | } | |
31 | ||
32 | AliLegoSensitiveDetector::AliLegoSensitiveDetector() { | |
33 | // | |
34 | } | |
35 | ||
36 | AliLegoSensitiveDetector::~AliLegoSensitiveDetector() { | |
37 | // | |
38 | } | |
39 | ||
40 | // operators | |
41 | ||
42 | AliLegoSensitiveDetector& | |
43 | AliLegoSensitiveDetector::operator=(const AliLegoSensitiveDetector &right) | |
44 | { | |
45 | // check assignement to self | |
46 | if (this == &right) return *this; | |
47 | ||
48 | // base class assignement | |
49 | TG4VSensitiveDetector::operator=(right); | |
50 | ||
51 | fLego = right.fLego; | |
52 | fStandardSD = right.fStandardSD; | |
53 | fStepManager = right.fStepManager; | |
54 | ||
55 | return *this; | |
56 | } | |
57 | ||
58 | // public methods | |
59 | ||
60 | void AliLegoSensitiveDetector::Initialize(G4HCofThisEvent* hc) | |
61 | { | |
62 | // This method is called at the beginning of event action | |
63 | // before user defined BeginOfEventAction() method. | |
64 | } | |
65 | ||
66 | G4bool AliLegoSensitiveDetector::ProcessHits(G4Step* step, G4TouchableHistory*) | |
67 | { | |
68 | // Calls StepManager of associated lego. | |
69 | // --- | |
70 | ||
71 | // let lego process step | |
72 | fStepManager->SetStep(step); | |
73 | fLego->StepManager(); | |
74 | ||
75 | return true; | |
76 | } | |
77 | ||
78 | void AliLegoSensitiveDetector::EndOfEvent(G4HCofThisEvent* hce){ | |
79 | // | |
80 | } | |
81 | ||
82 | //void AliLegoSensitiveDetector::clear() | |
83 | //{} | |
84 | ||
85 | void AliLegoSensitiveDetector::PrintAll() { | |
86 | // | |
87 | } | |
88 | ||
89 | void AliLegoSensitiveDetector::DrawAll() { | |
90 | // | |
91 | } |