1#ifndef MDCTUNNINGSVC_H_
2#define MDCTUNNINGSVC_H_
4#include "GaudiKernel/IInterface.h"
5#include "GaudiKernel/Kernel.h"
6#include "GaudiKernel/Service.h"
7#include "GaudiKernel/IIncidentListener.h"
8#include "GaudiKernel/IDataProviderSvc.h"
17 virtual public IIncidentListener{
19 MdcTunningSvc(
const std::string& name, ISvcLocator* svcloc );
28 void handle(
const Incident&);
40 double NewSig(
int layerId,
double driftD);
41 double DeldriftD(
int layerId,
double driftD);
42 double Delcostta(
int layerId,
double costta);
43 double GetEff(
int layerId,
int cellId,
double driftD,
double cosTheta,
int posFlag);
44 double GetRes(
int layerId,
int cellId,
double driftD,
double cosTheta,
int posFlag,
double entranceAngle,
double& mean,
double&
sigma);
45 double GetRes2(
int layerId,
int cellId,
double driftD,
double cosTheta,
int posFlag,
double entranceAngle,
double&
f,
double& mean1,
double& sigma1,
double& mean2,
double& sigma2);
46 double GetRes3(
int layerId,
int cellId,
double driftD,
double cosTheta,
int posFlag,
double entranceAngle,
double&
f,
double& mean1,
double& sigma1,
double& mean2,
double& sigma2,
double& ResLargest,
double& ResSmallest,
double& ResRatio);
47 double ResvEntr(
int layerId,
double enterA,
int ilr,
double driftD);
48 double DelEtr_Sig(
int lay,
double enterA,
int ilr,
double driftD);
56 static const int docaNo=60;
57 static const int thetaNo=40;
59 double docaEff[43][docaNo];
60 double thetaEff[43][thetaNo];
61 double cellEff[43][288];
62 double docaRes[43][docaNo][2][2];
63 double docaF[43][docaNo][2];
64 double docaMean1[43][docaNo][2];
65 double docaSigma1[43][docaNo][2];
66 double docaMean2[43][docaNo][2];
67 double docaSigma2[43][docaNo][2];
70 double resLargest[43][docaNo][2];
71 double resSmallest[43][docaNo][2];
72 double resRatio[43][docaNo][2];
73 double resLargest_2[43][docaNo][2];
74 double resSmallest_2[43][docaNo][2];
75 double resRatio_2[43][docaNo][2];
77 double docaEff_2[43][docaNo];
78 double thetaEff_2[43][thetaNo];
79 double cellEff_2[43][288];
80 double docaRes_2[43][docaNo][2][2];
81 double docaF_2[43][docaNo][2];
82 double docaMean1_2[43][docaNo][2];
83 double docaSigma1_2[43][docaNo][2];
84 double docaMean2_2[43][docaNo][2];
85 double docaSigma2_2[43][docaNo][2];
87 std::string m_ParBossVer;
91 std::string m_effFile;
92 std::string m_resFile;
93 std::string m_effFile_endcap;
94 std::string m_resFile_endcap;
99 IDataProviderSvc* m_eventSvc;
104 std::string userName;
105 std::string password;
106 unsigned int serialNo;
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
double get_cellEff(int i, int j)
double DelEtr_Sig(int lay, double enterA, int ilr, double driftD)
void setMdcRes(std::string path)
bool setMcRes2(std::string res_con)
double get_docaEff(int i, int j)
bool setMcRes3(std::string res_con)
StatusCode getMdcTuningTableInfo()
double Delcostta(int layerId, double costta)
double get_thetaEff(int i, int j)
void handle(const Incident &)
double ResvEntr(int layerId, double enterA, int ilr, double driftD)
bool setMcEff(std::string eff_con)
double NewSig(int layerId, double driftD)
double DeldriftD(int layerId, double driftD)
double GetRes(int layerId, int cellId, double driftD, double cosTheta, int posFlag, double entranceAngle, double &mean, double &sigma)
double GetEff(int layerId, int cellId, double driftD, double cosTheta, int posFlag)
MdcTunningSvc(const std::string &name, ISvcLocator *svcloc)
virtual StatusCode finalize()
double GetRes2(int layerId, int cellId, double driftD, double cosTheta, int posFlag, double entranceAngle, double &f, double &mean1, double &sigma1, double &mean2, double &sigma2)
double GetRes3(int layerId, int cellId, double driftD, double cosTheta, int posFlag, double entranceAngle, double &f, double &mean1, double &sigma1, double &mean2, double &sigma2, double &ResLargest, double &ResSmallest, double &ResRatio)
virtual StatusCode initialize()