RecEmcTofHit Class Reference

#include <RecEmcTofHit.h>

List of all members.

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 &)

Private Attributes

Identifier m_cellId
double m_energy
HepPoint3D m_pos


Detailed Description

Definition at line 19 of file RecEmcTofHit.h.


Constructor & Destructor Documentation

RecEmcTofHit::RecEmcTofHit (  ) 

Definition at line 11 of file RecEmcTofHit.cxx.

References Clear().

00012 {
00013   Clear();
00014 }

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

Definition at line 16 of file RecEmcTofHit.cxx.

References m_cellId, m_energy, and m_pos.

00019 {
00020   m_cellId = id;
00021   m_energy = e;
00022   m_pos = pos;
00023 }

RecEmcTofHit::~RecEmcTofHit (  ) 

Definition at line 25 of file RecEmcTofHit.cxx.

00026 {}

RecEmcTofHit::RecEmcTofHit ( const RecEmcTofHit tofHit  ) 

Definition at line 29 of file RecEmcTofHit.cxx.

References CellId(), Energy(), m_cellId, m_energy, m_pos, and Position().

00030 {
00031   m_cellId = tofHit.CellId();
00032   m_energy = tofHit.Energy();
00033   m_pos = tofHit.Position();
00034 }


Member Function Documentation

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

Definition at line 69 of file RecEmcTofHit.cxx.

References m_cellId, m_energy, and m_pos.

00072 {
00073   m_cellId = id;
00074   m_energy = e;
00075   m_pos = pos;
00076 } 

void RecEmcTofHit::CellId ( const Identifier id  ) 

Definition at line 54 of file RecEmcTofHit.cxx.

References m_cellId.

00055 {
00056   m_cellId = id;
00057 }

Identifier RecEmcTofHit::CellId (  )  const [inline]

Definition at line 43 of file RecEmcTofHit.h.

References m_cellId.

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

00043 { return m_cellId; }

void RecEmcTofHit::Clear (  ) 

Definition at line 78 of file RecEmcTofHit.cxx.

References Identifier::clear(), m_cellId, m_energy, and m_pos.

Referenced by RecEmcTofHit().

00079 {
00080   m_cellId.clear();
00081   m_energy = 0;
00082   m_pos = HepPoint3D(0,0,0);
00083 }

double RecEmcTofHit::DistanceTo ( const RecEmcTofHit  ) 

Definition at line 85 of file RecEmcTofHit.cxx.

References m_pos.

00086 {
00087   //double dphi = m_pos.phi()-tofHit.m_pos.phi();
00088 
00089   //if(dphi>CLHEP::pi) dphi = CLHEP::twopi - dphi;
00090   //if(dphi<-CLHEP::pi) dphi = CLHEP::twopi + dphi;
00091 
00092   Hep3Vector pos1(m_pos);
00093   Hep3Vector pos2(tofHit.m_pos);
00094 
00095   return fabs(pos1.deltaPhi(pos2));
00096 
00097   //cout<<"dphi="<<dphi<<"\tdeltaPhi="<<deltaPhi<<endl;
00098   //return fabs(dphi);
00099 }

void RecEmcTofHit::Energy ( const double  e  ) 

Definition at line 59 of file RecEmcTofHit.cxx.

References m_energy.

00060 {
00061   m_energy = e;
00062 }

double RecEmcTofHit::Energy (  )  const [inline]

Definition at line 44 of file RecEmcTofHit.h.

References m_energy.

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

00044 { return m_energy; }

int RecEmcTofHit::IntCellId (  )  const

Definition at line 47 of file RecEmcTofHit.cxx.

References TofID::layer(), m_cellId, and TofID::phi_module().

Referenced by operator<<().

00048 {
00049   int layer = TofID::layer(m_cellId);
00050   int im = TofID::phi_module(m_cellId);
00051   return im+layer*88;
00052 }

bool RecEmcTofHit::operator< ( const RecEmcTofHit tofHit  )  const [inline]

Definition at line 33 of file RecEmcTofHit.h.

References m_energy.

00033                                                        {
00034       return m_energy < tofHit.m_energy;
00035     }

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

Definition at line 36 of file RecEmcTofHit.cxx.

References CellId(), Energy(), m_cellId, m_energy, m_pos, and Position().

00037 {
00038   if(this!=&tofHit) {
00039     m_cellId = tofHit.CellId();
00040     m_energy = tofHit.Energy();
00041     m_pos = tofHit.Position();
00042   }
00043   return *this;
00044 }

bool RecEmcTofHit::operator> ( const RecEmcTofHit tofHit  )  const [inline]

Definition at line 37 of file RecEmcTofHit.h.

References m_energy.

00037                                                        {
00038       return m_energy > tofHit.m_energy;
00039     }

void RecEmcTofHit::Position ( const HepPoint3D  pos  ) 

Definition at line 64 of file RecEmcTofHit.cxx.

References m_pos.

00065 {
00066   m_pos = pos;
00067 }

HepPoint3D RecEmcTofHit::Position (  )  const [inline]

Definition at line 45 of file RecEmcTofHit.h.

References m_pos.

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

00045 { return m_pos; }

void RecEmcTofHit::ZPosition ( const double  z  ) 

double RecEmcTofHit::ZPosition (  )  const [inline]

Definition at line 46 of file RecEmcTofHit.h.

References m_pos.

Referenced by operator<<().

00046 { return m_pos.z(); }


Member Data Documentation

Identifier RecEmcTofHit::m_cellId [private]

Definition at line 62 of file RecEmcTofHit.h.

Referenced by Assign(), CellId(), Clear(), IntCellId(), operator=(), and RecEmcTofHit().

double RecEmcTofHit::m_energy [private]

Definition at line 63 of file RecEmcTofHit.h.

Referenced by Assign(), Clear(), Energy(), operator<(), operator=(), operator>(), and RecEmcTofHit().

HepPoint3D RecEmcTofHit::m_pos [private]

Definition at line 64 of file RecEmcTofHit.h.

Referenced by Assign(), Clear(), DistanceTo(), operator=(), Position(), RecEmcTofHit(), and ZPosition().


Generated on Tue Nov 29 23:20:51 2016 for BOSS_7.0.2 by  doxygen 1.4.7