#include "THaVDCAnalyticTTDConv.h"
ClassImp(THaVDCAnalyticTTDConv)
THaVDCAnalyticTTDConv::THaVDCAnalyticTTDConv()
{
}
THaVDCAnalyticTTDConv::THaVDCAnalyticTTDConv( Double_t vel)
{
fDriftVel = vel;
fA1tdcCor[0] = 2.12e-3;
fA1tdcCor[1] = 0.0;
fA1tdcCor[2] = 0.0;
fA1tdcCor[3] = 0.0;
fA2tdcCor[0] = -4.20e-4;
fA2tdcCor[1] = 1.3e-3;
fA2tdcCor[2] = 1.06e-4;
fA2tdcCor[3] = 0.0;
fdtime = 4.e-9;
}
THaVDCAnalyticTTDConv::~THaVDCAnalyticTTDConv()
{
}
Double_t THaVDCAnalyticTTDConv::ConvertTimeToDist(Double_t time,
Double_t tanTheta,
Double_t *ddist)
{
Double_t a1 = 0.0, a2 = 0.0;
tanTheta = 1.0 / tanTheta;
for (Int_t i = 3; i >= 1; i--) {
a1 = tanTheta * (a1 + fA1tdcCor[i]);
a2 = tanTheta * (a2 + fA2tdcCor[i]);
}
a1 += fA1tdcCor[0];
a2 += fA2tdcCor[0];
Double_t dist = fDriftVel * time;
Double_t unc = fDriftVel * fdtime;
if (dist < 0) {
} else if (dist < a1 ) {
dist *= ( 1 + a2 / a1);
unc *= ( 1 + a2 / a1);
} else {
dist += a2;
}
if (ddist) *ddist = unc;
return dist;
}
Last change: Sat Nov 7 21:26:54 2009
Last generated: 2009-11-07 21:26
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.