#ifdef __GNUG__ #pragma implementation #endif #include "Stntuple/data/TXftTrack.hh" ClassImp(TXftTrack) //_____________________________________________________________________________ TXftTrack::TXftTrack() { ptBin = 0; miniPhi = 0; shortBit = 0; isolationBit = 0; linkerChip = 0; linkerBoard = 0; linkerCrate = 0; absPhi = 0.0; ptVal = 0.0; } //----------------------------------------------------------------------------- TXftTrack::TXftTrack(int ptbin, int miniphi, int shortbit, int isolationbit, int linkerchip, int linkerboard, int linkercrate, float absphi, float ptval) { ptBin = ptbin; miniPhi = miniphi; shortBit = shortbit; isolationBit = isolationbit; linkerChip = linkerchip; linkerBoard = linkerboard; linkerCrate = linkercrate; absPhi = absphi; ptVal = ptval; } //_____________________________________________________________________________ TXftTrack::~TXftTrack() { } //_____________________________________________________________________________ Float_t TXftTrack::TrackPt(Int_t PtBin, Int_t IsolBit, Int_t ShortBit) { // // code stolen from TriggerObjects/src/XFLD_StorableBank.cc (P.Murat) // These are the Pt values for the XFT Pt bins. Need to make this // so that it is extracted from the Database instead of hard-coded. // 4-layer tracks static double ptBinValue[48] = { 192.00, 64.00, 38.40, 27.42, 21.33, 17.45, 14.77, 12.80, 11.29, 10.10, 9.14, 8.34, 7.68, 7.11, 6.62, 6.19, 5.81, 5.48, 5.18, 4.92, 4.68, 4.46, 4.26, 4.09, 3.92, 3.76, 3.62, 3.49, 3.37, 3.25, 3.14, 3.04, 2.91, 2.74, 2.59, 2.46, 2.34, 2.23, 2.13, 2.04, 1.95, 1.88, 1.81, 1.74, 1.68, 1.63, 1.57, 1.52 }; // 3-Layer tracks static double ptBin3Value[16] = { 72.00, 24.00, 14.40, 10.29, 8.00, 6.55, 5.54, 4.80, 4.00, 3.27, 2.77, 2.40, 2.11, 1.89, 1.71, 1.56 }; Float_t pt = 0; if (IsolBit == 1) { // if this is a 4 layer track if (PtBin < 48) pt = -ptBinValue[47-PtBin]; else if (PtBin < 96) pt = ptBinValue[PtBin-48]; else pt = 999.; } else if (ShortBit == 1) { // If this is a 3 layer track if (PtBin<48 & PtBin>31) pt = -ptBin3Value[47-PtBin] ; else if (PtBin<64 & PtBin>47) pt = ptBin3Value[PtBin-48]; else pt = 999.; } else { pt = 999.; } return pt; } //_____________________________________________________________________________ Float_t TXftTrack::TrackDPhi0(Int_t PtBin) { // // corrections to extrapolate XFT track inside to the beam axis // (copied from L2 repository : l2code/l2code/lut/) // 2304 = 288[linker chips]*8[roads per chip] // these corrections hold for 4-segment tracks only // const double XftDPhi0[] = { 54.08542, 52.35096, 50.41146, 48.90202, 46.93496, 45.37098, 43.67344, 41.88289, 40.23367, 38.52722, 36.79359, 35.05856, 33.34353, 31.66563, 29.92814, 28.17620, 26.88049, 26.02568, 25.22361, 24.32409, 23.48657, 22.64203, 21.79797, 20.90727, 20.03737, 19.19192, 18.33249, 17.50924, 16.65452, 15.78755, 14.92435, 14.07770, 13.23585, 12.37578, 11.52258, 10.66714, 9.81100, 8.96283, 8.10275, 7.25575, 6.39971, 5.54605, 4.69423, 3.84030, 2.98626, 2.13314, 1.27988, 0.08191, -0.08191, -1.27988, -2.13314, -2.98626, -3.84030, -4.69423, -5.54605, -6.39971, -7.25575, -8.10275, -8.96283, -9.81100, -10.66714, -11.52258, -12.37578, -13.23585, -14.07770, -14.92435, -15.78755, -16.65452, -17.50924, -18.33249, -19.19192, -20.03737, -20.90727, -21.79797, -22.64203, -23.48657, -24.32409, -25.22361, -26.02568, -26.88049, -28.17620, -29.92814, -31.66563, -33.34353, -35.05856, -36.79359, -38.52722, -40.23367, -41.88289, -43.67344, -45.37098, -46.93496, -48.90202, -50.41146, -52.35096, -54.08542 }; double dphi = XftDPhi0[PtBin]/2304*TMath::Pi()*2.; return dphi; }