AliTrackReference constructor without passing pointer to VMC.
[u/mrichter/AliRoot.git] / ITS / AliITSvSPD02.cxx
index 3486ba46b882154c191db848a40be23a254fd519..905bddac419c04a2eaaf09723a8d0614da3d60a3 100644 (file)
 
 /*
 $Log$
+Revision 1.3  2003/03/21 14:34:10  nilsen
+Removed warning from part of code not properly implimneted yet.
+
+Revision 1.2  2003/02/12 10:39:05  hristov
+Updated AliTrackReference class (S.Radomski)
+
+Revision 1.1  2002/12/05 20:07:25  nilsen
+Adding new SPD 2002 test-beam geometry, with Config file (setup for testing,
+50 pions in one event and not 50 events with one pion).
+
 */
 #include <Riostream.h>
 #include <stdio.h>
@@ -475,7 +485,7 @@ void AliITSvSPD02::InitAliITSgeom(){
        return;
     } // end if
     cout << "Reading Geometry transformation directly from Geant 3." << endl;
-    const Int_t nlayers = 2;
+    const Int_t nlayers = 6;
     const Int_t ndeep = 5;
     Int_t itsGeomTreeNames[nlayers][ndeep],lnam[20],lnum[20];
     Int_t nlad[nlayers],ndet[nlayers];
@@ -680,16 +690,10 @@ void AliITSvSPD02::StepManager(){
     static Int_t stat0=0;
     if((id=gMC->CurrentVolID(copy) == fIDMother)&&
        (gMC->IsTrackEntering()||gMC->IsTrackExiting())){
-       gMC->TrackPosition(position); // Get Position
-       gMC->TrackMomentum(momentum); // Get Momentum
        copy = fTrackReferences->GetEntriesFast();
        TClonesArray &lTR = *fTrackReferences;
        // Fill TrackReference structure with this new TrackReference.
-       AliTrackReference *tr = new(lTR[copy]) AliTrackReference();
-       tr->SetTrack(gAlice->CurrentTrack());
-       tr->SetPosition(position.X(),position.Y(),position.Z());
-       tr->SetMomentum(momentum.Px(),momentum.Py(),momentum.Pz());
-       tr->SetLength(gMC->TrackLength());
+       new(lTR[copy]) AliTrackReference(gAlice->CurrentTrack());
     } // if Outer ITS mother Volume
     if(!(this->IsActive())){
        return;