G4TrackingInformation.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 // $Id: G4TrackingInformation.hh 64057 2012-10-30 15:04:49Z gcosmo $
00027 //
00028 // Author: Mathieu Karamitros (kara (AT) cenbg . in2p3 . fr)
00029 //
00030 // WARNING : This class is released as a prototype.
00031 // It might strongly evolve or even disapear in the next releases.
00032 //
00033 // History:
00034 // -----------
00035 // 10 Oct 2011 M.Karamitros created
00036 //
00037 // -------------------------------------------------------------------
00038 
00039 #ifndef G4TRACKINGINFORMATION_HH
00040 #define G4TRACKINGINFORMATION_HH
00041 
00042 #include "globals.hh"
00043 #include <vector>
00044 #include "G4StepStatus.hh"
00045 #include "G4ThreeVector.hh"
00046 #include "G4TouchableHandle.hh"
00047 
00048 class G4ITStepProcessor;
00049 
00050 typedef std::vector<G4int>
00051         G4SelectedAtRestDoItVector;
00052 typedef std::vector<G4int>
00053         G4SelectedAlongStepDoItVector;
00054 typedef std::vector<G4int>
00055         G4SelectedPostStepDoItVector;
00056 typedef std::vector<G4int>
00057         G4SelectedPostStepAtTimeDoItVector;
00058 
00059 class G4Trajectory_Lock;
00060 class G4Track;
00061 struct G4ProcessState_Lock;
00062 class G4TrackingInformation;
00063 class G4SaveNavigatorState_Lock;
00064 struct G4ITNavigatorState_Lock;
00065 
00066 class G4ITStepProcessorState_Lock{
00067     friend class G4TrackingInformation;
00068 protected :
00069     inline virtual ~G4ITStepProcessorState_Lock(){;}
00070 };
00071 
00072 
00079 class G4TrackingInformation
00080 {
00081 public:
00082     G4TrackingInformation();
00083     ~G4TrackingInformation();
00084 
00085     //________________________________________________
00090     inline bool IsLeadingStep(){return fStepLeader;}
00091     inline void SetLeadingStep(bool value ){fStepLeader = value;}
00092 
00093     //________________________________________________
00098     G4ProcessState_Lock* GetProcessState(size_t index);
00099 
00100     inline void RecordProcessState(G4ProcessState_Lock*,
00101                                    size_t index);
00102 
00103     void SetStepProcessorState(G4ITStepProcessorState_Lock*);
00104     G4ITStepProcessorState_Lock* GetStepProcessorState();
00105 
00106     inline G4Trajectory_Lock* GetTrajectory_Lock()
00107     {
00108         return fpTrajectory_Lock ;
00109     }
00110 
00111     inline void SetTrajectory_Lock(G4Trajectory_Lock* trajLock)
00112     {
00113         fpTrajectory_Lock = trajLock;
00114     }
00115 
00116     void RecordCurrentPositionNTime(G4Track*);
00117     inline const G4ThreeVector&    GetPreStepPosition() const;
00118     inline G4double         GetPreStepLocalTime() const;
00119     inline G4double         GetPreStepGlobalTime() const;
00120 
00121     inline void SetNavigatorState(G4ITNavigatorState_Lock *);
00122     inline G4ITNavigatorState_Lock* GetNavigatorState() const;
00123 
00124     //-------------
00125 protected:
00126     //-------------
00127     friend class G4ITStepProcessor;
00128     //_______________________________________________________
00129     G4bool                          fStepLeader ;
00130     //_______________________________________________________
00131     G4Trajectory_Lock* fpTrajectory_Lock;
00132 
00133     //_______________________________________________________
00134     G4ThreeVector   fRecordedTrackPosition;
00135     G4double        fRecordedTrackLocalTime;
00136     G4double        fRecordedTrackGlobalTime;
00137 
00138     //_______________________________________________________
00139     G4ITNavigatorState_Lock* fNavigatorState;
00140 //    G4SaveNavigatorState_Lock* fNavigatorState;
00141 
00142     //_______________________________________________________
00147     std::vector<G4ProcessState_Lock*> fProcessState;
00148 
00149     //_______________________________________________________
00150     G4ITStepProcessorState_Lock* fpStepProcessorState;
00151 
00152     //_______________________________________________________
00156     G4TrackingInformation(const G4TrackingInformation& other);
00157 
00162     G4TrackingInformation& operator=(const G4TrackingInformation& other);
00163 };
00164 
00165 inline void G4TrackingInformation::SetStepProcessorState(G4ITStepProcessorState_Lock* state)
00166 {
00167     fpStepProcessorState = state;
00168 }
00169 
00170 inline G4ITStepProcessorState_Lock* G4TrackingInformation::GetStepProcessorState()
00171 {
00172     return fpStepProcessorState;
00173 }
00174 
00175 inline void G4TrackingInformation::RecordProcessState(G4ProcessState_Lock* state,
00176                                size_t index)
00177 {
00178     fProcessState[index] = state;
00179 }
00180 
00181 
00182 inline G4double G4TrackingInformation::GetPreStepGlobalTime() const
00183 {
00184     return fRecordedTrackGlobalTime;
00185 }
00186 
00187 inline G4double G4TrackingInformation::GetPreStepLocalTime() const
00188 {
00189     return fRecordedTrackLocalTime;
00190 }
00191 
00192 inline const G4ThreeVector& G4TrackingInformation::GetPreStepPosition() const
00193 {
00194     return fRecordedTrackPosition;
00195 }
00196 
00197 
00198 inline void G4TrackingInformation::SetNavigatorState(G4ITNavigatorState_Lock* state)
00199 {
00200     fNavigatorState = state;
00201 }
00202 
00203 inline G4ITNavigatorState_Lock* G4TrackingInformation::GetNavigatorState() const
00204 {
00205     return fNavigatorState;
00206 }
00207 
00208 
00209 #endif // G4TRACKINGINFORMATION_HH

Generated on Mon May 27 17:50:01 2013 for Geant4 by  doxygen 1.4.7