--- PamVMC/tof/src/PamVMCTofDig.cxx 2009/02/19 16:00:17 1.1 +++ PamVMC/tof/src/PamVMCTofDig.cxx 2010/02/23 12:09:40 1.6 @@ -27,7 +27,6 @@ ThrowCalFileUsage("TOF",fquery.str().c_str()); fcfile.open(fquery.str().c_str()); - // fcfile.open("/opt/pamela-5.21/calib/tof-param/ToFCalibParam.txt"); if(!fcfile) ThrowCalFileWarning("TOF"); else { @@ -70,6 +69,7 @@ const Int_t ADCsat=3100; // saturation value for the ADCs const Int_t TDClast=4095; + for(Int_t i =0; iGetParticle(PrimaryPDG))->Charge()/3.); Float_t dt1 = 1.e-12*time_res[0]; // single PMT resolution for Z=1 (WM, Nov'07) @@ -300,11 +323,12 @@ t1=t2 = hit->GetTOF(); padNo = hit->GetPOS()-1; pmtleft=pmtright=0; - if(planeNo==2) + if(planeNo==2){ if(padNo==0) padNo=1; else padNo=0; + } Paddle2Pmt(planeNo,padNo, &pmtleft, &pmtright); @@ -363,8 +387,8 @@ // WM right and left <-> t1 += Abs(path[0]/veff0) + s_l_g[planeNo]/veff1; t2 += Abs(path[1]/veff0) + s_l_g[planeNo]/veff1; // Signal reaches PMT - t1 = gRandom->Gaus(t1,TimeRes(PrimaryPDG)); //apply gaussian error dt - t2 = gRandom->Gaus(t2,TimeRes(PrimaryPDG)); //apply gaussian error dt + t1 = frandom->Gaus(t1,TimeRes(PrimaryPDG)); //apply gaussian error dt + t2 = frandom->Gaus(t2,TimeRes(PrimaryPDG)); //apply gaussian error dt t1 += fc1_S[pmtleft] ; // Signal reaches Discriminator ,TDC starts to run t2 += fc1_S[pmtright] ; @@ -391,16 +415,14 @@ if (ftdcpmt[pmtright] < 1000.) // is already filled! if (t2 < ftdcpmt[pmtright]) { ftdcpmt[pmtright] = t2; - t2+= fc2_S[pmtright] ; + t2 += fc2_S[pmtright] ; ftdc[pmtright] = t2; } } if(fDEBUG)cout<<"Time(s):"<GetTOF()<<" t1:"<