/*
$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
// 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;
// --- 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;
}
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;
}
/*
$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
//
// 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;i<sEventEnergy.GetSize();i++) {
// Write out the event Header information
if (fTreeE) fTreeE->Fill();
+ Int_t np=fParticles->GetEntriesFast();
+ printf("Checking %d\n",np);
+ for (Int_t inpart=0; inpart<np;++inpart) {
+
+ TParticle *particle = (TParticle*)fParticles->UncheckedAt(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();