60 : fpPointsContainer(0), fTrackID(0), fParentID(0),
61 fPDGCharge(0.0), fPDGEncoding(0), fParticleName(
""),
69 fParticleDefinition = NULL;
97 fParticleDefinition=right.fParticleDefinition;
98 fParticleName = right.fParticleName;
99 fPDGCharge = right.fPDGCharge;
100 fPDGEncoding = right.fPDGEncoding;
101 fTrackID = right.fTrackID;
102 fParentID = right.fParentID;
103 fInitialMomentum = right.fInitialMomentum;
106 for(
size_t i=0;i<right.fpPointsContainer->size();++i) {
113 fDrawIt = right.fDrawIt;
114 fForceNoDraw = right.fForceNoDraw;
115 fForceDraw = right.fForceDraw;
122 for(
size_t i=0;i<fpPointsContainer->size();++i){
123 delete (*fpPointsContainer)[i];
125 fpPointsContainer->clear();
127 delete fpPointsContainer;
145 const G4int i_mode = 50;
155 if (!fForceDraw && (!fDrawIt || fForceNoDraw))
return;
164 if (!pVVisManager)
return;
166 const G4double markerSize = std::abs(i_mode)/1000;
167 G4bool lineRequired (i_mode >= 0);
168 G4bool markersRequired (markerSize > 0.);
176 const std::vector<G4ThreeVector>* auxiliaries
179 for (
size_t iAux = 0; iAux < auxiliaries->size(); ++iAux) {
182 trajectoryLine.push_back(pos);
184 if (markersRequired) {
185 auxiliaryPoints.push_back(pos);
191 trajectoryLine.push_back(pos);
193 if (markersRequired) {
194 stepPoints.push_back(pos);
213 pVVisManager->
Draw(trajectoryLine);
215 if (markersRequired) {
221 pVVisManager->
Draw(auxiliaryPoints);
228 pVVisManager->
Draw(stepPoints);
250 if(!secondTrajectory)
return;
255 for(
G4int i=1; i<ent; ++i) {
256 fpPointsContainer->push_back((*(second->fpPointsContainer))[i]);
258 delete (*second->fpPointsContainer)[0];
259 second->fpPointsContainer->clear();
267 std::map<G4String,G4AttDef>* store
273 (*store)[ID] =
G4AttDef(ID,
"Track ID",
"Bookkeeping",
"",
"G4int");
276 (*store)[PID] =
G4AttDef(PID,
"Parent ID",
"Bookkeeping",
"",
"G4int");
279 (*store)[PN] =
G4AttDef(PN,
"Particle Name",
"Physics",
"",
"G4String");
282 (*store)[Ch] =
G4AttDef(Ch,
"Charge",
"Physics",
"e+",
"G4double");
285 (*store)[PDG] =
G4AttDef(PDG,
"PDG Encoding",
"Physics",
"",
"G4int");
289 "Momentum of track at start of trajectory",
290 "Physics",
"G4BestUnit",
"G4ThreeVector");
294 "Magnitude of momentum of track at start of trajectory",
295 "Physics",
"G4BestUnit",
"G4double");
298 (*store)[NTP] =
G4AttDef(NTP,
"No. of points",
"Bookkeeping",
"",
"G4int");
308 std::vector<G4AttValue>* values =
new std::vector<G4AttValue>;
316 values->push_back(
G4AttValue(
"PN",fParticleName,
""));
virtual void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())=0
G4ParticleDefinition * GetDefinition() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
G4int GetParentID() const
virtual void AppendStep(const G4Step *aStep)
virtual const std::vector< G4ThreeVector > * GetAuxiliaryPoints() const
static G4VVisManager * GetConcreteInstance()
virtual G4VTrajectoryPoint * GetPoint(G4int i) const
virtual void MergeTrajectory(G4VTrajectory *secondTrajectory)
void SetMarkerType(MarkerType)
void SetFillStyle(FillStyle)
static G4String ConvertToString(G4bool boolVal)
Definition of the WLSTrajectoryPoint class.
G4int GetPDGEncoding() const
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4ParticleDefinition * GetParticleDefinition()
const G4String & GetParticleName() const
virtual int GetPointEntries() const
G4GLOB_DLL std::ostream G4cout
virtual std::vector< G4AttValue > * CreateAttValues() const
virtual void ShowTrajectory(std::ostream &os=G4cout) const
void SetVisAttributes(const G4VisAttributes *)
G4ThreadLocal G4Allocator< WLSTrajectory > * WLSTrajectoryAllocator
Definition of the WLSTrajectory class.
G4ThreeVector GetMomentum() const
virtual const G4ThreeVector GetPosition() const =0
static G4ParticleTable * GetParticleTable()
std::vector< G4VTrajectoryPoint * > WLSTrajectoryPointContainer
static G4OpticalPhoton * OpticalPhotonDefinition()
virtual void ShowTrajectory(std::ostream &os=G4cout) const
G4double GetPDGCharge() const
virtual void DrawTrajectory() const
std::map< G4String, G4AttDef > * GetInstance(G4String storeKey, G4bool &isNew)
void SetScreenSize(G4double)