BOSS 7.0.9
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)
 

Detailed Description

Definition at line 5 of file RawDataUtil.h.

Member Function Documentation

◆ EmcCharge()

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

Definition at line 17 of file 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().

◆ EmcChargeChannel()

static int RawDataUtil::EmcChargeChannel ( double  charge)
inlinestatic

Definition at line 37 of file 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().

◆ EmcChargeMeasure()

static int RawDataUtil::EmcChargeMeasure ( double  charge)
inlinestatic

Definition at line 50 of file 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().

◆ EmcTime()

static double RawDataUtil::EmcTime ( int  timeChannel)
inlinestatic

Definition at line 14 of file RawDataUtil.h.

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

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

◆ EmcTimeChannel()

static int RawDataUtil::EmcTimeChannel ( double  time)
inlinestatic

Definition at line 15 of file RawDataUtil.h.

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

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

◆ MdcCharge()

static double RawDataUtil::MdcCharge ( int  chargeChannel)
inlinestatic

Definition at line 11 of file RawDataUtil.h.

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

Referenced by MdcTrkRecon::dumpDigi(), MdcTrkRecon::fillEvent(), KalFitTrack::getDriftTime(), MdcHit::MdcHit(), MdcPrintSvc::printDigi(), MdcxHit::process(), and MdcROOTGeo::SetHits().

◆ MdcChargeChannel()

static int RawDataUtil::MdcChargeChannel ( double  charge)
inlinestatic

Definition at line 12 of file RawDataUtil.h.

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

Referenced by BesRawDataWriter::SaveMdcDigits().

◆ MdcTime()

static double RawDataUtil::MdcTime ( int  timeChannel)
inlinestatic

◆ MdcTimeChannel()

static int RawDataUtil::MdcTimeChannel ( double  time)
inlinestatic

Definition at line 9 of file RawDataUtil.h.

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

Referenced by BesRawDataWriter::SaveMdcDigits().

◆ TofCharge()

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

Definition at line 66 of file RawDataUtil.h.

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

Referenced by EmcRecTofDigitCalib::Convert().

◆ TofChargeChannel()

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

Definition at line 72 of file 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()

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

Definition at line 63 of file RawDataUtil.h.

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

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

◆ TofTimeChannel()

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

Definition at line 64 of file RawDataUtil.h.

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

Referenced by BesRawDataWriter::SaveTofDigits().


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