Hi djamel, Thanks for pointing this out - I am also embarassed since I checked part of this code , and naively but incorrectly assumed that radius2 had been set to radius**2 ; Coewritting wise it points to the old ideom that one should NEVER define variable until they are used initialized. E.g Doulble_t Radius2 = Radius*Radius; \and not the fortran like statement used some places. On the physics issue - there are probably a class of tracks with high momentum at larger angles that out to have swim status set from this constraint. flemming ---------------------------------------------------------------- Flemming Videbaek Physics Department Brookhaven National Laboratory e-mail: videbaek@bnl.gov phone: 631-344-4106 ----- Original Message ----- From: "Djamel Ouerdane" <ouerdane@nbi.dk> To: "Brahms Devel List" <brahms-dev-l@lists.bnl.gov> Sent: Thursday, July 29, 2004 6:09 AM Subject: [Brahms-dev-l] D1 swim status > I think there's a serious mistake (at least software-wise) in > BrMagnet::GetSwimStatus for D1. > > Indeed, here's an extract from the code : > > Double_t x0, z0, Radius, Radius2; > > ... > > // D1 case (due to Cu block) > > Radius = TMath::Abs(Radius); > > Double_t outerPos = -112.7; //outer addge of the D1 front field clamp? > Double_t innerPos = outerPos + 38.1; > Double_t InnerX = TMath::Sqrt(Radius2 - (innerPos-z0)*(innerPos-z0)) + x0; > Double_t OuterX = TMath::Sqrt(Radius2 - (outerPos-z0)*(outerPos-z0)) + x0; > > if (InnerX < (-3.56 + FiduCutX) || OuterX < (-1.81 + FiduCutX)) > TrackTransported=kFALSE; > } > > > Look at it carefully, the variable Radius2 is defined, not initialized, > and then used in the D1 equations. I checked the code in between (the > three dots I've put here), Radius2 is never set to anything. I checked > some older revision (namely before some recent cleaning) : same thing. > > How important is it ?? > > Djam > > > -- > Djamel Ouerdane ------------------------------------------o > | Niels Bohr Institute | Home: | > | Blegdamsvej 17, DK-2100 Ø | Jagtvej 141 2D, | > | Fax: +45 35 32 50 16 | DK-2200 Copenhagen N | > | Tel: +45 35 32 52 69 | +45 35 86 19 74 | > | http://www.nbi.dk/~ouerdane | > | ouerdane@nbi.dk | > o---------------------------------------------------------o > > > _______________________________________________ > 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-lReceived on Thu Jul 29 08:32:41 2004
This archive was generated by hypermail 2.1.8 : Thu Jul 29 2004 - 08:32:57 EDT