/usr/include/root/TGeoParallelWorld.h is in libroot-geom-dev 5.34.30-0ubuntu8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
// Author: Andrei Gheata 30/06/14
#ifndef ROOT_TGeoParallelWorld
#define ROOT_TGeoParallelWorld
#ifndef ROOT_TGeoVolume
#include "TGeoVolume.h"
#endif
// forward declarations
class TGeoManager;
class TGeoPhysicalNode;
class TGeoVolume;
////////////////////////////////////////////////////////////////////////////
// //
// TGeoParallelWorld - base class for a flat world that can be navigated //
// in parallel //
// //
////////////////////////////////////////////////////////////////////////////
class TGeoParallelWorld : public TNamed
{
protected :
TGeoManager *fGeoManager; // base geometry
TObjArray *fPaths; // array of paths
Bool_t fUseOverlaps; // Activated if user defined overlapping candidates
Bool_t fIsClosed; //! Closed flag
TGeoVolume *fVolume; //! helper volume
TGeoPhysicalNode *fLastState; //! Last PN touched
TObjArray *fPhysical; //! array of physical nodes
TGeoParallelWorld(const TGeoParallelWorld&);
TGeoParallelWorld& operator=(const TGeoParallelWorld&);
public:
// constructors
TGeoParallelWorld() : TNamed(),fGeoManager(0),fPaths(0),fUseOverlaps(kFALSE),fIsClosed(kFALSE),fVolume(0),fLastState(0),fPhysical(0) {}
TGeoParallelWorld(const char *name, TGeoManager *mgr);
// destructor
virtual ~TGeoParallelWorld();
// API for adding components nodes
void AddNode(const char *path);
// Activate/deactivate overlap usage
void SetUseOverlaps(Bool_t flag) {fUseOverlaps = flag;}
Bool_t IsUsingOverlaps() const {return fUseOverlaps;}
void ResetOverlaps() const;
// Adding overlap candidates can highly improve performance.
void AddOverlap(TGeoVolume *vol, Bool_t activate=kTRUE);
void AddOverlap(const char *volname, Bool_t activate=kTRUE);
// The normal PW mode (without declaring overlaps) does detect them
Int_t PrintDetectedOverlaps() const;
// Closing a parallel geometry is mandatory
Bool_t CloseGeometry();
// Refresh structures in case of re-alignment
void RefreshPhysicalNodes();
// Navigation interface
TGeoPhysicalNode *FindNode(Double_t point[3]);
TGeoPhysicalNode *FindNextBoundary(Double_t point[3], Double_t dir[3], Double_t &step, Double_t stepmax=1.E30);
Double_t Safety(Double_t point[3], Double_t safmax=1.E30);
// Getters
TGeoManager *GetGeometry() const {return fGeoManager;}
Bool_t IsClosed() const {return fIsClosed;}
TGeoVolume *GetVolume() const {return fVolume;}
// Utilities
void CheckOverlaps(Double_t ovlp=0.001); // default 10 microns
void Draw(Option_t *option);
ClassDef(TGeoParallelWorld, 3) // parallel world base clas
};
#endif
|