#ifndef ROOT_TGeoParallelWorld
#define ROOT_TGeoParallelWorld
#ifndef ROOT_TGeoVolume
#include "TGeoVolume.h"
#endif
class TGeoManager;
class TGeoPhysicalNode;
class TGeoVolume;
class TGeoParallelWorld : public TNamed
{
protected :
TGeoManager *fGeoManager;
TObjArray *fPaths;
Bool_t fUseOverlaps;
Bool_t fIsClosed;
TGeoVolume *fVolume;
TGeoPhysicalNode *fLastState;
TObjArray *fPhysical;
TGeoParallelWorld(const TGeoParallelWorld&);
TGeoParallelWorld& operator=(const TGeoParallelWorld&);
public:
TGeoParallelWorld() : TNamed(),fGeoManager(0),fPaths(0),fUseOverlaps(kFALSE),fIsClosed(kFALSE),fVolume(0),fLastState(0),fPhysical(0) {}
TGeoParallelWorld(const char *name, TGeoManager *mgr);
virtual ~TGeoParallelWorld();
void AddNode(const char *path);
void SetUseOverlaps(Bool_t flag) {fUseOverlaps = flag;}
Bool_t IsUsingOverlaps() const {return fUseOverlaps;}
void ResetOverlaps() const;
void AddOverlap(TGeoVolume *vol, Bool_t activate=kTRUE);
void AddOverlap(const char *volname, Bool_t activate=kTRUE);
Int_t PrintDetectedOverlaps() const;
Bool_t CloseGeometry();
void RefreshPhysicalNodes();
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);
TGeoManager *GetGeometry() const {return fGeoManager;}
Bool_t IsClosed() const {return fIsClosed;}
TGeoVolume *GetVolume() const {return fVolume;}
void CheckOverlaps(Double_t ovlp=0.001);
void Draw(Option_t *option);
ClassDef(TGeoParallelWorld, 3)
};
#endif