FEDRA emulsion software from the OPERA Collaboration
EdbSegment Class Reference

#include <EdbSegment.h>

Inheritance diagram for EdbSegment:
Collaboration diagram for EdbSegment:

Public Member Functions

void AddElement (TObject *element)
 
void Copy (EdbSegment &s)
 
 EdbSegment ()
 array of clusters (transient!) More...
 
 EdbSegment (float x, float y, float z, float tx, float ty, float dz=0, int side=0, int puls=0, int id=0)
 
TObjArray * GetElements () const
 
Int_t GetID () const
 
Int_t GetNelements () const
 
Int_t GetPuls () const
 
Int_t GetSide () const
 
float GetSigmaX () const
 
float GetSigmaY () const
 
Int_t GetVolume () const
 
void Print (Option_t *opt=0) const
 
void Set (float x, float y, float z, float tx, float ty, float dz=0, int side=0, int puls=0, int id=0)
 
void SetID (int id)
 
void SetIDE ()
 
void SetIDE (int id)
 
void SetPuls (int puls)
 
void SetSide (int side)
 
void SetSigma (float sx, float sy)
 
void UnSetIDE ()
 
virtual ~EdbSegment ()
 
- Public Member Functions inherited from EdbSeg3D
 EdbSeg3D ()
 
 EdbSeg3D (float x, float y, float z, float tx, float ty, float dz=0)
 
virtual Float_t GetDz () const
 
virtual Float_t GetTx () const
 
virtual Float_t GetTy () const
 
virtual Float_t GetX0 () const
 
virtual Float_t GetY0 () const
 
virtual Float_t GetZ0 () const
 
virtual void Set (float x, float y, float z, float tx, float ty, float dz=0)
 
virtual void SetDz (float dz)
 
virtual void SetTx (float tx)
 
virtual void SetTy (float ty)
 
virtual void SetX0 (float x)
 
virtual void SetY0 (float y)
 
virtual void SetZ0 (float z)
 
virtual void Transform (const EdbAffine2D *aff)
 
virtual ~EdbSeg3D ()
 

Private Attributes

TObjArray * eElements
 
Int_t eID
 
Int_t ePuls
 
Int_t eSide
 
Float_t eSigmaX
 
Float_t eSigmaY
 

Constructor & Destructor Documentation

◆ EdbSegment() [1/2]

EdbSegment::EdbSegment ( )

array of clusters (transient!)

72 {
73  eSide = -1;
74  eElements = 0;
75 }
Int_t eSide
Definition: EdbSegment.h:65
TObjArray * eElements
Definition: EdbSegment.h:71

◆ EdbSegment() [2/2]

EdbSegment::EdbSegment ( float  x,
float  y,
float  z,
float  tx,
float  ty,
float  dz = 0,
int  side = 0,
int  puls = 0,
int  id = 0 
)
79  :
80  EdbSeg3D( x, y, z, tx, ty, dz), eSide(side), ePuls(puls), eID(id)
81 {
82  eElements = 0;
83 }
brick dz
Definition: RecDispMC.C:107
EdbSeg3D()
Definition: EdbSegment.h:32
Int_t ePuls
Definition: EdbSegment.h:66
Int_t eID
Definition: EdbSegment.h:67

◆ ~EdbSegment()

EdbSegment::~EdbSegment ( )
virtual
87 {
88  if(eElements) {eElements->Clear(); SafeDelete(eElements);}
89 }

Member Function Documentation

◆ AddElement()

void EdbSegment::AddElement ( TObject *  element)
150 {
151  if(!eElements) eElements = new TObjArray();
152  eElements->Add(element);
153 }

◆ Copy()

void EdbSegment::Copy ( EdbSegment s)
129 {
130  //copy contents of s into this
131  Set( s.GetX0(),s.GetY0(),s.GetZ0(),s.GetTx(),s.GetTy(),s.GetDz(), s.GetSide(),s.GetPuls(), s.GetID() );
132  SetSigma(s.GetSigmaX(),s.GetSigmaY());
133  if(eElements) eElements->Clear();
134  int n = s.GetNelements();
135  for(int i=0; i<n; i++) AddElement( s.GetElements()->UncheckedAt(i) );
136 }
void AddElement(TObject *element)
Definition: EdbSegment.cxx:149
void Set(float x, float y, float z, float tx, float ty, float dz=0, int side=0, int puls=0, int id=0)
Definition: EdbSegment.cxx:92
void SetSigma(float sx, float sy)
Definition: EdbSegment.h:83
EdbSegP * s
Definition: tlg2pattern.C:32

◆ GetElements()

TObjArray* EdbSegment::GetElements ( ) const
inline
115 { return eElements; }

◆ GetID()

Int_t EdbSegment::GetID ( ) const
inline
90 { return eID; }

◆ GetNelements()

Int_t EdbSegment::GetNelements ( void  ) const
inline
112  { if(eElements) return eElements->GetLast()+1;
113  else return 0; }

◆ GetPuls()

Int_t EdbSegment::GetPuls ( ) const
inline
88 { return ePuls%1000; }

◆ GetSide()

Int_t EdbSegment::GetSide ( ) const
inline
87 { return eSide; }

◆ GetSigmaX()

float EdbSegment::GetSigmaX ( ) const
inline
84 { return eSigmaX; }
Float_t eSigmaX
Definition: EdbSegment.h:68

◆ GetSigmaY()

float EdbSegment::GetSigmaY ( ) const
inline
85 { return eSigmaY; }
Float_t eSigmaY
Definition: EdbSegment.h:69

◆ GetVolume()

Int_t EdbSegment::GetVolume ( ) const
inline
89 { return ePuls/1000; }

◆ Print()

void EdbSegment::Print ( Option_t *  opt = 0) const
140 {
141  printf("EdbSegment: %f %f %f \t %f %f %f \t %d %d %d \t %d\n",
142  GetX0(), GetY0(), GetZ0(),
143  GetTx(), GetTy(), GetDz(),
144  GetSide(), GetPuls(), GetID(),
145  GetNelements());
146 }
virtual Float_t GetDz() const
Definition: EdbSegment.h:42
virtual Float_t GetX0() const
Definition: EdbSegment.h:37
virtual Float_t GetTx() const
Definition: EdbSegment.h:40
virtual Float_t GetZ0() const
Definition: EdbSegment.h:39
virtual Float_t GetY0() const
Definition: EdbSegment.h:38
virtual Float_t GetTy() const
Definition: EdbSegment.h:41
Int_t GetPuls() const
Definition: EdbSegment.h:88
Int_t GetNelements() const
Definition: EdbSegment.h:112
Int_t GetID() const
Definition: EdbSegment.h:90
Int_t GetSide() const
Definition: EdbSegment.h:87

◆ Set()

void EdbSegment::Set ( float  x,
float  y,
float  z,
float  tx,
float  ty,
float  dz = 0,
int  side = 0,
int  puls = 0,
int  id = 0 
)
94 {
95  EdbSeg3D::Set(x,y,z,tx,ty,dz);
96  eSide = side;
97  ePuls = puls;
98  eID = id;
99 }
virtual void Set(float x, float y, float z, float tx, float ty, float dz=0)
UInt_t id
Definition: tlg2pattern.C:118

◆ SetID()

void EdbSegment::SetID ( int  id)
inline
94 { eID = id; }

◆ SetIDE() [1/2]

void EdbSegment::SetIDE ( )
inline
101 { SetIDE(GetID()); }
void SetIDE()
Definition: EdbSegment.h:101

◆ SetIDE() [2/2]

void EdbSegment::SetIDE ( int  id)
inline
95  {
96  eID = id;
97  if(eElements)
98  for(int i=0; i<eElements->GetLast()+1; i++)
99  ((EdbCluster*)eElements->At(i))->SetSegment(eID);
100  }
Definition: EdbCluster.h:19

◆ SetPuls()

void EdbSegment::SetPuls ( int  puls)
inline
93 { ePuls = puls; }

◆ SetSide()

void EdbSegment::SetSide ( int  side)
inline
92 { eSide = side; }

◆ SetSigma()

void EdbSegment::SetSigma ( float  sx,
float  sy 
)
inline
83 { eSigmaX=sx; eSigmaY=sy; }

◆ UnSetIDE()

void EdbSegment::UnSetIDE ( )
inline
102  {
103  if(eElements) {
104  for(int i=0; i<eElements->GetLast()+1; i++)
105  if( ((EdbCluster*)eElements->UncheckedAt(i))->GetSegment() == eID )
106  ((EdbCluster*)eElements->UncheckedAt(i))->SetSegment(-1);
107  eElements->Clear();
108  }
109  }

Member Data Documentation

◆ eElements

TObjArray* EdbSegment::eElements
private

◆ eID

Int_t EdbSegment::eID
private

◆ ePuls

Int_t EdbSegment::ePuls
private

◆ eSide

Int_t EdbSegment::eSide
private

◆ eSigmaX

Float_t EdbSegment::eSigmaX
private

◆ eSigmaY

Float_t EdbSegment::eSigmaY
private

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