BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Adc Class Reference

#include <TofData.h>

Inheritance diagram for Adc:

Public Member Functions

 Adc ()
void setCorr ()
void setElec ()
void setValue (Identifier identify, int value)
double qtc () const
 Adc ()
void setCorr ()
void setElec ()
void setValue (Identifier identify, int value)
double qtc () const
 Adc ()
void setCorr ()
void setElec ()
void setValue (Identifier identify, int value)
double qtc () const
Public Member Functions inherited from TofValue
 TofValue ()
virtual ~TofValue ()
TofValueoperator= (const TofValue &source)
int channel () const
int times () const
int number () const
int clock () const
double value () const
bool used () const
void timespp ()
void timesmm ()
void setNumber (int number)
void setUsed (bool used)
 TofValue ()
virtual ~TofValue ()
TofValueoperator= (const TofValue &source)
int channel () const
int times () const
int number () const
int clock () const
double value () const
bool used () const
void timespp ()
void timesmm ()
void setNumber (int number)
void setUsed (bool used)
 TofValue ()
virtual ~TofValue ()
TofValueoperator= (const TofValue &source)
int channel () const
int times () const
int number () const
int clock () const
double value () const
bool used () const
void timespp ()
void timesmm ()
void setNumber (int number)
void setUsed (bool used)

Additional Inherited Members

Protected Attributes inherited from TofValue
int m_clock
int m_channel
double m_value

Detailed Description

Constructor & Destructor Documentation

◆ Adc() [1/3]

Adc::Adc ( )

Definition at line 66 of file TofData.cxx.

66 {
67 m_corr = false;
68 m_elec = false;
69 m_mrpc = false;
70 m_qtc = -999.0;
71}

◆ Adc() [2/3]

Adc::Adc ( )

◆ Adc() [3/3]

Adc::Adc ( )

Member Function Documentation

◆ qtc() [1/3]

double Adc::qtc ( ) const
inline

Definition at line 50 of file Event/RawDataProviderSvc/include/RawDataProviderSvc/TofData.h.

50{ return m_qtc; }

◆ qtc() [2/3]

double Adc::qtc ( ) const
inline

Definition at line 50 of file InstallArea/x86_64-el9-gcc13-dbg/include/RawDataProviderSvc/TofData.h.

50{ return m_qtc; }

◆ qtc() [3/3]

double Adc::qtc ( ) const
inline

Definition at line 50 of file InstallArea/x86_64-el9-gcc13-opt/include/RawDataProviderSvc/TofData.h.

50{ return m_qtc; }

◆ setCorr() [1/3]

void Adc::setCorr ( )
inline

Definition at line 45 of file Event/RawDataProviderSvc/include/RawDataProviderSvc/TofData.h.

45{ m_corr = true; }

Referenced by TofRawDataProvider::tofDataMapFull().

◆ setCorr() [2/3]

void Adc::setCorr ( )
inline

Definition at line 45 of file InstallArea/x86_64-el9-gcc13-dbg/include/RawDataProviderSvc/TofData.h.

45{ m_corr = true; }

◆ setCorr() [3/3]

void Adc::setCorr ( )
inline

Definition at line 45 of file InstallArea/x86_64-el9-gcc13-opt/include/RawDataProviderSvc/TofData.h.

45{ m_corr = true; }

◆ setElec() [1/3]

void Adc::setElec ( )
inline

Definition at line 46 of file Event/RawDataProviderSvc/include/RawDataProviderSvc/TofData.h.

46{ m_elec = true; }

Referenced by TofRawDataProvider::tofDataMapFull().

◆ setElec() [2/3]

void Adc::setElec ( )
inline

Definition at line 46 of file InstallArea/x86_64-el9-gcc13-dbg/include/RawDataProviderSvc/TofData.h.

46{ m_elec = true; }

◆ setElec() [3/3]

void Adc::setElec ( )
inline

Definition at line 46 of file InstallArea/x86_64-el9-gcc13-opt/include/RawDataProviderSvc/TofData.h.

46{ m_elec = true; }

◆ setValue() [1/3]

void Adc::setValue ( Identifier identify,
int value )

Definition at line 73 of file TofData.cxx.

73 {
74 m_clock = ( ( value & 0x7e000 ) >> 13 );
75 if ( value == 0x7fffffff )
76 {
77 m_clock = 100;
78 m_channel = 10000;
79 m_qtc = 10000.0;
80 m_value = 10000.0;
81 }
82 else if ( value == -999 )
83 {
84 m_channel = -999;
85 m_qtc = -999.0;
86 m_value = -999.0;
87 }
88 else
89 {
90
91 m_mrpc = TofID::is_mrpc( identify );
92 if ( m_mrpc )
93 {
96 }
97 else
98 {
99 if ( !( TofID::is_scin( identify ) ) )
100 {
101 std::cout << "Event/RawDataProviderSvc:: ERROR! ETF(MRPC) data is "
102 "treated as scintillator data !"
103 << std::endl;
104 }
105
106 m_channel = ( value & 0x1fff );
107 if ( ( value & 0x80000 ) != 0 )
108 {
109 if ( m_corr )
110 {
111 if ( m_channel < 4000 ) { m_channel += 0x2000; }
112 }
113 else { m_channel += 0x2000; }
114 }
115
116 int barrel = TofID::barrel_ec( identify );
117 int tofid = TofID::phi_module( identify );
118 int layer = TofID::layer( identify );
119 if ( barrel == 1 )
120 {
121 if ( layer == 1 ) { tofid = tofid + 88; }
122 }
123 else if ( barrel == 2 ) { tofid = tofid + 48; }
124 int east = TofID::end( identify );
125
126 if ( m_corr )
127 {
128 if ( barrel == 1 )
129 {
130 if ( east == 0 ) { m_qtc = tofQCorrSvc->BQRaw1( tofid, m_channel * 1.0 ); }
131 else { m_qtc = tofQCorrSvc->BQRaw2( tofid, m_channel * 1.0 ); }
132 }
133 else { m_qtc = tofQCorrSvc->EQRaw( tofid, m_channel * 1.0 ); }
134 }
135 else { m_qtc = m_channel * 1.0; }
136
137 if ( m_elec )
138 {
139 if ( barrel == 1 )
140 {
141 if ( east == 0 ) { m_value = tofQElecSvc->BQTC1( tofid, m_qtc ); }
142 else { m_value = tofQElecSvc->BQTC2( tofid, m_qtc ); }
143 }
144 else { m_value = tofQElecSvc->EQTC( tofid, m_qtc ); }
145 }
146 else { m_value = m_qtc * 1.0; }
147 }
148 }
149 return;
150}
ITofQElecSvc * tofQElecSvc
ITofQCorrSvc * tofQCorrSvc
virtual const double BQRaw1(int id, double q)=0
virtual const double EQRaw(int id, double q)=0
virtual const double BQRaw2(int id, double q)=0
virtual const double BQTC2(int id, double q)=0
virtual const double BQTC1(int id, double q)=0
virtual const double EQTC(int id, double q)=0
static double TofTime(unsigned int timeChannel)
static bool is_scin(const Identifier &id)
Definition TofID.cxx:88
static int end(const Identifier &id)
Definition TofID.cxx:71
static bool is_mrpc(const Identifier &id)
Definition TofID.cxx:98
static int phi_module(const Identifier &id)
Definition TofID.cxx:65
static int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0).
Definition TofID.cxx:54
static int layer(const Identifier &id)
Definition TofID.cxx:59

Referenced by TofRawDataProvider::tofDataMapFull().

◆ setValue() [2/3]

void Adc::setValue ( Identifier identify,
int value )

◆ setValue() [3/3]

void Adc::setValue ( Identifier identify,
int value )

The documentation for this class was generated from the following files: