]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/EveDet/AliEveMUONData.cxx
- AliMUONRecoParam.cxx:
[u/mrichter/AliRoot.git] / EVE / EveDet / AliEveMUONData.cxx
index 95cad37b9d3302fb8b904013b5a107363e4a759a..57edfcb75aa18126e43eb71c40df9d702640e7a5 100644 (file)
@@ -17,8 +17,6 @@
 #include <AliRawReaderDate.h>
 #include <AliRawReaderRoot.h>
 
-#include <AliLog.h>
-
 #include <AliMUONDigitMaker.h>
 #include <AliMUONHit.h>
 #include <AliMUONVCluster.h>
 #include "AliMUONVDigitStore.h"
 #include "AliMUONTrackParam.h"
 #include "AliMUONTrack.h"
+#include "AliMUONESDInterface.h"
 #include "AliESDMuonTrack.h"
 #include "AliESDEvent.h"
 #include "TTree.h"
 #include "TString.h"
 #include "TClonesArray.h"
-#include "TList.h"
 #include "TFile.h"
 
 
@@ -268,11 +266,12 @@ void AliEveMUONData::LoadRecPointsFromESD(Char_t *fileName)
   AliMUONVCluster *cluster;
   AliMUONTrackParam *trackParam;
   AliESDMuonTrack *esdTrack;
+  AliMUONTrack muonTrack;
   Int_t detElemId, chamber, nTrackParam;
   Double_t clsX, clsY, clsZ, charge;
   
-  if (esdTree->GetEvent(gEvent->GetEventId()) <= 0) {
-    cout << "fails to read ESD object for event " << gEvent->GetEventId() << endl;
+  if (esdTree->GetEvent(gAliEveEvent->GetEventId()) <= 0) {
+    cout << "fails to read ESD object for event " << gAliEveEvent->GetEventId() << endl;
     return;
   }
     
@@ -280,7 +279,7 @@ void AliEveMUONData::LoadRecPointsFromESD(Char_t *fileName)
   for (Int_t iTrack = 0; iTrack < nTracks; iTrack++) {
     esdTrack = esdEvent->GetMuonTrack(iTrack);
     if (!esdTrack->ClustersStored()) continue;
-    AliMUONTrack muonTrack(*esdTrack);
+    AliMUONESDInterface::ESDToMUON(*esdTrack,muonTrack);
     nTrackParam = muonTrack.GetTrackParamAtCluster()->GetEntries();
     for(Int_t iCluster = 0; iCluster < nTrackParam; iCluster++) {
       trackParam = (AliMUONTrackParam *) muonTrack.GetTrackParamAtCluster()->At(iCluster);
@@ -299,6 +298,7 @@ void AliEveMUONData::LoadRecPointsFromESD(Char_t *fileName)
   }
 
   delete esdEvent;
+  
   esdFile->Close();
 
 }
@@ -403,7 +403,7 @@ void AliEveMUONData::LoadRaw(TString fileName)
   Int_t iEvent = 0;
   while (fgRawReader->NextEvent())
   {
-    if (iEvent != gEvent->GetEventId())
+    if (iEvent != gAliEveEvent->GetEventId())
     {
       iEvent++;
       continue;
@@ -439,11 +439,10 @@ void AliEveMUONData::LoadRaw(TString fileName)
        fChambers[chamber]->RegisterDigit(detElemId,cathode,ix,iy,adc);
       }
   }
-
 }
 
 //______________________________________________________________________________
-Int_t AliEveMUONData::GetTrack(Int_t index)
+Int_t AliEveMUONData::GetTrack(Int_t index) const
 {
   //
   // return track stack number for "index"-th track with hits in the chambers
@@ -454,7 +453,6 @@ Int_t AliEveMUONData::GetTrack(Int_t index)
   } else {
     return -1;
   }
-
 }
 
 //______________________________________________________________________________
@@ -469,5 +467,4 @@ AliEveMUONChamberData* AliEveMUONData::GetChamberData(Int_t chamber)
   //if (fChambers[chamber] == 0) CreateChamber(chamber);
 
   return fChambers[chamber];
-
 }