]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCReconstructor.cxx
Preparation for the new dEdx algorithm :
[u/mrichter/AliRoot.git] / TPC / AliTPCReconstructor.cxx
index 8517a68b565a098f6661aa292f7bd4d5f7cabe27..dbe8d1c13c17b487928b332101feff33ad4a1636 100644 (file)
 #include "AliRawReader.h"
 #include "AliTPCclustererMI.h"
 #include "AliTPCtrackerMI.h"
-#include "AliTPCpidESD.h"
+//#include "AliTPCpidESD.h"
 #include "AliTPCParam.h"
 #include "AliTPCParamSR.h"
 #include "AliTPCcalibDB.h"
+#include "AliTracker.h"
+#include "AliMagF.h"
 
 ClassImp(AliTPCReconstructor)
 
 
-AliTPCRecoParam *    AliTPCReconstructor::fgkRecoParam =0;  // reconstruction parameters
-Int_t    AliTPCReconstructor::fgStreamLevel     = 0;        // stream (debug) level
-
+Int_t    AliTPCReconstructor::fgStreamLevel     = 1;        // stream (debug) level
+AliTPCAltroEmulator *  AliTPCReconstructor::fAltroEmulator=0;    // ALTRO emulator
 
 AliTPCReconstructor::AliTPCReconstructor():
 AliReconstructor(),
@@ -49,7 +50,9 @@ fClusterer(NULL)
   //
   //
   //
+  AliTPCcalibDB * calib = AliTPCcalibDB::Instance();
+  const AliMagF * field = (AliMagF*)TGeoGlobalMagField::Instance()->GetField();
+  calib->SetExBField(field);
   AliTPCParam* param = GetTPCParam();
   if (!param) {
     AliWarning("Loading default TPC parameters !");
@@ -58,10 +61,25 @@ fClusterer(NULL)
   fClusterer = new AliTPCclustererMI(param);
 }
 
+AliTPCReconstructor::AliTPCReconstructor(const AliTPCReconstructor& /*rec*/):
+AliReconstructor(),
+fClusterer(NULL)
+{
+  //
+  // Dummy copu constructor
+  //
+}
+
+AliTPCReconstructor& AliTPCReconstructor::operator=(const AliTPCReconstructor&){
+  //
+  // dummy operator
+  //
+  return *this;
+}
+
 //_____________________________________________________________________________
 AliTPCReconstructor::~AliTPCReconstructor()
 {
-  if (fgkRecoParam) delete fgkRecoParam;
   if (fClusterer)   delete fClusterer;
 }
 
@@ -78,9 +96,6 @@ void AliTPCReconstructor::Reconstruct(TTree* digitsTree, TTree* clustersTree) co
 void AliTPCReconstructor::Reconstruct(AliRawReader* rawReader, TTree* clustersTree) const {
   // single event local reconstruction
   // of TPC data starting from raw data
-  TString option = GetOption();
-  if (option.Contains("OldRCUFormat"))
-    fClusterer->SetOldRCUFormat(kTRUE);
 
   fClusterer->SetOutput(clustersTree);
   fClusterer->Digits2Clusters(rawReader);
@@ -102,13 +117,14 @@ AliTracker* AliTPCReconstructor::CreateTracker() const
 
 //_____________________________________________________________________________
 void AliTPCReconstructor::FillESD(TTree */*digitsTree*/, TTree */*clustersTree*/,
-                                 AliESDEvent* esd) const
+                                 AliESDEvent* /*esd*/) const
 {
 // make PID
-
-  Double_t parTPC[] = {47., 0.07, 5.};
+/*  Now done in AliESDpid
+  Double_t parTPC[] = {50., 0.07, 5.};  // MIP nnormalized to channel 50 -MI
   AliTPCpidESD tpcPID(parTPC);
   tpcPID.MakePID(esd);
+*/
 }
 
 
@@ -121,29 +137,3 @@ AliTPCParam* AliTPCReconstructor::GetTPCParam() const
 
   return param;
 }
-
-
-
-
-const AliTPCRecoParam* AliTPCReconstructor::GetRecoParam(){ 
-  //
-  // Get reconstruction parameters
-  //
-  
-   if (!fgkRecoParam) {
-    //
-    // 1. try to get reco parameters from OCDB 
-    //
-    fgkRecoParam = AliTPCcalibDB::Instance()->GetRecoParam(0);
-    //Info("","Reconstruction parameters from OCDB used");
-    //
-    // 2. If not initialized take default
-    //
-    if (!fgkRecoParam){
-      fgkRecoParam = AliTPCRecoParam::GetHighFluxParam();
-      //Error("","Default reconstruction parameters  used");
-    }
-  }
-
-  return fgkRecoParam;
-}