Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/tracking/src/G4RichTrajectory.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /tracking/src/G4RichTrajectory.cc (Version 11.3.0) and /tracking/src/G4RichTrajectory.cc (Version 10.3.p2)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 // G4RichTrajectory class implementation       <<  26 //
                                                   >>  27 // $Id: G4RichTrajectory.cc 91269 2015-06-29 07:05:59Z gcosmo $
                                                   >>  28 //
                                                   >>  29 // ---------------------------------------------------------------
                                                   >>  30 //
                                                   >>  31 // G4RichTrajectory.cc
 27 //                                                 32 //
 28 // Contact:                                        33 // Contact:
 29 //   Questions and comments on G4Trajectory, o     34 //   Questions and comments on G4Trajectory, on which this is based,
 30 //   should be sent to                             35 //   should be sent to
 31 //     Katsuya Amako  (e-mail: Katsuya.Amako@k     36 //     Katsuya Amako  (e-mail: Katsuya.Amako@kek.jp)
 32 //     Makoto  Asai   (e-mail: asai@slac.stanf <<  37 //     Makoto  Asai   (e-mail: asai@kekvax.kek.jp)
 33 //     Takashi Sasaki (e-mail: Takashi.Sasaki@     38 //     Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
 34 //   and on the extended code to:                  39 //   and on the extended code to:
 35 //     John Allison   (e-mail: John.Allison@ma     40 //     John Allison   (e-mail: John.Allison@manchester.ac.uk)
 36 //     Joseph Perl    (e-mail: perl@slac.stanf     41 //     Joseph Perl    (e-mail: perl@slac.stanford.edu)
 37 // ------------------------------------------- <<  42 //
                                                   >>  43 // ---------------------------------------------------------------
 38                                                    44 
 39 #include "G4RichTrajectory.hh"                     45 #include "G4RichTrajectory.hh"
 40 #include "G4ClonedRichTrajectory.hh"           <<  46 #include "G4RichTrajectoryPoint.hh"
 41                                                << 
 42 #include "G4ParticleTable.hh"                  << 
 43 #include "G4AttDef.hh"                         << 
 44 #include "G4AttDefStore.hh"                        47 #include "G4AttDefStore.hh"
                                                   >>  48 #include "G4AttDef.hh"
 45 #include "G4AttValue.hh"                           49 #include "G4AttValue.hh"
 46 #include "G4PhysicsModelCatalog.hh"            << 
 47 #include "G4RichTrajectoryPoint.hh"            << 
 48 #include "G4UIcommand.hh"                          50 #include "G4UIcommand.hh"
 49 #include "G4UnitsTable.hh"                         51 #include "G4UnitsTable.hh"
 50 #include "G4VProcess.hh"                           52 #include "G4VProcess.hh"
 51                                                    53 
 52 namespace {                                    <<  54 //#define G4ATTDEBUG
 53  G4Mutex CloneRichTrajectoryMutex = G4MUTEX_IN << 
 54 }                                              << 
 55                                                << 
 56 // #define G4ATTDEBUG                          << 
 57 #ifdef G4ATTDEBUG                                  55 #ifdef G4ATTDEBUG
 58 #  include "G4AttCheck.hh"                     <<  56 #include "G4AttCheck.hh"
 59 #endif                                             57 #endif
 60                                                    58 
 61 #include <sstream>                                 59 #include <sstream>
 62                                                    60 
 63 G4Allocator<G4RichTrajectory>*& aRichTrajector <<  61 G4ThreadLocal G4Allocator<G4RichTrajectory> *aRichTrajectoryAllocator = 0;
                                                   >>  62 
                                                   >>  63 G4RichTrajectory::G4RichTrajectory():
                                                   >>  64   fpRichPointsContainer(0),
                                                   >>  65   fpCreatorProcess(0),
                                                   >>  66   fCreatorModelID(0),
                                                   >>  67   fpEndingProcess(0),
                                                   >>  68   fFinalKineticEnergy(0.)
 64 {                                                  69 {
 65   G4ThreadLocalStatic G4Allocator<G4RichTrajec << 
 66   return _instance;                            << 
 67 }                                                  70 }
 68                                                    71 
 69 G4RichTrajectory::G4RichTrajectory(const G4Tra <<  72 G4RichTrajectory::G4RichTrajectory(const G4Track* aTrack):
                                                   >>  73   G4Trajectory(aTrack)  // Note: this initialises the base class data
                                                   >>  74       // members and, unfortunately but never mind,
                                                   >>  75       // creates a G4TrajectoryPoint in
                                                   >>  76       // TrajectoryPointContainer that we cannot
                                                   >>  77       // access because it's private.  We store the
                                                   >>  78       // same information (plus more) in a
                                                   >>  79       // G4RichTrajectoryPoint in the
                                                   >>  80       // RichTrajectoryPointsContainer
 70 {                                                  81 {
 71   G4ParticleDefinition* fpParticleDefinition = << 
 72   ParticleName = fpParticleDefinition->GetPart << 
 73   PDGCharge = fpParticleDefinition->GetPDGChar << 
 74   PDGEncoding = fpParticleDefinition->GetPDGEn << 
 75   fTrackID = aTrack->GetTrackID();             << 
 76   fParentID = aTrack->GetParentID();           << 
 77   initialKineticEnergy = aTrack->GetKineticEne << 
 78   initialMomentum = aTrack->GetMomentum();     << 
 79   positionRecord = new G4TrajectoryPointContai << 
 80                                                << 
 81   // Following is for the first trajectory poi << 
 82   positionRecord->push_back(new G4RichTrajecto << 
 83                                                << 
 84   fpInitialVolume = aTrack->GetTouchableHandle     82   fpInitialVolume = aTrack->GetTouchableHandle();
 85   fpInitialNextVolume = aTrack->GetNextTouchab     83   fpInitialNextVolume = aTrack->GetNextTouchableHandle();
 86   fpCreatorProcess = aTrack->GetCreatorProcess     84   fpCreatorProcess = aTrack->GetCreatorProcess();
 87   fCreatorModelID = aTrack->GetCreatorModelID(     85   fCreatorModelID = aTrack->GetCreatorModelID();
 88                                                << 
 89   // On construction, set final values to init     86   // On construction, set final values to initial values.
 90   // Final values are updated at the addition      87   // Final values are updated at the addition of every step - see AppendStep.
 91   //                                           << 
 92   fpFinalVolume = aTrack->GetTouchableHandle()     88   fpFinalVolume = aTrack->GetTouchableHandle();
 93   fpFinalNextVolume = aTrack->GetNextTouchable     89   fpFinalNextVolume = aTrack->GetNextTouchableHandle();
 94   fpEndingProcess = aTrack->GetCreatorProcess(     90   fpEndingProcess = aTrack->GetCreatorProcess();
 95   fFinalKineticEnergy = aTrack->GetKineticEner     91   fFinalKineticEnergy = aTrack->GetKineticEnergy();
 96                                                << 
 97   // Insert the first rich trajectory point (s     92   // Insert the first rich trajectory point (see note above)...
 98   //                                           <<  93   fpRichPointsContainer = new RichTrajectoryPointsContainer;
 99   fpRichPointContainer = new G4TrajectoryPoint <<  94   fpRichPointsContainer->push_back(new G4RichTrajectoryPoint(aTrack));
100   fpRichPointContainer->push_back(new G4RichTr <<  95 }
101 }                                              << 
102                                                << 
103 G4RichTrajectory::G4RichTrajectory(G4RichTraje << 
104 {                                              << 
105   ParticleName = right.ParticleName;           << 
106   PDGCharge = right.PDGCharge;                 << 
107   PDGEncoding = right.PDGEncoding;             << 
108   fTrackID = right.fTrackID;                   << 
109   fParentID = right.fParentID;                 << 
110   initialKineticEnergy = right.initialKineticE << 
111   initialMomentum = right.initialMomentum;     << 
112   positionRecord = new G4TrajectoryPointContai << 
113                                                << 
114   for (auto& i : *right.positionRecord) {      << 
115     auto rightPoint = (G4RichTrajectoryPoint*) << 
116     positionRecord->push_back(new G4RichTrajec << 
117   }                                            << 
118                                                    96 
                                                   >>  97 G4RichTrajectory::G4RichTrajectory(G4RichTrajectory & right):
                                                   >>  98   G4Trajectory(right)
                                                   >>  99 {
119   fpInitialVolume = right.fpInitialVolume;        100   fpInitialVolume = right.fpInitialVolume;
120   fpInitialNextVolume = right.fpInitialNextVol    101   fpInitialNextVolume = right.fpInitialNextVolume;
121   fpCreatorProcess = right.fpCreatorProcess;      102   fpCreatorProcess = right.fpCreatorProcess;
122   fCreatorModelID = right.fCreatorModelID;        103   fCreatorModelID = right.fCreatorModelID;
123   fpFinalVolume = right.fpFinalVolume;            104   fpFinalVolume = right.fpFinalVolume;
124   fpFinalNextVolume = right.fpFinalNextVolume;    105   fpFinalNextVolume = right.fpFinalNextVolume;
125   fpEndingProcess = right.fpEndingProcess;        106   fpEndingProcess = right.fpEndingProcess;
126   fFinalKineticEnergy = right.fFinalKineticEne    107   fFinalKineticEnergy = right.fFinalKineticEnergy;
127   fpRichPointContainer = new G4TrajectoryPoint << 108   fpRichPointsContainer = new RichTrajectoryPointsContainer;
128   for (auto& i : *right.fpRichPointContainer)  << 109   for(size_t i=0;i<right.fpRichPointsContainer->size();i++)
129     auto rightPoint = (G4RichTrajectoryPoint*) << 110   {
130     fpRichPointContainer->push_back(new G4Rich << 111     G4RichTrajectoryPoint* rightPoint =
                                                   >> 112       (G4RichTrajectoryPoint*)((*(right.fpRichPointsContainer))[i]);
                                                   >> 113     fpRichPointsContainer->push_back(new G4RichTrajectoryPoint(*rightPoint));
131   }                                               114   }
132 }                                                 115 }
133                                                   116 
134 G4RichTrajectory::~G4RichTrajectory()             117 G4RichTrajectory::~G4RichTrajectory()
135 {                                                 118 {
136   if (fpRichPointContainer != nullptr) {       << 119   if (fpRichPointsContainer) {
137     for (auto& i : *fpRichPointContainer) {    << 120     //  fpRichPointsContainer->clearAndDestroy();
138       delete i;                                << 121     size_t i;
                                                   >> 122     for(i=0;i<fpRichPointsContainer->size();i++){
                                                   >> 123       delete  (*fpRichPointsContainer)[i];
139     }                                             124     }
140     fpRichPointContainer->clear();             << 125     fpRichPointsContainer->clear();
141     delete fpRichPointContainer;               << 126     delete fpRichPointsContainer;
142   }                                               127   }
143 }                                                 128 }
144                                                   129 
145 void G4RichTrajectory::AppendStep(const G4Step    130 void G4RichTrajectory::AppendStep(const G4Step* aStep)
146 {                                                 131 {
147   fpRichPointContainer->push_back(new G4RichTr << 132   fpRichPointsContainer->push_back(new G4RichTrajectoryPoint(aStep));
148                                                << 
149   // Except for first step, which is a sort of    133   // Except for first step, which is a sort of virtual step to start
150   // the track, compute the final values...       134   // the track, compute the final values...
151   //                                           << 
152   const G4Track* track = aStep->GetTrack();       135   const G4Track* track = aStep->GetTrack();
153   const G4StepPoint* postStepPoint = aStep->Ge    136   const G4StepPoint* postStepPoint = aStep->GetPostStepPoint();
154   if (track->GetCurrentStepNumber() > 0) {        137   if (track->GetCurrentStepNumber() > 0) {
155     fpFinalVolume = track->GetTouchableHandle(    138     fpFinalVolume = track->GetTouchableHandle();
156     fpFinalNextVolume = track->GetNextTouchabl    139     fpFinalNextVolume = track->GetNextTouchableHandle();
157     fpEndingProcess = postStepPoint->GetProces    140     fpEndingProcess = postStepPoint->GetProcessDefinedStep();
158     fFinalKineticEnergy =                         141     fFinalKineticEnergy =
159       aStep->GetPreStepPoint()->GetKineticEner << 142       aStep->GetPreStepPoint()->GetKineticEnergy() -
                                                   >> 143       aStep->GetTotalEnergyDeposit();
160   }                                               144   }
161 }                                                 145 }
162                                                << 146   
163 void G4RichTrajectory::MergeTrajectory(G4VTraj    147 void G4RichTrajectory::MergeTrajectory(G4VTrajectory* secondTrajectory)
164 {                                                 148 {
165   if (secondTrajectory == nullptr) return;     << 149   if(!secondTrajectory) return;
166                                                   150 
167   auto seco = (G4RichTrajectory*)secondTraject << 151   G4RichTrajectory* seco = (G4RichTrajectory*)secondTrajectory;
168   G4int ent = seco->GetPointEntries();            152   G4int ent = seco->GetPointEntries();
169   for (G4int i = 1; i < ent; ++i) {            << 153   for(G4int i=1;i<ent;i++) {
170     // initial point of the second trajectory     154     // initial point of the second trajectory should not be merged
171     //                                         << 155     fpRichPointsContainer->push_back((*(seco->fpRichPointsContainer))[i]);
172     fpRichPointContainer->push_back((*(seco->f << 156     //    fpRichPointsContainer->push_back(seco->fpRichPointsContainer->removeAt(1));
173   }                                               157   }
174   delete (*seco->fpRichPointContainer)[0];     << 158   delete (*seco->fpRichPointsContainer)[0];
175   seco->fpRichPointContainer->clear();         << 159   seco->fpRichPointsContainer->clear();
176 }                                                 160 }
177                                                   161 
178 void G4RichTrajectory::ShowTrajectory(std::ost    162 void G4RichTrajectory::ShowTrajectory(std::ostream& os) const
179 {                                                 163 {
180   // Invoke the default implementation in G4VT    164   // Invoke the default implementation in G4VTrajectory...
181   //                                           << 
182   G4VTrajectory::ShowTrajectory(os);              165   G4VTrajectory::ShowTrajectory(os);
183                                                << 
184   // ... or override with your own code here.     166   // ... or override with your own code here.
185 }                                                 167 }
186                                                   168 
187 void G4RichTrajectory::DrawTrajectory() const     169 void G4RichTrajectory::DrawTrajectory() const
188 {                                                 170 {
189   // Invoke the default implementation in G4VT    171   // Invoke the default implementation in G4VTrajectory...
190   //                                           << 
191   G4VTrajectory::DrawTrajectory();                172   G4VTrajectory::DrawTrajectory();
192                                                << 
193   // ... or override with your own code here.     173   // ... or override with your own code here.
194 }                                                 174 }
195                                                   175 
196 const std::map<G4String, G4AttDef>* G4RichTraj << 176 const std::map<G4String,G4AttDef>* G4RichTrajectory::GetAttDefs() const
197 {                                                 177 {
198   G4bool isNew;                                   178   G4bool isNew;
199   std::map<G4String, G4AttDef>* store = G4AttD << 179   std::map<G4String,G4AttDef>* store
                                                   >> 180     = G4AttDefStore::GetInstance("G4RichTrajectory",isNew);
200   if (isNew) {                                    181   if (isNew) {
201     G4String ID;                               << 
202                                                << 
203     ID = "ID";                                 << 
204     (*store)[ID] = G4AttDef(ID, "Track ID", "P << 
205                                                   182 
206     ID = "PID";                                << 183     // Get att defs from base class...
207     (*store)[ID] = G4AttDef(ID, "Parent ID", " << 184     *store = *(G4Trajectory::GetAttDefs());
208                                                   185 
209     ID = "PN";                                 << 186     G4String ID;
210     (*store)[ID] = G4AttDef(ID, "Particle Name << 
211                                                << 
212     ID = "Ch";                                 << 
213     (*store)[ID] = G4AttDef(ID, "Charge", "Phy << 
214                                                << 
215     ID = "PDG";                                << 
216     (*store)[ID] = G4AttDef(ID, "PDG Encoding" << 
217                                                << 
218     ID = "IKE";                                << 
219     (*store)[ID] = G4AttDef(ID, "Initial kinet << 
220                                                << 
221     ID = "IMom";                               << 
222     (*store)[ID] = G4AttDef(ID, "Initial momen << 
223                                                << 
224     ID = "IMag";                               << 
225     (*store)[ID] = G4AttDef(ID, "Initial momen << 
226                                                << 
227     ID = "NTP";                                << 
228     (*store)[ID] = G4AttDef(ID, "No. of points << 
229                                                   187 
230     ID = "IVPath";                                188     ID = "IVPath";
231     (*store)[ID] = G4AttDef(ID, "Initial Volum << 189     (*store)[ID] = G4AttDef(ID,"Initial Volume Path",
                                                   >> 190           "Physics","","G4String");
232                                                   191 
233     ID = "INVPath";                               192     ID = "INVPath";
234     (*store)[ID] = G4AttDef(ID, "Initial Next  << 193     (*store)[ID] = G4AttDef(ID,"Initial Next Volume Path",
                                                   >> 194           "Physics","","G4String");
235                                                   195 
236     ID = "CPN";                                   196     ID = "CPN";
237     (*store)[ID] = G4AttDef(ID, "Creator Proce << 197     (*store)[ID] = G4AttDef(ID,"Creator Process Name",
                                                   >> 198                             "Physics","","G4String");
238                                                   199 
239     ID = "CPTN";                                  200     ID = "CPTN";
240     (*store)[ID] = G4AttDef(ID, "Creator Proce << 201     (*store)[ID] = G4AttDef(ID,"Creator Process Type Name",
241                                                << 202                             "Physics","","G4String");
                                                   >> 203     
242     ID = "CMID";                                  204     ID = "CMID";
243     (*store)[ID] = G4AttDef(ID, "Creator Model << 205     (*store)[ID] = G4AttDef(ID,"Creator Model ID",
                                                   >> 206                             "Physics","","G4int");
244                                                   207 
245     ID = "CMN";                                   208     ID = "CMN";
246     (*store)[ID] = G4AttDef(ID, "Creator Model << 209     (*store)[ID] = G4AttDef(ID,"Creator Model Name",
                                                   >> 210                             "Physics","","G4String");
247                                                   211 
248     ID = "FVPath";                                212     ID = "FVPath";
249     (*store)[ID] = G4AttDef(ID, "Final Volume  << 213     (*store)[ID] = G4AttDef(ID,"Final Volume Path",
                                                   >> 214           "Physics","","G4String");
250                                                   215 
251     ID = "FNVPath";                               216     ID = "FNVPath";
252     (*store)[ID] = G4AttDef(ID, "Final Next Vo << 217     (*store)[ID] = G4AttDef(ID,"Final Next Volume Path",
                                                   >> 218           "Physics","","G4String");
253                                                   219 
254     ID = "EPN";                                   220     ID = "EPN";
255     (*store)[ID] = G4AttDef(ID, "Ending Proces << 221     (*store)[ID] = G4AttDef(ID,"Ending Process Name",
                                                   >> 222           "Physics","","G4String");
256                                                   223 
257     ID = "EPTN";                                  224     ID = "EPTN";
258     (*store)[ID] = G4AttDef(ID, "Ending Proces << 225     (*store)[ID] = G4AttDef(ID,"Ending Process Type Name",
                                                   >> 226           "Physics","","G4String");
259                                                   227 
260     ID = "FKE";                                   228     ID = "FKE";
261     (*store)[ID] = G4AttDef(ID, "Final kinetic << 229     (*store)[ID] = G4AttDef(ID,"Final kinetic energy",
                                                   >> 230           "Physics","G4BestUnit","G4double");
                                                   >> 231 
262   }                                               232   }
263                                                   233 
264   return store;                                   234   return store;
265 }                                                 235 }
266                                                   236 
267 static G4String Path(const G4TouchableHandle&     237 static G4String Path(const G4TouchableHandle& th)
268 {                                                 238 {
269   std::ostringstream oss;                         239   std::ostringstream oss;
270   G4int depth = th->GetHistoryDepth();            240   G4int depth = th->GetHistoryDepth();
271   for (G4int i = depth; i >= 0; --i) {            241   for (G4int i = depth; i >= 0; --i) {
272     oss << th->GetVolume(i)->GetName() << ':'  << 242     oss << th->GetVolume(i)->GetName()
                                                   >> 243   << ':' << th->GetCopyNumber(i);
273     if (i != 0) oss << '/';                       244     if (i != 0) oss << '/';
274   }                                               245   }
275   return oss.str();                               246   return oss.str();
276 }                                                 247 }
277                                                   248 
278 std::vector<G4AttValue>* G4RichTrajectory::Cre    249 std::vector<G4AttValue>* G4RichTrajectory::CreateAttValues() const
279 {                                                 250 {
280   // Create base class att values...              251   // Create base class att values...
281   //std::vector<G4AttValue>* values = G4VTraje << 252   std::vector<G4AttValue>* values = G4Trajectory::CreateAttValues();
282   auto values = new std::vector<G4AttValue>;   << 
283   values->push_back(G4AttValue("ID", G4UIcomma << 
284   values->push_back(G4AttValue("PID", G4UIcomm << 
285   values->push_back(G4AttValue("PN", ParticleN << 
286   values->push_back(G4AttValue("Ch", G4UIcomma << 
287   values->push_back(G4AttValue("PDG", G4UIcomm << 
288   values->push_back(G4AttValue("IKE", G4BestUn << 
289   values->push_back(G4AttValue("IMom", G4BestU << 
290   values->push_back(G4AttValue("IMag", G4BestU << 
291   values->push_back(G4AttValue("NTP", G4UIcomm << 
292                                                << 
293   if (fpInitialVolume && (fpInitialVolume->Get << 
294     values->push_back(G4AttValue("IVPath", Pat << 
295   }                                            << 
296   else {                                       << 
297     values->push_back(G4AttValue("IVPath", "No << 
298   }                                            << 
299                                                << 
300   if (fpInitialNextVolume && (fpInitialNextVol << 
301     values->push_back(G4AttValue("INVPath", Pa << 
302   }                                            << 
303   else {                                       << 
304     values->push_back(G4AttValue("INVPath", "N << 
305   }                                            << 
306                                                   253 
307   if (fpCreatorProcess != nullptr) {           << 254   if (fpInitialVolume && fpInitialVolume->GetVolume()) {
308     values->push_back(G4AttValue("CPN", fpCrea << 255     values->push_back(G4AttValue("IVPath",Path(fpInitialVolume),""));
309     G4ProcessType type = fpCreatorProcess->Get << 256   } else {
310     values->push_back(G4AttValue("CPTN", G4VPr << 257     values->push_back(G4AttValue("IVPath","None",""));
311     values->push_back(G4AttValue("CMID", G4UIc << 
312     const G4String& creatorModelName = G4Physi << 
313     values->push_back(G4AttValue("CMN", creato << 
314   }                                            << 
315   else {                                       << 
316     values->push_back(G4AttValue("CPN", "None" << 
317     values->push_back(G4AttValue("CPTN", "None << 
318     values->push_back(G4AttValue("CMID", "None << 
319     values->push_back(G4AttValue("CMN", "None" << 
320   }                                               258   }
321                                                   259 
322   if (fpFinalVolume && (fpFinalVolume->GetVolu << 260   if (fpInitialNextVolume && fpInitialNextVolume->GetVolume()) {
323     values->push_back(G4AttValue("FVPath", Pat << 261     values->push_back(G4AttValue("INVPath",Path(fpInitialNextVolume),""));
324   }                                            << 262   } else {
325   else {                                       << 263     values->push_back(G4AttValue("INVPath","None",""));
326     values->push_back(G4AttValue("FVPath", "No << 
327   }                                               264   }
328                                                   265 
329   if (fpFinalNextVolume && (fpFinalNextVolume- << 266   if (fpCreatorProcess) {
330     values->push_back(G4AttValue("FNVPath", Pa << 267     values->push_back
331   }                                            << 268     (G4AttValue("CPN",fpCreatorProcess->GetProcessName(),""));
332   else {                                       << 269     G4ProcessType type = fpCreatorProcess->GetProcessType();
333     values->push_back(G4AttValue("FNVPath", "N << 270     values->push_back
                                                   >> 271     (G4AttValue("CPTN",G4VProcess::GetProcessTypeName(type),""));
                                                   >> 272     values->push_back
                                                   >> 273     (G4AttValue("CMID",G4UIcommand::ConvertToString(fCreatorModelID),""));
                                                   >> 274     const G4String& creatorModelName =
                                                   >> 275     G4PhysicsModelCatalog::GetModelName(fCreatorModelID);
                                                   >> 276     values->push_back(G4AttValue("CMN",creatorModelName,""));
                                                   >> 277   } else {
                                                   >> 278     values->push_back(G4AttValue("CPN","None",""));
                                                   >> 279     values->push_back(G4AttValue("CPTN","None",""));
                                                   >> 280     values->push_back(G4AttValue("CMID","None",""));
                                                   >> 281     values->push_back(G4AttValue("CMN","None",""));
                                                   >> 282   }
                                                   >> 283 
                                                   >> 284   if (fpFinalVolume && fpFinalVolume->GetVolume()) {
                                                   >> 285     values->push_back(G4AttValue("FVPath",Path(fpFinalVolume),""));
                                                   >> 286   } else {
                                                   >> 287     values->push_back(G4AttValue("FVPath","None",""));
                                                   >> 288   }
                                                   >> 289 
                                                   >> 290   if (fpFinalNextVolume && fpFinalNextVolume->GetVolume()) {
                                                   >> 291     values->push_back(G4AttValue("FNVPath",Path(fpFinalNextVolume),""));
                                                   >> 292   } else {
                                                   >> 293     values->push_back(G4AttValue("FNVPath","None",""));
334   }                                               294   }
335                                                   295 
336   if (fpEndingProcess != nullptr) {            << 296   if (fpEndingProcess) {
337     values->push_back(G4AttValue("EPN", fpEndi << 297     values->push_back(G4AttValue("EPN",fpEndingProcess->GetProcessName(),""));
338     G4ProcessType type = fpEndingProcess->GetP    298     G4ProcessType type = fpEndingProcess->GetProcessType();
339     values->push_back(G4AttValue("EPTN", G4VPr << 299     values->push_back(G4AttValue("EPTN",G4VProcess::GetProcessTypeName(type),""));
340   }                                            << 300   } else {
341   else {                                       << 301     values->push_back(G4AttValue("EPN","None",""));
342     values->push_back(G4AttValue("EPN", "None" << 302     values->push_back(G4AttValue("EPTN","None",""));
343     values->push_back(G4AttValue("EPTN", "None << 
344   }                                               303   }
345                                                   304 
346   values->push_back(G4AttValue("FKE", G4BestUn << 305   values->push_back
                                                   >> 306     (G4AttValue("FKE",G4BestUnit(fFinalKineticEnergy,"Energy"),""));
347                                                   307 
348 #ifdef G4ATTDEBUG                                 308 #ifdef G4ATTDEBUG
349   G4cout << G4AttCheck(values, GetAttDefs());  << 309   G4cout << G4AttCheck(values,GetAttDefs());
350 #endif                                            310 #endif
351                                                   311 
352   return values;                                  312   return values;
353 }                                                 313 }
354                                                << 
355 G4ParticleDefinition* G4RichTrajectory::GetPar << 
356 {                                              << 
357   return (G4ParticleTable::GetParticleTable()- << 
358 }                                              << 
359                                                << 
360 G4VTrajectory* G4RichTrajectory::CloneForMaste << 
361 {                                              << 
362   G4AutoLock lock(&CloneRichTrajectoryMutex);  << 
363   auto* cloned = new G4ClonedRichTrajectory(*t << 
364   return cloned;                               << 
365 }                                              << 
366                                                << 
367                                                   314