RecEmcFraction Class Reference

#include <RecEmcFraction.h>

Inheritance diagram for RecEmcFraction:

RecEmcHit ContainedObject List of all members.

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
virtual const CLID & clID () const
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)

Static Public Member Functions

static const CLID & classID ()

Protected Attributes

RecEmcFrac fFraction
RecEmcID fCellId
RecEmcEnergy fEnergy
RecEmcTime fTime

Detailed Description

Definition at line 17 of file RecEmcFraction.h.


Constructor & Destructor Documentation

RecEmcFraction::RecEmcFraction (  ) 

Definition at line 14 of file RecEmcFraction.cxx.

References fFraction.

00014                               :RecEmcHit()
00015 {
00016    fFraction=-1;
00017 }

RecEmcFraction::RecEmcFraction ( const RecEmcHit aHit  ) 

Definition at line 19 of file RecEmcFraction.cxx.

References fFraction.

00019                                                    :RecEmcHit(aHit)
00020 {
00021    fFraction=-1;
00022 }

RecEmcFraction::~RecEmcFraction (  ) 

Definition at line 24 of file RecEmcFraction.cxx.

00025 {
00026    //nothing to do
00027 }


Member Function Documentation

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

Definition at line 99 of file RecEmcHit.cxx.

References RecEmcHit::CellId(), RecEmcHit::fCellId, RecEmcHit::fEnergy, and RecEmcHit::fTime.

Referenced by RecEmcHitCnv::TObjectToDataObject().

00102 {
00103    fCellId=CellId;
00104    fEnergy=Energy;
00105    fTime=Time;
00106 }

RecEmcID RecEmcHit::CellId ( const RecEmcID CellId  )  [inherited]

Definition at line 81 of file RecEmcHit.cxx.

References RecEmcHit::fCellId.

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

00082 {
00083    fCellId=CellId;
00084    return fCellId;
00085 }

static const CLID& RecEmcHit::classID (  )  [inline, static, inherited]

Definition at line 24 of file RecEmcHit.h.

References CLID_RecEmcHit.

Referenced by RecEmcHit::clID().

00024 { return CLID_RecEmcHit; }

virtual const CLID& RecEmcHit::clID (  )  const [inline, virtual, inherited]

Definition at line 23 of file RecEmcHit.h.

References RecEmcHit::classID().

00023 { return  RecEmcHit::classID();}

double RecEmcFraction::Distance ( const RecEmcID  id  )  const

Definition at line 66 of file RecEmcFraction.cxx.

References check_raw_filter::dist, RecEmcHit::fCellId, EmcID::getPHI_BARREL_MAX(), phi2, EmcID::phi_module(), and EmcID::theta_module().

00067 {
00068   unsigned int tht,phi;
00069   unsigned int tht2,phi2;
00070   unsigned int dtht,dphi;
00071   double dist;
00072 
00073   tht=EmcID::theta_module(fCellId);
00074   phi=EmcID::phi_module(fCellId);
00075   tht2=EmcID::theta_module(id);
00076   phi2=EmcID::phi_module(id);
00077 
00078   dtht=tht>tht2 ? tht-tht2 : tht2-tht;
00079   dphi=phi>phi2 ? phi-phi2 : phi2-phi;
00080   if(dphi>(EmcID::getPHI_BARREL_MAX()+1)/2)
00081   {
00082     dphi=EmcID::getPHI_BARREL_MAX()+1-dphi;
00083   }
00084   dist=sqrt(double(dtht*dtht+dphi*dphi));
00085 
00086   return dist;
00087 }

void RecEmcFraction::Dump (  )  const

Reimplemented from RecEmcHit.

Definition at line 90 of file RecEmcFraction.cxx.

References RecEmcHit::fCellId, RecEmcHit::fEnergy, fFraction, and RecEmcHit::fTime.

00091 {
00092    cout<<"Fraction: ";
00093 
00094    cout<<fCellId<<", ";
00095    
00096    cout.width(12);
00097    cout.setf(ios::right);
00098    cout<<fEnergy<<", ";
00099    
00100    cout.width(12);
00101    cout.setf(ios::right);
00102    cout<<fTime<<", ";
00103 
00104    cout.width(12);
00105    cout.setf(ios::right);
00106    cout<<fFraction;
00107 
00108    cout<<endl;
00109 }

RecEmcEnergy RecEmcHit::Energy ( const RecEmcEnergy Energy  )  [inherited]

Definition at line 87 of file RecEmcHit.cxx.

References RecEmcHit::fEnergy.

Referenced by EmcRecDigit2Hit::Convert().

00088 {
00089    fEnergy=Energy;
00090    return fEnergy;
00091 }

RecEmcFrac RecEmcFraction::Fraction ( const RecEmcFrac Fraction  ) 

Definition at line 59 of file RecEmcFraction.cxx.

References fFraction.

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

00060 {
00061    fFraction=Fraction;
00062    return fFraction;
00063 }

RecEmcID RecEmcHit::getCellId (  )  const [inline, inherited]

Definition at line 47 of file RecEmcHit.h.

References RecEmcHit::fCellId.

Referenced by EmcRecDigit2Hit::Convert(), RecEmcShower::Erase(), RecEmcCluster::Erase(), RecEmcShower::Insert(), RecEmcCluster::Insert(), RecEmcCluster::InsertSeed(), operator<<(), EmcRecSeedLocalMax::Seed(), EmcRecSeedEThreshold::Seed(), and EmcRecSplitWeighted::Split().

00047 { return fCellId; }

HepPoint3D RecEmcHit::getCenter (  )  const [inherited]

Definition at line 57 of file RecEmcHit.cxx.

References RecEmcHit::fCellId, and IEmcRecGeoSvc::GetCCenter().

00058 {
00059   IEmcRecGeoSvc* iGeoSvc;
00060   ISvcLocator* svcLocator = Gaudi::svcLocator();
00061   StatusCode sc = svcLocator->service("EmcRecGeoSvc",iGeoSvc);
00062   if(sc!=StatusCode::SUCCESS) {
00063     cout<<"Error: Can't get EmcRecGeoSvc"<<endl;
00064   }
00065 
00066   return iGeoSvc->GetCCenter(fCellId);
00067 }

RecEmcEnergy RecEmcHit::getEnergy (  )  const [inline, inherited]

Definition at line 48 of file RecEmcHit.h.

References RecEmcHit::fEnergy.

Referenced by EmcRecDigit2Hit::Convert(), operator<<(), EmcRecSeedLocalMax::Seed(), EmcRecSeedEThreshold::Seed(), and EmcRecSplitWeighted::Split().

00048 { return fEnergy; }

RecEmcFrac RecEmcFraction::getFraction (  )  const

Definition at line 54 of file RecEmcFraction.cxx.

References fFraction.

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

00055 {
00056    return fFraction;
00057 }

HepPoint3D RecEmcHit::getFrontCenter (  )  const [inherited]

Definition at line 69 of file RecEmcHit.cxx.

References RecEmcHit::fCellId, and IEmcRecGeoSvc::GetCFrontCenter().

00070 {
00071   IEmcRecGeoSvc* iGeoSvc;
00072   ISvcLocator* svcLocator = Gaudi::svcLocator();
00073   StatusCode sc = svcLocator->service("EmcRecGeoSvc",iGeoSvc);
00074   if(sc!=StatusCode::SUCCESS) {
00075     cout<<"Error: Can't get EmcRecGeoSvc"<<endl;
00076   }
00077 
00078   return iGeoSvc->GetCFrontCenter(fCellId);
00079 }

RecEmcTime RecEmcHit::getTime (  )  const [inline, inherited]

Definition at line 49 of file RecEmcHit.h.

References RecEmcHit::fTime.

Referenced by operator<<().

00049 { return fTime; }

bool RecEmcHit::operator< ( const RecEmcHit aHit  )  const [inline, inherited]

Definition at line 37 of file RecEmcHit.h.

References RecEmcHit::fEnergy.

00037                                                  {
00038      return fEnergy < aHit.fEnergy;
00039    }

bool RecEmcFraction::operator< ( const RecEmcFraction aFraction  )  const [inline]

Definition at line 29 of file RecEmcFraction.h.

References RecEmcHit::fEnergy, and fFraction.

00029                                                            {
00030      return fEnergy*fFraction < aFraction.fEnergy*aFraction.fFraction;
00031    }

bool RecEmcHit::operator> ( const RecEmcHit aHit  )  const [inline, inherited]

Definition at line 41 of file RecEmcHit.h.

References RecEmcHit::fEnergy.

00041                                                  {
00042      return fEnergy > aHit.fEnergy;
00043    }

bool RecEmcFraction::operator> ( const RecEmcFraction aFraction  )  const [inline]

Definition at line 33 of file RecEmcFraction.h.

References RecEmcHit::fEnergy, and fFraction.

00033                                                            {
00034      return fEnergy*fFraction > aFraction.fEnergy*aFraction.fFraction;
00035    }

RecEmcTime RecEmcHit::Time ( const RecEmcTime Time  )  [inherited]

Definition at line 93 of file RecEmcHit.cxx.

References RecEmcHit::fTime.

Referenced by EmcRecDigit2Hit::Convert().

00094 {
00095    fTime=Time;
00096    return fTime;
00097 }


Member Data Documentation

RecEmcID RecEmcHit::fCellId [protected, inherited]

Definition at line 68 of file RecEmcHit.h.

Referenced by RecEmcHit::Assign(), RecEmcHit::CellId(), Distance(), RecEmcHit::Dump(), Dump(), RecEmcHit::getCellId(), RecEmcHit::getCenter(), RecEmcHit::getFrontCenter(), and RecEmcHit::RecEmcHit().

RecEmcEnergy RecEmcHit::fEnergy [protected, inherited]

Definition at line 69 of file RecEmcHit.h.

Referenced by RecEmcHit::Assign(), RecEmcHit::Dump(), Dump(), RecEmcHit::Energy(), RecEmcHit::getEnergy(), RecEmcHit::operator<(), operator<(), RecEmcHit::operator>(), operator>(), and RecEmcHit::RecEmcHit().

RecEmcFrac RecEmcFraction::fFraction [protected]

Definition at line 51 of file RecEmcFraction.h.

Referenced by Dump(), Fraction(), getFraction(), operator<(), operator>(), and RecEmcFraction().

RecEmcTime RecEmcHit::fTime [protected, inherited]

Definition at line 70 of file RecEmcHit.h.

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


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