G4TouchableHistory.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 //
00027 // $Id$
00028 //
00029 // 
00030 // class G4TouchableHistory
00031 //
00032 // Class description:
00033 //
00034 // Object representing a touchable detector element, and its history in the
00035 // geometrical hierarchy, including its net resultant local->global transform.
00036 
00037 // History:
00038 // - Created. Paul Kent, August 1996
00039 // ----------------------------------------------------------------------
00040 #ifndef G4TOUCHABLEHISTORY_HH
00041 #define G4TOUCHABLEHISTORY_HH
00042 
00043 #include "G4VTouchable.hh"
00044 
00045 #include "G4NavigationHistory.hh"
00046 #include "G4Allocator.hh"
00047 #include "G4LogicalVolume.hh"
00048 #include "G4ThreeVector.hh"
00049 #include "G4RotationMatrix.hh"
00050 
00051 class G4TouchableHistory : public G4VTouchable
00052 {
00053 
00054  public:  // with description
00055 
00056   G4TouchableHistory( const G4NavigationHistory& history );
00057   G4TouchableHistory(); 
00058     // The default constructor produces a touchable-history of 
00059     // 'zero-depth', ie an "unphysical" and not very unusable one.
00060     // It is for initialisation only.  
00061 
00062  ~G4TouchableHistory();
00063 
00064   inline G4VPhysicalVolume* GetVolume( G4int depth=0 ) const;
00065   inline G4VSolid* GetSolid( G4int depth=0 ) const;
00066   const G4ThreeVector& GetTranslation( G4int depth=0 ) const;
00067   const G4RotationMatrix* GetRotation( G4int depth=0 ) const;
00068 
00069   inline G4int GetReplicaNumber( G4int depth=0 ) const;
00070   inline G4int GetHistoryDepth()  const;
00071   G4int MoveUpHistory( G4int num_levels = 1 );
00072     // Access methods for touchables with history
00073 
00074   void  UpdateYourself( G4VPhysicalVolume*   pPhysVol,
00075                         const G4NavigationHistory* history=0 ); 
00076     // Update methods for touchables with history
00077 
00078  public:  // without description
00079 
00080   inline const G4NavigationHistory* GetHistory() const;
00081     // Should this method be "deprecated" ?
00082     // it is used now in G4Navigator::LocateGlobalPointAndSetup
00083 
00084   inline void *operator new(size_t);
00085   inline void operator delete(void *aTH);
00086     // Override "new" and "delete" to use "G4Allocator".
00087 
00088  private:
00089 
00090   inline G4int CalculateHistoryIndex( G4int stackDepth ) const;
00091 
00092   G4RotationMatrix frot;
00093   G4ThreeVector ftlate;
00094   G4NavigationHistory fhistory;
00095 };
00096 
00097 #include "G4TouchableHistory.icc"
00098 #endif

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