//*-- Author : Paul Eugenio 2-Nov-98 //*-- CMZ : PME 7-Jan-99 //////////////////////////////////////////////////////////////////////// // TMCFastTOF // // Time-of-flight information obtained // from the mcfast track tracing // // This class is an object oriented version // of mcfast trace common block. // // More information see Tracking in MCFast doc at: //Begin_Html /* http://www-pat.fnal.gov/mcfast.html */ //End_Html // //////////////////////////////////////////////////////////////////////// #include "TMCFastTOF.h" ClassImp(TMCFastTOF) //____________________________________________________________________________ TMCFastTOF::TMCFastTOF(struct traces_t *traces){ // Call FIll() // Fill(traces); } //____________________________________________________________________________ void TMCFastTOF::Fill(struct traces_t *traces){ // Fill the object info using //common block information // SetNtraces(traces->ntraces); for(Int_t i=0;i< this->GetNtraces();i++){ SetHep(i, traces->trace[i].hep) ; SetType(i,traces->trace[i].type) ; SetPlane(i,traces->trace[i].plane); SetHits(i,traces->trace[i].hit) ; SetPx(i,traces->trace[i].w.px); SetPy(i,traces->trace[i].w.py); SetPz(i,traces->trace[i].w.pz); SetE(i,traces->trace[i].w.E) ; SetX(i,traces->trace[i].w.x) ; SetY(i,traces->trace[i].w.y) ; SetZ(i,traces->trace[i].w.z) ; SetPt(i,traces->trace[i].w.pt); SetP(i,traces->trace[i].w.p) ; SetQ(i,traces->trace[i].w.q) ; for(Int_t j=0;j<3;j++) SetEta(i,j,traces->trace[i].eta[j]); SetPath(i,traces->trace[i].path); SetTime(i,traces->trace[i].time); SetTau(i,traces->trace[i].tau) ; SetMaterial(i,traces->trace[i].material); SetRadl(i,traces->trace[i].radl); SetDedx(i,traces->trace[i].dedx) ; } } //____________________________________________________________________________ Double_t TMCFastTOF::GetCTOF(Int_t hep){ // Get time-of-flight for the central region // // The routine first finds the central trace // for the hep particle and then calculates // the tof of that trace. // // See GetType() for information about trace types // // // tof = (GetTime(i) - GetTime(0)); // Double_t tof=-1; // default for no info Int_t ntraces=GetNtraces(); for(Int_t i=0;iGetHep(j)<<" Type: "<< this->GetType(j); *os<<" Plane: "<< GetPlane(j)<<" Nhits: "<< GetHits(j)<