]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONv1.cxx
Introduction of AliTRDLeastSquare
[u/mrichter/AliRoot.git] / MUON / AliMUONv1.cxx
index c172dcabef61522893b3b8c5a01739807cdc83cf..6ad827c500f75a09ceefd5752d1a832e4552a6eb 100644 (file)
 
 /* $Id$ */
 
-// --------------------
+//-----------------------------------------------------------------------------
 // Class AliMUONv1
 // --------------------
 // AliDetector class for MUON subsystem which implements
 // functions for simulation 
+//-----------------------------------------------------------------------------
 
 #include "AliMUONv1.h"
 #include "AliMUONConstants.h"
@@ -32,6 +33,7 @@
 #include "AliMUONStringIntMap.h"       
 #include "AliMUONGeometryDetElement.h" 
 
+#include "AliMpCDB.h"
 #include "AliMpDEManager.h"
 
 #include "AliConst.h" 
@@ -91,6 +93,11 @@ AliMUONv1::AliMUONv1(const char *name, const char* title)
 
     AliDebug(1,Form("ctor this=%p",this));     
        
+    // Load mapping
+    if ( ! AliMpCDB::LoadMpSegmentation() ) {
+      AliFatal("Could not access mapping from OCDB !");
+    }
+       
     // By default include all stations
 
     fStepSum   = new Float_t [AliMUONConstants::NCh()];
@@ -175,7 +182,7 @@ void AliMUONv1::Init()
   //
   // Build response
   //
-  AliMUONResponseFactory respFactory("default");
+  AliMUONResponseFactory respFactory("default", fIsTailEffect);
   respFactory.Build(this);
   
 }
@@ -283,7 +290,7 @@ void AliMUONv1::StepManager()
   // Filling TrackRefs file for MUON. Our Track references are the active volume of the chambers
   if ( (gMC->IsTrackEntering() || gMC->IsTrackExiting() ) ) {
     AliTrackReference* trackReference    
-      = AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber());
+      = AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kMUON);
     trackReference->SetUserId(detElemId);
   }