8 static double MdcTime(
int timeChannel) {
return ((
double)timeChannel)*MDC_TIME_FACTOR; }
11 static double MdcCharge(
int chargeChannel) {
return ((
double)chargeChannel)*MDC_CHARGE_FACTOR; }
12 static int MdcChargeChannel (
double charge) {
return (
int)(charge/MDC_CHARGE_FACTOR); }
14 static double CgemTime(
int timeChannel) {
return ((
double)timeChannel)*CGEM_TIME_FACTOR; }
17 static double CgemCharge(
int chargeChannel) {
return ((
double)chargeChannel)*CGEM_CHARGE_FACTOR; }
20 static double EmcTime(
int timeChannel) {
return ((
double)timeChannel)/EMC_TIME_FACTOR; }
23 static double EmcCharge(
int measure,
int chargeChannel)
27 return ((
double)chargeChannel)*EMC_CHARGE_HIGH_MEASURE/EMC_CHARGE_FACTOR;
30 return ((
double)chargeChannel)*EMC_CHARGE_HIGH_MEASURE/EMC_CHARGE_FACTOR;
33 return ((
double)chargeChannel)*EMC_CHARGE_MID_MEASURE/EMC_CHARGE_FACTOR;
36 return ((
double)chargeChannel)*EMC_CHARGE_LOW_MEASURE/EMC_CHARGE_FACTOR;
39 std::cout<<
"Wrong measure of EMC charge channel!"<<std::endl;
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));
52 return (
int)(charge/(EMC_CHARGE_LOW_MEASURE/EMC_CHARGE_FACTOR));
58 if(charge>EMC_CHARGE_HIGH_MEASURE) {
60 }
else if(charge>EMC_CHARGE_MID_MEASURE) {
62 }
else if(charge>EMC_CHARGE_LOW_MEASURE) {
69 static double TofTime(
unsigned int timeChannel) {
return ((
double)timeChannel)*TOF_TIME_FACTOR; }
74 double ADC = chargeChannel & 0x1fff ;
75 return ADC*TOF_CHARGE_FACTOR;
80 unsigned int ADC = (unsigned) (charge/TOF_CHARGE_FACTOR);
81 unsigned int TDC = (unsigned) (
time/TOF_TIME_FACTOR);
84 ADC = (ADC | 0x080000);
87 ADC = ( (TDC & 0x07e000) | ADC) ;
98 static const double MDC_TIME_FACTOR;
99 static const double MDC_CHARGE_FACTOR;
101 static const double CGEM_TIME_FACTOR;
102 static const double CGEM_CHARGE_FACTOR;
104 static const double TOF_TIME_FACTOR;
105 static const double TOF_CHARGE_FACTOR;
107 static const double EMC_CHARGE_HIGH_MEASURE;
108 static const double EMC_CHARGE_MID_MEASURE;
109 static const double EMC_CHARGE_LOW_MEASURE;
110 static const double EMC_TIME_FACTOR;
111 static const double EMC_CHARGE_FACTOR;
static double EmcTime(int timeChannel)
static int EmcChargeChannel(double charge)
static int CgemTimeChannel(double time)
static int MdcTimeChannel(double time)
static int EmcChargeMeasure(double charge)
static int MdcChargeChannel(double charge)
static double CgemCharge(int chargeChannel)
static double MdcTime(int timeChannel)
static unsigned int TofTimeChannel(double time)
static double TofTime(unsigned int timeChannel)
static double TofCharge(unsigned int chargeChannel)
static double CgemTime(int timeChannel)
static int EmcTimeChannel(double time)
static int CgemChargeChannel(double charge)
static unsigned int TofChargeChannel(double charge, double time)
static double EmcCharge(int measure, int chargeChannel)
static double MdcCharge(int chargeChannel)