Logo ROOT  
Reference Guide
TGeoPatternFinder.h
Go to the documentation of this file.
1// @(#)root/geom:$Id$
2// Author: Andrei Gheata 30/10/01
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TGeoPatternFinder
13#define ROOT_TGeoPatternFinder
14
15#include <mutex>
16
17#include "TObject.h"
18
19#include "TGeoVolume.h"
20
21
22class TGeoMatrix;
23
24/////////////////////////////////////////////////////////////////////////////////
25// //
26// TGeoPatternFinder - base finder class for patterns. A pattern is specifying //
27// a division type //
28// //
29/////////////////////////////////////////////////////////////////////////////////
30
32{
33public:
35 {
36 TGeoMatrix *fMatrix; //! generic matrix
37 Int_t fCurrent; //! current division element
38 Int_t fNextIndex; //! index of next node
39
42 private:
43 ThreadData_t(const ThreadData_t&); // Not implemented
44 ThreadData_t& operator=(const ThreadData_t&); // Not implemented
45 };
47 void ClearThreadData() const;
48 void CreateThreadData(Int_t nthreads);
49
50protected :
54 };
55 Double_t fStep; // division step length
56 Double_t fStart; // starting point on divided axis
57 Double_t fEnd; // ending point
58 Int_t fNdivisions; // number of divisions
59 Int_t fDivIndex; // index of first div. node
60 TGeoVolume *fVolume; // volume to which applies
61
62 mutable std::vector<ThreadData_t*> fThreadData; //! Vector of thread private transient data
63 mutable Int_t fThreadSize; //! Size of the thread vector
64 mutable std::mutex fMutex; //! Mutex for thread data
65
66protected:
69
70public:
71 // constructors
74 // destructor
75 virtual ~TGeoPatternFinder();
76 // methods
77 virtual TGeoMatrix* CreateMatrix() const = 0;
78 virtual void cd(Int_t /*idiv*/) {}
79 virtual TGeoNode *CdNext();
80 virtual TGeoNode *FindNode(Double_t * /*point*/, const Double_t * /*dir*/=0) {return 0;}
81 virtual Int_t GetByteCount() const {return 36;}
82 Int_t GetCurrent();// {return fCurrent;}
84 virtual Int_t GetDivAxis() {return 1;}
85 virtual TGeoMatrix *GetMatrix();// {return fMatrix;}
86 Int_t GetNdiv() const {return fNdivisions;}
87 Int_t GetNext() const;// {return fNextIndex;}
89 Double_t GetStart() const {return fStart;}
90 Double_t GetStep() const {return fStep;}
91 Double_t GetEnd() const {return fEnd;}
92 TGeoVolume *GetVolume() const {return fVolume;}
93 virtual Bool_t IsOnBoundary(const Double_t * /*point*/) const {return kFALSE;}
96 virtual
99 void SetDivIndex(Int_t index) {fDivIndex = index;}
100 void SetNext(Int_t index);// {fNextIndex = index;}
101 void SetRange(Double_t start, Double_t step, Int_t ndivisions);
103 void SetVolume(TGeoVolume *vol) {fVolume = vol;}
104 virtual void UpdateMatrix(Int_t , TGeoHMatrix &) const {}
105
106 ClassDef(TGeoPatternFinder, 4) // patterns to divide volumes
107};
108
109////////////////////////////////////////////////////////////////////////////
110// //
111// TGeoPatternX - a X axis divison pattern //
112// //
113////////////////////////////////////////////////////////////////////////////
114
115class TGeoTranslation;
116
118{
119public:
120 // constructors
121 TGeoPatternX();
122 TGeoPatternX(TGeoVolume *vol, Int_t ndivisions);
123 TGeoPatternX(TGeoVolume *vol, Int_t ndivisions, Double_t step);
124 TGeoPatternX(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
125 TGeoPatternX(const TGeoPatternX &pf);
127
128 // destructor
129 virtual ~TGeoPatternX();
130 // methods
131 virtual TGeoMatrix* CreateMatrix() const;
132 virtual void cd(Int_t idiv);
133 virtual TGeoNode *FindNode(Double_t *point, const Double_t *dir=0);
134 virtual Double_t FindNextBoundary(Double_t *point, Double_t *dir, Int_t &indnext);
135 virtual Int_t GetDivAxis() {return 1;}
136 virtual Bool_t IsOnBoundary(const Double_t *point) const;
137 virtual
139 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
140 virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const;
141
142 ClassDef(TGeoPatternX, 1) // X division pattern
143};
144
145////////////////////////////////////////////////////////////////////////////
146// //
147// TGeoPatternY - a Y axis divison pattern //
148// //
149////////////////////////////////////////////////////////////////////////////
150
152{
153public:
154 // constructors
155 TGeoPatternY();
156 TGeoPatternY(TGeoVolume *vol, Int_t ndivisions);
157 TGeoPatternY(TGeoVolume *vol, Int_t ndivisions, Double_t step);
158 TGeoPatternY(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
159 TGeoPatternY(const TGeoPatternY &pf);
161 // destructor
162 virtual ~TGeoPatternY();
163 // methods
164 virtual TGeoMatrix* CreateMatrix() const;
165 virtual void cd(Int_t idiv);
166 virtual TGeoNode *FindNode(Double_t *point, const Double_t *dir=0);
167 virtual Double_t FindNextBoundary(Double_t *point, Double_t *dir, Int_t &indnext);
168 virtual Int_t GetDivAxis() {return 2;}
169 virtual Bool_t IsOnBoundary(const Double_t *point) const;
170 virtual
172 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
173 virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const;
174
175 ClassDef(TGeoPatternY, 1) // Y division pattern
176};
177
178////////////////////////////////////////////////////////////////////////////
179// //
180// TGeoPatternZ - a Z axis divison pattern //
181// //
182////////////////////////////////////////////////////////////////////////////
183
185{
186public:
187 // constructors
188 TGeoPatternZ();
189 TGeoPatternZ(TGeoVolume *vol, Int_t ndivisions);
190 TGeoPatternZ(TGeoVolume *vol, Int_t ndivisions, Double_t step);
191 TGeoPatternZ(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
192 TGeoPatternZ(const TGeoPatternZ &pf);
194 // destructor
195 virtual ~TGeoPatternZ();
196 // methods
197 virtual TGeoMatrix* CreateMatrix() const;
198 virtual void cd(Int_t idiv);
199 virtual TGeoNode *FindNode(Double_t *point, const Double_t *dir=0);
200 virtual Double_t FindNextBoundary(Double_t *point, Double_t *dir, Int_t &indnext);
201 virtual Int_t GetDivAxis() {return 3;}
202 virtual Bool_t IsOnBoundary(const Double_t *point) const;
203 virtual
205 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
206 virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const;
207
208 ClassDef(TGeoPatternZ, 1) // Z division pattern
209};
210
211////////////////////////////////////////////////////////////////////////////
212// //
213// TGeoPatternParaX - a X axis divison pattern for PARA shapes //
214// //
215////////////////////////////////////////////////////////////////////////////
216
218{
219public:
220 // constructors
222 TGeoPatternParaX(TGeoVolume *vol, Int_t ndivisions);
223 TGeoPatternParaX(TGeoVolume *vol, Int_t ndivisions, Double_t step);
224 TGeoPatternParaX(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
227
228 // destructor
229 virtual ~TGeoPatternParaX();
230 // methods
231 virtual TGeoMatrix* CreateMatrix() const;
232 virtual void cd(Int_t idiv);
233 virtual TGeoNode *FindNode(Double_t *point, const Double_t *dir=0);
234 virtual Int_t GetDivAxis() {return 1;}
235 virtual Bool_t IsOnBoundary(const Double_t *point) const;
236 virtual
238 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
239 virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const;
240
241 ClassDef(TGeoPatternParaX, 1) // Para X division pattern
242};
243
244////////////////////////////////////////////////////////////////////////////
245// //
246// TGeoPatternParaY - a Y axis divison pattern for PARA shapes //
247// //
248////////////////////////////////////////////////////////////////////////////
249
251{
252private :
253// data members
254 Double_t fTxy = 0.; // tangent of alpha
255public:
256 // constructors
258 TGeoPatternParaY(TGeoVolume *vol, Int_t ndivisions);
259 TGeoPatternParaY(TGeoVolume *vol, Int_t ndivisions, Double_t step);
260 TGeoPatternParaY(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
263
264 // destructor
265 virtual ~TGeoPatternParaY();
266 // methods
267 virtual TGeoMatrix* CreateMatrix() const;
268 virtual void cd(Int_t idiv);
269 virtual TGeoNode *FindNode(Double_t *point, const Double_t *dir=0);
270 virtual Int_t GetDivAxis() {return 2;}
271 virtual Bool_t IsOnBoundary(const Double_t *point) const;
272 virtual
274 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
275 virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const;
276
277 ClassDef(TGeoPatternParaY, 1) // Para Y division pattern
278};
279
280////////////////////////////////////////////////////////////////////////////
281// //
282// TGeoPatternParaZ - a Z axis divison pattern for PARA shapes //
283// //
284////////////////////////////////////////////////////////////////////////////
285
287{
288private :
289// data members
290 Double_t fTxz = 0.; // tangent of alpha xz
291 Double_t fTyz = 0.; // tangent of alpha yz
292public:
293 // constructors
295 TGeoPatternParaZ(TGeoVolume *vol, Int_t ndivisions);
296 TGeoPatternParaZ(TGeoVolume *vol, Int_t ndivisions, Double_t step);
297 TGeoPatternParaZ(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
300
301 // destructor
302 virtual ~TGeoPatternParaZ();
303 // methods
304 virtual TGeoMatrix* CreateMatrix() const;
305 virtual void cd(Int_t idiv);
306 virtual TGeoNode *FindNode(Double_t *point, const Double_t *dir=0);
307 virtual Int_t GetDivAxis() {return 3;}
308 virtual Bool_t IsOnBoundary(const Double_t *point) const;
309 virtual
311 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
312 virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const;
313
314 ClassDef(TGeoPatternParaZ, 1) // Para Z division pattern
315};
316
317////////////////////////////////////////////////////////////////////////////
318// //
319// TGeoPatternTrapZ - a Z axis divison pattern for TRAP or GTRA shapes //
320// //
321////////////////////////////////////////////////////////////////////////////
322
324{
325private :
326// data members
327 Double_t fTxz = 0.; // tangent of alpha xz
328 Double_t fTyz = 0.; // tangent of alpha yz
329public:
330 // constructors
332 TGeoPatternTrapZ(TGeoVolume *vol, Int_t ndivisions);
333 TGeoPatternTrapZ(TGeoVolume *vol, Int_t ndivisions, Double_t step);
334 TGeoPatternTrapZ(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
337
338 // destructor
339 virtual ~TGeoPatternTrapZ();
340 // methods
341 virtual TGeoMatrix* CreateMatrix() const;
342 Double_t GetTxz() const {return fTxz;}
343 Double_t GetTyz() const {return fTyz;}
344 virtual void cd(Int_t idiv);
345 virtual TGeoNode *FindNode(Double_t *point, const Double_t *dir=0);
346 virtual Int_t GetDivAxis() {return 3;}
347 virtual Bool_t IsOnBoundary(const Double_t *point) const;
348 virtual
350 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
351 virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const;
352
353 ClassDef(TGeoPatternTrapZ, 1) // Trap od Gtra Z division pattern
354};
355
356
357////////////////////////////////////////////////////////////////////////////
358// //
359// TGeoPatternCylR - a cylindrical R divison pattern //
360// //
361////////////////////////////////////////////////////////////////////////////
362
364{
365public:
366 // constructors
368 TGeoPatternCylR(TGeoVolume *vol, Int_t ndivisions);
369 TGeoPatternCylR(TGeoVolume *vol, Int_t ndivisions, Double_t step);
370 TGeoPatternCylR(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
373 // destructor
374 virtual ~TGeoPatternCylR();
375 // methods
376 virtual TGeoMatrix* CreateMatrix() const;
377 virtual void cd(Int_t idiv);
378 virtual TGeoNode *FindNode(Double_t *point, const Double_t *dir=0);
379 virtual Int_t GetDivAxis() {return 1;}
380 virtual Bool_t IsOnBoundary(const Double_t *point) const;
381 virtual
383 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
384 virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const;
385
386 ClassDef(TGeoPatternCylR, 1) // Cylindrical R division pattern
387};
388
389////////////////////////////////////////////////////////////////////////////
390// //
391// TGeoPatternCylPhi - a cylindrical phi divison pattern //
392// //
393////////////////////////////////////////////////////////////////////////////
394
396{
397private :
398// data members
399 Double_t *fSinCos = nullptr; //![2*fNdivisions] table of sines/cosines
400
401protected:
405 {if(this!=&pfc) {TGeoPatternFinder::operator=(pfc); fSinCos=pfc.fSinCos; CreateThreadData(1);}
406 return *this;}
407
408public:
409 // constructors
411 TGeoPatternCylPhi(TGeoVolume *vol, Int_t ndivisions);
412 TGeoPatternCylPhi(TGeoVolume *vol, Int_t ndivisions, Double_t step);
413 TGeoPatternCylPhi(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
414 // destructor
415 virtual ~TGeoPatternCylPhi();
416 // methods
417 virtual TGeoMatrix* CreateMatrix() const;
418 virtual void cd(Int_t idiv);
419 virtual TGeoNode *FindNode(Double_t *point, const Double_t *dir=0);
420 virtual Int_t GetDivAxis() {return 2;}
421 virtual Bool_t IsOnBoundary(const Double_t *point) const;
422 virtual
424 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
425 virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const;
426
427 ClassDef(TGeoPatternCylPhi, 1) // Cylindrical phi division pattern
428};
429
430////////////////////////////////////////////////////////////////////////////
431// //
432// TGeoPatternSphR - a spherical R divison pattern //
433// //
434////////////////////////////////////////////////////////////////////////////
435
437{
438public:
439 // constructors
441 TGeoPatternSphR(TGeoVolume *vol, Int_t ndivisions);
442 TGeoPatternSphR(TGeoVolume *vol, Int_t ndivisions, Double_t step);
443 TGeoPatternSphR(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
446 // destructor
447 virtual ~TGeoPatternSphR();
448 // methods
449 virtual TGeoMatrix* CreateMatrix() const;
450 virtual void cd(Int_t idiv);
451 virtual TGeoNode *FindNode(Double_t *point, const Double_t *dir=0);
452 virtual Int_t GetDivAxis() {return 1;}
453 virtual
455 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
456 virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const;
457
458 ClassDef(TGeoPatternSphR, 1) // spherical R division pattern
459};
460
461////////////////////////////////////////////////////////////////////////////
462// //
463// TGeoPatternSphTheta - a spherical theta divison pattern //
464// //
465////////////////////////////////////////////////////////////////////////////
466
468{
469public:
470 // constructors
472 TGeoPatternSphTheta(TGeoVolume *vol, Int_t ndivisions);
473 TGeoPatternSphTheta(TGeoVolume *vol, Int_t ndivisions, Double_t step);
474 TGeoPatternSphTheta(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
477 // destructor
478 virtual ~TGeoPatternSphTheta();
479 // methods
480 virtual TGeoMatrix* CreateMatrix() const;
481 virtual void cd(Int_t idiv);
482 virtual TGeoNode *FindNode(Double_t *point, const Double_t *dir=0);
483 virtual Int_t GetDivAxis() {return 3;}
484 virtual
486 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
487 virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const;
488
489 ClassDef(TGeoPatternSphTheta, 1) // spherical theta division pattern
490};
491
492////////////////////////////////////////////////////////////////////////////
493// //
494// TGeoPatternSphPhi - a spherical phi divison pattern //
495// //
496////////////////////////////////////////////////////////////////////////////
497
499{
500private:
501 Double_t *fSinCos = nullptr; //! Sincos table
502
503protected:
504 TGeoPatternSphPhi(const TGeoPatternSphPhi& pfc); // Not implemented
505 TGeoPatternSphPhi& operator=(const TGeoPatternSphPhi& pfc); // Not implemented
507public:
508 // constructors
510 TGeoPatternSphPhi(TGeoVolume *vol, Int_t ndivisions);
511 TGeoPatternSphPhi(TGeoVolume *vol, Int_t ndivisions, Double_t step);
512 TGeoPatternSphPhi(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
513 // destructor
514 virtual ~TGeoPatternSphPhi();
515 // methods
516 virtual TGeoMatrix* CreateMatrix() const;
517 virtual void cd(Int_t idiv);
518 virtual TGeoNode *FindNode(Double_t *point, const Double_t *dir=0);
519 virtual Int_t GetDivAxis() {return 2;}
520 virtual Bool_t IsOnBoundary(const Double_t *point) const;
521 virtual
523 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
524 virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const;
525
526 ClassDef(TGeoPatternSphPhi, 1) // Spherical phi division pattern
527};
528
529////////////////////////////////////////////////////////////////////////////
530// //
531// TGeoPatternHoneycomb - a divison pattern specialized for honeycombs //
532// //
533////////////////////////////////////////////////////////////////////////////
534
536{
537private :
538// data members
539 Int_t fNrows; // number of rows
540 Int_t fAxisOnRows; // axis along each row
541 Int_t *fNdivisions; // [fNrows] number of divisions for each row
542 Double_t *fStart; // [fNrows] starting points for each row
543
544protected:
547
548public:
549 // constructors
552 // destructor
553 virtual ~TGeoPatternHoneycomb();
554 // methods
556 virtual TGeoMatrix* CreateMatrix() const;
557 virtual void cd(Int_t idiv);
558 virtual TGeoNode *FindNode(Double_t *point, const Double_t *dir=0);
559 virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const;
560
561 ClassDef(TGeoPatternHoneycomb, 1) // pattern for honeycomb divisions
562};
563
564#endif
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
const Bool_t kTRUE
Definition: RtypesCore.h:87
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:326
#define BIT(n)
Definition: Rtypes.h:83
Matrix class used for computing global transformations Should NOT be used for node definition.
Definition: TGeoMatrix.h:421
Geometrical transformation package.
Definition: TGeoMatrix.h:41
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
Definition: TGeoNode.h:41
TGeoPatternCylPhi()
Default constructor.
virtual void cd(Int_t idiv)
Update current division index and global matrix to point to a given slice.
TGeoPatternCylPhi(const TGeoPatternCylPhi &pfc)
[2*fNdivisions] table of sines/cosines
virtual TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE)
Make a copy of this finder. Reflect by Z if required.
virtual ~TGeoPatternCylPhi()
Destructor.
virtual Bool_t IsOnBoundary(const Double_t *point) const
Checks if the current point is on division boundary.
virtual TGeoNode * FindNode(Double_t *point, const Double_t *dir=0)
find the node containing the query point
virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const
Fills external matrix with the local one corresponding to the given division index.
virtual Int_t GetDivAxis()
virtual TGeoMatrix * CreateMatrix() const
Return new matrix of type used by this finder.
TGeoPatternCylPhi & operator=(const TGeoPatternCylPhi &pfc)
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual void cd(Int_t idiv)
Update current division index and global matrix to point to a given slice.
virtual TGeoNode * FindNode(Double_t *point, const Double_t *dir=0)
find the node containing the query point
TGeoPatternCylR()
Default constructor.
virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const
Fills external matrix with the local one corresponding to the given division index.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual TGeoMatrix * CreateMatrix() const
Return new matrix of type used by this finder.
virtual Int_t GetDivAxis()
virtual ~TGeoPatternCylR()
Destructor.
TGeoPatternCylR & operator=(const TGeoPatternCylR &)
assignment operator
virtual Bool_t IsOnBoundary(const Double_t *point) const
Checks if the current point is on division boundary.
virtual TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE)
Make a copy of this finder. Reflect by Z if required.
Base finder class for patterns.
ThreadData_t & GetThreadData() const
virtual void cd(Int_t)
void Reflect(Bool_t flag=kTRUE)
TGeoVolume * fVolume
virtual TGeoNode * CdNext()
Make next node (if any) current.
void SetSpacedOut(Bool_t flag)
void SetDivIndex(Int_t index)
virtual TGeoMatrix * GetMatrix()
Return current matrix.
void SetRange(Double_t start, Double_t step, Int_t ndivisions)
Set division range. Use this method only when dividing an assembly.
virtual void UpdateMatrix(Int_t, TGeoHMatrix &) const
Int_t fThreadSize
Vector of thread private transient data.
TGeoPatternFinder & operator=(const TGeoPatternFinder &)
assignment operator
void SetNext(Int_t index)
Set index of next division.
virtual TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE)=0
virtual Int_t GetDivAxis()
virtual Bool_t IsOnBoundary(const Double_t *) const
Int_t GetNdiv() const
TGeoVolume * GetVolume() const
virtual TGeoNode * FindNode(Double_t *, const Double_t *=0)
Bool_t IsReflected() const
void SetVolume(TGeoVolume *vol)
Double_t GetStep() const
std::vector< ThreadData_t * > fThreadData
Int_t GetCurrent()
Return current index.
void ClearThreadData() const
Bool_t IsSpacedOut() const
Double_t GetStart() const
TGeoPatternFinder()
Default constructor.
Int_t GetNext() const
Get index of next division.
virtual Int_t GetByteCount() const
virtual ~TGeoPatternFinder()
Destructor.
std::mutex fMutex
Size of the thread vector.
Double_t GetEnd() const
TGeoNode * GetNodeOffset(Int_t idiv)
void CreateThreadData(Int_t nthreads)
Create thread data for n threads max.
virtual TGeoMatrix * CreateMatrix() const =0
virtual void cd(Int_t idiv)
Update current division index and global matrix to point to a given slice.
virtual ~TGeoPatternHoneycomb()
destructor
virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const
Fills external matrix with the local one corresponding to the given division index.
TGeoPatternFinder * MakeCopy(Bool_t)
TGeoPatternHoneycomb()
Default constructor.
virtual TGeoNode * FindNode(Double_t *point, const Double_t *dir=0)
find the node containing the query point
TGeoPatternHoneycomb & operator=(const TGeoPatternHoneycomb &)
assignment operator
virtual TGeoMatrix * CreateMatrix() const
Return new matrix of type used by this finder.
virtual TGeoNode * FindNode(Double_t *point, const Double_t *dir=0)
get the node division containing the query point
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual Bool_t IsOnBoundary(const Double_t *point) const
Checks if the current point is on division boundary.
virtual TGeoMatrix * CreateMatrix() const
Return new matrix of type used by this finder.
virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const
Fills external matrix with the local one corresponding to the given division index.
TGeoPatternParaX()
Default constructor.
virtual ~TGeoPatternParaX()
Destructor.
virtual void cd(Int_t idiv)
Update current division index and global matrix to point to a given slice.
TGeoPatternParaX & operator=(const TGeoPatternParaX &)
assignment operator
virtual Int_t GetDivAxis()
virtual TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE)
Make a copy of this finder. Reflect by Z if required.
virtual void cd(Int_t idiv)
Update current division index and global matrix to point to a given slice.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual Bool_t IsOnBoundary(const Double_t *point) const
Checks if the current point is on division boundary.
virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const
Fills external matrix with the local one corresponding to the given division index.
virtual ~TGeoPatternParaY()
Destructor.
virtual Int_t GetDivAxis()
virtual TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE)
Make a copy of this finder. Reflect by Z if required.
TGeoPatternParaY()
Default constructor.
TGeoPatternParaY & operator=(const TGeoPatternParaY &)
assignment operator
virtual TGeoMatrix * CreateMatrix() const
Return new matrix of type used by this finder.
virtual TGeoNode * FindNode(Double_t *point, const Double_t *dir=0)
get the node division containing the query point
virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const
Fills external matrix with the local one corresponding to the given division index.
virtual Int_t GetDivAxis()
virtual TGeoNode * FindNode(Double_t *point, const Double_t *dir=0)
get the node division containing the query point
virtual TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE)
Make a copy of this finder. Reflect by Z if required.
virtual void cd(Int_t idiv)
Update current division index and global matrix to point to a given slice.
TGeoPatternParaZ & operator=(const TGeoPatternParaZ &)
assignment operator
virtual ~TGeoPatternParaZ()
Destructor.
virtual Bool_t IsOnBoundary(const Double_t *point) const
Checks if the current point is on division boundary.
TGeoPatternParaZ()
Default constructor.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual TGeoMatrix * CreateMatrix() const
Return new matrix of type used by this finder.
TGeoPatternSphPhi()
Default constructor.
virtual void cd(Int_t idiv)
Update current division index and global matrix to point to a given slice.
virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const
Fills external matrix with the local one corresponding to the given division index.
virtual ~TGeoPatternSphPhi()
Destructor.
virtual TGeoNode * FindNode(Double_t *point, const Double_t *dir=0)
find the node containing the query point
TGeoPatternSphPhi & operator=(const TGeoPatternSphPhi &pfc)
TGeoPatternSphPhi(const TGeoPatternSphPhi &pfc)
Sincos table.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual Bool_t IsOnBoundary(const Double_t *point) const
Checks if the current point is on division boundary.
virtual TGeoMatrix * CreateMatrix() const
Return new matrix of type used by this finder.
Double_t * CreateSinCos()
Create the sincos table if it does not exist.
virtual TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE)
Make a copy of this finder. Reflect by Z if required.
virtual Int_t GetDivAxis()
virtual void cd(Int_t idiv)
Update current division index and global matrix to point to a given slice.
TGeoPatternSphR()
Default constructor.
virtual ~TGeoPatternSphR()
Destructor.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
TGeoPatternSphR & operator=(const TGeoPatternSphR &)
assignment operator
virtual TGeoNode * FindNode(Double_t *point, const Double_t *dir=0)
find the node containing the query point
virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const
Fills external matrix with the local one corresponding to the given division index.
virtual TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE)
Make a copy of this finder. Reflect by Z if required.
virtual Int_t GetDivAxis()
virtual TGeoMatrix * CreateMatrix() const
Return new matrix of type used by this finder.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
TGeoPatternSphTheta()
Default constructor.
virtual void cd(Int_t idiv)
Update current division index and global matrix to point to a given slice.
virtual Int_t GetDivAxis()
virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const
Fills external matrix with the local one corresponding to the given division index.
virtual ~TGeoPatternSphTheta()
Destructor.
TGeoPatternSphTheta & operator=(const TGeoPatternSphTheta &)
assignment operator
virtual TGeoMatrix * CreateMatrix() const
Return new matrix of type used by this finder.
virtual TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE)
Make a copy of this finder. Reflect by Z if required.
virtual TGeoNode * FindNode(Double_t *point, const Double_t *dir=0)
find the node containing the query point
Double_t GetTxz() const
Double_t GetTyz() const
virtual TGeoNode * FindNode(Double_t *point, const Double_t *dir=0)
get the node division containing the query point
virtual Int_t GetDivAxis()
TGeoPatternTrapZ()
Default constructor.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual Bool_t IsOnBoundary(const Double_t *point) const
Checks if the current point is on division boundary.
virtual TGeoMatrix * CreateMatrix() const
Return new matrix of type used by this finder.
virtual ~TGeoPatternTrapZ()
Destructor.
virtual void cd(Int_t idiv)
Update current division index and global matrix to point to a given slice.
TGeoPatternTrapZ & operator=(const TGeoPatternTrapZ &)
assignment operator
virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const
Fills external matrix with the local one corresponding to the given division index.
virtual TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE)
Make a copy of this finder. Reflect by Z if required.
TGeoPatternX & operator=(const TGeoPatternX &)
assignment operator
virtual void cd(Int_t idiv)
Update current division index and global matrix to point to a given slice.
virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const
Fills external matrix with the local one corresponding to the given division index.
virtual TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE)
Make a copy of this finder. Reflect by Z if required.
virtual Double_t FindNextBoundary(Double_t *point, Double_t *dir, Int_t &indnext)
Compute distance to next division layer returning the index of next section.
TGeoPatternX()
Default constructor.
virtual Bool_t IsOnBoundary(const Double_t *point) const
Checks if the current point is on division boundary.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual TGeoMatrix * CreateMatrix() const
Return new matrix of type used by this finder.
virtual Int_t GetDivAxis()
virtual TGeoNode * FindNode(Double_t *point, const Double_t *dir=0)
Find the cell corresponding to point and next cell along dir (if asked)
virtual ~TGeoPatternX()
Destructor.
virtual TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE)
Make a copy of this finder. Reflect by Z if required.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual Bool_t IsOnBoundary(const Double_t *point) const
Checks if the current point is on division boundary.
virtual TGeoNode * FindNode(Double_t *point, const Double_t *dir=0)
Find the cell corresponding to point and next cell along dir (if asked)
TGeoPatternY & operator=(const TGeoPatternY &)
assignment operator
virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const
Fills external matrix with the local one corresponding to the given division index.
virtual void cd(Int_t idiv)
Update current division index and global matrix to point to a given slice.
virtual ~TGeoPatternY()
Destructor.
TGeoPatternY()
Default constructor.
virtual Int_t GetDivAxis()
virtual Double_t FindNextBoundary(Double_t *point, Double_t *dir, Int_t &indnext)
Compute distance to next division layer returning the index of next section.
virtual TGeoMatrix * CreateMatrix() const
Return new matrix of type used by this finder.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual Double_t FindNextBoundary(Double_t *point, Double_t *dir, Int_t &indnext)
Compute distance to next division layer returning the index of next section.
virtual TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE)
Make a copy of this finder. Reflect by Z if required.
TGeoPatternZ()
Default constructor.
virtual Bool_t IsOnBoundary(const Double_t *point) const
Checks if the current point is on division boundary.
virtual ~TGeoPatternZ()
Destructor.
TGeoPatternZ & operator=(const TGeoPatternZ &)
assignment operator
virtual TGeoNode * FindNode(Double_t *point, const Double_t *dir=0)
Find the cell corresponding to point and next cell along dir (if asked)
virtual void cd(Int_t idiv)
Update current division index and global matrix to point to a given slice.
virtual void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const
Fills external matrix with the local one corresponding to the given division index.
virtual Int_t GetDivAxis()
virtual TGeoMatrix * CreateMatrix() const
Return new matrix of type used by this finder.
Class describing translations.
Definition: TGeoMatrix.h:122
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition: TGeoVolume.h:47
TGeoNode * GetNode(const char *name) const
get the pointer to a daughter node
Mother of all ROOT objects.
Definition: TObject.h:37
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition: TObject.h:172
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition: TObject.cxx:694
Int_t fNextIndex
current division element
ThreadData_t & operator=(const ThreadData_t &)
ThreadData_t(const ThreadData_t &)