#include <musrTrackerSD.hh>
Public Member Functions | |
| musrTrackerSD (G4String) | |
| ~musrTrackerSD () | |
| void | Initialize (G4HCofThisEvent *) |
| G4bool | ProcessHits (G4Step *, G4TouchableHistory *) |
| void | EndOfEvent (G4HCofThisEvent *) |
Definition at line 14 of file musrTrackerSD.hh.
|
|
Definition at line 12 of file musrTrackerSD.cc. 00013 :G4VSensitiveDetector(name) 00014 { 00015 G4String HCname; 00016 collectionName.insert(HCname="trackerCollection"); 00017 }
|
|
|
Definition at line 21 of file musrTrackerSD.cc.
|
|
|
Definition at line 59 of file musrTrackerSD.cc. 00060 { 00061 if (verboseLevel>0) { 00062 G4int NbHits = trackerCollection->entries(); 00063 G4cout << "\n-------->Hits Collection: in this event they are " << NbHits 00064 << " hits in the tracker chambers: " << G4endl; 00065 for (G4int i=0;i<NbHits;i++) (*trackerCollection)[i]->Print(); 00066 } 00067 }
|
|
|
Definition at line 25 of file musrTrackerSD.cc. 00026 { 00027 trackerCollection = new musrTrackerHitsCollection 00028 (SensitiveDetectorName,collectionName[0]); 00029 static G4int HCID = -1; 00030 if(HCID<0) 00031 { HCID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]); } 00032 HCE->AddHitsCollection( HCID, trackerCollection ); 00033 }
|
|
||||||||||||
|
Definition at line 37 of file musrTrackerSD.cc. References musrTrackerHit::Draw(), musrTrackerHit::Print(), musrTrackerHit::SetEdep(), musrTrackerHit::SetParticleName(), musrTrackerHit::SetPol(), musrTrackerHit::SetPos(), and musrTrackerHit::SetTrackID(). 00038 { 00039 G4double edep = aStep->GetTotalEnergyDeposit(); 00040 00041 if(edep==0.) return false; 00042 00043 musrTrackerHit* newHit = new musrTrackerHit(); 00044 newHit->SetParticleName (aStep->GetTrack()->GetDefinition()->GetParticleName()); 00045 newHit->SetTrackID (aStep->GetTrack()->GetTrackID()); 00046 newHit->SetEdep (edep); 00047 newHit->SetPos (aStep->GetPostStepPoint()->GetPosition()); 00048 newHit->SetPol (aStep->GetTrack()->GetPolarization()); 00049 trackerCollection->insert( newHit ); 00050 00051 newHit->Print(); 00052 newHit->Draw(); 00053 00054 return true; 00055 }
|
1.4.6