]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCFast.cxx
Including TFile.h
[u/mrichter/AliRoot.git] / TPC / AliTPCFast.cxx
index d6d316992239188b25c0cd12540cddf70af20042..7e074f739758bcf9bbbff336d6ac033abbbe4630 100644 (file)
@@ -22,6 +22,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 #include <TParticle.h>
+#include <TVector.h>
 
 #include "AliRunLoader.h"
 #include "AliRun.h"
@@ -33,7 +34,7 @@
 #include "AliTPCcluster.h"
 #include "AliComplexCluster.h"
 #include "AliTPCFast.h"
-
+#include "AliLog.h"
 
 ClassImp(AliTPCFast)
 
@@ -74,23 +75,23 @@ void AliTPCFast::Hits2Clusters(AliRunLoader* runLoader) const
 
   AliLoader* loader = runLoader->GetLoader("TPCLoader");
   if (!loader) {
-    Error("Hits2Clusters", "No TPC loader found");
+    AliError("No TPC loader found");
     return;
   }
   if (!runLoader->GetAliRun()) runLoader->LoadgAlice();
   AliRun* aliRun = runLoader->GetAliRun();
   if (!aliRun) {
-    Error("Hits2Clusters", "Couldn't get AliRun object");
+    AliError("Couldn't get AliRun object");
     return;
   }
   AliTPC* tpc = (AliTPC*) aliRun->GetDetector("TPC");
   if (!tpc) {
-    Error("Hits2Clusters", "Couldn't get TPC detector");
+    AliError("Couldn't get TPC detector");
     return;
   }
   AliTPCParam* param = tpc->GetParam();
   if (!param) {
-    Error("Hits2Clusters", "No TPC parameters available");
+    AliError("No TPC parameters available");
     return;
   }
 
@@ -112,10 +113,8 @@ void AliTPCFast::Hits2Clusters(AliRunLoader* runLoader) const
   
   TTree *tH = loader->TreeH();
   if (tH == 0x0)
-   {
-     Fatal("Hits2Clusters","Can not find TreeH in folder");
-     return;
-   }
+    AliFatal("Can not find TreeH in folder");
+
   tpc->SetTreeAddress();
   
   Stat_t ntracks = tH->GetEntries();
@@ -124,7 +123,7 @@ void AliTPCFast::Hits2Clusters(AliRunLoader* runLoader) const
   
   if (loader->TreeR() == 0x0) loader->MakeTree("R");
   
-  cout<<"param->GetTitle() = "<<param->GetTitle()<<endl;
+  AliDebug(1,Form("param->GetTitle() = %s",param->GetTitle()));
   
   runLoader->CdGAFile();
   //param->Write(param->GetTitle());
@@ -271,23 +270,23 @@ void AliTPCFast::Hits2ExactClustersSector(AliRunLoader* runLoader,
   }
   AliLoader* loader = runLoader->GetLoader("TPCLoader");
   if (!loader) {
-    Error("Hits2ExactClustersSector", "No TPC loader found");
+    AliError("No TPC loader found");
     return;
   }
   if (!runLoader->GetAliRun()) runLoader->LoadgAlice();
   AliRun* aliRun = runLoader->GetAliRun();
   if (!aliRun) {
-    Error("Hits2ExactClustersSector", "Couldn't get AliRun object");
+    AliError("Couldn't get AliRun object");
     return;
   }
   AliTPC* tpc = (AliTPC*) aliRun->GetDetector("TPC");
   if (!tpc) {
-    Error("Hits2ExactClustersSector", "Couldn't get TPC detector");
+    AliError("Couldn't get TPC detector");
     return;
   }
   AliTPCParam* param = tpc->GetParam();
   if (!param) {
-    Error("Hits2ExactClustersSector", "No TPC parameters available");
+    AliError("No TPC parameters available");
     return;
   }
   //
@@ -296,8 +295,8 @@ void AliTPCFast::Hits2ExactClustersSector(AliRunLoader* runLoader,
   //  Int_t sector,nhits;
   Int_t ipart;
   const Int_t kcmaxhits=30000;
-  AliTPCFastVector * xxxx = new AliTPCFastVector(kcmaxhits*4);
-  AliTPCFastVector & xxx = *xxxx;
+  TVector * xxxx = new TVector(kcmaxhits*4);
+  TVector & xxx = *xxxx;
   Int_t maxhits = kcmaxhits;
   //construct array for each padrow
   for (Int_t i=0; i<param->GetNRow(isec);i++) 
@@ -309,10 +308,8 @@ void AliTPCFast::Hits2ExactClustersSector(AliRunLoader* runLoader,
   
   TTree *tH = loader->TreeH();
   if (tH == 0x0)
-   {
-     Fatal("Hits2Clusters","Can not find TreeH in folder");
-     return;
-   }
+    AliFatal("Can not find TreeH in folder");
+
   tpc->SetTreeAddress();
 
   Stat_t ntracks = tH->GetEntries();
@@ -468,23 +465,23 @@ void AliTPCFast::FindTrackHitsIntersection(AliRunLoader* runLoader,
   //middle of the row
   AliLoader* loader = runLoader->GetLoader("TPCLoader");
   if (!loader) {
-    Error("FindTrackHitsIntersection", "No TPC loader found");
+    AliError("No TPC loader found");
     return;
   }
   if (!runLoader->GetAliRun()) runLoader->LoadgAlice();
   AliRun* aliRun = runLoader->GetAliRun();
   if (!aliRun) {
-    Error("FindTrackHitsIntersection", "Couldn't get AliRun object");
+    AliError("Couldn't get AliRun object");
     return;
   }
   AliTPC* tpc = (AliTPC*) aliRun->GetDetector("TPC");
   if (!tpc) {
-    Error("FindTrackHitsIntersection", "Couldn't get TPC detector");
+    AliError("Couldn't get TPC detector");
     return;
   }
   AliTPCParam* param = tpc->GetParam();
   if (!param) {
-    Error("FindTrackHitsIntersection", "No TPC parameters available");
+    AliError("No TPC parameters available");
     return;
   }
 
@@ -492,8 +489,8 @@ void AliTPCFast::FindTrackHitsIntersection(AliRunLoader* runLoader,
   Int_t ipart;
   
   const Int_t kcmaxhits=30000;
-  AliTPCFastVector * xxxx = new AliTPCFastVector(kcmaxhits*4);
-  AliTPCFastVector & xxx = *xxxx;
+  TVector * xxxx = new TVector(kcmaxhits*4);
+  TVector & xxx = *xxxx;
   Int_t maxhits = kcmaxhits;
       
   //