Import Geant4 7.1.0 source tree
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SmoothTrajectory.cc,v 1.13 2004/11/18 23:10:10 perl Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
// $Id: G4SmoothTrajectory.cc,v 1.15 2005/05/03 17:48:51 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
@@ -43,8 +43,13 @@
|
||||
#include "G4AttDefStore.hh"
|
||||
#include "G4AttDef.hh"
|
||||
#include "G4AttValue.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include <strstream>
|
||||
|
||||
//#define G4ATTDEBUG
|
||||
#ifdef G4ATTDEBUG
|
||||
#include "G4AttCheck.hh"
|
||||
#endif
|
||||
|
||||
G4Allocator<G4SmoothTrajectory> aSmoothTrajectoryAllocator;
|
||||
|
||||
@@ -129,24 +134,25 @@ const std::map<G4String,G4AttDef>* G4SmoothTrajectory::GetAttDefs() const
|
||||
(*store)[PID] = G4AttDef(PID,"Parent ID","Bookkeeping","","G4int");
|
||||
|
||||
G4String PN("PN");
|
||||
(*store)[PN] = G4AttDef(PN,"Particle Name","Physics","","G4String");
|
||||
(*store)[PN] = G4AttDef(PN,"Particle Name","Bookkeeping","","G4String");
|
||||
|
||||
G4String Ch("Ch");
|
||||
(*store)[Ch] = G4AttDef(Ch,"Charge","Physics","","G4double");
|
||||
(*store)[Ch] = G4AttDef(Ch,"Charge","Physics","e+","G4double");
|
||||
|
||||
G4String PDG("PDG");
|
||||
(*store)[PDG] = G4AttDef(PDG,"PDG Encoding","Physics","","G4int");
|
||||
(*store)[PDG] = G4AttDef(PDG,"PDG Encoding","Bookkeeping","","G4int");
|
||||
|
||||
G4String IMom("IMom");
|
||||
(*store)[IMom] = G4AttDef(IMom, "Momentum of track at start of trajectory",
|
||||
"Physics","","G4ThreeVector");
|
||||
"Physics","G4BestUnit","G4ThreeVector");
|
||||
|
||||
G4String IMag("IMag");
|
||||
(*store)[IMag] = G4AttDef(IMag, "Magnitude of momentum of track at start of trajectory",
|
||||
"Physics","","G4double");
|
||||
(*store)[IMag] = G4AttDef
|
||||
(IMag, "Magnitude of momentum of track at start of trajectory",
|
||||
"Physics","G4BestUnit","G4double");
|
||||
|
||||
G4String NTP("NTP");
|
||||
(*store)[NTP] = G4AttDef(NTP,"No. of points","Physics","","G4int");
|
||||
(*store)[NTP] = G4AttDef(NTP,"No. of points","Bookkeeping","","G4int");
|
||||
|
||||
}
|
||||
return store;
|
||||
@@ -155,40 +161,34 @@ const std::map<G4String,G4AttDef>* G4SmoothTrajectory::GetAttDefs() const
|
||||
|
||||
std::vector<G4AttValue>* G4SmoothTrajectory::CreateAttValues() const
|
||||
{
|
||||
char c[100];
|
||||
std::ostrstream s(c,100);
|
||||
|
||||
std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
|
||||
|
||||
s.seekp(std::ios::beg);
|
||||
s << fTrackID << std::ends;
|
||||
values->push_back(G4AttValue("ID",c,""));
|
||||
values->push_back
|
||||
(G4AttValue("ID",G4UIcommand::ConvertToString(fTrackID),""));
|
||||
|
||||
s.seekp(std::ios::beg);
|
||||
s << fParentID << std::ends;
|
||||
values->push_back(G4AttValue("PID",c,""));
|
||||
values->push_back
|
||||
(G4AttValue("PID",G4UIcommand::ConvertToString(fParentID),""));
|
||||
|
||||
values->push_back(G4AttValue("PN",ParticleName,""));
|
||||
|
||||
s.seekp(std::ios::beg);
|
||||
s << PDGCharge << std::ends;
|
||||
values->push_back(G4AttValue("Ch",c,""));
|
||||
values->push_back
|
||||
(G4AttValue("Ch",G4UIcommand::ConvertToString(PDGCharge),""));
|
||||
|
||||
s.seekp(std::ios::beg);
|
||||
s << PDGEncoding << std::ends;
|
||||
values->push_back(G4AttValue("PDG",c,""));
|
||||
values->push_back
|
||||
(G4AttValue("PDG",G4UIcommand::ConvertToString(PDGEncoding),""));
|
||||
|
||||
s.seekp(std::ios::beg);
|
||||
s << G4BestUnit(initialMomentum,"Energy") << std::ends;
|
||||
values->push_back(G4AttValue("IMom",c,""));
|
||||
values->push_back
|
||||
(G4AttValue("IMom",G4BestUnit(initialMomentum,"Energy"),""));
|
||||
|
||||
s.seekp(std::ios::beg);
|
||||
s << initialMomentum.mag() << std::ends;
|
||||
values->push_back(G4AttValue("IMag",c,""));
|
||||
values->push_back
|
||||
(G4AttValue("IMag",G4BestUnit(initialMomentum.mag(),"Energy"),""));
|
||||
|
||||
s.seekp(std::ios::beg);
|
||||
s << GetPointEntries() << std::ends;
|
||||
values->push_back(G4AttValue("NTP",c,""));
|
||||
values->push_back
|
||||
(G4AttValue("NTP",G4UIcommand::ConvertToString(GetPointEntries()),""));
|
||||
|
||||
#ifdef G4ATTDEBUG
|
||||
G4cout << G4AttCheck(values,GetAttDefs());
|
||||
#endif
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user