65 std::lock_guard<std::mutex> guard(
fMutex);
66 std::vector<ThreadData_t *>::iterator i =
fThreadData.begin();
80 std::lock_guard<std::mutex> guard(
fMutex);
83 for (
Int_t tid = 0; tid < nthreads; tid++) {
233 fStep = 2 * dx / ndivisions;
373 Error(
"FindNextBoundary",
"Must call FindNode first");
376 Int_t inc = (dir[0] > 0) ? 1 : 0;
379 Error(
"FindNextBoundary",
"Negative distance d=%g", dist);
427 fStep = 2 * dy / ndivisions;
567 Error(
"FindNextBoundary",
"Must call FindNode first");
570 Int_t inc = (dir[1] > 0) ? 1 : 0;
573 Error(
"FindNextBoundary",
"Negative distance d=%g", dist);
620 fStep = 2 * dz / ndivisions;
757 Error(
"FindNextBoundary",
"Must call FindNode first");
760 Int_t inc = (dir[2] > 0) ? 1 : 0;
763 Error(
"FindNextBoundary",
"Negative distance d=%g", dist);
810 fStep = 2 * dx / ndivisions;
879 Double_t xt = point[0] - txz * point[2] - txy * (point[1] - tyz * point[2]);
899 Double_t xt = point[0] - txz * point[2] - txy * (point[1] - tyz * point[2]);
902 Double_t ttsq = txy * txy + (txz - txy * tyz) * (txz - txy * tyz);
905 Double_t divdirz = -(txz - txy * tyz) * divdirx;
906 Double_t dot = dir[0] * divdirx + dir[1] * divdiry + dir[2] * divdirz;
991 fStep = 2 * dy / ndivisions;
1061 Double_t yt = point[1] - tyz * point[2];
1079 Double_t yt = point[1] - tyz * point[2];
1084 Double_t dot = dir[1] * divdiry + dir[2] * divdirz;
1173 fStep = 2 * dz / ndivisions;
1358 fStep = 2 * dz / ndivisions;
1622 Double_t dot = point[0] * dir[0] + point[1] * dir[1];
1730 if ((end -
start) < 0)
1735 for (
Int_t idiv = 0; idiv < ndivisions; idiv++) {
1797 Double_t dot = point[0] * dir[1] - point[1] * dir[0];
2126 fStep = 360. / ndivisions;
2154 if ((end -
start) < 0)
2232 Double_t dot = point[0] * dir[1] - point[1] * dir[0];
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
long long Long64_t
Portable signed long integer 8 bytes.
const char Option_t
Option string (const char).
externTGeoIdentity * gGeoIdentity
Buffer base class used for serializing objects.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
Class describing rotation + translation.
void RegisterYourself() override
Register the matrix in the current manager, which will become the owner.
void ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE) override
Multiply by a reflection respect to XY.
Matrix class used for computing global transformations Should NOT be used for node definition.
void SetDz(Double_t dz) override
void FastRotZ(const Double_t *sincos)
Perform a rotation about Z having the sine/cosine of the rotation angle.
void SetDy(Double_t dy) override
void Clear(Option_t *option="") override
clear the data for this matrix
void SetDx(Double_t dx) override
static Int_t ThreadId()
Translates the current thread id to an ordinal number.
Geometrical transformation package.
virtual void SetDz(Double_t)
virtual void SetDy(Double_t)
virtual void RegisterYourself()
Register the matrix in the current manager, which will become the owner.
virtual void SetDx(Double_t)
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
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)
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.
Double_t * fSinCos
![2*fNdivisions] table of sines/cosines
void Streamer(TBuffer &) override
Stream an object of class TGeoVolume.
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.
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
~TGeoPatternCylR() override
Destructor.
void cd(Int_t idiv) override
Update current division index and global matrix to point to a given slice.
ThreadData_t & GetThreadData() const
void Reflect(Bool_t flag=kTRUE)
virtual TGeoNode * CdNext()
Make next node (if any) current.
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.
std::vector< ThreadData_t * > fThreadData
! Vector of thread private transient data
Int_t fThreadSize
! Size of the thread vector
TGeoPatternFinder & operator=(const TGeoPatternFinder &)
assignment operator
void SetNext(Int_t index)
Set index of next division.
~TGeoPatternFinder() override
Destructor.
TGeoPatternFinder(const TGeoPatternFinder &)
copy constructor
Bool_t IsReflected() const
Int_t GetCurrent()
Return current index.
void ClearThreadData() const
TGeoPatternFinder()
Default constructor.
Int_t GetNext() const
Get index of next division.
std::mutex fMutex
! Mutex for thread data
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.
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(const TGeoPatternHoneycomb &)
copy constructor
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.
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.
~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
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.
~TGeoPatternSphPhi() override
Destructor.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
Double_t * fSinCos
! Sincos table
TGeoPatternSphPhi(const TGeoPatternSphPhi &pfc)=delete
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.
~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
TGeoPatternFinder * MakeCopy(Bool_t reflect=kFALSE) override
Make a copy of this finder. Reflect by Z if required.
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.
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.
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
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.
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 rotations.
void ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE) override
Multiply by a reflection respect to XY.
static Double_t Tolerance()
Class describing translations.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
TGeoShape * GetShape() const
TObject & operator=(const TObject &rhs) noexcept
TObject assignment operator.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TObject()
TObject constructor.
Double_t ATan2(Double_t y, Double_t x)
Returns the principal value of the arc tangent of y/x, expressed in radians.
constexpr Double_t DegToRad()
Conversion from degree to radian: .
Double_t Sqrt(Double_t x)
Returns the square root of x.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
Double_t Tan(Double_t)
Returns the tangent of an angle of x radians.
constexpr Double_t RadToDeg()
Conversion from radian to degree: .
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
Int_t fCurrent
! current division element
~ThreadData_t()
Destructor.
Int_t fNextIndex
! index of next node
ThreadData_t()
Constructor.
TGeoMatrix * fMatrix
! generic matrix