77 fVisibility = kBothVisible;
99 static Int_t counter = 0;
102 if(!(counter%1000))std::cout<<
"TVolume count="<<counter<<
" name="<<name<<std::endl;
149 const Int_t mapVis[4] = {1, -2, 0, -1 };
158 const Int_t mapVis[4] = {1, -2, 0, -1 };
161 for (i =0; i<3;i++)
if (mapVis[i] == vis)
return i;
201 if (IsMaster)
fShape = shape;
269 else Error(
"Add",
"Can not create list of positions for the current node <%s>:<%s>",
GetName(),
GetTitle());
297 if (!volume)
return 0;
302 return Add(volume,position);
316 if (!volume)
return 0;
322 return Add(volume,position);
335 posNumber = nodePosition->
GetId();
340 snprintf(num,10,
"%d",posNumber);
342 b->
Add(nodePosition,posName.
Data());
367 const Int_t big = 9999;
370 const Int_t inaxis = 7;
371 const Int_t maxdist = 5;
379 if (px < puxmin - inaxis)
return big;
380 if (py > puymin + inaxis)
return big;
381 if (px > puxmax + inaxis)
return big;
382 if (py < puymax - inaxis)
return big;
385 if (!view)
return big;
389 if (!position) position = &nullPosition;
395 while ((shape = (
TShape *)nextShape())) {
399 if (dshape < maxdist) {
400 gPad->SetSelected(
this);
403 if (dshape < dist) dist = dshape;
413 if (posList && posList->
GetSize()) {
418 while ((obj =
next())) {
422 if (dnode <= 0)
break;
423 if (dnode < dist) dist = dnode;
430 gPad->SetSelected(view);
446 gROOT->MakeDefCanvas();
452 Int_t iopt = atoi(option);
457 snprintf(buffer,10,
"%d",-iopt);
462 while (parent && ++iopt);
466 #if ROOT_VERSION_CODE >= ROOT_VERSION(4,03,05)
523 gIdentity->
SetName(
"Identity");
524 gIdentity->
SetTitle(
"Identity matrix");
527 memset(identityMatrix,0,9*
sizeof(
Double_t));
529 identityMatrix += 4; *identityMatrix = 1;
530 identityMatrix += 4; *identityMatrix = 1;
543 static char info[512];
546 ((
TPad *)
gPad)->AbsPixeltoXY(px,py,x[0],x[1]);
553 while( (shape = (
TShape *)nextShape()) ) {
554 Int_t nchi = strlen(info);
555 snprintf(&info[nchi],512-nchi,
" %6.2f/%6.2f: shape=%s/%s",x[0],x[1],shape->
GetName(),shape->
ClassName());
614 if (option) iopt = atoi(option);
615 if ( (0 < iopt) && (iopt <= level) )
return;
621 if (!position) position = &nullPosition;
633 if (posList && posList->
GetSize()) {
655 Bool_t rangeView = option && option[0]==
'r';
665 while( (shape = (
TShape *)nextShape()) ) {
678 #if ROOT_VERSION_CODE >= ROOT_VERSION(4,03,05)
695 Int_t reqSections = viewer3D->
AddObject(buffer, &viewerWantsSons);
702 shape->
Paint(option);
713 if (!position)
return;
719 if (nextPosition && nextPosition == position) {
744 TCanvas dummyPad(
"--Dumm--",
"dum",1,1);
755 if (savePad) savePad->
cd();
782 while( (shape = (
TShape *)nextShape()) ) {
789 if (!
Nodes())
return;
793 while ((obj =
next())) {
virtual void DeletePosition(TVolumePosition *position)
DeletePosition deletes the position of the TVolume *node from this TVolume and removes that volume fr...
void Add(TObject *obj, const char *name=0, Int_t check=-1)
Add object with name to browser.
THashList * GetListOfMatrices() const
virtual const char * GetTitle() const
Returns title of object.
virtual Double_t * GetMatrix()
virtual Style_t GetLineStyle() const
virtual Style_t GetFillStyle() const
virtual void SetLineWidth(Width_t lwidth)
virtual Double_t GetY() const
void AddFirst(TObject *obj)
Add object at the beginning of the list.
static Double_t gTranslation[kMAXLEVELS][kVectorSize]
double dist(Rotation3D const &r1, Rotation3D const &r2)
virtual void Add(TDataSet *dataset)
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
static Vc_ALWAYS_INLINE int_v min(const int_v &x, const int_v &y)
virtual Double_t GetY() const
static Int_t MapGEANT2StNodeVis(Int_t vis)
virtual TVolume * GetNode() const
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Computes distance from point (px,py) to the object.
static Int_t MapStNode2GEANTVis(ENodeSEEN vis)
ENodeSEEN Visibility flag 00 - everything visible, 10 - this unvisible, but sons are visible 01 - thi...
virtual UInt_t GetId() const
virtual void SetName(const char *name)
Change (i.e.
virtual void SetAutoRange(Bool_t autorange=kTRUE)=0
virtual void cd(const char *path=0)
Change Current Reference node to this.
const Option_t * GetOption() const
virtual Double_t GetZ() const
void ToLower()
Change string to lower-case.
virtual void SetFillStyle(Style_t fstyle)
virtual void Draw(Option_t *depth="3")
*-*-*-*-*-*-*-*-*-*-*-*Draw Referenced node with current parameters*-*-*-* *-* ======================...
virtual void Remove(TDataSet *set)
Remiove the "set" from this TDataSet.
virtual void Modify()
Change current line attributes if necessary.
virtual TDataSet * GetParent() const
virtual void SetMatrix(const Double_t *matrix)
copy predefined 3x3 matrix into TRotMatrix object
virtual void NDCtoWC(const Float_t *pn, Float_t *pw)=0
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
virtual TSeqCollection * GetCollection() const
virtual void PaintShape(Option_t *option="")
Paint shape of the volume To be called from the TObject::Paint method only.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
const char * Data() const
Fill Area Attributes class.
virtual void Paint(Option_t *option="")
*-*- Draw Referenced node
virtual void Add(TDataSet *dataset)
virtual void SetVisibility(Int_t vis=1)
Set visibility for this node and its sons.
TRotMatrix * GetRotMatrix(const char *name) const
Return pointer to RotMatrix with name.
virtual void SetVisibility(ENodeSEEN vis=TVolume::kBothVisible)
*-*-*-*-*-*-*Set visibility for this volume and its sons*-*-*-*-*–*-*-*-*-*-* *-* ===================...
TShape * GetShape(const char *name) const
Return pointer to Shape with name.
virtual void Modify()
Change current fill area attributes if necessary.
virtual void ImportShapeAttributes()
*-*-*-*-*-*-*Copy shape attributes as node attributes*-*-*-*-*–*-*-*-*-*-* *-* ======================...
virtual void Sizeof3D() const
virtual TList * GetListOfPositions()
virtual Int_t PushLevel()
const TRotMatrix * GetMatrix() const
Abstract 3D shapes viewer.
virtual void Sizeof3D() const
*-*-*-*-*-*-*Return total size of this 3-D volume with its attributes*-*-* *-* ======================...
static TRotMatrix * GetIdentity()
Return a pointer the "identity" matrix.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Int_t GetVisibility() const
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections) const
Stub to avoid forcing implementation at this stage.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
to be documented
virtual Double_t GetX() const
virtual void SetLineColor(Color_t lcolor)
const Option_t * GetOption() const
Using a TBrowser one can browse all ROOT objects.
TShape * GetShape() const
virtual void SetName(const char *name)
Change (i.e.
virtual ~TVolume()
*-*-*-*-*-*-*-*-*-*-*Volume default destructor*-*-*-*-*-*-*-*-*-*-*-*-*-* *-* ====================== ...
static TRotMatrix * gIdentity
This is the base class for all geometry shapes.
Manages a detector rotation matrix.
virtual void PaintNodePosition(Option_t *option="", TVolumePosition *postion=0)
*-*-*-*-*-*-*-*-*-*-*-*Paint Referenced volume with current parameters*-*-*-* *-* ===================...
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
virtual void SetFillColor(Color_t fcolor)
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual void Browse(TBrowser *b)
to be documented
virtual Color_t GetFillColor() const
virtual Double_t GetZ() const
TObject * GetObject() const
Int_t GetVisibility() const
virtual void UpdatePosition(Option_t *option="")
to be documented
virtual Int_t AddObject(const TBuffer3D &buffer, Bool_t *addChildren=0)=0
virtual TNode * CreateTNode(const TVolumePosition *position=0)
Convert a TVolume object into a TNode.
The most important graphics class in the ROOT system.
TList * GetListOfNodes() const
Generic 3D primitive description class.
virtual const char * GetName() const
Returns name of object.
virtual Double_t GetX(Int_t indx=0) const
virtual TObjLink * FirstLink() const
virtual void ImportShapeAttributes()
Copy shape attributes as node attributes.
virtual Color_t GetLineColor() const
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
*-*-*-*-*-*-*-*-*-*-*Execute action corresponding to one event*-*-*-* *-* ===========================...
TShape * GetShape() const
virtual void SetId(UInt_t id)
virtual void DrawOnly(Option_t *option="")
*-*-*-*-*-*-*-*-*-*Draw only Sons of this node*-*-*-*-*-*-*-*-*-*-*-*-* *-* =========================...
virtual void Paint(Option_t *option="")
This method is used only when a shape is painted outside a TNode.
virtual ENodeSEEN GetVisibility() const
virtual Int_t GetSize() const
virtual char * GetObjectInfo(Int_t px, Int_t py) const
to be documented
Wrapper around a TObject so it can be stored in a TList.
void SetPositionsList(TList *list=0)
virtual Int_t DistancetoNodePrimitive(Int_t px, Int_t py, TVolumePosition *position=0)
*-*-*-*-*-*-*-*-*Compute distance from point px,py to a TVolumeView*-*-*-*-*-* *-* ==================...
virtual void SetLineAttr(Color_t color, Int_t width, Option_t *opt="")
virtual void SetGeomLevel(Int_t level=0)
virtual void SetLineStyle(Style_t lstyle)
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
static TView * CreateView(Int_t system=1, const Double_t *rmin=0, const Double_t *rmax=0)
Create a concrete default 3-d view via the plug-in manager.
Mother of all ROOT objects.
virtual void UpdateTempMatrix(Double_t x=0, Double_t y=0, Double_t z=0, TRotMatrix *matrix=0)
Update temp matrix.
virtual TRotMatrix * GetMatrix() const
virtual void Add(TObject *obj)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual void GetLocalRange(Float_t *min, Float_t *max)
GetRange.
virtual void GetRange(Float_t *min, Float_t *max)=0
static Double_t gRotMatrix[kMAXLEVELS][kMatrixSize]
virtual TList * Nodes() const
virtual Width_t GetLineWidth() const
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
R__EXTERN TGeometry * gGeometry
virtual void PushMatrix()
ClassImp(TVolume) TVolume
*-*-*-*-*-*-*-*-*-*-*Volume default constructor*-*-*-*-*-*-*-*-*-*-*-*-* *-* ========================...
TObject * FindObject(const char *name) const
Must be redefined in derived classes.