1#include "GaudiKernel/IInterface.h"
2#include "GaudiKernel/Kernel.h"
3#include "GaudiKernel/MsgStream.h"
4#include "GaudiKernel/PropertyMgr.h"
5#include "GaudiKernel/StatusCode.h"
8#include "EmcRecGeoSvc/EmcRecROOTGeo.h"
16 : base_class( name, svcloc ) {
20 declareProperty(
"Gdml", fGdml );
28 if ( fROOTGeo )
delete fROOTGeo;
43 MsgStream log(
msgSvc(), name() );
44 log << MSG::INFO << name() <<
": Start of run initialisation" << endmsg;
46 StatusCode sc = Service::initialize();
47 if ( sc.isFailure() )
return sc;
50 if ( fGdml ) { fROOTGeo->InitFromXML(); }
51 return StatusCode::SUCCESS;
55 MsgStream log(
msgSvc(), name() );
56 log << MSG::INFO << name() <<
": End of Run" << endmsg;
57 return StatusCode::SUCCESS;
61 if ( fGdml ) {
return fROOTGeo->GetCrystal(
id ); }
67 else { cry = fEndCap.GetCrystal(
id ); }
75 if ( fGdml ) { cry = fROOTGeo->GetCrystal(
id ); }
79 else { cry = fEndCap.GetCrystal(
id ); }
81 return cry.
Get( i ) / cm;
85 if ( fGdml ) {
return fROOTGeo->GetCCenter(
id ) / cm; }
91 else { center = fEndCap.GetCCenter(
id ); }
98 if ( fGdml ) {
return fROOTGeo->GetCFrontCenter(
id ) / cm; }
103 if (
EmcID::is_barrel(
id ) ) { frontCenter = fBarrel.GetCFrontCenter(
id ); }
104 else { frontCenter = fEndCap.GetCFrontCenter(
id ); }
106 return frontCenter / cm;
DECLARE_COMPONENT(BesBdkRc)
HepGeom::Point3D< double > HepPoint3D
static bool is_barrel(const Identifier &id)
Test for barrel.
HepPoint3D Get(int index) const
virtual double GetBarrelL() const
virtual HepPoint3D GetCrystalPoint(const Identifier &id, const int i) const
virtual int GetBarrelNPhiMax() const
virtual double GetBarrelR() const
virtual HepPoint3D GetCFrontCenter(const Identifier &id) const
EmcRecGeoSvc(const std::string &name, ISvcLocator *svcloc)
virtual EmcRecCrystal GetCrystal(const Identifier &id) const
virtual StatusCode initialize()
virtual StatusCode finalize()
virtual double GetBarrelh2() const
virtual double GetBarrelOffset1() const
virtual HepPoint3D GetCCenter(const Identifier &id) const
virtual double GetBarrelOffset2() const
virtual int GetBarrelNThetaMax() const
virtual double GetBarrelh1() const
virtual double GetBarrelh3() const