BOSS 7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
TofCaliSvc.h
Go to the documentation of this file.
1// $Id: TofCaliSvc.h,v 1.35 2019/09/20 07:22:15 sunss Exp $ // -*-c++-*-
2// header file for a class called "TofCaliSvc"
3#ifndef TOFCALISVC_H
4#define TOFCALISVC_H
5
6#include <iostream>
7#include <ios>
8#include <vector>
9//#include "DBBesGeoBarTOF/DB2BesGeoBarTOF.h"
10//#include "DBBesGeoEndTOF/DB2BesGeoEndTOF.h"
11
12#include "TofCaliSvc/BTofCal.h"
13#include "TofCaliSvc/BTofCommonCal.h"
14#include "TofCaliSvc/ETofCal.h"
15#include "TofCaliSvc/EtfCal.h"
17#include "TofCaliSvc/TofInfoCal.h"
18
19#include "GaudiKernel/Service.h"
20#include "GaudiKernel/IInterface.h"
21#include "GaudiKernel/Property.h"
23#include "GaudiKernel/IIncidentListener.h"
24#include "GaudiKernel/IDataProviderSvc.h"
25
26class TofCaliSvc : public Service, virtual public ITofCaliSvc,virtual public IIncidentListener
27{
28public:
29 // Constructors and destructors
30 TofCaliSvc( const std::string& name, ISvcLocator* svcloc );
32
33 virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvUnknown);
34 virtual StatusCode initialize ( );
35 virtual StatusCode finalize ( );
36 void handle(const Incident&);
37
38 StatusCode chooseConstants( int run, int number );
39
40 // Access by others
41 BTofCal* BTof(unsigned int id) const;
43 ETofCal* ETof(unsigned int id) const;
44 EtfCal* EtfTof(unsigned int id) const;
45 TofInfoCal* TofInfo() const;
46
47 const double BTDelay1(unsigned int id);
48 const double BTDelay2(unsigned int id);
49 const double ETDelay(unsigned int id);
50 const double BTCorr1(double ADC,double zHit,unsigned int id);
51 const double BTCorr2(double ADC,double zHit,unsigned int id);
52 const double BTCorrOffset1(double zHit,unsigned int id,double t0);
53 const double BTCorrOffset2(double zHit,unsigned int id,double t0);
54 const double TOffset();
55 const double BTime1(double ADC,double TDC,double zHit,unsigned int id,double t0);
56 const double BTime2(double ADC,double TDC,double zHit,unsigned int id,double t0);
57 const double ETime(double ADC,double TDC,double rHit,unsigned int id);
58 const double EtfTime(double ADC1,double ADC2, double TDC1, double TDC2,unsigned int id, unsigned int strip, double t0);
59 const double EtfTime1(double ADC,double TDC,double zHit,unsigned int id, unsigned int strip, double t0);
60 const double EtfTime2(double ADC,double TDC,double zHit,unsigned int id, unsigned int strip, double t0);
61 const double EtfTimeMC(double ADC1,double ADC2, double TDC1, double TDC2,unsigned int id, unsigned int strip, double t0);
62 const double EtfTimeMC1(double ADC,double TDC,double zHit,unsigned int id, unsigned int strip, double t0);
63 const double EtfTimeMC2(double ADC,double TDC,double zHit,unsigned int id, unsigned int strip, double t0);
64 const double EtfTime(double tleft,double tright);
65 const double EtfBunchP(int index);
66 const double BTimeCounter(double tleft,double tright,double z,unsigned int id);
67 const double BTimeCluster(double tlayer1,double tlayer2,double z1, double z2,unsigned int id1, unsigned int id2);
68 const double BSigma1(double zHit, unsigned int id);
69 const double BSigma2(double zHit, unsigned int id);
70 const double BSigmaCounter(double zHit, unsigned int id);
71 const double BSigmaCluster(double zHit1, double zHit2, unsigned int id1, unsigned int id2);
72 const double ESigma(double rHit, unsigned int id);
73 const double BPulseHeight1(double ADC, double zHit, double sint, unsigned int id);
74 const double BPulseHeight2(double ADC, double zHit, double sint, unsigned int id);
75 const double BPulseHeight(double ADC1, double ADC2, double zHit, double sint, unsigned int id);
76 const double BPh(double ADC1, double ADC2, double zHit, unsigned int id);
77 const double EPulseHeight(double ADC, double rHit, double cost, unsigned int id);
78 const double EPh(double ADC, double rHit, unsigned int id);
79 const double BVeff(unsigned int id);
80 const double BAtten(unsigned int id);
81 const double BGainForward(unsigned int id);
82 const double BGainBackward(unsigned int id);
83 const double getQ0(unsigned int id);
84 const double EVeff(unsigned int id);
85 const double EAtten(unsigned int id);
86 const double EGain(unsigned int id);
87 const double EtfVeff(unsigned int id, unsigned int strip);
88 const double ZTDC(double tleft, double tright, unsigned int id);
89 const double ZTDC1(double tright, unsigned int id, double z);
90 const double ZTDC2(double tleft, unsigned int id, double z);
91 const double ZADC(double qleft, double qright, unsigned int id);
92 const double ZADC1(double qright, unsigned int id, double z);
93 const double ZADC2(double qleft, unsigned int id, double z);
94 const double EtfZTDC(double tleft, double tright, unsigned int id, unsigned int strip);
95 const int RunBegin();
96 const int RunEnd();
97 const int Version();
98 const int QCorr();
99 const int QElec();
100 const int MisLable();
101 const int BrEast(unsigned int No);
102 const int BrWest(unsigned int No);
103 const int Endcap(unsigned int No);
104 const int Etf(unsigned int No);
105 const int RunFrom();
106 const int RunTo();
107 const int EventFrom();
108 const int EventTo();
109 void Dump();
110
111private:
112 StatusCode FillfromDatabase();
113 bool m_hasbeeninitialized;
114 unsigned int m_sequence;
115
116private:
117 IDataProviderSvc* m_pCalibDataSvc;
118 IntegerProperty m_run;
119 std::vector<BTofCal*> fBTofCal;
120 std::vector<ETofCal*> fETofCal;
121 std::vector<EtfCal*> fEtfCal;
122 std::vector<EtfBunchCal*> fEtfBunchCal;
123 std::vector<BTofCommonCal*> fBTofCommonCal;
124 std::vector<TofInfoCal*> fTofInfoCal;
125
126};
127#endif /* TOF_REC_GEO_H */
const double BTimeCounter(double tleft, double tright, double z, unsigned int id)
Definition: TofCaliSvc.cxx:549
const double ZADC(double qleft, double qright, unsigned int id)
const double EtfTime(double ADC1, double ADC2, double TDC1, double TDC2, unsigned int id, unsigned int strip, double t0)
const double BPulseHeight1(double ADC, double zHit, double sint, unsigned int id)
Definition: TofCaliSvc.cxx:867
const double BPh(double ADC1, double ADC2, double zHit, unsigned int id)
Definition: TofCaliSvc.cxx:895
const int RunBegin()
const double ZTDC2(double tleft, unsigned int id, double z)
Definition: TofCaliSvc.cxx:993
const double BPulseHeight2(double ADC, double zHit, double sint, unsigned int id)
Definition: TofCaliSvc.cxx:876
const int MisLable()
const double EGain(unsigned int id)
const double BTimeCluster(double tlayer1, double tlayer2, double z1, double z2, unsigned int id1, unsigned int id2)
Definition: TofCaliSvc.cxx:570
const double EPh(double ADC, double rHit, unsigned int id)
Definition: TofCaliSvc.cxx:917
const double ZTDC1(double tright, unsigned int id, double z)
Definition: TofCaliSvc.cxx:983
TofInfoCal * TofInfo() const
const double BPulseHeight(double ADC1, double ADC2, double zHit, double sint, unsigned int id)
Definition: TofCaliSvc.cxx:885
const int RunTo()
const int QCorr()
const int BrEast(unsigned int No)
const double BGainForward(unsigned int id)
Definition: TofCaliSvc.cxx:946
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvUnknown)
Definition: TofCaliSvc.cxx:50
const int Etf(unsigned int No)
const double EtfBunchP(int index)
Definition: TofCaliSvc.cxx:855
const double BTCorrOffset2(double zHit, unsigned int id, double t0)
Definition: TofCaliSvc.cxx:448
const double BTime2(double ADC, double TDC, double zHit, unsigned int id, double t0)
Definition: TofCaliSvc.cxx:514
const double EPulseHeight(double ADC, double rHit, double cost, unsigned int id)
Definition: TofCaliSvc.cxx:904
const double BSigma1(double zHit, unsigned int id)
Definition: TofCaliSvc.cxx:591
const double BAtten(unsigned int id)
Definition: TofCaliSvc.cxx:941
virtual StatusCode finalize()
Definition: TofCaliSvc.cxx:92
const double EtfTimeMC(double ADC1, double ADC2, double TDC1, double TDC2, unsigned int id, unsigned int strip, double t0)
Definition: TofCaliSvc.cxx:791
const double BSigma2(double zHit, unsigned int id)
Definition: TofCaliSvc.cxx:607
const int EventFrom()
const double EtfTime1(double ADC, double TDC, double zHit, unsigned int id, unsigned int strip, double t0)
Definition: TofCaliSvc.cxx:721
StatusCode chooseConstants(int run, int number)
Definition: TofCaliSvc.cxx:270
const double BTime1(double ADC, double TDC, double zHit, unsigned int id, double t0)
Definition: TofCaliSvc.cxx:496
BTofCal * BTof(unsigned int id) const
const double ETime(double ADC, double TDC, double rHit, unsigned int id)
Definition: TofCaliSvc.cxx:652
const double BTCorrOffset1(double zHit, unsigned int id, double t0)
Definition: TofCaliSvc.cxx:406
const double EtfTimeMC1(double ADC, double TDC, double zHit, unsigned int id, unsigned int strip, double t0)
Definition: TofCaliSvc.cxx:811
const double EtfTimeMC2(double ADC, double TDC, double zHit, unsigned int id, unsigned int strip, double t0)
Definition: TofCaliSvc.cxx:828
const double EtfTime2(double ADC, double TDC, double zHit, unsigned int id, unsigned int strip, double t0)
Definition: TofCaliSvc.cxx:756
const double BSigmaCluster(double zHit1, double zHit2, unsigned int id1, unsigned int id2)
Definition: TofCaliSvc.cxx:639
const int RunFrom()
const double EtfVeff(unsigned int id, unsigned int strip)
Definition: TofCaliSvc.cxx:964
const double ZADC1(double qright, unsigned int id, double z)
virtual StatusCode initialize()
Definition: TofCaliSvc.cxx:59
const double BGainBackward(unsigned int id)
Definition: TofCaliSvc.cxx:954
const double BVeff(unsigned int id)
Definition: TofCaliSvc.cxx:932
const double ESigma(double rHit, unsigned int id)
Definition: TofCaliSvc.cxx:673
const int Version()
const double EtfZTDC(double tleft, double tright, unsigned int id, unsigned int strip)
const double ZADC2(double qleft, unsigned int id, double z)
const double getQ0(unsigned int id)
Definition: TofCaliSvc.cxx:927
const int BrWest(unsigned int No)
const int RunEnd()
const double ZTDC(double tleft, double tright, unsigned int id)
Definition: TofCaliSvc.cxx:974
const double ETDelay(unsigned int id)
Definition: TofCaliSvc.cxx:361
const double EVeff(unsigned int id)
Definition: TofCaliSvc.cxx:959
const double TOffset()
Definition: TofCaliSvc.cxx:490
const double EAtten(unsigned int id)
const int Endcap(unsigned int No)
const double BTCorr2(double ADC, double zHit, unsigned int id)
Definition: TofCaliSvc.cxx:390
const int QElec()
BTofCommonCal * BTofCommon() const
const double BTCorr1(double ADC, double zHit, unsigned int id)
Definition: TofCaliSvc.cxx:374
void handle(const Incident &)
const int EventTo()
const double BTDelay1(unsigned int id)
Definition: TofCaliSvc.cxx:335
const double BTDelay2(unsigned int id)
Definition: TofCaliSvc.cxx:348
EtfCal * EtfTof(unsigned int id) const
ETofCal * ETof(unsigned int id) const
const double BSigmaCounter(double zHit, unsigned int id)
Definition: TofCaliSvc.cxx:623