BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Emc/EmcRecEventModel/include/EmcRecEventModel/RecEmcTofHit.h
Go to the documentation of this file.
1//
2// Bes Tof Rec Hit
3//
4// Created by He Miao 2006,9,15
5//
6#ifndef REC_EMC_TOF_HIT_H
7#define REC_EMC_TOF_HIT_H
8
9#include "Identifier/Identifier.h"
10#include <CLHEP/Geometry/Point3D.h>
11#include <map>
12#ifndef ENABLE_BACKWARDS_COMPATIBILITY
13typedef HepGeom::Point3D<double> HepPoint3D;
14#endif
15
16using namespace std;
17using namespace CLHEP;
18
20public:
21 // Constructors and destructors
23 RecEmcTofHit( const Identifier& id, const double e, const HepPoint3D pos );
25
26 // Copy and assignment
27 RecEmcTofHit( const RecEmcTofHit& tofHit );
28 RecEmcTofHit& operator=( const RecEmcTofHit& tofHit );
29
30 bool operator<( const RecEmcTofHit& tofHit ) const { return m_energy < tofHit.m_energy; }
31
32 bool operator>( const RecEmcTofHit& tofHit ) const { return m_energy > tofHit.m_energy; }
33
34 // Read
35 int IntCellId() const;
36 inline Identifier CellId() const { return m_cellId; }
37 inline double Energy() const { return m_energy; }
38 inline HepPoint3D Position() const { return m_pos; }
39 inline double ZPosition() const { return m_pos.z(); }
40
41 // Write
42 void CellId( const Identifier& id );
43 void Energy( const double e );
44 void Position( const HepPoint3D pos );
45 void ZPosition( const double z );
46
47 void Assign( const Identifier& id, const double e, const HepPoint3D pos );
48 void Clear();
49
50 double DistanceTo( const RecEmcTofHit& );
51
52private:
53 Identifier m_cellId;
54 double m_energy;
55 HepPoint3D m_pos;
56};
57
58typedef map<int, RecEmcTofHit, less<int>> RecEmcTofHitMap;
59
60ostream& operator<<( ostream& os, const RecEmcTofHit& tofHit );
61
62#endif
HepGeom::Point3D< double > HepPoint3D
ostream & operator<<(ostream &os, const RecEmcTofHit &tofHit)
map< int, RecEmcTofHit, less< int > > RecEmcTofHitMap
void Assign(const Identifier &id, const double e, const HepPoint3D pos)
RecEmcTofHit & operator=(const RecEmcTofHit &tofHit)
void ZPosition(const double z)
bool operator<(const RecEmcTofHit &tofHit) const
double DistanceTo(const RecEmcTofHit &)
bool operator>(const RecEmcTofHit &tofHit) const
int IntCellId() const