]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/MUONClusterInfo.C
The variable fSeed is not really needed as the fitter is called in a way that the...
[u/mrichter/AliRoot.git] / MUON / MUONClusterInfo.C
index e340712ad433a082b2d04d1fc11cc899352fb587..67009aead3fcd056cf2087c6520f629298b297a2 100644 (file)
@@ -33,7 +33,7 @@
 #include <TROOT.h>
 
 // STEER includes
-#include "AliMagFMaps.h"
+#include "AliMagF.h"
 #include "AliTracker.h"
 #include "AliESDEvent.h"
 #include "AliESDMuonTrack.h"
@@ -68,6 +68,8 @@ TTree* GetESDTree(TFile *esdFile);
 void MUONClusterInfo(Int_t nevents = -1, const char* esdFileName = "AliESDs.root", const char* outFileName = "clusterInfo.root")
 {
   /// load ESD event in the ESDInterface to recover MUON objects;
+  /// track parameters at each cluster are recomputed by the interface using Kalman filter + Smoother
+  /// (It can be changed by resetting the tracker in the interface with a new recoParam object);
   /// fill AliMUONESDClusterInfo object with ESD cluster + corresponding track parameters;
   /// write results in a new root file.
   
@@ -162,7 +164,7 @@ void MUONClusterInfo(Int_t nevents = -1, const char* esdFileName = "AliESDs.root
          // pad location
          const AliMpVSegmentation* seg = AliMpSegmentation::Instance()->
            GetMpSegmentation(digit->DetElemId(),AliMp::GetCathodType(digit->Cathode()));
-         AliMpPad pad = seg->PadByIndices(AliMpIntPair(digit->PadX(), digit->PadY()));
+         AliMpPad pad = seg->PadByIndices(digit->PadX(), digit->PadY());
          
          // calibration parameters
          AliMUONVCalibParam* ped = calibData->Pedestals(digit->DetElemId(), digit->ManuId());
@@ -171,8 +173,8 @@ void MUONClusterInfo(Int_t nevents = -1, const char* esdFileName = "AliESDs.root
          
          // fill pad info
          padInfo.SetPadId(digit->GetUniqueID());
-         padInfo.SetPadXY(pad.Position().X(), pad.Position().Y());
-         padInfo.SetPadDimXY(pad.Dimensions().X(), pad.Dimensions().Y());
+         padInfo.SetPadXY(pad.GetPositionX(), pad.GetPositionY());
+         padInfo.SetPadDimXY(pad.GetDimensionX(), pad.GetDimensionY());
          padInfo.SetPadCharge((Double_t)digit->Charge());
          padInfo.SetPadADC(digit->ADC());
          padInfo.SetSaturated(digit->IsSaturated());
@@ -235,24 +237,26 @@ void Prepare()
   }
   
   // set mag field
-  printf("Loading field map...\n");
-  AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 1, 1., 10., AliMagFMaps::k5kG);
-  AliTracker::SetFieldMap(field, kFALSE);
+  if (!TGeoGlobalMagField::Instance()->GetField()) {
+    printf("Loading field map...\n");
+    AliMagF* field = new AliMagF("Maps","Maps",2,1.,1., 10.,AliMagF::k5kG);
+    TGeoGlobalMagField::Instance()->SetField(field);
+  }
   
   // Load mapping
   AliCDBManager* man = AliCDBManager::Instance();
-  man->SetDefaultStorage("local://$ALICE_ROOT");
+  man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
   man->SetRun(0);
   if ( ! AliMpCDB::LoadDDLStore() ) {
     Error("MUONRefit","Could not access mapping from OCDB !");
     exit(-1);
   }
   
-  // eventually set reconstruction parameters for refit (otherwise read from OCDB)
-/*  AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam();
-  muonRecoParam->Print("FULL");
-  AliRecoParam::Instance()->RegisterRecoParam(muonRecoParam);
-*/  
+  // Reset the reconstruction parameters for track refitting if needed
+  // (by default will use Kalman filter + Smoother)
+//  AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam();
+//  AliMUONESDInterface::ResetTracker(muonRecoParam);
+  
 }
 
 //-----------------------------------------------------------------------