BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
RecEmcHit Class Reference

#include <RecEmcHit.h>

+ Inheritance diagram for RecEmcHit:

Public Member Functions

virtual const CLID & clID () const
 
 RecEmcHit ()
 
 RecEmcHit (const RecEmcID &CellId, const RecEmcEnergy &Energy, const RecEmcTime &Time)
 
 ~RecEmcHit ()
 
bool operator< (const RecEmcHit &aHit) const
 
bool operator> (const RecEmcHit &aHit) const
 
RecEmcID getCellId () const
 
RecEmcEnergy getEnergy () const
 
RecEmcTime getTime () const
 
HepPoint3D getCenter () const
 
HepPoint3D getFrontCenter () const
 
RecEmcID CellId (const RecEmcID &CellId)
 
RecEmcEnergy Energy (const RecEmcEnergy &Energy)
 
RecEmcTime Time (const RecEmcTime &Time)
 
void Assign (const RecEmcID &CellId, const RecEmcEnergy &Energy, const RecEmcTime &Time)
 
void Dump () const
 

Static Public Member Functions

static const CLID & classID ()
 

Protected Attributes

RecEmcID fCellId
 
RecEmcEnergy fEnergy
 
RecEmcTime fTime
 

Detailed Description

Definition at line 19 of file RecEmcHit.h.

Constructor & Destructor Documentation

◆ RecEmcHit() [1/2]

RecEmcHit::RecEmcHit ( )

Definition at line 14 of file RecEmcHit.cxx.

15{
16 fCellId.clear();
17 fEnergy=-1;
18 fTime=-1;
19}
void clear()
Reset to invalid state.
Definition: Identifier.h:152
RecEmcEnergy fEnergy
Definition: RecEmcHit.h:69
RecEmcID fCellId
Definition: RecEmcHit.h:68
RecEmcTime fTime
Definition: RecEmcHit.h:70

◆ RecEmcHit() [2/2]

RecEmcHit::RecEmcHit ( const RecEmcID CellId,
const RecEmcEnergy Energy,
const RecEmcTime Time 
)

Definition at line 21 of file RecEmcHit.cxx.

24{
27 fTime=Time;
28}
RecEmcEnergy Energy(const RecEmcEnergy &Energy)
Definition: RecEmcHit.cxx:87
RecEmcID CellId(const RecEmcID &CellId)
Definition: RecEmcHit.cxx:81
RecEmcTime Time(const RecEmcTime &Time)
Definition: RecEmcHit.cxx:93

◆ ~RecEmcHit()

RecEmcHit::~RecEmcHit ( )

Definition at line 30 of file RecEmcHit.cxx.

31{
32 //Nothing to do
33}

Member Function Documentation

◆ Assign()

void RecEmcHit::Assign ( const RecEmcID CellId,
const RecEmcEnergy Energy,
const RecEmcTime Time 
)

Definition at line 99 of file RecEmcHit.cxx.

102{
105 fTime=Time;
106}

Referenced by RecEmcHitCnv::TObjectToDataObject().

◆ CellId()

RecEmcID RecEmcHit::CellId ( const RecEmcID CellId)

Definition at line 81 of file RecEmcHit.cxx.

82{
84 return fCellId;
85}

Referenced by Assign(), CellId(), EmcRecDigit2Hit::Convert(), and RecEmcHit().

◆ classID()

static const CLID & RecEmcHit::classID ( )
inlinestatic

Definition at line 24 of file RecEmcHit.h.

24{ return CLID_RecEmcHit; }
const CLID & CLID_RecEmcHit
Definition: EventModel.cxx:320

Referenced by clID().

◆ clID()

virtual const CLID & RecEmcHit::clID ( ) const
inlinevirtual

Definition at line 23 of file RecEmcHit.h.

23{ return RecEmcHit::classID();}
static const CLID & classID()
Definition: RecEmcHit.h:24

◆ Dump()

void RecEmcHit::Dump ( ) const

Definition at line 108 of file RecEmcHit.cxx.

109{
110 cout<<"Hit: ";
111
112 cout<<fCellId<<", ";
113
114 cout.width(12);
115 cout.setf(ios::right);
116 cout<<fEnergy<<", ";
117
118 cout.width(12);
119 cout.setf(ios::right);
120 cout<<fTime<<endl;
121}

◆ Energy()

RecEmcEnergy RecEmcHit::Energy ( const RecEmcEnergy Energy)

Definition at line 87 of file RecEmcHit.cxx.

88{
90 return fEnergy;
91}

Referenced by Assign(), EmcRecDigit2Hit::Convert(), Energy(), and RecEmcHit().

◆ getCellId()

◆ getCenter()

HepPoint3D RecEmcHit::getCenter ( ) const

Definition at line 57 of file RecEmcHit.cxx.

58{
59 IEmcRecGeoSvc* iGeoSvc;
60 ISvcLocator* svcLocator = Gaudi::svcLocator();
61 StatusCode sc = svcLocator->service("EmcRecGeoSvc",iGeoSvc);
62 if(sc!=StatusCode::SUCCESS) {
63 cout<<"Error: Can't get EmcRecGeoSvc"<<endl;
64 }
65
66 return iGeoSvc->GetCCenter(fCellId);
67}
virtual HepPoint3D GetCCenter(const Identifier &id) const =0

◆ getEnergy()

RecEmcEnergy RecEmcHit::getEnergy ( ) const
inline

◆ getFrontCenter()

HepPoint3D RecEmcHit::getFrontCenter ( ) const

Definition at line 69 of file RecEmcHit.cxx.

70{
71 IEmcRecGeoSvc* iGeoSvc;
72 ISvcLocator* svcLocator = Gaudi::svcLocator();
73 StatusCode sc = svcLocator->service("EmcRecGeoSvc",iGeoSvc);
74 if(sc!=StatusCode::SUCCESS) {
75 cout<<"Error: Can't get EmcRecGeoSvc"<<endl;
76 }
77
78 return iGeoSvc->GetCFrontCenter(fCellId);
79}
virtual HepPoint3D GetCFrontCenter(const Identifier &id) const =0

◆ getTime()

RecEmcTime RecEmcHit::getTime ( ) const
inline

Definition at line 49 of file RecEmcHit.h.

49{ return fTime; }

Referenced by operator<<().

◆ operator<()

bool RecEmcHit::operator< ( const RecEmcHit aHit) const
inline

Definition at line 37 of file RecEmcHit.h.

37 {
38 return fEnergy < aHit.fEnergy;
39 }

◆ operator>()

bool RecEmcHit::operator> ( const RecEmcHit aHit) const
inline

Definition at line 41 of file RecEmcHit.h.

41 {
42 return fEnergy > aHit.fEnergy;
43 }

◆ Time()

RecEmcTime RecEmcHit::Time ( const RecEmcTime Time)

Definition at line 93 of file RecEmcHit.cxx.

94{
95 fTime=Time;
96 return fTime;
97}

Referenced by Assign(), EmcRecDigit2Hit::Convert(), RecEmcHit(), and Time().

Member Data Documentation

◆ fCellId

RecEmcID RecEmcHit::fCellId
protected

◆ fEnergy

◆ fTime

RecEmcTime RecEmcHit::fTime
protected

Definition at line 70 of file RecEmcHit.h.

Referenced by Assign(), RecEmcFraction::Dump(), Dump(), getTime(), RecEmcHit(), and Time().


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