]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONv1.cxx
Removing warnings
[u/mrichter/AliRoot.git] / MUON / AliMUONv1.cxx
index 99d5779d1e9f633eead0bb2cadad26df2a108163..39f2cf57ba5dcfb331ebc6ef209b822c2912bbd3 100644 (file)
@@ -174,6 +174,8 @@ void AliMUONv1::CreateGeometry()
       // Get envelope
       AliMUONGeometryEnvelope* env = (AliMUONGeometryEnvelope*)kEnvelopes->At(k);
       const TGeoCombiTrans* kEnvTrans = env->GetTransformation();
+      const char* only = "ONLY";
+      if (env->IsMANY()) only = "MANY";
 
       if (env->IsVirtual() && env->GetConstituents()->GetEntriesFast() == 0 ) {
         // virtual envelope + nof constituents = 0 
@@ -202,7 +204,7 @@ void AliMUONv1::CreateGeometry()
            (*geometry->GetTransformation()) * 
            (*kEnvTrans);
         PlaceVolume(env->GetName(), geometry->GetMotherVolume(),
-                   env->GetCopyNo(), total, 0, 0);
+                   env->GetCopyNo(), total, 0, 0, only);
       }
 
       if (env->IsVirtual() && env->GetConstituents()->GetEntriesFast() > 0 ) {
@@ -224,7 +226,7 @@ void AliMUONv1::CreateGeometry()
 
           PlaceVolume(constituent->GetName(), geometry->GetMotherVolume(),
                      constituent->GetCopyNo(), total,
-                      constituent->GetNpar(), constituent->GetParam());
+                      constituent->GetNpar(), constituent->GetParam(), only);
         }
       }
     } 
@@ -386,7 +388,7 @@ void AliMUONv1::CreateMaterials()
 //______________________________________________________________________________
 void AliMUONv1::PlaceVolume(const TString& name, const TString& mName, 
                             Int_t copyNo, const TGeoHMatrix& matrix, 
-                           Int_t npar, Double_t* param) const
+                           Int_t npar, Double_t* param, const char* only) const
 {
 // Place the volume specified by name with the given transformation matrix
 // ---
@@ -445,10 +447,10 @@ void AliMUONv1::PlaceVolume(const TString& name, const TString& mName,
   }    
        
   // Place the volume in ALIC
-  if (npar == 0) 
-    gMC->Gspos(name, copyNo, mName, xyz[0], xyz[1], xyz[2] , krot, "ONLY");
+  if (npar == 0)
+    gMC->Gspos(name, copyNo, mName, xyz[0], xyz[1], xyz[2] , krot, only);
   else 
-    gMC->Gsposp(name, copyNo, mName, xyz[0], xyz[1], xyz[2] , krot, "ONLY",
+    gMC->Gsposp(name, copyNo, mName, xyz[0], xyz[1], xyz[2] , krot, only,
                 param, npar);
 
 } 
@@ -545,6 +547,10 @@ void AliMUONv1::StepManager()
 
   if (idvol == -1) return;
 
+  // Filling TrackRefs file for MUON. Our Track references are the active volume of the chambers
+  if ( (gMC->IsTrackEntering() || gMC->IsTrackExiting() ) )     
+    AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber());
+  
    if( gMC->IsTrackEntering() ) {
      Float_t theta = fTrackMomentum.Theta();
      if ((TMath::Pi()-theta)*kRaddeg>=15.) gMC->SetMaxStep(fStepMaxInActiveGas); // We use Pi-theta because z is negative