Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

MaGeTrajectoryPoint.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * DISCLAIMER                                                       *
00004 // *                                                                  *
00005 // * The following disclaimer summarizes all the specific disclaimers *
00006 // * of contributors to this software. The specific disclaimers,which *
00007 // * govern, are listed with their locations in:                      *
00008 // *   http://cern.ch/geant4/license                                  *
00009 // *                                                                  *
00010 // * Neither the authors of this software system, nor their employing *
00011 // * institutes,nor the agencies providing financial support for this *
00012 // * work  make  any representation or  warranty, express or implied, *
00013 // * regarding  this  software system or assume any liability for its *
00014 // * use.                                                             *
00015 // *                                                                  *
00016 // * This  code  implementation is the  intellectual property  of the *
00017 // * GEANT4 collaboration.                                            *
00018 // * By copying,  distributing  or modifying the Program (or any work *
00019 // * based  on  the Program)  you indicate  your  acceptance of  this *
00020 // * statement, and all its terms.                                    *
00021 // ********************************************************************
00022 //
00023 //
00024 // $Id: MaGeTrajectoryPoint.cc,v 1.1.1.1 2004/11/08 17:53:42 gast Exp $
00025 // GEANT4 tag $Name:  $
00026 //
00027 //
00028 // ---------------------------------------------------------------
00029 //
00030 // MaGeTrajectoryPoint.cc
00031 //
00032 // ---------------------------------------------------------------
00033 
00034 #include "gerdaio/MaGeTrajectoryPoint.hh"
00035 
00036 #include "G4AttDefStore.hh"
00037 #include "G4AttDef.hh"
00038 #include "G4AttValue.hh"
00039 #include "G4UnitsTable.hh"
00040 #include <strstream>
00041 
00042 G4Allocator<MaGeTrajectoryPoint> MaGeTrajectoryPointAllocator;
00043 
00044 MaGeTrajectoryPoint::MaGeTrajectoryPoint()
00045 {
00046   fPosition = G4ThreeVector(0.,0.,0.);
00047   fELost=0.0;
00048   fStepLength=0.0;
00049   fTrackLength=0.0;
00050   fVolumeName="World";
00051   fProcessName="null";
00052 }
00053 
00054 MaGeTrajectoryPoint::MaGeTrajectoryPoint(G4ThreeVector pos, G4String volname)
00055 {
00056   fPosition = pos;
00057   fELost=0.0;
00058   fStepLength=0.0;
00059   fTrackLength=0.0;
00060   fVolumeName=volname;
00061   fProcessName="initstep";
00062 }
00063 
00064 MaGeTrajectoryPoint::MaGeTrajectoryPoint(G4ThreeVector pos)
00065 {
00066   fPosition = pos;
00067   fELost=0.0;
00068   fStepLength=0.0;
00069   fTrackLength=0.0;
00070   fVolumeName="Null";
00071   fProcessName="initstep";
00072 }
00073 
00074 
00075 
00076 MaGeTrajectoryPoint::MaGeTrajectoryPoint(const MaGeTrajectoryPoint &right)
00077  : G4VTrajectoryPoint(),fPosition(right.fPosition),
00078    fELost(right.fELost), fStepLength(right.fStepLength),
00079    fTrackLength(right.fTrackLength),fVolumeName(right.fVolumeName),
00080    fProcessName(right.fProcessName)
00081 {
00082 }
00083 
00084 MaGeTrajectoryPoint::~MaGeTrajectoryPoint()
00085 {
00086 }
00087 
00088 const std::map<G4String,G4AttDef>* MaGeTrajectoryPoint::GetAttDefs() const
00089 {
00090   G4bool isNew;
00091   std::map<G4String,G4AttDef>* store
00092     = G4AttDefStore::GetInstance("MaGeTrajectoryPoint",isNew);
00093   if (isNew) {
00094     G4String Pos("Pos");
00095     (*store)[Pos] = G4AttDef(Pos, "Position", "Physics","","G4ThreeVector");
00096   }
00097   return store;
00098 }
00099 
00100 std::vector<G4AttValue>* MaGeTrajectoryPoint::CreateAttValues() const
00101 {
00102   char c[100];
00103   std::ostrstream s(c,100);
00104 
00105   std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
00106 
00107   s.seekp(std::ios::beg);
00108   s << G4BestUnit(fPosition,"Length") << std::ends;
00109   values->push_back(G4AttValue("Pos",c,""));
00110 
00111   return values;
00112 }

Generated on Mon Nov 29 16:58:52 2004 for Majorana Simulation by  doxygen 1.3.9.1