BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
RawDataUtil Class Reference

#include <RawDataUtil.h>

Static Public Member Functions

static double MdcTime (int timeChannel)
 
static int MdcTimeChannel (double time)
 
static double MdcCharge (int chargeChannel)
 
static int MdcChargeChannel (double charge)
 
static double EmcTime (int timeChannel)
 
static int EmcTimeChannel (double time)
 
static double EmcCharge (int measure, int chargeChannel)
 
static int EmcChargeChannel (double charge)
 
static int EmcChargeMeasure (double charge)
 
static double TofTime (unsigned int timeChannel)
 
static unsigned int TofTimeChannel (double time)
 
static double TofCharge (unsigned int chargeChannel)
 
static unsigned int TofChargeChannel (double charge, double time)
 
static double MdcTime (int timeChannel)
 
static int MdcTimeChannel (double time)
 
static double MdcCharge (int chargeChannel)
 
static int MdcChargeChannel (double charge)
 
static double EmcTime (int timeChannel)
 
static int EmcTimeChannel (double time)
 
static double EmcCharge (int measure, int chargeChannel)
 
static int EmcChargeChannel (double charge)
 
static int EmcChargeMeasure (double charge)
 
static double TofTime (unsigned int timeChannel)
 
static unsigned int TofTimeChannel (double time)
 
static double TofCharge (unsigned int chargeChannel)
 
static unsigned int TofChargeChannel (double charge, double time)
 

Detailed Description

Member Function Documentation

◆ EmcCharge() [1/2]

static double RawDataUtil::EmcCharge ( int  measure,
int  chargeChannel 
)
inlinestatic

Definition at line 17 of file Event/RawEvent/RawEvent-00-03-19/RawEvent/RawDataUtil.h.

18 {
19 switch(measure) {
20 case 3: //saturation of high measure
21 return ((double)chargeChannel)*EMC_CHARGE_HIGH_MEASURE/EMC_CHARGE_FACTOR;
22 break;
23 case 2:
24 return ((double)chargeChannel)*EMC_CHARGE_HIGH_MEASURE/EMC_CHARGE_FACTOR;
25 break;
26 case 1:
27 return ((double)chargeChannel)*EMC_CHARGE_MID_MEASURE/EMC_CHARGE_FACTOR;
28 break;
29 case 0:
30 return ((double)chargeChannel)*EMC_CHARGE_LOW_MEASURE/EMC_CHARGE_FACTOR;
31 break;
32 default:
33 std::cout<<"Wrong measure of EMC charge channel!"<<std::endl;
34 }
35 }

Referenced by EmcRawDataProvider::doCalib(), EFGlobalEnergy::execute(), EmcRec::execute(), EmcDigi::operator+=(), and EmcROOTGeo::SetHits().

◆ EmcCharge() [2/2]

static double RawDataUtil::EmcCharge ( int  measure,
int  chargeChannel 
)
inlinestatic

Definition at line 17 of file InstallArea/include/RawEvent/RawEvent/RawDataUtil.h.

18 {
19 switch(measure) {
20 case 3: //saturation of high measure
21 return ((double)chargeChannel)*EMC_CHARGE_HIGH_MEASURE/EMC_CHARGE_FACTOR;
22 break;
23 case 2:
24 return ((double)chargeChannel)*EMC_CHARGE_HIGH_MEASURE/EMC_CHARGE_FACTOR;
25 break;
26 case 1:
27 return ((double)chargeChannel)*EMC_CHARGE_MID_MEASURE/EMC_CHARGE_FACTOR;
28 break;
29 case 0:
30 return ((double)chargeChannel)*EMC_CHARGE_LOW_MEASURE/EMC_CHARGE_FACTOR;
31 break;
32 default:
33 std::cout<<"Wrong measure of EMC charge channel!"<<std::endl;
34 }
35 }

◆ EmcChargeChannel() [1/2]

static int RawDataUtil::EmcChargeChannel ( double  charge)
inlinestatic

Definition at line 37 of file Event/RawEvent/RawEvent-00-03-19/RawEvent/RawDataUtil.h.

38 {
39 if(charge>EMC_CHARGE_HIGH_MEASURE) {
40 return (int)(EMC_CHARGE_FACTOR-1);
41 } else if(charge>EMC_CHARGE_MID_MEASURE) {
42 return (int)(charge/(EMC_CHARGE_HIGH_MEASURE/EMC_CHARGE_FACTOR));
43 } else if(charge>EMC_CHARGE_LOW_MEASURE) {
44 return (int)(charge/(EMC_CHARGE_MID_MEASURE/EMC_CHARGE_FACTOR));
45 } else {
46 return (int)(charge/(EMC_CHARGE_LOW_MEASURE/EMC_CHARGE_FACTOR));
47 }
48 }
float charge

Referenced by EmcRawDataProvider::doCalib(), RawDataProviderSvc::initialize(), EmcDigi::operator+=(), and BesRawDataWriter::SaveEmcDigits().

◆ EmcChargeChannel() [2/2]

static int RawDataUtil::EmcChargeChannel ( double  charge)
inlinestatic

Definition at line 37 of file InstallArea/include/RawEvent/RawEvent/RawDataUtil.h.

38 {
39 if(charge>EMC_CHARGE_HIGH_MEASURE) {
40 return (int)(EMC_CHARGE_FACTOR-1);
41 } else if(charge>EMC_CHARGE_MID_MEASURE) {
42 return (int)(charge/(EMC_CHARGE_HIGH_MEASURE/EMC_CHARGE_FACTOR));
43 } else if(charge>EMC_CHARGE_LOW_MEASURE) {
44 return (int)(charge/(EMC_CHARGE_MID_MEASURE/EMC_CHARGE_FACTOR));
45 } else {
46 return (int)(charge/(EMC_CHARGE_LOW_MEASURE/EMC_CHARGE_FACTOR));
47 }
48 }

◆ EmcChargeMeasure() [1/2]

static int RawDataUtil::EmcChargeMeasure ( double  charge)
inlinestatic

Definition at line 50 of file Event/RawEvent/RawEvent-00-03-19/RawEvent/RawDataUtil.h.

51 {
52 if(charge>EMC_CHARGE_HIGH_MEASURE) {
53 return 3;
54 } else if(charge>EMC_CHARGE_MID_MEASURE) {
55 return 2;
56 } else if(charge>EMC_CHARGE_LOW_MEASURE) {
57 return 1;
58 } else {
59 return 0;
60 }
61 }

Referenced by EmcRawDataProvider::doCalib(), EmcDigi::operator+=(), and BesRawDataWriter::SaveEmcDigits().

◆ EmcChargeMeasure() [2/2]

static int RawDataUtil::EmcChargeMeasure ( double  charge)
inlinestatic

Definition at line 50 of file InstallArea/include/RawEvent/RawEvent/RawDataUtil.h.

51 {
52 if(charge>EMC_CHARGE_HIGH_MEASURE) {
53 return 3;
54 } else if(charge>EMC_CHARGE_MID_MEASURE) {
55 return 2;
56 } else if(charge>EMC_CHARGE_LOW_MEASURE) {
57 return 1;
58 } else {
59 return 0;
60 }
61 }

◆ EmcTime() [1/2]

static double RawDataUtil::EmcTime ( int  timeChannel)
inlinestatic

Definition at line 14 of file Event/RawEvent/RawEvent-00-03-19/RawEvent/RawDataUtil.h.

14{ return ((double)timeChannel)/EMC_TIME_FACTOR; }

Referenced by EmcRec::execute(), EmcDigi::operator+=(), and EmcROOTGeo::SetHits().

◆ EmcTime() [2/2]

static double RawDataUtil::EmcTime ( int  timeChannel)
inlinestatic

Definition at line 14 of file InstallArea/include/RawEvent/RawEvent/RawDataUtil.h.

14{ return ((double)timeChannel)/EMC_TIME_FACTOR; }

◆ EmcTimeChannel() [1/2]

static int RawDataUtil::EmcTimeChannel ( double  time)
inlinestatic

Definition at line 15 of file Event/RawEvent/RawEvent-00-03-19/RawEvent/RawDataUtil.h.

15{ return (int)(time*EMC_TIME_FACTOR); }
Double_t time

Referenced by EmcDigi::operator+=(), and BesRawDataWriter::SaveEmcDigits().

◆ EmcTimeChannel() [2/2]

static int RawDataUtil::EmcTimeChannel ( double  time)
inlinestatic

Definition at line 15 of file InstallArea/include/RawEvent/RawEvent/RawDataUtil.h.

15{ return (int)(time*EMC_TIME_FACTOR); }

◆ MdcCharge() [1/2]

static double RawDataUtil::MdcCharge ( int  chargeChannel)
inlinestatic

◆ MdcCharge() [2/2]

static double RawDataUtil::MdcCharge ( int  chargeChannel)
inlinestatic

Definition at line 11 of file InstallArea/include/RawEvent/RawEvent/RawDataUtil.h.

11{ return ((double)chargeChannel)*MDC_CHARGE_FACTOR; }

◆ MdcChargeChannel() [1/2]

static int RawDataUtil::MdcChargeChannel ( double  charge)
inlinestatic

Definition at line 12 of file Event/RawEvent/RawEvent-00-03-19/RawEvent/RawDataUtil.h.

12{ return (int)(charge/MDC_CHARGE_FACTOR); }

Referenced by BesRawDataWriter::SaveMdcDigits().

◆ MdcChargeChannel() [2/2]

static int RawDataUtil::MdcChargeChannel ( double  charge)
inlinestatic

Definition at line 12 of file InstallArea/include/RawEvent/RawEvent/RawDataUtil.h.

12{ return (int)(charge/MDC_CHARGE_FACTOR); }

◆ MdcTime() [1/2]

◆ MdcTime() [2/2]

static double RawDataUtil::MdcTime ( int  timeChannel)
inlinestatic

Definition at line 8 of file InstallArea/include/RawEvent/RawEvent/RawDataUtil.h.

8{ return ((double)timeChannel)*MDC_TIME_FACTOR; }

◆ MdcTimeChannel() [1/2]

static int RawDataUtil::MdcTimeChannel ( double  time)
inlinestatic

Definition at line 9 of file Event/RawEvent/RawEvent-00-03-19/RawEvent/RawDataUtil.h.

9{ return (int)(time/MDC_TIME_FACTOR); }

Referenced by BesRawDataWriter::SaveMdcDigits().

◆ MdcTimeChannel() [2/2]

static int RawDataUtil::MdcTimeChannel ( double  time)
inlinestatic

Definition at line 9 of file InstallArea/include/RawEvent/RawEvent/RawDataUtil.h.

9{ return (int)(time/MDC_TIME_FACTOR); }

◆ TofCharge() [1/2]

static double RawDataUtil::TofCharge ( unsigned int  chargeChannel)
inlinestatic

Definition at line 66 of file Event/RawEvent/RawEvent-00-03-19/RawEvent/RawDataUtil.h.

67 {
68 double ADC = chargeChannel & 0x1fff ;
69 return ADC*TOF_CHARGE_FACTOR;
70 }

Referenced by EmcRecTofDigitCalib::Convert().

◆ TofCharge() [2/2]

static double RawDataUtil::TofCharge ( unsigned int  chargeChannel)
inlinestatic

Definition at line 66 of file InstallArea/include/RawEvent/RawEvent/RawDataUtil.h.

67 {
68 double ADC = chargeChannel & 0x1fff ;
69 return ADC*TOF_CHARGE_FACTOR;
70 }

◆ TofChargeChannel() [1/2]

static unsigned int RawDataUtil::TofChargeChannel ( double  charge,
double  time 
)
inlinestatic

Definition at line 72 of file Event/RawEvent/RawEvent-00-03-19/RawEvent/RawDataUtil.h.

73 {
74 unsigned int ADC = (unsigned) (charge/TOF_CHARGE_FACTOR);
75 unsigned int TDC = (unsigned) (time/TOF_TIME_FACTOR);
76 if(ADC>=8192)
77 {
78 ADC = (ADC | 0x080000); // if ADC_channel>=8192, set overflow flag = 1.
79 // The overlow flag is the 20th bit of the ADC_channel.
80 }
81 ADC = ( (TDC & 0x07e000) | ADC) ; // Store tclock into ADC_channel as qclock
82 //std::cout<<"ADC: "<<ADC<<std::endl;
83 //std::cout<<"TDC: "<<TDC<<std::endl;
84 //std::cout<<"qclock: "<<( ( ADC & 0x7e000 ) >> 13 );
85 //std::cout<<" tclock: "<<( ( TDC & 0x7e000 ) >> 13 )<<std::endl;
86 //if ( ( ( ADC & 0x7e000 ) >> 13 ) != (( TDC & 0x7e000 ) >> 13 ) )
87 // std::cout<<"qclock!=tclock"<<std::endl;
88 return ADC;
89 }

◆ TofChargeChannel() [2/2]

static unsigned int RawDataUtil::TofChargeChannel ( double  charge,
double  time 
)
inlinestatic

Definition at line 72 of file InstallArea/include/RawEvent/RawEvent/RawDataUtil.h.

73 {
74 unsigned int ADC = (unsigned) (charge/TOF_CHARGE_FACTOR);
75 unsigned int TDC = (unsigned) (time/TOF_TIME_FACTOR);
76 if(ADC>=8192)
77 {
78 ADC = (ADC | 0x080000); // if ADC_channel>=8192, set overflow flag = 1.
79 // The overlow flag is the 20th bit of the ADC_channel.
80 }
81 ADC = ( (TDC & 0x07e000) | ADC) ; // Store tclock into ADC_channel as qclock
82 //std::cout<<"ADC: "<<ADC<<std::endl;
83 //std::cout<<"TDC: "<<TDC<<std::endl;
84 //std::cout<<"qclock: "<<( ( ADC & 0x7e000 ) >> 13 );
85 //std::cout<<" tclock: "<<( ( TDC & 0x7e000 ) >> 13 )<<std::endl;
86 //if ( ( ( ADC & 0x7e000 ) >> 13 ) != (( TDC & 0x7e000 ) >> 13 ) )
87 // std::cout<<"qclock!=tclock"<<std::endl;
88 return ADC;
89 }

◆ TofTime() [1/2]

static double RawDataUtil::TofTime ( unsigned int  timeChannel)
inlinestatic

Definition at line 63 of file Event/RawEvent/RawEvent-00-03-19/RawEvent/RawDataUtil.h.

63{ return ((double)timeChannel)*TOF_TIME_FACTOR; }

Referenced by EmcRecTofDigitCalib::Convert(), EsTimeAlg::execute(), Adc::setValue(), and Tdc::setValue().

◆ TofTime() [2/2]

static double RawDataUtil::TofTime ( unsigned int  timeChannel)
inlinestatic

Definition at line 63 of file InstallArea/include/RawEvent/RawEvent/RawDataUtil.h.

63{ return ((double)timeChannel)*TOF_TIME_FACTOR; }

◆ TofTimeChannel() [1/2]

static unsigned int RawDataUtil::TofTimeChannel ( double  time)
inlinestatic

Definition at line 64 of file Event/RawEvent/RawEvent-00-03-19/RawEvent/RawDataUtil.h.

64{ return (unsigned int)(time/TOF_TIME_FACTOR); }

Referenced by BesRawDataWriter::SaveTofDigits().

◆ TofTimeChannel() [2/2]

static unsigned int RawDataUtil::TofTimeChannel ( double  time)
inlinestatic

Definition at line 64 of file InstallArea/include/RawEvent/RawEvent/RawDataUtil.h.

64{ return (unsigned int)(time/TOF_TIME_FACTOR); }

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