G4RichTrajectoryPoint Class Reference

#include <G4RichTrajectoryPoint.hh>

Inheritance diagram for G4RichTrajectoryPoint:

G4TrajectoryPoint G4VTrajectoryPoint

Public Member Functions

 G4RichTrajectoryPoint ()
 G4RichTrajectoryPoint (const G4Track *)
 G4RichTrajectoryPoint (const G4Step *)
 G4RichTrajectoryPoint (const G4RichTrajectoryPoint &right)
virtual ~G4RichTrajectoryPoint ()
const std::vector< G4ThreeVector > * GetAuxiliaryPoints () const
void * operator new (size_t)
void operator delete (void *aRichTrajectoryPoint)
int operator== (const G4RichTrajectoryPoint &right) const
virtual const std::map< G4String,
G4AttDef > * 
GetAttDefs () const
virtual std::vector< G4AttValue > * CreateAttValues () const

Detailed Description

Definition at line 71 of file G4RichTrajectoryPoint.hh.


Constructor & Destructor Documentation

G4RichTrajectoryPoint::G4RichTrajectoryPoint (  ) 

Definition at line 66 of file G4RichTrajectoryPoint.cc.

00066                                             :
00067   fpAuxiliaryPointVector(0),
00068   fTotEDep(0.),
00069   fRemainingEnergy(0.),
00070   fpProcess(0),
00071   fPreStepPointStatus(fUndefined),
00072   fPostStepPointStatus(fUndefined),
00073   fPreStepPointGlobalTime(0),
00074   fPostStepPointGlobalTime(0),
00075   fPreStepPointWeight(1.),
00076   fPostStepPointWeight(1.)
00077 {}

G4RichTrajectoryPoint::G4RichTrajectoryPoint ( const G4Track  ) 

Definition at line 79 of file G4RichTrajectoryPoint.cc.

00079                                                                  :
00080   G4TrajectoryPoint(aTrack->GetPosition()),
00081   fpAuxiliaryPointVector(0),
00082   fTotEDep(0.),
00083   fRemainingEnergy(aTrack->GetKineticEnergy()),
00084   fpProcess(0),
00085   fPreStepPointStatus(fUndefined),
00086   fPostStepPointStatus(fUndefined),
00087   fPreStepPointGlobalTime(aTrack->GetGlobalTime()),
00088   fPostStepPointGlobalTime(aTrack->GetGlobalTime()),
00089   fpPreStepPointVolume(aTrack->GetTouchableHandle()),
00090   fpPostStepPointVolume(aTrack->GetNextTouchableHandle()),
00091   fPreStepPointWeight(aTrack->GetWeight()),
00092   fPostStepPointWeight(aTrack->GetWeight())
00093 {}

G4RichTrajectoryPoint::G4RichTrajectoryPoint ( const G4Step  ) 

Definition at line 95 of file G4RichTrajectoryPoint.cc.

References G4Track::GetCurrentStepNumber(), G4StepPoint::GetGlobalTime(), G4StepPoint::GetKineticEnergy(), G4Track::GetKineticEnergy(), G4Step::GetPostStepPoint(), G4Step::GetPreStepPoint(), G4StepPoint::GetProcessDefinedStep(), G4StepPoint::GetStepStatus(), G4StepPoint::GetTouchableHandle(), G4Step::GetTrack(), and G4StepPoint::GetWeight().

00095                                                                :
00096   G4TrajectoryPoint(aStep->GetPostStepPoint()->GetPosition()),
00097   fpAuxiliaryPointVector(aStep->GetPointerToVectorOfAuxiliaryPoints()),
00098   fTotEDep(aStep->GetTotalEnergyDeposit())
00099 {
00100   G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
00101   G4StepPoint* postStepPoint = aStep->GetPostStepPoint();
00102   if (aStep->GetTrack()->GetCurrentStepNumber() <= 0) {  // First step
00103     fRemainingEnergy = aStep->GetTrack()->GetKineticEnergy();
00104   } else {
00105     fRemainingEnergy = preStepPoint->GetKineticEnergy() - fTotEDep;
00106   }
00107   fpProcess = postStepPoint->GetProcessDefinedStep();
00108   fPreStepPointStatus = preStepPoint->GetStepStatus();
00109   fPostStepPointStatus = postStepPoint->GetStepStatus();
00110   fPreStepPointGlobalTime = preStepPoint->GetGlobalTime();
00111   fPostStepPointGlobalTime = postStepPoint->GetGlobalTime();
00112   fpPreStepPointVolume = preStepPoint->GetTouchableHandle();
00113   fpPostStepPointVolume = postStepPoint->GetTouchableHandle();
00114   fPreStepPointWeight = preStepPoint->GetWeight();
00115   fPostStepPointWeight = postStepPoint->GetWeight();
00116 
00117   /*
00118   G4cout << "fpAuxiliaryPointVector "
00119          << (void*) fpAuxiliaryPointVector;
00120   G4cout << ": ";
00121   if (fpAuxiliaryPointVector) {
00122     G4cout << "size: " << fpAuxiliaryPointVector->size();
00123     for (size_t i = 0; i < fpAuxiliaryPointVector->size(); ++i)
00124       G4cout << "\n  " << (*fpAuxiliaryPointVector)[i];
00125   } else {
00126     G4cout << "non-existent";
00127   }
00128   G4cout << G4endl;
00129 
00130   static const G4Step* lastStep = 0;
00131   if (aStep && aStep == lastStep) {
00132     G4cout << "********* aStep is same as last" << G4endl;
00133   }
00134   lastStep = aStep;
00135 
00136   static std::vector<G4ThreeVector>*  lastAuxiliaryPointVector = 0;
00137   if (fpAuxiliaryPointVector &&
00138       fpAuxiliaryPointVector == lastAuxiliaryPointVector) {
00139     G4cout << "********* fpAuxiliaryPointVector is same as last" << G4endl;
00140   }
00141   lastAuxiliaryPointVector = fpAuxiliaryPointVector;
00142   */
00143 }

G4RichTrajectoryPoint::G4RichTrajectoryPoint ( const G4RichTrajectoryPoint right  ) 

Definition at line 146 of file G4RichTrajectoryPoint.cc.

00146                                     :
00147   G4TrajectoryPoint(right),
00148   fpAuxiliaryPointVector(right.fpAuxiliaryPointVector),
00149   fTotEDep(right.fTotEDep),
00150   fRemainingEnergy(right.fRemainingEnergy),
00151   fpProcess(right.fpProcess),
00152   fPreStepPointStatus(right.fPreStepPointStatus),
00153   fPostStepPointStatus(right.fPostStepPointStatus),
00154   fPreStepPointGlobalTime(right.fPreStepPointGlobalTime),
00155   fPostStepPointGlobalTime(right.fPostStepPointGlobalTime),
00156   fpPreStepPointVolume(right.fpPreStepPointVolume),
00157   fpPostStepPointVolume(right.fpPostStepPointVolume),
00158   fPreStepPointWeight(right.fPreStepPointWeight),
00159   fPostStepPointWeight(right.fPostStepPointWeight)
00160 {}

G4RichTrajectoryPoint::~G4RichTrajectoryPoint (  )  [virtual]

Definition at line 162 of file G4RichTrajectoryPoint.cc.

00163 {
00164   if(fpAuxiliaryPointVector) {
00165     /*
00166     G4cout << "Deleting fpAuxiliaryPointVector at "
00167            << (void*) fpAuxiliaryPointVector
00168            << G4endl;
00169     */
00170     delete fpAuxiliaryPointVector;
00171   }
00172 }


Member Function Documentation

std::vector< G4AttValue > * G4RichTrajectoryPoint::CreateAttValues (  )  const [virtual]

Reimplemented from G4TrajectoryPoint.

Definition at line 259 of file G4RichTrajectoryPoint.cc.

References G4TrajectoryPoint::CreateAttValues(), G4BestUnit, G4cout, GetAttDefs(), G4VProcess::GetProcessName(), G4VProcess::GetProcessType(), and G4VProcess::GetProcessTypeName().

00260 {
00261   // Create base class att values...
00262   std::vector<G4AttValue>* values = G4TrajectoryPoint::CreateAttValues();
00263 
00264   if (fpAuxiliaryPointVector) {
00265     std::vector<G4ThreeVector>::iterator iAux;
00266     for (iAux = fpAuxiliaryPointVector->begin();
00267          iAux != fpAuxiliaryPointVector->end(); ++iAux) {
00268       values->push_back(G4AttValue("Aux",G4BestUnit(*iAux,"Length"),""));
00269     }
00270   }
00271 
00272   values->push_back(G4AttValue("TED",G4BestUnit(fTotEDep,"Energy"),""));
00273 
00274   values->push_back(G4AttValue("RE",G4BestUnit(fRemainingEnergy,"Energy"),""));
00275 
00276   if (fpProcess) {
00277     values->push_back
00278       (G4AttValue("PDS",fpProcess->GetProcessName(),""));
00279     values->push_back
00280       (G4AttValue
00281        ("PTDS",G4VProcess::GetProcessTypeName(fpProcess->GetProcessType()),
00282         ""));
00283   } else {
00284     values->push_back(G4AttValue("PDS","None",""));
00285     values->push_back(G4AttValue("PTDS","None",""));
00286   }
00287 
00288   values->push_back
00289     (G4AttValue("PreStatus",Status(fPreStepPointStatus),""));
00290 
00291   values->push_back
00292     (G4AttValue("PostStatus",Status(fPostStepPointStatus),""));
00293 
00294   values->push_back
00295     (G4AttValue("PreT",G4BestUnit(fPreStepPointGlobalTime,"Time"),""));
00296 
00297   values->push_back
00298     (G4AttValue("PostT",G4BestUnit(fPostStepPointGlobalTime,"Time"),""));
00299 
00300   if (fpPreStepPointVolume && fpPreStepPointVolume->GetVolume()) {
00301     values->push_back(G4AttValue("PreVPath",Path(fpPreStepPointVolume),""));
00302   } else {
00303     values->push_back(G4AttValue("PreVPath","None",""));
00304   }
00305 
00306   if (fpPostStepPointVolume && fpPostStepPointVolume->GetVolume()) {
00307     values->push_back(G4AttValue("PostVPath",Path(fpPostStepPointVolume),""));
00308   } else {
00309     values->push_back(G4AttValue("PostVPath","None",""));
00310   }
00311 
00312   {
00313     std::ostringstream oss;
00314     oss << fPreStepPointWeight;
00315     values->push_back
00316       (G4AttValue("PreW",oss.str(),""));
00317   }
00318 
00319   {
00320     std::ostringstream oss;
00321     oss << fPostStepPointWeight;
00322     values->push_back
00323       (G4AttValue("PostW",oss.str(),""));
00324   }
00325 
00326 #ifdef G4ATTDEBUG
00327   G4cout << G4AttCheck(values,GetAttDefs());
00328 #endif
00329 
00330   return values;
00331 }

const std::map< G4String, G4AttDef > * G4RichTrajectoryPoint::GetAttDefs (  )  const [virtual]

Reimplemented from G4TrajectoryPoint.

Definition at line 175 of file G4RichTrajectoryPoint.cc.

References G4TrajectoryPoint::GetAttDefs(), and G4AttDefStore::GetInstance().

Referenced by CreateAttValues().

00176 {
00177   G4bool isNew;
00178   std::map<G4String,G4AttDef>* store
00179     = G4AttDefStore::GetInstance("G4RichTrajectoryPoint",isNew);
00180   if (isNew) {
00181 
00182     // Copy base class att defs...
00183     *store = *(G4TrajectoryPoint::GetAttDefs());
00184 
00185     G4String ID;
00186 
00187     ID = "Aux";
00188     (*store)[ID] = G4AttDef(ID, "Auxiliary Point Position",
00189                             "Physics","G4BestUnit","G4ThreeVector");
00190     ID = "TED";
00191     (*store)[ID] = G4AttDef(ID,"Total Energy Deposit",
00192                             "Physics","G4BestUnit","G4double");
00193     ID = "RE";
00194     (*store)[ID] = G4AttDef(ID,"Remaining Energy",
00195                             "Physics","G4BestUnit","G4double");
00196     ID = "PDS";
00197     (*store)[ID] = G4AttDef(ID,"Process Defined Step",
00198                             "Physics","","G4String");
00199     ID = "PTDS";
00200     (*store)[ID] = G4AttDef(ID,"Process Type Defined Step",
00201                             "Physics","","G4String");
00202     ID = "PreStatus";
00203     (*store)[ID] = G4AttDef(ID,"Pre-step-point status",
00204                             "Physics","","G4String");
00205     ID = "PostStatus";
00206     (*store)[ID] = G4AttDef(ID,"Post-step-point status",
00207                             "Physics","","G4String");
00208     ID = "PreT";
00209     (*store)[ID] = G4AttDef(ID,"Pre-step-point global time",
00210                             "Physics","G4BestUnit","G4double");
00211     ID = "PostT";
00212     (*store)[ID] = G4AttDef(ID,"Post-step-point global time",
00213                             "Physics","G4BestUnit","G4double");
00214     ID = "PreVPath";
00215     (*store)[ID] = G4AttDef(ID,"Pre-step Volume Path",
00216                             "Physics","","G4String");
00217     ID = "PostVPath";
00218     (*store)[ID] = G4AttDef(ID,"Post-step Volume Path",
00219                             "Physics","","G4String");
00220     ID = "PreW";
00221     (*store)[ID] = G4AttDef(ID,"Pre-step-point weight",
00222                             "Physics","","G4double");
00223     ID = "PostW";
00224     (*store)[ID] = G4AttDef(ID,"Post-step-point weight",
00225                             "Physics","","G4double");
00226   }
00227   return store;
00228 }

const std::vector<G4ThreeVector>* G4RichTrajectoryPoint::GetAuxiliaryPoints (  )  const [inline, virtual]

Reimplemented from G4VTrajectoryPoint.

Definition at line 89 of file G4RichTrajectoryPoint.hh.

00090    { return fpAuxiliaryPointVector; }

void G4RichTrajectoryPoint::operator delete ( void *  aRichTrajectoryPoint  )  [inline]

Reimplemented from G4TrajectoryPoint.

Definition at line 136 of file G4RichTrajectoryPoint.hh.

References aRichTrajectoryPointAllocator.

00137 {
00138   aRichTrajectoryPointAllocator.FreeSingle
00139     ((G4RichTrajectoryPoint *) aRichTrajectoryPoint);
00140 }

void * G4RichTrajectoryPoint::operator new ( size_t   )  [inline]

Reimplemented from G4TrajectoryPoint.

Definition at line 127 of file G4RichTrajectoryPoint.hh.

References aRichTrajectoryPointAllocator.

00128 {
00129   void *aRichTrajectoryPoint;
00130   aRichTrajectoryPoint =
00131     (void *) aRichTrajectoryPointAllocator.MallocSingle();
00132   return aRichTrajectoryPoint;
00133 }

int G4RichTrajectoryPoint::operator== ( const G4RichTrajectoryPoint right  )  const [inline]

Definition at line 95 of file G4RichTrajectoryPoint.hh.

00096   { return (this==&right); }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:17 2013 for Geant4 by  doxygen 1.4.7