CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
Emc/EmcRecEventModel/EmcRecEventModel-01-01-18/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 <map>
11#include <CLHEP/Geometry/Point3D.h>
12#ifndef ENABLE_BACKWARDS_COMPATIBILITY
14#endif
15
16using namespace std;
17using namespace CLHEP;
18
20{
21 public:
22 //Constructors and destructors
24 RecEmcTofHit(const Identifier& id,
25 const double e,
26 const HepPoint3D pos);
28
29 //Copy and assignment
30 RecEmcTofHit(const RecEmcTofHit& tofHit);
31 RecEmcTofHit& operator=(const RecEmcTofHit& tofHit);
32
33 bool operator < (const RecEmcTofHit& tofHit) const {
34 return m_energy < tofHit.m_energy;
35 }
36
37 bool operator > (const RecEmcTofHit& tofHit) const {
38 return m_energy > tofHit.m_energy;
39 }
40
41 //Read
42 int IntCellId() const;
43 inline Identifier CellId() const { return m_cellId; }
44 inline double Energy() const { return m_energy; }
45 inline HepPoint3D Position() const { return m_pos; }
46 inline double ZPosition() const { return m_pos.z(); }
47
48 //Write
49 void CellId(const Identifier& id);
50 void Energy(const double e);
51 void Position(const HepPoint3D pos);
52 void ZPosition(const double z);
53
54 void Assign(const Identifier& id,
55 const double e,
56 const HepPoint3D pos);
57 void Clear();
58
59 double DistanceTo(const RecEmcTofHit &);
60
61 private:
62 Identifier m_cellId;
63 double m_energy;
64 HepPoint3D m_pos;
65};
66
67typedef map<int, RecEmcTofHit, less<int> > RecEmcTofHitMap;
68
69ostream& operator<<(ostream & os, const RecEmcTofHit& tofHit);
70
71#endif
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)
double DistanceTo(const RecEmcTofHit &)
int IntCellId() const