--- trieste/pamVMC/src/PamVMCPrimaryGenerator.cxx 2009/03/04 12:51:18 1.1 +++ trieste/pamVMC/src/PamVMCPrimaryGenerator.cxx 2009/03/09 17:09:36 1.2 @@ -224,7 +224,7 @@ Double_t rz = s1_pz-s3_pz; Double_t thmax = (180./Pi())*(ACos(rz/Sqrt(rx*rx+ry*ry+rz*rz))); - Double_t phmax = (180./Pi())*(ATan2(ry,rx)); + //Double_t phmax = (180./Pi())*(ATan2(ry,rx)); //cout << "~~~~~~Theta max Phi max : " << thmax <<", "<< phmax << endl; //generate a track check and let it go only if it is passing through all @@ -234,7 +234,7 @@ do { //cout << "+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+" << endl; - GenSphDist(r, 0., thmax, 0., phmax); + GenSphDist(r, 0., thmax, 0., 360.); Double_t th = (Pi()/180.)*fprim.fTHETA; Double_t ph = (Pi()/180.)*fprim.fPHI; @@ -242,12 +242,12 @@ Double_t x1, y1, x2, y2, x3, y3; - x1 = s1_pz*Tan(th)*Cos(ph); - y1 = s1_pz*Tan(th)*Sin(ph); - x2 = s2_pz*Tan(th)*Cos(ph); - y2 = s2_pz*Tan(th)*Sin(ph); - x3 = s3_pz*Tan(th)*Cos(ph); - y3 = s3_pz*Tan(th)*Sin(ph); + x1 = s1_pz*Tan(th)*Cos(ph) - fprim.fX0; + y1 = s1_pz*Tan(th)*Sin(ph) - fprim.fY0; + x2 = s2_pz*Tan(th)*Cos(ph) - fprim.fX0; + y2 = s2_pz*Tan(th)*Sin(ph) - fprim.fY0; + x3 = s3_pz*Tan(th)*Cos(ph) - fprim.fX0; + y3 = s3_pz*Tan(th)*Sin(ph) - fprim.fY0; if ( Abs(x1) <= Abs(s1_x) && Abs(y1) <= Abs(s1_y) && Abs(x2) <= Abs(s2_x) && Abs(y2) <= Abs(s2_y) &&