Re: [Brahms-dev-l] question about BrRichDigModule

From: Claus O. E. Jorgensen <ekman@nbi.dk>
Date: Wed Dec 22 2004 - 06:46:11 EST
Hi Hiro,

> > 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.

As I rememeber it these are the three different volumes that gives the
total active radiator volume of the RHIC. GEANT does not have a single
volume that can give us the shape of the radiator - therefore it's made
out of three volumes. I believe RCR1 is a simple box (most of the volume),
while RCR2 and RCR3 gives the top of the active volume.

> >   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!

This is fine. We want to check if none of the three volumes were hit. The
mistakes come later when we don't check if the hits in the single volumes
exist.

>
> >
> >   //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.

I guess this is a mistake, sorry about that.

> >      (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.

I guess this is another mistake, sorry about that.

> >     (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.)
> >

I guess this is yet another mistake, sorry about that.

Cheers,

Claus

> > 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-l
>

_______________________________________________
Brahms-dev-l mailing list
Brahms-dev-l@lists.bnl.gov
http://lists.bnl.gov/mailman/listinfo/brahms-dev-l
Received on Wed Dec 22 06:46:35 2004

This archive was generated by hypermail 2.1.8 : Wed Dec 22 2004 - 06:46:56 EST