QwGeant4
QweakSimStackingAction.cc
Go to the documentation of this file.
1 
3 
4 // geant4 includes
5 #include "G4Track.hh"
6 
7 // user includes
10 #include "QweakSimTrajectory.hh"
11 
12 //_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
13 G4ClassificationOfNewTrack
14 QweakSimStackingAction::ClassifyNewTrack(const G4Track* /*aTrack*/)
15 {
16  G4ClassificationOfNewTrack classification = fUrgent;
17 
18  //QweakSimTrackInformation* trackInfo;
19 
20  //if( (aTrack->GetDefinition()!=G4OpticalPhoton::OpticalPhotonDefinition()) ) {trackInfo->SetSourceTrackInformation(aTrack);}
21  //if( aTrack->GetTrackID()>2) {trackInfo->SetSourceTrackInformation(aTrack);}
22 
23 
24 // if( (aTrack->GetDefinition()==G4OpticalPhoton::OpticalPhotonDefinition()) && (trackInfo->GetSourceParticle()!= G4OpticalPhoton::OpticalPhotonDefinition()) )
25 // {
26 // G4cout << " StackingAction: What has created the current Cerenkov photon :" << G4endl;
27 // trackInfo = (QweakSimTrackInformation*)(aTrack->GetUserInformation());
28 // //trackInfo->PrintSourceTrackInfo();
29 // G4cout << " ParticleName = " << aTrack->GetDefinition()->GetParticleName() << G4endl;
30 // G4cout << " Position = " << aTrack->GetPosition() << G4endl;
31 // }
32 //
33  //trackInfo->SetSourceTrackInformation(aTrack);
34 
35  return classification;
36 
37 // //Count what process generated the optical photons
38 // if(aTrack->GetDefinition()==G4OpticalPhoton::OpticalPhotonDefinition())
39 // {
40 // G4cout << "StackingAction: we have an optical photon !"<< G4endl;
41 //
42 // // particle is optical photon
43 // if(aTrack->GetParentID()>0)
44 // {
45 // // particle is secondary
46 // if(aTrack->GetCreatorProcess()->GetProcessName()=="Cerenkov")
47 // {
48 //
49 // G4int parentID = aTrack->GetParentID();
50 // G4int trackID = aTrack->GetTrackID();
51 // G4cout << G4endl << "Photon's Track ID = " << trackID << G4endl;
52 // G4cout << G4endl << "It's Parent ID = " << parentID << G4endl;
53 // }
54 // }
55 // }
56 
57 }
58 
59 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
60 
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *aTrack)