BmnRoot
Loading...
Searching...
No Matches
LRectangle1 Class Reference

#include <BmnTof1GeoUtils.h>

Inheritance diagram for LRectangle1:
[legend]
Collaboration diagram for LRectangle1:
[legend]

Public Types

enum  Side_t {
  kRight = 0 , kLeft = 1 , kInvalid = -1 , kUpper = 0 ,
  kLower = 1 , kRight = 0 , kLeft = 1 , kInvalid = -1 ,
  kUpper = 0 , kLower = 1
}
 
enum  Side_t {
  kRight = 0 , kLeft = 1 , kInvalid = -1 , kUpper = 0 ,
  kLower = 1 , kRight = 0 , kLeft = 1 , kInvalid = -1 ,
  kUpper = 0 , kLower = 1
}
 

Public Member Functions

 LRectangle1 ()
 
 LRectangle1 (Int_t uid, const TVector3 &a, const TVector3 &b, const TVector3 &c, const TVector3 &d, bool check=false)
 
Double_t GetLength () const
 
Double_t GetWidth () const
 
void GetInteriorAngle (int vertexIndex) const
 
TVector3 GetCenter () const
 
bool isInvalid () const
 
Double_t DistanceFromPointToLineSegment (const TVector3 *pos, const TVector3 &P1, const TVector3 &P2) const
 
Double_t DistanceFromPointToLine (const TVector3 *pos, const TVector3 &P1, const TVector3 &P2) const
 
Double_t MinDistanceToEdge (const TVector3 *pos, Side_t &side) const
 
Double_t MinDistanceToEdge701 (const TVector3 *pos, Side_t &side) const
 
void Print (std::ostream &out, const TVector3 &point, const char *comment=nullptr) const
 
void Dump (const char *comment, std::ostream &out=std::cout) const
 
void Shift (const TVector3 &shift)
 
void InitCenterPerp ()
 
void CalculateLengthnWidth ()
 
void CheckInValid ()
 
 LRectangle1 ()
 
 LRectangle1 (Int_t uid, const TVector3 &a, const TVector3 &b, const TVector3 &c, const TVector3 &d, bool check=false)
 
Double_t GetLength () const
 
Double_t GetWidth () const
 
void GetInteriorAngle (int vertexIndex) const
 
TVector3 GetCenter () const
 
bool isInvalid () const
 
Double_t DistanceFromPointToLineSegment (const TVector3 *pos, const TVector3 &P1, const TVector3 &P2) const
 
Double_t DistanceFromPointToLine (const TVector3 *pos, const TVector3 &P1, const TVector3 &P2) const
 
Double_t MinDistanceToEdge (const TVector3 *pos, Side_t &side) const
 
Double_t MinDistanceToEdge701 (const TVector3 *pos, Side_t &side) const
 
void Print (std::ostream &out, const TVector3 &point, const char *comment=nullptr) const
 
void Dump (const char *comment, std::ostream &out=std::cout) const
 
void Shift (const TVector3 &shift)
 
void InitCenterPerp ()
 
void CalculateLengthnWidth ()
 
void CheckInValid ()
 

Public Attributes

Int_t volumeUID
 
Double_t length
 
Double_t width
 
TVector3 A
 
TVector3 B
 
TVector3 C
 
TVector3 D
 
TVector3 center
 
TVector3 perp
 

Detailed Description

Definition at line 12 of file BmnTof1GeoUtils.h.

Member Enumeration Documentation

◆ Side_t [1/2]

Enumerator
kRight 
kLeft 
kInvalid 
kUpper 
kLower 
kRight 
kLeft 
kInvalid 
kUpper 
kLower 

Definition at line 18 of file BmnTof1GeoUtils.h.

◆ Side_t [2/2]

Enumerator
kRight 
kLeft 
kInvalid 
kUpper 
kLower 
kRight 
kLeft 
kInvalid 
kUpper 
kLower 

Definition at line 18 of file BmnTof1GeoUtils.h.

Constructor & Destructor Documentation

◆ LRectangle1() [1/4]

LRectangle1::LRectangle1 ( )
inline

Definition at line 37 of file BmnTof1GeoUtils.h.

◆ LRectangle1() [2/4]

LRectangle1::LRectangle1 ( Int_t  uid,
const TVector3 &  a,
const TVector3 &  b,
const TVector3 &  c,
const TVector3 &  d,
bool  check = false 
)

Definition at line 337 of file BmnTof1GeoUtils.cxx.

References CheckInValid().

◆ LRectangle1() [3/4]

LRectangle1::LRectangle1 ( )
inline

Definition at line 37 of file BmnTof1GeoUtils.h.

◆ LRectangle1() [4/4]

LRectangle1::LRectangle1 ( Int_t  uid,
const TVector3 &  a,
const TVector3 &  b,
const TVector3 &  c,
const TVector3 &  d,
bool  check = false 
)

Member Function Documentation

◆ CalculateLengthnWidth() [1/2]

void LRectangle1::CalculateLengthnWidth ( )
inline

Definition at line 76 of file BmnTof1GeoUtils.h.

References A, B, C, length, and width.

Referenced by BmnTof1GeoUtils::ParseTGeoManager701().

◆ CalculateLengthnWidth() [2/2]

void LRectangle1::CalculateLengthnWidth ( )
inline

Definition at line 76 of file BmnTof1GeoUtils.h.

References A, B, C, length, and width.

◆ CheckInValid() [1/2]

void LRectangle1::CheckInValid ( )
inline

Definition at line 88 of file BmnTof1GeoUtils.h.

References A, B, C, D, and Dump().

Referenced by LRectangle1().

◆ CheckInValid() [2/2]

void LRectangle1::CheckInValid ( )
inline

Definition at line 88 of file BmnTof1GeoUtils.h.

References A, B, C, D, and Dump().

◆ DistanceFromPointToLine() [1/2]

Double_t LRectangle1::DistanceFromPointToLine ( const TVector3 *  pos,
const TVector3 &  P1,
const TVector3 &  P2 
) const

Definition at line 354 of file BmnTof1GeoUtils.cxx.

◆ DistanceFromPointToLine() [2/2]

Double_t LRectangle1::DistanceFromPointToLine ( const TVector3 *  pos,
const TVector3 &  P1,
const TVector3 &  P2 
) const

◆ DistanceFromPointToLineSegment() [1/2]

Double_t LRectangle1::DistanceFromPointToLineSegment ( const TVector3 *  pos,
const TVector3 &  P1,
const TVector3 &  P2 
) const

Definition at line 361 of file BmnTof1GeoUtils.cxx.

References v.

Referenced by MinDistanceToEdge(), and MinDistanceToEdge701().

◆ DistanceFromPointToLineSegment() [2/2]

Double_t LRectangle1::DistanceFromPointToLineSegment ( const TVector3 *  pos,
const TVector3 &  P1,
const TVector3 &  P2 
) const

◆ Dump() [1/2]

void LRectangle1::Dump ( const char *  comment,
std::ostream &  out = std::cout 
) const

Definition at line 417 of file BmnTof1GeoUtils.cxx.

References A, B, C, D, Print(), and volumeUID.

Referenced by CheckInValid(), and LStrip1::Dump().

◆ Dump() [2/2]

void LRectangle1::Dump ( const char *  comment,
std::ostream &  out = std::cout 
) const

◆ GetCenter() [1/2]

TVector3 LRectangle1::GetCenter ( ) const
inline

Definition at line 51 of file BmnTof1GeoUtils.h.

References A, B, C, and D.

◆ GetCenter() [2/2]

TVector3 LRectangle1::GetCenter ( ) const
inline

Definition at line 51 of file BmnTof1GeoUtils.h.

References A, B, C, and D.

◆ GetInteriorAngle() [1/2]

void LRectangle1::GetInteriorAngle ( int  vertexIndex) const
inline

Definition at line 50 of file BmnTof1GeoUtils.h.

◆ GetInteriorAngle() [2/2]

void LRectangle1::GetInteriorAngle ( int  vertexIndex) const
inline

Definition at line 50 of file BmnTof1GeoUtils.h.

◆ GetLength() [1/2]

Double_t LRectangle1::GetLength ( ) const
inline

Definition at line 48 of file BmnTof1GeoUtils.h.

References length.

Referenced by BmnTOF1Detector::SetGeo().

◆ GetLength() [2/2]

Double_t LRectangle1::GetLength ( ) const
inline

Definition at line 48 of file BmnTof1GeoUtils.h.

References length.

◆ GetWidth() [1/2]

Double_t LRectangle1::GetWidth ( ) const
inline

Definition at line 49 of file BmnTof1GeoUtils.h.

References width.

◆ GetWidth() [2/2]

Double_t LRectangle1::GetWidth ( ) const
inline

Definition at line 49 of file BmnTof1GeoUtils.h.

References width.

◆ InitCenterPerp() [1/2]

void LRectangle1::InitCenterPerp ( )
inline

Definition at line 70 of file BmnTof1GeoUtils.h.

References A, B, C, center, D, and perp.

Referenced by BmnTof1GeoUtils::ParseTGeoManager(), and BmnTof1GeoUtils::ParseTGeoManager701().

◆ InitCenterPerp() [2/2]

void LRectangle1::InitCenterPerp ( )
inline

Definition at line 70 of file BmnTof1GeoUtils.h.

References A, B, C, center, D, and perp.

◆ isInvalid() [1/2]

bool LRectangle1::isInvalid ( ) const
inline

Definition at line 52 of file BmnTof1GeoUtils.h.

◆ isInvalid() [2/2]

bool LRectangle1::isInvalid ( ) const
inline

Definition at line 52 of file BmnTof1GeoUtils.h.

◆ MinDistanceToEdge() [1/2]

Double_t LRectangle1::MinDistanceToEdge ( const TVector3 *  pos,
Side_t side 
) const

Definition at line 380 of file BmnTof1GeoUtils.cxx.

References A, B, C, D, DistanceFromPointToLineSegment(), kLeft, and kRight.

Referenced by BmnTof1HitProducer::Exec().

◆ MinDistanceToEdge() [2/2]

Double_t LRectangle1::MinDistanceToEdge ( const TVector3 *  pos,
Side_t side 
) const

◆ MinDistanceToEdge701() [1/2]

Double_t LRectangle1::MinDistanceToEdge701 ( const TVector3 *  pos,
Side_t side 
) const

Definition at line 395 of file BmnTof1GeoUtils.cxx.

References A, B, C, D, DistanceFromPointToLineSegment(), kLower, and kUpper.

Referenced by BmnTof1HitProducer::Exec().

◆ MinDistanceToEdge701() [2/2]

Double_t LRectangle1::MinDistanceToEdge701 ( const TVector3 *  pos,
Side_t side 
) const

◆ Print() [1/2]

void LRectangle1::Print ( std::ostream &  out,
const TVector3 &  point,
const char *  comment = nullptr 
) const

Definition at line 410 of file BmnTof1GeoUtils.cxx.

Referenced by Dump().

◆ Print() [2/2]

void LRectangle1::Print ( std::ostream &  out,
const TVector3 &  point,
const char *  comment = nullptr 
) const

◆ Shift() [1/2]

void LRectangle1::Shift ( const TVector3 &  shift)
inline

Definition at line 62 of file BmnTof1GeoUtils.h.

References A, B, C, and D.

◆ Shift() [2/2]

void LRectangle1::Shift ( const TVector3 &  shift)
inline

Definition at line 62 of file BmnTof1GeoUtils.h.

References A, B, C, and D.

Member Data Documentation

◆ A

◆ B

◆ C

◆ center

◆ D

◆ length

Double_t LRectangle1::length

Definition at line 33 of file BmnTof1GeoUtils.h.

Referenced by CalculateLengthnWidth(), and GetLength().

◆ perp

TVector3 LRectangle1::perp

Definition at line 35 of file BmnTof1GeoUtils.h.

Referenced by InitCenterPerp().

◆ volumeUID

◆ width

Double_t LRectangle1::width

Definition at line 33 of file BmnTof1GeoUtils.h.

Referenced by CalculateLengthnWidth(), and GetWidth().


The documentation for this class was generated from the following files: