Hi Djamel et al, I spoke too soon. Although I'm now able to replay OK, the BB vertex that I'm getting back is nonsensical. I think the problem has something to do with the left hits, but I'm not sure of this. Basically, the GetZ0 method returns values outside of the machine precision. To get a handle on this I put a number of print statements in BrBbVertexModule::Vertex //____________________________________________________________________ void BrBbVertexModule::Vertex(BrBbVertex* vtx, Int_t lmin, Int_t lmax, Int_t rmin, Int_t rmax, Float_t zOffset) { // private method // ------------------------------------------------------------- // evaluate vertex with tubes between lmin, lmax and rmin, rmax // ------------------------------------------------------------- Double_t leftTime = 0; Double_t rightTime = 0; Double_t tmp = 0; Int_t nr = 0; Int_t nl = 0; // ----------------------------------------------- // -------- right array time for (Int_t i = 0; i < fBbrHits->GetEntries(); i++) { BrBbCalHits::BrBbHit* hit = fBbrHits->GetHit(i); if (hit->GetTubeNo() < rmin || hit->GetTubeNo() > rmax) continue; tmp += hit->GetTof(); nr++; } if (!nr) return; // average per tube rightTime = tmp/nr; cout<<" right time 1: "<<tmp<<" "<<nr<<" "<<rightTime<<endl; // ----------------------------------------------- tmp = 0; // ------- left array time for (Int_t i = 0; i < fBblHits->GetEntries(); i++) { BrBbCalHits::BrBbHit* hit = fBblHits->GetHit(i); if (hit->GetTubeNo() < lmin || hit->GetTubeNo() > lmax) continue; tmp += hit->GetTof(); nl++; } if (!nl) return; // average per tube leftTime = tmp/nl; cout<<" left time 1: "<<tmp<<" "<<nr<<" "<<leftTime<<endl; // ------------------------------------------------------------ // check now if there are some tubes too far off (from average) // ------------------------------------------------------------ nr = 0; nl = 0; tmp = 0; // -------- right array time for (Int_t i = 0; i < fBbrHits->GetEntries(); i++) { BrBbCalHits::BrBbHit* hit = fBbrHits->GetHit(i); if (hit->GetTubeNo() < rmin || hit->GetTubeNo() > rmax) continue; if (TMath::Abs(hit->GetTof() - rightTime) > fMaxTimeDiff) continue; tmp += hit->GetTof(); nr++; } if (!nr) return; // average per tube rightTime = tmp/nr; cout<<" right time 2: "<<tmp<<" "<<nr<<" "<<rightTime<<endl; //----------------------------------------------- tmp = 0; // ------- left array time for (Int_t i = 0; i < fBblHits->GetEntries(); i++) { BrBbCalHits::BrBbHit* hit = fBblHits->GetHit(i); if (hit->GetTubeNo() < lmin || hit->GetTubeNo() > lmax) continue; if (TMath::Abs(hit->GetTof() - leftTime) > fMaxTimeDiff) continue; tmp += hit->GetTof(); nl++; } if (!nl) return; // average per tube leftTime = tmp/nl; cout<<" left time 2: "<<tmp<<" "<<nr<<" "<<leftTime<<endl; // -------------- time 0 and vertex Double_t c = BrUnits::c_light; vtx->SetZ0(c/2 * (leftTime - rightTime) - zOffset); vtx->SetLeftTime(leftTime); vtx->SetRightTime(rightTime); vtx->SetTime0((leftTime + rightTime)/2 - (fArrayDist + zOffset)/c); cout<<"In vertex: lmin,lmax,rmin,rmax- "<<lmin<<" "<<lmax<<" "<<rmin<<" "<<rmax<<endl; cout<<"leftTime,rightTime: "<<leftTime<<" "<<rightTime<<endl; } I also have print statements elsewhere, but these are the key ones. The output looks like: nl,nr: 8 2 right time 1: 784.223 1 784.223 left time 1: 1.13117e+36 1 5.65584e+35 right time 2: 784.223 1 784.223 right time 1: 1.74439e+32 1 1.74439e+32 left time 1: nan 1 nan right time 2: 1.74439e+32 1 1.74439e+32 left time 2: nan 1 nan In vertex: lmin,lmax,rmin,rmax- 1 36 1 30 leftTime,rightTime: nan 1.74439e+32 right time 1: 784.223 1 784.223 left time 1: -1.17019e+41 1 -1.17019e+41 right time 2: 784.223 1 784.223 left time 2: -1.17019e+41 1 -1.17019e+41 In vertex: lmin,lmax,rmin,rmax- 24 24 32 32 leftTime,rightTime: -1.17019e+41 784.223 -33.8061 nan nan 2 ----------------------------------------------------------------- nl,nr: 7 2 right time 1: 798.229 1 798.229 left time 1: 1.25187e+36 1 6.25934e+35 right time 2: 798.229 1 798.229 right time 1: 1.47583e+32 1 1.47583e+32 left time 1: nan 1 nan right time 2: 1.47583e+32 1 1.47583e+32 left time 2: nan 1 nan In vertex: lmin,lmax,rmin,rmax- 1 36 1 30 leftTime,rightTime: nan 1.47583e+32 right time 1: 798.229 1 798.229 left time 1: -1.31734e+41 1 -1.31734e+41 right time 2: 798.229 1 798.229 left time 2: -1.31734e+41 1 -1.31734e+41 In vertex: lmin,lmax,rmin,rmax- 24 24 32 32 leftTime,rightTime: -1.31734e+41 798.229 50.5185 nan nan 2 ----------------------------------------------------------------- nl,nr: 7 3 right time 1: 768.945 1 768.945 left time 1: 1.24815e+36 1 6.24077e+35 right time 2: 768.945 1 768.945 right time 1: 2.88456e+33 2 1.44228e+33 left time 1: nan 2 nan right time 1: 768.945 1 768.945 left time 1: -9.9923e+34 1 -9.9923e+34 right time 2: 768.945 1 768.945 left time 2: -9.9923e+34 1 -9.9923e+34 In vertex: lmin,lmax,rmin,rmax- 43 43 32 32 leftTime,rightTime: -9.9923e+34 768.945 87.9345 -1.49781e+36 -4.99615e+34 3 What I notice is that the left time ALWAYS seems to be bad. The right time looks OK (assuming it should be around 800, I'm not sure of this). At this point I don't have anything in my code the specifically references the right or left array. Any more suggestions? ...steve
This archive was generated by hypermail 2b30 : Fri Oct 26 2001 - 18:14:32 EDT