CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
RecEmcTofHit Class Reference

#include <RecEmcTofHit.h>

Public Member Functions

 RecEmcTofHit ()
 
 RecEmcTofHit (const Identifier &id, const double e, const HepPoint3D pos)
 
 ~RecEmcTofHit ()
 
 RecEmcTofHit (const RecEmcTofHit &tofHit)
 
RecEmcTofHitoperator= (const RecEmcTofHit &tofHit)
 
bool operator< (const RecEmcTofHit &tofHit) const
 
bool operator> (const RecEmcTofHit &tofHit) const
 
int IntCellId () const
 
Identifier CellId () const
 
double Energy () const
 
HepPoint3D Position () const
 
double ZPosition () const
 
void CellId (const Identifier &id)
 
void Energy (const double e)
 
void Position (const HepPoint3D pos)
 
void ZPosition (const double z)
 
void Assign (const Identifier &id, const double e, const HepPoint3D pos)
 
void Clear ()
 
double DistanceTo (const RecEmcTofHit &)
 

Detailed Description

Definition at line 19 of file RecEmcTofHit.h.

Constructor & Destructor Documentation

◆ RecEmcTofHit() [1/3]

RecEmcTofHit::RecEmcTofHit ( )

Definition at line 11 of file RecEmcTofHit.cxx.

12{
13 Clear();
14}

◆ RecEmcTofHit() [2/3]

RecEmcTofHit::RecEmcTofHit ( const Identifier & id,
const double e,
const HepPoint3D pos )

Definition at line 16 of file RecEmcTofHit.cxx.

19{
20 m_cellId = id;
21 m_energy = e;
22 m_pos = pos;
23}

◆ ~RecEmcTofHit()

RecEmcTofHit::~RecEmcTofHit ( )

Definition at line 25 of file RecEmcTofHit.cxx.

26{}

◆ RecEmcTofHit() [3/3]

RecEmcTofHit::RecEmcTofHit ( const RecEmcTofHit & tofHit)

Definition at line 29 of file RecEmcTofHit.cxx.

30{
31 m_cellId = tofHit.CellId();
32 m_energy = tofHit.Energy();
33 m_pos = tofHit.Position();
34}
double Energy() const
Identifier CellId() const
HepPoint3D Position() const

Member Function Documentation

◆ Assign()

void RecEmcTofHit::Assign ( const Identifier & id,
const double e,
const HepPoint3D pos )

Definition at line 69 of file RecEmcTofHit.cxx.

72{
73 m_cellId = id;
74 m_energy = e;
75 m_pos = pos;
76}

◆ CellId() [1/2]

Identifier RecEmcTofHit::CellId ( ) const
inline

Definition at line 43 of file RecEmcTofHit.h.

43{ return m_cellId; }

Referenced by operator<<(), operator=(), and RecEmcTofHit().

◆ CellId() [2/2]

void RecEmcTofHit::CellId ( const Identifier & id)

Definition at line 54 of file RecEmcTofHit.cxx.

55{
56 m_cellId = id;
57}

◆ Clear()

void RecEmcTofHit::Clear ( )

Definition at line 78 of file RecEmcTofHit.cxx.

79{
80 m_cellId.clear();
81 m_energy = 0;
82 m_pos = HepPoint3D(0,0,0);
83}
HepGeom::Point3D< double > HepPoint3D
virtual void clear()
Reset to invalid state.
Definition Identifier.h:152

Referenced by RecEmcTofHit().

◆ DistanceTo()

double RecEmcTofHit::DistanceTo ( const RecEmcTofHit & tofHit)

Definition at line 85 of file RecEmcTofHit.cxx.

86{
87 //double dphi = m_pos.phi()-tofHit.m_pos.phi();
88
89 //if(dphi>CLHEP::pi) dphi = CLHEP::twopi - dphi;
90 //if(dphi<-CLHEP::pi) dphi = CLHEP::twopi + dphi;
91
92 Hep3Vector pos1(m_pos);
93 Hep3Vector pos2(tofHit.m_pos);
94
95 return fabs(pos1.deltaPhi(pos2));
96
97 //cout<<"dphi="<<dphi<<"\tdeltaPhi="<<deltaPhi<<endl;
98 //return fabs(dphi);
99}

◆ Energy() [1/2]

double RecEmcTofHit::Energy ( ) const
inline

Definition at line 44 of file RecEmcTofHit.h.

44{ return m_energy; }

Referenced by operator<<(), operator=(), and RecEmcTofHit().

◆ Energy() [2/2]

void RecEmcTofHit::Energy ( const double e)

Definition at line 59 of file RecEmcTofHit.cxx.

60{
61 m_energy = e;
62}

◆ IntCellId()

int RecEmcTofHit::IntCellId ( ) const

Definition at line 47 of file RecEmcTofHit.cxx.

48{
49 int layer = TofID::layer(m_cellId);
50 int im = TofID::phi_module(m_cellId);
51 return im+layer*88;
52}
static int phi_module(const Identifier &id)
Definition TofID.cxx:117
static int layer(const Identifier &id)
Definition TofID.cxx:109

Referenced by operator<<().

◆ operator<()

bool RecEmcTofHit::operator< ( const RecEmcTofHit & tofHit) const
inline

Definition at line 33 of file RecEmcTofHit.h.

33 {
34 return m_energy < tofHit.m_energy;
35 }

◆ operator=()

RecEmcTofHit & RecEmcTofHit::operator= ( const RecEmcTofHit & tofHit)

Definition at line 36 of file RecEmcTofHit.cxx.

37{
38 if(this!=&tofHit) {
39 m_cellId = tofHit.CellId();
40 m_energy = tofHit.Energy();
41 m_pos = tofHit.Position();
42 }
43 return *this;
44}

◆ operator>()

bool RecEmcTofHit::operator> ( const RecEmcTofHit & tofHit) const
inline

Definition at line 37 of file RecEmcTofHit.h.

37 {
38 return m_energy > tofHit.m_energy;
39 }

◆ Position() [1/2]

HepPoint3D RecEmcTofHit::Position ( ) const
inline

Definition at line 45 of file RecEmcTofHit.h.

45{ return m_pos; }

Referenced by operator=(), and RecEmcTofHit().

◆ Position() [2/2]

void RecEmcTofHit::Position ( const HepPoint3D pos)

Definition at line 64 of file RecEmcTofHit.cxx.

65{
66 m_pos = pos;
67}

◆ ZPosition() [1/2]

double RecEmcTofHit::ZPosition ( ) const
inline

Definition at line 46 of file RecEmcTofHit.h.

46{ return m_pos.z(); }

Referenced by operator<<().

◆ ZPosition() [2/2]

void RecEmcTofHit::ZPosition ( const double z)

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