/** * \file TrkStruct.h * \author Elena Vannuccini * \date */ #include #include #include #include #include #include using namespace pamela; using namespace std; float aint(float f){ int ret = (int)f; float ret1 = 0; ret1=(float)ret; return ret1; } float anint(float f){ int ret = (int)(f+0.5); float ret1 = 0; ret1=(float)ret; return ret1; } /** * Method to fill the tracker calibration-parameter struct from on-line calibrations */ void cTrkCalib::FillFrom(TFile* f0, Int_t ev_reg1, Int_t ev_reg2){ TTree *tr1 = (TTree*)f0->Get("CalibTrk1"); TTree *tr2 = (TTree*)f0->Get("CalibTrk2"); CalibTrk1Event *calibdata1 = 0; CalibTrk2Event *calibdata2 = 0; tr1->SetBranchAddress("CalibTrk1",&calibdata1); tr2->SetBranchAddress("CalibTrk2",&calibdata2); tr1->GetEntry(ev_reg1); tr2->GetEntry(ev_reg2); Int_t dspn1(0),dspn2(0); for(Int_t i=0;i<6;i++){ dspn1=calibdata1->DSPnumber[i]-1; dspn2=calibdata2->DSPnumber[i]-1; /* cout<<"dspn1= "<