BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
TofCaliSvc.h
Go to the documentation of this file.
1// $Id: TofCaliSvc.h,v 1.36 2022/01/17 03:38:27 maqm Exp $ // -*-c++-*-
2// header file for a class called "TofCaliSvc"
3#ifndef TOFCALISVC_H
4#define TOFCALISVC_H
5
6#include <ios>
7#include <iostream>
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/EtfBunchCal.h"
16#include "TofCaliSvc/EtfCal.h"
17#include "TofCaliSvc/TofInfoCal.h"
18
19#include "Gaudi/Property.h"
20#include "GaudiKernel/IDataProviderSvc.h"
21#include "GaudiKernel/IIncidentListener.h"
22#include "GaudiKernel/IInterface.h"
23#include "GaudiKernel/Service.h"
24
25#include "TofCaliSvc/ITofCaliSvc.h"
26
27// class TofCaliSvc : public Service, virtual public ITofCaliSvc,virtual public
28// IIncidentListener
29class TofCaliSvc : public extends<Service, ITofCaliSvc>, virtual public IIncidentListener {
30public:
31 // Constructors and destructors
32 TofCaliSvc( const std::string& name, ISvcLocator* svcloc );
33 // ~TofCaliSvc();
34
35 // virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvUnknown);
36 virtual StatusCode initialize();
37 virtual StatusCode finalize();
38 void handle( const Incident& );
39
40 StatusCode chooseConstants( int run, int number );
41
42 // Access by others
43 const BTofCal* BTof( unsigned int id ) const;
44 const BTofCommonCal* BTofCommon() const;
45 const ETofCal* ETof( unsigned int id ) const;
46 const EtfCal* EtfTof( unsigned int id ) const;
47 const TofInfoCal* TofInfo() const;
48
49 const double BTDelay1( unsigned int id );
50 const double BTDelay2( unsigned int id );
51 const double ETDelay( unsigned int id );
52 const double BTCorr1( double ADC, double zHit, unsigned int id );
53 const double BTCorr2( double ADC, double zHit, unsigned int id );
54 const double BTCorrOffset1( double zHit, unsigned int id, double t0 );
55 const double BTCorrOffset2( double zHit, unsigned int id, double t0 );
56 const double TOffset();
57 const double BTime1( double ADC, double TDC, double zHit, unsigned int id, double t0 );
58 const double BTime2( double ADC, double TDC, double zHit, unsigned int id, double t0 );
59 const double ETime( double ADC, double TDC, double rHit, unsigned int id );
60 const double EtfTime( double ADC1, double ADC2, double TDC1, double TDC2, unsigned int id,
61 unsigned int strip, double t0 );
62 const double EtfTime1( double ADC, double TDC, double zHit, unsigned int id,
63 unsigned int strip, double t0 );
64 const double EtfTime2( double ADC, double TDC, double zHit, unsigned int id,
65 unsigned int strip, double t0 );
66 const double EtfTimeMC( double ADC1, double ADC2, double TDC1, double TDC2, unsigned int id,
67 unsigned int strip, double t0 );
68 const double EtfTimeMC1( double ADC, double TDC, double zHit, unsigned int id,
69 unsigned int strip, double t0 );
70 const double EtfTimeMC2( double ADC, double TDC, double zHit, unsigned int id,
71 unsigned int strip, double t0 );
72 const double EtfTime( double tleft, double tright );
73 const double EtfBunchP( int index );
74 const double BTimeCounter( double tleft, double tright, double z, unsigned int id );
75 const double BTimeCluster( double tlayer1, double tlayer2, double z1, double z2,
76 unsigned int id1, unsigned int id2 );
77 const double BSigma1( double zHit, unsigned int id );
78 const double BSigma2( double zHit, unsigned int id );
79 const double BSigmaCounter( double zHit, unsigned int id );
80 const double BSigmaCluster( double zHit1, double zHit2, unsigned int id1, unsigned int id2 );
81 const double ESigma( double rHit, unsigned int id );
82 const double BPulseHeight1( double ADC, double zHit, double sint, unsigned int id );
83 const double BPulseHeight2( double ADC, double zHit, double sint, unsigned int id );
84 const double BPulseHeight( double ADC1, double ADC2, double zHit, double sint,
85 unsigned int id );
86 const double BPh( double ADC1, double ADC2, double zHit, unsigned int id );
87 const double EPulseHeight( double ADC, double rHit, double cost, unsigned int id );
88 const double EPh( double ADC, double rHit, unsigned int id );
89 const double BVeff( unsigned int id );
90 const double BAtten( unsigned int id );
91 const double BGainForward( unsigned int id );
92 const double BGainBackward( unsigned int id );
93 const double getQ0( unsigned int id );
94 const double EVeff( unsigned int id );
95 const double EAtten( unsigned int id );
96 const double EGain( unsigned int id );
97 const double EtfVeff( unsigned int id, unsigned int strip );
98 const double ZTDC( double tleft, double tright, unsigned int id );
99 const double ZTDC1( double tright, unsigned int id, double z );
100 const double ZTDC2( double tleft, unsigned int id, double z );
101 const double ZADC( double qleft, double qright, unsigned int id );
102 const double ZADC1( double qright, unsigned int id, double z );
103 const double ZADC2( double qleft, unsigned int id, double z );
104 const double EtfZTDC( double tleft, double tright, unsigned int id, unsigned int strip );
105 const int RunBegin();
106 const int RunEnd();
107 const int Version();
108 const int QCorr();
109 const int QElec();
110 const int MisLable();
111 const int BrEast( unsigned int No );
112 const int BrWest( unsigned int No );
113 const int Endcap( unsigned int No );
114 const int Etf( unsigned int No );
115 const int RunFrom();
116 const int RunTo();
117 const int EventFrom();
118 const int EventTo();
119 void Dump();
120
121private:
122 StatusCode FillfromDatabase();
123 bool m_hasbeeninitialized;
124 unsigned int m_sequence;
125
126private:
127 IDataProviderSvc* m_pCalibDataSvc;
128 IntegerProperty m_run;
129 std::vector<BTofCal> fBTofCal;
130 std::vector<ETofCal> fETofCal;
131 std::vector<EtfCal> fEtfCal;
132 std::vector<EtfBunchCal> fEtfBunchCal;
133 std::vector<BTofCommonCal> fBTofCommonCal;
134 std::vector<TofInfoCal> fTofInfoCal;
135};
136#endif /* TOF_REC_GEO_H */
const double BTimeCounter(double tleft, double tright, double z, unsigned int id)
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)
const double BPh(double ADC1, double ADC2, double zHit, unsigned int id)
const int RunBegin()
const double ZTDC2(double tleft, unsigned int id, double z)
const double BPulseHeight2(double ADC, double zHit, double sint, unsigned int id)
const int MisLable()
const BTofCommonCal * BTofCommon() const
const double EGain(unsigned int id)
const double BTimeCluster(double tlayer1, double tlayer2, double z1, double z2, unsigned int id1, unsigned int id2)
const double EPh(double ADC, double rHit, unsigned int id)
const double ZTDC1(double tright, unsigned int id, double z)
const double BPulseHeight(double ADC1, double ADC2, double zHit, double sint, unsigned int id)
const int RunTo()
const int QCorr()
const int BrEast(unsigned int No)
const double BGainForward(unsigned int id)
const int Etf(unsigned int No)
const double EtfBunchP(int index)
const double BTCorrOffset2(double zHit, unsigned int id, double t0)
const double BTime2(double ADC, double TDC, double zHit, unsigned int id, double t0)
const double EPulseHeight(double ADC, double rHit, double cost, unsigned int id)
const double BSigma1(double zHit, unsigned int id)
const double BAtten(unsigned int id)
virtual StatusCode finalize()
const double EtfTimeMC(double ADC1, double ADC2, double TDC1, double TDC2, unsigned int id, unsigned int strip, double t0)
const double BSigma2(double zHit, unsigned int id)
const int EventFrom()
const double EtfTime1(double ADC, double TDC, double zHit, unsigned int id, unsigned int strip, double t0)
StatusCode chooseConstants(int run, int number)
const double BTime1(double ADC, double TDC, double zHit, unsigned int id, double t0)
const double ETime(double ADC, double TDC, double rHit, unsigned int id)
const double BTCorrOffset1(double zHit, unsigned int id, double t0)
const double EtfTimeMC1(double ADC, double TDC, double zHit, unsigned int id, unsigned int strip, double t0)
const EtfCal * EtfTof(unsigned int id) const
const double EtfTimeMC2(double ADC, double TDC, double zHit, unsigned int id, unsigned int strip, double t0)
const double EtfTime2(double ADC, double TDC, double zHit, unsigned int id, unsigned int strip, double t0)
const double BSigmaCluster(double zHit1, double zHit2, unsigned int id1, unsigned int id2)
const int RunFrom()
const double EtfVeff(unsigned int id, unsigned int strip)
const double ZADC1(double qright, unsigned int id, double z)
virtual StatusCode initialize()
const double BGainBackward(unsigned int id)
const double BVeff(unsigned int id)
const TofInfoCal * TofInfo() const
const double ESigma(double rHit, unsigned int id)
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)
const int BrWest(unsigned int No)
const int RunEnd()
const double ZTDC(double tleft, double tright, unsigned int id)
const double ETDelay(unsigned int id)
const double EVeff(unsigned int id)
const double TOffset()
const double EAtten(unsigned int id)
const int Endcap(unsigned int No)
const double BTCorr2(double ADC, double zHit, unsigned int id)
const int QElec()
const BTofCal * BTof(unsigned int id) const
const double BTCorr1(double ADC, double zHit, unsigned int id)
void handle(const Incident &)
const ETofCal * ETof(unsigned int id) const
const int EventTo()
const double BTDelay1(unsigned int id)
const double BTDelay2(unsigned int id)
TofCaliSvc(const std::string &name, ISvcLocator *svcloc)
const double BSigmaCounter(double zHit, unsigned int id)