CGEM BOSS 6.6.5.f
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 CgemTime (int timeChannel)
 
static int CgemTimeChannel (double time)
 
static double CgemCharge (int chargeChannel)
 
static int CgemChargeChannel (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 CgemTime (int timeChannel)
 
static int CgemTimeChannel (double time)
 
static double CgemCharge (int chargeChannel)
 
static int CgemChargeChannel (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

◆ CgemCharge() [1/2]

static double RawDataUtil::CgemCharge ( int  chargeChannel)
inlinestatic

Definition at line 17 of file Event/RawEvent/RawEvent-00-04-02/RawEvent/RawDataUtil.h.

17{ return ((double)chargeChannel)*CGEM_CHARGE_FACTOR; }

Referenced by CgemROOTGeo::SetHits().

◆ CgemCharge() [2/2]

static double RawDataUtil::CgemCharge ( int  chargeChannel)
inlinestatic

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

17{ return ((double)chargeChannel)*CGEM_CHARGE_FACTOR; }

◆ CgemChargeChannel() [1/2]

static int RawDataUtil::CgemChargeChannel ( double  charge)
inlinestatic

Definition at line 18 of file Event/RawEvent/RawEvent-00-04-02/RawEvent/RawDataUtil.h.

18{ return (int)(charge/CGEM_CHARGE_FACTOR); }

Referenced by BesRawDataWriter::SaveCgemDigits().

◆ CgemChargeChannel() [2/2]

static int RawDataUtil::CgemChargeChannel ( double  charge)
inlinestatic

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

18{ return (int)(charge/CGEM_CHARGE_FACTOR); }

◆ CgemTime() [1/2]

static double RawDataUtil::CgemTime ( int  timeChannel)
inlinestatic

Definition at line 14 of file Event/RawEvent/RawEvent-00-04-02/RawEvent/RawDataUtil.h.

14{ return ((double)timeChannel)*CGEM_TIME_FACTOR; }

Referenced by CgemROOTGeo::SetHits().

◆ CgemTime() [2/2]

static double RawDataUtil::CgemTime ( int  timeChannel)
inlinestatic

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

14{ return ((double)timeChannel)*CGEM_TIME_FACTOR; }

◆ CgemTimeChannel() [1/2]

static int RawDataUtil::CgemTimeChannel ( double  time)
inlinestatic

Definition at line 15 of file Event/RawEvent/RawEvent-00-04-02/RawEvent/RawDataUtil.h.

15{ return (int)(time/CGEM_TIME_FACTOR); }
Double_t time

Referenced by BesRawDataWriter::SaveCgemDigits().

◆ CgemTimeChannel() [2/2]

static int RawDataUtil::CgemTimeChannel ( double  time)
inlinestatic

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

15{ return (int)(time/CGEM_TIME_FACTOR); }

◆ EmcCharge() [1/2]

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

Definition at line 23 of file Event/RawEvent/RawEvent-00-04-02/RawEvent/RawDataUtil.h.

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

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 23 of file InstallArea/include/RawEvent/RawEvent/RawDataUtil.h.

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

◆ EmcChargeChannel() [1/2]

static int RawDataUtil::EmcChargeChannel ( double  charge)
inlinestatic

Definition at line 43 of file Event/RawEvent/RawEvent-00-04-02/RawEvent/RawDataUtil.h.

44 {
45 if(charge>EMC_CHARGE_HIGH_MEASURE) {
46 return (int)(EMC_CHARGE_FACTOR-1);
47 } else if(charge>EMC_CHARGE_MID_MEASURE) {
48 return (int)(charge/(EMC_CHARGE_HIGH_MEASURE/EMC_CHARGE_FACTOR));
49 } else if(charge>EMC_CHARGE_LOW_MEASURE) {
50 return (int)(charge/(EMC_CHARGE_MID_MEASURE/EMC_CHARGE_FACTOR));
51 } else {
52 return (int)(charge/(EMC_CHARGE_LOW_MEASURE/EMC_CHARGE_FACTOR));
53 }
54 }

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

◆ EmcChargeChannel() [2/2]

static int RawDataUtil::EmcChargeChannel ( double  charge)
inlinestatic

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

44 {
45 if(charge>EMC_CHARGE_HIGH_MEASURE) {
46 return (int)(EMC_CHARGE_FACTOR-1);
47 } else if(charge>EMC_CHARGE_MID_MEASURE) {
48 return (int)(charge/(EMC_CHARGE_HIGH_MEASURE/EMC_CHARGE_FACTOR));
49 } else if(charge>EMC_CHARGE_LOW_MEASURE) {
50 return (int)(charge/(EMC_CHARGE_MID_MEASURE/EMC_CHARGE_FACTOR));
51 } else {
52 return (int)(charge/(EMC_CHARGE_LOW_MEASURE/EMC_CHARGE_FACTOR));
53 }
54 }

◆ EmcChargeMeasure() [1/2]

static int RawDataUtil::EmcChargeMeasure ( double  charge)
inlinestatic

Definition at line 56 of file Event/RawEvent/RawEvent-00-04-02/RawEvent/RawDataUtil.h.

57 {
58 if(charge>EMC_CHARGE_HIGH_MEASURE) {
59 return 3;
60 } else if(charge>EMC_CHARGE_MID_MEASURE) {
61 return 2;
62 } else if(charge>EMC_CHARGE_LOW_MEASURE) {
63 return 1;
64 } else {
65 return 0;
66 }
67 }

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

◆ EmcChargeMeasure() [2/2]

static int RawDataUtil::EmcChargeMeasure ( double  charge)
inlinestatic

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

57 {
58 if(charge>EMC_CHARGE_HIGH_MEASURE) {
59 return 3;
60 } else if(charge>EMC_CHARGE_MID_MEASURE) {
61 return 2;
62 } else if(charge>EMC_CHARGE_LOW_MEASURE) {
63 return 1;
64 } else {
65 return 0;
66 }
67 }

◆ EmcTime() [1/2]

static double RawDataUtil::EmcTime ( int  timeChannel)
inlinestatic

Definition at line 20 of file Event/RawEvent/RawEvent-00-04-02/RawEvent/RawDataUtil.h.

20{ 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 20 of file InstallArea/include/RawEvent/RawEvent/RawDataUtil.h.

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

◆ EmcTimeChannel() [1/2]

static int RawDataUtil::EmcTimeChannel ( double  time)
inlinestatic

Definition at line 21 of file Event/RawEvent/RawEvent-00-04-02/RawEvent/RawDataUtil.h.

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

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

◆ EmcTimeChannel() [2/2]

static int RawDataUtil::EmcTimeChannel ( double  time)
inlinestatic

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

21{ 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-04-02/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-04-02/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 72 of file Event/RawEvent/RawEvent-00-04-02/RawEvent/RawDataUtil.h.

73 {
74 double ADC = chargeChannel & 0x1fff ;
75 return ADC*TOF_CHARGE_FACTOR;
76 }

Referenced by EmcRecTofDigitCalib::Convert().

◆ TofCharge() [2/2]

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

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

73 {
74 double ADC = chargeChannel & 0x1fff ;
75 return ADC*TOF_CHARGE_FACTOR;
76 }

◆ TofChargeChannel() [1/2]

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

Definition at line 78 of file Event/RawEvent/RawEvent-00-04-02/RawEvent/RawDataUtil.h.

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

◆ TofChargeChannel() [2/2]

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

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

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

◆ TofTime() [1/2]

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

◆ TofTime() [2/2]

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

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

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

◆ TofTimeChannel() [1/2]

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

Definition at line 70 of file Event/RawEvent/RawEvent-00-04-02/RawEvent/RawDataUtil.h.

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

Referenced by BesRawDataWriter::SaveTofDigits(), and TofRawDataProvider::tofDataMapFull().

◆ TofTimeChannel() [2/2]

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

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

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

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