BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
RecEmcFraction Class Reference

#include <RecEmcFraction.h>

+ Inheritance diagram for RecEmcFraction:

Public Member Functions

 RecEmcFraction ()
 
 RecEmcFraction (const RecEmcHit &aHit)
 
 ~RecEmcFraction ()
 
bool operator< (const RecEmcFraction &aFraction) const
 
bool operator> (const RecEmcFraction &aFraction) const
 
RecEmcFrac getFraction () const
 
RecEmcFrac Fraction (const RecEmcFrac &Fraction)
 
double Distance (const RecEmcID id) const
 
void Dump () const
 
- Public Member Functions inherited from RecEmcHit
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
 

Protected Attributes

RecEmcFrac fFraction
 
- Protected Attributes inherited from RecEmcHit
RecEmcID fCellId
 
RecEmcEnergy fEnergy
 
RecEmcTime fTime
 

Additional Inherited Members

- Static Public Member Functions inherited from RecEmcHit
static const CLID & classID ()
 

Detailed Description

Definition at line 17 of file RecEmcFraction.h.

Constructor & Destructor Documentation

◆ RecEmcFraction() [1/2]

RecEmcFraction::RecEmcFraction ( )

Definition at line 14 of file RecEmcFraction.cxx.

14 :RecEmcHit()
15{
16 fFraction=-1;
17}
RecEmcFrac fFraction

◆ RecEmcFraction() [2/2]

RecEmcFraction::RecEmcFraction ( const RecEmcHit & aHit)

Definition at line 19 of file RecEmcFraction.cxx.

19 :RecEmcHit(aHit)
20{
21 fFraction=-1;
22}

◆ ~RecEmcFraction()

RecEmcFraction::~RecEmcFraction ( )

Definition at line 24 of file RecEmcFraction.cxx.

25{
26 //nothing to do
27}

Member Function Documentation

◆ Distance()

double RecEmcFraction::Distance ( const RecEmcID id) const

Definition at line 66 of file RecEmcFraction.cxx.

67{
68 unsigned int tht,phi;
69 unsigned int tht2,phi2;
70 unsigned int dtht,dphi;
71 double dist;
72
75 tht2=EmcID::theta_module(id);
77
78 dtht=tht>tht2 ? tht-tht2 : tht2-tht;
79 dphi=phi>phi2 ? phi-phi2 : phi2-phi;
80 if(dphi>(EmcID::getPHI_BARREL_MAX()+1)/2)
81 {
82 dphi=EmcID::getPHI_BARREL_MAX()+1-dphi;
83 }
84 dist=sqrt(double(dtht*dtht+dphi*dphi));
85
86 return dist;
87}
Double_t phi2
static unsigned int getPHI_BARREL_MAX()
Definition EmcID.cxx:107
static unsigned int theta_module(const Identifier &id)
Definition EmcID.cxx:43
static unsigned int phi_module(const Identifier &id)
Definition EmcID.cxx:48
RecEmcID fCellId
Definition RecEmcHit.h:68

◆ Dump()

void RecEmcFraction::Dump ( ) const

Definition at line 90 of file RecEmcFraction.cxx.

91{
92 cout<<"Fraction: ";
93
94 cout<<fCellId<<", ";
95
96 cout.width(12);
97 cout.setf(ios::right);
98 cout<<fEnergy<<", ";
99
100 cout.width(12);
101 cout.setf(ios::right);
102 cout<<fTime<<", ";
103
104 cout.width(12);
105 cout.setf(ios::right);
106 cout<<fFraction;
107
108 cout<<endl;
109}
RecEmcEnergy fEnergy
Definition RecEmcHit.h:69
RecEmcTime fTime
Definition RecEmcHit.h:70

◆ Fraction()

RecEmcFrac RecEmcFraction::Fraction ( const RecEmcFrac & Fraction)

Definition at line 59 of file RecEmcFraction.cxx.

60{
62 return fFraction;
63}
RecEmcFrac Fraction(const RecEmcFrac &Fraction)

Referenced by Fraction(), EmcRecSplitWeighted::Split(), and RecEmcShowerCnv::TObjectToDataObject().

◆ getFraction()

RecEmcFrac RecEmcFraction::getFraction ( ) const

Definition at line 54 of file RecEmcFraction.cxx.

55{
56 return fFraction;
57}

Referenced by operator<<(), and EmcRecSplitWeighted::Split().

◆ operator<()

bool RecEmcFraction::operator< ( const RecEmcFraction & aFraction) const
inline

Definition at line 29 of file RecEmcFraction.h.

29 {
30 return fEnergy*fFraction < aFraction.fEnergy*aFraction.fFraction;
31 }

◆ operator>()

bool RecEmcFraction::operator> ( const RecEmcFraction & aFraction) const
inline

Definition at line 33 of file RecEmcFraction.h.

33 {
34 return fEnergy*fFraction > aFraction.fEnergy*aFraction.fFraction;
35 }

Member Data Documentation

◆ fFraction

RecEmcFrac RecEmcFraction::fFraction
protected

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