StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
StEEmcPool
StBbcVertex
BbcHex.cxx
1
#include <math.h>
2
#include <stdio.h>
3
#include <string.h>
4
5
#include "BbcHex.h"
6
7
//-----------------------------
8
//-----------------------------
9
BbcHex::BbcHex(
int
i,
char
*nme) {
10
id
=i;
11
strncpy(name,nme,len);
12
name[len-1]=0;
// just in case
13
a=b=c=d=0;
14
clear();
15
}
16
17
//-----------------------------
18
//-----------------------------
19
void
BbcHex::clear() {
20
tdc=adc=0;
21
tof
=-999;
22
}
23
24
//-----------------------------
25
//-----------------------------
26
void
BbcHex::setHit(
int
T ,
int
A) {
27
tdc=T;
28
adc=A;
29
float
xx=adc;
30
if
(adc>maxAdc) xx=maxAdc;
31
float
tCor=0;
32
if
(b!=.0)tCor=a+b*exp(-c*pow(xx,d));
// do it better,JB
33
tof
=tdc-tCor;
34
}
35
36
//-----------------------------
37
//-----------------------------
38
void
BbcHex::print(
int
k){
39
printf(
" tail=%s adc=%d tdc=%d tof=%f \n"
,name,adc,tdc,
tof
);
40
}
41
42
43
tof
Definition:
tof.h:15
Generated by
1.8.5