Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

EmcRecGeoSvc Class Reference

#include <EmcRecGeoSvc.h>

Inheritance diagram for EmcRecGeoSvc:

IEmcRecGeoSvc IEmcRecGeoSvc List of all members.

Public Member Functions

 EmcRecGeoSvc (const std::string &name, ISvcLocator *svcloc)
 EmcRecGeoSvc (const std::string &name, ISvcLocator *svcloc)
virtual StatusCode finalize ()
virtual StatusCode finalize ()
virtual double GetBarrelh1 () const
virtual double GetBarrelh1 () const
virtual double GetBarrelh2 () const
virtual double GetBarrelh2 () const
virtual double GetBarrelh3 () const
virtual double GetBarrelh3 () const
virtual double GetBarrelL () const
virtual double GetBarrelL () const
virtual int GetBarrelNPhiMax () const
virtual int GetBarrelNPhiMax () const
virtual int GetBarrelNThetaMax () const
virtual int GetBarrelNThetaMax () const
virtual double GetBarrelOffset1 () const
virtual double GetBarrelOffset1 () const
virtual double GetBarrelOffset2 () const
virtual double GetBarrelOffset2 () const
virtual double GetBarrelR () const
virtual double GetBarrelR () const
virtual HepPoint3D GetCCenter (const Identifier &id) const
virtual HepPoint3D GetCCenter (const Identifier &id) const
virtual HepPoint3D GetCFrontCenter (const Identifier &id) const
virtual HepPoint3D GetCFrontCenter (const Identifier &id) const
virtual EmcRecCrystal GetCrystal (const Identifier &id) const
virtual EmcRecCrystal GetCrystal (const Identifier &id) const
virtual HepPoint3D GetCrystalPoint (const Identifier &id, const int i) const
virtual HepPoint3D GetCrystalPoint (const Identifier &id, const int i) const
virtual StatusCode initialize ()
virtual StatusCode initialize ()
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvUnknown)
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvUnknown)
 ~EmcRecGeoSvc ()
 ~EmcRecGeoSvc ()

Static Public Member Functions

const InterfaceID & interfaceID ()
const InterfaceID & interfaceID ()

Private Attributes

EmcRecBarrelGeo fBarrel
EmcRecEndCapGeo fEndCap
bool fGdml
EmcRecROOTGeofROOTGeo
EmcRecROOTGeofROOTGeo

Constructor & Destructor Documentation

EmcRecGeoSvc::EmcRecGeoSvc const std::string &  name,
ISvcLocator *  svcloc
 

00015                                                                        : Service(name, svcloc) 
00016 {
00017   fGdml = true;
00018 
00019   // Declare the properties  
00020   declareProperty("Gdml",fGdml);
00021 
00022   if(fGdml) {
00023     fROOTGeo = new EmcRecROOTGeo();
00024   }
00025 }

EmcRecGeoSvc::~EmcRecGeoSvc  ) 
 

00028 {
00029   if(fGdml) {
00030     if(fROOTGeo) delete fROOTGeo;
00031   }
00032 }

EmcRecGeoSvc::EmcRecGeoSvc const std::string &  name,
ISvcLocator *  svcloc
 

EmcRecGeoSvc::~EmcRecGeoSvc  ) 
 


Member Function Documentation

virtual StatusCode EmcRecGeoSvc::finalize  )  [virtual]
 

StatusCode EmcRecGeoSvc::finalize  )  [virtual]
 

00059                                     {
00060   MsgStream log(messageService(), name());
00061   log << MSG::INFO << name() << ": End of Run" << endreq;
00062   return StatusCode::SUCCESS;
00063 }

virtual double EmcRecGeoSvc::GetBarrelh1  )  const [virtual]
 

Implements IEmcRecGeoSvc.

double EmcRecGeoSvc::GetBarrelh1  )  const [virtual]
 

Implements IEmcRecGeoSvc.

00144 {
00145   return fBarrel.GetBarrelh1()/cm;
00146 }

virtual double EmcRecGeoSvc::GetBarrelh2  )  const [virtual]
 

Implements IEmcRecGeoSvc.

double EmcRecGeoSvc::GetBarrelh2  )  const [virtual]
 

Implements IEmcRecGeoSvc.

00149 {
00150   return fBarrel.GetBarrelh2()/cm;
00151 }

virtual double EmcRecGeoSvc::GetBarrelh3  )  const [virtual]
 

Implements IEmcRecGeoSvc.

double EmcRecGeoSvc::GetBarrelh3  )  const [virtual]
 

Implements IEmcRecGeoSvc.

00154 {
00155   return fBarrel.GetBarrelh3()/cm;
00156 }

virtual double EmcRecGeoSvc::GetBarrelL  )  const [virtual]
 

Implements IEmcRecGeoSvc.

double EmcRecGeoSvc::GetBarrelL  )  const [virtual]
 

Implements IEmcRecGeoSvc.

00159 {
00160   return fBarrel.GetBarrelL()/cm;
00161 }

virtual int EmcRecGeoSvc::GetBarrelNPhiMax  )  const [virtual]
 

Implements IEmcRecGeoSvc.

int EmcRecGeoSvc::GetBarrelNPhiMax  )  const [virtual]
 

Implements IEmcRecGeoSvc.

00164 {
00165   return fBarrel.GetBarrelNPhiMax();
00166 }

virtual int EmcRecGeoSvc::GetBarrelNThetaMax  )  const [virtual]
 

Implements IEmcRecGeoSvc.

int EmcRecGeoSvc::GetBarrelNThetaMax  )  const [virtual]
 

Implements IEmcRecGeoSvc.

00169 {
00170   return fBarrel.GetBarrelNThetaMax();
00171 }

virtual double EmcRecGeoSvc::GetBarrelOffset1  )  const [virtual]
 

Implements IEmcRecGeoSvc.

double EmcRecGeoSvc::GetBarrelOffset1  )  const [virtual]
 

Implements IEmcRecGeoSvc.

00134 {
00135   return fBarrel.GetBarrelOffset1()/cm;
00136 }

virtual double EmcRecGeoSvc::GetBarrelOffset2  )  const [virtual]
 

Implements IEmcRecGeoSvc.

double EmcRecGeoSvc::GetBarrelOffset2  )  const [virtual]
 

Implements IEmcRecGeoSvc.

00139 {
00140   return fBarrel.GetBarrelOffset2()/cm;
00141 }

virtual double EmcRecGeoSvc::GetBarrelR  )  const [virtual]
 

Implements IEmcRecGeoSvc.

double EmcRecGeoSvc::GetBarrelR  )  const [virtual]
 

Implements IEmcRecGeoSvc.

00129 {
00130   return fBarrel.GetBarrelR()/cm;
00131 }

virtual HepPoint3D EmcRecGeoSvc::GetCCenter const Identifier id  )  const [virtual]
 

Implements IEmcRecGeoSvc.

HepPoint3D EmcRecGeoSvc::GetCCenter const Identifier id  )  const [virtual]
 

Implements IEmcRecGeoSvc.

00096                                                              {
00097   if(fGdml) {
00098     return fROOTGeo->GetCCenter(id)/cm;
00099   } else {
00100     HepPoint3D center;
00101 
00102     if(EmcID::is_barrel(id)) {
00103       center=fBarrel.GetCCenter(id);
00104     } else {
00105       center=fEndCap.GetCCenter(id);
00106     }
00107 
00108     return center/cm;
00109   }
00110 }

virtual HepPoint3D EmcRecGeoSvc::GetCFrontCenter const Identifier id  )  const [virtual]
 

Implements IEmcRecGeoSvc.

HepPoint3D EmcRecGeoSvc::GetCFrontCenter const Identifier id  )  const [virtual]
 

Implements IEmcRecGeoSvc.

00112                                                                   {
00113   if(fGdml) {
00114     return fROOTGeo->GetCFrontCenter(id)/cm;
00115   } else {
00116     HepPoint3D frontCenter;
00117 
00118     if(EmcID::is_barrel(id)) {
00119       frontCenter=fBarrel.GetCFrontCenter(id);
00120     } else {
00121       frontCenter=fEndCap.GetCFrontCenter(id);
00122     }
00123 
00124     return frontCenter/cm;
00125   }
00126 }

virtual EmcRecCrystal EmcRecGeoSvc::GetCrystal const Identifier id  )  const [virtual]
 

Implements IEmcRecGeoSvc.

EmcRecCrystal EmcRecGeoSvc::GetCrystal const Identifier id  )  const [virtual]
 

Implements IEmcRecGeoSvc.

00065                                                                 {
00066   if(fGdml) {
00067     return fROOTGeo->GetCrystal(id);
00068   } else {
00069     EmcRecCrystal cry;
00070 
00071     if(EmcID::is_barrel(id)) {
00072       cry=fBarrel.GetCrystal(id);
00073     } else {
00074       cry=fEndCap.GetCrystal(id);
00075     }
00076 
00077     return cry;
00078   }
00079 
00080 }

virtual HepPoint3D EmcRecGeoSvc::GetCrystalPoint const Identifier id,
const int  i
const [virtual]
 

Implements IEmcRecGeoSvc.

HepPoint3D EmcRecGeoSvc::GetCrystalPoint const Identifier id,
const int  i
const [virtual]
 

Implements IEmcRecGeoSvc.

00082                                                                                {
00083   EmcRecCrystal cry;
00084   if(fGdml) {
00085     cry=fROOTGeo->GetCrystal(id);
00086   } else {
00087     if(EmcID::is_barrel(id)) {
00088       cry=fBarrel.GetCrystal(id);
00089     } else {
00090       cry=fEndCap.GetCrystal(id);
00091     }
00092   }
00093   return cry.Get(i)/cm;
00094 }

virtual StatusCode EmcRecGeoSvc::initialize  )  [virtual]
 

StatusCode EmcRecGeoSvc::initialize  )  [virtual]
 

00044                                       {
00045   MsgStream log(messageService(), name());
00046   log << MSG::INFO << name() << ": Start of run initialisation" << endreq;
00047 
00048   StatusCode sc = Service::initialize();
00049   if ( sc.isFailure() ) return sc;
00050 
00051   // initialize geometry from gdml
00052   if(fGdml) {
00053     fROOTGeo->InitFromXML();
00054   }
00055   return StatusCode::SUCCESS;
00056 }

const InterfaceID& IEmcRecGeoSvc::interfaceID  )  [inline, static, inherited]
 

00042 { return IID_IEmcRecGeoSvc; } 

const InterfaceID& IEmcRecGeoSvc::interfaceID  )  [inline, static, inherited]
 

00042 { return IID_IEmcRecGeoSvc; } 

virtual StatusCode EmcRecGeoSvc::queryInterface const InterfaceID &  riid,
void **  ppvUnknown
[virtual]
 

StatusCode EmcRecGeoSvc::queryInterface const InterfaceID &  riid,
void **  ppvUnknown
[virtual]
 

00034                                                                                      {
00035 
00036   if ( IID_IEmcRecGeoSvc.versionMatch(riid) ) { 
00037     *ppvInterface = static_cast<IEmcRecGeoSvc*> (this); 
00038   } else { 
00039     return Service::queryInterface(riid, ppvInterface) ; 
00040   }
00041   return StatusCode::SUCCESS;
00042 }


Member Data Documentation

EmcRecBarrelGeo EmcRecGeoSvc::fBarrel [private]
 

EmcRecEndCapGeo EmcRecGeoSvc::fEndCap [private]
 

bool EmcRecGeoSvc::fGdml [private]
 

EmcRecROOTGeo* EmcRecGeoSvc::fROOTGeo [private]
 

EmcRecROOTGeo* EmcRecGeoSvc::fROOTGeo [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 16:02:00 2011 for BOSS6.5.5 by  doxygen 1.3.9.1