Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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 "TObject.h"
16
17#include <mutex>
18#include <vector>
19
20#include "TGeoVolume.h"
21
22class TGeoMatrix;
23
24/////////////////////////////////////////////////////////////////////////////////
25// //
26// TGeoPatternFinder - base finder class for patterns. A pattern is specifying //
27// a division type //
28// //
29/////////////////////////////////////////////////////////////////////////////////
30
31class TGeoPatternFinder : public TObject {
32public:
33 struct ThreadData_t {
34 TGeoMatrix *fMatrix; //! generic matrix
35 Int_t fCurrent; //! current division element
36 Int_t fNextIndex; //! index of next node
37
40
41 private:
42 ThreadData_t(const ThreadData_t &) = delete;
44 };
46 void ClearThreadData() const;
47 void CreateThreadData(Int_t nthreads);
48
49protected:
51 Double_t fStep; // division step length
52 Double_t fStart; // starting point on divided axis
53 Double_t fEnd; // ending point
54 Int_t fNdivisions; // number of divisions
55 Int_t fDivIndex; // index of first div. node
56 TGeoVolume *fVolume; // volume to which applies
57
58 mutable std::vector<ThreadData_t *> fThreadData; //! Vector of thread private transient data
59 mutable Int_t fThreadSize; //! Size of the thread vector
60 mutable std::mutex fMutex; //! Mutex for thread data
61
62protected:
65
66public:
67 // constructors
70 // destructor
71 ~TGeoPatternFinder() override;
72 // methods
73 virtual TGeoMatrix *CreateMatrix() const = 0;
74 virtual void cd(Int_t /*idiv*/) {}
75 virtual TGeoNode *CdNext();
76 virtual TGeoNode *FindNode(Double_t * /*point*/, const Double_t * /*dir*/ = nullptr) { return nullptr; }
77 virtual Int_t GetByteCount() const { return 36; }
78 Int_t GetCurrent(); // {return fCurrent;}
80 virtual Int_t GetDivAxis() { return 1; }
81 virtual TGeoMatrix *GetMatrix(); // {return fMatrix;}
82 Int_t GetNdiv() const { return fNdivisions; }
83 Int_t GetNext() const; // {return fNextIndex;}
85 Double_t GetStart() const { return fStart; }
86 Double_t GetStep() const { return fStep; }
87 Double_t GetEnd() const { return fEnd; }
88 TGeoVolume *GetVolume() const { return fVolume; }
89 virtual Bool_t IsOnBoundary(const Double_t * /*point*/) const { return kFALSE; }
92 virtual TGeoPatternFinder *MakeCopy(Bool_t reflect = kFALSE) = 0;
95 void SetNext(Int_t index); // {fNextIndex = index;}
96 void SetRange(Double_t start, Double_t step, Int_t ndivisions);
98 void SetVolume(TGeoVolume *vol) { fVolume = vol; }
99 virtual void UpdateMatrix(Int_t, TGeoHMatrix &) const {}
100
101 ClassDefOverride(TGeoPatternFinder, 4) // patterns to divide volumes
102};
103
104////////////////////////////////////////////////////////////////////////////
105// //
106// TGeoPatternX - a X axis divison pattern //
107// //
108////////////////////////////////////////////////////////////////////////////
109
110class TGeoTranslation;
111
113public:
114 // constructors
115 TGeoPatternX();
116 TGeoPatternX(TGeoVolume *vol, Int_t ndivisions);
117 TGeoPatternX(TGeoVolume *vol, Int_t ndivisions, Double_t step);
118 TGeoPatternX(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
119 TGeoPatternX(const TGeoPatternX &pf);
121
122 // destructor
123 ~TGeoPatternX() override;
124 // methods
125 TGeoMatrix *CreateMatrix() const override;
126 void cd(Int_t idiv) override;
127 TGeoNode *FindNode(Double_t *point, const Double_t *dir = nullptr) override;
128 virtual Double_t FindNextBoundary(Double_t *point, Double_t *dir, Int_t &indnext);
129 Int_t GetDivAxis() override { return 1; }
130 Bool_t IsOnBoundary(const Double_t *point) const override;
131
132 TGeoPatternFinder *MakeCopy(Bool_t reflect = kFALSE) override;
133 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
134 void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override;
135
136 ClassDefOverride(TGeoPatternX, 1) // X division pattern
137};
138
139////////////////////////////////////////////////////////////////////////////
140// //
141// TGeoPatternY - a Y axis divison pattern //
142// //
143////////////////////////////////////////////////////////////////////////////
144
146public:
147 // constructors
148 TGeoPatternY();
149 TGeoPatternY(TGeoVolume *vol, Int_t ndivisions);
150 TGeoPatternY(TGeoVolume *vol, Int_t ndivisions, Double_t step);
151 TGeoPatternY(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
152 TGeoPatternY(const TGeoPatternY &pf);
154 // destructor
155 ~TGeoPatternY() override;
156 // methods
157 TGeoMatrix *CreateMatrix() const override;
158 void cd(Int_t idiv) override;
159 TGeoNode *FindNode(Double_t *point, const Double_t *dir = nullptr) override;
160 virtual Double_t FindNextBoundary(Double_t *point, Double_t *dir, Int_t &indnext);
161 Int_t GetDivAxis() override { return 2; }
162 Bool_t IsOnBoundary(const Double_t *point) const override;
163
164 TGeoPatternFinder *MakeCopy(Bool_t reflect = kFALSE) override;
165 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
166 void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override;
167
168 ClassDefOverride(TGeoPatternY, 1) // Y division pattern
169};
170
171////////////////////////////////////////////////////////////////////////////
172// //
173// TGeoPatternZ - a Z axis divison pattern //
174// //
175////////////////////////////////////////////////////////////////////////////
176
178public:
179 // constructors
180 TGeoPatternZ();
181 TGeoPatternZ(TGeoVolume *vol, Int_t ndivisions);
182 TGeoPatternZ(TGeoVolume *vol, Int_t ndivisions, Double_t step);
183 TGeoPatternZ(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
184 TGeoPatternZ(const TGeoPatternZ &pf);
186 // destructor
187 ~TGeoPatternZ() override;
188 // methods
189 TGeoMatrix *CreateMatrix() const override;
190 void cd(Int_t idiv) override;
191 TGeoNode *FindNode(Double_t *point, const Double_t *dir = nullptr) override;
192 virtual Double_t FindNextBoundary(Double_t *point, Double_t *dir, Int_t &indnext);
193 Int_t GetDivAxis() override { return 3; }
194 Bool_t IsOnBoundary(const Double_t *point) const override;
195
196 TGeoPatternFinder *MakeCopy(Bool_t reflect = kFALSE) override;
197 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
198 void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override;
199
200 ClassDefOverride(TGeoPatternZ, 1) // Z division pattern
201};
202
203////////////////////////////////////////////////////////////////////////////
204// //
205// TGeoPatternParaX - a X axis divison pattern for PARA shapes //
206// //
207////////////////////////////////////////////////////////////////////////////
208
210public:
211 // constructors
213 TGeoPatternParaX(TGeoVolume *vol, Int_t ndivisions);
214 TGeoPatternParaX(TGeoVolume *vol, Int_t ndivisions, Double_t step);
215 TGeoPatternParaX(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
218
219 // destructor
220 ~TGeoPatternParaX() override;
221 // methods
222 TGeoMatrix *CreateMatrix() const override;
223 void cd(Int_t idiv) override;
224 TGeoNode *FindNode(Double_t *point, const Double_t *dir = nullptr) override;
225 Int_t GetDivAxis() override { return 1; }
226 Bool_t IsOnBoundary(const Double_t *point) const override;
227
228 TGeoPatternFinder *MakeCopy(Bool_t reflect = kFALSE) override;
229 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
230 void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override;
231
232 ClassDefOverride(TGeoPatternParaX, 1) // Para X division pattern
233};
234
235////////////////////////////////////////////////////////////////////////////
236// //
237// TGeoPatternParaY - a Y axis divison pattern for PARA shapes //
238// //
239////////////////////////////////////////////////////////////////////////////
240
242private:
243 // data members
244 Double_t fTxy = 0.; // tangent of alpha
245public:
246 // constructors
248 TGeoPatternParaY(TGeoVolume *vol, Int_t ndivisions);
249 TGeoPatternParaY(TGeoVolume *vol, Int_t ndivisions, Double_t step);
250 TGeoPatternParaY(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
253
254 // destructor
255 ~TGeoPatternParaY() override;
256 // methods
257 TGeoMatrix *CreateMatrix() const override;
258 void cd(Int_t idiv) override;
259 TGeoNode *FindNode(Double_t *point, const Double_t *dir = nullptr) override;
260 Int_t GetDivAxis() override { return 2; }
261 Bool_t IsOnBoundary(const Double_t *point) const override;
262
263 TGeoPatternFinder *MakeCopy(Bool_t reflect = kFALSE) override;
264 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
265 void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override;
266
267 ClassDefOverride(TGeoPatternParaY, 1) // Para Y division pattern
268};
269
270////////////////////////////////////////////////////////////////////////////
271// //
272// TGeoPatternParaZ - a Z axis divison pattern for PARA shapes //
273// //
274////////////////////////////////////////////////////////////////////////////
275
277private:
278 // data members
279 Double_t fTxz = 0.; // tangent of alpha xz
280 Double_t fTyz = 0.; // tangent of alpha yz
281public:
282 // constructors
284 TGeoPatternParaZ(TGeoVolume *vol, Int_t ndivisions);
285 TGeoPatternParaZ(TGeoVolume *vol, Int_t ndivisions, Double_t step);
286 TGeoPatternParaZ(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
289
290 // destructor
291 ~TGeoPatternParaZ() override;
292 // methods
293 TGeoMatrix *CreateMatrix() const override;
294 void cd(Int_t idiv) override;
295 TGeoNode *FindNode(Double_t *point, const Double_t *dir = nullptr) override;
296 Int_t GetDivAxis() override { return 3; }
297 Bool_t IsOnBoundary(const Double_t *point) const override;
298
299 TGeoPatternFinder *MakeCopy(Bool_t reflect = kFALSE) override;
300 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
301 void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override;
302
303 ClassDefOverride(TGeoPatternParaZ, 1) // Para Z division pattern
304};
305
306////////////////////////////////////////////////////////////////////////////
307// //
308// TGeoPatternTrapZ - a Z axis divison pattern for TRAP or GTRA shapes //
309// //
310////////////////////////////////////////////////////////////////////////////
311
313private:
314 // data members
315 Double_t fTxz = 0.; // tangent of alpha xz
316 Double_t fTyz = 0.; // tangent of alpha yz
317public:
318 // constructors
320 TGeoPatternTrapZ(TGeoVolume *vol, Int_t ndivisions);
321 TGeoPatternTrapZ(TGeoVolume *vol, Int_t ndivisions, Double_t step);
322 TGeoPatternTrapZ(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
325
326 // destructor
327 ~TGeoPatternTrapZ() override;
328 // methods
329 TGeoMatrix *CreateMatrix() const override;
330 Double_t GetTxz() const { return fTxz; }
331 Double_t GetTyz() const { return fTyz; }
332 void cd(Int_t idiv) override;
333 TGeoNode *FindNode(Double_t *point, const Double_t *dir = nullptr) override;
334 Int_t GetDivAxis() override { return 3; }
335 Bool_t IsOnBoundary(const Double_t *point) const override;
336
337 TGeoPatternFinder *MakeCopy(Bool_t reflect = kFALSE) override;
338 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
339 void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override;
340
341 ClassDefOverride(TGeoPatternTrapZ, 1) // Trap od Gtra Z division pattern
342};
343
344////////////////////////////////////////////////////////////////////////////
345// //
346// TGeoPatternCylR - a cylindrical R divison pattern //
347// //
348////////////////////////////////////////////////////////////////////////////
349
351public:
352 // constructors
354 TGeoPatternCylR(TGeoVolume *vol, Int_t ndivisions);
355 TGeoPatternCylR(TGeoVolume *vol, Int_t ndivisions, Double_t step);
356 TGeoPatternCylR(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
359 // destructor
360 ~TGeoPatternCylR() override;
361 // methods
362 TGeoMatrix *CreateMatrix() const override;
363 void cd(Int_t idiv) override;
364 TGeoNode *FindNode(Double_t *point, const Double_t *dir = nullptr) override;
365 Int_t GetDivAxis() override { return 1; }
366 Bool_t IsOnBoundary(const Double_t *point) const override;
367
368 TGeoPatternFinder *MakeCopy(Bool_t reflect = kFALSE) override;
369 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
370 void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override;
371
372 ClassDefOverride(TGeoPatternCylR, 1) // Cylindrical R division pattern
373};
374
375////////////////////////////////////////////////////////////////////////////
376// //
377// TGeoPatternCylPhi - a cylindrical phi divison pattern //
378// //
379////////////////////////////////////////////////////////////////////////////
380
382private:
383 // data members
384 Double_t *fSinCos = nullptr; //![2*fNdivisions] table of sines/cosines
385
386protected:
388 {
390 }
392 {
393 if (this != &pfc) {
395 fSinCos = pfc.fSinCos;
397 }
398 return *this;
399 }
400
401public:
402 // constructors
404 TGeoPatternCylPhi(TGeoVolume *vol, Int_t ndivisions);
405 TGeoPatternCylPhi(TGeoVolume *vol, Int_t ndivisions, Double_t step);
406 TGeoPatternCylPhi(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
407 // destructor
408 ~TGeoPatternCylPhi() override;
409 // methods
410 TGeoMatrix *CreateMatrix() const override;
411 void cd(Int_t idiv) override;
412 TGeoNode *FindNode(Double_t *point, const Double_t *dir = nullptr) override;
413 Int_t GetDivAxis() override { return 2; }
414 Bool_t IsOnBoundary(const Double_t *point) const override;
415
416 TGeoPatternFinder *MakeCopy(Bool_t reflect = kFALSE) override;
417 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
418 void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override;
419
420 ClassDefOverride(TGeoPatternCylPhi, 1) // Cylindrical phi division pattern
421};
422
423////////////////////////////////////////////////////////////////////////////
424// //
425// TGeoPatternSphR - a spherical R divison pattern //
426// //
427////////////////////////////////////////////////////////////////////////////
428
430public:
431 // constructors
433 TGeoPatternSphR(TGeoVolume *vol, Int_t ndivisions);
434 TGeoPatternSphR(TGeoVolume *vol, Int_t ndivisions, Double_t step);
435 TGeoPatternSphR(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
438 // destructor
439 ~TGeoPatternSphR() override;
440 // methods
441 TGeoMatrix *CreateMatrix() const override;
442 void cd(Int_t idiv) override;
443 TGeoNode *FindNode(Double_t *point, const Double_t *dir = nullptr) override;
444 Int_t GetDivAxis() override { return 1; }
445
446 TGeoPatternFinder *MakeCopy(Bool_t reflect = kFALSE) override;
447 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
448 void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override;
449
450 ClassDefOverride(TGeoPatternSphR, 1) // spherical R division pattern
451};
452
453////////////////////////////////////////////////////////////////////////////
454// //
455// TGeoPatternSphTheta - a spherical theta divison pattern //
456// //
457////////////////////////////////////////////////////////////////////////////
458
460public:
461 // constructors
463 TGeoPatternSphTheta(TGeoVolume *vol, Int_t ndivisions);
464 TGeoPatternSphTheta(TGeoVolume *vol, Int_t ndivisions, Double_t step);
465 TGeoPatternSphTheta(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
468 // destructor
469 ~TGeoPatternSphTheta() override;
470 // methods
471 TGeoMatrix *CreateMatrix() const override;
472 void cd(Int_t idiv) override;
473 TGeoNode *FindNode(Double_t *point, const Double_t *dir = nullptr) override;
474 Int_t GetDivAxis() override { return 3; }
475
476 TGeoPatternFinder *MakeCopy(Bool_t reflect = kFALSE) override;
477 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
478 void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override;
479
480 ClassDefOverride(TGeoPatternSphTheta, 1) // spherical theta division pattern
481};
482
483////////////////////////////////////////////////////////////////////////////
484// //
485// TGeoPatternSphPhi - a spherical phi divison pattern //
486// //
487////////////////////////////////////////////////////////////////////////////
488
490private:
491 Double_t *fSinCos = nullptr; //! Sincos table
492
493protected:
497
498public:
499 // constructors
501 TGeoPatternSphPhi(TGeoVolume *vol, Int_t ndivisions);
502 TGeoPatternSphPhi(TGeoVolume *vol, Int_t ndivisions, Double_t step);
503 TGeoPatternSphPhi(TGeoVolume *vol, Int_t ndivisions, Double_t start, Double_t end);
504 // destructor
505 ~TGeoPatternSphPhi() override;
506 // methods
507 TGeoMatrix *CreateMatrix() const override;
508 void cd(Int_t idiv) override;
509 TGeoNode *FindNode(Double_t *point, const Double_t *dir = nullptr) override;
510 Int_t GetDivAxis() override { return 2; }
511 Bool_t IsOnBoundary(const Double_t *point) const override;
512
513 TGeoPatternFinder *MakeCopy(Bool_t reflect = kFALSE) override;
514 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
515 void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override;
516
517 ClassDefOverride(TGeoPatternSphPhi, 1) // Spherical phi division pattern
518};
519
520////////////////////////////////////////////////////////////////////////////
521// //
522// TGeoPatternHoneycomb - a divison pattern specialized for honeycombs //
523// //
524////////////////////////////////////////////////////////////////////////////
525
527private:
528 // data members
529 Int_t fNrows; // number of rows
530 Int_t fAxisOnRows; // axis along each row
531 Int_t *fNdivisions; // [fNrows] number of divisions for each row
532 Double_t *fStart; // [fNrows] starting points for each row
533
534protected:
537
538public:
539 // constructors
542 // destructor
543 ~TGeoPatternHoneycomb() override;
544 // methods
545 TGeoPatternFinder *MakeCopy(Bool_t) override { return nullptr; }
546 TGeoMatrix *CreateMatrix() const override;
547 void cd(Int_t idiv) override;
548 TGeoNode *FindNode(Double_t *point, const Double_t *dir = nullptr) override;
549 void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override;
550
551 ClassDefOverride(TGeoPatternHoneycomb, 1) // pattern for honeycomb divisions
552};
553
554#endif
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
double Double_t
Definition RtypesCore.h:59
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define BIT(n)
Definition Rtypes.h:85
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Matrix class used for computing global transformations Should NOT be used for node definition.
Definition TGeoMatrix.h:458
Geometrical transformation package.
Definition TGeoMatrix.h:38
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
Definition TGeoNode.h:39
TGeoPatternCylPhi()
Default constructor.
void cd(Int_t idiv) override
Update current division index and global matrix to point to a given slice.
TGeoPatternCylPhi(const TGeoPatternCylPhi &pfc)
[2*fNdivisions] table of sines/cosines
TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE) override
Make a copy of this finder. Reflect by Z if required.
TGeoNode * FindNode(Double_t *point, const Double_t *dir=nullptr) override
find the node containing the query point
Bool_t IsOnBoundary(const Double_t *point) const override
Checks if the current point is on division boundary.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
~TGeoPatternCylPhi() override
Destructor.
TGeoMatrix * CreateMatrix() const override
Return new matrix of type used by this finder.
void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override
Fills external matrix with the local one corresponding to the given division index.
Int_t GetDivAxis() override
TGeoPatternCylPhi & operator=(const TGeoPatternCylPhi &pfc)
Bool_t IsOnBoundary(const Double_t *point) const override
Checks if the current point is on division boundary.
TGeoMatrix * CreateMatrix() const override
Return new matrix of type used by this finder.
TGeoPatternCylR()
Default constructor.
TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE) override
Make a copy of this finder. Reflect by Z if required.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override
Fills external matrix with the local one corresponding to the given division index.
TGeoNode * FindNode(Double_t *point, const Double_t *dir=nullptr) override
find the node containing the query point
TGeoPatternCylR & operator=(const TGeoPatternCylR &)
assignment operator
Int_t GetDivAxis() override
~TGeoPatternCylR() override
Destructor.
void cd(Int_t idiv) override
Update current division index and global matrix to point to a given slice.
Base finder class for patterns.
ThreadData_t & GetThreadData() const
virtual void cd(Int_t)
void Reflect(Bool_t flag=kTRUE)
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 TGeoNode * FindNode(Double_t *, const Double_t *=nullptr)
virtual void UpdateMatrix(Int_t, TGeoHMatrix &) const
std::vector< ThreadData_t * > fThreadData
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()
~TGeoPatternFinder() override
Destructor.
virtual Bool_t IsOnBoundary(const Double_t *) const
Int_t GetNdiv() const
TGeoVolume * GetVolume() const
Bool_t IsReflected() const
void SetVolume(TGeoVolume *vol)
Double_t GetStep() const
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
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
TGeoMatrix * CreateMatrix() const override
Return new matrix of type used by this finder.
void cd(Int_t idiv) override
Update current division index and global matrix to point to a given slice.
TGeoPatternFinder * MakeCopy(Bool_t) override
TGeoPatternHoneycomb()
Default constructor.
void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override
Fills external matrix with the local one corresponding to the given division index.
~TGeoPatternHoneycomb() override
destructor
TGeoPatternHoneycomb & operator=(const TGeoPatternHoneycomb &)
assignment operator
TGeoNode * FindNode(Double_t *point, const Double_t *dir=nullptr) override
find the node containing the query point
~TGeoPatternParaX() override
Destructor.
TGeoMatrix * CreateMatrix() const override
Return new matrix of type used by this finder.
void cd(Int_t idiv) override
Update current division index and global matrix to point to a given slice.
Bool_t IsOnBoundary(const Double_t *point) const override
Checks if the current point is on division boundary.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
TGeoNode * FindNode(Double_t *point, const Double_t *dir=nullptr) override
get the node division containing the query point
TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE) override
Make a copy of this finder. Reflect by Z if required.
TGeoPatternParaX()
Default constructor.
void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override
Fills external matrix with the local one corresponding to the given division index.
Int_t GetDivAxis() override
TGeoPatternParaX & operator=(const TGeoPatternParaX &)
assignment operator
void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override
Fills external matrix with the local one corresponding to the given division index.
void cd(Int_t idiv) override
Update current division index and global matrix to point to a given slice.
Int_t GetDivAxis() override
~TGeoPatternParaY() override
Destructor.
Bool_t IsOnBoundary(const Double_t *point) const override
Checks if the current point is on division boundary.
TGeoMatrix * CreateMatrix() const override
Return new matrix of type used by this finder.
TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE) override
Make a copy of this finder. Reflect by Z if required.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
TGeoNode * FindNode(Double_t *point, const Double_t *dir=nullptr) override
get the node division containing the query point
TGeoPatternParaY()
Default constructor.
TGeoPatternParaY & operator=(const TGeoPatternParaY &)
assignment operator
TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE) override
Make a copy of this finder. Reflect by Z if required.
Bool_t IsOnBoundary(const Double_t *point) const override
Checks if the current point is on division boundary.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
TGeoMatrix * CreateMatrix() const override
Return new matrix of type used by this finder.
~TGeoPatternParaZ() override
Destructor.
void cd(Int_t idiv) override
Update current division index and global matrix to point to a given slice.
TGeoPatternParaZ & operator=(const TGeoPatternParaZ &)
assignment operator
Int_t GetDivAxis() override
void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override
Fills external matrix with the local one corresponding to the given division index.
TGeoNode * FindNode(Double_t *point, const Double_t *dir=nullptr) override
get the node division containing the query point
TGeoPatternParaZ()
Default constructor.
TGeoPatternSphPhi()
Default constructor.
TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE) override
Make a copy of this finder. Reflect by Z if required.
void cd(Int_t idiv) override
Update current division index and global matrix to point to a given slice.
TGeoMatrix * CreateMatrix() const override
Return new matrix of type used by this finder.
TGeoNode * FindNode(Double_t *point, const Double_t *dir=nullptr) override
find the node containing the query point
void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override
Fills external matrix with the local one corresponding to the given division index.
Int_t GetDivAxis() override
TGeoPatternSphPhi & operator=(const TGeoPatternSphPhi &pfc)=delete
~TGeoPatternSphPhi() override
Destructor.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
TGeoPatternSphPhi(const TGeoPatternSphPhi &pfc)=delete
Sincos table.
Double_t * CreateSinCos()
Create the sincos table if it does not exist.
Bool_t IsOnBoundary(const Double_t *point) const override
Checks if the current point is on division boundary.
Int_t GetDivAxis() override
~TGeoPatternSphR() override
Destructor.
TGeoPatternSphR()
Default constructor.
void cd(Int_t idiv) override
Update current division index and global matrix to point to a given slice.
TGeoMatrix * CreateMatrix() const override
Return new matrix of type used by this finder.
TGeoNode * FindNode(Double_t *point, const Double_t *dir=nullptr) override
find the node containing the query point
void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override
Fills external matrix with the local one corresponding to the given division index.
TGeoPatternSphR & operator=(const TGeoPatternSphR &)
assignment operator
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE) override
Make a copy of this finder. Reflect by Z if required.
TGeoNode * FindNode(Double_t *point, const Double_t *dir=nullptr) override
find the node containing the query point
~TGeoPatternSphTheta() override
Destructor.
void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override
Fills external matrix with the local one corresponding to the given division index.
TGeoPatternSphTheta()
Default constructor.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
void cd(Int_t idiv) override
Update current division index and global matrix to point to a given slice.
TGeoMatrix * CreateMatrix() const override
Return new matrix of type used by this finder.
TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE) override
Make a copy of this finder. Reflect by Z if required.
TGeoPatternSphTheta & operator=(const TGeoPatternSphTheta &)
assignment operator
Int_t GetDivAxis() override
TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE) override
Make a copy of this finder. Reflect by Z if required.
Double_t GetTxz() const
Double_t GetTyz() const
TGeoPatternTrapZ()
Default constructor.
TGeoNode * FindNode(Double_t *point, const Double_t *dir=nullptr) override
get the node division containing the query point
TGeoMatrix * CreateMatrix() const override
Return new matrix of type used by this finder.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
Bool_t IsOnBoundary(const Double_t *point) const override
Checks if the current point is on division boundary.
Int_t GetDivAxis() override
TGeoPatternTrapZ & operator=(const TGeoPatternTrapZ &)
assignment operator
void cd(Int_t idiv) override
Update current division index and global matrix to point to a given slice.
void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override
Fills external matrix with the local one corresponding to the given division index.
~TGeoPatternTrapZ() override
Destructor.
TGeoPatternX & operator=(const TGeoPatternX &)
assignment operator
~TGeoPatternX() override
Destructor.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE) override
Make a copy of this finder. Reflect by Z if required.
void cd(Int_t idiv) override
Update current division index and global matrix to point to a given slice.
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.
TGeoMatrix * CreateMatrix() const override
Return new matrix of type used by this finder.
Int_t GetDivAxis() override
void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override
Fills external matrix with the local one corresponding to the given division index.
Bool_t IsOnBoundary(const Double_t *point) const override
Checks if the current point is on division boundary.
TGeoNode * FindNode(Double_t *point, const Double_t *dir=nullptr) override
Find the cell corresponding to point and next cell along dir (if asked)
TGeoNode * FindNode(Double_t *point, const Double_t *dir=nullptr) override
Find the cell corresponding to point and next cell along dir (if asked)
void cd(Int_t idiv) override
Update current division index and global matrix to point to a given slice.
TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE) override
Make a copy of this finder. Reflect by Z if required.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override
Fills external matrix with the local one corresponding to the given division index.
TGeoPatternY & operator=(const TGeoPatternY &)
assignment operator
Int_t GetDivAxis() override
TGeoMatrix * CreateMatrix() const override
Return new matrix of type used by this finder.
Bool_t IsOnBoundary(const Double_t *point) const override
Checks if the current point is on division boundary.
~TGeoPatternY() override
Destructor.
TGeoPatternY()
Default constructor.
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.
void cd(Int_t idiv) override
Update current division index and global matrix to point to a given slice.
TGeoMatrix * CreateMatrix() const override
Return new matrix of type used by this finder.
TGeoNode * FindNode(Double_t *point, const Double_t *dir=nullptr) override
Find the cell corresponding to point and next cell along dir (if asked)
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.
TGeoPatternZ()
Default constructor.
~TGeoPatternZ() override
Destructor.
Int_t GetDivAxis() override
TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE) override
Make a copy of this finder. Reflect by Z if required.
TGeoPatternZ & operator=(const TGeoPatternZ &)
assignment operator
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
Bool_t IsOnBoundary(const Double_t *point) const override
Checks if the current point is on division boundary.
void UpdateMatrix(Int_t idiv, TGeoHMatrix &matrix) const override
Fills external matrix with the local one corresponding to the given division index.
Class describing translations.
Definition TGeoMatrix.h:116
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition TGeoVolume.h:43
TGeoNode * GetNode(const char *name) const
get the pointer to a daughter node
Mother of all ROOT objects.
Definition TObject.h:41
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition TObject.h:199
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition TObject.cxx:780
ThreadData_t(const ThreadData_t &)=delete
Int_t fNextIndex
current division element
ThreadData_t & operator=(const ThreadData_t &)=delete