9#include "EmcRec/EmcRecDigit2Hit.h"
10#include "EmcRec/EmcRecParameter.h"
12#include "EmcCalibConstSvc/EmcCalibConstSvc.h"
13#include "RawDataProviderSvc/RawDataProviderSvc.h"
14#include "RawDataProviderSvc/EmcRawDataProvider.h"
15#include "GaudiKernel/Bootstrap.h"
16#include "GaudiKernel/ISvcLocator.h"
19#include "GaudiKernel/ThreadGaudi.h"
31 RecEmcDigitMap::const_iterator ciDigitMap;
39 sc= Gaudi::svcLocator()->service(
"EmcCalibConstSvc", emcCalibConstSvc);
40 if(sc != StatusCode::SUCCESS) {
47 std::string rawDataProviderSvc_name(
"RawDataProviderSvc");
48 if(isGaudiThreaded(m_algName)) {
49 rawDataProviderSvc_name += getGaudiThreadIDfromName(m_algName);
52 sc = Gaudi::svcLocator()->service(rawDataProviderSvc_name.c_str(), rawDataProviderSvc);
53 if(sc != StatusCode::SUCCESS) {
57 for(ciDigitMap=aDigitMap.begin();
58 ciDigitMap!=aDigitMap.end();
65 double ein,ecorr,eout;
75 int index = emcCalibConstSvc->
getIndex(partId,theta,phi);
103 unsigned int module,theta,phi;
105 RecEmcHitMap::const_iterator ci_HitMap;
111 module=EmcID::EmcID::getBARREL();
123 ci_HitMap=aHitMap.find(
id);
124 if(ci_HitMap!=aHitMap.end()) {
125 e=ci_HitMap->second.getEnergy();
139 module=EmcID::EmcID::getENDCAP_EAST();
141 module=EmcID::EmcID::getENDCAP_WEST();
147 unsigned int module,theta,phi;
149 RecEmcHitMap::const_iterator ci_HitMap;
154 if(module==EmcID::EmcID::getENDCAP_EAST()){
157 else if(module==EmcID::EmcID::getENDCAP_WEST()){
170 ci_HitMap=aHitMap.find(
id);
171 if(ci_HitMap!=aHitMap.end()) {
172 e=ci_HitMap->second.getEnergy();
215 ci_HitMap=aHitMap.find(
id);
216 if(ci_HitMap!=aHitMap.end()) {
217 e=ci_HitMap->second.getEnergy();
map< RecEmcID, RecEmcDigit, less< RecEmcID > > RecEmcDigitMap
map< RecEmcID, RecEmcHit, less< RecEmcID > > RecEmcHitMap
static unsigned int getPHI_BARREL_MAX()
static Identifier crystal_id(const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
For a single crystal.
static unsigned int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
static unsigned int getTHETA_ENDCAP_MIN()
static unsigned int getTHETA_ENDCAP_MAX()
static unsigned int getTHETA_BARREL_MIN()
static unsigned int getTHETA_BARREL_MAX()
static unsigned int theta_module(const Identifier &id)
static unsigned int getPHI_ENDCAP_MAX(const unsigned int theta)
static unsigned int getPHI_ENDCAP_MIN()
static unsigned int getPHI_BARREL_MIN()
static unsigned int phi_module(const Identifier &id)
void Convert(const RecEmcDigitMap &aDigitMap, RecEmcHitMap &aHitMap)
void OutputEndcap(const RecEmcHitMap &aHitMap, const unsigned int module_ew) const
void Output(const RecEmcHitMap &aHitMap) const
static EmcRecParameter & GetInstance()
double ElectronicsNoiseLevel() const
double ElecBias(int n) const
virtual double getDigiCalibConst(int No) const =0
virtual int getIndex(unsigned int PartId, unsigned int ThetaIndex, unsigned int PhiIndex) const =0
virtual bool isOnlineMode()=0
RecEmcEnergy getEnergy() const
RecEmcEnergy Energy(const RecEmcEnergy &Energy)
RecEmcID CellId(const RecEmcID &CellId)
RecEmcID getCellId() const
RecEmcTime Time(const RecEmcTime &Time)