]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONSDigitizerV2.cxx
Possibility to set max probable Pt (tracking without Magnetic field) (Yuri)
[u/mrichter/AliRoot.git] / MUON / AliMUONSDigitizerV2.cxx
index 942d5e0698449b1254f40e6fdd68856a7d2b4dc5..b68c70284e6927790d18cf97c7a602e5f0aaf486 100644 (file)
 
 // $Id$
 
+#include <TClonesArray.h>
+
 #include "AliMUONSDigitizerV2.h"
 
 #include "AliLog.h"
 #include "AliMUON.h"
 #include "AliMUONChamber.h"
-#include "AliMUONData.h"
+#include "AliMUONSimData.h"
 #include "AliMUONDigit.h"
 #include "AliMUONHit.h"
+#include "AliMpDEManager.h"
 #include "AliLoader.h"
 #include "AliRun.h"
 #include "AliRunLoader.h"
 #include "TObjArray.h"
 
+
 ///
 /// The sdigitizer performs the transformation from hits (energy deposits by
 /// the transport code) to sdigits (equivalent of charges on pad).
@@ -50,31 +54,31 @@ ClassImp(AliMUONSDigitizerV2)
 AliMUONSDigitizerV2::AliMUONSDigitizerV2() 
 : TTask("AliMUONSDigitizerV2","From Hits to SDigits for MUON")
 {
-  //
-  // ctor.
-  //
+  ///
+  /// ctor.
+  ///
 }
 
 //_____________________________________________________________________________
 AliMUONSDigitizerV2::~AliMUONSDigitizerV2()
 {
-  //
-  // dtor.
-  //
+  ///
+  /// dtor.
+  ///
 }
 
 //_____________________________________________________________________________
 void
 AliMUONSDigitizerV2::Exec(Option_t*)
 {
-  //
-  // Go from hits to sdigits.
-  //
-  // In the code below, apart from the loop itself (which look complicated
-  // but is really only a loop on each hit in the input file) the main
-  // work is done in AliMUONResponse::DisIntegrate method, which converts
-  // a single hit in (possibly) several sdigits.
-  //
+  ///
+  /// Go from hits to sdigits.
+  ///
+  /// In the code below, apart from the loop itself (which look complicated
+  /// but is really only a loop on each hit in the input file) the main
+  /// work is done in AliMUONResponse::DisIntegrate method, which converts
+  /// a single hit in (possibly) several sdigits.
+  ///
   
   AliDebug(1,"");
   
@@ -83,7 +87,7 @@ AliMUONSDigitizerV2::Exec(Option_t*)
 
   fLoader->LoadHits("READ");
   
-  AliMUONData muonData(fLoader,"MUON","MUON");
+  AliMUONSimData muonData(fLoader,"MUON","MUON");
 
   AliMUON* muon = static_cast<AliMUON*>(gAlice->GetModule("MUON"));
     
@@ -152,7 +156,7 @@ AliMUONSDigitizerV2::Exec(Option_t*)
       if ( d->Signal() > 0 ) // that check would be better in the disintegrate
         // method, but to compare with old sdigitizer, it has to be there.
       {
-        muonData.AddSDigit(d->DetElemId()/100-1,*d);
+        muonData.AddSDigit(AliMpDEManager::GetChamberId(d->DetElemId()),*d);
       }
     }
     muonData.Fill("S");