1#ifndef CGEMCALIBFUNSVC_H_
2#define CGEMCALIBFUNSVC_H_
4#include "GaudiKernel/IInterface.h"
5#include "GaudiKernel/Kernel.h"
6#include "GaudiKernel/Service.h"
7#include "GaudiKernel/IIncidentListener.h"
9#include "GaudiKernel/IDataProviderSvc.h"
10#include "GaudiKernel/SmartDataPtr.h"
11#include "GaudiKernel/DataSvc.h"
12#include "CalibData/CalibModel.h"
14#include "CalibDataSvc/ICalibRootSvc.h"
16#include "CgemGeomSvc/ICgemGeomSvc.h"
17#include "CgemCalibFunSvc/ICgemCalibFunSvc.h"
18#include "ReadCosmicRayData/CgemLUTReader.h"
28 virtual StatusCode
queryInterface(
const InterfaceID& riid,
void** ppvUnknown);
33 void handle(
const Incident&);
38 double getSigma(
int layer,
int xvFlag,
int readoutMode,
double angle,
double Q,
double T)
const;
41 double getTimeRising(
int layer,
int xvFlag,
int sheet,
int stripID,
double Q=100.,
double z=0.)
const;
44 double getTimeFalling(
int layer,
int xvFlag,
int sheet,
int stripID,
double Q=100.,
double z=0.)
const;
46 double getTimeWalk(
int layer,
int xvFlag,
int sheet,
int stripID,
double Q)
const;
47 double getTimeWalk(
double Q,
double threshold)
const;
49 bool initCalibConst();
54 IDataProviderSvc* m_pCalDataSvc;
57 static const int NLAYER = 3;
58 static const int NXV = 2;
59 static const int NSHEET = 2;
60 static const int NTHRESHODS = 20;
63 std::string m_timeFitFile;
64 std::string m_timeFitFilePath;
65 double m_tRising[
NLAYER][NXV][NSHEET];
66 double m_tFalling[
NLAYER][NXV][NSHEET];
68 std::string m_timeWalkFileName;
69 std::vector<double> m_tw;
70 std::vector<double> m_charge;
71 std::vector<double> m_threshold;
74 std::string m_fileLUT;
76 std::vector<double> m_valThreshold;
77 std::vector<int> m_thIdFrom;
78 std::vector<int> m_thIdEnd;
virtual StatusCode initialize()
double getTimeWalk(int layer, int xvFlag, int sheet, int stripID, double Q) const
CgemCalibFunSvc(const std::string &name, ISvcLocator *svcloc)
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvUnknown)
double getSigma(int layer, int xvFlag, int readoutMode, double angle, double Q, double T) const
virtual StatusCode finalize()
void handle(const Incident &)
double getTimeFalling(int layer, int xvFlag, int sheet, int stripID, double Q=100., double z=0.) const
double getTimeRising(int layer, int xvFlag, int sheet, int stripID, double Q=100., double z=0.) const