Hi Hiro, On Tue, 21 Dec 2004, Hironori Ito wrote: > Hello. I have a question about BrRichDigModule since the program > crashes in this module at event No 612. Look at the copy of the problem > codes with my comments. > I am lucky because I have never got crashed for my studies before. But since it crashes, then there should be bugs. > In BrRichDigModule::Event, > > > BrDataTable* hits1 = inNode->GetDataTable("GeantHits RCR1"); > BrDataTable* hits2 = inNode->GetDataTable("GeantHits RCR2"); > BrDataTable* hits3 = inNode->GetDataTable("GeantHits RCR3"); > > Question 1. What are three different table? (Ok, maybe I really don't > care what they are if the program does not crash.) > > see brag/src/fms2/eg_rich.F for further information. > ....... > > if(!hits1 && !hits2 && !hits3){ > if( DebugLevel()>0 ) Warning("BrRichDigModule::Event()", > "No Geant hit in this event" ); > return; > } > > Question 2. Are you sure you only want to check if all of hits1 and > hits 2 and hits 3 are false. (Aren't they suppose to be "or" instead?) > (I think this is the cause of the problem. But, since I don't know > the RICH code well, I need comment from our RICH specialist.) I think it is OK there, but they should be checked for individuals later, which I forgot. Sorry! > > //loop over hits in RCR1 > for(Int_t i = 0; i < hits1->GetEntries(); i++) { > BrGeantHit* hit = (BrGeantHit*) hits1->At(i); > Double_t p = hit->GetTrack()->P(); > Double_t mass = hit->GetTrack()->Mass(); > Int_t trkNo = hit->TrackNo(); > > Question 3. Don't we have to check if hits1 really exits? (But, > my program is not crashing here.) should check! please add it. > > > (still within the same loop) > > //loop over hits in RCR2 to find a hit if any belong to the same track > BrGeantHit * hitRcr2 = 0; > for(Int_t j = 0; j < hits2->GetEntries(); j++) { > BrGeantHit* hit2 = (BrGeantHit*)hits2->At(j); > if(hit2->TrackNo() == trkNo){ > hitRcr2 = hit2; > hits2->RemoveAt(j); > break; > } > } > > Question 4. This is where my program crash since it does not check > if hits2 really exits. Does hits2 always exist when hits1 is there? > Or, go back to Question 2 should check if hits2 exist. > > (still within the same loop) > > //loop over hits in RCR3 to find a hit if any belong to the same track > BrGeantHit * hitRcr3 = 0; > for(Int_t j = 0; j < hits3->GetEntries(); j++){ > BrGeantHit* hit3 = (BrGeantHit*)hits3->At(j); > if(hit3->TrackNo() == trkNo){ > hitRcr3 = hit3; > hits3->RemoveAt(j); > break; > } > } > > Question 5. The same as question 3. (My program does not get here.) > > etc......... > > > Hiro > > > _______________________________________________ > Brahms-dev-l mailing list > Brahms-dev-l@lists.bnl.gov > http://lists.bnl.gov/mailman/listinfo/brahms-dev-l > Best regards, Zhongbao ----------------------------------------------------- Zhongbao YIN Phone: +47-55-582792 (O) Address: +47-55-276803 (H) Fantoftveien 14G 466 E-mail: P.B. 694, 5075 Bergen Yin.Zhongbao@ift.uib.no ------------------------------------------------------ _______________________________________________ Brahms-dev-l mailing list Brahms-dev-l@lists.bnl.gov http://lists.bnl.gov/mailman/listinfo/brahms-dev-lReceived on Tue Dec 21 22:41:14 2004
This archive was generated by hypermail 2.1.8 : Tue Dec 21 2004 - 22:41:36 EST