From 00719c1b1e1da0adeb2052d41395e01cd224e80d Mon Sep 17 00:00:00 2001 From: fca Date: Fri, 3 Dec 1999 10:54:35 +0000 Subject: [PATCH] Fix lego summary --- STEER/AliLego.cxx | 21 +++++++++++++++------ STEER/AliRun.cxx | 20 +++++++++++++++++++- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/STEER/AliLego.cxx b/STEER/AliLego.cxx index 250834ba3c2..003856342ca 100644 --- a/STEER/AliLego.cxx +++ b/STEER/AliLego.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.8 1999/10/01 09:54:33 fca +Correct logics for Lego StepManager + Revision 1.7 1999/09/29 09:24:29 fca Introduction of the Copyright and cvs Log @@ -241,7 +244,7 @@ void AliLego::StepManager() // called from AliRun::Stepmanager from gustep. // Accumulate the 3 parameters step by step - Float_t t, tt; + static Float_t t; Float_t a,z,dens,radl,absl; Int_t i; @@ -259,7 +262,13 @@ void AliLego::StepManager() // --- See if we have to stop now if (TMath::Abs(pos[2]) > fZMax || pos[0]*pos[0] +pos[1]*pos[1] > fRadMax*fRadMax) { - gMC->StopEvent(); + if (gMC->TrackLength()) { + // Not the first step, add past contribution + fTotAbso += t/absl; + fTotRadl += t/radl; + fTotGcm2 += t*dens; + } + gMC->StopTrack(); return; } @@ -268,11 +277,11 @@ void AliLego::StepManager() vect[i]=pos[i]; dir[i]=mom[i]; } + t = PropagateCylinder(vect,dir,fRadMax,fZMax); - tt = TMath::Min(step,t); - fTotAbso += tt/absl; - fTotRadl += tt/radl; - fTotGcm2 += tt*dens; + fTotAbso += step/absl; + fTotRadl += step/radl; + fTotGcm2 += step*dens; } diff --git a/STEER/AliRun.cxx b/STEER/AliRun.cxx index 98f9a0f1474..37118ff1afa 100644 --- a/STEER/AliRun.cxx +++ b/STEER/AliRun.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.21 1999/11/25 10:40:08 fca +Fixing daughters information also in primary tracks + Revision 1.20 1999/10/04 18:08:49 fca Adding protection against inconsistent Euclid files @@ -416,7 +419,7 @@ void AliRun::FinishEvent() // // Called at the end of the event. // - + printf("\n\n\n\nEntering FinishEvent \n\n\n"); //Update the energy deposit tables Int_t i; for(i=0;iFill(); + Int_t np=fParticles->GetEntriesFast(); + printf("Checking %d\n",np); + for (Int_t inpart=0; inpartUncheckedAt(inpart); + Int_t icode = particle->GetPdgCode(); + Double_t chg = particle->GetPDG()->Charge(); + + if (icode==111 && chg) { + printf("%s charge %f %p %s\n", + particle->GetName(),chg,particle->GetPDG(), + particle->GetPDG()->GetName()); + } + } + // Reset stack info ResetStack(); -- 2.43.0