| [807] | 1 | //
|
|---|
| 2 | // ********************************************************************
|
|---|
| 3 | // * License and Disclaimer *
|
|---|
| 4 | // * *
|
|---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of *
|
|---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and *
|
|---|
| 7 | // * conditions of the Geant4 Software License, included in the file *
|
|---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These *
|
|---|
| 9 | // * include a list of copyright holders. *
|
|---|
| 10 | // * *
|
|---|
| 11 | // * Neither the authors of this software system, nor their employing *
|
|---|
| 12 | // * institutes,nor the agencies providing financial support for this *
|
|---|
| 13 | // * work make any representation or warranty, express or implied, *
|
|---|
| 14 | // * regarding this software system or assume any liability for its *
|
|---|
| 15 | // * use. Please see the license in the file LICENSE and URL above *
|
|---|
| 16 | // * for the full disclaimer and the limitation of liability. *
|
|---|
| 17 | // * *
|
|---|
| 18 | // * This code implementation is the result of the scientific and *
|
|---|
| 19 | // * technical work of the GEANT4 collaboration. *
|
|---|
| 20 | // * By using, copying, modifying or distributing the software (or *
|
|---|
| 21 | // * any work based on the software) you agree to acknowledge its *
|
|---|
| 22 | // * use in resulting scientific publications, and indicate your *
|
|---|
| 23 | // * acceptance of all terms of the Geant4 Software license. *
|
|---|
| 24 | // ********************************************************************
|
|---|
| 25 | //
|
|---|
| 26 | //
|
|---|
| 27 | // $Id: RE01TrackInformation.cc,v 1.2 2006/06/29 17:44:25 gunter Exp $
|
|---|
| 28 | // GEANT4 tag $Name: $
|
|---|
| 29 | //
|
|---|
| 30 |
|
|---|
| 31 | #include "RE01TrackInformation.hh"
|
|---|
| 32 | #include "G4ios.hh"
|
|---|
| 33 |
|
|---|
| 34 | G4Allocator<RE01TrackInformation> aTrackInformationAllocator;
|
|---|
| 35 |
|
|---|
| 36 | RE01TrackInformation::RE01TrackInformation()
|
|---|
| 37 | {
|
|---|
| 38 | originalTrackID = 0;
|
|---|
| 39 | particleDefinition = 0;
|
|---|
| 40 | originalPosition = G4ThreeVector(0.,0.,0.);
|
|---|
| 41 | originalMomentum = G4ThreeVector(0.,0.,0.);
|
|---|
| 42 | originalEnergy = 0.;
|
|---|
| 43 | originalTime = 0.;
|
|---|
| 44 | trackingStatus = 1;
|
|---|
| 45 | sourceTrackID = -1;
|
|---|
| 46 | sourceTrackID = -1;
|
|---|
| 47 | sourceDefinition = 0;
|
|---|
| 48 | sourcePosition = G4ThreeVector(0.,0.,0.);
|
|---|
| 49 | sourceMomentum = G4ThreeVector(0.,0.,0.);
|
|---|
| 50 | sourceEnergy = 0.;
|
|---|
| 51 | sourceTime = 0.;
|
|---|
| 52 | }
|
|---|
| 53 |
|
|---|
| 54 | RE01TrackInformation::RE01TrackInformation(const G4Track* aTrack)
|
|---|
| 55 | {
|
|---|
| 56 | originalTrackID = aTrack->GetTrackID();
|
|---|
| 57 | particleDefinition = aTrack->GetDefinition();
|
|---|
| 58 | originalPosition = aTrack->GetPosition();
|
|---|
| 59 | originalMomentum = aTrack->GetMomentum();
|
|---|
| 60 | originalEnergy = aTrack->GetTotalEnergy();
|
|---|
| 61 | originalTime = aTrack->GetGlobalTime();
|
|---|
| 62 | trackingStatus = 1;
|
|---|
| 63 | sourceTrackID = -1;
|
|---|
| 64 | sourceDefinition = 0;
|
|---|
| 65 | sourcePosition = G4ThreeVector(0.,0.,0.);
|
|---|
| 66 | sourceMomentum = G4ThreeVector(0.,0.,0.);
|
|---|
| 67 | sourceEnergy = 0.;
|
|---|
| 68 | sourceTime = 0.;
|
|---|
| 69 | }
|
|---|
| 70 |
|
|---|
| 71 | RE01TrackInformation::RE01TrackInformation(const RE01TrackInformation* aTrackInfo)
|
|---|
| 72 | {
|
|---|
| 73 | originalTrackID = aTrackInfo->originalTrackID;
|
|---|
| 74 | particleDefinition = aTrackInfo->particleDefinition;
|
|---|
| 75 | originalPosition = aTrackInfo->originalPosition;
|
|---|
| 76 | originalMomentum = aTrackInfo->originalMomentum;
|
|---|
| 77 | originalEnergy = aTrackInfo->originalEnergy;
|
|---|
| 78 | originalTime = aTrackInfo->originalTime;
|
|---|
| 79 | trackingStatus = aTrackInfo->trackingStatus;
|
|---|
| 80 | sourceTrackID = aTrackInfo->sourceTrackID;
|
|---|
| 81 | sourceDefinition = aTrackInfo->sourceDefinition;
|
|---|
| 82 | sourcePosition = aTrackInfo->sourcePosition;
|
|---|
| 83 | sourceMomentum = aTrackInfo->sourceMomentum;
|
|---|
| 84 | sourceEnergy = aTrackInfo->sourceEnergy;
|
|---|
| 85 | sourceTime = aTrackInfo->sourceTime;
|
|---|
| 86 | }
|
|---|
| 87 |
|
|---|
| 88 | RE01TrackInformation::~RE01TrackInformation()
|
|---|
| 89 | { ; }
|
|---|
| 90 |
|
|---|
| 91 | RE01TrackInformation& RE01TrackInformation::operator =(const RE01TrackInformation& aTrackInfo)
|
|---|
| 92 | {
|
|---|
| 93 | originalTrackID = aTrackInfo.originalTrackID;
|
|---|
| 94 | particleDefinition = aTrackInfo.particleDefinition;
|
|---|
| 95 | originalPosition = aTrackInfo.originalPosition;
|
|---|
| 96 | originalMomentum = aTrackInfo.originalMomentum;
|
|---|
| 97 | originalEnergy = aTrackInfo.originalEnergy;
|
|---|
| 98 | originalTime = aTrackInfo.originalTime;
|
|---|
| 99 | trackingStatus = aTrackInfo.trackingStatus;
|
|---|
| 100 | sourceTrackID = aTrackInfo.sourceTrackID;
|
|---|
| 101 | sourceDefinition = aTrackInfo.sourceDefinition;
|
|---|
| 102 | sourcePosition = aTrackInfo.sourcePosition;
|
|---|
| 103 | sourceMomentum = aTrackInfo.sourceMomentum;
|
|---|
| 104 | sourceEnergy = aTrackInfo.sourceEnergy;
|
|---|
| 105 | sourceTime = aTrackInfo.sourceTime;
|
|---|
| 106 |
|
|---|
| 107 | return *this;
|
|---|
| 108 | }
|
|---|
| 109 |
|
|---|
| 110 | void RE01TrackInformation::SetSourceTrackInformation(const G4Track* aTrack)
|
|---|
| 111 | {
|
|---|
| 112 | sourceTrackID = aTrack->GetTrackID();
|
|---|
| 113 | sourceDefinition = aTrack->GetDefinition();
|
|---|
| 114 | sourcePosition = aTrack->GetPosition();
|
|---|
| 115 | sourceMomentum = aTrack->GetMomentum();
|
|---|
| 116 | sourceEnergy = aTrack->GetTotalEnergy();
|
|---|
| 117 | sourceTime = aTrack->GetGlobalTime();
|
|---|
| 118 | }
|
|---|
| 119 |
|
|---|
| 120 | void RE01TrackInformation::Print() const
|
|---|
| 121 | {
|
|---|
| 122 | G4cout
|
|---|
| 123 | << "Source track ID " << sourceTrackID << " (" << sourceDefinition->GetParticleName() << ","
|
|---|
| 124 | << sourceEnergy/GeV << "[GeV]) at " << sourcePosition << G4endl;
|
|---|
| 125 | G4cout
|
|---|
| 126 | << "Original primary track ID " << originalTrackID << " (" << particleDefinition->GetParticleName() << ","
|
|---|
| 127 | << originalEnergy/GeV << "[GeV])" << G4endl;
|
|---|
| 128 | }
|
|---|
| 129 |
|
|---|