]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSsimulationSPDdubna.cxx
Minor changes in support of changes to AliITSdigitS?D class'.
[u/mrichter/AliRoot.git] / ITS / AliITSsimulationSPDdubna.cxx
index ffb10302c9423141e5d0f69758002f02b77225c6..370c96e14d4334be0355d248b267ca776c099793 100644 (file)
 
 /*
 $Log$
+Revision 1.6  2002/08/21 22:09:58  nilsen
+Updated SPD simulation with difusion effects. ReWritten Hit to SDigits
+code.
+
 */
 #include <iostream.h>
 #include <TRandom.h>
@@ -700,7 +704,8 @@ void AliITSsimulationSPDdubna::HitToSDigitOld(AliITSmodule *mod, Int_t module,
                                               // expect module to be an 
                                               // integer
                            UpdateMapSignal(kz-1,kx-1,
-                                           mod->GetHitTrackIndex(hit),
+//                                         mod->GetHitTrackIndex(hit),
+                             ((AliITShit*)(mod->GetHit(hit)))->GetTrack(),
                                            hit,fModule,dXCharge,pList);
                        }      // dXCharge > 1 e-
                    }       // jx loop
@@ -726,7 +731,7 @@ void AliITSsimulationSPDdubna::ChargeToSignal(AliITSpList *pList){
     Float_t  electronics;
 //    Float_t  phys; 
     Double_t sig;
-    const Int_t    nmaxtrk=3;
+    const Int_t    nmaxtrk=AliITSdigitSPD::GetNTracks();
     static AliITSdigitSPD dig;
 
     for(Int_t iz=0; iz<fNPixelsZ; iz++){
@@ -749,7 +754,7 @@ void AliITSsimulationSPDdubna::ChargeToSignal(AliITSpList *pList){
                digits[2] = 1; */
                for(j=0;j<nmaxtrk;j++){
 //                 charges[j] = 0.0;
-                   if (pList->GetTrack(iz,ix,0)) {
+                   if (j<pList->GetNEnteries()) {
                        dig.fTracks[j] = pList->GetTrack(iz,ix,j);
                        dig.fHits[j]   = pList->GetHit(iz,ix,j);
                        /*
@@ -757,8 +762,8 @@ void AliITSsimulationSPDdubna::ChargeToSignal(AliITSpList *pList){
                        hits[j]   = pList->GetHit(iz,ix,j);
                        */
                    }else { // Default values
-                       dig.fTracks[j] = pList->GetTrack(iz,ix,j);
-                       dig.fHits[j]   = pList->GetHit(iz,ix,j);
+                       dig.fTracks[j] = -3;
+                       dig.fHits[j]   = -1;
 /*                     tracks[j] = -2; //noise
                        hits[j]   = -1;  */
                    } // end if pList