musrIBackwardSD Class Reference

#include <musrIBackwardSD.hh>

List of all members.

Public Member Functions

 musrIBackwardSD (G4String)
 ~musrIBackwardSD ()
void Initialize (G4HCofThisEvent *)
G4bool ProcessHits (G4Step *, G4TouchableHistory *)
void EndOfEvent (G4HCofThisEvent *)


Detailed Description

Definition at line 14 of file musrIBackwardSD.hh.


Constructor & Destructor Documentation

musrIBackwardSD::musrIBackwardSD G4String   ) 
 

Definition at line 12 of file musrIBackwardSD.cc.

00013 :G4VSensitiveDetector(name)
00014 {
00015   G4String HCname;
00016   collectionName.insert(HCname="ibackwardCollection");
00017 }

musrIBackwardSD::~musrIBackwardSD  ) 
 

Definition at line 21 of file musrIBackwardSD.cc.

00021 { }


Member Function Documentation

void musrIBackwardSD::EndOfEvent G4HCofThisEvent *   ) 
 

Definition at line 63 of file musrIBackwardSD.cc.

00064 {
00065   if (verboseLevel>0) { 
00066      G4int NbHits = ibackwardCollection->entries();
00067      G4cout << "\n-------->Hits Collection: in this event they are " << NbHits 
00068             << " hits in the tracker chambers: " << G4endl;
00069      for (G4int i=0;i<NbHits;i++) (*ibackwardCollection)[i]->Print();
00070     } 
00071 }

void musrIBackwardSD::Initialize G4HCofThisEvent *   ) 
 

Definition at line 25 of file musrIBackwardSD.cc.

00026 {
00027   ibackwardCollection = new musrIBackwardHitsCollection
00028                           (SensitiveDetectorName,collectionName[0]); 
00029   static G4int HCID = -1;
00030   if(HCID<0)
00031   { HCID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]); }
00032   HCE->AddHitsCollection( HCID, ibackwardCollection ); 
00033 }

G4bool musrIBackwardSD::ProcessHits G4Step *  ,
G4TouchableHistory * 
 

Definition at line 37 of file musrIBackwardSD.cc.

References musrIBackwardHit::Draw(), musrIBackwardHit::Print(), musrIBackwardHit::SetEdep(), musrIBackwardHit::SetGlobTime(), musrIBackwardHit::SetIBChamberNb(), musrIBackwardHit::SetLogVolName(), musrIBackwardHit::SetParticleName(), musrIBackwardHit::SetPol(), musrIBackwardHit::SetPos(), and musrIBackwardHit::SetTrackID().

00038 {
00039   G4double edep = aStep->GetTotalEnergyDeposit();
00040 
00041   if(edep==0.) return false;
00042 
00043   musrIBackwardHit* newHit = new musrIBackwardHit();
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   newHit->SetLogVolName (aStep->GetTrack()->GetVolume()->GetLogicalVolume()->GetName());
00050   newHit->SetGlobTime     (aStep->GetTrack()->GetGlobalTime());
00051   newHit->SetIBChamberNb(aStep->GetPreStepPoint()->GetTouchable()
00052                                                ->GetReplicaNumber());
00053   ibackwardCollection->insert( newHit );
00054 
00055   newHit->Print();
00056   newHit->Draw();
00057 
00058   return true;
00059 }


The documentation for this class was generated from the following files:
Generated on Mon Mar 27 12:19:54 2006 for MUSR by  doxygen 1.4.6